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 1 : 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 60616 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1180 : #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1181 60616 : if (!result) {
1182 60518 : 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 60616 : 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 48814 : PyObject *none = Py_None;
1330 48814 : Py_INCREF(none);
1331 48814 : 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 640066 : SwigPyObject_type(void) {
1556 640066 : static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1557 640066 : return type;
1558 : }
1559 :
1560 : SWIGRUNTIMEINLINE int
1561 463862 : SwigPyObject_Check(PyObject *op) {
1562 : return (Py_TYPE(op) == SwigPyObject_type())
1563 463862 : || (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 88102 : SwigPyObject_dealloc(PyObject *v)
1571 : {
1572 88102 : SwigPyObject *sobj = (SwigPyObject *) v;
1573 88102 : PyObject *next = sobj->next;
1574 88102 : if (sobj->own == SWIG_POINTER_OWN) {
1575 44051 : swig_type_info *ty = sobj->ty;
1576 44051 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1577 44051 : PyObject *destroy = data ? data->destroy : 0;
1578 44051 : if (destroy) {
1579 : /* destroy is always a VARARGS method */
1580 : PyObject *res;
1581 44051 : if (data->delargs) {
1582 : /* we need to create a temporary object to carry the destroy operation */
1583 44051 : PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1584 44051 : res = SWIG_Python_CallFunctor(destroy, tmp);
1585 44051 : 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 44051 : 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 88102 : Py_XDECREF(next);
1601 88102 : PyObject_DEL(v);
1602 88102 : }
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 1 : _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 1 : 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 1 : };
1851 1 : swigpyobject_type = tmp;
1852 : /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
1853 : #if PY_VERSION_HEX < 0x03000000
1854 1 : swigpyobject_type.ob_type = &PyType_Type;
1855 : #endif
1856 1 : type_init = 1;
1857 : }
1858 1 : return &swigpyobject_type;
1859 : }
1860 :
1861 : SWIGRUNTIME PyObject *
1862 88102 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1863 : {
1864 88102 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1865 88102 : if (sobj) {
1866 88102 : sobj->ptr = ptr;
1867 88102 : sobj->ty = ty;
1868 88102 : sobj->own = own;
1869 88102 : sobj->next = 0;
1870 : }
1871 88102 : 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 1 : return SWIG_Python_str_FromChar("this");
2076 : }
2077 :
2078 : SWIGRUNTIME PyObject *
2079 238325 : SWIG_This(void)
2080 : {
2081 238326 : static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
2082 238325 : 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 254037 : SWIG_Python_GetSwigThis(PyObject *pyobj)
2094 : {
2095 254037 : if (SwigPyObject_Check(pyobj)) {
2096 44212 : return (SwigPyObject *) pyobj;
2097 : } else {
2098 209825 : PyObject *obj = 0;
2099 : #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2100 209825 : if (PyInstance_Check(pyobj)) {
2101 0 : obj = _PyInstance_Lookup(pyobj, SWIG_This());
2102 : } else {
2103 209825 : PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2104 209825 : if (dictptr != NULL) {
2105 209825 : PyObject *dict = *dictptr;
2106 209825 : 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 209825 : 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 209825 : 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 254037 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2160 254037 : if (!obj) return SWIG_ERROR;
2161 254037 : if (obj == Py_None) {
2162 0 : if (ptr) *ptr = 0;
2163 0 : return SWIG_OK;
2164 : } else {
2165 254037 : SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2166 254037 : if (own)
2167 0 : *own = 0;
2168 254037 : while (sobj) {
2169 254037 : void *vptr = sobj->ptr;
2170 254037 : if (ty) {
2171 254037 : swig_type_info *to = sobj->ty;
2172 254037 : if (to == ty) {
2173 : /* no type cast needed */
2174 254037 : 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 254037 : if (sobj) {
2199 254037 : if (own)
2200 0 : *own = *own | sobj->own;
2201 254037 : if (flags & SWIG_POINTER_DISOWN) {
2202 44212 : sobj->own = 0;
2203 : }
2204 254037 : 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 28500 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2306 : {
2307 : #if (PY_VERSION_HEX >= 0x02020000)
2308 28500 : PyObject *inst = 0;
2309 28500 : PyObject *newraw = data->newraw;
2310 28500 : if (newraw) {
2311 28500 : inst = PyObject_Call(newraw, data->newargs, NULL);
2312 28500 : if (inst) {
2313 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2314 28500 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2315 28500 : if (dictptr != NULL) {
2316 28500 : PyObject *dict = *dictptr;
2317 28500 : if (dict == NULL) {
2318 28500 : dict = PyDict_New();
2319 28500 : *dictptr = dict;
2320 28500 : 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 28500 : 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 44051 : SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2415 44051 : if (!ptr) {
2416 0 : return SWIG_Py_Void();
2417 : } else {
2418 44051 : int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2419 44051 : PyObject *robj = SwigPyObject_New(ptr, type, own);
2420 44051 : SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2421 44051 : if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2422 28500 : PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2423 28500 : if (inst) {
2424 28500 : Py_DECREF(robj);
2425 28500 : robj = inst;
2426 : }
2427 : }
2428 44051 : 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 21963 : if (carray) {
2848 17454 : 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 17454 : 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 21963 : SWIG_FromCharPtr(const char *cptr)
2867 : {
2868 43926 : 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 14491 : return SWIG_From_long (value);
2949 : }
2950 :
2951 :
2952 :
2953 : /* Return a PyObject* from a NULL terminated C String */
2954 60525 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
2955 : {
2956 60525 : const unsigned char* pszIter = (const unsigned char*) pszStr;
2957 26503828 : while(*pszIter != 0)
2958 : {
2959 26382778 : 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 26382778 : pszIter ++;
2971 : }
2972 : #if PY_VERSION_HEX >= 0x03000000
2973 : return PyUnicode_FromString(pszStr);
2974 : #else
2975 60525 : 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 32100 : 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 32100 : 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 32100 : PyString_AsStringAndSize(obj, &cstr, &len);
3112 : #endif
3113 32100 : if (cptr) {
3114 32100 : 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 32100 : 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 32100 : *cptr = cstr;
3135 32100 : *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 32100 : if (psize) *psize = len + 1;
3145 : #if PY_VERSION_HEX>=0x03000000
3146 : Py_XDECREF(obj);
3147 : #endif
3148 32100 : 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 15513 : return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
3211 : }
3212 : SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
3213 44174 : if (OSRDereference( self ) == 0 ) {
3214 44026 : OSRDestroySpatialReference( self );
3215 : }
3216 : }
3217 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow___str__(OSRSpatialReferenceShadow *self){
3218 4 : char *buf = 0;
3219 4 : OSRExportToPrettyWkt( self, &buf, 0 );
3220 4 : return buf;
3221 : }
3222 : SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3223 14477 : 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 9107 : SWIG_AsVal_long (PyObject *obj, long* val)
3345 : {
3346 9107 : if (PyInt_Check(obj)) {
3347 9107 : if (val) *val = PyInt_AsLong(obj);
3348 9107 : 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 9104 : SWIG_AsVal_int (PyObject * obj, int *val)
3384 : {
3385 : long v;
3386 9104 : int res = SWIG_AsVal_long (obj, &v);
3387 9104 : if (SWIG_IsOK(res)) {
3388 9104 : if ((v < INT_MIN || v > INT_MAX)) {
3389 0 : return SWIG_OverflowError;
3390 : } else {
3391 9104 : if (val) *val = static_cast< int >(v);
3392 : }
3393 : }
3394 9104 : 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 20252 : return OSRGetAttrValue( self, name, child );
3402 : }
3403 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
3404 622 : 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 8637 : 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 232 : 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 6012 : 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 8983 : 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_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout){
3727 60362 : return OSRExportToWkt( self, argout );
3728 : }
3729 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
3730 34 : return OSRExportToPrettyWkt( self, argout, simplify );
3731 : }
3732 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
3733 103 : return OSRExportToProj4( self, argout );
3734 : }
3735 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *parms[17]){
3736 6 : return OSRExportToPCI( self, proj, units, parms );
3737 : }
3738 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *parms[15],long *datum){
3739 1 : return OSRExportToUSGS( self, code, zone, parms, datum );
3740 : }
3741 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
3742 1 : return OSRExportToXML( self, argout, dialect );
3743 : }
3744 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
3745 1 : return OSRExportToMICoordSys( self, argout );
3746 : }
3747 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
3748 14 : return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
3749 : }
3750 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
3751 28486 : return (OSRSpatialReferenceShadow*) OSRClone(self);
3752 : }
3753 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
3754 60 : return OSRValidate(self);
3755 : }
3756 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripCTParms(OSRSpatialReferenceShadow *self){
3757 16685 : return OSRStripCTParms(self);
3758 : }
3759 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_FixupOrdering(OSRSpatialReferenceShadow *self){
3760 0 : return OSRFixupOrdering(self);
3761 : }
3762 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Fixup(OSRSpatialReferenceShadow *self){
3763 1 : return OSRFixup(self);
3764 : }
3765 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
3766 14258 : return OSRMorphToESRI(self);
3767 : }
3768 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
3769 14261 : return OSRMorphFromESRI(self);
3770 : }
3771 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
3772 38 : OSRCoordinateTransformationShadow *obj = (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation( src, dst );
3773 38 : return obj;
3774 : }
3775 : SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
3776 38 : OCTDestroyCoordinateTransformation( self );
3777 : }
3778 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double inout[3]){
3779 0 : if (self == NULL)
3780 : return;
3781 0 : OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
3782 : }
3783 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
3784 83 : if (self == NULL)
3785 : return;
3786 83 : argout[0] = x;
3787 83 : argout[1] = y;
3788 83 : argout[2] = z;
3789 83 : OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
3790 : }
3791 :
3792 : static int
3793 2 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
3794 : {
3795 6 : for( int i = 0; i<nCount; ++i )
3796 : {
3797 :
3798 4 : PyObject *o = PySequence_GetItem(seq, i);
3799 4 : if ( !PySequence_Check(o) )
3800 : {
3801 0 : Py_DECREF(o);
3802 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
3803 :
3804 0 : return FALSE;
3805 : }
3806 :
3807 4 : Py_ssize_t len = PySequence_Size(o);
3808 :
3809 4 : if (len == 2 || len == 3)
3810 : {
3811 4 : PyObject *o1 = PySequence_GetItem(o, 0);
3812 4 : if (!PyNumber_Check(o1))
3813 : {
3814 0 : Py_DECREF(o); Py_DECREF(o1);
3815 0 : PyErr_SetString(PyExc_TypeError, "not a number");
3816 :
3817 0 : return FALSE;
3818 : }
3819 4 : x[i] = PyFloat_AsDouble(o1);
3820 4 : Py_DECREF(o1);
3821 :
3822 4 : o1 = PySequence_GetItem(o, 1);
3823 4 : if (!PyNumber_Check(o1))
3824 : {
3825 0 : Py_DECREF(o); Py_DECREF(o1);
3826 0 : PyErr_SetString(PyExc_TypeError, "not a number");
3827 :
3828 0 : return FALSE;
3829 : }
3830 4 : y[i] = PyFloat_AsDouble(o1);
3831 4 : Py_DECREF(o1);
3832 :
3833 : /* The 3rd coordinate is optional, default 0.0 */
3834 4 : if (len == 3)
3835 : {
3836 2 : o1 = PySequence_GetItem(o, 2);
3837 2 : if (!PyNumber_Check(o1))
3838 : {
3839 0 : Py_DECREF(o); Py_DECREF(o1);
3840 0 : PyErr_SetString(PyExc_TypeError, "not a number");
3841 :
3842 0 : return FALSE;
3843 : }
3844 2 : z[i] = PyFloat_AsDouble(o1);
3845 2 : Py_DECREF(o1);
3846 : }
3847 : else
3848 : {
3849 2 : z[i] = 0.0;
3850 : }
3851 : }
3852 : else
3853 : {
3854 0 : Py_DECREF(o);
3855 0 : PyErr_SetString(PyExc_TypeError, "invalid coordinate");
3856 :
3857 0 : return FALSE;
3858 : }
3859 :
3860 4 : Py_DECREF(o);
3861 : }
3862 :
3863 2 : return TRUE;
3864 : }
3865 :
3866 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z){
3867 2 : if (self == NULL)
3868 : return;
3869 2 : OCTTransform( self, nCount, x, y, z );
3870 : }
3871 : #ifdef __cplusplus
3872 : extern "C" {
3873 : #endif
3874 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3875 0 : PyObject *resultobj = 0;
3876 : int result;
3877 :
3878 0 : if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
3879 0 : result = (int)GetUseExceptions();
3880 0 : resultobj = SWIG_From_int(static_cast< int >(result));
3881 0 : return resultobj;
3882 : fail:
3883 0 : return NULL;
3884 : }
3885 :
3886 :
3887 0 : SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3888 0 : PyObject *resultobj = 0;
3889 :
3890 0 : if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
3891 0 : UseExceptions();
3892 0 : resultobj = SWIG_Py_Void();
3893 0 : return resultobj;
3894 : fail:
3895 0 : return NULL;
3896 : }
3897 :
3898 :
3899 0 : SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3900 0 : PyObject *resultobj = 0;
3901 :
3902 0 : if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
3903 0 : DontUseExceptions();
3904 0 : resultobj = SWIG_Py_Void();
3905 0 : return resultobj;
3906 : fail:
3907 0 : return NULL;
3908 : }
3909 :
3910 :
3911 0 : SWIGINTERN PyObject *_wrap_GetWellKnownGeogCSAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3912 0 : PyObject *resultobj = 0;
3913 0 : char *arg1 = (char *) 0 ;
3914 0 : char **arg2 = (char **) 0 ;
3915 : int res1 ;
3916 0 : char *buf1 = 0 ;
3917 0 : int alloc1 = 0 ;
3918 0 : char *argout2 = 0 ;
3919 0 : PyObject * obj0 = 0 ;
3920 : OGRErr result;
3921 :
3922 : {
3923 : /* %typemap(in,numinputs=0) (char **argout2) */
3924 0 : arg2 = &argout2;
3925 : }
3926 0 : if (!PyArg_ParseTuple(args,(char *)"O:GetWellKnownGeogCSAsWKT",&obj0)) SWIG_fail;
3927 0 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
3928 0 : if (!SWIG_IsOK(res1)) {
3929 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetWellKnownGeogCSAsWKT" "', argument " "1"" of type '" "char const *""'");
3930 : }
3931 0 : arg1 = reinterpret_cast< char * >(buf1);
3932 : {
3933 0 : if (!arg1) {
3934 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3935 : }
3936 : }
3937 : {
3938 0 : if ( bUseExceptions ) {
3939 0 : CPLErrorReset();
3940 : }
3941 0 : result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
3942 0 : if ( bUseExceptions ) {
3943 0 : CPLErr eclass = CPLGetLastErrorType();
3944 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3945 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
3946 : }
3947 : }
3948 : }
3949 : {
3950 : /* %typemap(out) OGRErr */
3951 0 : if ( result != 0 && bUseExceptions) {
3952 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
3953 0 : SWIG_fail;
3954 : }
3955 : }
3956 : {
3957 : /* %typemap(argout) (char **argout) */
3958 : PyObject *o;
3959 0 : if ( arg2 != NULL && *arg2 != NULL) {
3960 0 : o = GDALPythonObjectFromCStr( *arg2 );
3961 : }
3962 : else {
3963 0 : o = Py_None;
3964 0 : Py_INCREF( o );
3965 : }
3966 0 : resultobj = t_output_helper(resultobj, o);
3967 : }
3968 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3969 : {
3970 : /* %typemap(freearg) (char **argout) */
3971 0 : if ( *arg2 )
3972 0 : CPLFree( *arg2 );
3973 : }
3974 : {
3975 : /* %typemap(ret) OGRErr */
3976 0 : if (resultobj == Py_None ) {
3977 0 : Py_DECREF(resultobj);
3978 0 : resultobj = 0;
3979 : }
3980 0 : if (resultobj == 0) {
3981 0 : resultobj = PyInt_FromLong( result );
3982 : }
3983 : }
3984 0 : return resultobj;
3985 : fail:
3986 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3987 : {
3988 : /* %typemap(freearg) (char **argout) */
3989 0 : if ( *arg2 )
3990 0 : CPLFree( *arg2 );
3991 : }
3992 0 : return NULL;
3993 : }
3994 :
3995 :
3996 8 : SWIGINTERN PyObject *_wrap_GetUserInputAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3997 8 : PyObject *resultobj = 0;
3998 8 : char *arg1 = (char *) 0 ;
3999 8 : char **arg2 = (char **) 0 ;
4000 : int res1 ;
4001 8 : char *buf1 = 0 ;
4002 8 : int alloc1 = 0 ;
4003 8 : char *argout2 = 0 ;
4004 8 : PyObject * obj0 = 0 ;
4005 : OGRErr result;
4006 :
4007 : {
4008 : /* %typemap(in,numinputs=0) (char **argout2) */
4009 8 : arg2 = &argout2;
4010 : }
4011 8 : if (!PyArg_ParseTuple(args,(char *)"O:GetUserInputAsWKT",&obj0)) SWIG_fail;
4012 8 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4013 8 : if (!SWIG_IsOK(res1)) {
4014 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetUserInputAsWKT" "', argument " "1"" of type '" "char const *""'");
4015 : }
4016 8 : arg1 = reinterpret_cast< char * >(buf1);
4017 : {
4018 8 : if (!arg1) {
4019 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4020 : }
4021 : }
4022 : {
4023 8 : if ( bUseExceptions ) {
4024 0 : CPLErrorReset();
4025 : }
4026 8 : result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
4027 8 : if ( bUseExceptions ) {
4028 0 : CPLErr eclass = CPLGetLastErrorType();
4029 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4030 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4031 : }
4032 : }
4033 : }
4034 : {
4035 : /* %typemap(out) OGRErr */
4036 8 : if ( result != 0 && bUseExceptions) {
4037 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4038 0 : SWIG_fail;
4039 : }
4040 : }
4041 : {
4042 : /* %typemap(argout) (char **argout) */
4043 : PyObject *o;
4044 16 : if ( arg2 != NULL && *arg2 != NULL) {
4045 8 : o = GDALPythonObjectFromCStr( *arg2 );
4046 : }
4047 : else {
4048 0 : o = Py_None;
4049 0 : Py_INCREF( o );
4050 : }
4051 8 : resultobj = t_output_helper(resultobj, o);
4052 : }
4053 8 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4054 : {
4055 : /* %typemap(freearg) (char **argout) */
4056 8 : if ( *arg2 )
4057 8 : CPLFree( *arg2 );
4058 : }
4059 : {
4060 : /* %typemap(ret) OGRErr */
4061 8 : if (resultobj == Py_None ) {
4062 0 : Py_DECREF(resultobj);
4063 0 : resultobj = 0;
4064 : }
4065 8 : if (resultobj == 0) {
4066 0 : resultobj = PyInt_FromLong( result );
4067 : }
4068 : }
4069 8 : return resultobj;
4070 : fail:
4071 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4072 : {
4073 : /* %typemap(freearg) (char **argout) */
4074 0 : if ( *arg2 )
4075 0 : CPLFree( *arg2 );
4076 : }
4077 0 : return NULL;
4078 : }
4079 :
4080 :
4081 15513 : SWIGINTERN PyObject *_wrap_new_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4082 15513 : PyObject *resultobj = 0;
4083 15513 : char *arg1 = (char *) "" ;
4084 : int res1 ;
4085 15513 : char *buf1 = 0 ;
4086 15513 : int alloc1 = 0 ;
4087 15513 : PyObject * obj0 = 0 ;
4088 : char * kwnames[] = {
4089 : (char *) "wkt", NULL
4090 15513 : };
4091 15513 : OSRSpatialReferenceShadow *result = 0 ;
4092 :
4093 15513 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_SpatialReference",kwnames,&obj0)) SWIG_fail;
4094 15513 : if (obj0) {
4095 163 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4096 163 : if (!SWIG_IsOK(res1)) {
4097 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'");
4098 : }
4099 163 : arg1 = reinterpret_cast< char * >(buf1);
4100 : }
4101 : {
4102 15513 : if ( bUseExceptions ) {
4103 0 : CPLErrorReset();
4104 : }
4105 15513 : result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
4106 15513 : if ( bUseExceptions ) {
4107 0 : CPLErr eclass = CPLGetLastErrorType();
4108 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4109 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4110 : }
4111 : }
4112 : }
4113 15513 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_NEW | 0 );
4114 15513 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4115 15513 : return resultobj;
4116 : fail:
4117 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4118 0 : return NULL;
4119 : }
4120 :
4121 :
4122 44174 : SWIGINTERN PyObject *_wrap_delete_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4123 44174 : PyObject *resultobj = 0;
4124 44174 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4125 44174 : void *argp1 = 0 ;
4126 44174 : int res1 = 0 ;
4127 44174 : PyObject * obj0 = 0 ;
4128 :
4129 44174 : if (!PyArg_ParseTuple(args,(char *)"O:delete_SpatialReference",&obj0)) SWIG_fail;
4130 44174 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_DISOWN | 0 );
4131 44174 : if (!SWIG_IsOK(res1)) {
4132 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialReference" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4133 : }
4134 44174 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4135 : {
4136 44174 : if ( bUseExceptions ) {
4137 0 : CPLErrorReset();
4138 : }
4139 : delete_OSRSpatialReferenceShadow(arg1);
4140 44174 : if ( bUseExceptions ) {
4141 0 : CPLErr eclass = CPLGetLastErrorType();
4142 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4143 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4144 : }
4145 : }
4146 : }
4147 44174 : resultobj = SWIG_Py_Void();
4148 44174 : return resultobj;
4149 : fail:
4150 0 : return NULL;
4151 : }
4152 :
4153 :
4154 4 : SWIGINTERN PyObject *_wrap_SpatialReference___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4155 4 : PyObject *resultobj = 0;
4156 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4157 4 : void *argp1 = 0 ;
4158 4 : int res1 = 0 ;
4159 4 : PyObject * obj0 = 0 ;
4160 4 : retStringAndCPLFree *result = 0 ;
4161 :
4162 4 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference___str__",&obj0)) SWIG_fail;
4163 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4164 4 : if (!SWIG_IsOK(res1)) {
4165 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference___str__" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4166 : }
4167 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4168 : {
4169 4 : if ( bUseExceptions ) {
4170 0 : CPLErrorReset();
4171 : }
4172 4 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
4173 4 : if ( bUseExceptions ) {
4174 0 : CPLErr eclass = CPLGetLastErrorType();
4175 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4176 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4177 : }
4178 : }
4179 : }
4180 : {
4181 : /* %typemap(out) (retStringAndCPLFree*) */
4182 4 : if(result)
4183 : {
4184 4 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
4185 4 : CPLFree(result);
4186 : }
4187 : }
4188 4 : return resultobj;
4189 : fail:
4190 0 : return NULL;
4191 : }
4192 :
4193 :
4194 14477 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4195 14477 : PyObject *resultobj = 0;
4196 14477 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4197 14477 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
4198 14477 : void *argp1 = 0 ;
4199 14477 : int res1 = 0 ;
4200 14477 : void *argp2 = 0 ;
4201 14477 : int res2 = 0 ;
4202 14477 : PyObject * obj0 = 0 ;
4203 14477 : PyObject * obj1 = 0 ;
4204 : int result;
4205 :
4206 14477 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_IsSame",&obj0,&obj1)) SWIG_fail;
4207 14477 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4208 14477 : if (!SWIG_IsOK(res1)) {
4209 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSame" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4210 : }
4211 14477 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4212 14477 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4213 14477 : if (!SWIG_IsOK(res2)) {
4214 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSame" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
4215 : }
4216 14477 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
4217 : {
4218 14477 : if (!arg2) {
4219 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4220 : }
4221 : }
4222 : {
4223 14477 : if ( bUseExceptions ) {
4224 0 : CPLErrorReset();
4225 : }
4226 14477 : result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2);
4227 14477 : if ( bUseExceptions ) {
4228 0 : CPLErr eclass = CPLGetLastErrorType();
4229 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4230 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4231 : }
4232 : }
4233 : }
4234 14477 : resultobj = SWIG_From_int(static_cast< int >(result));
4235 14477 : return resultobj;
4236 : fail:
4237 0 : return NULL;
4238 : }
4239 :
4240 :
4241 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4242 0 : PyObject *resultobj = 0;
4243 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4244 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
4245 0 : void *argp1 = 0 ;
4246 0 : int res1 = 0 ;
4247 0 : void *argp2 = 0 ;
4248 0 : int res2 = 0 ;
4249 0 : PyObject * obj0 = 0 ;
4250 0 : PyObject * obj1 = 0 ;
4251 : int result;
4252 :
4253 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_IsSameGeogCS",&obj0,&obj1)) SWIG_fail;
4254 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4255 0 : if (!SWIG_IsOK(res1)) {
4256 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4257 : }
4258 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4259 0 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4260 0 : if (!SWIG_IsOK(res2)) {
4261 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
4262 : }
4263 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
4264 : {
4265 0 : if (!arg2) {
4266 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4267 : }
4268 : }
4269 : {
4270 0 : if ( bUseExceptions ) {
4271 0 : CPLErrorReset();
4272 : }
4273 0 : result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
4274 0 : if ( bUseExceptions ) {
4275 0 : CPLErr eclass = CPLGetLastErrorType();
4276 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4277 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4278 : }
4279 : }
4280 : }
4281 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4282 0 : return resultobj;
4283 : fail:
4284 0 : return NULL;
4285 : }
4286 :
4287 :
4288 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4289 0 : PyObject *resultobj = 0;
4290 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4291 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
4292 0 : void *argp1 = 0 ;
4293 0 : int res1 = 0 ;
4294 0 : void *argp2 = 0 ;
4295 0 : int res2 = 0 ;
4296 0 : PyObject * obj0 = 0 ;
4297 0 : PyObject * obj1 = 0 ;
4298 : int result;
4299 :
4300 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_IsSameVertCS",&obj0,&obj1)) SWIG_fail;
4301 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4302 0 : if (!SWIG_IsOK(res1)) {
4303 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4304 : }
4305 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4306 0 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4307 0 : if (!SWIG_IsOK(res2)) {
4308 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
4309 : }
4310 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
4311 : {
4312 0 : if (!arg2) {
4313 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4314 : }
4315 : }
4316 : {
4317 0 : if ( bUseExceptions ) {
4318 0 : CPLErrorReset();
4319 : }
4320 0 : result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
4321 0 : if ( bUseExceptions ) {
4322 0 : CPLErr eclass = CPLGetLastErrorType();
4323 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4324 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4325 : }
4326 : }
4327 : }
4328 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4329 0 : return resultobj;
4330 : fail:
4331 0 : return NULL;
4332 : }
4333 :
4334 :
4335 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4336 1 : PyObject *resultobj = 0;
4337 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4338 1 : void *argp1 = 0 ;
4339 1 : int res1 = 0 ;
4340 1 : PyObject * obj0 = 0 ;
4341 : int result;
4342 :
4343 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsGeographic",&obj0)) SWIG_fail;
4344 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4345 1 : if (!SWIG_IsOK(res1)) {
4346 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4347 : }
4348 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4349 : {
4350 1 : if ( bUseExceptions ) {
4351 0 : CPLErrorReset();
4352 : }
4353 1 : result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
4354 1 : if ( bUseExceptions ) {
4355 0 : CPLErr eclass = CPLGetLastErrorType();
4356 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4357 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4358 : }
4359 : }
4360 : }
4361 1 : resultobj = SWIG_From_int(static_cast< int >(result));
4362 1 : return resultobj;
4363 : fail:
4364 0 : return NULL;
4365 : }
4366 :
4367 :
4368 3 : SWIGINTERN PyObject *_wrap_SpatialReference_IsProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4369 3 : PyObject *resultobj = 0;
4370 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4371 3 : void *argp1 = 0 ;
4372 3 : int res1 = 0 ;
4373 3 : PyObject * obj0 = 0 ;
4374 : int result;
4375 :
4376 3 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsProjected",&obj0)) SWIG_fail;
4377 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4378 3 : if (!SWIG_IsOK(res1)) {
4379 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4380 : }
4381 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4382 : {
4383 3 : if ( bUseExceptions ) {
4384 0 : CPLErrorReset();
4385 : }
4386 3 : result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
4387 3 : if ( bUseExceptions ) {
4388 0 : CPLErr eclass = CPLGetLastErrorType();
4389 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4390 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4391 : }
4392 : }
4393 : }
4394 3 : resultobj = SWIG_From_int(static_cast< int >(result));
4395 3 : return resultobj;
4396 : fail:
4397 0 : return NULL;
4398 : }
4399 :
4400 :
4401 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4402 1 : PyObject *resultobj = 0;
4403 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4404 1 : void *argp1 = 0 ;
4405 1 : int res1 = 0 ;
4406 1 : PyObject * obj0 = 0 ;
4407 : int result;
4408 :
4409 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsCompound",&obj0)) SWIG_fail;
4410 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4411 1 : if (!SWIG_IsOK(res1)) {
4412 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4413 : }
4414 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4415 : {
4416 1 : if ( bUseExceptions ) {
4417 0 : CPLErrorReset();
4418 : }
4419 1 : result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
4420 1 : if ( bUseExceptions ) {
4421 0 : CPLErr eclass = CPLGetLastErrorType();
4422 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4423 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4424 : }
4425 : }
4426 : }
4427 1 : resultobj = SWIG_From_int(static_cast< int >(result));
4428 1 : return resultobj;
4429 : fail:
4430 0 : return NULL;
4431 : }
4432 :
4433 :
4434 2 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeocentric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4435 2 : PyObject *resultobj = 0;
4436 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4437 2 : void *argp1 = 0 ;
4438 2 : int res1 = 0 ;
4439 2 : PyObject * obj0 = 0 ;
4440 : int result;
4441 :
4442 2 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsGeocentric",&obj0)) SWIG_fail;
4443 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4444 2 : if (!SWIG_IsOK(res1)) {
4445 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4446 : }
4447 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4448 : {
4449 2 : if ( bUseExceptions ) {
4450 0 : CPLErrorReset();
4451 : }
4452 2 : result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
4453 2 : if ( bUseExceptions ) {
4454 0 : CPLErr eclass = CPLGetLastErrorType();
4455 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4456 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4457 : }
4458 : }
4459 : }
4460 2 : resultobj = SWIG_From_int(static_cast< int >(result));
4461 2 : return resultobj;
4462 : fail:
4463 0 : return NULL;
4464 : }
4465 :
4466 :
4467 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4468 1 : PyObject *resultobj = 0;
4469 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4470 1 : void *argp1 = 0 ;
4471 1 : int res1 = 0 ;
4472 1 : PyObject * obj0 = 0 ;
4473 : int result;
4474 :
4475 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsLocal",&obj0)) SWIG_fail;
4476 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4477 1 : if (!SWIG_IsOK(res1)) {
4478 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsLocal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4479 : }
4480 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4481 : {
4482 1 : if ( bUseExceptions ) {
4483 0 : CPLErrorReset();
4484 : }
4485 1 : result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
4486 1 : if ( bUseExceptions ) {
4487 0 : CPLErr eclass = CPLGetLastErrorType();
4488 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4489 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4490 : }
4491 : }
4492 : }
4493 1 : resultobj = SWIG_From_int(static_cast< int >(result));
4494 1 : return resultobj;
4495 : fail:
4496 0 : return NULL;
4497 : }
4498 :
4499 :
4500 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4501 0 : PyObject *resultobj = 0;
4502 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4503 0 : void *argp1 = 0 ;
4504 0 : int res1 = 0 ;
4505 0 : PyObject * obj0 = 0 ;
4506 : int result;
4507 :
4508 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsVertical",&obj0)) SWIG_fail;
4509 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4510 0 : if (!SWIG_IsOK(res1)) {
4511 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4512 : }
4513 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4514 : {
4515 0 : if ( bUseExceptions ) {
4516 0 : CPLErrorReset();
4517 : }
4518 0 : result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
4519 0 : if ( bUseExceptions ) {
4520 0 : CPLErr eclass = CPLGetLastErrorType();
4521 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4522 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4523 : }
4524 : }
4525 : }
4526 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4527 0 : return resultobj;
4528 : fail:
4529 0 : return NULL;
4530 : }
4531 :
4532 :
4533 4 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsLatLong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4534 4 : PyObject *resultobj = 0;
4535 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4536 4 : void *argp1 = 0 ;
4537 4 : int res1 = 0 ;
4538 4 : PyObject * obj0 = 0 ;
4539 : int result;
4540 :
4541 4 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_EPSGTreatsAsLatLong",&obj0)) SWIG_fail;
4542 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4543 4 : if (!SWIG_IsOK(res1)) {
4544 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsLatLong" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4545 : }
4546 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4547 : {
4548 4 : if ( bUseExceptions ) {
4549 0 : CPLErrorReset();
4550 : }
4551 4 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
4552 4 : if ( bUseExceptions ) {
4553 0 : CPLErr eclass = CPLGetLastErrorType();
4554 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4555 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4556 : }
4557 : }
4558 : }
4559 4 : resultobj = SWIG_From_int(static_cast< int >(result));
4560 4 : return resultobj;
4561 : fail:
4562 0 : return NULL;
4563 : }
4564 :
4565 :
4566 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAuthority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4567 0 : PyObject *resultobj = 0;
4568 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4569 0 : char *arg2 = (char *) 0 ;
4570 0 : char *arg3 = (char *) 0 ;
4571 : int arg4 ;
4572 0 : void *argp1 = 0 ;
4573 0 : int res1 = 0 ;
4574 : int res2 ;
4575 0 : char *buf2 = 0 ;
4576 0 : int alloc2 = 0 ;
4577 : int res3 ;
4578 0 : char *buf3 = 0 ;
4579 0 : int alloc3 = 0 ;
4580 : int val4 ;
4581 0 : int ecode4 = 0 ;
4582 0 : PyObject * obj0 = 0 ;
4583 0 : PyObject * obj1 = 0 ;
4584 0 : PyObject * obj2 = 0 ;
4585 0 : PyObject * obj3 = 0 ;
4586 : OGRErr result;
4587 :
4588 0 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_SetAuthority",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4589 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4590 0 : if (!SWIG_IsOK(res1)) {
4591 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAuthority" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4592 : }
4593 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4594 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4595 0 : if (!SWIG_IsOK(res2)) {
4596 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAuthority" "', argument " "2"" of type '" "char const *""'");
4597 : }
4598 0 : arg2 = reinterpret_cast< char * >(buf2);
4599 0 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4600 0 : if (!SWIG_IsOK(res3)) {
4601 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAuthority" "', argument " "3"" of type '" "char const *""'");
4602 : }
4603 0 : arg3 = reinterpret_cast< char * >(buf3);
4604 0 : ecode4 = SWIG_AsVal_int(obj3, &val4);
4605 0 : if (!SWIG_IsOK(ecode4)) {
4606 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAuthority" "', argument " "4"" of type '" "int""'");
4607 : }
4608 0 : arg4 = static_cast< int >(val4);
4609 : {
4610 0 : if ( bUseExceptions ) {
4611 0 : CPLErrorReset();
4612 : }
4613 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
4614 0 : if ( bUseExceptions ) {
4615 0 : CPLErr eclass = CPLGetLastErrorType();
4616 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4617 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4618 : }
4619 : }
4620 : }
4621 : {
4622 : /* %typemap(out) OGRErr */
4623 0 : if ( result != 0 && bUseExceptions) {
4624 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4625 0 : SWIG_fail;
4626 : }
4627 : }
4628 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4629 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4630 : {
4631 : /* %typemap(ret) OGRErr */
4632 0 : if (resultobj == Py_None ) {
4633 0 : Py_DECREF(resultobj);
4634 0 : resultobj = 0;
4635 : }
4636 0 : if (resultobj == 0) {
4637 0 : resultobj = PyInt_FromLong( result );
4638 : }
4639 : }
4640 0 : return resultobj;
4641 : fail:
4642 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4643 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4644 0 : return NULL;
4645 : }
4646 :
4647 :
4648 20252 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4649 20252 : PyObject *resultobj = 0;
4650 20252 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4651 20252 : char *arg2 = (char *) 0 ;
4652 20252 : int arg3 = (int) 0 ;
4653 20252 : void *argp1 = 0 ;
4654 20252 : int res1 = 0 ;
4655 : int res2 ;
4656 20252 : char *buf2 = 0 ;
4657 20252 : int alloc2 = 0 ;
4658 : int val3 ;
4659 20252 : int ecode3 = 0 ;
4660 20252 : PyObject * obj0 = 0 ;
4661 20252 : PyObject * obj1 = 0 ;
4662 20252 : PyObject * obj2 = 0 ;
4663 20252 : char *result = 0 ;
4664 :
4665 20252 : if (!PyArg_ParseTuple(args,(char *)"OO|O:SpatialReference_GetAttrValue",&obj0,&obj1,&obj2)) SWIG_fail;
4666 20252 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4667 20252 : if (!SWIG_IsOK(res1)) {
4668 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4669 : }
4670 20252 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4671 20252 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4672 20252 : if (!SWIG_IsOK(res2)) {
4673 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAttrValue" "', argument " "2"" of type '" "char const *""'");
4674 : }
4675 20252 : arg2 = reinterpret_cast< char * >(buf2);
4676 20252 : if (obj2) {
4677 89 : ecode3 = SWIG_AsVal_int(obj2, &val3);
4678 89 : if (!SWIG_IsOK(ecode3)) {
4679 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAttrValue" "', argument " "3"" of type '" "int""'");
4680 : }
4681 89 : arg3 = static_cast< int >(val3);
4682 : }
4683 : {
4684 20252 : if (!arg2) {
4685 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4686 : }
4687 : }
4688 : {
4689 20252 : if ( bUseExceptions ) {
4690 0 : CPLErrorReset();
4691 : }
4692 20252 : result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
4693 20252 : if ( bUseExceptions ) {
4694 0 : CPLErr eclass = CPLGetLastErrorType();
4695 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4696 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4697 : }
4698 : }
4699 : }
4700 20252 : resultobj = SWIG_FromCharPtr((const char *)result);
4701 20252 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4702 20252 : return resultobj;
4703 : fail:
4704 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4705 0 : return NULL;
4706 : }
4707 :
4708 :
4709 622 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4710 622 : PyObject *resultobj = 0;
4711 622 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4712 622 : char *arg2 = (char *) 0 ;
4713 622 : char *arg3 = (char *) 0 ;
4714 622 : void *argp1 = 0 ;
4715 622 : int res1 = 0 ;
4716 : int res2 ;
4717 622 : char *buf2 = 0 ;
4718 622 : int alloc2 = 0 ;
4719 : int res3 ;
4720 622 : char *buf3 = 0 ;
4721 622 : int alloc3 = 0 ;
4722 622 : PyObject * obj0 = 0 ;
4723 622 : PyObject * obj1 = 0 ;
4724 622 : PyObject * obj2 = 0 ;
4725 : OGRErr result;
4726 :
4727 622 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetAttrValue",&obj0,&obj1,&obj2)) SWIG_fail;
4728 622 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4729 622 : if (!SWIG_IsOK(res1)) {
4730 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4731 : }
4732 622 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4733 622 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4734 622 : if (!SWIG_IsOK(res2)) {
4735 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAttrValue" "', argument " "2"" of type '" "char const *""'");
4736 : }
4737 622 : arg2 = reinterpret_cast< char * >(buf2);
4738 622 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4739 622 : if (!SWIG_IsOK(res3)) {
4740 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAttrValue" "', argument " "3"" of type '" "char const *""'");
4741 : }
4742 622 : arg3 = reinterpret_cast< char * >(buf3);
4743 : {
4744 622 : if (!arg2) {
4745 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4746 : }
4747 : }
4748 : {
4749 622 : if ( bUseExceptions ) {
4750 0 : CPLErrorReset();
4751 : }
4752 622 : result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
4753 622 : if ( bUseExceptions ) {
4754 0 : CPLErr eclass = CPLGetLastErrorType();
4755 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4756 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4757 : }
4758 : }
4759 : }
4760 : {
4761 : /* %typemap(out) OGRErr */
4762 622 : if ( result != 0 && bUseExceptions) {
4763 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4764 0 : SWIG_fail;
4765 : }
4766 : }
4767 622 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4768 622 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4769 : {
4770 : /* %typemap(ret) OGRErr */
4771 622 : if (resultobj == Py_None ) {
4772 0 : Py_DECREF(resultobj);
4773 0 : resultobj = 0;
4774 : }
4775 622 : if (resultobj == 0) {
4776 622 : resultobj = PyInt_FromLong( result );
4777 : }
4778 : }
4779 622 : return resultobj;
4780 : fail:
4781 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4782 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4783 0 : return NULL;
4784 : }
4785 :
4786 :
4787 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4788 0 : PyObject *resultobj = 0;
4789 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4790 0 : char *arg2 = (char *) 0 ;
4791 : double arg3 ;
4792 0 : void *argp1 = 0 ;
4793 0 : int res1 = 0 ;
4794 : int res2 ;
4795 0 : char *buf2 = 0 ;
4796 0 : int alloc2 = 0 ;
4797 : double val3 ;
4798 0 : int ecode3 = 0 ;
4799 0 : PyObject * obj0 = 0 ;
4800 0 : PyObject * obj1 = 0 ;
4801 0 : PyObject * obj2 = 0 ;
4802 : OGRErr result;
4803 :
4804 0 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetAngularUnits",&obj0,&obj1,&obj2)) SWIG_fail;
4805 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4806 0 : if (!SWIG_IsOK(res1)) {
4807 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4808 : }
4809 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4810 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4811 0 : if (!SWIG_IsOK(res2)) {
4812 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAngularUnits" "', argument " "2"" of type '" "char const *""'");
4813 : }
4814 0 : arg2 = reinterpret_cast< char * >(buf2);
4815 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
4816 0 : if (!SWIG_IsOK(ecode3)) {
4817 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAngularUnits" "', argument " "3"" of type '" "double""'");
4818 : }
4819 0 : arg3 = static_cast< double >(val3);
4820 : {
4821 0 : if (!arg2) {
4822 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4823 : }
4824 : }
4825 : {
4826 0 : if ( bUseExceptions ) {
4827 0 : CPLErrorReset();
4828 : }
4829 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
4830 0 : if ( bUseExceptions ) {
4831 0 : CPLErr eclass = CPLGetLastErrorType();
4832 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4833 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4834 : }
4835 : }
4836 : }
4837 : {
4838 : /* %typemap(out) OGRErr */
4839 0 : if ( result != 0 && bUseExceptions) {
4840 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4841 0 : SWIG_fail;
4842 : }
4843 : }
4844 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4845 : {
4846 : /* %typemap(ret) OGRErr */
4847 0 : if (resultobj == Py_None ) {
4848 0 : Py_DECREF(resultobj);
4849 0 : resultobj = 0;
4850 : }
4851 0 : if (resultobj == 0) {
4852 0 : resultobj = PyInt_FromLong( result );
4853 : }
4854 : }
4855 0 : return resultobj;
4856 : fail:
4857 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4858 0 : return NULL;
4859 : }
4860 :
4861 :
4862 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4863 0 : PyObject *resultobj = 0;
4864 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4865 0 : void *argp1 = 0 ;
4866 0 : int res1 = 0 ;
4867 0 : PyObject * obj0 = 0 ;
4868 : double result;
4869 :
4870 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetAngularUnits",&obj0)) SWIG_fail;
4871 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4872 0 : if (!SWIG_IsOK(res1)) {
4873 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4874 : }
4875 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4876 : {
4877 0 : if ( bUseExceptions ) {
4878 0 : CPLErrorReset();
4879 : }
4880 0 : result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
4881 0 : if ( bUseExceptions ) {
4882 0 : CPLErr eclass = CPLGetLastErrorType();
4883 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4884 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4885 : }
4886 : }
4887 : }
4888 0 : resultobj = SWIG_From_double(static_cast< double >(result));
4889 0 : return resultobj;
4890 : fail:
4891 0 : return NULL;
4892 : }
4893 :
4894 :
4895 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4896 1 : PyObject *resultobj = 0;
4897 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4898 1 : char *arg2 = (char *) 0 ;
4899 1 : char *arg3 = (char *) 0 ;
4900 : double arg4 ;
4901 1 : void *argp1 = 0 ;
4902 1 : int res1 = 0 ;
4903 : int res2 ;
4904 1 : char *buf2 = 0 ;
4905 1 : int alloc2 = 0 ;
4906 : int res3 ;
4907 1 : char *buf3 = 0 ;
4908 1 : int alloc3 = 0 ;
4909 : double val4 ;
4910 1 : int ecode4 = 0 ;
4911 1 : PyObject * obj0 = 0 ;
4912 1 : PyObject * obj1 = 0 ;
4913 1 : PyObject * obj2 = 0 ;
4914 1 : PyObject * obj3 = 0 ;
4915 : OGRErr result;
4916 :
4917 1 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_SetTargetLinearUnits",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4918 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4919 1 : if (!SWIG_IsOK(res1)) {
4920 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4921 : }
4922 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4923 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4924 1 : if (!SWIG_IsOK(res2)) {
4925 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
4926 : }
4927 1 : arg2 = reinterpret_cast< char * >(buf2);
4928 1 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4929 1 : if (!SWIG_IsOK(res3)) {
4930 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "3"" of type '" "char const *""'");
4931 : }
4932 1 : arg3 = reinterpret_cast< char * >(buf3);
4933 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
4934 1 : if (!SWIG_IsOK(ecode4)) {
4935 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
4936 : }
4937 1 : arg4 = static_cast< double >(val4);
4938 : {
4939 1 : if (!arg3) {
4940 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4941 : }
4942 : }
4943 : {
4944 1 : if ( bUseExceptions ) {
4945 0 : CPLErrorReset();
4946 : }
4947 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
4948 1 : if ( bUseExceptions ) {
4949 0 : CPLErr eclass = CPLGetLastErrorType();
4950 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4951 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4952 : }
4953 : }
4954 : }
4955 : {
4956 : /* %typemap(out) OGRErr */
4957 1 : if ( result != 0 && bUseExceptions) {
4958 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4959 0 : SWIG_fail;
4960 : }
4961 : }
4962 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4963 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4964 : {
4965 : /* %typemap(ret) OGRErr */
4966 1 : if (resultobj == Py_None ) {
4967 0 : Py_DECREF(resultobj);
4968 0 : resultobj = 0;
4969 : }
4970 1 : if (resultobj == 0) {
4971 1 : resultobj = PyInt_FromLong( result );
4972 : }
4973 : }
4974 1 : return resultobj;
4975 : fail:
4976 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4977 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4978 0 : return NULL;
4979 : }
4980 :
4981 :
4982 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4983 2 : PyObject *resultobj = 0;
4984 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4985 2 : char *arg2 = (char *) 0 ;
4986 : double arg3 ;
4987 2 : void *argp1 = 0 ;
4988 2 : int res1 = 0 ;
4989 : int res2 ;
4990 2 : char *buf2 = 0 ;
4991 2 : int alloc2 = 0 ;
4992 : double val3 ;
4993 2 : int ecode3 = 0 ;
4994 2 : PyObject * obj0 = 0 ;
4995 2 : PyObject * obj1 = 0 ;
4996 2 : PyObject * obj2 = 0 ;
4997 : OGRErr result;
4998 :
4999 2 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetLinearUnits",&obj0,&obj1,&obj2)) SWIG_fail;
5000 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5001 2 : if (!SWIG_IsOK(res1)) {
5002 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5003 : }
5004 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5005 2 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5006 2 : if (!SWIG_IsOK(res2)) {
5007 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnits" "', argument " "2"" of type '" "char const *""'");
5008 : }
5009 2 : arg2 = reinterpret_cast< char * >(buf2);
5010 2 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5011 2 : if (!SWIG_IsOK(ecode3)) {
5012 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnits" "', argument " "3"" of type '" "double""'");
5013 : }
5014 2 : arg3 = static_cast< double >(val3);
5015 : {
5016 2 : if (!arg2) {
5017 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5018 : }
5019 : }
5020 : {
5021 2 : if ( bUseExceptions ) {
5022 0 : CPLErrorReset();
5023 : }
5024 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
5025 2 : if ( bUseExceptions ) {
5026 0 : CPLErr eclass = CPLGetLastErrorType();
5027 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5028 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5029 : }
5030 : }
5031 : }
5032 : {
5033 : /* %typemap(out) OGRErr */
5034 2 : if ( result != 0 && bUseExceptions) {
5035 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5036 0 : SWIG_fail;
5037 : }
5038 : }
5039 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5040 : {
5041 : /* %typemap(ret) OGRErr */
5042 2 : if (resultobj == Py_None ) {
5043 0 : Py_DECREF(resultobj);
5044 0 : resultobj = 0;
5045 : }
5046 2 : if (resultobj == 0) {
5047 2 : resultobj = PyInt_FromLong( result );
5048 : }
5049 : }
5050 2 : return resultobj;
5051 : fail:
5052 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5053 0 : return NULL;
5054 : }
5055 :
5056 :
5057 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5058 1 : PyObject *resultobj = 0;
5059 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5060 1 : char *arg2 = (char *) 0 ;
5061 : double arg3 ;
5062 1 : void *argp1 = 0 ;
5063 1 : int res1 = 0 ;
5064 : int res2 ;
5065 1 : char *buf2 = 0 ;
5066 1 : int alloc2 = 0 ;
5067 : double val3 ;
5068 1 : int ecode3 = 0 ;
5069 1 : PyObject * obj0 = 0 ;
5070 1 : PyObject * obj1 = 0 ;
5071 1 : PyObject * obj2 = 0 ;
5072 : OGRErr result;
5073 :
5074 1 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetLinearUnitsAndUpdateParameters",&obj0,&obj1,&obj2)) SWIG_fail;
5075 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5076 1 : if (!SWIG_IsOK(res1)) {
5077 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5078 : }
5079 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5080 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5081 1 : if (!SWIG_IsOK(res2)) {
5082 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "2"" of type '" "char const *""'");
5083 : }
5084 1 : arg2 = reinterpret_cast< char * >(buf2);
5085 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5086 1 : if (!SWIG_IsOK(ecode3)) {
5087 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "3"" of type '" "double""'");
5088 : }
5089 1 : arg3 = static_cast< double >(val3);
5090 : {
5091 1 : if (!arg2) {
5092 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5093 : }
5094 : }
5095 : {
5096 1 : if ( bUseExceptions ) {
5097 0 : CPLErrorReset();
5098 : }
5099 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
5100 1 : if ( bUseExceptions ) {
5101 0 : CPLErr eclass = CPLGetLastErrorType();
5102 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5103 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5104 : }
5105 : }
5106 : }
5107 : {
5108 : /* %typemap(out) OGRErr */
5109 1 : if ( result != 0 && bUseExceptions) {
5110 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5111 0 : SWIG_fail;
5112 : }
5113 : }
5114 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5115 : {
5116 : /* %typemap(ret) OGRErr */
5117 1 : if (resultobj == Py_None ) {
5118 0 : Py_DECREF(resultobj);
5119 0 : resultobj = 0;
5120 : }
5121 1 : if (resultobj == 0) {
5122 1 : resultobj = PyInt_FromLong( result );
5123 : }
5124 : }
5125 1 : return resultobj;
5126 : fail:
5127 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5128 0 : return NULL;
5129 : }
5130 :
5131 :
5132 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5133 0 : PyObject *resultobj = 0;
5134 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5135 0 : void *argp1 = 0 ;
5136 0 : int res1 = 0 ;
5137 0 : PyObject * obj0 = 0 ;
5138 : double result;
5139 :
5140 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetLinearUnits",&obj0)) SWIG_fail;
5141 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5142 0 : if (!SWIG_IsOK(res1)) {
5143 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5144 : }
5145 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5146 : {
5147 0 : if ( bUseExceptions ) {
5148 0 : CPLErrorReset();
5149 : }
5150 0 : result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
5151 0 : if ( bUseExceptions ) {
5152 0 : CPLErr eclass = CPLGetLastErrorType();
5153 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5154 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5155 : }
5156 : }
5157 : }
5158 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5159 0 : return resultobj;
5160 : fail:
5161 0 : return NULL;
5162 : }
5163 :
5164 :
5165 2 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5166 2 : PyObject *resultobj = 0;
5167 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5168 2 : void *argp1 = 0 ;
5169 2 : int res1 = 0 ;
5170 2 : PyObject * obj0 = 0 ;
5171 2 : char *result = 0 ;
5172 :
5173 2 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetLinearUnitsName",&obj0)) SWIG_fail;
5174 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5175 2 : if (!SWIG_IsOK(res1)) {
5176 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5177 : }
5178 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5179 : {
5180 2 : if ( bUseExceptions ) {
5181 0 : CPLErrorReset();
5182 : }
5183 2 : result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
5184 2 : if ( bUseExceptions ) {
5185 0 : CPLErr eclass = CPLGetLastErrorType();
5186 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5187 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5188 : }
5189 : }
5190 : }
5191 2 : resultobj = SWIG_FromCharPtr((const char *)result);
5192 2 : return resultobj;
5193 : fail:
5194 0 : return NULL;
5195 : }
5196 :
5197 :
5198 1256 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5199 1256 : PyObject *resultobj = 0;
5200 1256 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5201 1256 : char *arg2 = (char *) 0 ;
5202 1256 : void *argp1 = 0 ;
5203 1256 : int res1 = 0 ;
5204 : int res2 ;
5205 1256 : char *buf2 = 0 ;
5206 1256 : int alloc2 = 0 ;
5207 1256 : PyObject * obj0 = 0 ;
5208 1256 : PyObject * obj1 = 0 ;
5209 1256 : char *result = 0 ;
5210 :
5211 1256 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_GetAuthorityCode",&obj0,&obj1)) SWIG_fail;
5212 1256 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5213 1256 : if (!SWIG_IsOK(res1)) {
5214 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5215 : }
5216 1256 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5217 1256 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5218 1256 : if (!SWIG_IsOK(res2)) {
5219 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "2"" of type '" "char const *""'");
5220 : }
5221 1256 : arg2 = reinterpret_cast< char * >(buf2);
5222 : {
5223 1256 : if ( bUseExceptions ) {
5224 0 : CPLErrorReset();
5225 : }
5226 1256 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
5227 1256 : if ( bUseExceptions ) {
5228 0 : CPLErr eclass = CPLGetLastErrorType();
5229 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5230 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5231 : }
5232 : }
5233 : }
5234 1256 : resultobj = SWIG_FromCharPtr((const char *)result);
5235 1256 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5236 1256 : return resultobj;
5237 : fail:
5238 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5239 0 : return NULL;
5240 : }
5241 :
5242 :
5243 9 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5244 9 : PyObject *resultobj = 0;
5245 9 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5246 9 : char *arg2 = (char *) 0 ;
5247 9 : void *argp1 = 0 ;
5248 9 : int res1 = 0 ;
5249 : int res2 ;
5250 9 : char *buf2 = 0 ;
5251 9 : int alloc2 = 0 ;
5252 9 : PyObject * obj0 = 0 ;
5253 9 : PyObject * obj1 = 0 ;
5254 9 : char *result = 0 ;
5255 :
5256 9 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_GetAuthorityName",&obj0,&obj1)) SWIG_fail;
5257 9 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5258 9 : if (!SWIG_IsOK(res1)) {
5259 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5260 : }
5261 9 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5262 9 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5263 9 : if (!SWIG_IsOK(res2)) {
5264 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityName" "', argument " "2"" of type '" "char const *""'");
5265 : }
5266 9 : arg2 = reinterpret_cast< char * >(buf2);
5267 : {
5268 9 : if ( bUseExceptions ) {
5269 0 : CPLErrorReset();
5270 : }
5271 9 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
5272 9 : if ( bUseExceptions ) {
5273 0 : CPLErr eclass = CPLGetLastErrorType();
5274 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5275 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5276 : }
5277 : }
5278 : }
5279 9 : resultobj = SWIG_FromCharPtr((const char *)result);
5280 9 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5281 9 : return resultobj;
5282 : fail:
5283 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5284 0 : return NULL;
5285 : }
5286 :
5287 :
5288 10 : SWIGINTERN PyObject *_wrap_SpatialReference_SetUTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5289 10 : PyObject *resultobj = 0;
5290 10 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5291 : int arg2 ;
5292 10 : int arg3 = (int) 1 ;
5293 10 : void *argp1 = 0 ;
5294 10 : int res1 = 0 ;
5295 : int val2 ;
5296 10 : int ecode2 = 0 ;
5297 : int val3 ;
5298 10 : int ecode3 = 0 ;
5299 10 : PyObject * obj0 = 0 ;
5300 10 : PyObject * obj1 = 0 ;
5301 10 : PyObject * obj2 = 0 ;
5302 : OGRErr result;
5303 :
5304 10 : if (!PyArg_ParseTuple(args,(char *)"OO|O:SpatialReference_SetUTM",&obj0,&obj1,&obj2)) SWIG_fail;
5305 10 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5306 10 : if (!SWIG_IsOK(res1)) {
5307 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetUTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5308 : }
5309 10 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5310 10 : ecode2 = SWIG_AsVal_int(obj1, &val2);
5311 10 : if (!SWIG_IsOK(ecode2)) {
5312 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetUTM" "', argument " "2"" of type '" "int""'");
5313 : }
5314 10 : arg2 = static_cast< int >(val2);
5315 10 : if (obj2) {
5316 1 : ecode3 = SWIG_AsVal_int(obj2, &val3);
5317 1 : if (!SWIG_IsOK(ecode3)) {
5318 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetUTM" "', argument " "3"" of type '" "int""'");
5319 : }
5320 1 : arg3 = static_cast< int >(val3);
5321 : }
5322 : {
5323 10 : if ( bUseExceptions ) {
5324 0 : CPLErrorReset();
5325 : }
5326 10 : result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
5327 10 : if ( bUseExceptions ) {
5328 0 : CPLErr eclass = CPLGetLastErrorType();
5329 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5330 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5331 : }
5332 : }
5333 : }
5334 : {
5335 : /* %typemap(out) OGRErr */
5336 10 : if ( result != 0 && bUseExceptions) {
5337 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5338 0 : SWIG_fail;
5339 : }
5340 : }
5341 : {
5342 : /* %typemap(ret) OGRErr */
5343 10 : if (resultobj == Py_None ) {
5344 0 : Py_DECREF(resultobj);
5345 0 : resultobj = 0;
5346 : }
5347 10 : if (resultobj == 0) {
5348 10 : resultobj = PyInt_FromLong( result );
5349 : }
5350 : }
5351 10 : return resultobj;
5352 : fail:
5353 0 : return NULL;
5354 : }
5355 :
5356 :
5357 2 : SWIGINTERN PyObject *_wrap_SpatialReference_GetUTMZone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5358 2 : PyObject *resultobj = 0;
5359 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5360 2 : void *argp1 = 0 ;
5361 2 : int res1 = 0 ;
5362 2 : PyObject * obj0 = 0 ;
5363 : int result;
5364 :
5365 2 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetUTMZone",&obj0)) SWIG_fail;
5366 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5367 2 : if (!SWIG_IsOK(res1)) {
5368 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5369 : }
5370 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5371 : {
5372 2 : if ( bUseExceptions ) {
5373 0 : CPLErrorReset();
5374 : }
5375 2 : result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
5376 2 : if ( bUseExceptions ) {
5377 0 : CPLErr eclass = CPLGetLastErrorType();
5378 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5379 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5380 : }
5381 : }
5382 : }
5383 2 : resultobj = SWIG_From_int(static_cast< int >(result));
5384 2 : return resultobj;
5385 : fail:
5386 0 : return NULL;
5387 : }
5388 :
5389 :
5390 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStatePlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5391 2 : PyObject *resultobj = 0;
5392 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5393 : int arg2 ;
5394 2 : int arg3 = (int) 1 ;
5395 2 : char *arg4 = (char *) "" ;
5396 2 : double arg5 = (double) 0.0 ;
5397 2 : void *argp1 = 0 ;
5398 2 : int res1 = 0 ;
5399 : int val2 ;
5400 2 : int ecode2 = 0 ;
5401 : int val3 ;
5402 2 : int ecode3 = 0 ;
5403 : int res4 ;
5404 2 : char *buf4 = 0 ;
5405 2 : int alloc4 = 0 ;
5406 : double val5 ;
5407 2 : int ecode5 = 0 ;
5408 2 : PyObject * obj0 = 0 ;
5409 2 : PyObject * obj1 = 0 ;
5410 2 : PyObject * obj2 = 0 ;
5411 2 : PyObject * obj3 = 0 ;
5412 2 : PyObject * obj4 = 0 ;
5413 : OGRErr result;
5414 :
5415 2 : if (!PyArg_ParseTuple(args,(char *)"OO|OOO:SpatialReference_SetStatePlane",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5416 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5417 2 : if (!SWIG_IsOK(res1)) {
5418 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStatePlane" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5419 : }
5420 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5421 2 : ecode2 = SWIG_AsVal_int(obj1, &val2);
5422 2 : if (!SWIG_IsOK(ecode2)) {
5423 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStatePlane" "', argument " "2"" of type '" "int""'");
5424 : }
5425 2 : arg2 = static_cast< int >(val2);
5426 2 : if (obj2) {
5427 2 : ecode3 = SWIG_AsVal_int(obj2, &val3);
5428 2 : if (!SWIG_IsOK(ecode3)) {
5429 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStatePlane" "', argument " "3"" of type '" "int""'");
5430 : }
5431 2 : arg3 = static_cast< int >(val3);
5432 : }
5433 2 : if (obj3) {
5434 1 : res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5435 1 : if (!SWIG_IsOK(res4)) {
5436 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetStatePlane" "', argument " "4"" of type '" "char const *""'");
5437 : }
5438 1 : arg4 = reinterpret_cast< char * >(buf4);
5439 : }
5440 2 : if (obj4) {
5441 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
5442 1 : if (!SWIG_IsOK(ecode5)) {
5443 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStatePlane" "', argument " "5"" of type '" "double""'");
5444 : }
5445 1 : arg5 = static_cast< double >(val5);
5446 : }
5447 : {
5448 2 : if ( bUseExceptions ) {
5449 0 : CPLErrorReset();
5450 : }
5451 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
5452 2 : if ( bUseExceptions ) {
5453 0 : CPLErr eclass = CPLGetLastErrorType();
5454 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5455 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5456 : }
5457 : }
5458 : }
5459 : {
5460 : /* %typemap(out) OGRErr */
5461 2 : if ( result != 0 && bUseExceptions) {
5462 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5463 0 : SWIG_fail;
5464 : }
5465 : }
5466 2 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
5467 : {
5468 : /* %typemap(ret) OGRErr */
5469 2 : if (resultobj == Py_None ) {
5470 0 : Py_DECREF(resultobj);
5471 0 : resultobj = 0;
5472 : }
5473 2 : if (resultobj == 0) {
5474 2 : resultobj = PyInt_FromLong( result );
5475 : }
5476 : }
5477 2 : return resultobj;
5478 : fail:
5479 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
5480 0 : return NULL;
5481 : }
5482 :
5483 :
5484 0 : SWIGINTERN PyObject *_wrap_SpatialReference_AutoIdentifyEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5485 0 : PyObject *resultobj = 0;
5486 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5487 0 : void *argp1 = 0 ;
5488 0 : int res1 = 0 ;
5489 0 : PyObject * obj0 = 0 ;
5490 : OGRErr result;
5491 :
5492 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_AutoIdentifyEPSG",&obj0)) SWIG_fail;
5493 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5494 0 : if (!SWIG_IsOK(res1)) {
5495 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AutoIdentifyEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5496 : }
5497 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5498 : {
5499 0 : if ( bUseExceptions ) {
5500 0 : CPLErrorReset();
5501 : }
5502 0 : result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
5503 0 : if ( bUseExceptions ) {
5504 0 : CPLErr eclass = CPLGetLastErrorType();
5505 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5506 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5507 : }
5508 : }
5509 : }
5510 : {
5511 : /* %typemap(out) OGRErr */
5512 0 : if ( result != 0 && bUseExceptions) {
5513 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5514 0 : SWIG_fail;
5515 : }
5516 : }
5517 : {
5518 : /* %typemap(ret) OGRErr */
5519 0 : if (resultobj == Py_None ) {
5520 0 : Py_DECREF(resultobj);
5521 0 : resultobj = 0;
5522 : }
5523 0 : if (resultobj == 0) {
5524 0 : resultobj = PyInt_FromLong( result );
5525 : }
5526 : }
5527 0 : return resultobj;
5528 : fail:
5529 0 : return NULL;
5530 : }
5531 :
5532 :
5533 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5534 0 : PyObject *resultobj = 0;
5535 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5536 0 : char *arg2 = (char *) 0 ;
5537 0 : void *argp1 = 0 ;
5538 0 : int res1 = 0 ;
5539 : int res2 ;
5540 0 : char *buf2 = 0 ;
5541 0 : int alloc2 = 0 ;
5542 0 : PyObject * obj0 = 0 ;
5543 0 : PyObject * obj1 = 0 ;
5544 : OGRErr result;
5545 :
5546 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_SetProjection",&obj0,&obj1)) SWIG_fail;
5547 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5548 0 : if (!SWIG_IsOK(res1)) {
5549 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5550 : }
5551 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5552 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5553 0 : if (!SWIG_IsOK(res2)) {
5554 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjection" "', argument " "2"" of type '" "char const *""'");
5555 : }
5556 0 : arg2 = reinterpret_cast< char * >(buf2);
5557 : {
5558 0 : if ( bUseExceptions ) {
5559 0 : CPLErrorReset();
5560 : }
5561 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
5562 0 : if ( bUseExceptions ) {
5563 0 : CPLErr eclass = CPLGetLastErrorType();
5564 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5565 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5566 : }
5567 : }
5568 : }
5569 : {
5570 : /* %typemap(out) OGRErr */
5571 0 : if ( result != 0 && bUseExceptions) {
5572 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5573 0 : SWIG_fail;
5574 : }
5575 : }
5576 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5577 : {
5578 : /* %typemap(ret) OGRErr */
5579 0 : if (resultobj == Py_None ) {
5580 0 : Py_DECREF(resultobj);
5581 0 : resultobj = 0;
5582 : }
5583 0 : if (resultobj == 0) {
5584 0 : resultobj = PyInt_FromLong( result );
5585 : }
5586 : }
5587 0 : return resultobj;
5588 : fail:
5589 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5590 0 : return NULL;
5591 : }
5592 :
5593 :
5594 142 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5595 142 : PyObject *resultobj = 0;
5596 142 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5597 142 : char *arg2 = (char *) 0 ;
5598 : double arg3 ;
5599 142 : void *argp1 = 0 ;
5600 142 : int res1 = 0 ;
5601 : int res2 ;
5602 142 : char *buf2 = 0 ;
5603 142 : int alloc2 = 0 ;
5604 : double val3 ;
5605 142 : int ecode3 = 0 ;
5606 142 : PyObject * obj0 = 0 ;
5607 142 : PyObject * obj1 = 0 ;
5608 142 : PyObject * obj2 = 0 ;
5609 : OGRErr result;
5610 :
5611 142 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetProjParm",&obj0,&obj1,&obj2)) SWIG_fail;
5612 142 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5613 142 : if (!SWIG_IsOK(res1)) {
5614 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5615 : }
5616 142 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5617 142 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5618 142 : if (!SWIG_IsOK(res2)) {
5619 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjParm" "', argument " "2"" of type '" "char const *""'");
5620 : }
5621 142 : arg2 = reinterpret_cast< char * >(buf2);
5622 142 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5623 142 : if (!SWIG_IsOK(ecode3)) {
5624 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetProjParm" "', argument " "3"" of type '" "double""'");
5625 : }
5626 142 : arg3 = static_cast< double >(val3);
5627 : {
5628 142 : if (!arg2) {
5629 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5630 : }
5631 : }
5632 : {
5633 142 : if ( bUseExceptions ) {
5634 0 : CPLErrorReset();
5635 : }
5636 142 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
5637 142 : if ( bUseExceptions ) {
5638 0 : CPLErr eclass = CPLGetLastErrorType();
5639 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5640 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5641 : }
5642 : }
5643 : }
5644 : {
5645 : /* %typemap(out) OGRErr */
5646 142 : if ( result != 0 && bUseExceptions) {
5647 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5648 0 : SWIG_fail;
5649 : }
5650 : }
5651 142 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5652 : {
5653 : /* %typemap(ret) OGRErr */
5654 142 : if (resultobj == Py_None ) {
5655 0 : Py_DECREF(resultobj);
5656 0 : resultobj = 0;
5657 : }
5658 142 : if (resultobj == 0) {
5659 142 : resultobj = PyInt_FromLong( result );
5660 : }
5661 : }
5662 142 : return resultobj;
5663 : fail:
5664 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5665 0 : return NULL;
5666 : }
5667 :
5668 :
5669 8637 : SWIGINTERN PyObject *_wrap_SpatialReference_GetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5670 8637 : PyObject *resultobj = 0;
5671 8637 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5672 8637 : char *arg2 = (char *) 0 ;
5673 8637 : double arg3 = (double) 0.0 ;
5674 8637 : void *argp1 = 0 ;
5675 8637 : int res1 = 0 ;
5676 : int res2 ;
5677 8637 : char *buf2 = 0 ;
5678 8637 : int alloc2 = 0 ;
5679 : double val3 ;
5680 8637 : int ecode3 = 0 ;
5681 8637 : PyObject * obj0 = 0 ;
5682 8637 : PyObject * obj1 = 0 ;
5683 8637 : PyObject * obj2 = 0 ;
5684 : double result;
5685 :
5686 8637 : if (!PyArg_ParseTuple(args,(char *)"OO|O:SpatialReference_GetProjParm",&obj0,&obj1,&obj2)) SWIG_fail;
5687 8637 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5688 8637 : if (!SWIG_IsOK(res1)) {
5689 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5690 : }
5691 8637 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5692 8637 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5693 8637 : if (!SWIG_IsOK(res2)) {
5694 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetProjParm" "', argument " "2"" of type '" "char const *""'");
5695 : }
5696 8637 : arg2 = reinterpret_cast< char * >(buf2);
5697 8637 : if (obj2) {
5698 17 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5699 17 : if (!SWIG_IsOK(ecode3)) {
5700 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetProjParm" "', argument " "3"" of type '" "double""'");
5701 : }
5702 17 : arg3 = static_cast< double >(val3);
5703 : }
5704 : {
5705 8637 : if (!arg2) {
5706 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5707 : }
5708 : }
5709 : {
5710 8637 : if ( bUseExceptions ) {
5711 0 : CPLErrorReset();
5712 : }
5713 8637 : result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
5714 8637 : if ( bUseExceptions ) {
5715 0 : CPLErr eclass = CPLGetLastErrorType();
5716 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5717 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5718 : }
5719 : }
5720 : }
5721 8637 : resultobj = SWIG_From_double(static_cast< double >(result));
5722 8637 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5723 8637 : return resultobj;
5724 : fail:
5725 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5726 0 : return NULL;
5727 : }
5728 :
5729 :
5730 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5731 0 : PyObject *resultobj = 0;
5732 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5733 0 : char *arg2 = (char *) 0 ;
5734 : double arg3 ;
5735 0 : void *argp1 = 0 ;
5736 0 : int res1 = 0 ;
5737 : int res2 ;
5738 0 : char *buf2 = 0 ;
5739 0 : int alloc2 = 0 ;
5740 : double val3 ;
5741 0 : int ecode3 = 0 ;
5742 0 : PyObject * obj0 = 0 ;
5743 0 : PyObject * obj1 = 0 ;
5744 0 : PyObject * obj2 = 0 ;
5745 : OGRErr result;
5746 :
5747 0 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetNormProjParm",&obj0,&obj1,&obj2)) SWIG_fail;
5748 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5749 0 : if (!SWIG_IsOK(res1)) {
5750 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5751 : }
5752 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5753 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5754 0 : if (!SWIG_IsOK(res2)) {
5755 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetNormProjParm" "', argument " "2"" of type '" "char const *""'");
5756 : }
5757 0 : arg2 = reinterpret_cast< char * >(buf2);
5758 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5759 0 : if (!SWIG_IsOK(ecode3)) {
5760 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNormProjParm" "', argument " "3"" of type '" "double""'");
5761 : }
5762 0 : arg3 = static_cast< double >(val3);
5763 : {
5764 0 : if (!arg2) {
5765 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5766 : }
5767 : }
5768 : {
5769 0 : if ( bUseExceptions ) {
5770 0 : CPLErrorReset();
5771 : }
5772 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
5773 0 : if ( bUseExceptions ) {
5774 0 : CPLErr eclass = CPLGetLastErrorType();
5775 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5776 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5777 : }
5778 : }
5779 : }
5780 : {
5781 : /* %typemap(out) OGRErr */
5782 0 : if ( result != 0 && bUseExceptions) {
5783 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5784 0 : SWIG_fail;
5785 : }
5786 : }
5787 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5788 : {
5789 : /* %typemap(ret) OGRErr */
5790 0 : if (resultobj == Py_None ) {
5791 0 : Py_DECREF(resultobj);
5792 0 : resultobj = 0;
5793 : }
5794 0 : if (resultobj == 0) {
5795 0 : resultobj = PyInt_FromLong( result );
5796 : }
5797 : }
5798 0 : return resultobj;
5799 : fail:
5800 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5801 0 : return NULL;
5802 : }
5803 :
5804 :
5805 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5806 0 : PyObject *resultobj = 0;
5807 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5808 0 : char *arg2 = (char *) 0 ;
5809 0 : double arg3 = (double) 0.0 ;
5810 0 : void *argp1 = 0 ;
5811 0 : int res1 = 0 ;
5812 : int res2 ;
5813 0 : char *buf2 = 0 ;
5814 0 : int alloc2 = 0 ;
5815 : double val3 ;
5816 0 : int ecode3 = 0 ;
5817 0 : PyObject * obj0 = 0 ;
5818 0 : PyObject * obj1 = 0 ;
5819 0 : PyObject * obj2 = 0 ;
5820 : double result;
5821 :
5822 0 : if (!PyArg_ParseTuple(args,(char *)"OO|O:SpatialReference_GetNormProjParm",&obj0,&obj1,&obj2)) SWIG_fail;
5823 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5824 0 : if (!SWIG_IsOK(res1)) {
5825 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5826 : }
5827 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5828 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5829 0 : if (!SWIG_IsOK(res2)) {
5830 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetNormProjParm" "', argument " "2"" of type '" "char const *""'");
5831 : }
5832 0 : arg2 = reinterpret_cast< char * >(buf2);
5833 0 : if (obj2) {
5834 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5835 0 : if (!SWIG_IsOK(ecode3)) {
5836 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetNormProjParm" "', argument " "3"" of type '" "double""'");
5837 : }
5838 0 : arg3 = static_cast< double >(val3);
5839 : }
5840 : {
5841 0 : if (!arg2) {
5842 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5843 : }
5844 : }
5845 : {
5846 0 : if ( bUseExceptions ) {
5847 0 : CPLErrorReset();
5848 : }
5849 0 : result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
5850 0 : if ( bUseExceptions ) {
5851 0 : CPLErr eclass = CPLGetLastErrorType();
5852 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5853 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5854 : }
5855 : }
5856 : }
5857 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5858 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5859 0 : return resultobj;
5860 : fail:
5861 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5862 0 : return NULL;
5863 : }
5864 :
5865 :
5866 3 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5867 3 : PyObject *resultobj = 0;
5868 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5869 3 : void *argp1 = 0 ;
5870 3 : int res1 = 0 ;
5871 3 : PyObject * obj0 = 0 ;
5872 : double result;
5873 :
5874 3 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetSemiMajor",&obj0)) SWIG_fail;
5875 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5876 3 : if (!SWIG_IsOK(res1)) {
5877 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5878 : }
5879 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5880 : {
5881 3 : if ( bUseExceptions ) {
5882 0 : CPLErrorReset();
5883 : }
5884 3 : result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
5885 3 : if ( bUseExceptions ) {
5886 0 : CPLErr eclass = CPLGetLastErrorType();
5887 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5888 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5889 : }
5890 : }
5891 : }
5892 3 : resultobj = SWIG_From_double(static_cast< double >(result));
5893 3 : return resultobj;
5894 : fail:
5895 0 : return NULL;
5896 : }
5897 :
5898 :
5899 3 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5900 3 : PyObject *resultobj = 0;
5901 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5902 3 : void *argp1 = 0 ;
5903 3 : int res1 = 0 ;
5904 3 : PyObject * obj0 = 0 ;
5905 : double result;
5906 :
5907 3 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetSemiMinor",&obj0)) SWIG_fail;
5908 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5909 3 : if (!SWIG_IsOK(res1)) {
5910 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5911 : }
5912 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5913 : {
5914 3 : if ( bUseExceptions ) {
5915 0 : CPLErrorReset();
5916 : }
5917 3 : result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
5918 3 : if ( bUseExceptions ) {
5919 0 : CPLErr eclass = CPLGetLastErrorType();
5920 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5921 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5922 : }
5923 : }
5924 : }
5925 3 : resultobj = SWIG_From_double(static_cast< double >(result));
5926 3 : return resultobj;
5927 : fail:
5928 0 : return NULL;
5929 : }
5930 :
5931 :
5932 3 : SWIGINTERN PyObject *_wrap_SpatialReference_GetInvFlattening(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5933 3 : PyObject *resultobj = 0;
5934 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5935 3 : void *argp1 = 0 ;
5936 3 : int res1 = 0 ;
5937 3 : PyObject * obj0 = 0 ;
5938 : double result;
5939 :
5940 3 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetInvFlattening",&obj0)) SWIG_fail;
5941 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5942 3 : if (!SWIG_IsOK(res1)) {
5943 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5944 : }
5945 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5946 : {
5947 3 : if ( bUseExceptions ) {
5948 0 : CPLErrorReset();
5949 : }
5950 3 : result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
5951 3 : if ( bUseExceptions ) {
5952 0 : CPLErr eclass = CPLGetLastErrorType();
5953 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5954 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5955 : }
5956 : }
5957 : }
5958 3 : resultobj = SWIG_From_double(static_cast< double >(result));
5959 3 : return resultobj;
5960 : fail:
5961 0 : return NULL;
5962 : }
5963 :
5964 :
5965 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetACEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5966 0 : PyObject *resultobj = 0;
5967 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5968 : double arg2 ;
5969 : double arg3 ;
5970 : double arg4 ;
5971 : double arg5 ;
5972 : double arg6 ;
5973 : double arg7 ;
5974 0 : void *argp1 = 0 ;
5975 0 : int res1 = 0 ;
5976 : double val2 ;
5977 0 : int ecode2 = 0 ;
5978 : double val3 ;
5979 0 : int ecode3 = 0 ;
5980 : double val4 ;
5981 0 : int ecode4 = 0 ;
5982 : double val5 ;
5983 0 : int ecode5 = 0 ;
5984 : double val6 ;
5985 0 : int ecode6 = 0 ;
5986 : double val7 ;
5987 0 : int ecode7 = 0 ;
5988 0 : PyObject * obj0 = 0 ;
5989 0 : PyObject * obj1 = 0 ;
5990 0 : PyObject * obj2 = 0 ;
5991 0 : PyObject * obj3 = 0 ;
5992 0 : PyObject * obj4 = 0 ;
5993 0 : PyObject * obj5 = 0 ;
5994 0 : PyObject * obj6 = 0 ;
5995 : char * kwnames[] = {
5996 : (char *) "self",(char *) "stdp1",(char *) "stdp2",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
5997 0 : };
5998 : OGRErr result;
5999 :
6000 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetACEA",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
6001 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6002 0 : if (!SWIG_IsOK(res1)) {
6003 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetACEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6004 : }
6005 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6006 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6007 0 : if (!SWIG_IsOK(ecode2)) {
6008 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetACEA" "', argument " "2"" of type '" "double""'");
6009 : }
6010 0 : arg2 = static_cast< double >(val2);
6011 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6012 0 : if (!SWIG_IsOK(ecode3)) {
6013 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetACEA" "', argument " "3"" of type '" "double""'");
6014 : }
6015 0 : arg3 = static_cast< double >(val3);
6016 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6017 0 : if (!SWIG_IsOK(ecode4)) {
6018 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetACEA" "', argument " "4"" of type '" "double""'");
6019 : }
6020 0 : arg4 = static_cast< double >(val4);
6021 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6022 0 : if (!SWIG_IsOK(ecode5)) {
6023 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetACEA" "', argument " "5"" of type '" "double""'");
6024 : }
6025 0 : arg5 = static_cast< double >(val5);
6026 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
6027 0 : if (!SWIG_IsOK(ecode6)) {
6028 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetACEA" "', argument " "6"" of type '" "double""'");
6029 : }
6030 0 : arg6 = static_cast< double >(val6);
6031 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
6032 0 : if (!SWIG_IsOK(ecode7)) {
6033 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetACEA" "', argument " "7"" of type '" "double""'");
6034 : }
6035 0 : arg7 = static_cast< double >(val7);
6036 : {
6037 0 : if ( bUseExceptions ) {
6038 0 : CPLErrorReset();
6039 : }
6040 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
6041 0 : if ( bUseExceptions ) {
6042 0 : CPLErr eclass = CPLGetLastErrorType();
6043 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6044 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6045 : }
6046 : }
6047 : }
6048 : {
6049 : /* %typemap(out) OGRErr */
6050 0 : if ( result != 0 && bUseExceptions) {
6051 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6052 0 : SWIG_fail;
6053 : }
6054 : }
6055 : {
6056 : /* %typemap(ret) OGRErr */
6057 0 : if (resultobj == Py_None ) {
6058 0 : Py_DECREF(resultobj);
6059 0 : resultobj = 0;
6060 : }
6061 0 : if (resultobj == 0) {
6062 0 : resultobj = PyInt_FromLong( result );
6063 : }
6064 : }
6065 0 : return resultobj;
6066 : fail:
6067 0 : return NULL;
6068 : }
6069 :
6070 :
6071 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAE(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6072 0 : PyObject *resultobj = 0;
6073 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6074 : double arg2 ;
6075 : double arg3 ;
6076 : double arg4 ;
6077 : double arg5 ;
6078 0 : void *argp1 = 0 ;
6079 0 : int res1 = 0 ;
6080 : double val2 ;
6081 0 : int ecode2 = 0 ;
6082 : double val3 ;
6083 0 : int ecode3 = 0 ;
6084 : double val4 ;
6085 0 : int ecode4 = 0 ;
6086 : double val5 ;
6087 0 : int ecode5 = 0 ;
6088 0 : PyObject * obj0 = 0 ;
6089 0 : PyObject * obj1 = 0 ;
6090 0 : PyObject * obj2 = 0 ;
6091 0 : PyObject * obj3 = 0 ;
6092 0 : PyObject * obj4 = 0 ;
6093 : char * kwnames[] = {
6094 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6095 0 : };
6096 : OGRErr result;
6097 :
6098 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetAE",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6099 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6100 0 : if (!SWIG_IsOK(res1)) {
6101 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAE" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6102 : }
6103 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6104 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6105 0 : if (!SWIG_IsOK(ecode2)) {
6106 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAE" "', argument " "2"" of type '" "double""'");
6107 : }
6108 0 : arg2 = static_cast< double >(val2);
6109 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6110 0 : if (!SWIG_IsOK(ecode3)) {
6111 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAE" "', argument " "3"" of type '" "double""'");
6112 : }
6113 0 : arg3 = static_cast< double >(val3);
6114 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6115 0 : if (!SWIG_IsOK(ecode4)) {
6116 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAE" "', argument " "4"" of type '" "double""'");
6117 : }
6118 0 : arg4 = static_cast< double >(val4);
6119 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6120 0 : if (!SWIG_IsOK(ecode5)) {
6121 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetAE" "', argument " "5"" of type '" "double""'");
6122 : }
6123 0 : arg5 = static_cast< double >(val5);
6124 : {
6125 0 : if ( bUseExceptions ) {
6126 0 : CPLErrorReset();
6127 : }
6128 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
6129 0 : if ( bUseExceptions ) {
6130 0 : CPLErr eclass = CPLGetLastErrorType();
6131 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6132 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6133 : }
6134 : }
6135 : }
6136 : {
6137 : /* %typemap(out) OGRErr */
6138 0 : if ( result != 0 && bUseExceptions) {
6139 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6140 0 : SWIG_fail;
6141 : }
6142 : }
6143 : {
6144 : /* %typemap(ret) OGRErr */
6145 0 : if (resultobj == Py_None ) {
6146 0 : Py_DECREF(resultobj);
6147 0 : resultobj = 0;
6148 : }
6149 0 : if (resultobj == 0) {
6150 0 : resultobj = PyInt_FromLong( result );
6151 : }
6152 : }
6153 0 : return resultobj;
6154 : fail:
6155 0 : return NULL;
6156 : }
6157 :
6158 :
6159 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetBonne(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6160 0 : PyObject *resultobj = 0;
6161 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6162 : double arg2 ;
6163 : double arg3 ;
6164 : double arg4 ;
6165 : double arg5 ;
6166 0 : void *argp1 = 0 ;
6167 0 : int res1 = 0 ;
6168 : double val2 ;
6169 0 : int ecode2 = 0 ;
6170 : double val3 ;
6171 0 : int ecode3 = 0 ;
6172 : double val4 ;
6173 0 : int ecode4 = 0 ;
6174 : double val5 ;
6175 0 : int ecode5 = 0 ;
6176 0 : PyObject * obj0 = 0 ;
6177 0 : PyObject * obj1 = 0 ;
6178 0 : PyObject * obj2 = 0 ;
6179 0 : PyObject * obj3 = 0 ;
6180 0 : PyObject * obj4 = 0 ;
6181 : char * kwnames[] = {
6182 : (char *) "self",(char *) "stdp",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6183 0 : };
6184 : OGRErr result;
6185 :
6186 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetBonne",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6187 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6188 0 : if (!SWIG_IsOK(res1)) {
6189 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetBonne" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6190 : }
6191 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6192 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6193 0 : if (!SWIG_IsOK(ecode2)) {
6194 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetBonne" "', argument " "2"" of type '" "double""'");
6195 : }
6196 0 : arg2 = static_cast< double >(val2);
6197 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6198 0 : if (!SWIG_IsOK(ecode3)) {
6199 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetBonne" "', argument " "3"" of type '" "double""'");
6200 : }
6201 0 : arg3 = static_cast< double >(val3);
6202 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6203 0 : if (!SWIG_IsOK(ecode4)) {
6204 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetBonne" "', argument " "4"" of type '" "double""'");
6205 : }
6206 0 : arg4 = static_cast< double >(val4);
6207 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6208 0 : if (!SWIG_IsOK(ecode5)) {
6209 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetBonne" "', argument " "5"" of type '" "double""'");
6210 : }
6211 0 : arg5 = static_cast< double >(val5);
6212 : {
6213 0 : if ( bUseExceptions ) {
6214 0 : CPLErrorReset();
6215 : }
6216 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
6217 0 : if ( bUseExceptions ) {
6218 0 : CPLErr eclass = CPLGetLastErrorType();
6219 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6220 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6221 : }
6222 : }
6223 : }
6224 : {
6225 : /* %typemap(out) OGRErr */
6226 0 : if ( result != 0 && bUseExceptions) {
6227 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6228 0 : SWIG_fail;
6229 : }
6230 : }
6231 : {
6232 : /* %typemap(ret) OGRErr */
6233 0 : if (resultobj == Py_None ) {
6234 0 : Py_DECREF(resultobj);
6235 0 : resultobj = 0;
6236 : }
6237 0 : if (resultobj == 0) {
6238 0 : resultobj = PyInt_FromLong( result );
6239 : }
6240 : }
6241 0 : return resultobj;
6242 : fail:
6243 0 : return NULL;
6244 : }
6245 :
6246 :
6247 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6248 0 : PyObject *resultobj = 0;
6249 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6250 : double arg2 ;
6251 : double arg3 ;
6252 : double arg4 ;
6253 : double arg5 ;
6254 0 : void *argp1 = 0 ;
6255 0 : int res1 = 0 ;
6256 : double val2 ;
6257 0 : int ecode2 = 0 ;
6258 : double val3 ;
6259 0 : int ecode3 = 0 ;
6260 : double val4 ;
6261 0 : int ecode4 = 0 ;
6262 : double val5 ;
6263 0 : int ecode5 = 0 ;
6264 0 : PyObject * obj0 = 0 ;
6265 0 : PyObject * obj1 = 0 ;
6266 0 : PyObject * obj2 = 0 ;
6267 0 : PyObject * obj3 = 0 ;
6268 0 : PyObject * obj4 = 0 ;
6269 : char * kwnames[] = {
6270 : (char *) "self",(char *) "stdp1",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6271 0 : };
6272 : OGRErr result;
6273 :
6274 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetCEA",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6275 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6276 0 : if (!SWIG_IsOK(res1)) {
6277 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6278 : }
6279 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6280 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6281 0 : if (!SWIG_IsOK(ecode2)) {
6282 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCEA" "', argument " "2"" of type '" "double""'");
6283 : }
6284 0 : arg2 = static_cast< double >(val2);
6285 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6286 0 : if (!SWIG_IsOK(ecode3)) {
6287 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCEA" "', argument " "3"" of type '" "double""'");
6288 : }
6289 0 : arg3 = static_cast< double >(val3);
6290 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6291 0 : if (!SWIG_IsOK(ecode4)) {
6292 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCEA" "', argument " "4"" of type '" "double""'");
6293 : }
6294 0 : arg4 = static_cast< double >(val4);
6295 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6296 0 : if (!SWIG_IsOK(ecode5)) {
6297 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCEA" "', argument " "5"" of type '" "double""'");
6298 : }
6299 0 : arg5 = static_cast< double >(val5);
6300 : {
6301 0 : if ( bUseExceptions ) {
6302 0 : CPLErrorReset();
6303 : }
6304 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
6305 0 : if ( bUseExceptions ) {
6306 0 : CPLErr eclass = CPLGetLastErrorType();
6307 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6308 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6309 : }
6310 : }
6311 : }
6312 : {
6313 : /* %typemap(out) OGRErr */
6314 0 : if ( result != 0 && bUseExceptions) {
6315 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6316 0 : SWIG_fail;
6317 : }
6318 : }
6319 : {
6320 : /* %typemap(ret) OGRErr */
6321 0 : if (resultobj == Py_None ) {
6322 0 : Py_DECREF(resultobj);
6323 0 : resultobj = 0;
6324 : }
6325 0 : if (resultobj == 0) {
6326 0 : resultobj = PyInt_FromLong( result );
6327 : }
6328 : }
6329 0 : return resultobj;
6330 : fail:
6331 0 : return NULL;
6332 : }
6333 :
6334 :
6335 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6336 0 : PyObject *resultobj = 0;
6337 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6338 : double arg2 ;
6339 : double arg3 ;
6340 : double arg4 ;
6341 : double arg5 ;
6342 0 : void *argp1 = 0 ;
6343 0 : int res1 = 0 ;
6344 : double val2 ;
6345 0 : int ecode2 = 0 ;
6346 : double val3 ;
6347 0 : int ecode3 = 0 ;
6348 : double val4 ;
6349 0 : int ecode4 = 0 ;
6350 : double val5 ;
6351 0 : int ecode5 = 0 ;
6352 0 : PyObject * obj0 = 0 ;
6353 0 : PyObject * obj1 = 0 ;
6354 0 : PyObject * obj2 = 0 ;
6355 0 : PyObject * obj3 = 0 ;
6356 0 : PyObject * obj4 = 0 ;
6357 : char * kwnames[] = {
6358 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6359 0 : };
6360 : OGRErr result;
6361 :
6362 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetCS",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6363 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6364 0 : if (!SWIG_IsOK(res1)) {
6365 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6366 : }
6367 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6368 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6369 0 : if (!SWIG_IsOK(ecode2)) {
6370 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCS" "', argument " "2"" of type '" "double""'");
6371 : }
6372 0 : arg2 = static_cast< double >(val2);
6373 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6374 0 : if (!SWIG_IsOK(ecode3)) {
6375 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCS" "', argument " "3"" of type '" "double""'");
6376 : }
6377 0 : arg3 = static_cast< double >(val3);
6378 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6379 0 : if (!SWIG_IsOK(ecode4)) {
6380 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCS" "', argument " "4"" of type '" "double""'");
6381 : }
6382 0 : arg4 = static_cast< double >(val4);
6383 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6384 0 : if (!SWIG_IsOK(ecode5)) {
6385 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCS" "', argument " "5"" of type '" "double""'");
6386 : }
6387 0 : arg5 = static_cast< double >(val5);
6388 : {
6389 0 : if ( bUseExceptions ) {
6390 0 : CPLErrorReset();
6391 : }
6392 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
6393 0 : if ( bUseExceptions ) {
6394 0 : CPLErr eclass = CPLGetLastErrorType();
6395 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6396 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6397 : }
6398 : }
6399 : }
6400 : {
6401 : /* %typemap(out) OGRErr */
6402 0 : if ( result != 0 && bUseExceptions) {
6403 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6404 0 : SWIG_fail;
6405 : }
6406 : }
6407 : {
6408 : /* %typemap(ret) OGRErr */
6409 0 : if (resultobj == Py_None ) {
6410 0 : Py_DECREF(resultobj);
6411 0 : resultobj = 0;
6412 : }
6413 0 : if (resultobj == 0) {
6414 0 : resultobj = PyInt_FromLong( result );
6415 : }
6416 : }
6417 0 : return resultobj;
6418 : fail:
6419 0 : return NULL;
6420 : }
6421 :
6422 :
6423 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6424 0 : PyObject *resultobj = 0;
6425 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6426 : double arg2 ;
6427 : double arg3 ;
6428 : double arg4 ;
6429 : double arg5 ;
6430 : double arg6 ;
6431 : double arg7 ;
6432 0 : void *argp1 = 0 ;
6433 0 : int res1 = 0 ;
6434 : double val2 ;
6435 0 : int ecode2 = 0 ;
6436 : double val3 ;
6437 0 : int ecode3 = 0 ;
6438 : double val4 ;
6439 0 : int ecode4 = 0 ;
6440 : double val5 ;
6441 0 : int ecode5 = 0 ;
6442 : double val6 ;
6443 0 : int ecode6 = 0 ;
6444 : double val7 ;
6445 0 : int ecode7 = 0 ;
6446 0 : PyObject * obj0 = 0 ;
6447 0 : PyObject * obj1 = 0 ;
6448 0 : PyObject * obj2 = 0 ;
6449 0 : PyObject * obj3 = 0 ;
6450 0 : PyObject * obj4 = 0 ;
6451 0 : PyObject * obj5 = 0 ;
6452 0 : PyObject * obj6 = 0 ;
6453 : char * kwnames[] = {
6454 : (char *) "self",(char *) "stdp1",(char *) "stdp2",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6455 0 : };
6456 : OGRErr result;
6457 :
6458 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetEC",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
6459 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6460 0 : if (!SWIG_IsOK(res1)) {
6461 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6462 : }
6463 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6464 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6465 0 : if (!SWIG_IsOK(ecode2)) {
6466 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEC" "', argument " "2"" of type '" "double""'");
6467 : }
6468 0 : arg2 = static_cast< double >(val2);
6469 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6470 0 : if (!SWIG_IsOK(ecode3)) {
6471 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEC" "', argument " "3"" of type '" "double""'");
6472 : }
6473 0 : arg3 = static_cast< double >(val3);
6474 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6475 0 : if (!SWIG_IsOK(ecode4)) {
6476 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEC" "', argument " "4"" of type '" "double""'");
6477 : }
6478 0 : arg4 = static_cast< double >(val4);
6479 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6480 0 : if (!SWIG_IsOK(ecode5)) {
6481 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEC" "', argument " "5"" of type '" "double""'");
6482 : }
6483 0 : arg5 = static_cast< double >(val5);
6484 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
6485 0 : if (!SWIG_IsOK(ecode6)) {
6486 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEC" "', argument " "6"" of type '" "double""'");
6487 : }
6488 0 : arg6 = static_cast< double >(val6);
6489 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
6490 0 : if (!SWIG_IsOK(ecode7)) {
6491 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetEC" "', argument " "7"" of type '" "double""'");
6492 : }
6493 0 : arg7 = static_cast< double >(val7);
6494 : {
6495 0 : if ( bUseExceptions ) {
6496 0 : CPLErrorReset();
6497 : }
6498 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
6499 0 : if ( bUseExceptions ) {
6500 0 : CPLErr eclass = CPLGetLastErrorType();
6501 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6502 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6503 : }
6504 : }
6505 : }
6506 : {
6507 : /* %typemap(out) OGRErr */
6508 0 : if ( result != 0 && bUseExceptions) {
6509 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6510 0 : SWIG_fail;
6511 : }
6512 : }
6513 : {
6514 : /* %typemap(ret) OGRErr */
6515 0 : if (resultobj == Py_None ) {
6516 0 : Py_DECREF(resultobj);
6517 0 : resultobj = 0;
6518 : }
6519 0 : if (resultobj == 0) {
6520 0 : resultobj = PyInt_FromLong( result );
6521 : }
6522 : }
6523 0 : return resultobj;
6524 : fail:
6525 0 : return NULL;
6526 : }
6527 :
6528 :
6529 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6530 0 : PyObject *resultobj = 0;
6531 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6532 : double arg2 ;
6533 : double arg3 ;
6534 : double arg4 ;
6535 0 : void *argp1 = 0 ;
6536 0 : int res1 = 0 ;
6537 : double val2 ;
6538 0 : int ecode2 = 0 ;
6539 : double val3 ;
6540 0 : int ecode3 = 0 ;
6541 : double val4 ;
6542 0 : int ecode4 = 0 ;
6543 0 : PyObject * obj0 = 0 ;
6544 0 : PyObject * obj1 = 0 ;
6545 0 : PyObject * obj2 = 0 ;
6546 0 : PyObject * obj3 = 0 ;
6547 : char * kwnames[] = {
6548 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6549 0 : };
6550 : OGRErr result;
6551 :
6552 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetEckertIV",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6553 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6554 0 : if (!SWIG_IsOK(res1)) {
6555 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertIV" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6556 : }
6557 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6558 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6559 0 : if (!SWIG_IsOK(ecode2)) {
6560 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertIV" "', argument " "2"" of type '" "double""'");
6561 : }
6562 0 : arg2 = static_cast< double >(val2);
6563 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6564 0 : if (!SWIG_IsOK(ecode3)) {
6565 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertIV" "', argument " "3"" of type '" "double""'");
6566 : }
6567 0 : arg3 = static_cast< double >(val3);
6568 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6569 0 : if (!SWIG_IsOK(ecode4)) {
6570 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertIV" "', argument " "4"" of type '" "double""'");
6571 : }
6572 0 : arg4 = static_cast< double >(val4);
6573 : {
6574 0 : if ( bUseExceptions ) {
6575 0 : CPLErrorReset();
6576 : }
6577 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
6578 0 : if ( bUseExceptions ) {
6579 0 : CPLErr eclass = CPLGetLastErrorType();
6580 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6581 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6582 : }
6583 : }
6584 : }
6585 : {
6586 : /* %typemap(out) OGRErr */
6587 0 : if ( result != 0 && bUseExceptions) {
6588 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6589 0 : SWIG_fail;
6590 : }
6591 : }
6592 : {
6593 : /* %typemap(ret) OGRErr */
6594 0 : if (resultobj == Py_None ) {
6595 0 : Py_DECREF(resultobj);
6596 0 : resultobj = 0;
6597 : }
6598 0 : if (resultobj == 0) {
6599 0 : resultobj = PyInt_FromLong( result );
6600 : }
6601 : }
6602 0 : return resultobj;
6603 : fail:
6604 0 : return NULL;
6605 : }
6606 :
6607 :
6608 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertVI(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6609 0 : PyObject *resultobj = 0;
6610 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6611 : double arg2 ;
6612 : double arg3 ;
6613 : double arg4 ;
6614 0 : void *argp1 = 0 ;
6615 0 : int res1 = 0 ;
6616 : double val2 ;
6617 0 : int ecode2 = 0 ;
6618 : double val3 ;
6619 0 : int ecode3 = 0 ;
6620 : double val4 ;
6621 0 : int ecode4 = 0 ;
6622 0 : PyObject * obj0 = 0 ;
6623 0 : PyObject * obj1 = 0 ;
6624 0 : PyObject * obj2 = 0 ;
6625 0 : PyObject * obj3 = 0 ;
6626 : char * kwnames[] = {
6627 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6628 0 : };
6629 : OGRErr result;
6630 :
6631 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetEckertVI",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6632 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6633 0 : if (!SWIG_IsOK(res1)) {
6634 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertVI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6635 : }
6636 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6637 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6638 0 : if (!SWIG_IsOK(ecode2)) {
6639 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertVI" "', argument " "2"" of type '" "double""'");
6640 : }
6641 0 : arg2 = static_cast< double >(val2);
6642 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6643 0 : if (!SWIG_IsOK(ecode3)) {
6644 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertVI" "', argument " "3"" of type '" "double""'");
6645 : }
6646 0 : arg3 = static_cast< double >(val3);
6647 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6648 0 : if (!SWIG_IsOK(ecode4)) {
6649 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertVI" "', argument " "4"" of type '" "double""'");
6650 : }
6651 0 : arg4 = static_cast< double >(val4);
6652 : {
6653 0 : if ( bUseExceptions ) {
6654 0 : CPLErrorReset();
6655 : }
6656 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
6657 0 : if ( bUseExceptions ) {
6658 0 : CPLErr eclass = CPLGetLastErrorType();
6659 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6660 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6661 : }
6662 : }
6663 : }
6664 : {
6665 : /* %typemap(out) OGRErr */
6666 0 : if ( result != 0 && bUseExceptions) {
6667 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6668 0 : SWIG_fail;
6669 : }
6670 : }
6671 : {
6672 : /* %typemap(ret) OGRErr */
6673 0 : if (resultobj == Py_None ) {
6674 0 : Py_DECREF(resultobj);
6675 0 : resultobj = 0;
6676 : }
6677 0 : if (resultobj == 0) {
6678 0 : resultobj = PyInt_FromLong( result );
6679 : }
6680 : }
6681 0 : return resultobj;
6682 : fail:
6683 0 : return NULL;
6684 : }
6685 :
6686 :
6687 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6688 0 : PyObject *resultobj = 0;
6689 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6690 : double arg2 ;
6691 : double arg3 ;
6692 : double arg4 ;
6693 : double arg5 ;
6694 0 : void *argp1 = 0 ;
6695 0 : int res1 = 0 ;
6696 : double val2 ;
6697 0 : int ecode2 = 0 ;
6698 : double val3 ;
6699 0 : int ecode3 = 0 ;
6700 : double val4 ;
6701 0 : int ecode4 = 0 ;
6702 : double val5 ;
6703 0 : int ecode5 = 0 ;
6704 0 : PyObject * obj0 = 0 ;
6705 0 : PyObject * obj1 = 0 ;
6706 0 : PyObject * obj2 = 0 ;
6707 0 : PyObject * obj3 = 0 ;
6708 0 : PyObject * obj4 = 0 ;
6709 : char * kwnames[] = {
6710 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6711 0 : };
6712 : OGRErr result;
6713 :
6714 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetEquirectangular",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6715 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6716 0 : if (!SWIG_IsOK(res1)) {
6717 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6718 : }
6719 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6720 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6721 0 : if (!SWIG_IsOK(ecode2)) {
6722 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular" "', argument " "2"" of type '" "double""'");
6723 : }
6724 0 : arg2 = static_cast< double >(val2);
6725 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6726 0 : if (!SWIG_IsOK(ecode3)) {
6727 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular" "', argument " "3"" of type '" "double""'");
6728 : }
6729 0 : arg3 = static_cast< double >(val3);
6730 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6731 0 : if (!SWIG_IsOK(ecode4)) {
6732 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular" "', argument " "4"" of type '" "double""'");
6733 : }
6734 0 : arg4 = static_cast< double >(val4);
6735 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6736 0 : if (!SWIG_IsOK(ecode5)) {
6737 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular" "', argument " "5"" of type '" "double""'");
6738 : }
6739 0 : arg5 = static_cast< double >(val5);
6740 : {
6741 0 : if ( bUseExceptions ) {
6742 0 : CPLErrorReset();
6743 : }
6744 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
6745 0 : if ( bUseExceptions ) {
6746 0 : CPLErr eclass = CPLGetLastErrorType();
6747 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6748 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6749 : }
6750 : }
6751 : }
6752 : {
6753 : /* %typemap(out) OGRErr */
6754 0 : if ( result != 0 && bUseExceptions) {
6755 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6756 0 : SWIG_fail;
6757 : }
6758 : }
6759 : {
6760 : /* %typemap(ret) OGRErr */
6761 0 : if (resultobj == Py_None ) {
6762 0 : Py_DECREF(resultobj);
6763 0 : resultobj = 0;
6764 : }
6765 0 : if (resultobj == 0) {
6766 0 : resultobj = PyInt_FromLong( result );
6767 : }
6768 : }
6769 0 : return resultobj;
6770 : fail:
6771 0 : return NULL;
6772 : }
6773 :
6774 :
6775 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular2(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6776 0 : PyObject *resultobj = 0;
6777 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6778 : double arg2 ;
6779 : double arg3 ;
6780 : double arg4 ;
6781 : double arg5 ;
6782 : double arg6 ;
6783 0 : void *argp1 = 0 ;
6784 0 : int res1 = 0 ;
6785 : double val2 ;
6786 0 : int ecode2 = 0 ;
6787 : double val3 ;
6788 0 : int ecode3 = 0 ;
6789 : double val4 ;
6790 0 : int ecode4 = 0 ;
6791 : double val5 ;
6792 0 : int ecode5 = 0 ;
6793 : double val6 ;
6794 0 : int ecode6 = 0 ;
6795 0 : PyObject * obj0 = 0 ;
6796 0 : PyObject * obj1 = 0 ;
6797 0 : PyObject * obj2 = 0 ;
6798 0 : PyObject * obj3 = 0 ;
6799 0 : PyObject * obj4 = 0 ;
6800 0 : PyObject * obj5 = 0 ;
6801 : char * kwnames[] = {
6802 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "pseudostdparallellat",(char *) "fe",(char *) "fn", NULL
6803 0 : };
6804 : OGRErr result;
6805 :
6806 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetEquirectangular2",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
6807 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6808 0 : if (!SWIG_IsOK(res1)) {
6809 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6810 : }
6811 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6812 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6813 0 : if (!SWIG_IsOK(ecode2)) {
6814 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "2"" of type '" "double""'");
6815 : }
6816 0 : arg2 = static_cast< double >(val2);
6817 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6818 0 : if (!SWIG_IsOK(ecode3)) {
6819 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "3"" of type '" "double""'");
6820 : }
6821 0 : arg3 = static_cast< double >(val3);
6822 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6823 0 : if (!SWIG_IsOK(ecode4)) {
6824 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "4"" of type '" "double""'");
6825 : }
6826 0 : arg4 = static_cast< double >(val4);
6827 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6828 0 : if (!SWIG_IsOK(ecode5)) {
6829 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "5"" of type '" "double""'");
6830 : }
6831 0 : arg5 = static_cast< double >(val5);
6832 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
6833 0 : if (!SWIG_IsOK(ecode6)) {
6834 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "6"" of type '" "double""'");
6835 : }
6836 0 : arg6 = static_cast< double >(val6);
6837 : {
6838 0 : if ( bUseExceptions ) {
6839 0 : CPLErrorReset();
6840 : }
6841 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
6842 0 : if ( bUseExceptions ) {
6843 0 : CPLErr eclass = CPLGetLastErrorType();
6844 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6845 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6846 : }
6847 : }
6848 : }
6849 : {
6850 : /* %typemap(out) OGRErr */
6851 0 : if ( result != 0 && bUseExceptions) {
6852 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6853 0 : SWIG_fail;
6854 : }
6855 : }
6856 : {
6857 : /* %typemap(ret) OGRErr */
6858 0 : if (resultobj == Py_None ) {
6859 0 : Py_DECREF(resultobj);
6860 0 : resultobj = 0;
6861 : }
6862 0 : if (resultobj == 0) {
6863 0 : resultobj = PyInt_FromLong( result );
6864 : }
6865 : }
6866 0 : return resultobj;
6867 : fail:
6868 0 : return NULL;
6869 : }
6870 :
6871 :
6872 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGaussSchreiberTMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6873 0 : PyObject *resultobj = 0;
6874 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6875 : double arg2 ;
6876 : double arg3 ;
6877 : double arg4 ;
6878 : double arg5 ;
6879 : double arg6 ;
6880 0 : void *argp1 = 0 ;
6881 0 : int res1 = 0 ;
6882 : double val2 ;
6883 0 : int ecode2 = 0 ;
6884 : double val3 ;
6885 0 : int ecode3 = 0 ;
6886 : double val4 ;
6887 0 : int ecode4 = 0 ;
6888 : double val5 ;
6889 0 : int ecode5 = 0 ;
6890 : double val6 ;
6891 0 : int ecode6 = 0 ;
6892 0 : PyObject * obj0 = 0 ;
6893 0 : PyObject * obj1 = 0 ;
6894 0 : PyObject * obj2 = 0 ;
6895 0 : PyObject * obj3 = 0 ;
6896 0 : PyObject * obj4 = 0 ;
6897 0 : PyObject * obj5 = 0 ;
6898 : char * kwnames[] = {
6899 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "sc",(char *) "fe",(char *) "fn", NULL
6900 0 : };
6901 : OGRErr result;
6902 :
6903 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetGaussSchreiberTMercator",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
6904 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6905 0 : if (!SWIG_IsOK(res1)) {
6906 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6907 : }
6908 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6909 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6910 0 : if (!SWIG_IsOK(ecode2)) {
6911 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "2"" of type '" "double""'");
6912 : }
6913 0 : arg2 = static_cast< double >(val2);
6914 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6915 0 : if (!SWIG_IsOK(ecode3)) {
6916 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "3"" of type '" "double""'");
6917 : }
6918 0 : arg3 = static_cast< double >(val3);
6919 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6920 0 : if (!SWIG_IsOK(ecode4)) {
6921 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "4"" of type '" "double""'");
6922 : }
6923 0 : arg4 = static_cast< double >(val4);
6924 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6925 0 : if (!SWIG_IsOK(ecode5)) {
6926 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "5"" of type '" "double""'");
6927 : }
6928 0 : arg5 = static_cast< double >(val5);
6929 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
6930 0 : if (!SWIG_IsOK(ecode6)) {
6931 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "6"" of type '" "double""'");
6932 : }
6933 0 : arg6 = static_cast< double >(val6);
6934 : {
6935 0 : if ( bUseExceptions ) {
6936 0 : CPLErrorReset();
6937 : }
6938 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
6939 0 : if ( bUseExceptions ) {
6940 0 : CPLErr eclass = CPLGetLastErrorType();
6941 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6942 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6943 : }
6944 : }
6945 : }
6946 : {
6947 : /* %typemap(out) OGRErr */
6948 0 : if ( result != 0 && bUseExceptions) {
6949 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6950 0 : SWIG_fail;
6951 : }
6952 : }
6953 : {
6954 : /* %typemap(ret) OGRErr */
6955 0 : if (resultobj == Py_None ) {
6956 0 : Py_DECREF(resultobj);
6957 0 : resultobj = 0;
6958 : }
6959 0 : if (resultobj == 0) {
6960 0 : resultobj = PyInt_FromLong( result );
6961 : }
6962 : }
6963 0 : return resultobj;
6964 : fail:
6965 0 : return NULL;
6966 : }
6967 :
6968 :
6969 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6970 1 : PyObject *resultobj = 0;
6971 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6972 : double arg2 ;
6973 : double arg3 ;
6974 : double arg4 ;
6975 1 : void *argp1 = 0 ;
6976 1 : int res1 = 0 ;
6977 : double val2 ;
6978 1 : int ecode2 = 0 ;
6979 : double val3 ;
6980 1 : int ecode3 = 0 ;
6981 : double val4 ;
6982 1 : int ecode4 = 0 ;
6983 1 : PyObject * obj0 = 0 ;
6984 1 : PyObject * obj1 = 0 ;
6985 1 : PyObject * obj2 = 0 ;
6986 1 : PyObject * obj3 = 0 ;
6987 : char * kwnames[] = {
6988 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6989 1 : };
6990 : OGRErr result;
6991 :
6992 1 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetGS",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6993 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6994 1 : if (!SWIG_IsOK(res1)) {
6995 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6996 : }
6997 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6998 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6999 1 : if (!SWIG_IsOK(ecode2)) {
7000 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGS" "', argument " "2"" of type '" "double""'");
7001 : }
7002 1 : arg2 = static_cast< double >(val2);
7003 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7004 1 : if (!SWIG_IsOK(ecode3)) {
7005 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGS" "', argument " "3"" of type '" "double""'");
7006 : }
7007 1 : arg3 = static_cast< double >(val3);
7008 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7009 1 : if (!SWIG_IsOK(ecode4)) {
7010 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGS" "', argument " "4"" of type '" "double""'");
7011 : }
7012 1 : arg4 = static_cast< double >(val4);
7013 : {
7014 1 : if ( bUseExceptions ) {
7015 0 : CPLErrorReset();
7016 : }
7017 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
7018 1 : if ( bUseExceptions ) {
7019 0 : CPLErr eclass = CPLGetLastErrorType();
7020 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7021 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7022 : }
7023 : }
7024 : }
7025 : {
7026 : /* %typemap(out) OGRErr */
7027 1 : if ( result != 0 && bUseExceptions) {
7028 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7029 0 : SWIG_fail;
7030 : }
7031 : }
7032 : {
7033 : /* %typemap(ret) OGRErr */
7034 1 : if (resultobj == Py_None ) {
7035 0 : Py_DECREF(resultobj);
7036 0 : resultobj = 0;
7037 : }
7038 1 : if (resultobj == 0) {
7039 1 : resultobj = PyInt_FromLong( result );
7040 : }
7041 : }
7042 1 : return resultobj;
7043 : fail:
7044 0 : return NULL;
7045 : }
7046 :
7047 :
7048 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7049 0 : PyObject *resultobj = 0;
7050 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7051 : double arg2 ;
7052 : double arg3 ;
7053 : double arg4 ;
7054 0 : void *argp1 = 0 ;
7055 0 : int res1 = 0 ;
7056 : double val2 ;
7057 0 : int ecode2 = 0 ;
7058 : double val3 ;
7059 0 : int ecode3 = 0 ;
7060 : double val4 ;
7061 0 : int ecode4 = 0 ;
7062 0 : PyObject * obj0 = 0 ;
7063 0 : PyObject * obj1 = 0 ;
7064 0 : PyObject * obj2 = 0 ;
7065 0 : PyObject * obj3 = 0 ;
7066 : char * kwnames[] = {
7067 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
7068 0 : };
7069 : OGRErr result;
7070 :
7071 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetGH",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7072 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7073 0 : if (!SWIG_IsOK(res1)) {
7074 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7075 : }
7076 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7077 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7078 0 : if (!SWIG_IsOK(ecode2)) {
7079 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGH" "', argument " "2"" of type '" "double""'");
7080 : }
7081 0 : arg2 = static_cast< double >(val2);
7082 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7083 0 : if (!SWIG_IsOK(ecode3)) {
7084 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGH" "', argument " "3"" of type '" "double""'");
7085 : }
7086 0 : arg3 = static_cast< double >(val3);
7087 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7088 0 : if (!SWIG_IsOK(ecode4)) {
7089 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGH" "', argument " "4"" of type '" "double""'");
7090 : }
7091 0 : arg4 = static_cast< double >(val4);
7092 : {
7093 0 : if ( bUseExceptions ) {
7094 0 : CPLErrorReset();
7095 : }
7096 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
7097 0 : if ( bUseExceptions ) {
7098 0 : CPLErr eclass = CPLGetLastErrorType();
7099 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7100 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7101 : }
7102 : }
7103 : }
7104 : {
7105 : /* %typemap(out) OGRErr */
7106 0 : if ( result != 0 && bUseExceptions) {
7107 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7108 0 : SWIG_fail;
7109 : }
7110 : }
7111 : {
7112 : /* %typemap(ret) OGRErr */
7113 0 : if (resultobj == Py_None ) {
7114 0 : Py_DECREF(resultobj);
7115 0 : resultobj = 0;
7116 : }
7117 0 : if (resultobj == 0) {
7118 0 : resultobj = PyInt_FromLong( result );
7119 : }
7120 : }
7121 0 : return resultobj;
7122 : fail:
7123 0 : return NULL;
7124 : }
7125 :
7126 :
7127 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetIGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7128 0 : PyObject *resultobj = 0;
7129 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7130 0 : void *argp1 = 0 ;
7131 0 : int res1 = 0 ;
7132 0 : PyObject * obj0 = 0 ;
7133 : OGRErr result;
7134 :
7135 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_SetIGH",&obj0)) SWIG_fail;
7136 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7137 0 : if (!SWIG_IsOK(res1)) {
7138 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7139 : }
7140 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7141 : {
7142 0 : if ( bUseExceptions ) {
7143 0 : CPLErrorReset();
7144 : }
7145 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
7146 0 : if ( bUseExceptions ) {
7147 0 : CPLErr eclass = CPLGetLastErrorType();
7148 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7149 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7150 : }
7151 : }
7152 : }
7153 : {
7154 : /* %typemap(out) OGRErr */
7155 0 : if ( result != 0 && bUseExceptions) {
7156 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7157 0 : SWIG_fail;
7158 : }
7159 : }
7160 : {
7161 : /* %typemap(ret) OGRErr */
7162 0 : if (resultobj == Py_None ) {
7163 0 : Py_DECREF(resultobj);
7164 0 : resultobj = 0;
7165 : }
7166 0 : if (resultobj == 0) {
7167 0 : resultobj = PyInt_FromLong( result );
7168 : }
7169 : }
7170 0 : return resultobj;
7171 : fail:
7172 0 : return NULL;
7173 : }
7174 :
7175 :
7176 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGEOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7177 0 : PyObject *resultobj = 0;
7178 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7179 : double arg2 ;
7180 : double arg3 ;
7181 : double arg4 ;
7182 : double arg5 ;
7183 0 : void *argp1 = 0 ;
7184 0 : int res1 = 0 ;
7185 : double val2 ;
7186 0 : int ecode2 = 0 ;
7187 : double val3 ;
7188 0 : int ecode3 = 0 ;
7189 : double val4 ;
7190 0 : int ecode4 = 0 ;
7191 : double val5 ;
7192 0 : int ecode5 = 0 ;
7193 0 : PyObject * obj0 = 0 ;
7194 0 : PyObject * obj1 = 0 ;
7195 0 : PyObject * obj2 = 0 ;
7196 0 : PyObject * obj3 = 0 ;
7197 0 : PyObject * obj4 = 0 ;
7198 : char * kwnames[] = {
7199 : (char *) "self",(char *) "cm",(char *) "satelliteheight",(char *) "fe",(char *) "fn", NULL
7200 0 : };
7201 : OGRErr result;
7202 :
7203 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetGEOS",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
7204 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7205 0 : if (!SWIG_IsOK(res1)) {
7206 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGEOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7207 : }
7208 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7209 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7210 0 : if (!SWIG_IsOK(ecode2)) {
7211 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGEOS" "', argument " "2"" of type '" "double""'");
7212 : }
7213 0 : arg2 = static_cast< double >(val2);
7214 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7215 0 : if (!SWIG_IsOK(ecode3)) {
7216 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGEOS" "', argument " "3"" of type '" "double""'");
7217 : }
7218 0 : arg3 = static_cast< double >(val3);
7219 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7220 0 : if (!SWIG_IsOK(ecode4)) {
7221 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGEOS" "', argument " "4"" of type '" "double""'");
7222 : }
7223 0 : arg4 = static_cast< double >(val4);
7224 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7225 0 : if (!SWIG_IsOK(ecode5)) {
7226 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGEOS" "', argument " "5"" of type '" "double""'");
7227 : }
7228 0 : arg5 = static_cast< double >(val5);
7229 : {
7230 0 : if ( bUseExceptions ) {
7231 0 : CPLErrorReset();
7232 : }
7233 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
7234 0 : if ( bUseExceptions ) {
7235 0 : CPLErr eclass = CPLGetLastErrorType();
7236 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7237 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7238 : }
7239 : }
7240 : }
7241 : {
7242 : /* %typemap(out) OGRErr */
7243 0 : if ( result != 0 && bUseExceptions) {
7244 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7245 0 : SWIG_fail;
7246 : }
7247 : }
7248 : {
7249 : /* %typemap(ret) OGRErr */
7250 0 : if (resultobj == Py_None ) {
7251 0 : Py_DECREF(resultobj);
7252 0 : resultobj = 0;
7253 : }
7254 0 : if (resultobj == 0) {
7255 0 : resultobj = PyInt_FromLong( result );
7256 : }
7257 : }
7258 0 : return resultobj;
7259 : fail:
7260 0 : return NULL;
7261 : }
7262 :
7263 :
7264 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGnomonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7265 0 : PyObject *resultobj = 0;
7266 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7267 : double arg2 ;
7268 : double arg3 ;
7269 : double arg4 ;
7270 : double arg5 ;
7271 0 : void *argp1 = 0 ;
7272 0 : int res1 = 0 ;
7273 : double val2 ;
7274 0 : int ecode2 = 0 ;
7275 : double val3 ;
7276 0 : int ecode3 = 0 ;
7277 : double val4 ;
7278 0 : int ecode4 = 0 ;
7279 : double val5 ;
7280 0 : int ecode5 = 0 ;
7281 0 : PyObject * obj0 = 0 ;
7282 0 : PyObject * obj1 = 0 ;
7283 0 : PyObject * obj2 = 0 ;
7284 0 : PyObject * obj3 = 0 ;
7285 0 : PyObject * obj4 = 0 ;
7286 : char * kwnames[] = {
7287 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
7288 0 : };
7289 : OGRErr result;
7290 :
7291 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetGnomonic",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
7292 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7293 0 : if (!SWIG_IsOK(res1)) {
7294 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGnomonic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7295 : }
7296 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7297 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7298 0 : if (!SWIG_IsOK(ecode2)) {
7299 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGnomonic" "', argument " "2"" of type '" "double""'");
7300 : }
7301 0 : arg2 = static_cast< double >(val2);
7302 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7303 0 : if (!SWIG_IsOK(ecode3)) {
7304 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGnomonic" "', argument " "3"" of type '" "double""'");
7305 : }
7306 0 : arg3 = static_cast< double >(val3);
7307 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7308 0 : if (!SWIG_IsOK(ecode4)) {
7309 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGnomonic" "', argument " "4"" of type '" "double""'");
7310 : }
7311 0 : arg4 = static_cast< double >(val4);
7312 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7313 0 : if (!SWIG_IsOK(ecode5)) {
7314 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGnomonic" "', argument " "5"" of type '" "double""'");
7315 : }
7316 0 : arg5 = static_cast< double >(val5);
7317 : {
7318 0 : if ( bUseExceptions ) {
7319 0 : CPLErrorReset();
7320 : }
7321 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
7322 0 : if ( bUseExceptions ) {
7323 0 : CPLErr eclass = CPLGetLastErrorType();
7324 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7325 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7326 : }
7327 : }
7328 : }
7329 : {
7330 : /* %typemap(out) OGRErr */
7331 0 : if ( result != 0 && bUseExceptions) {
7332 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7333 0 : SWIG_fail;
7334 : }
7335 : }
7336 : {
7337 : /* %typemap(ret) OGRErr */
7338 0 : if (resultobj == Py_None ) {
7339 0 : Py_DECREF(resultobj);
7340 0 : resultobj = 0;
7341 : }
7342 0 : if (resultobj == 0) {
7343 0 : resultobj = PyInt_FromLong( result );
7344 : }
7345 : }
7346 0 : return resultobj;
7347 : fail:
7348 0 : return NULL;
7349 : }
7350 :
7351 :
7352 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7353 0 : PyObject *resultobj = 0;
7354 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7355 : double arg2 ;
7356 : double arg3 ;
7357 : double arg4 ;
7358 : double arg5 ;
7359 : double arg6 ;
7360 : double arg7 ;
7361 : double arg8 ;
7362 0 : void *argp1 = 0 ;
7363 0 : int res1 = 0 ;
7364 : double val2 ;
7365 0 : int ecode2 = 0 ;
7366 : double val3 ;
7367 0 : int ecode3 = 0 ;
7368 : double val4 ;
7369 0 : int ecode4 = 0 ;
7370 : double val5 ;
7371 0 : int ecode5 = 0 ;
7372 : double val6 ;
7373 0 : int ecode6 = 0 ;
7374 : double val7 ;
7375 0 : int ecode7 = 0 ;
7376 : double val8 ;
7377 0 : int ecode8 = 0 ;
7378 0 : PyObject * obj0 = 0 ;
7379 0 : PyObject * obj1 = 0 ;
7380 0 : PyObject * obj2 = 0 ;
7381 0 : PyObject * obj3 = 0 ;
7382 0 : PyObject * obj4 = 0 ;
7383 0 : PyObject * obj5 = 0 ;
7384 0 : PyObject * obj6 = 0 ;
7385 0 : PyObject * obj7 = 0 ;
7386 : char * kwnames[] = {
7387 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "azimuth",(char *) "recttoskew",(char *) "scale",(char *) "fe",(char *) "fn", NULL
7388 0 : };
7389 : OGRErr result;
7390 :
7391 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOO:SpatialReference_SetHOM",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7392 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7393 0 : if (!SWIG_IsOK(res1)) {
7394 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7395 : }
7396 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7397 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7398 0 : if (!SWIG_IsOK(ecode2)) {
7399 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM" "', argument " "2"" of type '" "double""'");
7400 : }
7401 0 : arg2 = static_cast< double >(val2);
7402 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7403 0 : if (!SWIG_IsOK(ecode3)) {
7404 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM" "', argument " "3"" of type '" "double""'");
7405 : }
7406 0 : arg3 = static_cast< double >(val3);
7407 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7408 0 : if (!SWIG_IsOK(ecode4)) {
7409 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM" "', argument " "4"" of type '" "double""'");
7410 : }
7411 0 : arg4 = static_cast< double >(val4);
7412 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7413 0 : if (!SWIG_IsOK(ecode5)) {
7414 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM" "', argument " "5"" of type '" "double""'");
7415 : }
7416 0 : arg5 = static_cast< double >(val5);
7417 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7418 0 : if (!SWIG_IsOK(ecode6)) {
7419 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM" "', argument " "6"" of type '" "double""'");
7420 : }
7421 0 : arg6 = static_cast< double >(val6);
7422 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
7423 0 : if (!SWIG_IsOK(ecode7)) {
7424 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM" "', argument " "7"" of type '" "double""'");
7425 : }
7426 0 : arg7 = static_cast< double >(val7);
7427 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
7428 0 : if (!SWIG_IsOK(ecode8)) {
7429 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM" "', argument " "8"" of type '" "double""'");
7430 : }
7431 0 : arg8 = static_cast< double >(val8);
7432 : {
7433 0 : if ( bUseExceptions ) {
7434 0 : CPLErrorReset();
7435 : }
7436 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7437 0 : if ( bUseExceptions ) {
7438 0 : CPLErr eclass = CPLGetLastErrorType();
7439 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7440 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7441 : }
7442 : }
7443 : }
7444 : {
7445 : /* %typemap(out) OGRErr */
7446 0 : if ( result != 0 && bUseExceptions) {
7447 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7448 0 : SWIG_fail;
7449 : }
7450 : }
7451 : {
7452 : /* %typemap(ret) OGRErr */
7453 0 : if (resultobj == Py_None ) {
7454 0 : Py_DECREF(resultobj);
7455 0 : resultobj = 0;
7456 : }
7457 0 : if (resultobj == 0) {
7458 0 : resultobj = PyInt_FromLong( result );
7459 : }
7460 : }
7461 0 : return resultobj;
7462 : fail:
7463 0 : return NULL;
7464 : }
7465 :
7466 :
7467 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM2PNO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7468 0 : PyObject *resultobj = 0;
7469 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7470 : double arg2 ;
7471 : double arg3 ;
7472 : double arg4 ;
7473 : double arg5 ;
7474 : double arg6 ;
7475 : double arg7 ;
7476 : double arg8 ;
7477 : double arg9 ;
7478 0 : void *argp1 = 0 ;
7479 0 : int res1 = 0 ;
7480 : double val2 ;
7481 0 : int ecode2 = 0 ;
7482 : double val3 ;
7483 0 : int ecode3 = 0 ;
7484 : double val4 ;
7485 0 : int ecode4 = 0 ;
7486 : double val5 ;
7487 0 : int ecode5 = 0 ;
7488 : double val6 ;
7489 0 : int ecode6 = 0 ;
7490 : double val7 ;
7491 0 : int ecode7 = 0 ;
7492 : double val8 ;
7493 0 : int ecode8 = 0 ;
7494 : double val9 ;
7495 0 : int ecode9 = 0 ;
7496 0 : PyObject * obj0 = 0 ;
7497 0 : PyObject * obj1 = 0 ;
7498 0 : PyObject * obj2 = 0 ;
7499 0 : PyObject * obj3 = 0 ;
7500 0 : PyObject * obj4 = 0 ;
7501 0 : PyObject * obj5 = 0 ;
7502 0 : PyObject * obj6 = 0 ;
7503 0 : PyObject * obj7 = 0 ;
7504 0 : PyObject * obj8 = 0 ;
7505 : char * kwnames[] = {
7506 : (char *) "self",(char *) "clat",(char *) "dfLat1",(char *) "dfLong1",(char *) "dfLat2",(char *) "dfLong2",(char *) "scale",(char *) "fe",(char *) "fn", NULL
7507 0 : };
7508 : OGRErr result;
7509 :
7510 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO:SpatialReference_SetHOM2PNO",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
7511 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7512 0 : if (!SWIG_IsOK(res1)) {
7513 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7514 : }
7515 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7516 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7517 0 : if (!SWIG_IsOK(ecode2)) {
7518 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "2"" of type '" "double""'");
7519 : }
7520 0 : arg2 = static_cast< double >(val2);
7521 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7522 0 : if (!SWIG_IsOK(ecode3)) {
7523 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "3"" of type '" "double""'");
7524 : }
7525 0 : arg3 = static_cast< double >(val3);
7526 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7527 0 : if (!SWIG_IsOK(ecode4)) {
7528 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "4"" of type '" "double""'");
7529 : }
7530 0 : arg4 = static_cast< double >(val4);
7531 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7532 0 : if (!SWIG_IsOK(ecode5)) {
7533 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "5"" of type '" "double""'");
7534 : }
7535 0 : arg5 = static_cast< double >(val5);
7536 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7537 0 : if (!SWIG_IsOK(ecode6)) {
7538 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "6"" of type '" "double""'");
7539 : }
7540 0 : arg6 = static_cast< double >(val6);
7541 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
7542 0 : if (!SWIG_IsOK(ecode7)) {
7543 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "7"" of type '" "double""'");
7544 : }
7545 0 : arg7 = static_cast< double >(val7);
7546 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
7547 0 : if (!SWIG_IsOK(ecode8)) {
7548 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "8"" of type '" "double""'");
7549 : }
7550 0 : arg8 = static_cast< double >(val8);
7551 0 : ecode9 = SWIG_AsVal_double(obj8, &val9);
7552 0 : if (!SWIG_IsOK(ecode9)) {
7553 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "9"" of type '" "double""'");
7554 : }
7555 0 : arg9 = static_cast< double >(val9);
7556 : {
7557 0 : if ( bUseExceptions ) {
7558 0 : CPLErrorReset();
7559 : }
7560 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
7561 0 : if ( bUseExceptions ) {
7562 0 : CPLErr eclass = CPLGetLastErrorType();
7563 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7564 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7565 : }
7566 : }
7567 : }
7568 : {
7569 : /* %typemap(out) OGRErr */
7570 0 : if ( result != 0 && bUseExceptions) {
7571 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7572 0 : SWIG_fail;
7573 : }
7574 : }
7575 : {
7576 : /* %typemap(ret) OGRErr */
7577 0 : if (resultobj == Py_None ) {
7578 0 : Py_DECREF(resultobj);
7579 0 : resultobj = 0;
7580 : }
7581 0 : if (resultobj == 0) {
7582 0 : resultobj = PyInt_FromLong( result );
7583 : }
7584 : }
7585 0 : return resultobj;
7586 : fail:
7587 0 : return NULL;
7588 : }
7589 :
7590 :
7591 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetKrovak(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7592 0 : PyObject *resultobj = 0;
7593 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7594 : double arg2 ;
7595 : double arg3 ;
7596 : double arg4 ;
7597 : double arg5 ;
7598 : double arg6 ;
7599 : double arg7 ;
7600 : double arg8 ;
7601 0 : void *argp1 = 0 ;
7602 0 : int res1 = 0 ;
7603 : double val2 ;
7604 0 : int ecode2 = 0 ;
7605 : double val3 ;
7606 0 : int ecode3 = 0 ;
7607 : double val4 ;
7608 0 : int ecode4 = 0 ;
7609 : double val5 ;
7610 0 : int ecode5 = 0 ;
7611 : double val6 ;
7612 0 : int ecode6 = 0 ;
7613 : double val7 ;
7614 0 : int ecode7 = 0 ;
7615 : double val8 ;
7616 0 : int ecode8 = 0 ;
7617 0 : PyObject * obj0 = 0 ;
7618 0 : PyObject * obj1 = 0 ;
7619 0 : PyObject * obj2 = 0 ;
7620 0 : PyObject * obj3 = 0 ;
7621 0 : PyObject * obj4 = 0 ;
7622 0 : PyObject * obj5 = 0 ;
7623 0 : PyObject * obj6 = 0 ;
7624 0 : PyObject * obj7 = 0 ;
7625 : char * kwnames[] = {
7626 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "azimuth",(char *) "pseudostdparallellat",(char *) "scale",(char *) "fe",(char *) "fn", NULL
7627 0 : };
7628 : OGRErr result;
7629 :
7630 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOO:SpatialReference_SetKrovak",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7631 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7632 0 : if (!SWIG_IsOK(res1)) {
7633 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetKrovak" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7634 : }
7635 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7636 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7637 0 : if (!SWIG_IsOK(ecode2)) {
7638 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetKrovak" "', argument " "2"" of type '" "double""'");
7639 : }
7640 0 : arg2 = static_cast< double >(val2);
7641 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7642 0 : if (!SWIG_IsOK(ecode3)) {
7643 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetKrovak" "', argument " "3"" of type '" "double""'");
7644 : }
7645 0 : arg3 = static_cast< double >(val3);
7646 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7647 0 : if (!SWIG_IsOK(ecode4)) {
7648 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetKrovak" "', argument " "4"" of type '" "double""'");
7649 : }
7650 0 : arg4 = static_cast< double >(val4);
7651 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7652 0 : if (!SWIG_IsOK(ecode5)) {
7653 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetKrovak" "', argument " "5"" of type '" "double""'");
7654 : }
7655 0 : arg5 = static_cast< double >(val5);
7656 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7657 0 : if (!SWIG_IsOK(ecode6)) {
7658 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetKrovak" "', argument " "6"" of type '" "double""'");
7659 : }
7660 0 : arg6 = static_cast< double >(val6);
7661 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
7662 0 : if (!SWIG_IsOK(ecode7)) {
7663 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetKrovak" "', argument " "7"" of type '" "double""'");
7664 : }
7665 0 : arg7 = static_cast< double >(val7);
7666 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
7667 0 : if (!SWIG_IsOK(ecode8)) {
7668 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetKrovak" "', argument " "8"" of type '" "double""'");
7669 : }
7670 0 : arg8 = static_cast< double >(val8);
7671 : {
7672 0 : if ( bUseExceptions ) {
7673 0 : CPLErrorReset();
7674 : }
7675 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7676 0 : if ( bUseExceptions ) {
7677 0 : CPLErr eclass = CPLGetLastErrorType();
7678 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7679 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7680 : }
7681 : }
7682 : }
7683 : {
7684 : /* %typemap(out) OGRErr */
7685 0 : if ( result != 0 && bUseExceptions) {
7686 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7687 0 : SWIG_fail;
7688 : }
7689 : }
7690 : {
7691 : /* %typemap(ret) OGRErr */
7692 0 : if (resultobj == Py_None ) {
7693 0 : Py_DECREF(resultobj);
7694 0 : resultobj = 0;
7695 : }
7696 0 : if (resultobj == 0) {
7697 0 : resultobj = PyInt_FromLong( result );
7698 : }
7699 : }
7700 0 : return resultobj;
7701 : fail:
7702 0 : return NULL;
7703 : }
7704 :
7705 :
7706 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLAEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7707 0 : PyObject *resultobj = 0;
7708 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7709 : double arg2 ;
7710 : double arg3 ;
7711 : double arg4 ;
7712 : double arg5 ;
7713 0 : void *argp1 = 0 ;
7714 0 : int res1 = 0 ;
7715 : double val2 ;
7716 0 : int ecode2 = 0 ;
7717 : double val3 ;
7718 0 : int ecode3 = 0 ;
7719 : double val4 ;
7720 0 : int ecode4 = 0 ;
7721 : double val5 ;
7722 0 : int ecode5 = 0 ;
7723 0 : PyObject * obj0 = 0 ;
7724 0 : PyObject * obj1 = 0 ;
7725 0 : PyObject * obj2 = 0 ;
7726 0 : PyObject * obj3 = 0 ;
7727 0 : PyObject * obj4 = 0 ;
7728 : char * kwnames[] = {
7729 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
7730 0 : };
7731 : OGRErr result;
7732 :
7733 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetLAEA",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
7734 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7735 0 : if (!SWIG_IsOK(res1)) {
7736 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLAEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7737 : }
7738 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7739 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7740 0 : if (!SWIG_IsOK(ecode2)) {
7741 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLAEA" "', argument " "2"" of type '" "double""'");
7742 : }
7743 0 : arg2 = static_cast< double >(val2);
7744 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7745 0 : if (!SWIG_IsOK(ecode3)) {
7746 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLAEA" "', argument " "3"" of type '" "double""'");
7747 : }
7748 0 : arg3 = static_cast< double >(val3);
7749 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7750 0 : if (!SWIG_IsOK(ecode4)) {
7751 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLAEA" "', argument " "4"" of type '" "double""'");
7752 : }
7753 0 : arg4 = static_cast< double >(val4);
7754 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7755 0 : if (!SWIG_IsOK(ecode5)) {
7756 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLAEA" "', argument " "5"" of type '" "double""'");
7757 : }
7758 0 : arg5 = static_cast< double >(val5);
7759 : {
7760 0 : if ( bUseExceptions ) {
7761 0 : CPLErrorReset();
7762 : }
7763 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
7764 0 : if ( bUseExceptions ) {
7765 0 : CPLErr eclass = CPLGetLastErrorType();
7766 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7767 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7768 : }
7769 : }
7770 : }
7771 : {
7772 : /* %typemap(out) OGRErr */
7773 0 : if ( result != 0 && bUseExceptions) {
7774 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7775 0 : SWIG_fail;
7776 : }
7777 : }
7778 : {
7779 : /* %typemap(ret) OGRErr */
7780 0 : if (resultobj == Py_None ) {
7781 0 : Py_DECREF(resultobj);
7782 0 : resultobj = 0;
7783 : }
7784 0 : if (resultobj == 0) {
7785 0 : resultobj = PyInt_FromLong( result );
7786 : }
7787 : }
7788 0 : return resultobj;
7789 : fail:
7790 0 : return NULL;
7791 : }
7792 :
7793 :
7794 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7795 0 : PyObject *resultobj = 0;
7796 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7797 : double arg2 ;
7798 : double arg3 ;
7799 : double arg4 ;
7800 : double arg5 ;
7801 : double arg6 ;
7802 : double arg7 ;
7803 0 : void *argp1 = 0 ;
7804 0 : int res1 = 0 ;
7805 : double val2 ;
7806 0 : int ecode2 = 0 ;
7807 : double val3 ;
7808 0 : int ecode3 = 0 ;
7809 : double val4 ;
7810 0 : int ecode4 = 0 ;
7811 : double val5 ;
7812 0 : int ecode5 = 0 ;
7813 : double val6 ;
7814 0 : int ecode6 = 0 ;
7815 : double val7 ;
7816 0 : int ecode7 = 0 ;
7817 0 : PyObject * obj0 = 0 ;
7818 0 : PyObject * obj1 = 0 ;
7819 0 : PyObject * obj2 = 0 ;
7820 0 : PyObject * obj3 = 0 ;
7821 0 : PyObject * obj4 = 0 ;
7822 0 : PyObject * obj5 = 0 ;
7823 0 : PyObject * obj6 = 0 ;
7824 : char * kwnames[] = {
7825 : (char *) "self",(char *) "stdp1",(char *) "stdp2",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
7826 0 : };
7827 : OGRErr result;
7828 :
7829 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetLCC",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
7830 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7831 0 : if (!SWIG_IsOK(res1)) {
7832 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7833 : }
7834 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7835 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7836 0 : if (!SWIG_IsOK(ecode2)) {
7837 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC" "', argument " "2"" of type '" "double""'");
7838 : }
7839 0 : arg2 = static_cast< double >(val2);
7840 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7841 0 : if (!SWIG_IsOK(ecode3)) {
7842 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC" "', argument " "3"" of type '" "double""'");
7843 : }
7844 0 : arg3 = static_cast< double >(val3);
7845 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7846 0 : if (!SWIG_IsOK(ecode4)) {
7847 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC" "', argument " "4"" of type '" "double""'");
7848 : }
7849 0 : arg4 = static_cast< double >(val4);
7850 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7851 0 : if (!SWIG_IsOK(ecode5)) {
7852 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC" "', argument " "5"" of type '" "double""'");
7853 : }
7854 0 : arg5 = static_cast< double >(val5);
7855 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7856 0 : if (!SWIG_IsOK(ecode6)) {
7857 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC" "', argument " "6"" of type '" "double""'");
7858 : }
7859 0 : arg6 = static_cast< double >(val6);
7860 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
7861 0 : if (!SWIG_IsOK(ecode7)) {
7862 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCC" "', argument " "7"" of type '" "double""'");
7863 : }
7864 0 : arg7 = static_cast< double >(val7);
7865 : {
7866 0 : if ( bUseExceptions ) {
7867 0 : CPLErrorReset();
7868 : }
7869 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
7870 0 : if ( bUseExceptions ) {
7871 0 : CPLErr eclass = CPLGetLastErrorType();
7872 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7873 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7874 : }
7875 : }
7876 : }
7877 : {
7878 : /* %typemap(out) OGRErr */
7879 0 : if ( result != 0 && bUseExceptions) {
7880 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7881 0 : SWIG_fail;
7882 : }
7883 : }
7884 : {
7885 : /* %typemap(ret) OGRErr */
7886 0 : if (resultobj == Py_None ) {
7887 0 : Py_DECREF(resultobj);
7888 0 : resultobj = 0;
7889 : }
7890 0 : if (resultobj == 0) {
7891 0 : resultobj = PyInt_FromLong( result );
7892 : }
7893 : }
7894 0 : return resultobj;
7895 : fail:
7896 0 : return NULL;
7897 : }
7898 :
7899 :
7900 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC1SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7901 0 : PyObject *resultobj = 0;
7902 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7903 : double arg2 ;
7904 : double arg3 ;
7905 : double arg4 ;
7906 : double arg5 ;
7907 : double arg6 ;
7908 0 : void *argp1 = 0 ;
7909 0 : int res1 = 0 ;
7910 : double val2 ;
7911 0 : int ecode2 = 0 ;
7912 : double val3 ;
7913 0 : int ecode3 = 0 ;
7914 : double val4 ;
7915 0 : int ecode4 = 0 ;
7916 : double val5 ;
7917 0 : int ecode5 = 0 ;
7918 : double val6 ;
7919 0 : int ecode6 = 0 ;
7920 0 : PyObject * obj0 = 0 ;
7921 0 : PyObject * obj1 = 0 ;
7922 0 : PyObject * obj2 = 0 ;
7923 0 : PyObject * obj3 = 0 ;
7924 0 : PyObject * obj4 = 0 ;
7925 0 : PyObject * obj5 = 0 ;
7926 : char * kwnames[] = {
7927 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
7928 0 : };
7929 : OGRErr result;
7930 :
7931 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetLCC1SP",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7932 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7933 0 : if (!SWIG_IsOK(res1)) {
7934 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC1SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7935 : }
7936 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7937 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7938 0 : if (!SWIG_IsOK(ecode2)) {
7939 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC1SP" "', argument " "2"" of type '" "double""'");
7940 : }
7941 0 : arg2 = static_cast< double >(val2);
7942 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7943 0 : if (!SWIG_IsOK(ecode3)) {
7944 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC1SP" "', argument " "3"" of type '" "double""'");
7945 : }
7946 0 : arg3 = static_cast< double >(val3);
7947 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7948 0 : if (!SWIG_IsOK(ecode4)) {
7949 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC1SP" "', argument " "4"" of type '" "double""'");
7950 : }
7951 0 : arg4 = static_cast< double >(val4);
7952 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7953 0 : if (!SWIG_IsOK(ecode5)) {
7954 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC1SP" "', argument " "5"" of type '" "double""'");
7955 : }
7956 0 : arg5 = static_cast< double >(val5);
7957 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7958 0 : if (!SWIG_IsOK(ecode6)) {
7959 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC1SP" "', argument " "6"" of type '" "double""'");
7960 : }
7961 0 : arg6 = static_cast< double >(val6);
7962 : {
7963 0 : if ( bUseExceptions ) {
7964 0 : CPLErrorReset();
7965 : }
7966 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
7967 0 : if ( bUseExceptions ) {
7968 0 : CPLErr eclass = CPLGetLastErrorType();
7969 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7970 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7971 : }
7972 : }
7973 : }
7974 : {
7975 : /* %typemap(out) OGRErr */
7976 0 : if ( result != 0 && bUseExceptions) {
7977 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7978 0 : SWIG_fail;
7979 : }
7980 : }
7981 : {
7982 : /* %typemap(ret) OGRErr */
7983 0 : if (resultobj == Py_None ) {
7984 0 : Py_DECREF(resultobj);
7985 0 : resultobj = 0;
7986 : }
7987 0 : if (resultobj == 0) {
7988 0 : resultobj = PyInt_FromLong( result );
7989 : }
7990 : }
7991 0 : return resultobj;
7992 : fail:
7993 0 : return NULL;
7994 : }
7995 :
7996 :
7997 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCCB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7998 0 : PyObject *resultobj = 0;
7999 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8000 : double arg2 ;
8001 : double arg3 ;
8002 : double arg4 ;
8003 : double arg5 ;
8004 : double arg6 ;
8005 : double arg7 ;
8006 0 : void *argp1 = 0 ;
8007 0 : int res1 = 0 ;
8008 : double val2 ;
8009 0 : int ecode2 = 0 ;
8010 : double val3 ;
8011 0 : int ecode3 = 0 ;
8012 : double val4 ;
8013 0 : int ecode4 = 0 ;
8014 : double val5 ;
8015 0 : int ecode5 = 0 ;
8016 : double val6 ;
8017 0 : int ecode6 = 0 ;
8018 : double val7 ;
8019 0 : int ecode7 = 0 ;
8020 0 : PyObject * obj0 = 0 ;
8021 0 : PyObject * obj1 = 0 ;
8022 0 : PyObject * obj2 = 0 ;
8023 0 : PyObject * obj3 = 0 ;
8024 0 : PyObject * obj4 = 0 ;
8025 0 : PyObject * obj5 = 0 ;
8026 0 : PyObject * obj6 = 0 ;
8027 : char * kwnames[] = {
8028 : (char *) "self",(char *) "stdp1",(char *) "stdp2",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8029 0 : };
8030 : OGRErr result;
8031 :
8032 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetLCCB",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
8033 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8034 0 : if (!SWIG_IsOK(res1)) {
8035 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCCB" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8036 : }
8037 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8038 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8039 0 : if (!SWIG_IsOK(ecode2)) {
8040 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCCB" "', argument " "2"" of type '" "double""'");
8041 : }
8042 0 : arg2 = static_cast< double >(val2);
8043 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8044 0 : if (!SWIG_IsOK(ecode3)) {
8045 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCCB" "', argument " "3"" of type '" "double""'");
8046 : }
8047 0 : arg3 = static_cast< double >(val3);
8048 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8049 0 : if (!SWIG_IsOK(ecode4)) {
8050 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCCB" "', argument " "4"" of type '" "double""'");
8051 : }
8052 0 : arg4 = static_cast< double >(val4);
8053 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8054 0 : if (!SWIG_IsOK(ecode5)) {
8055 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCCB" "', argument " "5"" of type '" "double""'");
8056 : }
8057 0 : arg5 = static_cast< double >(val5);
8058 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8059 0 : if (!SWIG_IsOK(ecode6)) {
8060 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCCB" "', argument " "6"" of type '" "double""'");
8061 : }
8062 0 : arg6 = static_cast< double >(val6);
8063 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
8064 0 : if (!SWIG_IsOK(ecode7)) {
8065 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCCB" "', argument " "7"" of type '" "double""'");
8066 : }
8067 0 : arg7 = static_cast< double >(val7);
8068 : {
8069 0 : if ( bUseExceptions ) {
8070 0 : CPLErrorReset();
8071 : }
8072 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
8073 0 : if ( bUseExceptions ) {
8074 0 : CPLErr eclass = CPLGetLastErrorType();
8075 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8076 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8077 : }
8078 : }
8079 : }
8080 : {
8081 : /* %typemap(out) OGRErr */
8082 0 : if ( result != 0 && bUseExceptions) {
8083 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8084 0 : SWIG_fail;
8085 : }
8086 : }
8087 : {
8088 : /* %typemap(ret) OGRErr */
8089 0 : if (resultobj == Py_None ) {
8090 0 : Py_DECREF(resultobj);
8091 0 : resultobj = 0;
8092 : }
8093 0 : if (resultobj == 0) {
8094 0 : resultobj = PyInt_FromLong( result );
8095 : }
8096 : }
8097 0 : return resultobj;
8098 : fail:
8099 0 : return NULL;
8100 : }
8101 :
8102 :
8103 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8104 0 : PyObject *resultobj = 0;
8105 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8106 : double arg2 ;
8107 : double arg3 ;
8108 : double arg4 ;
8109 : double arg5 ;
8110 0 : void *argp1 = 0 ;
8111 0 : int res1 = 0 ;
8112 : double val2 ;
8113 0 : int ecode2 = 0 ;
8114 : double val3 ;
8115 0 : int ecode3 = 0 ;
8116 : double val4 ;
8117 0 : int ecode4 = 0 ;
8118 : double val5 ;
8119 0 : int ecode5 = 0 ;
8120 0 : PyObject * obj0 = 0 ;
8121 0 : PyObject * obj1 = 0 ;
8122 0 : PyObject * obj2 = 0 ;
8123 0 : PyObject * obj3 = 0 ;
8124 0 : PyObject * obj4 = 0 ;
8125 : char * kwnames[] = {
8126 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8127 0 : };
8128 : OGRErr result;
8129 :
8130 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetMC",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8131 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8132 0 : if (!SWIG_IsOK(res1)) {
8133 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8134 : }
8135 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8136 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8137 0 : if (!SWIG_IsOK(ecode2)) {
8138 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMC" "', argument " "2"" of type '" "double""'");
8139 : }
8140 0 : arg2 = static_cast< double >(val2);
8141 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8142 0 : if (!SWIG_IsOK(ecode3)) {
8143 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMC" "', argument " "3"" of type '" "double""'");
8144 : }
8145 0 : arg3 = static_cast< double >(val3);
8146 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8147 0 : if (!SWIG_IsOK(ecode4)) {
8148 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMC" "', argument " "4"" of type '" "double""'");
8149 : }
8150 0 : arg4 = static_cast< double >(val4);
8151 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8152 0 : if (!SWIG_IsOK(ecode5)) {
8153 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMC" "', argument " "5"" of type '" "double""'");
8154 : }
8155 0 : arg5 = static_cast< double >(val5);
8156 : {
8157 0 : if ( bUseExceptions ) {
8158 0 : CPLErrorReset();
8159 : }
8160 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
8161 0 : if ( bUseExceptions ) {
8162 0 : CPLErr eclass = CPLGetLastErrorType();
8163 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8164 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8165 : }
8166 : }
8167 : }
8168 : {
8169 : /* %typemap(out) OGRErr */
8170 0 : if ( result != 0 && bUseExceptions) {
8171 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8172 0 : SWIG_fail;
8173 : }
8174 : }
8175 : {
8176 : /* %typemap(ret) OGRErr */
8177 0 : if (resultobj == Py_None ) {
8178 0 : Py_DECREF(resultobj);
8179 0 : resultobj = 0;
8180 : }
8181 0 : if (resultobj == 0) {
8182 0 : resultobj = PyInt_FromLong( result );
8183 : }
8184 : }
8185 0 : return resultobj;
8186 : fail:
8187 0 : return NULL;
8188 : }
8189 :
8190 :
8191 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8192 0 : PyObject *resultobj = 0;
8193 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8194 : double arg2 ;
8195 : double arg3 ;
8196 : double arg4 ;
8197 : double arg5 ;
8198 : double arg6 ;
8199 0 : void *argp1 = 0 ;
8200 0 : int res1 = 0 ;
8201 : double val2 ;
8202 0 : int ecode2 = 0 ;
8203 : double val3 ;
8204 0 : int ecode3 = 0 ;
8205 : double val4 ;
8206 0 : int ecode4 = 0 ;
8207 : double val5 ;
8208 0 : int ecode5 = 0 ;
8209 : double val6 ;
8210 0 : int ecode6 = 0 ;
8211 0 : PyObject * obj0 = 0 ;
8212 0 : PyObject * obj1 = 0 ;
8213 0 : PyObject * obj2 = 0 ;
8214 0 : PyObject * obj3 = 0 ;
8215 0 : PyObject * obj4 = 0 ;
8216 0 : PyObject * obj5 = 0 ;
8217 : char * kwnames[] = {
8218 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
8219 0 : };
8220 : OGRErr result;
8221 :
8222 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetMercator",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8223 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8224 0 : if (!SWIG_IsOK(res1)) {
8225 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8226 : }
8227 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8228 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8229 0 : if (!SWIG_IsOK(ecode2)) {
8230 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator" "', argument " "2"" of type '" "double""'");
8231 : }
8232 0 : arg2 = static_cast< double >(val2);
8233 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8234 0 : if (!SWIG_IsOK(ecode3)) {
8235 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator" "', argument " "3"" of type '" "double""'");
8236 : }
8237 0 : arg3 = static_cast< double >(val3);
8238 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8239 0 : if (!SWIG_IsOK(ecode4)) {
8240 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator" "', argument " "4"" of type '" "double""'");
8241 : }
8242 0 : arg4 = static_cast< double >(val4);
8243 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8244 0 : if (!SWIG_IsOK(ecode5)) {
8245 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator" "', argument " "5"" of type '" "double""'");
8246 : }
8247 0 : arg5 = static_cast< double >(val5);
8248 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8249 0 : if (!SWIG_IsOK(ecode6)) {
8250 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator" "', argument " "6"" of type '" "double""'");
8251 : }
8252 0 : arg6 = static_cast< double >(val6);
8253 : {
8254 0 : if ( bUseExceptions ) {
8255 0 : CPLErrorReset();
8256 : }
8257 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
8258 0 : if ( bUseExceptions ) {
8259 0 : CPLErr eclass = CPLGetLastErrorType();
8260 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8261 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8262 : }
8263 : }
8264 : }
8265 : {
8266 : /* %typemap(out) OGRErr */
8267 0 : if ( result != 0 && bUseExceptions) {
8268 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8269 0 : SWIG_fail;
8270 : }
8271 : }
8272 : {
8273 : /* %typemap(ret) OGRErr */
8274 0 : if (resultobj == Py_None ) {
8275 0 : Py_DECREF(resultobj);
8276 0 : resultobj = 0;
8277 : }
8278 0 : if (resultobj == 0) {
8279 0 : resultobj = PyInt_FromLong( result );
8280 : }
8281 : }
8282 0 : return resultobj;
8283 : fail:
8284 0 : return NULL;
8285 : }
8286 :
8287 :
8288 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMollweide(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8289 0 : PyObject *resultobj = 0;
8290 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8291 : double arg2 ;
8292 : double arg3 ;
8293 : double arg4 ;
8294 0 : void *argp1 = 0 ;
8295 0 : int res1 = 0 ;
8296 : double val2 ;
8297 0 : int ecode2 = 0 ;
8298 : double val3 ;
8299 0 : int ecode3 = 0 ;
8300 : double val4 ;
8301 0 : int ecode4 = 0 ;
8302 0 : PyObject * obj0 = 0 ;
8303 0 : PyObject * obj1 = 0 ;
8304 0 : PyObject * obj2 = 0 ;
8305 0 : PyObject * obj3 = 0 ;
8306 : char * kwnames[] = {
8307 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
8308 0 : };
8309 : OGRErr result;
8310 :
8311 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetMollweide",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
8312 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8313 0 : if (!SWIG_IsOK(res1)) {
8314 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMollweide" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8315 : }
8316 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8317 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8318 0 : if (!SWIG_IsOK(ecode2)) {
8319 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMollweide" "', argument " "2"" of type '" "double""'");
8320 : }
8321 0 : arg2 = static_cast< double >(val2);
8322 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8323 0 : if (!SWIG_IsOK(ecode3)) {
8324 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMollweide" "', argument " "3"" of type '" "double""'");
8325 : }
8326 0 : arg3 = static_cast< double >(val3);
8327 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8328 0 : if (!SWIG_IsOK(ecode4)) {
8329 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMollweide" "', argument " "4"" of type '" "double""'");
8330 : }
8331 0 : arg4 = static_cast< double >(val4);
8332 : {
8333 0 : if ( bUseExceptions ) {
8334 0 : CPLErrorReset();
8335 : }
8336 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
8337 0 : if ( bUseExceptions ) {
8338 0 : CPLErr eclass = CPLGetLastErrorType();
8339 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8340 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8341 : }
8342 : }
8343 : }
8344 : {
8345 : /* %typemap(out) OGRErr */
8346 0 : if ( result != 0 && bUseExceptions) {
8347 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8348 0 : SWIG_fail;
8349 : }
8350 : }
8351 : {
8352 : /* %typemap(ret) OGRErr */
8353 0 : if (resultobj == Py_None ) {
8354 0 : Py_DECREF(resultobj);
8355 0 : resultobj = 0;
8356 : }
8357 0 : if (resultobj == 0) {
8358 0 : resultobj = PyInt_FromLong( result );
8359 : }
8360 : }
8361 0 : return resultobj;
8362 : fail:
8363 0 : return NULL;
8364 : }
8365 :
8366 :
8367 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNZMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8368 0 : PyObject *resultobj = 0;
8369 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8370 : double arg2 ;
8371 : double arg3 ;
8372 : double arg4 ;
8373 : double arg5 ;
8374 0 : void *argp1 = 0 ;
8375 0 : int res1 = 0 ;
8376 : double val2 ;
8377 0 : int ecode2 = 0 ;
8378 : double val3 ;
8379 0 : int ecode3 = 0 ;
8380 : double val4 ;
8381 0 : int ecode4 = 0 ;
8382 : double val5 ;
8383 0 : int ecode5 = 0 ;
8384 0 : PyObject * obj0 = 0 ;
8385 0 : PyObject * obj1 = 0 ;
8386 0 : PyObject * obj2 = 0 ;
8387 0 : PyObject * obj3 = 0 ;
8388 0 : PyObject * obj4 = 0 ;
8389 : char * kwnames[] = {
8390 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8391 0 : };
8392 : OGRErr result;
8393 :
8394 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetNZMG",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8395 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8396 0 : if (!SWIG_IsOK(res1)) {
8397 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNZMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8398 : }
8399 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8400 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8401 0 : if (!SWIG_IsOK(ecode2)) {
8402 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetNZMG" "', argument " "2"" of type '" "double""'");
8403 : }
8404 0 : arg2 = static_cast< double >(val2);
8405 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8406 0 : if (!SWIG_IsOK(ecode3)) {
8407 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNZMG" "', argument " "3"" of type '" "double""'");
8408 : }
8409 0 : arg3 = static_cast< double >(val3);
8410 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8411 0 : if (!SWIG_IsOK(ecode4)) {
8412 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetNZMG" "', argument " "4"" of type '" "double""'");
8413 : }
8414 0 : arg4 = static_cast< double >(val4);
8415 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8416 0 : if (!SWIG_IsOK(ecode5)) {
8417 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetNZMG" "', argument " "5"" of type '" "double""'");
8418 : }
8419 0 : arg5 = static_cast< double >(val5);
8420 : {
8421 0 : if ( bUseExceptions ) {
8422 0 : CPLErrorReset();
8423 : }
8424 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
8425 0 : if ( bUseExceptions ) {
8426 0 : CPLErr eclass = CPLGetLastErrorType();
8427 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8428 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8429 : }
8430 : }
8431 : }
8432 : {
8433 : /* %typemap(out) OGRErr */
8434 0 : if ( result != 0 && bUseExceptions) {
8435 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8436 0 : SWIG_fail;
8437 : }
8438 : }
8439 : {
8440 : /* %typemap(ret) OGRErr */
8441 0 : if (resultobj == Py_None ) {
8442 0 : Py_DECREF(resultobj);
8443 0 : resultobj = 0;
8444 : }
8445 0 : if (resultobj == 0) {
8446 0 : resultobj = PyInt_FromLong( result );
8447 : }
8448 : }
8449 0 : return resultobj;
8450 : fail:
8451 0 : return NULL;
8452 : }
8453 :
8454 :
8455 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8456 0 : PyObject *resultobj = 0;
8457 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8458 : double arg2 ;
8459 : double arg3 ;
8460 : double arg4 ;
8461 : double arg5 ;
8462 : double arg6 ;
8463 0 : void *argp1 = 0 ;
8464 0 : int res1 = 0 ;
8465 : double val2 ;
8466 0 : int ecode2 = 0 ;
8467 : double val3 ;
8468 0 : int ecode3 = 0 ;
8469 : double val4 ;
8470 0 : int ecode4 = 0 ;
8471 : double val5 ;
8472 0 : int ecode5 = 0 ;
8473 : double val6 ;
8474 0 : int ecode6 = 0 ;
8475 0 : PyObject * obj0 = 0 ;
8476 0 : PyObject * obj1 = 0 ;
8477 0 : PyObject * obj2 = 0 ;
8478 0 : PyObject * obj3 = 0 ;
8479 0 : PyObject * obj4 = 0 ;
8480 0 : PyObject * obj5 = 0 ;
8481 : char * kwnames[] = {
8482 : (char *) "self",(char *) "dfOriginLat",(char *) "dfCMeridian",(char *) "scale",(char *) "fe",(char *) "fn", NULL
8483 0 : };
8484 : OGRErr result;
8485 :
8486 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetOS",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8487 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8488 0 : if (!SWIG_IsOK(res1)) {
8489 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8490 : }
8491 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8492 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8493 0 : if (!SWIG_IsOK(ecode2)) {
8494 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOS" "', argument " "2"" of type '" "double""'");
8495 : }
8496 0 : arg2 = static_cast< double >(val2);
8497 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8498 0 : if (!SWIG_IsOK(ecode3)) {
8499 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOS" "', argument " "3"" of type '" "double""'");
8500 : }
8501 0 : arg3 = static_cast< double >(val3);
8502 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8503 0 : if (!SWIG_IsOK(ecode4)) {
8504 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOS" "', argument " "4"" of type '" "double""'");
8505 : }
8506 0 : arg4 = static_cast< double >(val4);
8507 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8508 0 : if (!SWIG_IsOK(ecode5)) {
8509 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOS" "', argument " "5"" of type '" "double""'");
8510 : }
8511 0 : arg5 = static_cast< double >(val5);
8512 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8513 0 : if (!SWIG_IsOK(ecode6)) {
8514 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetOS" "', argument " "6"" of type '" "double""'");
8515 : }
8516 0 : arg6 = static_cast< double >(val6);
8517 : {
8518 0 : if ( bUseExceptions ) {
8519 0 : CPLErrorReset();
8520 : }
8521 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
8522 0 : if ( bUseExceptions ) {
8523 0 : CPLErr eclass = CPLGetLastErrorType();
8524 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8525 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8526 : }
8527 : }
8528 : }
8529 : {
8530 : /* %typemap(out) OGRErr */
8531 0 : if ( result != 0 && bUseExceptions) {
8532 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8533 0 : SWIG_fail;
8534 : }
8535 : }
8536 : {
8537 : /* %typemap(ret) OGRErr */
8538 0 : if (resultobj == Py_None ) {
8539 0 : Py_DECREF(resultobj);
8540 0 : resultobj = 0;
8541 : }
8542 0 : if (resultobj == 0) {
8543 0 : resultobj = PyInt_FromLong( result );
8544 : }
8545 : }
8546 0 : return resultobj;
8547 : fail:
8548 0 : return NULL;
8549 : }
8550 :
8551 :
8552 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOrthographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8553 0 : PyObject *resultobj = 0;
8554 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8555 : double arg2 ;
8556 : double arg3 ;
8557 : double arg4 ;
8558 : double arg5 ;
8559 0 : void *argp1 = 0 ;
8560 0 : int res1 = 0 ;
8561 : double val2 ;
8562 0 : int ecode2 = 0 ;
8563 : double val3 ;
8564 0 : int ecode3 = 0 ;
8565 : double val4 ;
8566 0 : int ecode4 = 0 ;
8567 : double val5 ;
8568 0 : int ecode5 = 0 ;
8569 0 : PyObject * obj0 = 0 ;
8570 0 : PyObject * obj1 = 0 ;
8571 0 : PyObject * obj2 = 0 ;
8572 0 : PyObject * obj3 = 0 ;
8573 0 : PyObject * obj4 = 0 ;
8574 : char * kwnames[] = {
8575 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8576 0 : };
8577 : OGRErr result;
8578 :
8579 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetOrthographic",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8580 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8581 0 : if (!SWIG_IsOK(res1)) {
8582 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOrthographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8583 : }
8584 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8585 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8586 0 : if (!SWIG_IsOK(ecode2)) {
8587 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOrthographic" "', argument " "2"" of type '" "double""'");
8588 : }
8589 0 : arg2 = static_cast< double >(val2);
8590 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8591 0 : if (!SWIG_IsOK(ecode3)) {
8592 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOrthographic" "', argument " "3"" of type '" "double""'");
8593 : }
8594 0 : arg3 = static_cast< double >(val3);
8595 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8596 0 : if (!SWIG_IsOK(ecode4)) {
8597 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOrthographic" "', argument " "4"" of type '" "double""'");
8598 : }
8599 0 : arg4 = static_cast< double >(val4);
8600 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8601 0 : if (!SWIG_IsOK(ecode5)) {
8602 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOrthographic" "', argument " "5"" of type '" "double""'");
8603 : }
8604 0 : arg5 = static_cast< double >(val5);
8605 : {
8606 0 : if ( bUseExceptions ) {
8607 0 : CPLErrorReset();
8608 : }
8609 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
8610 0 : if ( bUseExceptions ) {
8611 0 : CPLErr eclass = CPLGetLastErrorType();
8612 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8613 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8614 : }
8615 : }
8616 : }
8617 : {
8618 : /* %typemap(out) OGRErr */
8619 0 : if ( result != 0 && bUseExceptions) {
8620 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8621 0 : SWIG_fail;
8622 : }
8623 : }
8624 : {
8625 : /* %typemap(ret) OGRErr */
8626 0 : if (resultobj == Py_None ) {
8627 0 : Py_DECREF(resultobj);
8628 0 : resultobj = 0;
8629 : }
8630 0 : if (resultobj == 0) {
8631 0 : resultobj = PyInt_FromLong( result );
8632 : }
8633 : }
8634 0 : return resultobj;
8635 : fail:
8636 0 : return NULL;
8637 : }
8638 :
8639 :
8640 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPolyconic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8641 0 : PyObject *resultobj = 0;
8642 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8643 : double arg2 ;
8644 : double arg3 ;
8645 : double arg4 ;
8646 : double arg5 ;
8647 0 : void *argp1 = 0 ;
8648 0 : int res1 = 0 ;
8649 : double val2 ;
8650 0 : int ecode2 = 0 ;
8651 : double val3 ;
8652 0 : int ecode3 = 0 ;
8653 : double val4 ;
8654 0 : int ecode4 = 0 ;
8655 : double val5 ;
8656 0 : int ecode5 = 0 ;
8657 0 : PyObject * obj0 = 0 ;
8658 0 : PyObject * obj1 = 0 ;
8659 0 : PyObject * obj2 = 0 ;
8660 0 : PyObject * obj3 = 0 ;
8661 0 : PyObject * obj4 = 0 ;
8662 : char * kwnames[] = {
8663 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8664 0 : };
8665 : OGRErr result;
8666 :
8667 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetPolyconic",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8668 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8669 0 : if (!SWIG_IsOK(res1)) {
8670 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPolyconic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8671 : }
8672 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8673 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8674 0 : if (!SWIG_IsOK(ecode2)) {
8675 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPolyconic" "', argument " "2"" of type '" "double""'");
8676 : }
8677 0 : arg2 = static_cast< double >(val2);
8678 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8679 0 : if (!SWIG_IsOK(ecode3)) {
8680 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPolyconic" "', argument " "3"" of type '" "double""'");
8681 : }
8682 0 : arg3 = static_cast< double >(val3);
8683 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8684 0 : if (!SWIG_IsOK(ecode4)) {
8685 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPolyconic" "', argument " "4"" of type '" "double""'");
8686 : }
8687 0 : arg4 = static_cast< double >(val4);
8688 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8689 0 : if (!SWIG_IsOK(ecode5)) {
8690 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPolyconic" "', argument " "5"" of type '" "double""'");
8691 : }
8692 0 : arg5 = static_cast< double >(val5);
8693 : {
8694 0 : if ( bUseExceptions ) {
8695 0 : CPLErrorReset();
8696 : }
8697 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
8698 0 : if ( bUseExceptions ) {
8699 0 : CPLErr eclass = CPLGetLastErrorType();
8700 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8701 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8702 : }
8703 : }
8704 : }
8705 : {
8706 : /* %typemap(out) OGRErr */
8707 0 : if ( result != 0 && bUseExceptions) {
8708 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8709 0 : SWIG_fail;
8710 : }
8711 : }
8712 : {
8713 : /* %typemap(ret) OGRErr */
8714 0 : if (resultobj == Py_None ) {
8715 0 : Py_DECREF(resultobj);
8716 0 : resultobj = 0;
8717 : }
8718 0 : if (resultobj == 0) {
8719 0 : resultobj = PyInt_FromLong( result );
8720 : }
8721 : }
8722 0 : return resultobj;
8723 : fail:
8724 0 : return NULL;
8725 : }
8726 :
8727 :
8728 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8729 0 : PyObject *resultobj = 0;
8730 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8731 : double arg2 ;
8732 : double arg3 ;
8733 : double arg4 ;
8734 : double arg5 ;
8735 : double arg6 ;
8736 0 : void *argp1 = 0 ;
8737 0 : int res1 = 0 ;
8738 : double val2 ;
8739 0 : int ecode2 = 0 ;
8740 : double val3 ;
8741 0 : int ecode3 = 0 ;
8742 : double val4 ;
8743 0 : int ecode4 = 0 ;
8744 : double val5 ;
8745 0 : int ecode5 = 0 ;
8746 : double val6 ;
8747 0 : int ecode6 = 0 ;
8748 0 : PyObject * obj0 = 0 ;
8749 0 : PyObject * obj1 = 0 ;
8750 0 : PyObject * obj2 = 0 ;
8751 0 : PyObject * obj3 = 0 ;
8752 0 : PyObject * obj4 = 0 ;
8753 0 : PyObject * obj5 = 0 ;
8754 : char * kwnames[] = {
8755 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
8756 0 : };
8757 : OGRErr result;
8758 :
8759 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetPS",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8760 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8761 0 : if (!SWIG_IsOK(res1)) {
8762 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8763 : }
8764 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8765 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8766 0 : if (!SWIG_IsOK(ecode2)) {
8767 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPS" "', argument " "2"" of type '" "double""'");
8768 : }
8769 0 : arg2 = static_cast< double >(val2);
8770 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8771 0 : if (!SWIG_IsOK(ecode3)) {
8772 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPS" "', argument " "3"" of type '" "double""'");
8773 : }
8774 0 : arg3 = static_cast< double >(val3);
8775 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8776 0 : if (!SWIG_IsOK(ecode4)) {
8777 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPS" "', argument " "4"" of type '" "double""'");
8778 : }
8779 0 : arg4 = static_cast< double >(val4);
8780 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8781 0 : if (!SWIG_IsOK(ecode5)) {
8782 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPS" "', argument " "5"" of type '" "double""'");
8783 : }
8784 0 : arg5 = static_cast< double >(val5);
8785 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8786 0 : if (!SWIG_IsOK(ecode6)) {
8787 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetPS" "', argument " "6"" of type '" "double""'");
8788 : }
8789 0 : arg6 = static_cast< double >(val6);
8790 : {
8791 0 : if ( bUseExceptions ) {
8792 0 : CPLErrorReset();
8793 : }
8794 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
8795 0 : if ( bUseExceptions ) {
8796 0 : CPLErr eclass = CPLGetLastErrorType();
8797 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8798 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8799 : }
8800 : }
8801 : }
8802 : {
8803 : /* %typemap(out) OGRErr */
8804 0 : if ( result != 0 && bUseExceptions) {
8805 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8806 0 : SWIG_fail;
8807 : }
8808 : }
8809 : {
8810 : /* %typemap(ret) OGRErr */
8811 0 : if (resultobj == Py_None ) {
8812 0 : Py_DECREF(resultobj);
8813 0 : resultobj = 0;
8814 : }
8815 0 : if (resultobj == 0) {
8816 0 : resultobj = PyInt_FromLong( result );
8817 : }
8818 : }
8819 0 : return resultobj;
8820 : fail:
8821 0 : return NULL;
8822 : }
8823 :
8824 :
8825 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetRobinson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8826 0 : PyObject *resultobj = 0;
8827 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8828 : double arg2 ;
8829 : double arg3 ;
8830 : double arg4 ;
8831 0 : void *argp1 = 0 ;
8832 0 : int res1 = 0 ;
8833 : double val2 ;
8834 0 : int ecode2 = 0 ;
8835 : double val3 ;
8836 0 : int ecode3 = 0 ;
8837 : double val4 ;
8838 0 : int ecode4 = 0 ;
8839 0 : PyObject * obj0 = 0 ;
8840 0 : PyObject * obj1 = 0 ;
8841 0 : PyObject * obj2 = 0 ;
8842 0 : PyObject * obj3 = 0 ;
8843 : char * kwnames[] = {
8844 : (char *) "self",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8845 0 : };
8846 : OGRErr result;
8847 :
8848 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetRobinson",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
8849 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8850 0 : if (!SWIG_IsOK(res1)) {
8851 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetRobinson" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8852 : }
8853 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8854 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8855 0 : if (!SWIG_IsOK(ecode2)) {
8856 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetRobinson" "', argument " "2"" of type '" "double""'");
8857 : }
8858 0 : arg2 = static_cast< double >(val2);
8859 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8860 0 : if (!SWIG_IsOK(ecode3)) {
8861 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetRobinson" "', argument " "3"" of type '" "double""'");
8862 : }
8863 0 : arg3 = static_cast< double >(val3);
8864 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8865 0 : if (!SWIG_IsOK(ecode4)) {
8866 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetRobinson" "', argument " "4"" of type '" "double""'");
8867 : }
8868 0 : arg4 = static_cast< double >(val4);
8869 : {
8870 0 : if ( bUseExceptions ) {
8871 0 : CPLErrorReset();
8872 : }
8873 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
8874 0 : if ( bUseExceptions ) {
8875 0 : CPLErr eclass = CPLGetLastErrorType();
8876 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8877 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8878 : }
8879 : }
8880 : }
8881 : {
8882 : /* %typemap(out) OGRErr */
8883 0 : if ( result != 0 && bUseExceptions) {
8884 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8885 0 : SWIG_fail;
8886 : }
8887 : }
8888 : {
8889 : /* %typemap(ret) OGRErr */
8890 0 : if (resultobj == Py_None ) {
8891 0 : Py_DECREF(resultobj);
8892 0 : resultobj = 0;
8893 : }
8894 0 : if (resultobj == 0) {
8895 0 : resultobj = PyInt_FromLong( result );
8896 : }
8897 : }
8898 0 : return resultobj;
8899 : fail:
8900 0 : return NULL;
8901 : }
8902 :
8903 :
8904 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSinusoidal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8905 0 : PyObject *resultobj = 0;
8906 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8907 : double arg2 ;
8908 : double arg3 ;
8909 : double arg4 ;
8910 0 : void *argp1 = 0 ;
8911 0 : int res1 = 0 ;
8912 : double val2 ;
8913 0 : int ecode2 = 0 ;
8914 : double val3 ;
8915 0 : int ecode3 = 0 ;
8916 : double val4 ;
8917 0 : int ecode4 = 0 ;
8918 0 : PyObject * obj0 = 0 ;
8919 0 : PyObject * obj1 = 0 ;
8920 0 : PyObject * obj2 = 0 ;
8921 0 : PyObject * obj3 = 0 ;
8922 : char * kwnames[] = {
8923 : (char *) "self",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8924 0 : };
8925 : OGRErr result;
8926 :
8927 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetSinusoidal",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
8928 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8929 0 : if (!SWIG_IsOK(res1)) {
8930 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSinusoidal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8931 : }
8932 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8933 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8934 0 : if (!SWIG_IsOK(ecode2)) {
8935 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSinusoidal" "', argument " "2"" of type '" "double""'");
8936 : }
8937 0 : arg2 = static_cast< double >(val2);
8938 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8939 0 : if (!SWIG_IsOK(ecode3)) {
8940 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSinusoidal" "', argument " "3"" of type '" "double""'");
8941 : }
8942 0 : arg3 = static_cast< double >(val3);
8943 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8944 0 : if (!SWIG_IsOK(ecode4)) {
8945 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSinusoidal" "', argument " "4"" of type '" "double""'");
8946 : }
8947 0 : arg4 = static_cast< double >(val4);
8948 : {
8949 0 : if ( bUseExceptions ) {
8950 0 : CPLErrorReset();
8951 : }
8952 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
8953 0 : if ( bUseExceptions ) {
8954 0 : CPLErr eclass = CPLGetLastErrorType();
8955 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8956 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8957 : }
8958 : }
8959 : }
8960 : {
8961 : /* %typemap(out) OGRErr */
8962 0 : if ( result != 0 && bUseExceptions) {
8963 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8964 0 : SWIG_fail;
8965 : }
8966 : }
8967 : {
8968 : /* %typemap(ret) OGRErr */
8969 0 : if (resultobj == Py_None ) {
8970 0 : Py_DECREF(resultobj);
8971 0 : resultobj = 0;
8972 : }
8973 0 : if (resultobj == 0) {
8974 0 : resultobj = PyInt_FromLong( result );
8975 : }
8976 : }
8977 0 : return resultobj;
8978 : fail:
8979 0 : return NULL;
8980 : }
8981 :
8982 :
8983 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStereographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8984 0 : PyObject *resultobj = 0;
8985 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8986 : double arg2 ;
8987 : double arg3 ;
8988 : double arg4 ;
8989 : double arg5 ;
8990 : double arg6 ;
8991 0 : void *argp1 = 0 ;
8992 0 : int res1 = 0 ;
8993 : double val2 ;
8994 0 : int ecode2 = 0 ;
8995 : double val3 ;
8996 0 : int ecode3 = 0 ;
8997 : double val4 ;
8998 0 : int ecode4 = 0 ;
8999 : double val5 ;
9000 0 : int ecode5 = 0 ;
9001 : double val6 ;
9002 0 : int ecode6 = 0 ;
9003 0 : PyObject * obj0 = 0 ;
9004 0 : PyObject * obj1 = 0 ;
9005 0 : PyObject * obj2 = 0 ;
9006 0 : PyObject * obj3 = 0 ;
9007 0 : PyObject * obj4 = 0 ;
9008 0 : PyObject * obj5 = 0 ;
9009 : char * kwnames[] = {
9010 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
9011 0 : };
9012 : OGRErr result;
9013 :
9014 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetStereographic",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
9015 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9016 0 : if (!SWIG_IsOK(res1)) {
9017 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStereographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9018 : }
9019 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9020 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9021 0 : if (!SWIG_IsOK(ecode2)) {
9022 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStereographic" "', argument " "2"" of type '" "double""'");
9023 : }
9024 0 : arg2 = static_cast< double >(val2);
9025 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9026 0 : if (!SWIG_IsOK(ecode3)) {
9027 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStereographic" "', argument " "3"" of type '" "double""'");
9028 : }
9029 0 : arg3 = static_cast< double >(val3);
9030 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9031 0 : if (!SWIG_IsOK(ecode4)) {
9032 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetStereographic" "', argument " "4"" of type '" "double""'");
9033 : }
9034 0 : arg4 = static_cast< double >(val4);
9035 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9036 0 : if (!SWIG_IsOK(ecode5)) {
9037 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStereographic" "', argument " "5"" of type '" "double""'");
9038 : }
9039 0 : arg5 = static_cast< double >(val5);
9040 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9041 0 : if (!SWIG_IsOK(ecode6)) {
9042 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetStereographic" "', argument " "6"" of type '" "double""'");
9043 : }
9044 0 : arg6 = static_cast< double >(val6);
9045 : {
9046 0 : if ( bUseExceptions ) {
9047 0 : CPLErrorReset();
9048 : }
9049 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
9050 0 : if ( bUseExceptions ) {
9051 0 : CPLErr eclass = CPLGetLastErrorType();
9052 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9053 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9054 : }
9055 : }
9056 : }
9057 : {
9058 : /* %typemap(out) OGRErr */
9059 0 : if ( result != 0 && bUseExceptions) {
9060 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9061 0 : SWIG_fail;
9062 : }
9063 : }
9064 : {
9065 : /* %typemap(ret) OGRErr */
9066 0 : if (resultobj == Py_None ) {
9067 0 : Py_DECREF(resultobj);
9068 0 : resultobj = 0;
9069 : }
9070 0 : if (resultobj == 0) {
9071 0 : resultobj = PyInt_FromLong( result );
9072 : }
9073 : }
9074 0 : return resultobj;
9075 : fail:
9076 0 : return NULL;
9077 : }
9078 :
9079 :
9080 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSOC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9081 0 : PyObject *resultobj = 0;
9082 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9083 : double arg2 ;
9084 : double arg3 ;
9085 : double arg4 ;
9086 : double arg5 ;
9087 0 : void *argp1 = 0 ;
9088 0 : int res1 = 0 ;
9089 : double val2 ;
9090 0 : int ecode2 = 0 ;
9091 : double val3 ;
9092 0 : int ecode3 = 0 ;
9093 : double val4 ;
9094 0 : int ecode4 = 0 ;
9095 : double val5 ;
9096 0 : int ecode5 = 0 ;
9097 0 : PyObject * obj0 = 0 ;
9098 0 : PyObject * obj1 = 0 ;
9099 0 : PyObject * obj2 = 0 ;
9100 0 : PyObject * obj3 = 0 ;
9101 0 : PyObject * obj4 = 0 ;
9102 : char * kwnames[] = {
9103 : (char *) "self",(char *) "latitudeoforigin",(char *) "cm",(char *) "fe",(char *) "fn", NULL
9104 0 : };
9105 : OGRErr result;
9106 :
9107 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetSOC",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
9108 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9109 0 : if (!SWIG_IsOK(res1)) {
9110 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSOC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9111 : }
9112 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9113 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9114 0 : if (!SWIG_IsOK(ecode2)) {
9115 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSOC" "', argument " "2"" of type '" "double""'");
9116 : }
9117 0 : arg2 = static_cast< double >(val2);
9118 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9119 0 : if (!SWIG_IsOK(ecode3)) {
9120 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSOC" "', argument " "3"" of type '" "double""'");
9121 : }
9122 0 : arg3 = static_cast< double >(val3);
9123 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9124 0 : if (!SWIG_IsOK(ecode4)) {
9125 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSOC" "', argument " "4"" of type '" "double""'");
9126 : }
9127 0 : arg4 = static_cast< double >(val4);
9128 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9129 0 : if (!SWIG_IsOK(ecode5)) {
9130 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetSOC" "', argument " "5"" of type '" "double""'");
9131 : }
9132 0 : arg5 = static_cast< double >(val5);
9133 : {
9134 0 : if ( bUseExceptions ) {
9135 0 : CPLErrorReset();
9136 : }
9137 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
9138 0 : if ( bUseExceptions ) {
9139 0 : CPLErr eclass = CPLGetLastErrorType();
9140 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9141 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9142 : }
9143 : }
9144 : }
9145 : {
9146 : /* %typemap(out) OGRErr */
9147 0 : if ( result != 0 && bUseExceptions) {
9148 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9149 0 : SWIG_fail;
9150 : }
9151 : }
9152 : {
9153 : /* %typemap(ret) OGRErr */
9154 0 : if (resultobj == Py_None ) {
9155 0 : Py_DECREF(resultobj);
9156 0 : resultobj = 0;
9157 : }
9158 0 : if (resultobj == 0) {
9159 0 : resultobj = PyInt_FromLong( result );
9160 : }
9161 : }
9162 0 : return resultobj;
9163 : fail:
9164 0 : return NULL;
9165 : }
9166 :
9167 :
9168 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9169 0 : PyObject *resultobj = 0;
9170 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9171 : double arg2 ;
9172 : double arg3 ;
9173 : double arg4 ;
9174 : double arg5 ;
9175 : double arg6 ;
9176 0 : void *argp1 = 0 ;
9177 0 : int res1 = 0 ;
9178 : double val2 ;
9179 0 : int ecode2 = 0 ;
9180 : double val3 ;
9181 0 : int ecode3 = 0 ;
9182 : double val4 ;
9183 0 : int ecode4 = 0 ;
9184 : double val5 ;
9185 0 : int ecode5 = 0 ;
9186 : double val6 ;
9187 0 : int ecode6 = 0 ;
9188 0 : PyObject * obj0 = 0 ;
9189 0 : PyObject * obj1 = 0 ;
9190 0 : PyObject * obj2 = 0 ;
9191 0 : PyObject * obj3 = 0 ;
9192 0 : PyObject * obj4 = 0 ;
9193 0 : PyObject * obj5 = 0 ;
9194 : char * kwnames[] = {
9195 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
9196 0 : };
9197 : OGRErr result;
9198 :
9199 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetTM",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
9200 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9201 0 : if (!SWIG_IsOK(res1)) {
9202 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9203 : }
9204 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9205 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9206 0 : if (!SWIG_IsOK(ecode2)) {
9207 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTM" "', argument " "2"" of type '" "double""'");
9208 : }
9209 0 : arg2 = static_cast< double >(val2);
9210 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9211 0 : if (!SWIG_IsOK(ecode3)) {
9212 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTM" "', argument " "3"" of type '" "double""'");
9213 : }
9214 0 : arg3 = static_cast< double >(val3);
9215 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9216 0 : if (!SWIG_IsOK(ecode4)) {
9217 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTM" "', argument " "4"" of type '" "double""'");
9218 : }
9219 0 : arg4 = static_cast< double >(val4);
9220 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9221 0 : if (!SWIG_IsOK(ecode5)) {
9222 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTM" "', argument " "5"" of type '" "double""'");
9223 : }
9224 0 : arg5 = static_cast< double >(val5);
9225 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9226 0 : if (!SWIG_IsOK(ecode6)) {
9227 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTM" "', argument " "6"" of type '" "double""'");
9228 : }
9229 0 : arg6 = static_cast< double >(val6);
9230 : {
9231 0 : if ( bUseExceptions ) {
9232 0 : CPLErrorReset();
9233 : }
9234 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
9235 0 : if ( bUseExceptions ) {
9236 0 : CPLErr eclass = CPLGetLastErrorType();
9237 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9238 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9239 : }
9240 : }
9241 : }
9242 : {
9243 : /* %typemap(out) OGRErr */
9244 0 : if ( result != 0 && bUseExceptions) {
9245 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9246 0 : SWIG_fail;
9247 : }
9248 : }
9249 : {
9250 : /* %typemap(ret) OGRErr */
9251 0 : if (resultobj == Py_None ) {
9252 0 : Py_DECREF(resultobj);
9253 0 : resultobj = 0;
9254 : }
9255 0 : if (resultobj == 0) {
9256 0 : resultobj = PyInt_FromLong( result );
9257 : }
9258 : }
9259 0 : return resultobj;
9260 : fail:
9261 0 : return NULL;
9262 : }
9263 :
9264 :
9265 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMVariant(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9266 0 : PyObject *resultobj = 0;
9267 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9268 0 : char *arg2 = (char *) 0 ;
9269 : double arg3 ;
9270 : double arg4 ;
9271 : double arg5 ;
9272 : double arg6 ;
9273 : double arg7 ;
9274 0 : void *argp1 = 0 ;
9275 0 : int res1 = 0 ;
9276 : int res2 ;
9277 0 : char *buf2 = 0 ;
9278 0 : int alloc2 = 0 ;
9279 : double val3 ;
9280 0 : int ecode3 = 0 ;
9281 : double val4 ;
9282 0 : int ecode4 = 0 ;
9283 : double val5 ;
9284 0 : int ecode5 = 0 ;
9285 : double val6 ;
9286 0 : int ecode6 = 0 ;
9287 : double val7 ;
9288 0 : int ecode7 = 0 ;
9289 0 : PyObject * obj0 = 0 ;
9290 0 : PyObject * obj1 = 0 ;
9291 0 : PyObject * obj2 = 0 ;
9292 0 : PyObject * obj3 = 0 ;
9293 0 : PyObject * obj4 = 0 ;
9294 0 : PyObject * obj5 = 0 ;
9295 0 : PyObject * obj6 = 0 ;
9296 : char * kwnames[] = {
9297 : (char *) "self",(char *) "pszVariantName",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
9298 0 : };
9299 : OGRErr result;
9300 :
9301 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetTMVariant",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
9302 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9303 0 : if (!SWIG_IsOK(res1)) {
9304 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMVariant" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9305 : }
9306 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9307 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9308 0 : if (!SWIG_IsOK(res2)) {
9309 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTMVariant" "', argument " "2"" of type '" "char const *""'");
9310 : }
9311 0 : arg2 = reinterpret_cast< char * >(buf2);
9312 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9313 0 : if (!SWIG_IsOK(ecode3)) {
9314 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMVariant" "', argument " "3"" of type '" "double""'");
9315 : }
9316 0 : arg3 = static_cast< double >(val3);
9317 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9318 0 : if (!SWIG_IsOK(ecode4)) {
9319 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMVariant" "', argument " "4"" of type '" "double""'");
9320 : }
9321 0 : arg4 = static_cast< double >(val4);
9322 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9323 0 : if (!SWIG_IsOK(ecode5)) {
9324 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMVariant" "', argument " "5"" of type '" "double""'");
9325 : }
9326 0 : arg5 = static_cast< double >(val5);
9327 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9328 0 : if (!SWIG_IsOK(ecode6)) {
9329 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMVariant" "', argument " "6"" of type '" "double""'");
9330 : }
9331 0 : arg6 = static_cast< double >(val6);
9332 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9333 0 : if (!SWIG_IsOK(ecode7)) {
9334 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTMVariant" "', argument " "7"" of type '" "double""'");
9335 : }
9336 0 : arg7 = static_cast< double >(val7);
9337 : {
9338 0 : if ( bUseExceptions ) {
9339 0 : CPLErrorReset();
9340 : }
9341 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
9342 0 : if ( bUseExceptions ) {
9343 0 : CPLErr eclass = CPLGetLastErrorType();
9344 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9345 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9346 : }
9347 : }
9348 : }
9349 : {
9350 : /* %typemap(out) OGRErr */
9351 0 : if ( result != 0 && bUseExceptions) {
9352 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9353 0 : SWIG_fail;
9354 : }
9355 : }
9356 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9357 : {
9358 : /* %typemap(ret) OGRErr */
9359 0 : if (resultobj == Py_None ) {
9360 0 : Py_DECREF(resultobj);
9361 0 : resultobj = 0;
9362 : }
9363 0 : if (resultobj == 0) {
9364 0 : resultobj = PyInt_FromLong( result );
9365 : }
9366 : }
9367 0 : return resultobj;
9368 : fail:
9369 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9370 0 : return NULL;
9371 : }
9372 :
9373 :
9374 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9375 0 : PyObject *resultobj = 0;
9376 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9377 : double arg2 ;
9378 : double arg3 ;
9379 : double arg4 ;
9380 : double arg5 ;
9381 0 : void *argp1 = 0 ;
9382 0 : int res1 = 0 ;
9383 : double val2 ;
9384 0 : int ecode2 = 0 ;
9385 : double val3 ;
9386 0 : int ecode3 = 0 ;
9387 : double val4 ;
9388 0 : int ecode4 = 0 ;
9389 : double val5 ;
9390 0 : int ecode5 = 0 ;
9391 0 : PyObject * obj0 = 0 ;
9392 0 : PyObject * obj1 = 0 ;
9393 0 : PyObject * obj2 = 0 ;
9394 0 : PyObject * obj3 = 0 ;
9395 0 : PyObject * obj4 = 0 ;
9396 : char * kwnames[] = {
9397 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
9398 0 : };
9399 : OGRErr result;
9400 :
9401 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetTMG",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
9402 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9403 0 : if (!SWIG_IsOK(res1)) {
9404 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9405 : }
9406 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9407 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9408 0 : if (!SWIG_IsOK(ecode2)) {
9409 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMG" "', argument " "2"" of type '" "double""'");
9410 : }
9411 0 : arg2 = static_cast< double >(val2);
9412 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9413 0 : if (!SWIG_IsOK(ecode3)) {
9414 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMG" "', argument " "3"" of type '" "double""'");
9415 : }
9416 0 : arg3 = static_cast< double >(val3);
9417 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9418 0 : if (!SWIG_IsOK(ecode4)) {
9419 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMG" "', argument " "4"" of type '" "double""'");
9420 : }
9421 0 : arg4 = static_cast< double >(val4);
9422 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9423 0 : if (!SWIG_IsOK(ecode5)) {
9424 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMG" "', argument " "5"" of type '" "double""'");
9425 : }
9426 0 : arg5 = static_cast< double >(val5);
9427 : {
9428 0 : if ( bUseExceptions ) {
9429 0 : CPLErrorReset();
9430 : }
9431 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
9432 0 : if ( bUseExceptions ) {
9433 0 : CPLErr eclass = CPLGetLastErrorType();
9434 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9435 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9436 : }
9437 : }
9438 : }
9439 : {
9440 : /* %typemap(out) OGRErr */
9441 0 : if ( result != 0 && bUseExceptions) {
9442 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9443 0 : SWIG_fail;
9444 : }
9445 : }
9446 : {
9447 : /* %typemap(ret) OGRErr */
9448 0 : if (resultobj == Py_None ) {
9449 0 : Py_DECREF(resultobj);
9450 0 : resultobj = 0;
9451 : }
9452 0 : if (resultobj == 0) {
9453 0 : resultobj = PyInt_FromLong( result );
9454 : }
9455 : }
9456 0 : return resultobj;
9457 : fail:
9458 0 : return NULL;
9459 : }
9460 :
9461 :
9462 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMSO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9463 0 : PyObject *resultobj = 0;
9464 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9465 : double arg2 ;
9466 : double arg3 ;
9467 : double arg4 ;
9468 : double arg5 ;
9469 : double arg6 ;
9470 0 : void *argp1 = 0 ;
9471 0 : int res1 = 0 ;
9472 : double val2 ;
9473 0 : int ecode2 = 0 ;
9474 : double val3 ;
9475 0 : int ecode3 = 0 ;
9476 : double val4 ;
9477 0 : int ecode4 = 0 ;
9478 : double val5 ;
9479 0 : int ecode5 = 0 ;
9480 : double val6 ;
9481 0 : int ecode6 = 0 ;
9482 0 : PyObject * obj0 = 0 ;
9483 0 : PyObject * obj1 = 0 ;
9484 0 : PyObject * obj2 = 0 ;
9485 0 : PyObject * obj3 = 0 ;
9486 0 : PyObject * obj4 = 0 ;
9487 0 : PyObject * obj5 = 0 ;
9488 : char * kwnames[] = {
9489 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
9490 0 : };
9491 : OGRErr result;
9492 :
9493 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetTMSO",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
9494 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9495 0 : if (!SWIG_IsOK(res1)) {
9496 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMSO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9497 : }
9498 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9499 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9500 0 : if (!SWIG_IsOK(ecode2)) {
9501 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMSO" "', argument " "2"" of type '" "double""'");
9502 : }
9503 0 : arg2 = static_cast< double >(val2);
9504 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9505 0 : if (!SWIG_IsOK(ecode3)) {
9506 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMSO" "', argument " "3"" of type '" "double""'");
9507 : }
9508 0 : arg3 = static_cast< double >(val3);
9509 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9510 0 : if (!SWIG_IsOK(ecode4)) {
9511 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMSO" "', argument " "4"" of type '" "double""'");
9512 : }
9513 0 : arg4 = static_cast< double >(val4);
9514 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9515 0 : if (!SWIG_IsOK(ecode5)) {
9516 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMSO" "', argument " "5"" of type '" "double""'");
9517 : }
9518 0 : arg5 = static_cast< double >(val5);
9519 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9520 0 : if (!SWIG_IsOK(ecode6)) {
9521 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMSO" "', argument " "6"" of type '" "double""'");
9522 : }
9523 0 : arg6 = static_cast< double >(val6);
9524 : {
9525 0 : if ( bUseExceptions ) {
9526 0 : CPLErrorReset();
9527 : }
9528 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
9529 0 : if ( bUseExceptions ) {
9530 0 : CPLErr eclass = CPLGetLastErrorType();
9531 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9532 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9533 : }
9534 : }
9535 : }
9536 : {
9537 : /* %typemap(out) OGRErr */
9538 0 : if ( result != 0 && bUseExceptions) {
9539 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9540 0 : SWIG_fail;
9541 : }
9542 : }
9543 : {
9544 : /* %typemap(ret) OGRErr */
9545 0 : if (resultobj == Py_None ) {
9546 0 : Py_DECREF(resultobj);
9547 0 : resultobj = 0;
9548 : }
9549 0 : if (resultobj == 0) {
9550 0 : resultobj = PyInt_FromLong( result );
9551 : }
9552 : }
9553 0 : return resultobj;
9554 : fail:
9555 0 : return NULL;
9556 : }
9557 :
9558 :
9559 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVDG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9560 0 : PyObject *resultobj = 0;
9561 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9562 : double arg2 ;
9563 : double arg3 ;
9564 : double arg4 ;
9565 0 : void *argp1 = 0 ;
9566 0 : int res1 = 0 ;
9567 : double val2 ;
9568 0 : int ecode2 = 0 ;
9569 : double val3 ;
9570 0 : int ecode3 = 0 ;
9571 : double val4 ;
9572 0 : int ecode4 = 0 ;
9573 0 : PyObject * obj0 = 0 ;
9574 0 : PyObject * obj1 = 0 ;
9575 0 : PyObject * obj2 = 0 ;
9576 0 : PyObject * obj3 = 0 ;
9577 : char * kwnames[] = {
9578 : (char *) "self",(char *) "clong",(char *) "fe",(char *) "fn", NULL
9579 0 : };
9580 : OGRErr result;
9581 :
9582 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetVDG",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
9583 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9584 0 : if (!SWIG_IsOK(res1)) {
9585 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVDG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9586 : }
9587 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9588 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9589 0 : if (!SWIG_IsOK(ecode2)) {
9590 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVDG" "', argument " "2"" of type '" "double""'");
9591 : }
9592 0 : arg2 = static_cast< double >(val2);
9593 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9594 0 : if (!SWIG_IsOK(ecode3)) {
9595 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVDG" "', argument " "3"" of type '" "double""'");
9596 : }
9597 0 : arg3 = static_cast< double >(val3);
9598 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9599 0 : if (!SWIG_IsOK(ecode4)) {
9600 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVDG" "', argument " "4"" of type '" "double""'");
9601 : }
9602 0 : arg4 = static_cast< double >(val4);
9603 : {
9604 0 : if ( bUseExceptions ) {
9605 0 : CPLErrorReset();
9606 : }
9607 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
9608 0 : if ( bUseExceptions ) {
9609 0 : CPLErr eclass = CPLGetLastErrorType();
9610 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9611 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9612 : }
9613 : }
9614 : }
9615 : {
9616 : /* %typemap(out) OGRErr */
9617 0 : if ( result != 0 && bUseExceptions) {
9618 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9619 0 : SWIG_fail;
9620 : }
9621 : }
9622 : {
9623 : /* %typemap(ret) OGRErr */
9624 0 : if (resultobj == Py_None ) {
9625 0 : Py_DECREF(resultobj);
9626 0 : resultobj = 0;
9627 : }
9628 0 : if (resultobj == 0) {
9629 0 : resultobj = PyInt_FromLong( result );
9630 : }
9631 : }
9632 0 : return resultobj;
9633 : fail:
9634 0 : return NULL;
9635 : }
9636 :
9637 :
9638 37 : SWIGINTERN PyObject *_wrap_SpatialReference_SetWellKnownGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9639 37 : PyObject *resultobj = 0;
9640 37 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9641 37 : char *arg2 = (char *) 0 ;
9642 37 : void *argp1 = 0 ;
9643 37 : int res1 = 0 ;
9644 : int res2 ;
9645 37 : char *buf2 = 0 ;
9646 37 : int alloc2 = 0 ;
9647 37 : PyObject * obj0 = 0 ;
9648 37 : PyObject * obj1 = 0 ;
9649 : OGRErr result;
9650 :
9651 37 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_SetWellKnownGeogCS",&obj0,&obj1)) SWIG_fail;
9652 37 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9653 37 : if (!SWIG_IsOK(res1)) {
9654 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9655 : }
9656 37 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9657 37 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9658 37 : if (!SWIG_IsOK(res2)) {
9659 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "2"" of type '" "char const *""'");
9660 : }
9661 37 : arg2 = reinterpret_cast< char * >(buf2);
9662 : {
9663 37 : if (!arg2) {
9664 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9665 : }
9666 : }
9667 : {
9668 37 : if ( bUseExceptions ) {
9669 0 : CPLErrorReset();
9670 : }
9671 37 : result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
9672 37 : if ( bUseExceptions ) {
9673 0 : CPLErr eclass = CPLGetLastErrorType();
9674 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9675 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9676 : }
9677 : }
9678 : }
9679 : {
9680 : /* %typemap(out) OGRErr */
9681 37 : if ( result != 0 && bUseExceptions) {
9682 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9683 0 : SWIG_fail;
9684 : }
9685 : }
9686 37 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9687 : {
9688 : /* %typemap(ret) OGRErr */
9689 37 : if (resultobj == Py_None ) {
9690 0 : Py_DECREF(resultobj);
9691 0 : resultobj = 0;
9692 : }
9693 37 : if (resultobj == 0) {
9694 37 : resultobj = PyInt_FromLong( result );
9695 : }
9696 : }
9697 37 : return resultobj;
9698 : fail:
9699 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9700 0 : return NULL;
9701 : }
9702 :
9703 :
9704 232 : SWIGINTERN PyObject *_wrap_SpatialReference_SetFromUserInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9705 232 : PyObject *resultobj = 0;
9706 232 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9707 232 : char *arg2 = (char *) 0 ;
9708 232 : void *argp1 = 0 ;
9709 232 : int res1 = 0 ;
9710 : int res2 ;
9711 232 : char *buf2 = 0 ;
9712 232 : int alloc2 = 0 ;
9713 232 : PyObject * obj0 = 0 ;
9714 232 : PyObject * obj1 = 0 ;
9715 : OGRErr result;
9716 :
9717 232 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_SetFromUserInput",&obj0,&obj1)) SWIG_fail;
9718 232 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9719 232 : if (!SWIG_IsOK(res1)) {
9720 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetFromUserInput" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9721 : }
9722 232 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9723 232 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9724 232 : if (!SWIG_IsOK(res2)) {
9725 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetFromUserInput" "', argument " "2"" of type '" "char const *""'");
9726 : }
9727 232 : arg2 = reinterpret_cast< char * >(buf2);
9728 : {
9729 232 : if (!arg2) {
9730 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9731 : }
9732 : }
9733 : {
9734 232 : if ( bUseExceptions ) {
9735 0 : CPLErrorReset();
9736 : }
9737 232 : result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2);
9738 232 : if ( bUseExceptions ) {
9739 0 : CPLErr eclass = CPLGetLastErrorType();
9740 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9741 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9742 : }
9743 : }
9744 : }
9745 : {
9746 : /* %typemap(out) OGRErr */
9747 232 : if ( result != 0 && bUseExceptions) {
9748 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9749 0 : SWIG_fail;
9750 : }
9751 : }
9752 232 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9753 : {
9754 : /* %typemap(ret) OGRErr */
9755 232 : if (resultobj == Py_None ) {
9756 0 : Py_DECREF(resultobj);
9757 0 : resultobj = 0;
9758 : }
9759 232 : if (resultobj == 0) {
9760 232 : resultobj = PyInt_FromLong( result );
9761 : }
9762 : }
9763 232 : return resultobj;
9764 : fail:
9765 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9766 0 : return NULL;
9767 : }
9768 :
9769 :
9770 0 : SWIGINTERN PyObject *_wrap_SpatialReference_CopyGeogCSFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9771 0 : PyObject *resultobj = 0;
9772 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9773 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
9774 0 : void *argp1 = 0 ;
9775 0 : int res1 = 0 ;
9776 0 : void *argp2 = 0 ;
9777 0 : int res2 = 0 ;
9778 0 : PyObject * obj0 = 0 ;
9779 0 : PyObject * obj1 = 0 ;
9780 : OGRErr result;
9781 :
9782 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_CopyGeogCSFrom",&obj0,&obj1)) SWIG_fail;
9783 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9784 0 : if (!SWIG_IsOK(res1)) {
9785 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9786 : }
9787 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9788 0 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9789 0 : if (!SWIG_IsOK(res2)) {
9790 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
9791 : }
9792 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
9793 : {
9794 0 : if (!arg2) {
9795 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9796 : }
9797 : }
9798 : {
9799 0 : if ( bUseExceptions ) {
9800 0 : CPLErrorReset();
9801 : }
9802 0 : result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
9803 0 : if ( bUseExceptions ) {
9804 0 : CPLErr eclass = CPLGetLastErrorType();
9805 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9806 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9807 : }
9808 : }
9809 : }
9810 : {
9811 : /* %typemap(out) OGRErr */
9812 0 : if ( result != 0 && bUseExceptions) {
9813 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9814 0 : SWIG_fail;
9815 : }
9816 : }
9817 : {
9818 : /* %typemap(ret) OGRErr */
9819 0 : if (resultobj == Py_None ) {
9820 0 : Py_DECREF(resultobj);
9821 0 : resultobj = 0;
9822 : }
9823 0 : if (resultobj == 0) {
9824 0 : resultobj = PyInt_FromLong( result );
9825 : }
9826 : }
9827 0 : return resultobj;
9828 : fail:
9829 0 : return NULL;
9830 : }
9831 :
9832 :
9833 20 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9834 20 : PyObject *resultobj = 0;
9835 20 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9836 : double arg2 ;
9837 : double arg3 ;
9838 : double arg4 ;
9839 20 : double arg5 = (double) 0.0 ;
9840 20 : double arg6 = (double) 0.0 ;
9841 20 : double arg7 = (double) 0.0 ;
9842 20 : double arg8 = (double) 0.0 ;
9843 20 : void *argp1 = 0 ;
9844 20 : int res1 = 0 ;
9845 : double val2 ;
9846 20 : int ecode2 = 0 ;
9847 : double val3 ;
9848 20 : int ecode3 = 0 ;
9849 : double val4 ;
9850 20 : int ecode4 = 0 ;
9851 : double val5 ;
9852 20 : int ecode5 = 0 ;
9853 : double val6 ;
9854 20 : int ecode6 = 0 ;
9855 : double val7 ;
9856 20 : int ecode7 = 0 ;
9857 : double val8 ;
9858 20 : int ecode8 = 0 ;
9859 20 : PyObject * obj0 = 0 ;
9860 20 : PyObject * obj1 = 0 ;
9861 20 : PyObject * obj2 = 0 ;
9862 20 : PyObject * obj3 = 0 ;
9863 20 : PyObject * obj4 = 0 ;
9864 20 : PyObject * obj5 = 0 ;
9865 20 : PyObject * obj6 = 0 ;
9866 20 : PyObject * obj7 = 0 ;
9867 : OGRErr result;
9868 :
9869 20 : if (!PyArg_ParseTuple(args,(char *)"OOOO|OOOO:SpatialReference_SetTOWGS84",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
9870 20 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9871 20 : if (!SWIG_IsOK(res1)) {
9872 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9873 : }
9874 20 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9875 20 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9876 20 : if (!SWIG_IsOK(ecode2)) {
9877 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTOWGS84" "', argument " "2"" of type '" "double""'");
9878 : }
9879 20 : arg2 = static_cast< double >(val2);
9880 20 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9881 20 : if (!SWIG_IsOK(ecode3)) {
9882 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTOWGS84" "', argument " "3"" of type '" "double""'");
9883 : }
9884 20 : arg3 = static_cast< double >(val3);
9885 20 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9886 20 : if (!SWIG_IsOK(ecode4)) {
9887 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTOWGS84" "', argument " "4"" of type '" "double""'");
9888 : }
9889 20 : arg4 = static_cast< double >(val4);
9890 20 : if (obj4) {
9891 19 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9892 19 : if (!SWIG_IsOK(ecode5)) {
9893 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTOWGS84" "', argument " "5"" of type '" "double""'");
9894 : }
9895 19 : arg5 = static_cast< double >(val5);
9896 : }
9897 20 : if (obj5) {
9898 19 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9899 19 : if (!SWIG_IsOK(ecode6)) {
9900 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTOWGS84" "', argument " "6"" of type '" "double""'");
9901 : }
9902 19 : arg6 = static_cast< double >(val6);
9903 : }
9904 20 : if (obj6) {
9905 19 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9906 19 : if (!SWIG_IsOK(ecode7)) {
9907 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTOWGS84" "', argument " "7"" of type '" "double""'");
9908 : }
9909 19 : arg7 = static_cast< double >(val7);
9910 : }
9911 20 : if (obj7) {
9912 19 : ecode8 = SWIG_AsVal_double(obj7, &val8);
9913 19 : if (!SWIG_IsOK(ecode8)) {
9914 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetTOWGS84" "', argument " "8"" of type '" "double""'");
9915 : }
9916 19 : arg8 = static_cast< double >(val8);
9917 : }
9918 : {
9919 20 : if ( bUseExceptions ) {
9920 0 : CPLErrorReset();
9921 : }
9922 20 : result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
9923 20 : if ( bUseExceptions ) {
9924 0 : CPLErr eclass = CPLGetLastErrorType();
9925 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9926 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9927 : }
9928 : }
9929 : }
9930 : {
9931 : /* %typemap(out) OGRErr */
9932 20 : if ( result != 0 && bUseExceptions) {
9933 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9934 0 : SWIG_fail;
9935 : }
9936 : }
9937 : {
9938 : /* %typemap(ret) OGRErr */
9939 20 : if (resultobj == Py_None ) {
9940 0 : Py_DECREF(resultobj);
9941 0 : resultobj = 0;
9942 : }
9943 20 : if (resultobj == 0) {
9944 20 : resultobj = PyInt_FromLong( result );
9945 : }
9946 : }
9947 20 : return resultobj;
9948 : fail:
9949 0 : return NULL;
9950 : }
9951 :
9952 :
9953 2 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9954 2 : PyObject *resultobj = 0;
9955 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9956 : double *arg2 ;
9957 2 : void *argp1 = 0 ;
9958 2 : int res1 = 0 ;
9959 : double argout2[7] ;
9960 2 : PyObject * obj0 = 0 ;
9961 : OGRErr result;
9962 :
9963 : {
9964 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
9965 2 : arg2 = argout2;
9966 : }
9967 2 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetTOWGS84",&obj0)) SWIG_fail;
9968 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9969 2 : if (!SWIG_IsOK(res1)) {
9970 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9971 : }
9972 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9973 : {
9974 2 : if ( bUseExceptions ) {
9975 0 : CPLErrorReset();
9976 : }
9977 2 : result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
9978 2 : if ( bUseExceptions ) {
9979 0 : CPLErr eclass = CPLGetLastErrorType();
9980 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9981 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9982 : }
9983 : }
9984 : }
9985 : {
9986 : /* %typemap(out) OGRErr */
9987 2 : if ( result != 0 && bUseExceptions) {
9988 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9989 0 : SWIG_fail;
9990 : }
9991 : }
9992 : {
9993 : /* %typemap(argout) (double argout[ANY]) */
9994 2 : PyObject *out = CreateTupleFromDoubleArray( arg2, 7 );
9995 2 : resultobj = t_output_helper(resultobj,out);
9996 : }
9997 : {
9998 : /* %typemap(ret) OGRErr */
9999 2 : if (resultobj == Py_None ) {
10000 0 : Py_DECREF(resultobj);
10001 0 : resultobj = 0;
10002 : }
10003 2 : if (resultobj == 0) {
10004 0 : resultobj = PyInt_FromLong( result );
10005 : }
10006 : }
10007 2 : return resultobj;
10008 : fail:
10009 0 : return NULL;
10010 : }
10011 :
10012 :
10013 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLocalCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10014 0 : PyObject *resultobj = 0;
10015 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10016 0 : char *arg2 = (char *) 0 ;
10017 0 : void *argp1 = 0 ;
10018 0 : int res1 = 0 ;
10019 : int res2 ;
10020 0 : char *buf2 = 0 ;
10021 0 : int alloc2 = 0 ;
10022 0 : PyObject * obj0 = 0 ;
10023 0 : PyObject * obj1 = 0 ;
10024 : OGRErr result;
10025 :
10026 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_SetLocalCS",&obj0,&obj1)) SWIG_fail;
10027 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10028 0 : if (!SWIG_IsOK(res1)) {
10029 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLocalCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10030 : }
10031 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10032 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10033 0 : if (!SWIG_IsOK(res2)) {
10034 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLocalCS" "', argument " "2"" of type '" "char const *""'");
10035 : }
10036 0 : arg2 = reinterpret_cast< char * >(buf2);
10037 : {
10038 0 : if ( bUseExceptions ) {
10039 0 : CPLErrorReset();
10040 : }
10041 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
10042 0 : if ( bUseExceptions ) {
10043 0 : CPLErr eclass = CPLGetLastErrorType();
10044 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10045 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10046 : }
10047 : }
10048 : }
10049 : {
10050 : /* %typemap(out) OGRErr */
10051 0 : if ( result != 0 && bUseExceptions) {
10052 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10053 0 : SWIG_fail;
10054 : }
10055 : }
10056 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10057 : {
10058 : /* %typemap(ret) OGRErr */
10059 0 : if (resultobj == Py_None ) {
10060 0 : Py_DECREF(resultobj);
10061 0 : resultobj = 0;
10062 : }
10063 0 : if (resultobj == 0) {
10064 0 : resultobj = PyInt_FromLong( result );
10065 : }
10066 : }
10067 0 : return resultobj;
10068 : fail:
10069 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10070 0 : return NULL;
10071 : }
10072 :
10073 :
10074 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10075 1 : PyObject *resultobj = 0;
10076 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10077 1 : char *arg2 = (char *) 0 ;
10078 1 : char *arg3 = (char *) 0 ;
10079 1 : char *arg4 = (char *) 0 ;
10080 : double arg5 ;
10081 : double arg6 ;
10082 1 : char *arg7 = (char *) "Greenwich" ;
10083 1 : double arg8 = (double) 0.0 ;
10084 1 : char *arg9 = (char *) "degree" ;
10085 1 : double arg10 = (double) 0.0174532925199433 ;
10086 1 : void *argp1 = 0 ;
10087 1 : int res1 = 0 ;
10088 : int res2 ;
10089 1 : char *buf2 = 0 ;
10090 1 : int alloc2 = 0 ;
10091 : int res3 ;
10092 1 : char *buf3 = 0 ;
10093 1 : int alloc3 = 0 ;
10094 : int res4 ;
10095 1 : char *buf4 = 0 ;
10096 1 : int alloc4 = 0 ;
10097 : double val5 ;
10098 1 : int ecode5 = 0 ;
10099 : double val6 ;
10100 1 : int ecode6 = 0 ;
10101 : int res7 ;
10102 1 : char *buf7 = 0 ;
10103 1 : int alloc7 = 0 ;
10104 : double val8 ;
10105 1 : int ecode8 = 0 ;
10106 : int res9 ;
10107 1 : char *buf9 = 0 ;
10108 1 : int alloc9 = 0 ;
10109 : double val10 ;
10110 1 : int ecode10 = 0 ;
10111 1 : PyObject * obj0 = 0 ;
10112 1 : PyObject * obj1 = 0 ;
10113 1 : PyObject * obj2 = 0 ;
10114 1 : PyObject * obj3 = 0 ;
10115 1 : PyObject * obj4 = 0 ;
10116 1 : PyObject * obj5 = 0 ;
10117 1 : PyObject * obj6 = 0 ;
10118 1 : PyObject * obj7 = 0 ;
10119 1 : PyObject * obj8 = 0 ;
10120 1 : PyObject * obj9 = 0 ;
10121 : OGRErr result;
10122 :
10123 1 : if (!PyArg_ParseTuple(args,(char *)"OOOOOO|OOOO:SpatialReference_SetGeogCS",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
10124 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10125 1 : if (!SWIG_IsOK(res1)) {
10126 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10127 : }
10128 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10129 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10130 1 : if (!SWIG_IsOK(res2)) {
10131 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeogCS" "', argument " "2"" of type '" "char const *""'");
10132 : }
10133 1 : arg2 = reinterpret_cast< char * >(buf2);
10134 1 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
10135 1 : if (!SWIG_IsOK(res3)) {
10136 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetGeogCS" "', argument " "3"" of type '" "char const *""'");
10137 : }
10138 1 : arg3 = reinterpret_cast< char * >(buf3);
10139 1 : res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
10140 1 : if (!SWIG_IsOK(res4)) {
10141 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetGeogCS" "', argument " "4"" of type '" "char const *""'");
10142 : }
10143 1 : arg4 = reinterpret_cast< char * >(buf4);
10144 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10145 1 : if (!SWIG_IsOK(ecode5)) {
10146 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGeogCS" "', argument " "5"" of type '" "double""'");
10147 : }
10148 1 : arg5 = static_cast< double >(val5);
10149 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10150 1 : if (!SWIG_IsOK(ecode6)) {
10151 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGeogCS" "', argument " "6"" of type '" "double""'");
10152 : }
10153 1 : arg6 = static_cast< double >(val6);
10154 1 : if (obj6) {
10155 0 : res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
10156 0 : if (!SWIG_IsOK(res7)) {
10157 0 : SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "SpatialReference_SetGeogCS" "', argument " "7"" of type '" "char const *""'");
10158 : }
10159 0 : arg7 = reinterpret_cast< char * >(buf7);
10160 : }
10161 1 : if (obj7) {
10162 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10163 0 : if (!SWIG_IsOK(ecode8)) {
10164 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetGeogCS" "', argument " "8"" of type '" "double""'");
10165 : }
10166 0 : arg8 = static_cast< double >(val8);
10167 : }
10168 1 : if (obj8) {
10169 0 : res9 = SWIG_AsCharPtrAndSize(obj8, &buf9, NULL, &alloc9);
10170 0 : if (!SWIG_IsOK(res9)) {
10171 0 : SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "SpatialReference_SetGeogCS" "', argument " "9"" of type '" "char const *""'");
10172 : }
10173 0 : arg9 = reinterpret_cast< char * >(buf9);
10174 : }
10175 1 : if (obj9) {
10176 0 : ecode10 = SWIG_AsVal_double(obj9, &val10);
10177 0 : if (!SWIG_IsOK(ecode10)) {
10178 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "SpatialReference_SetGeogCS" "', argument " "10"" of type '" "double""'");
10179 : }
10180 0 : arg10 = static_cast< double >(val10);
10181 : }
10182 : {
10183 1 : if ( bUseExceptions ) {
10184 0 : CPLErrorReset();
10185 : }
10186 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);
10187 1 : if ( bUseExceptions ) {
10188 0 : CPLErr eclass = CPLGetLastErrorType();
10189 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10190 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10191 : }
10192 : }
10193 : }
10194 : {
10195 : /* %typemap(out) OGRErr */
10196 1 : if ( result != 0 && bUseExceptions) {
10197 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10198 0 : SWIG_fail;
10199 : }
10200 : }
10201 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10202 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
10203 1 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
10204 1 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
10205 1 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
10206 : {
10207 : /* %typemap(ret) OGRErr */
10208 1 : if (resultobj == Py_None ) {
10209 0 : Py_DECREF(resultobj);
10210 0 : resultobj = 0;
10211 : }
10212 1 : if (resultobj == 0) {
10213 1 : resultobj = PyInt_FromLong( result );
10214 : }
10215 : }
10216 1 : return resultobj;
10217 : fail:
10218 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10219 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
10220 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
10221 0 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
10222 0 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
10223 0 : return NULL;
10224 : }
10225 :
10226 :
10227 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10228 0 : PyObject *resultobj = 0;
10229 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10230 0 : char *arg2 = (char *) "unnamed" ;
10231 0 : void *argp1 = 0 ;
10232 0 : int res1 = 0 ;
10233 : int res2 ;
10234 0 : char *buf2 = 0 ;
10235 0 : int alloc2 = 0 ;
10236 0 : PyObject * obj0 = 0 ;
10237 0 : PyObject * obj1 = 0 ;
10238 : OGRErr result;
10239 :
10240 0 : if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_SetProjCS",&obj0,&obj1)) SWIG_fail;
10241 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10242 0 : if (!SWIG_IsOK(res1)) {
10243 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10244 : }
10245 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10246 0 : if (obj1) {
10247 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10248 0 : if (!SWIG_IsOK(res2)) {
10249 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjCS" "', argument " "2"" of type '" "char const *""'");
10250 : }
10251 0 : arg2 = reinterpret_cast< char * >(buf2);
10252 : }
10253 : {
10254 0 : if (!arg2) {
10255 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10256 : }
10257 : }
10258 : {
10259 0 : if ( bUseExceptions ) {
10260 0 : CPLErrorReset();
10261 : }
10262 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
10263 0 : if ( bUseExceptions ) {
10264 0 : CPLErr eclass = CPLGetLastErrorType();
10265 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10266 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10267 : }
10268 : }
10269 : }
10270 : {
10271 : /* %typemap(out) OGRErr */
10272 0 : if ( result != 0 && bUseExceptions) {
10273 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10274 0 : SWIG_fail;
10275 : }
10276 : }
10277 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10278 : {
10279 : /* %typemap(ret) OGRErr */
10280 0 : if (resultobj == Py_None ) {
10281 0 : Py_DECREF(resultobj);
10282 0 : resultobj = 0;
10283 : }
10284 0 : if (resultobj == 0) {
10285 0 : resultobj = PyInt_FromLong( result );
10286 : }
10287 : }
10288 0 : return resultobj;
10289 : fail:
10290 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10291 0 : return NULL;
10292 : }
10293 :
10294 :
10295 5 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeocCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10296 5 : PyObject *resultobj = 0;
10297 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10298 5 : char *arg2 = (char *) "unnamed" ;
10299 5 : void *argp1 = 0 ;
10300 5 : int res1 = 0 ;
10301 : int res2 ;
10302 5 : char *buf2 = 0 ;
10303 5 : int alloc2 = 0 ;
10304 5 : PyObject * obj0 = 0 ;
10305 5 : PyObject * obj1 = 0 ;
10306 : OGRErr result;
10307 :
10308 5 : if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_SetGeocCS",&obj0,&obj1)) SWIG_fail;
10309 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10310 5 : if (!SWIG_IsOK(res1)) {
10311 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10312 : }
10313 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10314 5 : if (obj1) {
10315 5 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10316 5 : if (!SWIG_IsOK(res2)) {
10317 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeocCS" "', argument " "2"" of type '" "char const *""'");
10318 : }
10319 5 : arg2 = reinterpret_cast< char * >(buf2);
10320 : }
10321 : {
10322 5 : if (!arg2) {
10323 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10324 : }
10325 : }
10326 : {
10327 5 : if ( bUseExceptions ) {
10328 0 : CPLErrorReset();
10329 : }
10330 5 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
10331 5 : if ( bUseExceptions ) {
10332 0 : CPLErr eclass = CPLGetLastErrorType();
10333 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10334 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10335 : }
10336 : }
10337 : }
10338 : {
10339 : /* %typemap(out) OGRErr */
10340 5 : if ( result != 0 && bUseExceptions) {
10341 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10342 0 : SWIG_fail;
10343 : }
10344 : }
10345 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10346 : {
10347 : /* %typemap(ret) OGRErr */
10348 5 : if (resultobj == Py_None ) {
10349 0 : Py_DECREF(resultobj);
10350 0 : resultobj = 0;
10351 : }
10352 5 : if (resultobj == 0) {
10353 5 : resultobj = PyInt_FromLong( result );
10354 : }
10355 : }
10356 5 : return resultobj;
10357 : fail:
10358 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10359 0 : return NULL;
10360 : }
10361 :
10362 :
10363 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10364 0 : PyObject *resultobj = 0;
10365 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10366 0 : char *arg2 = (char *) "unnamed" ;
10367 0 : char *arg3 = (char *) "unnamed" ;
10368 0 : int arg4 = (int) 0 ;
10369 0 : void *argp1 = 0 ;
10370 0 : int res1 = 0 ;
10371 : int res2 ;
10372 0 : char *buf2 = 0 ;
10373 0 : int alloc2 = 0 ;
10374 : int res3 ;
10375 0 : char *buf3 = 0 ;
10376 0 : int alloc3 = 0 ;
10377 : int val4 ;
10378 0 : int ecode4 = 0 ;
10379 0 : PyObject * obj0 = 0 ;
10380 0 : PyObject * obj1 = 0 ;
10381 0 : PyObject * obj2 = 0 ;
10382 0 : PyObject * obj3 = 0 ;
10383 : OGRErr result;
10384 :
10385 0 : if (!PyArg_ParseTuple(args,(char *)"O|OOO:SpatialReference_SetVertCS",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
10386 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10387 0 : if (!SWIG_IsOK(res1)) {
10388 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10389 : }
10390 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10391 0 : if (obj1) {
10392 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10393 0 : if (!SWIG_IsOK(res2)) {
10394 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
10395 : }
10396 0 : arg2 = reinterpret_cast< char * >(buf2);
10397 : }
10398 0 : if (obj2) {
10399 0 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
10400 0 : if (!SWIG_IsOK(res3)) {
10401 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
10402 : }
10403 0 : arg3 = reinterpret_cast< char * >(buf3);
10404 : }
10405 0 : if (obj3) {
10406 0 : ecode4 = SWIG_AsVal_int(obj3, &val4);
10407 0 : if (!SWIG_IsOK(ecode4)) {
10408 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
10409 : }
10410 0 : arg4 = static_cast< int >(val4);
10411 : }
10412 : {
10413 0 : if ( bUseExceptions ) {
10414 0 : CPLErrorReset();
10415 : }
10416 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
10417 0 : if ( bUseExceptions ) {
10418 0 : CPLErr eclass = CPLGetLastErrorType();
10419 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10420 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10421 : }
10422 : }
10423 : }
10424 : {
10425 : /* %typemap(out) OGRErr */
10426 0 : if ( result != 0 && bUseExceptions) {
10427 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10428 0 : SWIG_fail;
10429 : }
10430 : }
10431 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10432 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
10433 : {
10434 : /* %typemap(ret) OGRErr */
10435 0 : if (resultobj == Py_None ) {
10436 0 : Py_DECREF(resultobj);
10437 0 : resultobj = 0;
10438 : }
10439 0 : if (resultobj == 0) {
10440 0 : resultobj = PyInt_FromLong( result );
10441 : }
10442 : }
10443 0 : return resultobj;
10444 : fail:
10445 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10446 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
10447 0 : return NULL;
10448 : }
10449 :
10450 :
10451 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCompoundCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10452 1 : PyObject *resultobj = 0;
10453 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10454 1 : char *arg2 = (char *) 0 ;
10455 1 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
10456 1 : OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
10457 1 : void *argp1 = 0 ;
10458 1 : int res1 = 0 ;
10459 : int res2 ;
10460 1 : char *buf2 = 0 ;
10461 1 : int alloc2 = 0 ;
10462 1 : void *argp3 = 0 ;
10463 1 : int res3 = 0 ;
10464 1 : void *argp4 = 0 ;
10465 1 : int res4 = 0 ;
10466 1 : PyObject * obj0 = 0 ;
10467 1 : PyObject * obj1 = 0 ;
10468 1 : PyObject * obj2 = 0 ;
10469 1 : PyObject * obj3 = 0 ;
10470 : OGRErr result;
10471 :
10472 1 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_SetCompoundCS",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
10473 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10474 1 : if (!SWIG_IsOK(res1)) {
10475 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10476 : }
10477 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10478 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10479 1 : if (!SWIG_IsOK(res2)) {
10480 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetCompoundCS" "', argument " "2"" of type '" "char const *""'");
10481 : }
10482 1 : arg2 = reinterpret_cast< char * >(buf2);
10483 1 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10484 1 : if (!SWIG_IsOK(res3)) {
10485 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
10486 : }
10487 1 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
10488 1 : res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10489 1 : if (!SWIG_IsOK(res4)) {
10490 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'");
10491 : }
10492 1 : arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
10493 : {
10494 1 : if (!arg2) {
10495 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10496 : }
10497 : }
10498 : {
10499 1 : if (!arg3) {
10500 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10501 : }
10502 : }
10503 : {
10504 1 : if (!arg4) {
10505 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10506 : }
10507 : }
10508 : {
10509 1 : if ( bUseExceptions ) {
10510 0 : CPLErrorReset();
10511 : }
10512 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
10513 1 : if ( bUseExceptions ) {
10514 0 : CPLErr eclass = CPLGetLastErrorType();
10515 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10516 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10517 : }
10518 : }
10519 : }
10520 : {
10521 : /* %typemap(out) OGRErr */
10522 1 : if ( result != 0 && bUseExceptions) {
10523 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10524 0 : SWIG_fail;
10525 : }
10526 : }
10527 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10528 : {
10529 : /* %typemap(ret) OGRErr */
10530 1 : if (resultobj == Py_None ) {
10531 0 : Py_DECREF(resultobj);
10532 0 : resultobj = 0;
10533 : }
10534 1 : if (resultobj == 0) {
10535 1 : resultobj = PyInt_FromLong( result );
10536 : }
10537 : }
10538 1 : return resultobj;
10539 : fail:
10540 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10541 0 : return NULL;
10542 : }
10543 :
10544 :
10545 6012 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10546 6012 : PyObject *resultobj = 0;
10547 6012 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10548 6012 : char **arg2 = (char **) 0 ;
10549 6012 : void *argp1 = 0 ;
10550 6012 : int res1 = 0 ;
10551 : char *val2 ;
10552 6012 : PyObject * obj0 = 0 ;
10553 6012 : PyObject * obj1 = 0 ;
10554 : OGRErr result;
10555 :
10556 6012 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromWkt",&obj0,&obj1)) SWIG_fail;
10557 6012 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10558 6012 : if (!SWIG_IsOK(res1)) {
10559 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10560 : }
10561 6012 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10562 : {
10563 : /* %typemap(in) (char **ignorechange) */
10564 6012 : PyArg_Parse( obj1, "s", &val2 );
10565 6012 : arg2 = &val2;
10566 : }
10567 : {
10568 6012 : if ( bUseExceptions ) {
10569 0 : CPLErrorReset();
10570 : }
10571 6012 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
10572 6012 : if ( bUseExceptions ) {
10573 0 : CPLErr eclass = CPLGetLastErrorType();
10574 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10575 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10576 : }
10577 : }
10578 : }
10579 : {
10580 : /* %typemap(out) OGRErr */
10581 6012 : if ( result != 0 && bUseExceptions) {
10582 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10583 0 : SWIG_fail;
10584 : }
10585 : }
10586 : {
10587 : /* %typemap(ret) OGRErr */
10588 6012 : if (resultobj == Py_None ) {
10589 0 : Py_DECREF(resultobj);
10590 0 : resultobj = 0;
10591 : }
10592 6012 : if (resultobj == 0) {
10593 6012 : resultobj = PyInt_FromLong( result );
10594 : }
10595 : }
10596 6012 : return resultobj;
10597 : fail:
10598 0 : return NULL;
10599 : }
10600 :
10601 :
10602 69 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10603 69 : PyObject *resultobj = 0;
10604 69 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10605 69 : char *arg2 = (char *) 0 ;
10606 69 : void *argp1 = 0 ;
10607 69 : int res1 = 0 ;
10608 : int res2 ;
10609 69 : char *buf2 = 0 ;
10610 69 : int alloc2 = 0 ;
10611 69 : PyObject * obj0 = 0 ;
10612 69 : PyObject * obj1 = 0 ;
10613 : OGRErr result;
10614 :
10615 69 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromProj4",&obj0,&obj1)) SWIG_fail;
10616 69 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10617 69 : if (!SWIG_IsOK(res1)) {
10618 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10619 : }
10620 69 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10621 69 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10622 69 : if (!SWIG_IsOK(res2)) {
10623 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromProj4" "', argument " "2"" of type '" "char *""'");
10624 : }
10625 69 : arg2 = reinterpret_cast< char * >(buf2);
10626 : {
10627 69 : if ( bUseExceptions ) {
10628 0 : CPLErrorReset();
10629 : }
10630 69 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
10631 69 : if ( bUseExceptions ) {
10632 0 : CPLErr eclass = CPLGetLastErrorType();
10633 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10634 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10635 : }
10636 : }
10637 : }
10638 : {
10639 : /* %typemap(out) OGRErr */
10640 69 : if ( result != 0 && bUseExceptions) {
10641 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10642 0 : SWIG_fail;
10643 : }
10644 : }
10645 69 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10646 : {
10647 : /* %typemap(ret) OGRErr */
10648 69 : if (resultobj == Py_None ) {
10649 0 : Py_DECREF(resultobj);
10650 0 : resultobj = 0;
10651 : }
10652 69 : if (resultobj == 0) {
10653 69 : resultobj = PyInt_FromLong( result );
10654 : }
10655 : }
10656 69 : return resultobj;
10657 : fail:
10658 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10659 0 : return NULL;
10660 : }
10661 :
10662 :
10663 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10664 2 : PyObject *resultobj = 0;
10665 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10666 2 : char *arg2 = (char *) 0 ;
10667 2 : void *argp1 = 0 ;
10668 2 : int res1 = 0 ;
10669 : int res2 ;
10670 2 : char *buf2 = 0 ;
10671 2 : int alloc2 = 0 ;
10672 2 : PyObject * obj0 = 0 ;
10673 2 : PyObject * obj1 = 0 ;
10674 : OGRErr result;
10675 :
10676 2 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromUrl",&obj0,&obj1)) SWIG_fail;
10677 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10678 2 : if (!SWIG_IsOK(res1)) {
10679 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUrl" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10680 : }
10681 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10682 2 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10683 2 : if (!SWIG_IsOK(res2)) {
10684 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromUrl" "', argument " "2"" of type '" "char *""'");
10685 : }
10686 2 : arg2 = reinterpret_cast< char * >(buf2);
10687 : {
10688 2 : if (!arg2) {
10689 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10690 : }
10691 : }
10692 : {
10693 2 : if ( bUseExceptions ) {
10694 0 : CPLErrorReset();
10695 : }
10696 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
10697 2 : if ( bUseExceptions ) {
10698 0 : CPLErr eclass = CPLGetLastErrorType();
10699 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10700 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10701 : }
10702 : }
10703 : }
10704 : {
10705 : /* %typemap(out) OGRErr */
10706 2 : if ( result != 0 && bUseExceptions) {
10707 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10708 0 : SWIG_fail;
10709 : }
10710 : }
10711 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10712 : {
10713 : /* %typemap(ret) OGRErr */
10714 2 : if (resultobj == Py_None ) {
10715 0 : Py_DECREF(resultobj);
10716 0 : resultobj = 0;
10717 : }
10718 2 : if (resultobj == 0) {
10719 2 : resultobj = PyInt_FromLong( result );
10720 : }
10721 : }
10722 2 : return resultobj;
10723 : fail:
10724 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10725 0 : return NULL;
10726 : }
10727 :
10728 :
10729 5 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10730 5 : PyObject *resultobj = 0;
10731 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10732 5 : char **arg2 = (char **) 0 ;
10733 5 : void *argp1 = 0 ;
10734 5 : int res1 = 0 ;
10735 5 : PyObject * obj0 = 0 ;
10736 5 : PyObject * obj1 = 0 ;
10737 : OGRErr result;
10738 :
10739 5 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromESRI",&obj0,&obj1)) SWIG_fail;
10740 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10741 5 : if (!SWIG_IsOK(res1)) {
10742 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10743 : }
10744 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10745 : {
10746 : /* %typemap(in) char **options */
10747 : /* Check if is a list */
10748 5 : if ( ! PySequence_Check(obj1)) {
10749 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
10750 0 : SWIG_fail;
10751 : }
10752 :
10753 5 : int size = PySequence_Size(obj1);
10754 48 : for (int i = 0; i < size; i++) {
10755 43 : PyObject* pyObj = PySequence_GetItem(obj1,i);
10756 43 : if (PyUnicode_Check(pyObj))
10757 : {
10758 : char *pszStr;
10759 : Py_ssize_t nLen;
10760 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
10761 : #if PY_VERSION_HEX >= 0x03000000
10762 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
10763 : #else
10764 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
10765 : #endif
10766 0 : arg2 = CSLAddString( arg2, pszStr );
10767 0 : Py_XDECREF(pyUTF8Str);
10768 : }
10769 : #if PY_VERSION_HEX >= 0x03000000
10770 : else if (PyBytes_Check(pyObj))
10771 : arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
10772 : #else
10773 43 : else if (PyString_Check(pyObj))
10774 43 : arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
10775 : #endif
10776 : else
10777 : {
10778 0 : Py_DECREF(pyObj);
10779 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
10780 0 : SWIG_fail;
10781 : }
10782 43 : Py_DECREF(pyObj);
10783 : }
10784 : }
10785 : {
10786 5 : if ( bUseExceptions ) {
10787 0 : CPLErrorReset();
10788 : }
10789 5 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
10790 5 : if ( bUseExceptions ) {
10791 0 : CPLErr eclass = CPLGetLastErrorType();
10792 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10793 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10794 : }
10795 : }
10796 : }
10797 : {
10798 : /* %typemap(out) OGRErr */
10799 5 : if ( result != 0 && bUseExceptions) {
10800 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10801 0 : SWIG_fail;
10802 : }
10803 : }
10804 : {
10805 : /* %typemap(freearg) char **options */
10806 5 : CSLDestroy( arg2 );
10807 : }
10808 : {
10809 : /* %typemap(ret) OGRErr */
10810 5 : if (resultobj == Py_None ) {
10811 0 : Py_DECREF(resultobj);
10812 0 : resultobj = 0;
10813 : }
10814 5 : if (resultobj == 0) {
10815 5 : resultobj = PyInt_FromLong( result );
10816 : }
10817 : }
10818 5 : return resultobj;
10819 : fail:
10820 : {
10821 : /* %typemap(freearg) char **options */
10822 0 : CSLDestroy( arg2 );
10823 : }
10824 0 : return NULL;
10825 : }
10826 :
10827 :
10828 8983 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10829 8983 : PyObject *resultobj = 0;
10830 8983 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10831 : int arg2 ;
10832 8983 : void *argp1 = 0 ;
10833 8983 : int res1 = 0 ;
10834 : int val2 ;
10835 8983 : int ecode2 = 0 ;
10836 8983 : PyObject * obj0 = 0 ;
10837 8983 : PyObject * obj1 = 0 ;
10838 : OGRErr result;
10839 :
10840 8983 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromEPSG",&obj0,&obj1)) SWIG_fail;
10841 8983 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10842 8983 : if (!SWIG_IsOK(res1)) {
10843 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10844 : }
10845 8983 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10846 8983 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10847 8983 : if (!SWIG_IsOK(ecode2)) {
10848 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "2"" of type '" "int""'");
10849 : }
10850 8983 : arg2 = static_cast< int >(val2);
10851 : {
10852 8983 : if ( bUseExceptions ) {
10853 0 : CPLErrorReset();
10854 : }
10855 8983 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
10856 8983 : if ( bUseExceptions ) {
10857 0 : CPLErr eclass = CPLGetLastErrorType();
10858 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10859 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10860 : }
10861 : }
10862 : }
10863 : {
10864 : /* %typemap(out) OGRErr */
10865 8983 : if ( result != 0 && bUseExceptions) {
10866 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10867 0 : SWIG_fail;
10868 : }
10869 : }
10870 : {
10871 : /* %typemap(ret) OGRErr */
10872 8983 : if (resultobj == Py_None ) {
10873 0 : Py_DECREF(resultobj);
10874 0 : resultobj = 0;
10875 : }
10876 8983 : if (resultobj == 0) {
10877 8983 : resultobj = PyInt_FromLong( result );
10878 : }
10879 : }
10880 8983 : return resultobj;
10881 : fail:
10882 0 : return NULL;
10883 : }
10884 :
10885 :
10886 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSGA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10887 3 : PyObject *resultobj = 0;
10888 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10889 : int arg2 ;
10890 3 : void *argp1 = 0 ;
10891 3 : int res1 = 0 ;
10892 : int val2 ;
10893 3 : int ecode2 = 0 ;
10894 3 : PyObject * obj0 = 0 ;
10895 3 : PyObject * obj1 = 0 ;
10896 : OGRErr result;
10897 :
10898 3 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromEPSGA",&obj0,&obj1)) SWIG_fail;
10899 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10900 3 : if (!SWIG_IsOK(res1)) {
10901 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10902 : }
10903 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10904 3 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10905 3 : if (!SWIG_IsOK(ecode2)) {
10906 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "2"" of type '" "int""'");
10907 : }
10908 3 : arg2 = static_cast< int >(val2);
10909 : {
10910 3 : if ( bUseExceptions ) {
10911 0 : CPLErrorReset();
10912 : }
10913 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
10914 3 : if ( bUseExceptions ) {
10915 0 : CPLErr eclass = CPLGetLastErrorType();
10916 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10917 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10918 : }
10919 : }
10920 : }
10921 : {
10922 : /* %typemap(out) OGRErr */
10923 3 : if ( result != 0 && bUseExceptions) {
10924 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10925 0 : SWIG_fail;
10926 : }
10927 : }
10928 : {
10929 : /* %typemap(ret) OGRErr */
10930 3 : if (resultobj == Py_None ) {
10931 0 : Py_DECREF(resultobj);
10932 0 : resultobj = 0;
10933 : }
10934 3 : if (resultobj == 0) {
10935 3 : resultobj = PyInt_FromLong( result );
10936 : }
10937 : }
10938 3 : return resultobj;
10939 : fail:
10940 0 : return NULL;
10941 : }
10942 :
10943 :
10944 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10945 7 : PyObject *resultobj = 0;
10946 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10947 7 : char *arg2 = (char *) 0 ;
10948 7 : char *arg3 = (char *) "METRE" ;
10949 7 : double *arg4 = (double *) (double *)0 ;
10950 7 : void *argp1 = 0 ;
10951 7 : int res1 = 0 ;
10952 : int res2 ;
10953 7 : char *buf2 = 0 ;
10954 7 : int alloc2 = 0 ;
10955 : int res3 ;
10956 7 : char *buf3 = 0 ;
10957 7 : int alloc3 = 0 ;
10958 : double argin4[17] ;
10959 7 : PyObject * obj0 = 0 ;
10960 7 : PyObject * obj1 = 0 ;
10961 7 : PyObject * obj2 = 0 ;
10962 7 : PyObject * obj3 = 0 ;
10963 : OGRErr result;
10964 :
10965 7 : if (!PyArg_ParseTuple(args,(char *)"OO|OO:SpatialReference_ImportFromPCI",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
10966 7 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10967 7 : if (!SWIG_IsOK(res1)) {
10968 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10969 : }
10970 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10971 7 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10972 7 : if (!SWIG_IsOK(res2)) {
10973 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromPCI" "', argument " "2"" of type '" "char const *""'");
10974 : }
10975 7 : arg2 = reinterpret_cast< char * >(buf2);
10976 7 : if (obj2) {
10977 7 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
10978 7 : if (!SWIG_IsOK(res3)) {
10979 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromPCI" "', argument " "3"" of type '" "char const *""'");
10980 : }
10981 7 : arg3 = reinterpret_cast< char * >(buf3);
10982 : }
10983 7 : if (obj3) {
10984 : {
10985 : /* %typemap(in) (double argin4[ANY]) */
10986 7 : arg4 = argin4;
10987 7 : if (! PySequence_Check(obj3) ) {
10988 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
10989 0 : SWIG_fail;
10990 : }
10991 7 : int seq_size = PySequence_Size(obj3);
10992 7 : if ( seq_size != 17 ) {
10993 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
10994 0 : SWIG_fail;
10995 : }
10996 126 : for (unsigned int i=0; i<17; i++) {
10997 119 : PyObject *o = PySequence_GetItem(obj3,i);
10998 : double val;
10999 119 : if ( !PyArg_Parse(o, "d", &val ) ) {
11000 0 : PyErr_SetString(PyExc_TypeError, "not a number");
11001 0 : Py_DECREF(o);
11002 : SWIG_fail;
11003 : }
11004 119 : arg4[i] = val;
11005 119 : Py_DECREF(o);
11006 : }
11007 : }
11008 : }
11009 : {
11010 7 : if ( bUseExceptions ) {
11011 0 : CPLErrorReset();
11012 : }
11013 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
11014 7 : if ( bUseExceptions ) {
11015 0 : CPLErr eclass = CPLGetLastErrorType();
11016 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11017 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11018 : }
11019 : }
11020 : }
11021 : {
11022 : /* %typemap(out) OGRErr */
11023 7 : if ( result != 0 && bUseExceptions) {
11024 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11025 0 : SWIG_fail;
11026 : }
11027 : }
11028 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11029 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11030 : {
11031 : /* %typemap(ret) OGRErr */
11032 7 : if (resultobj == Py_None ) {
11033 0 : Py_DECREF(resultobj);
11034 0 : resultobj = 0;
11035 : }
11036 7 : if (resultobj == 0) {
11037 7 : resultobj = PyInt_FromLong( result );
11038 : }
11039 : }
11040 7 : return resultobj;
11041 : fail:
11042 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11043 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11044 0 : return NULL;
11045 : }
11046 :
11047 :
11048 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11049 1 : PyObject *resultobj = 0;
11050 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11051 : long arg2 ;
11052 1 : long arg3 = (long) 0 ;
11053 1 : double *arg4 = (double *) (double *)0 ;
11054 1 : long arg5 = (long) 0 ;
11055 1 : void *argp1 = 0 ;
11056 1 : int res1 = 0 ;
11057 : long val2 ;
11058 1 : int ecode2 = 0 ;
11059 : long val3 ;
11060 1 : int ecode3 = 0 ;
11061 : double argin4[15] ;
11062 : long val5 ;
11063 1 : int ecode5 = 0 ;
11064 1 : PyObject * obj0 = 0 ;
11065 1 : PyObject * obj1 = 0 ;
11066 1 : PyObject * obj2 = 0 ;
11067 1 : PyObject * obj3 = 0 ;
11068 1 : PyObject * obj4 = 0 ;
11069 : OGRErr result;
11070 :
11071 1 : if (!PyArg_ParseTuple(args,(char *)"OO|OOO:SpatialReference_ImportFromUSGS",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
11072 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11073 1 : if (!SWIG_IsOK(res1)) {
11074 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11075 : }
11076 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11077 1 : ecode2 = SWIG_AsVal_long(obj1, &val2);
11078 1 : if (!SWIG_IsOK(ecode2)) {
11079 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "2"" of type '" "long""'");
11080 : }
11081 1 : arg2 = static_cast< long >(val2);
11082 1 : if (obj2) {
11083 1 : ecode3 = SWIG_AsVal_long(obj2, &val3);
11084 1 : if (!SWIG_IsOK(ecode3)) {
11085 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "3"" of type '" "long""'");
11086 : }
11087 1 : arg3 = static_cast< long >(val3);
11088 : }
11089 1 : if (obj3) {
11090 : {
11091 : /* %typemap(in) (double argin4[ANY]) */
11092 1 : arg4 = argin4;
11093 1 : if (! PySequence_Check(obj3) ) {
11094 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
11095 0 : SWIG_fail;
11096 : }
11097 1 : int seq_size = PySequence_Size(obj3);
11098 1 : if ( seq_size != 15 ) {
11099 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
11100 0 : SWIG_fail;
11101 : }
11102 16 : for (unsigned int i=0; i<15; i++) {
11103 15 : PyObject *o = PySequence_GetItem(obj3,i);
11104 : double val;
11105 15 : if ( !PyArg_Parse(o, "d", &val ) ) {
11106 0 : PyErr_SetString(PyExc_TypeError, "not a number");
11107 0 : Py_DECREF(o);
11108 : SWIG_fail;
11109 : }
11110 15 : arg4[i] = val;
11111 15 : Py_DECREF(o);
11112 : }
11113 : }
11114 : }
11115 1 : if (obj4) {
11116 1 : ecode5 = SWIG_AsVal_long(obj4, &val5);
11117 1 : if (!SWIG_IsOK(ecode5)) {
11118 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "5"" of type '" "long""'");
11119 : }
11120 1 : arg5 = static_cast< long >(val5);
11121 : }
11122 : {
11123 1 : if ( bUseExceptions ) {
11124 0 : CPLErrorReset();
11125 : }
11126 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
11127 1 : if ( bUseExceptions ) {
11128 0 : CPLErr eclass = CPLGetLastErrorType();
11129 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11130 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11131 : }
11132 : }
11133 : }
11134 : {
11135 : /* %typemap(out) OGRErr */
11136 1 : if ( result != 0 && bUseExceptions) {
11137 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11138 0 : SWIG_fail;
11139 : }
11140 : }
11141 : {
11142 : /* %typemap(ret) OGRErr */
11143 1 : if (resultobj == Py_None ) {
11144 0 : Py_DECREF(resultobj);
11145 0 : resultobj = 0;
11146 : }
11147 1 : if (resultobj == 0) {
11148 1 : resultobj = PyInt_FromLong( result );
11149 : }
11150 : }
11151 1 : return resultobj;
11152 : fail:
11153 0 : return NULL;
11154 : }
11155 :
11156 :
11157 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11158 1 : PyObject *resultobj = 0;
11159 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11160 1 : char *arg2 = (char *) 0 ;
11161 1 : void *argp1 = 0 ;
11162 1 : int res1 = 0 ;
11163 : int res2 ;
11164 1 : char *buf2 = 0 ;
11165 1 : int alloc2 = 0 ;
11166 1 : PyObject * obj0 = 0 ;
11167 1 : PyObject * obj1 = 0 ;
11168 : OGRErr result;
11169 :
11170 1 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromXML",&obj0,&obj1)) SWIG_fail;
11171 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11172 1 : if (!SWIG_IsOK(res1)) {
11173 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11174 : }
11175 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11176 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11177 1 : if (!SWIG_IsOK(res2)) {
11178 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromXML" "', argument " "2"" of type '" "char const *""'");
11179 : }
11180 1 : arg2 = reinterpret_cast< char * >(buf2);
11181 : {
11182 1 : if ( bUseExceptions ) {
11183 0 : CPLErrorReset();
11184 : }
11185 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
11186 1 : if ( bUseExceptions ) {
11187 0 : CPLErr eclass = CPLGetLastErrorType();
11188 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11189 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11190 : }
11191 : }
11192 : }
11193 : {
11194 : /* %typemap(out) OGRErr */
11195 1 : if ( result != 0 && bUseExceptions) {
11196 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11197 0 : SWIG_fail;
11198 : }
11199 : }
11200 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11201 : {
11202 : /* %typemap(ret) OGRErr */
11203 1 : if (resultobj == Py_None ) {
11204 0 : Py_DECREF(resultobj);
11205 0 : resultobj = 0;
11206 : }
11207 1 : if (resultobj == 0) {
11208 1 : resultobj = PyInt_FromLong( result );
11209 : }
11210 : }
11211 1 : return resultobj;
11212 : fail:
11213 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11214 0 : return NULL;
11215 : }
11216 :
11217 :
11218 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11219 6 : PyObject *resultobj = 0;
11220 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11221 6 : char *arg2 = (char *) 0 ;
11222 6 : char *arg3 = (char *) 0 ;
11223 6 : char *arg4 = (char *) 0 ;
11224 6 : void *argp1 = 0 ;
11225 6 : int res1 = 0 ;
11226 : int res2 ;
11227 6 : char *buf2 = 0 ;
11228 6 : int alloc2 = 0 ;
11229 : int res3 ;
11230 6 : char *buf3 = 0 ;
11231 6 : int alloc3 = 0 ;
11232 : int res4 ;
11233 6 : char *buf4 = 0 ;
11234 6 : int alloc4 = 0 ;
11235 6 : PyObject * obj0 = 0 ;
11236 6 : PyObject * obj1 = 0 ;
11237 6 : PyObject * obj2 = 0 ;
11238 6 : PyObject * obj3 = 0 ;
11239 : OGRErr result;
11240 :
11241 6 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_ImportFromERM",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
11242 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11243 6 : if (!SWIG_IsOK(res1)) {
11244 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11245 : }
11246 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11247 6 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11248 6 : if (!SWIG_IsOK(res2)) {
11249 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
11250 : }
11251 6 : arg2 = reinterpret_cast< char * >(buf2);
11252 6 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
11253 6 : if (!SWIG_IsOK(res3)) {
11254 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
11255 : }
11256 6 : arg3 = reinterpret_cast< char * >(buf3);
11257 6 : res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
11258 6 : if (!SWIG_IsOK(res4)) {
11259 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
11260 : }
11261 6 : arg4 = reinterpret_cast< char * >(buf4);
11262 : {
11263 6 : if (!arg2) {
11264 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11265 : }
11266 : }
11267 : {
11268 6 : if (!arg3) {
11269 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11270 : }
11271 : }
11272 : {
11273 6 : if ( bUseExceptions ) {
11274 0 : CPLErrorReset();
11275 : }
11276 6 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
11277 6 : if ( bUseExceptions ) {
11278 0 : CPLErr eclass = CPLGetLastErrorType();
11279 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11280 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11281 : }
11282 : }
11283 : }
11284 : {
11285 : /* %typemap(out) OGRErr */
11286 6 : if ( result != 0 && bUseExceptions) {
11287 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11288 0 : SWIG_fail;
11289 : }
11290 : }
11291 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11292 6 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11293 6 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
11294 : {
11295 : /* %typemap(ret) OGRErr */
11296 6 : if (resultobj == Py_None ) {
11297 0 : Py_DECREF(resultobj);
11298 0 : resultobj = 0;
11299 : }
11300 6 : if (resultobj == 0) {
11301 6 : resultobj = PyInt_FromLong( result );
11302 : }
11303 : }
11304 6 : return resultobj;
11305 : fail:
11306 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11307 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11308 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
11309 0 : return NULL;
11310 : }
11311 :
11312 :
11313 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11314 1 : PyObject *resultobj = 0;
11315 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11316 1 : char *arg2 = (char *) 0 ;
11317 1 : void *argp1 = 0 ;
11318 1 : int res1 = 0 ;
11319 : int res2 ;
11320 1 : char *buf2 = 0 ;
11321 1 : int alloc2 = 0 ;
11322 1 : PyObject * obj0 = 0 ;
11323 1 : PyObject * obj1 = 0 ;
11324 : OGRErr result;
11325 :
11326 1 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromMICoordSys",&obj0,&obj1)) SWIG_fail;
11327 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11328 1 : if (!SWIG_IsOK(res1)) {
11329 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11330 : }
11331 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11332 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11333 1 : if (!SWIG_IsOK(res2)) {
11334 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "2"" of type '" "char const *""'");
11335 : }
11336 1 : arg2 = reinterpret_cast< char * >(buf2);
11337 : {
11338 1 : if ( bUseExceptions ) {
11339 0 : CPLErrorReset();
11340 : }
11341 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
11342 1 : if ( bUseExceptions ) {
11343 0 : CPLErr eclass = CPLGetLastErrorType();
11344 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11345 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11346 : }
11347 : }
11348 : }
11349 : {
11350 : /* %typemap(out) OGRErr */
11351 1 : if ( result != 0 && bUseExceptions) {
11352 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11353 0 : SWIG_fail;
11354 : }
11355 : }
11356 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11357 : {
11358 : /* %typemap(ret) OGRErr */
11359 1 : if (resultobj == Py_None ) {
11360 0 : Py_DECREF(resultobj);
11361 0 : resultobj = 0;
11362 : }
11363 1 : if (resultobj == 0) {
11364 1 : resultobj = PyInt_FromLong( result );
11365 : }
11366 : }
11367 1 : return resultobj;
11368 : fail:
11369 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11370 0 : return NULL;
11371 : }
11372 :
11373 :
11374 60362 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11375 60362 : PyObject *resultobj = 0;
11376 60362 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11377 60362 : char **arg2 = (char **) 0 ;
11378 60362 : void *argp1 = 0 ;
11379 60362 : int res1 = 0 ;
11380 60362 : char *argout2 = 0 ;
11381 60362 : PyObject * obj0 = 0 ;
11382 : OGRErr result;
11383 :
11384 : {
11385 : /* %typemap(in,numinputs=0) (char **argout2) */
11386 60362 : arg2 = &argout2;
11387 : }
11388 60362 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToWkt",&obj0)) SWIG_fail;
11389 60362 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11390 60362 : if (!SWIG_IsOK(res1)) {
11391 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11392 : }
11393 60362 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11394 : {
11395 60362 : if ( bUseExceptions ) {
11396 0 : CPLErrorReset();
11397 : }
11398 60362 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2);
11399 60362 : if ( bUseExceptions ) {
11400 0 : CPLErr eclass = CPLGetLastErrorType();
11401 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11402 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11403 : }
11404 : }
11405 : }
11406 : {
11407 : /* %typemap(out) OGRErr */
11408 60362 : if ( result != 0 && bUseExceptions) {
11409 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11410 0 : SWIG_fail;
11411 : }
11412 : }
11413 : {
11414 : /* %typemap(argout) (char **argout) */
11415 : PyObject *o;
11416 120724 : if ( arg2 != NULL && *arg2 != NULL) {
11417 60362 : o = GDALPythonObjectFromCStr( *arg2 );
11418 : }
11419 : else {
11420 0 : o = Py_None;
11421 0 : Py_INCREF( o );
11422 : }
11423 60362 : resultobj = t_output_helper(resultobj, o);
11424 : }
11425 : {
11426 : /* %typemap(freearg) (char **argout) */
11427 60362 : if ( *arg2 )
11428 60362 : CPLFree( *arg2 );
11429 : }
11430 : {
11431 : /* %typemap(ret) OGRErr */
11432 60362 : if (resultobj == Py_None ) {
11433 0 : Py_DECREF(resultobj);
11434 0 : resultobj = 0;
11435 : }
11436 60362 : if (resultobj == 0) {
11437 0 : resultobj = PyInt_FromLong( result );
11438 : }
11439 : }
11440 60362 : return resultobj;
11441 : fail:
11442 : {
11443 : /* %typemap(freearg) (char **argout) */
11444 0 : if ( *arg2 )
11445 0 : CPLFree( *arg2 );
11446 : }
11447 0 : return NULL;
11448 : }
11449 :
11450 :
11451 34 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPrettyWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11452 34 : PyObject *resultobj = 0;
11453 34 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11454 34 : char **arg2 = (char **) 0 ;
11455 34 : int arg3 = (int) 0 ;
11456 34 : void *argp1 = 0 ;
11457 34 : int res1 = 0 ;
11458 34 : char *argout2 = 0 ;
11459 : int val3 ;
11460 34 : int ecode3 = 0 ;
11461 34 : PyObject * obj0 = 0 ;
11462 34 : PyObject * obj1 = 0 ;
11463 : OGRErr result;
11464 :
11465 : {
11466 : /* %typemap(in,numinputs=0) (char **argout2) */
11467 34 : arg2 = &argout2;
11468 : }
11469 34 : if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_ExportToPrettyWkt",&obj0,&obj1)) SWIG_fail;
11470 34 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11471 34 : if (!SWIG_IsOK(res1)) {
11472 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11473 : }
11474 34 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11475 34 : if (obj1) {
11476 14 : ecode3 = SWIG_AsVal_int(obj1, &val3);
11477 14 : if (!SWIG_IsOK(ecode3)) {
11478 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "3"" of type '" "int""'");
11479 : }
11480 14 : arg3 = static_cast< int >(val3);
11481 : }
11482 : {
11483 34 : if ( bUseExceptions ) {
11484 0 : CPLErrorReset();
11485 : }
11486 34 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
11487 34 : if ( bUseExceptions ) {
11488 0 : CPLErr eclass = CPLGetLastErrorType();
11489 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11490 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11491 : }
11492 : }
11493 : }
11494 : {
11495 : /* %typemap(out) OGRErr */
11496 34 : if ( result != 0 && bUseExceptions) {
11497 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11498 0 : SWIG_fail;
11499 : }
11500 : }
11501 : {
11502 : /* %typemap(argout) (char **argout) */
11503 : PyObject *o;
11504 68 : if ( arg2 != NULL && *arg2 != NULL) {
11505 34 : o = GDALPythonObjectFromCStr( *arg2 );
11506 : }
11507 : else {
11508 0 : o = Py_None;
11509 0 : Py_INCREF( o );
11510 : }
11511 34 : resultobj = t_output_helper(resultobj, o);
11512 : }
11513 : {
11514 : /* %typemap(freearg) (char **argout) */
11515 34 : if ( *arg2 )
11516 34 : CPLFree( *arg2 );
11517 : }
11518 : {
11519 : /* %typemap(ret) OGRErr */
11520 34 : if (resultobj == Py_None ) {
11521 0 : Py_DECREF(resultobj);
11522 0 : resultobj = 0;
11523 : }
11524 34 : if (resultobj == 0) {
11525 0 : resultobj = PyInt_FromLong( result );
11526 : }
11527 : }
11528 34 : return resultobj;
11529 : fail:
11530 : {
11531 : /* %typemap(freearg) (char **argout) */
11532 0 : if ( *arg2 )
11533 0 : CPLFree( *arg2 );
11534 : }
11535 0 : return NULL;
11536 : }
11537 :
11538 :
11539 103 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11540 103 : PyObject *resultobj = 0;
11541 103 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11542 103 : char **arg2 = (char **) 0 ;
11543 103 : void *argp1 = 0 ;
11544 103 : int res1 = 0 ;
11545 103 : char *argout2 = 0 ;
11546 103 : PyObject * obj0 = 0 ;
11547 : OGRErr result;
11548 :
11549 : {
11550 : /* %typemap(in,numinputs=0) (char **argout2) */
11551 103 : arg2 = &argout2;
11552 : }
11553 103 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToProj4",&obj0)) SWIG_fail;
11554 103 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11555 103 : if (!SWIG_IsOK(res1)) {
11556 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11557 : }
11558 103 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11559 : {
11560 103 : if ( bUseExceptions ) {
11561 0 : CPLErrorReset();
11562 : }
11563 103 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
11564 103 : if ( bUseExceptions ) {
11565 0 : CPLErr eclass = CPLGetLastErrorType();
11566 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11567 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11568 : }
11569 : }
11570 : }
11571 : {
11572 : /* %typemap(out) OGRErr */
11573 103 : if ( result != 0 && bUseExceptions) {
11574 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11575 0 : SWIG_fail;
11576 : }
11577 : }
11578 : {
11579 : /* %typemap(argout) (char **argout) */
11580 : PyObject *o;
11581 206 : if ( arg2 != NULL && *arg2 != NULL) {
11582 103 : o = GDALPythonObjectFromCStr( *arg2 );
11583 : }
11584 : else {
11585 0 : o = Py_None;
11586 0 : Py_INCREF( o );
11587 : }
11588 103 : resultobj = t_output_helper(resultobj, o);
11589 : }
11590 : {
11591 : /* %typemap(freearg) (char **argout) */
11592 103 : if ( *arg2 )
11593 103 : CPLFree( *arg2 );
11594 : }
11595 : {
11596 : /* %typemap(ret) OGRErr */
11597 103 : if (resultobj == Py_None ) {
11598 0 : Py_DECREF(resultobj);
11599 0 : resultobj = 0;
11600 : }
11601 103 : if (resultobj == 0) {
11602 0 : resultobj = PyInt_FromLong( result );
11603 : }
11604 : }
11605 103 : return resultobj;
11606 : fail:
11607 : {
11608 : /* %typemap(freearg) (char **argout) */
11609 0 : if ( *arg2 )
11610 0 : CPLFree( *arg2 );
11611 : }
11612 0 : return NULL;
11613 : }
11614 :
11615 :
11616 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11617 6 : PyObject *resultobj = 0;
11618 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11619 6 : char **arg2 = (char **) 0 ;
11620 6 : char **arg3 = (char **) 0 ;
11621 : double **arg4 ;
11622 6 : void *argp1 = 0 ;
11623 6 : int res1 = 0 ;
11624 6 : char *argout2 = 0 ;
11625 6 : char *argout3 = 0 ;
11626 : double *argout4 ;
11627 6 : PyObject * obj0 = 0 ;
11628 : OGRErr result;
11629 :
11630 : {
11631 : /* %typemap(in,numinputs=0) (char **argout2) */
11632 6 : arg2 = &argout2;
11633 : }
11634 : {
11635 : /* %typemap(in,numinputs=0) (char **argout3) */
11636 6 : arg3 = &argout3;
11637 : }
11638 : {
11639 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
11640 6 : arg4 = &argout4;
11641 : }
11642 6 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToPCI",&obj0)) SWIG_fail;
11643 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11644 6 : if (!SWIG_IsOK(res1)) {
11645 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11646 : }
11647 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11648 : {
11649 6 : if ( bUseExceptions ) {
11650 0 : CPLErrorReset();
11651 : }
11652 6 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
11653 6 : if ( bUseExceptions ) {
11654 0 : CPLErr eclass = CPLGetLastErrorType();
11655 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11656 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11657 : }
11658 : }
11659 : }
11660 : {
11661 : /* %typemap(out) OGRErr */
11662 6 : if ( result != 0 && bUseExceptions) {
11663 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11664 0 : SWIG_fail;
11665 : }
11666 : }
11667 : {
11668 : /* %typemap(argout) (char **argout) */
11669 : PyObject *o;
11670 12 : if ( arg2 != NULL && *arg2 != NULL) {
11671 6 : o = GDALPythonObjectFromCStr( *arg2 );
11672 : }
11673 : else {
11674 0 : o = Py_None;
11675 0 : Py_INCREF( o );
11676 : }
11677 6 : resultobj = t_output_helper(resultobj, o);
11678 : }
11679 : {
11680 : /* %typemap(argout) (char **argout) */
11681 : PyObject *o;
11682 12 : if ( arg3 != NULL && *arg3 != NULL) {
11683 6 : o = GDALPythonObjectFromCStr( *arg3 );
11684 : }
11685 : else {
11686 0 : o = Py_None;
11687 0 : Py_INCREF( o );
11688 : }
11689 6 : resultobj = t_output_helper(resultobj, o);
11690 : }
11691 : {
11692 : /* %typemap(argout) (double *argout[ANY]) */
11693 6 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 17 );
11694 6 : resultobj = t_output_helper(resultobj,out);
11695 : }
11696 : {
11697 : /* %typemap(freearg) (char **argout) */
11698 6 : if ( *arg2 )
11699 6 : CPLFree( *arg2 );
11700 : }
11701 : {
11702 : /* %typemap(freearg) (char **argout) */
11703 6 : if ( *arg3 )
11704 6 : CPLFree( *arg3 );
11705 : }
11706 : {
11707 : /* %typemap(freearg) (double *argout[ANY]) */
11708 6 : CPLFree(*arg4);
11709 : }
11710 : {
11711 : /* %typemap(ret) OGRErr */
11712 6 : if (resultobj == Py_None ) {
11713 0 : Py_DECREF(resultobj);
11714 0 : resultobj = 0;
11715 : }
11716 6 : if (resultobj == 0) {
11717 0 : resultobj = PyInt_FromLong( result );
11718 : }
11719 : }
11720 6 : return resultobj;
11721 : fail:
11722 : {
11723 : /* %typemap(freearg) (char **argout) */
11724 0 : if ( *arg2 )
11725 0 : CPLFree( *arg2 );
11726 : }
11727 : {
11728 : /* %typemap(freearg) (char **argout) */
11729 0 : if ( *arg3 )
11730 0 : CPLFree( *arg3 );
11731 : }
11732 : {
11733 : /* %typemap(freearg) (double *argout[ANY]) */
11734 0 : CPLFree(*arg4);
11735 : }
11736 0 : return NULL;
11737 : }
11738 :
11739 :
11740 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11741 1 : PyObject *resultobj = 0;
11742 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11743 1 : long *arg2 = (long *) 0 ;
11744 1 : long *arg3 = (long *) 0 ;
11745 : double **arg4 ;
11746 1 : long *arg5 = (long *) 0 ;
11747 1 : void *argp1 = 0 ;
11748 1 : int res1 = 0 ;
11749 : long temp2 ;
11750 1 : int res2 = SWIG_TMPOBJ ;
11751 : long temp3 ;
11752 1 : int res3 = SWIG_TMPOBJ ;
11753 : double *argout4 ;
11754 : long temp5 ;
11755 1 : int res5 = SWIG_TMPOBJ ;
11756 1 : PyObject * obj0 = 0 ;
11757 : OGRErr result;
11758 :
11759 1 : arg2 = &temp2;
11760 1 : arg3 = &temp3;
11761 : {
11762 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
11763 1 : arg4 = &argout4;
11764 : }
11765 1 : arg5 = &temp5;
11766 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToUSGS",&obj0)) SWIG_fail;
11767 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11768 1 : if (!SWIG_IsOK(res1)) {
11769 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11770 : }
11771 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11772 : {
11773 1 : if ( bUseExceptions ) {
11774 0 : CPLErrorReset();
11775 : }
11776 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
11777 1 : if ( bUseExceptions ) {
11778 0 : CPLErr eclass = CPLGetLastErrorType();
11779 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11780 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11781 : }
11782 : }
11783 : }
11784 : {
11785 : /* %typemap(out) OGRErr */
11786 1 : if ( result != 0 && bUseExceptions) {
11787 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11788 0 : SWIG_fail;
11789 : }
11790 : }
11791 2 : if (SWIG_IsTmpObj(res2)) {
11792 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg2)));
11793 : } else {
11794 0 : int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
11795 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, new_flags));
11796 : }
11797 2 : if (SWIG_IsTmpObj(res3)) {
11798 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg3)));
11799 : } else {
11800 0 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
11801 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags));
11802 : }
11803 : {
11804 : /* %typemap(argout) (double *argout[ANY]) */
11805 1 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 15 );
11806 1 : resultobj = t_output_helper(resultobj,out);
11807 : }
11808 2 : if (SWIG_IsTmpObj(res5)) {
11809 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg5)));
11810 : } else {
11811 0 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
11812 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags));
11813 : }
11814 : {
11815 : /* %typemap(freearg) (double *argout[ANY]) */
11816 1 : CPLFree(*arg4);
11817 : }
11818 : {
11819 : /* %typemap(ret) OGRErr */
11820 1 : if (resultobj == Py_None ) {
11821 0 : Py_DECREF(resultobj);
11822 0 : resultobj = 0;
11823 : }
11824 1 : if (resultobj == 0) {
11825 0 : resultobj = PyInt_FromLong( result );
11826 : }
11827 : }
11828 1 : return resultobj;
11829 : fail:
11830 : {
11831 : /* %typemap(freearg) (double *argout[ANY]) */
11832 0 : CPLFree(*arg4);
11833 : }
11834 0 : return NULL;
11835 : }
11836 :
11837 :
11838 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11839 1 : PyObject *resultobj = 0;
11840 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11841 1 : char **arg2 = (char **) 0 ;
11842 1 : char *arg3 = (char *) "" ;
11843 1 : void *argp1 = 0 ;
11844 1 : int res1 = 0 ;
11845 1 : char *argout2 = 0 ;
11846 : int res3 ;
11847 1 : char *buf3 = 0 ;
11848 1 : int alloc3 = 0 ;
11849 1 : PyObject * obj0 = 0 ;
11850 1 : PyObject * obj1 = 0 ;
11851 : OGRErr result;
11852 :
11853 : {
11854 : /* %typemap(in,numinputs=0) (char **argout2) */
11855 1 : arg2 = &argout2;
11856 : }
11857 1 : if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_ExportToXML",&obj0,&obj1)) SWIG_fail;
11858 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11859 1 : if (!SWIG_IsOK(res1)) {
11860 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11861 : }
11862 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11863 1 : if (obj1) {
11864 0 : res3 = SWIG_AsCharPtrAndSize(obj1, &buf3, NULL, &alloc3);
11865 0 : if (!SWIG_IsOK(res3)) {
11866 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ExportToXML" "', argument " "3"" of type '" "char const *""'");
11867 : }
11868 0 : arg3 = reinterpret_cast< char * >(buf3);
11869 : }
11870 : {
11871 1 : if ( bUseExceptions ) {
11872 0 : CPLErrorReset();
11873 : }
11874 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
11875 1 : if ( bUseExceptions ) {
11876 0 : CPLErr eclass = CPLGetLastErrorType();
11877 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11878 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11879 : }
11880 : }
11881 : }
11882 : {
11883 : /* %typemap(out) OGRErr */
11884 1 : if ( result != 0 && bUseExceptions) {
11885 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11886 0 : SWIG_fail;
11887 : }
11888 : }
11889 : {
11890 : /* %typemap(argout) (char **argout) */
11891 : PyObject *o;
11892 2 : if ( arg2 != NULL && *arg2 != NULL) {
11893 1 : o = GDALPythonObjectFromCStr( *arg2 );
11894 : }
11895 : else {
11896 0 : o = Py_None;
11897 0 : Py_INCREF( o );
11898 : }
11899 1 : resultobj = t_output_helper(resultobj, o);
11900 : }
11901 : {
11902 : /* %typemap(freearg) (char **argout) */
11903 1 : if ( *arg2 )
11904 1 : CPLFree( *arg2 );
11905 : }
11906 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11907 : {
11908 : /* %typemap(ret) OGRErr */
11909 1 : if (resultobj == Py_None ) {
11910 0 : Py_DECREF(resultobj);
11911 0 : resultobj = 0;
11912 : }
11913 1 : if (resultobj == 0) {
11914 0 : resultobj = PyInt_FromLong( result );
11915 : }
11916 : }
11917 1 : return resultobj;
11918 : fail:
11919 : {
11920 : /* %typemap(freearg) (char **argout) */
11921 0 : if ( *arg2 )
11922 0 : CPLFree( *arg2 );
11923 : }
11924 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11925 0 : return NULL;
11926 : }
11927 :
11928 :
11929 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11930 1 : PyObject *resultobj = 0;
11931 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11932 1 : char **arg2 = (char **) 0 ;
11933 1 : void *argp1 = 0 ;
11934 1 : int res1 = 0 ;
11935 1 : char *argout2 = 0 ;
11936 1 : PyObject * obj0 = 0 ;
11937 : OGRErr result;
11938 :
11939 : {
11940 : /* %typemap(in,numinputs=0) (char **argout2) */
11941 1 : arg2 = &argout2;
11942 : }
11943 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToMICoordSys",&obj0)) SWIG_fail;
11944 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11945 1 : if (!SWIG_IsOK(res1)) {
11946 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11947 : }
11948 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11949 : {
11950 1 : if ( bUseExceptions ) {
11951 0 : CPLErrorReset();
11952 : }
11953 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
11954 1 : if ( bUseExceptions ) {
11955 0 : CPLErr eclass = CPLGetLastErrorType();
11956 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11957 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11958 : }
11959 : }
11960 : }
11961 : {
11962 : /* %typemap(out) OGRErr */
11963 1 : if ( result != 0 && bUseExceptions) {
11964 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11965 0 : SWIG_fail;
11966 : }
11967 : }
11968 : {
11969 : /* %typemap(argout) (char **argout) */
11970 : PyObject *o;
11971 2 : if ( arg2 != NULL && *arg2 != NULL) {
11972 1 : o = GDALPythonObjectFromCStr( *arg2 );
11973 : }
11974 : else {
11975 0 : o = Py_None;
11976 0 : Py_INCREF( o );
11977 : }
11978 1 : resultobj = t_output_helper(resultobj, o);
11979 : }
11980 : {
11981 : /* %typemap(freearg) (char **argout) */
11982 1 : if ( *arg2 )
11983 1 : CPLFree( *arg2 );
11984 : }
11985 : {
11986 : /* %typemap(ret) OGRErr */
11987 1 : if (resultobj == Py_None ) {
11988 0 : Py_DECREF(resultobj);
11989 0 : resultobj = 0;
11990 : }
11991 1 : if (resultobj == 0) {
11992 0 : resultobj = PyInt_FromLong( result );
11993 : }
11994 : }
11995 1 : return resultobj;
11996 : fail:
11997 : {
11998 : /* %typemap(freearg) (char **argout) */
11999 0 : if ( *arg2 )
12000 0 : CPLFree( *arg2 );
12001 : }
12002 0 : return NULL;
12003 : }
12004 :
12005 :
12006 14 : SWIGINTERN PyObject *_wrap_SpatialReference_CloneGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12007 14 : PyObject *resultobj = 0;
12008 14 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12009 14 : void *argp1 = 0 ;
12010 14 : int res1 = 0 ;
12011 14 : PyObject * obj0 = 0 ;
12012 14 : OSRSpatialReferenceShadow *result = 0 ;
12013 :
12014 14 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_CloneGeogCS",&obj0)) SWIG_fail;
12015 14 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12016 14 : if (!SWIG_IsOK(res1)) {
12017 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CloneGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12018 : }
12019 14 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12020 : {
12021 14 : if ( bUseExceptions ) {
12022 0 : CPLErrorReset();
12023 : }
12024 14 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
12025 14 : if ( bUseExceptions ) {
12026 0 : CPLErr eclass = CPLGetLastErrorType();
12027 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12028 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12029 : }
12030 : }
12031 : }
12032 14 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
12033 14 : return resultobj;
12034 : fail:
12035 0 : return NULL;
12036 : }
12037 :
12038 :
12039 28486 : SWIGINTERN PyObject *_wrap_SpatialReference_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12040 28486 : PyObject *resultobj = 0;
12041 28486 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12042 28486 : void *argp1 = 0 ;
12043 28486 : int res1 = 0 ;
12044 28486 : PyObject * obj0 = 0 ;
12045 28486 : OSRSpatialReferenceShadow *result = 0 ;
12046 :
12047 28486 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_Clone",&obj0)) SWIG_fail;
12048 28486 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12049 28486 : if (!SWIG_IsOK(res1)) {
12050 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Clone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12051 : }
12052 28486 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12053 : {
12054 28486 : if ( bUseExceptions ) {
12055 0 : CPLErrorReset();
12056 : }
12057 28486 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
12058 28486 : if ( bUseExceptions ) {
12059 0 : CPLErr eclass = CPLGetLastErrorType();
12060 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12061 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12062 : }
12063 : }
12064 : }
12065 28486 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
12066 28486 : return resultobj;
12067 : fail:
12068 0 : return NULL;
12069 : }
12070 :
12071 :
12072 60 : SWIGINTERN PyObject *_wrap_SpatialReference_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12073 60 : PyObject *resultobj = 0;
12074 60 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12075 60 : void *argp1 = 0 ;
12076 60 : int res1 = 0 ;
12077 60 : PyObject * obj0 = 0 ;
12078 : OGRErr result;
12079 :
12080 60 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_Validate",&obj0)) SWIG_fail;
12081 60 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12082 60 : if (!SWIG_IsOK(res1)) {
12083 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Validate" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12084 : }
12085 60 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12086 : {
12087 60 : if ( bUseExceptions ) {
12088 0 : CPLErrorReset();
12089 : }
12090 60 : result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
12091 60 : if ( bUseExceptions ) {
12092 0 : CPLErr eclass = CPLGetLastErrorType();
12093 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12094 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12095 : }
12096 : }
12097 : }
12098 : {
12099 : /* %typemap(out) OGRErr */
12100 60 : if ( result != 0 && bUseExceptions) {
12101 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12102 0 : SWIG_fail;
12103 : }
12104 : }
12105 : {
12106 : /* %typemap(ret) OGRErr */
12107 60 : if (resultobj == Py_None ) {
12108 0 : Py_DECREF(resultobj);
12109 0 : resultobj = 0;
12110 : }
12111 60 : if (resultobj == 0) {
12112 60 : resultobj = PyInt_FromLong( result );
12113 : }
12114 : }
12115 60 : return resultobj;
12116 : fail:
12117 0 : return NULL;
12118 : }
12119 :
12120 :
12121 16685 : SWIGINTERN PyObject *_wrap_SpatialReference_StripCTParms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12122 16685 : PyObject *resultobj = 0;
12123 16685 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12124 16685 : void *argp1 = 0 ;
12125 16685 : int res1 = 0 ;
12126 16685 : PyObject * obj0 = 0 ;
12127 : OGRErr result;
12128 :
12129 16685 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_StripCTParms",&obj0)) SWIG_fail;
12130 16685 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12131 16685 : if (!SWIG_IsOK(res1)) {
12132 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_StripCTParms" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12133 : }
12134 16685 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12135 : {
12136 16685 : if ( bUseExceptions ) {
12137 0 : CPLErrorReset();
12138 : }
12139 16685 : result = (OGRErr)OSRSpatialReferenceShadow_StripCTParms(arg1);
12140 16685 : if ( bUseExceptions ) {
12141 0 : CPLErr eclass = CPLGetLastErrorType();
12142 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12143 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12144 : }
12145 : }
12146 : }
12147 : {
12148 : /* %typemap(out) OGRErr */
12149 16685 : if ( result != 0 && bUseExceptions) {
12150 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12151 0 : SWIG_fail;
12152 : }
12153 : }
12154 : {
12155 : /* %typemap(ret) OGRErr */
12156 16685 : if (resultobj == Py_None ) {
12157 0 : Py_DECREF(resultobj);
12158 0 : resultobj = 0;
12159 : }
12160 16685 : if (resultobj == 0) {
12161 16685 : resultobj = PyInt_FromLong( result );
12162 : }
12163 : }
12164 16685 : return resultobj;
12165 : fail:
12166 0 : return NULL;
12167 : }
12168 :
12169 :
12170 0 : SWIGINTERN PyObject *_wrap_SpatialReference_FixupOrdering(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12171 0 : PyObject *resultobj = 0;
12172 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12173 0 : void *argp1 = 0 ;
12174 0 : int res1 = 0 ;
12175 0 : PyObject * obj0 = 0 ;
12176 : OGRErr result;
12177 :
12178 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_FixupOrdering",&obj0)) SWIG_fail;
12179 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12180 0 : if (!SWIG_IsOK(res1)) {
12181 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_FixupOrdering" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12182 : }
12183 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12184 : {
12185 0 : if ( bUseExceptions ) {
12186 0 : CPLErrorReset();
12187 : }
12188 0 : result = (OGRErr)OSRSpatialReferenceShadow_FixupOrdering(arg1);
12189 0 : if ( bUseExceptions ) {
12190 0 : CPLErr eclass = CPLGetLastErrorType();
12191 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12192 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12193 : }
12194 : }
12195 : }
12196 : {
12197 : /* %typemap(out) OGRErr */
12198 0 : if ( result != 0 && bUseExceptions) {
12199 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12200 0 : SWIG_fail;
12201 : }
12202 : }
12203 : {
12204 : /* %typemap(ret) OGRErr */
12205 0 : if (resultobj == Py_None ) {
12206 0 : Py_DECREF(resultobj);
12207 0 : resultobj = 0;
12208 : }
12209 0 : if (resultobj == 0) {
12210 0 : resultobj = PyInt_FromLong( result );
12211 : }
12212 : }
12213 0 : return resultobj;
12214 : fail:
12215 0 : return NULL;
12216 : }
12217 :
12218 :
12219 1 : SWIGINTERN PyObject *_wrap_SpatialReference_Fixup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12220 1 : PyObject *resultobj = 0;
12221 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12222 1 : void *argp1 = 0 ;
12223 1 : int res1 = 0 ;
12224 1 : PyObject * obj0 = 0 ;
12225 : OGRErr result;
12226 :
12227 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_Fixup",&obj0)) SWIG_fail;
12228 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12229 1 : if (!SWIG_IsOK(res1)) {
12230 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Fixup" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12231 : }
12232 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12233 : {
12234 1 : if ( bUseExceptions ) {
12235 0 : CPLErrorReset();
12236 : }
12237 1 : result = (OGRErr)OSRSpatialReferenceShadow_Fixup(arg1);
12238 1 : if ( bUseExceptions ) {
12239 0 : CPLErr eclass = CPLGetLastErrorType();
12240 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12241 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12242 : }
12243 : }
12244 : }
12245 : {
12246 : /* %typemap(out) OGRErr */
12247 1 : if ( result != 0 && bUseExceptions) {
12248 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12249 0 : SWIG_fail;
12250 : }
12251 : }
12252 : {
12253 : /* %typemap(ret) OGRErr */
12254 1 : if (resultobj == Py_None ) {
12255 0 : Py_DECREF(resultobj);
12256 0 : resultobj = 0;
12257 : }
12258 1 : if (resultobj == 0) {
12259 1 : resultobj = PyInt_FromLong( result );
12260 : }
12261 : }
12262 1 : return resultobj;
12263 : fail:
12264 0 : return NULL;
12265 : }
12266 :
12267 :
12268 14258 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphToESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12269 14258 : PyObject *resultobj = 0;
12270 14258 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12271 14258 : void *argp1 = 0 ;
12272 14258 : int res1 = 0 ;
12273 14258 : PyObject * obj0 = 0 ;
12274 : OGRErr result;
12275 :
12276 14258 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_MorphToESRI",&obj0)) SWIG_fail;
12277 14258 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12278 14258 : if (!SWIG_IsOK(res1)) {
12279 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphToESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12280 : }
12281 14258 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12282 : {
12283 14258 : if ( bUseExceptions ) {
12284 0 : CPLErrorReset();
12285 : }
12286 14258 : result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
12287 14258 : if ( bUseExceptions ) {
12288 0 : CPLErr eclass = CPLGetLastErrorType();
12289 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12290 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12291 : }
12292 : }
12293 : }
12294 : {
12295 : /* %typemap(out) OGRErr */
12296 14258 : if ( result != 0 && bUseExceptions) {
12297 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12298 0 : SWIG_fail;
12299 : }
12300 : }
12301 : {
12302 : /* %typemap(ret) OGRErr */
12303 14258 : if (resultobj == Py_None ) {
12304 0 : Py_DECREF(resultobj);
12305 0 : resultobj = 0;
12306 : }
12307 14258 : if (resultobj == 0) {
12308 14258 : resultobj = PyInt_FromLong( result );
12309 : }
12310 : }
12311 14258 : return resultobj;
12312 : fail:
12313 0 : return NULL;
12314 : }
12315 :
12316 :
12317 14261 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12318 14261 : PyObject *resultobj = 0;
12319 14261 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12320 14261 : void *argp1 = 0 ;
12321 14261 : int res1 = 0 ;
12322 14261 : PyObject * obj0 = 0 ;
12323 : OGRErr result;
12324 :
12325 14261 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_MorphFromESRI",&obj0)) SWIG_fail;
12326 14261 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12327 14261 : if (!SWIG_IsOK(res1)) {
12328 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12329 : }
12330 14261 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12331 : {
12332 14261 : if ( bUseExceptions ) {
12333 0 : CPLErrorReset();
12334 : }
12335 14261 : result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
12336 14261 : if ( bUseExceptions ) {
12337 0 : CPLErr eclass = CPLGetLastErrorType();
12338 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12339 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12340 : }
12341 : }
12342 : }
12343 : {
12344 : /* %typemap(out) OGRErr */
12345 14261 : if ( result != 0 && bUseExceptions) {
12346 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12347 0 : SWIG_fail;
12348 : }
12349 : }
12350 : {
12351 : /* %typemap(ret) OGRErr */
12352 14261 : if (resultobj == Py_None ) {
12353 0 : Py_DECREF(resultobj);
12354 0 : resultobj = 0;
12355 : }
12356 14261 : if (resultobj == 0) {
12357 14261 : resultobj = PyInt_FromLong( result );
12358 : }
12359 : }
12360 14261 : return resultobj;
12361 : fail:
12362 0 : return NULL;
12363 : }
12364 :
12365 :
12366 4 : SWIGINTERN PyObject *SpatialReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12367 : PyObject *obj;
12368 4 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
12369 4 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_NewClientData(obj));
12370 4 : return SWIG_Py_Void();
12371 : }
12372 :
12373 38 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12374 38 : PyObject *resultobj = 0;
12375 38 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12376 38 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
12377 38 : void *argp1 = 0 ;
12378 38 : int res1 = 0 ;
12379 38 : void *argp2 = 0 ;
12380 38 : int res2 = 0 ;
12381 38 : PyObject * obj0 = 0 ;
12382 38 : PyObject * obj1 = 0 ;
12383 38 : OSRCoordinateTransformationShadow *result = 0 ;
12384 :
12385 38 : if (!PyArg_ParseTuple(args,(char *)"OO:new_CoordinateTransformation",&obj0,&obj1)) SWIG_fail;
12386 38 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12387 38 : if (!SWIG_IsOK(res1)) {
12388 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12389 : }
12390 38 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12391 38 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12392 38 : if (!SWIG_IsOK(res2)) {
12393 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
12394 : }
12395 38 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
12396 : {
12397 38 : if ( bUseExceptions ) {
12398 0 : CPLErrorReset();
12399 : }
12400 38 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow(arg1,arg2);
12401 38 : if ( bUseExceptions ) {
12402 0 : CPLErr eclass = CPLGetLastErrorType();
12403 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12404 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12405 : }
12406 : }
12407 : }
12408 38 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
12409 38 : return resultobj;
12410 : fail:
12411 0 : return NULL;
12412 : }
12413 :
12414 :
12415 38 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12416 38 : PyObject *resultobj = 0;
12417 38 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
12418 38 : void *argp1 = 0 ;
12419 38 : int res1 = 0 ;
12420 38 : PyObject * obj0 = 0 ;
12421 :
12422 38 : if (!PyArg_ParseTuple(args,(char *)"O:delete_CoordinateTransformation",&obj0)) SWIG_fail;
12423 38 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_DISOWN | 0 );
12424 38 : if (!SWIG_IsOK(res1)) {
12425 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformation" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
12426 : }
12427 38 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
12428 : {
12429 38 : if ( bUseExceptions ) {
12430 0 : CPLErrorReset();
12431 : }
12432 : delete_OSRCoordinateTransformationShadow(arg1);
12433 38 : if ( bUseExceptions ) {
12434 0 : CPLErr eclass = CPLGetLastErrorType();
12435 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12436 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12437 : }
12438 : }
12439 : }
12440 38 : resultobj = SWIG_Py_Void();
12441 38 : return resultobj;
12442 : fail:
12443 0 : return NULL;
12444 : }
12445 :
12446 :
12447 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12448 0 : PyObject *resultobj = 0;
12449 0 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
12450 : double *arg2 ;
12451 0 : void *argp1 = 0 ;
12452 0 : int res1 = 0 ;
12453 : double argin2[3] ;
12454 0 : PyObject * obj0 = 0 ;
12455 0 : PyObject * obj1 = 0 ;
12456 :
12457 0 : if (!PyArg_ParseTuple(args,(char *)"OO:CoordinateTransformation_TransformPoint",&obj0,&obj1)) SWIG_fail;
12458 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
12459 0 : if (!SWIG_IsOK(res1)) {
12460 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
12461 : }
12462 0 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
12463 : {
12464 : /* %typemap(in) (double argin2[ANY]) */
12465 0 : arg2 = argin2;
12466 0 : if (! PySequence_Check(obj1) ) {
12467 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
12468 0 : SWIG_fail;
12469 : }
12470 0 : int seq_size = PySequence_Size(obj1);
12471 0 : if ( seq_size != 3 ) {
12472 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
12473 0 : SWIG_fail;
12474 : }
12475 0 : for (unsigned int i=0; i<3; i++) {
12476 0 : PyObject *o = PySequence_GetItem(obj1,i);
12477 : double val;
12478 0 : if ( !PyArg_Parse(o, "d", &val ) ) {
12479 0 : PyErr_SetString(PyExc_TypeError, "not a number");
12480 0 : Py_DECREF(o);
12481 : SWIG_fail;
12482 : }
12483 0 : arg2[i] = val;
12484 0 : Py_DECREF(o);
12485 : }
12486 : }
12487 : {
12488 0 : if ( bUseExceptions ) {
12489 0 : CPLErrorReset();
12490 : }
12491 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2);
12492 0 : if ( bUseExceptions ) {
12493 0 : CPLErr eclass = CPLGetLastErrorType();
12494 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12495 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12496 : }
12497 : }
12498 : }
12499 0 : resultobj = SWIG_Py_Void();
12500 : {
12501 : /* %typemap(argout) (double argout[ANY]) */
12502 0 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
12503 0 : resultobj = t_output_helper(resultobj,out);
12504 : }
12505 0 : return resultobj;
12506 : fail:
12507 0 : return NULL;
12508 : }
12509 :
12510 :
12511 83 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12512 83 : PyObject *resultobj = 0;
12513 83 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
12514 : double *arg2 ;
12515 : double arg3 ;
12516 : double arg4 ;
12517 83 : double arg5 = (double) 0.0 ;
12518 83 : void *argp1 = 0 ;
12519 83 : int res1 = 0 ;
12520 : double argout2[3] ;
12521 : double val3 ;
12522 83 : int ecode3 = 0 ;
12523 : double val4 ;
12524 83 : int ecode4 = 0 ;
12525 : double val5 ;
12526 83 : int ecode5 = 0 ;
12527 83 : PyObject * obj0 = 0 ;
12528 83 : PyObject * obj1 = 0 ;
12529 83 : PyObject * obj2 = 0 ;
12530 83 : PyObject * obj3 = 0 ;
12531 :
12532 : {
12533 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
12534 83 : arg2 = argout2;
12535 : }
12536 83 : if (!PyArg_ParseTuple(args,(char *)"OOO|O:CoordinateTransformation_TransformPoint",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
12537 83 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
12538 83 : if (!SWIG_IsOK(res1)) {
12539 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
12540 : }
12541 83 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
12542 83 : ecode3 = SWIG_AsVal_double(obj1, &val3);
12543 83 : if (!SWIG_IsOK(ecode3)) {
12544 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
12545 : }
12546 83 : arg3 = static_cast< double >(val3);
12547 83 : ecode4 = SWIG_AsVal_double(obj2, &val4);
12548 83 : if (!SWIG_IsOK(ecode4)) {
12549 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
12550 : }
12551 83 : arg4 = static_cast< double >(val4);
12552 83 : if (obj3) {
12553 83 : ecode5 = SWIG_AsVal_double(obj3, &val5);
12554 83 : if (!SWIG_IsOK(ecode5)) {
12555 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
12556 : }
12557 83 : arg5 = static_cast< double >(val5);
12558 : }
12559 : {
12560 83 : if ( bUseExceptions ) {
12561 0 : CPLErrorReset();
12562 : }
12563 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5);
12564 83 : if ( bUseExceptions ) {
12565 0 : CPLErr eclass = CPLGetLastErrorType();
12566 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12567 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12568 : }
12569 : }
12570 : }
12571 83 : resultobj = SWIG_Py_Void();
12572 : {
12573 : /* %typemap(argout) (double argout[ANY]) */
12574 83 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
12575 83 : resultobj = t_output_helper(resultobj,out);
12576 : }
12577 83 : return resultobj;
12578 : fail:
12579 0 : return NULL;
12580 : }
12581 :
12582 :
12583 83 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint(PyObject *self, PyObject *args) {
12584 : int argc;
12585 : PyObject *argv[5];
12586 : int ii;
12587 :
12588 83 : if (!PyTuple_Check(args)) SWIG_fail;
12589 83 : argc = (int)PyObject_Length(args);
12590 415 : for (ii = 0; (ii < argc) && (ii < 4); ii++) {
12591 332 : argv[ii] = PyTuple_GET_ITEM(args,ii);
12592 : }
12593 83 : if (argc == 2) {
12594 : int _v;
12595 0 : void *vptr = 0;
12596 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
12597 0 : _v = SWIG_CheckState(res);
12598 0 : if (_v) {
12599 0 : void *vptr = 0;
12600 0 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
12601 0 : _v = SWIG_CheckState(res);
12602 0 : if (_v) {
12603 0 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, args);
12604 : }
12605 : }
12606 : }
12607 83 : if ((argc >= 3) && (argc <= 4)) {
12608 : int _v;
12609 83 : void *vptr = 0;
12610 83 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
12611 83 : _v = SWIG_CheckState(res);
12612 83 : if (_v) {
12613 : {
12614 83 : int res = SWIG_AsVal_double(argv[1], NULL);
12615 83 : _v = SWIG_CheckState(res);
12616 : }
12617 83 : if (_v) {
12618 : {
12619 83 : int res = SWIG_AsVal_double(argv[2], NULL);
12620 83 : _v = SWIG_CheckState(res);
12621 : }
12622 83 : if (_v) {
12623 83 : if (argc <= 3) {
12624 0 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, args);
12625 : }
12626 : {
12627 83 : int res = SWIG_AsVal_double(argv[3], NULL);
12628 83 : _v = SWIG_CheckState(res);
12629 : }
12630 83 : if (_v) {
12631 83 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, args);
12632 : }
12633 : }
12634 : }
12635 : }
12636 : }
12637 :
12638 : fail:
12639 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoordinateTransformation_TransformPoint'.\n"
12640 : " Possible C/C++ prototypes are:\n"
12641 : " TransformPoint(OSRCoordinateTransformationShadow *,double [3])\n"
12642 0 : " TransformPoint(OSRCoordinateTransformationShadow *,double [3],double,double,double)\n");
12643 0 : return NULL;
12644 : }
12645 :
12646 :
12647 2 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12648 2 : PyObject *resultobj = 0;
12649 2 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
12650 : int arg2 ;
12651 2 : double *arg3 = (double *) 0 ;
12652 2 : double *arg4 = (double *) 0 ;
12653 2 : double *arg5 = (double *) 0 ;
12654 2 : void *argp1 = 0 ;
12655 2 : int res1 = 0 ;
12656 2 : PyObject * obj0 = 0 ;
12657 2 : PyObject * obj1 = 0 ;
12658 :
12659 2 : if (!PyArg_ParseTuple(args,(char *)"OO:CoordinateTransformation_TransformPoints",&obj0,&obj1)) SWIG_fail;
12660 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
12661 2 : if (!SWIG_IsOK(res1)) {
12662 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoints" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
12663 : }
12664 2 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
12665 : {
12666 2 : if ( !PySequence_Check(obj1) ) {
12667 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
12668 0 : SWIG_fail;
12669 : }
12670 :
12671 2 : arg2 = PySequence_Size(obj1);
12672 2 : arg3 = (double*) VSIMalloc(arg2*sizeof(double));
12673 2 : arg4 = (double*) VSIMalloc(arg2*sizeof(double));
12674 2 : arg5 = (double*) VSIMalloc(arg2*sizeof(double));
12675 :
12676 2 : if (arg3 == NULL || arg4 == NULL || arg5 == NULL)
12677 : {
12678 0 : PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
12679 0 : SWIG_fail;
12680 : }
12681 :
12682 2 : if (!DecomposeSequenceOfCoordinates(obj1,arg2,arg3,arg4,arg5)) {
12683 : SWIG_fail;
12684 : }
12685 : }
12686 : {
12687 2 : if ( bUseExceptions ) {
12688 0 : CPLErrorReset();
12689 : }
12690 : OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5);
12691 2 : if ( bUseExceptions ) {
12692 0 : CPLErr eclass = CPLGetLastErrorType();
12693 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12694 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12695 : }
12696 : }
12697 : }
12698 2 : resultobj = SWIG_Py_Void();
12699 : {
12700 : /* %typemap(argout) (int nCount, double *x, double *y, double *z) */
12701 2 : Py_DECREF(resultobj);
12702 2 : PyObject *out = PyList_New( arg2 );
12703 6 : for( int i=0; i< arg2; i++ ) {
12704 4 : PyObject *tuple = PyTuple_New( 3 );
12705 4 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg3)[i] ) );
12706 4 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg4)[i] ) );
12707 4 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg5)[i] ) );
12708 4 : PyList_SetItem( out, i, tuple );
12709 : }
12710 2 : resultobj = out;
12711 : }
12712 : {
12713 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z) */
12714 2 : VSIFree(arg3);
12715 2 : VSIFree(arg4);
12716 2 : VSIFree(arg5);
12717 : }
12718 2 : return resultobj;
12719 : fail:
12720 : {
12721 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z) */
12722 0 : VSIFree(arg3);
12723 0 : VSIFree(arg4);
12724 0 : VSIFree(arg5);
12725 : }
12726 0 : return NULL;
12727 : }
12728 :
12729 :
12730 4 : SWIGINTERN PyObject *CoordinateTransformation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12731 : PyObject *obj;
12732 4 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
12733 4 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_NewClientData(obj));
12734 4 : return SWIG_Py_Void();
12735 : }
12736 :
12737 : static PyMethodDef SwigMethods[] = {
12738 : { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
12739 : { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
12740 : { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
12741 : { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
12742 : { (char *)"GetProjectionMethods", py_OPTGetProjectionMethods, METH_VARARGS, NULL},
12743 : { (char *)"GetWellKnownGeogCSAsWKT", _wrap_GetWellKnownGeogCSAsWKT, METH_VARARGS, (char *)"GetWellKnownGeogCSAsWKT(char name) -> OGRErr"},
12744 : { (char *)"GetUserInputAsWKT", _wrap_GetUserInputAsWKT, METH_VARARGS, (char *)"GetUserInputAsWKT(char name) -> OGRErr"},
12745 : { (char *)"new_SpatialReference", (PyCFunction) _wrap_new_SpatialReference, METH_VARARGS | METH_KEYWORDS, (char *)"new_SpatialReference(char wkt = \"\") -> SpatialReference"},
12746 : { (char *)"delete_SpatialReference", _wrap_delete_SpatialReference, METH_VARARGS, (char *)"delete_SpatialReference(SpatialReference self)"},
12747 : { (char *)"SpatialReference___str__", _wrap_SpatialReference___str__, METH_VARARGS, (char *)"SpatialReference___str__(SpatialReference self) -> retStringAndCPLFree"},
12748 : { (char *)"SpatialReference_IsSame", _wrap_SpatialReference_IsSame, METH_VARARGS, (char *)"SpatialReference_IsSame(SpatialReference self, SpatialReference rhs) -> int"},
12749 : { (char *)"SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS, METH_VARARGS, (char *)"SpatialReference_IsSameGeogCS(SpatialReference self, SpatialReference rhs) -> int"},
12750 : { (char *)"SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS, METH_VARARGS, (char *)"SpatialReference_IsSameVertCS(SpatialReference self, SpatialReference rhs) -> int"},
12751 : { (char *)"SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic, METH_VARARGS, (char *)"SpatialReference_IsGeographic(SpatialReference self) -> int"},
12752 : { (char *)"SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected, METH_VARARGS, (char *)"SpatialReference_IsProjected(SpatialReference self) -> int"},
12753 : { (char *)"SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound, METH_VARARGS, (char *)"SpatialReference_IsCompound(SpatialReference self) -> int"},
12754 : { (char *)"SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric, METH_VARARGS, (char *)"SpatialReference_IsGeocentric(SpatialReference self) -> int"},
12755 : { (char *)"SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal, METH_VARARGS, (char *)"SpatialReference_IsLocal(SpatialReference self) -> int"},
12756 : { (char *)"SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical, METH_VARARGS, (char *)"SpatialReference_IsVertical(SpatialReference self) -> int"},
12757 : { (char *)"SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong, METH_VARARGS, (char *)"SpatialReference_EPSGTreatsAsLatLong(SpatialReference self) -> int"},
12758 : { (char *)"SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority, METH_VARARGS, (char *)"\n"
12759 : "SpatialReference_SetAuthority(SpatialReference self, char pszTargetKey, char pszAuthority, \n"
12760 : " int nCode) -> OGRErr\n"
12761 : ""},
12762 : { (char *)"SpatialReference_GetAttrValue", _wrap_SpatialReference_GetAttrValue, METH_VARARGS, (char *)"SpatialReference_GetAttrValue(SpatialReference self, char name, int child = 0) -> char"},
12763 : { (char *)"SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue, METH_VARARGS, (char *)"SpatialReference_SetAttrValue(SpatialReference self, char name, char value) -> OGRErr"},
12764 : { (char *)"SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits, METH_VARARGS, (char *)"SpatialReference_SetAngularUnits(SpatialReference self, char name, double to_radians) -> OGRErr"},
12765 : { (char *)"SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits, METH_VARARGS, (char *)"SpatialReference_GetAngularUnits(SpatialReference self) -> double"},
12766 : { (char *)"SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits, METH_VARARGS, (char *)"SpatialReference_SetTargetLinearUnits(SpatialReference self, char target, char name, double to_meters) -> OGRErr"},
12767 : { (char *)"SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits, METH_VARARGS, (char *)"SpatialReference_SetLinearUnits(SpatialReference self, char name, double to_meters) -> OGRErr"},
12768 : { (char *)"SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters, METH_VARARGS, (char *)"SpatialReference_SetLinearUnitsAndUpdateParameters(SpatialReference self, char name, double to_meters) -> OGRErr"},
12769 : { (char *)"SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits, METH_VARARGS, (char *)"SpatialReference_GetLinearUnits(SpatialReference self) -> double"},
12770 : { (char *)"SpatialReference_GetLinearUnitsName", _wrap_SpatialReference_GetLinearUnitsName, METH_VARARGS, (char *)"SpatialReference_GetLinearUnitsName(SpatialReference self) -> char"},
12771 : { (char *)"SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode, METH_VARARGS, (char *)"SpatialReference_GetAuthorityCode(SpatialReference self, char target_key) -> char"},
12772 : { (char *)"SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName, METH_VARARGS, (char *)"SpatialReference_GetAuthorityName(SpatialReference self, char target_key) -> char"},
12773 : { (char *)"SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM, METH_VARARGS, (char *)"SpatialReference_SetUTM(SpatialReference self, int zone, int north = 1) -> OGRErr"},
12774 : { (char *)"SpatialReference_GetUTMZone", _wrap_SpatialReference_GetUTMZone, METH_VARARGS, (char *)"SpatialReference_GetUTMZone(SpatialReference self) -> int"},
12775 : { (char *)"SpatialReference_SetStatePlane", _wrap_SpatialReference_SetStatePlane, METH_VARARGS, (char *)"\n"
12776 : "SpatialReference_SetStatePlane(SpatialReference self, int zone, int is_nad83 = 1, \n"
12777 : " char unitsname = \"\", double units = 0.0) -> OGRErr\n"
12778 : ""},
12779 : { (char *)"SpatialReference_AutoIdentifyEPSG", _wrap_SpatialReference_AutoIdentifyEPSG, METH_VARARGS, (char *)"SpatialReference_AutoIdentifyEPSG(SpatialReference self) -> OGRErr"},
12780 : { (char *)"SpatialReference_SetProjection", _wrap_SpatialReference_SetProjection, METH_VARARGS, (char *)"SpatialReference_SetProjection(SpatialReference self, char arg) -> OGRErr"},
12781 : { (char *)"SpatialReference_SetProjParm", _wrap_SpatialReference_SetProjParm, METH_VARARGS, (char *)"SpatialReference_SetProjParm(SpatialReference self, char name, double val) -> OGRErr"},
12782 : { (char *)"SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm, METH_VARARGS, (char *)"SpatialReference_GetProjParm(SpatialReference self, char name, double default_val = 0.0) -> double"},
12783 : { (char *)"SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm, METH_VARARGS, (char *)"SpatialReference_SetNormProjParm(SpatialReference self, char name, double val) -> OGRErr"},
12784 : { (char *)"SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm, METH_VARARGS, (char *)"SpatialReference_GetNormProjParm(SpatialReference self, char name, double default_val = 0.0) -> double"},
12785 : { (char *)"SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor, METH_VARARGS, (char *)"SpatialReference_GetSemiMajor(SpatialReference self) -> double"},
12786 : { (char *)"SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor, METH_VARARGS, (char *)"SpatialReference_GetSemiMinor(SpatialReference self) -> double"},
12787 : { (char *)"SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening, METH_VARARGS, (char *)"SpatialReference_GetInvFlattening(SpatialReference self) -> double"},
12788 : { (char *)"SpatialReference_SetACEA", (PyCFunction) _wrap_SpatialReference_SetACEA, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12789 : "SpatialReference_SetACEA(SpatialReference self, double stdp1, double stdp2, \n"
12790 : " double clat, double clong, double fe, double fn) -> OGRErr\n"
12791 : ""},
12792 : { (char *)"SpatialReference_SetAE", (PyCFunction) _wrap_SpatialReference_SetAE, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12793 : "SpatialReference_SetAE(SpatialReference self, double clat, double clong, double fe, \n"
12794 : " double fn) -> OGRErr\n"
12795 : ""},
12796 : { (char *)"SpatialReference_SetBonne", (PyCFunction) _wrap_SpatialReference_SetBonne, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12797 : "SpatialReference_SetBonne(SpatialReference self, double stdp, double cm, double fe, \n"
12798 : " double fn) -> OGRErr\n"
12799 : ""},
12800 : { (char *)"SpatialReference_SetCEA", (PyCFunction) _wrap_SpatialReference_SetCEA, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12801 : "SpatialReference_SetCEA(SpatialReference self, double stdp1, double cm, double fe, \n"
12802 : " double fn) -> OGRErr\n"
12803 : ""},
12804 : { (char *)"SpatialReference_SetCS", (PyCFunction) _wrap_SpatialReference_SetCS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12805 : "SpatialReference_SetCS(SpatialReference self, double clat, double clong, double fe, \n"
12806 : " double fn) -> OGRErr\n"
12807 : ""},
12808 : { (char *)"SpatialReference_SetEC", (PyCFunction) _wrap_SpatialReference_SetEC, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12809 : "SpatialReference_SetEC(SpatialReference self, double stdp1, double stdp2, \n"
12810 : " double clat, double clong, double fe, double fn) -> OGRErr\n"
12811 : ""},
12812 : { (char *)"SpatialReference_SetEckertIV", (PyCFunction) _wrap_SpatialReference_SetEckertIV, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetEckertIV(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12813 : { (char *)"SpatialReference_SetEckertVI", (PyCFunction) _wrap_SpatialReference_SetEckertVI, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetEckertVI(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12814 : { (char *)"SpatialReference_SetEquirectangular", (PyCFunction) _wrap_SpatialReference_SetEquirectangular, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12815 : "SpatialReference_SetEquirectangular(SpatialReference self, double clat, double clong, double fe, \n"
12816 : " double fn) -> OGRErr\n"
12817 : ""},
12818 : { (char *)"SpatialReference_SetEquirectangular2", (PyCFunction) _wrap_SpatialReference_SetEquirectangular2, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12819 : "SpatialReference_SetEquirectangular2(SpatialReference self, double clat, double clong, double pseudostdparallellat, \n"
12820 : " double fe, double fn) -> OGRErr\n"
12821 : ""},
12822 : { (char *)"SpatialReference_SetGaussSchreiberTMercator", (PyCFunction) _wrap_SpatialReference_SetGaussSchreiberTMercator, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12823 : "SpatialReference_SetGaussSchreiberTMercator(SpatialReference self, double clat, double clong, double sc, \n"
12824 : " double fe, double fn) -> OGRErr\n"
12825 : ""},
12826 : { (char *)"SpatialReference_SetGS", (PyCFunction) _wrap_SpatialReference_SetGS, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetGS(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12827 : { (char *)"SpatialReference_SetGH", (PyCFunction) _wrap_SpatialReference_SetGH, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetGH(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12828 : { (char *)"SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH, METH_VARARGS, (char *)"SpatialReference_SetIGH(SpatialReference self) -> OGRErr"},
12829 : { (char *)"SpatialReference_SetGEOS", (PyCFunction) _wrap_SpatialReference_SetGEOS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12830 : "SpatialReference_SetGEOS(SpatialReference self, double cm, double satelliteheight, \n"
12831 : " double fe, double fn) -> OGRErr\n"
12832 : ""},
12833 : { (char *)"SpatialReference_SetGnomonic", (PyCFunction) _wrap_SpatialReference_SetGnomonic, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12834 : "SpatialReference_SetGnomonic(SpatialReference self, double clat, double clong, double fe, \n"
12835 : " double fn) -> OGRErr\n"
12836 : ""},
12837 : { (char *)"SpatialReference_SetHOM", (PyCFunction) _wrap_SpatialReference_SetHOM, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12838 : "SpatialReference_SetHOM(SpatialReference self, double clat, double clong, double azimuth, \n"
12839 : " double recttoskew, double scale, \n"
12840 : " double fe, double fn) -> OGRErr\n"
12841 : ""},
12842 : { (char *)"SpatialReference_SetHOM2PNO", (PyCFunction) _wrap_SpatialReference_SetHOM2PNO, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12843 : "SpatialReference_SetHOM2PNO(SpatialReference self, double clat, double dfLat1, \n"
12844 : " double dfLong1, double dfLat2, double dfLong2, \n"
12845 : " double scale, double fe, double fn) -> OGRErr\n"
12846 : ""},
12847 : { (char *)"SpatialReference_SetKrovak", (PyCFunction) _wrap_SpatialReference_SetKrovak, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12848 : "SpatialReference_SetKrovak(SpatialReference self, double clat, double clong, double azimuth, \n"
12849 : " double pseudostdparallellat, double scale, \n"
12850 : " double fe, double fn) -> OGRErr\n"
12851 : ""},
12852 : { (char *)"SpatialReference_SetLAEA", (PyCFunction) _wrap_SpatialReference_SetLAEA, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12853 : "SpatialReference_SetLAEA(SpatialReference self, double clat, double clong, double fe, \n"
12854 : " double fn) -> OGRErr\n"
12855 : ""},
12856 : { (char *)"SpatialReference_SetLCC", (PyCFunction) _wrap_SpatialReference_SetLCC, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12857 : "SpatialReference_SetLCC(SpatialReference self, double stdp1, double stdp2, \n"
12858 : " double clat, double clong, double fe, double fn) -> OGRErr\n"
12859 : ""},
12860 : { (char *)"SpatialReference_SetLCC1SP", (PyCFunction) _wrap_SpatialReference_SetLCC1SP, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12861 : "SpatialReference_SetLCC1SP(SpatialReference self, double clat, double clong, double scale, \n"
12862 : " double fe, double fn) -> OGRErr\n"
12863 : ""},
12864 : { (char *)"SpatialReference_SetLCCB", (PyCFunction) _wrap_SpatialReference_SetLCCB, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12865 : "SpatialReference_SetLCCB(SpatialReference self, double stdp1, double stdp2, \n"
12866 : " double clat, double clong, double fe, double fn) -> OGRErr\n"
12867 : ""},
12868 : { (char *)"SpatialReference_SetMC", (PyCFunction) _wrap_SpatialReference_SetMC, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12869 : "SpatialReference_SetMC(SpatialReference self, double clat, double clong, double fe, \n"
12870 : " double fn) -> OGRErr\n"
12871 : ""},
12872 : { (char *)"SpatialReference_SetMercator", (PyCFunction) _wrap_SpatialReference_SetMercator, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12873 : "SpatialReference_SetMercator(SpatialReference self, double clat, double clong, double scale, \n"
12874 : " double fe, double fn) -> OGRErr\n"
12875 : ""},
12876 : { (char *)"SpatialReference_SetMollweide", (PyCFunction) _wrap_SpatialReference_SetMollweide, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetMollweide(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12877 : { (char *)"SpatialReference_SetNZMG", (PyCFunction) _wrap_SpatialReference_SetNZMG, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12878 : "SpatialReference_SetNZMG(SpatialReference self, double clat, double clong, double fe, \n"
12879 : " double fn) -> OGRErr\n"
12880 : ""},
12881 : { (char *)"SpatialReference_SetOS", (PyCFunction) _wrap_SpatialReference_SetOS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12882 : "SpatialReference_SetOS(SpatialReference self, double dfOriginLat, double dfCMeridian, \n"
12883 : " double scale, double fe, double fn) -> OGRErr\n"
12884 : ""},
12885 : { (char *)"SpatialReference_SetOrthographic", (PyCFunction) _wrap_SpatialReference_SetOrthographic, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12886 : "SpatialReference_SetOrthographic(SpatialReference self, double clat, double clong, double fe, \n"
12887 : " double fn) -> OGRErr\n"
12888 : ""},
12889 : { (char *)"SpatialReference_SetPolyconic", (PyCFunction) _wrap_SpatialReference_SetPolyconic, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12890 : "SpatialReference_SetPolyconic(SpatialReference self, double clat, double clong, double fe, \n"
12891 : " double fn) -> OGRErr\n"
12892 : ""},
12893 : { (char *)"SpatialReference_SetPS", (PyCFunction) _wrap_SpatialReference_SetPS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12894 : "SpatialReference_SetPS(SpatialReference self, double clat, double clong, double scale, \n"
12895 : " double fe, double fn) -> OGRErr\n"
12896 : ""},
12897 : { (char *)"SpatialReference_SetRobinson", (PyCFunction) _wrap_SpatialReference_SetRobinson, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetRobinson(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
12898 : { (char *)"SpatialReference_SetSinusoidal", (PyCFunction) _wrap_SpatialReference_SetSinusoidal, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetSinusoidal(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
12899 : { (char *)"SpatialReference_SetStereographic", (PyCFunction) _wrap_SpatialReference_SetStereographic, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12900 : "SpatialReference_SetStereographic(SpatialReference self, double clat, double clong, double scale, \n"
12901 : " double fe, double fn) -> OGRErr\n"
12902 : ""},
12903 : { (char *)"SpatialReference_SetSOC", (PyCFunction) _wrap_SpatialReference_SetSOC, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12904 : "SpatialReference_SetSOC(SpatialReference self, double latitudeoforigin, double cm, \n"
12905 : " double fe, double fn) -> OGRErr\n"
12906 : ""},
12907 : { (char *)"SpatialReference_SetTM", (PyCFunction) _wrap_SpatialReference_SetTM, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12908 : "SpatialReference_SetTM(SpatialReference self, double clat, double clong, double scale, \n"
12909 : " double fe, double fn) -> OGRErr\n"
12910 : ""},
12911 : { (char *)"SpatialReference_SetTMVariant", (PyCFunction) _wrap_SpatialReference_SetTMVariant, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12912 : "SpatialReference_SetTMVariant(SpatialReference self, char pszVariantName, double clat, \n"
12913 : " double clong, double scale, double fe, \n"
12914 : " double fn) -> OGRErr\n"
12915 : ""},
12916 : { (char *)"SpatialReference_SetTMG", (PyCFunction) _wrap_SpatialReference_SetTMG, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12917 : "SpatialReference_SetTMG(SpatialReference self, double clat, double clong, double fe, \n"
12918 : " double fn) -> OGRErr\n"
12919 : ""},
12920 : { (char *)"SpatialReference_SetTMSO", (PyCFunction) _wrap_SpatialReference_SetTMSO, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12921 : "SpatialReference_SetTMSO(SpatialReference self, double clat, double clong, double scale, \n"
12922 : " double fe, double fn) -> OGRErr\n"
12923 : ""},
12924 : { (char *)"SpatialReference_SetVDG", (PyCFunction) _wrap_SpatialReference_SetVDG, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetVDG(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
12925 : { (char *)"SpatialReference_SetWellKnownGeogCS", _wrap_SpatialReference_SetWellKnownGeogCS, METH_VARARGS, (char *)"SpatialReference_SetWellKnownGeogCS(SpatialReference self, char name) -> OGRErr"},
12926 : { (char *)"SpatialReference_SetFromUserInput", _wrap_SpatialReference_SetFromUserInput, METH_VARARGS, (char *)"SpatialReference_SetFromUserInput(SpatialReference self, char name) -> OGRErr"},
12927 : { (char *)"SpatialReference_CopyGeogCSFrom", _wrap_SpatialReference_CopyGeogCSFrom, METH_VARARGS, (char *)"SpatialReference_CopyGeogCSFrom(SpatialReference self, SpatialReference rhs) -> OGRErr"},
12928 : { (char *)"SpatialReference_SetTOWGS84", _wrap_SpatialReference_SetTOWGS84, METH_VARARGS, (char *)"\n"
12929 : "SpatialReference_SetTOWGS84(SpatialReference self, double p1, double p2, double p3, \n"
12930 : " double p4 = 0.0, double p5 = 0.0, double p6 = 0.0, \n"
12931 : " double p7 = 0.0) -> OGRErr\n"
12932 : ""},
12933 : { (char *)"SpatialReference_GetTOWGS84", _wrap_SpatialReference_GetTOWGS84, METH_VARARGS, (char *)"SpatialReference_GetTOWGS84(SpatialReference self) -> OGRErr"},
12934 : { (char *)"SpatialReference_SetLocalCS", _wrap_SpatialReference_SetLocalCS, METH_VARARGS, (char *)"SpatialReference_SetLocalCS(SpatialReference self, char pszName) -> OGRErr"},
12935 : { (char *)"SpatialReference_SetGeogCS", _wrap_SpatialReference_SetGeogCS, METH_VARARGS, (char *)"\n"
12936 : "SpatialReference_SetGeogCS(SpatialReference self, char pszGeogName, char pszDatumName, \n"
12937 : " char pszEllipsoidName, double dfSemiMajor, \n"
12938 : " double dfInvFlattening, char pszPMName = \"Greenwich\", \n"
12939 : " double dfPMOffset = 0.0, char pszUnits = \"degree\", \n"
12940 : " double dfConvertToRadians = 0.0174532925199433) -> OGRErr\n"
12941 : ""},
12942 : { (char *)"SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS, METH_VARARGS, (char *)"SpatialReference_SetProjCS(SpatialReference self, char name = \"unnamed\") -> OGRErr"},
12943 : { (char *)"SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS, METH_VARARGS, (char *)"SpatialReference_SetGeocCS(SpatialReference self, char name = \"unnamed\") -> OGRErr"},
12944 : { (char *)"SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS, METH_VARARGS, (char *)"\n"
12945 : "SpatialReference_SetVertCS(SpatialReference self, char VertCSName = \"unnamed\", \n"
12946 : " char VertDatumName = \"unnamed\", int VertDatumType = 0) -> OGRErr\n"
12947 : ""},
12948 : { (char *)"SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS, METH_VARARGS, (char *)"\n"
12949 : "SpatialReference_SetCompoundCS(SpatialReference self, char name, SpatialReference horizcs, \n"
12950 : " SpatialReference vertcs) -> OGRErr\n"
12951 : ""},
12952 : { (char *)"SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt, METH_VARARGS, (char *)"SpatialReference_ImportFromWkt(SpatialReference self, char ppszInput) -> OGRErr"},
12953 : { (char *)"SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4, METH_VARARGS, (char *)"SpatialReference_ImportFromProj4(SpatialReference self, char ppszInput) -> OGRErr"},
12954 : { (char *)"SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl, METH_VARARGS, (char *)"SpatialReference_ImportFromUrl(SpatialReference self, char url) -> OGRErr"},
12955 : { (char *)"SpatialReference_ImportFromESRI", _wrap_SpatialReference_ImportFromESRI, METH_VARARGS, (char *)"SpatialReference_ImportFromESRI(SpatialReference self, char ppszInput) -> OGRErr"},
12956 : { (char *)"SpatialReference_ImportFromEPSG", _wrap_SpatialReference_ImportFromEPSG, METH_VARARGS, (char *)"SpatialReference_ImportFromEPSG(SpatialReference self, int arg) -> OGRErr"},
12957 : { (char *)"SpatialReference_ImportFromEPSGA", _wrap_SpatialReference_ImportFromEPSGA, METH_VARARGS, (char *)"SpatialReference_ImportFromEPSGA(SpatialReference self, int arg) -> OGRErr"},
12958 : { (char *)"SpatialReference_ImportFromPCI", _wrap_SpatialReference_ImportFromPCI, METH_VARARGS, (char *)"\n"
12959 : "SpatialReference_ImportFromPCI(SpatialReference self, char proj, char units = \"METRE\", \n"
12960 : " double argin = 0) -> OGRErr\n"
12961 : ""},
12962 : { (char *)"SpatialReference_ImportFromUSGS", _wrap_SpatialReference_ImportFromUSGS, METH_VARARGS, (char *)"\n"
12963 : "SpatialReference_ImportFromUSGS(SpatialReference self, long proj_code, long zone = 0, \n"
12964 : " double argin = 0, long datum_code = 0) -> OGRErr\n"
12965 : ""},
12966 : { (char *)"SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML, METH_VARARGS, (char *)"SpatialReference_ImportFromXML(SpatialReference self, char xmlString) -> OGRErr"},
12967 : { (char *)"SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM, METH_VARARGS, (char *)"SpatialReference_ImportFromERM(SpatialReference self, char proj, char datum, char units) -> OGRErr"},
12968 : { (char *)"SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys, METH_VARARGS, (char *)"SpatialReference_ImportFromMICoordSys(SpatialReference self, char pszCoordSys) -> OGRErr"},
12969 : { (char *)"SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt, METH_VARARGS, (char *)"SpatialReference_ExportToWkt(SpatialReference self) -> OGRErr"},
12970 : { (char *)"SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt, METH_VARARGS, (char *)"SpatialReference_ExportToPrettyWkt(SpatialReference self, int simplify = 0) -> OGRErr"},
12971 : { (char *)"SpatialReference_ExportToProj4", _wrap_SpatialReference_ExportToProj4, METH_VARARGS, (char *)"SpatialReference_ExportToProj4(SpatialReference self) -> OGRErr"},
12972 : { (char *)"SpatialReference_ExportToPCI", _wrap_SpatialReference_ExportToPCI, METH_VARARGS, (char *)"SpatialReference_ExportToPCI(SpatialReference self) -> OGRErr"},
12973 : { (char *)"SpatialReference_ExportToUSGS", _wrap_SpatialReference_ExportToUSGS, METH_VARARGS, (char *)"SpatialReference_ExportToUSGS(SpatialReference self) -> OGRErr"},
12974 : { (char *)"SpatialReference_ExportToXML", _wrap_SpatialReference_ExportToXML, METH_VARARGS, (char *)"SpatialReference_ExportToXML(SpatialReference self, char dialect = \"\") -> OGRErr"},
12975 : { (char *)"SpatialReference_ExportToMICoordSys", _wrap_SpatialReference_ExportToMICoordSys, METH_VARARGS, (char *)"SpatialReference_ExportToMICoordSys(SpatialReference self) -> OGRErr"},
12976 : { (char *)"SpatialReference_CloneGeogCS", _wrap_SpatialReference_CloneGeogCS, METH_VARARGS, (char *)"SpatialReference_CloneGeogCS(SpatialReference self) -> SpatialReference"},
12977 : { (char *)"SpatialReference_Clone", _wrap_SpatialReference_Clone, METH_VARARGS, (char *)"SpatialReference_Clone(SpatialReference self) -> SpatialReference"},
12978 : { (char *)"SpatialReference_Validate", _wrap_SpatialReference_Validate, METH_VARARGS, (char *)"SpatialReference_Validate(SpatialReference self) -> OGRErr"},
12979 : { (char *)"SpatialReference_StripCTParms", _wrap_SpatialReference_StripCTParms, METH_VARARGS, (char *)"SpatialReference_StripCTParms(SpatialReference self) -> OGRErr"},
12980 : { (char *)"SpatialReference_FixupOrdering", _wrap_SpatialReference_FixupOrdering, METH_VARARGS, (char *)"SpatialReference_FixupOrdering(SpatialReference self) -> OGRErr"},
12981 : { (char *)"SpatialReference_Fixup", _wrap_SpatialReference_Fixup, METH_VARARGS, (char *)"SpatialReference_Fixup(SpatialReference self) -> OGRErr"},
12982 : { (char *)"SpatialReference_MorphToESRI", _wrap_SpatialReference_MorphToESRI, METH_VARARGS, (char *)"SpatialReference_MorphToESRI(SpatialReference self) -> OGRErr"},
12983 : { (char *)"SpatialReference_MorphFromESRI", _wrap_SpatialReference_MorphFromESRI, METH_VARARGS, (char *)"SpatialReference_MorphFromESRI(SpatialReference self) -> OGRErr"},
12984 : { (char *)"SpatialReference_swigregister", SpatialReference_swigregister, METH_VARARGS, NULL},
12985 : { (char *)"new_CoordinateTransformation", _wrap_new_CoordinateTransformation, METH_VARARGS, (char *)"new_CoordinateTransformation(SpatialReference src, SpatialReference dst) -> CoordinateTransformation"},
12986 : { (char *)"delete_CoordinateTransformation", _wrap_delete_CoordinateTransformation, METH_VARARGS, (char *)"delete_CoordinateTransformation(CoordinateTransformation self)"},
12987 : { (char *)"CoordinateTransformation_TransformPoint", _wrap_CoordinateTransformation_TransformPoint, METH_VARARGS, (char *)"\n"
12988 : "TransformPoint(double inout)\n"
12989 : "CoordinateTransformation_TransformPoint(CoordinateTransformation self, double x, double y, \n"
12990 : " double z = 0.0)\n"
12991 : ""},
12992 : { (char *)"CoordinateTransformation_TransformPoints", _wrap_CoordinateTransformation_TransformPoints, METH_VARARGS, (char *)"CoordinateTransformation_TransformPoints(CoordinateTransformation self, int nCount)"},
12993 : { (char *)"CoordinateTransformation_swigregister", CoordinateTransformation_swigregister, METH_VARARGS, NULL},
12994 : { NULL, NULL, 0, NULL }
12995 : };
12996 :
12997 :
12998 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
12999 :
13000 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
13001 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
13002 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
13003 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
13004 : static swig_type_info _swigt__p_int = {"_p_int", "int *|OGRErr *", 0, 0, (void*)0, 0};
13005 : static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
13006 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
13007 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
13008 :
13009 : static swig_type_info *swig_type_initial[] = {
13010 : &_swigt__p_OSRCoordinateTransformationShadow,
13011 : &_swigt__p_OSRSpatialReferenceShadow,
13012 : &_swigt__p_char,
13013 : &_swigt__p_double,
13014 : &_swigt__p_int,
13015 : &_swigt__p_long,
13016 : &_swigt__p_p_char,
13017 : &_swigt__p_p_double,
13018 : };
13019 :
13020 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
13021 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
13022 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
13023 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
13024 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
13025 : static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
13026 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
13027 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
13028 :
13029 : static swig_cast_info *swig_cast_initial[] = {
13030 : _swigc__p_OSRCoordinateTransformationShadow,
13031 : _swigc__p_OSRSpatialReferenceShadow,
13032 : _swigc__p_char,
13033 : _swigc__p_double,
13034 : _swigc__p_int,
13035 : _swigc__p_long,
13036 : _swigc__p_p_char,
13037 : _swigc__p_p_double,
13038 : };
13039 :
13040 :
13041 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
13042 :
13043 : static swig_const_info swig_const_table[] = {
13044 : {0, 0, 0, 0.0, 0, 0}};
13045 :
13046 : #ifdef __cplusplus
13047 : }
13048 : #endif
13049 : /* -----------------------------------------------------------------------------
13050 : * Type initialization:
13051 : * This problem is tough by the requirement that no dynamic
13052 : * memory is used. Also, since swig_type_info structures store pointers to
13053 : * swig_cast_info structures and swig_cast_info structures store pointers back
13054 : * to swig_type_info structures, we need some lookup code at initialization.
13055 : * The idea is that swig generates all the structures that are needed.
13056 : * The runtime then collects these partially filled structures.
13057 : * The SWIG_InitializeModule function takes these initial arrays out of
13058 : * swig_module, and does all the lookup, filling in the swig_module.types
13059 : * array with the correct data and linking the correct swig_cast_info
13060 : * structures together.
13061 : *
13062 : * The generated swig_type_info structures are assigned staticly to an initial
13063 : * array. We just loop through that array, and handle each type individually.
13064 : * First we lookup if this type has been already loaded, and if so, use the
13065 : * loaded structure instead of the generated one. Then we have to fill in the
13066 : * cast linked list. The cast data is initially stored in something like a
13067 : * two-dimensional array. Each row corresponds to a type (there are the same
13068 : * number of rows as there are in the swig_type_initial array). Each entry in
13069 : * a column is one of the swig_cast_info structures for that type.
13070 : * The cast_initial array is actually an array of arrays, because each row has
13071 : * a variable number of columns. So to actually build the cast linked list,
13072 : * we find the array of casts associated with the type, and loop through it
13073 : * adding the casts to the list. The one last trick we need to do is making
13074 : * sure the type pointer in the swig_cast_info struct is correct.
13075 : *
13076 : * First off, we lookup the cast->type name to see if it is already loaded.
13077 : * There are three cases to handle:
13078 : * 1) If the cast->type has already been loaded AND the type we are adding
13079 : * casting info to has not been loaded (it is in this module), THEN we
13080 : * replace the cast->type pointer with the type pointer that has already
13081 : * been loaded.
13082 : * 2) If BOTH types (the one we are adding casting info to, and the
13083 : * cast->type) are loaded, THEN the cast info has already been loaded by
13084 : * the previous module so we just ignore it.
13085 : * 3) Finally, if cast->type has not already been loaded, then we add that
13086 : * swig_cast_info to the linked list (because the cast->type) pointer will
13087 : * be correct.
13088 : * ----------------------------------------------------------------------------- */
13089 :
13090 : #ifdef __cplusplus
13091 : extern "C" {
13092 : #if 0
13093 : } /* c-mode */
13094 : #endif
13095 : #endif
13096 :
13097 : #if 0
13098 : #define SWIGRUNTIME_DEBUG
13099 : #endif
13100 :
13101 :
13102 : SWIGRUNTIME void
13103 4 : SWIG_InitializeModule(void *clientdata) {
13104 : size_t i;
13105 : swig_module_info *module_head, *iter;
13106 : int found, init;
13107 :
13108 4 : clientdata = clientdata;
13109 :
13110 : /* check to see if the circular list has been setup, if not, set it up */
13111 4 : if (swig_module.next==0) {
13112 : /* Initialize the swig_module */
13113 4 : swig_module.type_initial = swig_type_initial;
13114 4 : swig_module.cast_initial = swig_cast_initial;
13115 4 : swig_module.next = &swig_module;
13116 4 : init = 1;
13117 : } else {
13118 0 : init = 0;
13119 : }
13120 :
13121 : /* Try and load any already created modules */
13122 4 : module_head = SWIG_GetModule(clientdata);
13123 4 : if (!module_head) {
13124 : /* This is the first module loaded for this interpreter */
13125 : /* so set the swig module into the interpreter */
13126 : SWIG_SetModule(clientdata, &swig_module);
13127 0 : module_head = &swig_module;
13128 : } else {
13129 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
13130 4 : found=0;
13131 4 : iter=module_head;
13132 8 : do {
13133 8 : if (iter==&swig_module) {
13134 0 : found=1;
13135 0 : break;
13136 : }
13137 8 : iter=iter->next;
13138 : } while (iter!= module_head);
13139 :
13140 : /* if the is found in the list, then all is done and we may leave */
13141 4 : if (found) return;
13142 : /* otherwise we must add out module into the list */
13143 4 : swig_module.next = module_head->next;
13144 4 : module_head->next = &swig_module;
13145 : }
13146 :
13147 : /* When multiple interpeters are used, a module could have already been initialized in
13148 : a different interpreter, but not yet have a pointer in this interpreter.
13149 : In this case, we do not want to continue adding types... everything should be
13150 : set up already */
13151 4 : if (init == 0) return;
13152 :
13153 : /* Now work on filling in swig_module.types */
13154 : #ifdef SWIGRUNTIME_DEBUG
13155 : printf("SWIG_InitializeModule: size %d\n", swig_module.size);
13156 : #endif
13157 36 : for (i = 0; i < swig_module.size; ++i) {
13158 32 : swig_type_info *type = 0;
13159 : swig_type_info *ret;
13160 : swig_cast_info *cast;
13161 :
13162 : #ifdef SWIGRUNTIME_DEBUG
13163 : printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
13164 : #endif
13165 :
13166 : /* if there is another module already loaded */
13167 32 : if (swig_module.next != &swig_module) {
13168 32 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
13169 : }
13170 32 : if (type) {
13171 : /* Overwrite clientdata field */
13172 : #ifdef SWIGRUNTIME_DEBUG
13173 : printf("SWIG_InitializeModule: found type %s\n", type->name);
13174 : #endif
13175 16 : if (swig_module.type_initial[i]->clientdata) {
13176 0 : type->clientdata = swig_module.type_initial[i]->clientdata;
13177 : #ifdef SWIGRUNTIME_DEBUG
13178 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
13179 : #endif
13180 : }
13181 : } else {
13182 16 : type = swig_module.type_initial[i];
13183 : }
13184 :
13185 : /* Insert casting types */
13186 32 : cast = swig_module.cast_initial[i];
13187 96 : while (cast->type) {
13188 : /* Don't need to add information already in the list */
13189 32 : ret = 0;
13190 : #ifdef SWIGRUNTIME_DEBUG
13191 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
13192 : #endif
13193 32 : if (swig_module.next != &swig_module) {
13194 32 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
13195 : #ifdef SWIGRUNTIME_DEBUG
13196 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
13197 : #endif
13198 : }
13199 32 : if (ret) {
13200 16 : if (type == swig_module.type_initial[i]) {
13201 : #ifdef SWIGRUNTIME_DEBUG
13202 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
13203 : #endif
13204 0 : cast->type = ret;
13205 0 : ret = 0;
13206 : } else {
13207 : /* Check for casting already in the list */
13208 16 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
13209 : #ifdef SWIGRUNTIME_DEBUG
13210 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
13211 : #endif
13212 16 : if (!ocast) ret = 0;
13213 : }
13214 : }
13215 :
13216 32 : if (!ret) {
13217 : #ifdef SWIGRUNTIME_DEBUG
13218 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
13219 : #endif
13220 16 : if (type->cast) {
13221 0 : type->cast->prev = cast;
13222 0 : cast->next = type->cast;
13223 : }
13224 16 : type->cast = cast;
13225 : }
13226 32 : cast++;
13227 : }
13228 : /* Set entry in modules->types array equal to the type */
13229 32 : swig_module.types[i] = type;
13230 : }
13231 4 : swig_module.types[i] = 0;
13232 :
13233 : #ifdef SWIGRUNTIME_DEBUG
13234 : printf("**** SWIG_InitializeModule: Cast List ******\n");
13235 : for (i = 0; i < swig_module.size; ++i) {
13236 : int j = 0;
13237 : swig_cast_info *cast = swig_module.cast_initial[i];
13238 : printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
13239 : while (cast->type) {
13240 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
13241 : cast++;
13242 : ++j;
13243 : }
13244 : printf("---- Total casts: %d\n",j);
13245 : }
13246 : printf("**** SWIG_InitializeModule: Cast List ******\n");
13247 : #endif
13248 : }
13249 :
13250 : /* This function will propagate the clientdata field of type to
13251 : * any new swig_type_info structures that have been added into the list
13252 : * of equivalent types. It is like calling
13253 : * SWIG_TypeClientData(type, clientdata) a second time.
13254 : */
13255 : SWIGRUNTIME void
13256 : SWIG_PropagateClientData(void) {
13257 : size_t i;
13258 : swig_cast_info *equiv;
13259 : static int init_run = 0;
13260 :
13261 : if (init_run) return;
13262 : init_run = 1;
13263 :
13264 : for (i = 0; i < swig_module.size; i++) {
13265 : if (swig_module.types[i]->clientdata) {
13266 : equiv = swig_module.types[i]->cast;
13267 : while (equiv) {
13268 : if (!equiv->converter) {
13269 : if (equiv->type && !equiv->type->clientdata)
13270 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
13271 : }
13272 : equiv = equiv->next;
13273 : }
13274 : }
13275 : }
13276 : }
13277 :
13278 : #ifdef __cplusplus
13279 : #if 0
13280 : {
13281 : /* c-mode */
13282 : #endif
13283 : }
13284 : #endif
13285 :
13286 :
13287 :
13288 : #ifdef __cplusplus
13289 : extern "C" {
13290 : #endif
13291 :
13292 : /* Python-specific SWIG API */
13293 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
13294 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
13295 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
13296 :
13297 : /* -----------------------------------------------------------------------------
13298 : * global variable support code.
13299 : * ----------------------------------------------------------------------------- */
13300 :
13301 : typedef struct swig_globalvar {
13302 : char *name; /* Name of global variable */
13303 : PyObject *(*get_attr)(void); /* Return the current value */
13304 : int (*set_attr)(PyObject *); /* Set the value */
13305 : struct swig_globalvar *next;
13306 : } swig_globalvar;
13307 :
13308 : typedef struct swig_varlinkobject {
13309 : PyObject_HEAD
13310 : swig_globalvar *vars;
13311 : } swig_varlinkobject;
13312 :
13313 : SWIGINTERN PyObject *
13314 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
13315 : #if PY_VERSION_HEX >= 0x03000000
13316 : return PyUnicode_InternFromString("<Swig global variables>");
13317 : #else
13318 : return PyString_FromString("<Swig global variables>");
13319 : #endif
13320 : }
13321 :
13322 : SWIGINTERN PyObject *
13323 : swig_varlink_str(swig_varlinkobject *v) {
13324 : #if PY_VERSION_HEX >= 0x03000000
13325 : PyObject *str = PyUnicode_InternFromString("(");
13326 : PyObject *tail;
13327 : PyObject *joined;
13328 : swig_globalvar *var;
13329 : for (var = v->vars; var; var=var->next) {
13330 : tail = PyUnicode_FromString(var->name);
13331 : joined = PyUnicode_Concat(str, tail);
13332 : Py_DecRef(str);
13333 : Py_DecRef(tail);
13334 : str = joined;
13335 : if (var->next) {
13336 : tail = PyUnicode_InternFromString(", ");
13337 : joined = PyUnicode_Concat(str, tail);
13338 : Py_DecRef(str);
13339 : Py_DecRef(tail);
13340 : str = joined;
13341 : }
13342 : }
13343 : tail = PyUnicode_InternFromString(")");
13344 : joined = PyUnicode_Concat(str, tail);
13345 : Py_DecRef(str);
13346 : Py_DecRef(tail);
13347 : str = joined;
13348 : #else
13349 : PyObject *str = PyString_FromString("(");
13350 : swig_globalvar *var;
13351 : for (var = v->vars; var; var=var->next) {
13352 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
13353 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
13354 : }
13355 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
13356 : #endif
13357 : return str;
13358 : }
13359 :
13360 : SWIGINTERN int
13361 : swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
13362 : char *tmp;
13363 : PyObject *str = swig_varlink_str(v);
13364 : fprintf(fp,"Swig global variables ");
13365 : fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
13366 : SWIG_Python_str_DelForPy3(tmp);
13367 : Py_DECREF(str);
13368 : return 0;
13369 : }
13370 :
13371 : SWIGINTERN void
13372 : swig_varlink_dealloc(swig_varlinkobject *v) {
13373 : swig_globalvar *var = v->vars;
13374 : while (var) {
13375 : swig_globalvar *n = var->next;
13376 : free(var->name);
13377 : free(var);
13378 : var = n;
13379 : }
13380 : }
13381 :
13382 : SWIGINTERN PyObject *
13383 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
13384 : PyObject *res = NULL;
13385 : swig_globalvar *var = v->vars;
13386 : while (var) {
13387 : if (strcmp(var->name,n) == 0) {
13388 : res = (*var->get_attr)();
13389 : break;
13390 : }
13391 : var = var->next;
13392 : }
13393 : if (res == NULL && !PyErr_Occurred()) {
13394 : PyErr_SetString(PyExc_NameError,"Unknown C global variable");
13395 : }
13396 : return res;
13397 : }
13398 :
13399 : SWIGINTERN int
13400 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
13401 : int res = 1;
13402 : swig_globalvar *var = v->vars;
13403 : while (var) {
13404 : if (strcmp(var->name,n) == 0) {
13405 : res = (*var->set_attr)(p);
13406 : break;
13407 : }
13408 : var = var->next;
13409 : }
13410 : if (res == 1 && !PyErr_Occurred()) {
13411 : PyErr_SetString(PyExc_NameError,"Unknown C global variable");
13412 : }
13413 : return res;
13414 : }
13415 :
13416 : SWIGINTERN PyTypeObject*
13417 : swig_varlink_type(void) {
13418 : static char varlink__doc__[] = "Swig var link object";
13419 : static PyTypeObject varlink_type;
13420 : static int type_init = 0;
13421 : if (!type_init) {
13422 : const PyTypeObject tmp
13423 : = {
13424 : /* PyObject header changed in Python 3 */
13425 : #if PY_VERSION_HEX >= 0x03000000
13426 : PyVarObject_HEAD_INIT(&PyType_Type, 0)
13427 : #else
13428 : PyObject_HEAD_INIT(NULL)
13429 : 0, /* Number of items in variable part (ob_size) */
13430 : #endif
13431 : (char *)"swigvarlink", /* Type name (tp_name) */
13432 : sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
13433 : 0, /* Itemsize (tp_itemsize) */
13434 : (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
13435 : (printfunc) swig_varlink_print, /* Print (tp_print) */
13436 : (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
13437 : (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
13438 : 0, /* tp_compare */
13439 : (reprfunc) swig_varlink_repr, /* tp_repr */
13440 : 0, /* tp_as_number */
13441 : 0, /* tp_as_sequence */
13442 : 0, /* tp_as_mapping */
13443 : 0, /* tp_hash */
13444 : 0, /* tp_call */
13445 : (reprfunc) swig_varlink_str, /* tp_str */
13446 : 0, /* tp_getattro */
13447 : 0, /* tp_setattro */
13448 : 0, /* tp_as_buffer */
13449 : 0, /* tp_flags */
13450 : varlink__doc__, /* tp_doc */
13451 : 0, /* tp_traverse */
13452 : 0, /* tp_clear */
13453 : 0, /* tp_richcompare */
13454 : 0, /* tp_weaklistoffset */
13455 : #if PY_VERSION_HEX >= 0x02020000
13456 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
13457 : #endif
13458 : #if PY_VERSION_HEX >= 0x02030000
13459 : 0, /* tp_del */
13460 : #endif
13461 : #ifdef COUNT_ALLOCS
13462 : 0,0,0,0 /* tp_alloc -> tp_next */
13463 : #endif
13464 : };
13465 : varlink_type = tmp;
13466 : /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
13467 : #if PY_VERSION_HEX < 0x03000000
13468 : varlink_type.ob_type = &PyType_Type;
13469 : #endif
13470 : type_init = 1;
13471 : }
13472 : return &varlink_type;
13473 : }
13474 :
13475 : /* Create a variable linking object for use later */
13476 : SWIGINTERN PyObject *
13477 : SWIG_Python_newvarlink(void) {
13478 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
13479 : if (result) {
13480 : result->vars = 0;
13481 : }
13482 : return ((PyObject*) result);
13483 : }
13484 :
13485 : SWIGINTERN void
13486 : SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
13487 : swig_varlinkobject *v = (swig_varlinkobject *) p;
13488 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
13489 : if (gv) {
13490 : size_t size = strlen(name)+1;
13491 : gv->name = (char *)malloc(size);
13492 : if (gv->name) {
13493 : strncpy(gv->name,name,size);
13494 : gv->get_attr = get_attr;
13495 : gv->set_attr = set_attr;
13496 : gv->next = v->vars;
13497 : }
13498 : }
13499 : v->vars = gv;
13500 : }
13501 :
13502 : SWIGINTERN PyObject *
13503 : SWIG_globals(void) {
13504 : static PyObject *_SWIG_globals = 0;
13505 : if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
13506 : return _SWIG_globals;
13507 : }
13508 :
13509 : /* -----------------------------------------------------------------------------
13510 : * constants/methods manipulation
13511 : * ----------------------------------------------------------------------------- */
13512 :
13513 : /* Install Constants */
13514 : SWIGINTERN void
13515 4 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
13516 4 : PyObject *obj = 0;
13517 : size_t i;
13518 4 : for (i = 0; constants[i].type; ++i) {
13519 0 : switch(constants[i].type) {
13520 : case SWIG_PY_POINTER:
13521 0 : obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
13522 0 : break;
13523 : case SWIG_PY_BINARY:
13524 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
13525 0 : break;
13526 : default:
13527 0 : obj = 0;
13528 : break;
13529 : }
13530 0 : if (obj) {
13531 0 : PyDict_SetItemString(d, constants[i].name, obj);
13532 0 : Py_DECREF(obj);
13533 : }
13534 : }
13535 4 : }
13536 :
13537 : /* -----------------------------------------------------------------------------*/
13538 : /* Fix SwigMethods to carry the callback ptrs when needed */
13539 : /* -----------------------------------------------------------------------------*/
13540 :
13541 : SWIGINTERN void
13542 4 : SWIG_Python_FixMethods(PyMethodDef *methods,
13543 : swig_const_info *const_table,
13544 : swig_type_info **types,
13545 : swig_type_info **types_initial) {
13546 : size_t i;
13547 512 : for (i = 0; methods[i].ml_name; ++i) {
13548 508 : const char *c = methods[i].ml_doc;
13549 1000 : if (c && (c = strstr(c, "swig_ptr: "))) {
13550 : int j;
13551 0 : swig_const_info *ci = 0;
13552 0 : const char *name = c + 10;
13553 0 : for (j = 0; const_table[j].type; ++j) {
13554 0 : if (strncmp(const_table[j].name, name,
13555 0 : strlen(const_table[j].name)) == 0) {
13556 0 : ci = &(const_table[j]);
13557 0 : break;
13558 : }
13559 : }
13560 0 : if (ci) {
13561 0 : size_t shift = (ci->ptype) - types;
13562 0 : swig_type_info *ty = types_initial[shift];
13563 0 : size_t ldoc = (c - methods[i].ml_doc);
13564 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
13565 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
13566 0 : if (ndoc) {
13567 0 : char *buff = ndoc;
13568 0 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
13569 0 : if (ptr) {
13570 0 : strncpy(buff, methods[i].ml_doc, ldoc);
13571 0 : buff += ldoc;
13572 : strncpy(buff, "swig_ptr: ", 10);
13573 0 : buff += 10;
13574 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
13575 0 : methods[i].ml_doc = ndoc;
13576 : }
13577 : }
13578 : }
13579 : }
13580 : }
13581 4 : }
13582 :
13583 : #ifdef __cplusplus
13584 : }
13585 : #endif
13586 :
13587 : /* -----------------------------------------------------------------------------*
13588 : * Partial Init method
13589 : * -----------------------------------------------------------------------------*/
13590 :
13591 : #ifdef __cplusplus
13592 : extern "C"
13593 : #endif
13594 :
13595 : SWIGEXPORT
13596 : #if PY_VERSION_HEX >= 0x03000000
13597 : PyObject*
13598 : #else
13599 : void
13600 : #endif
13601 4 : SWIG_init(void) {
13602 : PyObject *m, *d;
13603 : #if PY_VERSION_HEX >= 0x03000000
13604 : static struct PyModuleDef SWIG_module = {
13605 : PyModuleDef_HEAD_INIT,
13606 : (char *) SWIG_name,
13607 : NULL,
13608 : -1,
13609 : SwigMethods,
13610 : NULL,
13611 : NULL,
13612 : NULL,
13613 : NULL
13614 : };
13615 : #endif
13616 :
13617 : /* Fix SwigMethods to carry the callback ptrs when needed */
13618 4 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
13619 :
13620 : #if PY_VERSION_HEX >= 0x03000000
13621 : m = PyModule_Create(&SWIG_module);
13622 : #else
13623 4 : m = Py_InitModule((char *) SWIG_name, SwigMethods);
13624 : #endif
13625 4 : d = PyModule_GetDict(m);
13626 :
13627 4 : SWIG_InitializeModule(0);
13628 4 : SWIG_InstallConstants(d,swig_const_table);
13629 :
13630 :
13631 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\"]]"));
13632 4 : SWIG_Python_SetConstant(d, "SRS_PT_ALBERS_CONIC_EQUAL_AREA",SWIG_FromCharPtr("Albers_Conic_Equal_Area"));
13633 4 : SWIG_Python_SetConstant(d, "SRS_PT_AZIMUTHAL_EQUIDISTANT",SWIG_FromCharPtr("Azimuthal_Equidistant"));
13634 4 : SWIG_Python_SetConstant(d, "SRS_PT_CASSINI_SOLDNER",SWIG_FromCharPtr("Cassini_Soldner"));
13635 4 : SWIG_Python_SetConstant(d, "SRS_PT_CYLINDRICAL_EQUAL_AREA",SWIG_FromCharPtr("Cylindrical_Equal_Area"));
13636 4 : SWIG_Python_SetConstant(d, "SRS_PT_BONNE",SWIG_FromCharPtr("Bonne"));
13637 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_I",SWIG_FromCharPtr("Eckert_I"));
13638 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_II",SWIG_FromCharPtr("Eckert_II"));
13639 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_III",SWIG_FromCharPtr("Eckert_III"));
13640 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_IV",SWIG_FromCharPtr("Eckert_IV"));
13641 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_V",SWIG_FromCharPtr("Eckert_V"));
13642 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_VI",SWIG_FromCharPtr("Eckert_VI"));
13643 4 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIDISTANT_CONIC",SWIG_FromCharPtr("Equidistant_Conic"));
13644 4 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIRECTANGULAR",SWIG_FromCharPtr("Equirectangular"));
13645 4 : SWIG_Python_SetConstant(d, "SRS_PT_GALL_STEREOGRAPHIC",SWIG_FromCharPtr("Gall_Stereographic"));
13646 4 : SWIG_Python_SetConstant(d, "SRS_PT_GAUSSSCHREIBERTMERCATOR",SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
13647 4 : SWIG_Python_SetConstant(d, "SRS_PT_GEOSTATIONARY_SATELLITE",SWIG_FromCharPtr("Geostationary_Satellite"));
13648 4 : SWIG_Python_SetConstant(d, "SRS_PT_GOODE_HOMOLOSINE",SWIG_FromCharPtr("Goode_Homolosine"));
13649 4 : SWIG_Python_SetConstant(d, "SRS_PT_IGH",SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
13650 4 : SWIG_Python_SetConstant(d, "SRS_PT_GNOMONIC",SWIG_FromCharPtr("Gnomonic"));
13651 4 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
13652 4 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
13653 4 : SWIG_Python_SetConstant(d, "SRS_PT_LABORDE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
13654 4 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_1SP"));
13655 4 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP"));
13656 4 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP_Belgium"));
13657 4 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA",SWIG_FromCharPtr("Lambert_Azimuthal_Equal_Area"));
13658 4 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_1SP",SWIG_FromCharPtr("Mercator_1SP"));
13659 4 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_2SP",SWIG_FromCharPtr("Mercator_2SP"));
13660 4 : SWIG_Python_SetConstant(d, "SRS_PT_MILLER_CYLINDRICAL",SWIG_FromCharPtr("Miller_Cylindrical"));
13661 4 : SWIG_Python_SetConstant(d, "SRS_PT_MOLLWEIDE",SWIG_FromCharPtr("Mollweide"));
13662 4 : SWIG_Python_SetConstant(d, "SRS_PT_NEW_ZEALAND_MAP_GRID",SWIG_FromCharPtr("New_Zealand_Map_Grid"));
13663 4 : SWIG_Python_SetConstant(d, "SRS_PT_OBLIQUE_STEREOGRAPHIC",SWIG_FromCharPtr("Oblique_Stereographic"));
13664 4 : SWIG_Python_SetConstant(d, "SRS_PT_ORTHOGRAPHIC",SWIG_FromCharPtr("Orthographic"));
13665 4 : SWIG_Python_SetConstant(d, "SRS_PT_POLAR_STEREOGRAPHIC",SWIG_FromCharPtr("Polar_Stereographic"));
13666 4 : SWIG_Python_SetConstant(d, "SRS_PT_POLYCONIC",SWIG_FromCharPtr("Polyconic"));
13667 4 : SWIG_Python_SetConstant(d, "SRS_PT_ROBINSON",SWIG_FromCharPtr("Robinson"));
13668 4 : SWIG_Python_SetConstant(d, "SRS_PT_SINUSOIDAL",SWIG_FromCharPtr("Sinusoidal"));
13669 4 : SWIG_Python_SetConstant(d, "SRS_PT_STEREOGRAPHIC",SWIG_FromCharPtr("Stereographic"));
13670 4 : SWIG_Python_SetConstant(d, "SRS_PT_SWISS_OBLIQUE_CYLINDRICAL",SWIG_FromCharPtr("Swiss_Oblique_Cylindrical"));
13671 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR",SWIG_FromCharPtr("Transverse_Mercator"));
13672 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED",SWIG_FromCharPtr("Transverse_Mercator_South_Orientated"));
13673 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_21",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_21"));
13674 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_22",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_22"));
13675 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_23",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_23"));
13676 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_24",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_24"));
13677 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_25",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_25"));
13678 4 : SWIG_Python_SetConstant(d, "SRS_PT_TUNISIA_MINING_GRID",SWIG_FromCharPtr("Tunisia_Mining_Grid"));
13679 4 : SWIG_Python_SetConstant(d, "SRS_PT_TWO_POINT_EQUIDISTANT",SWIG_FromCharPtr("Two_Point_Equidistant"));
13680 4 : SWIG_Python_SetConstant(d, "SRS_PT_VANDERGRINTEN",SWIG_FromCharPtr("VanDerGrinten"));
13681 4 : SWIG_Python_SetConstant(d, "SRS_PT_KROVAK",SWIG_FromCharPtr("Krovak"));
13682 4 : SWIG_Python_SetConstant(d, "SRS_PT_IMW_POLYCONIC",SWIG_FromCharPtr("International_Map_of_the_World_Polyconic"));
13683 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_I",SWIG_FromCharPtr("Wagner_I"));
13684 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_II",SWIG_FromCharPtr("Wagner_II"));
13685 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_III",SWIG_FromCharPtr("Wagner_III"));
13686 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_IV",SWIG_FromCharPtr("Wagner_IV"));
13687 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_V",SWIG_FromCharPtr("Wagner_V"));
13688 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VI",SWIG_FromCharPtr("Wagner_VI"));
13689 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VII",SWIG_FromCharPtr("Wagner_VII"));
13690 4 : SWIG_Python_SetConstant(d, "SRS_PP_CENTRAL_MERIDIAN",SWIG_FromCharPtr("central_meridian"));
13691 4 : SWIG_Python_SetConstant(d, "SRS_PP_SCALE_FACTOR",SWIG_FromCharPtr("scale_factor"));
13692 4 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_1",SWIG_FromCharPtr("standard_parallel_1"));
13693 4 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_2",SWIG_FromCharPtr("standard_parallel_2"));
13694 4 : SWIG_Python_SetConstant(d, "SRS_PP_PSEUDO_STD_PARALLEL_1",SWIG_FromCharPtr("pseudo_standard_parallel_1"));
13695 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_CENTER",SWIG_FromCharPtr("longitude_of_center"));
13696 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_CENTER",SWIG_FromCharPtr("latitude_of_center"));
13697 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_ORIGIN",SWIG_FromCharPtr("longitude_of_origin"));
13698 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_ORIGIN",SWIG_FromCharPtr("latitude_of_origin"));
13699 4 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_EASTING",SWIG_FromCharPtr("false_easting"));
13700 4 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_NORTHING",SWIG_FromCharPtr("false_northing"));
13701 4 : SWIG_Python_SetConstant(d, "SRS_PP_AZIMUTH",SWIG_FromCharPtr("azimuth"));
13702 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_1",SWIG_FromCharPtr("longitude_of_point_1"));
13703 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_1",SWIG_FromCharPtr("latitude_of_point_1"));
13704 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_2",SWIG_FromCharPtr("longitude_of_point_2"));
13705 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_2",SWIG_FromCharPtr("latitude_of_point_2"));
13706 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_3",SWIG_FromCharPtr("longitude_of_point_3"));
13707 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_3",SWIG_FromCharPtr("latitude_of_point_3"));
13708 4 : SWIG_Python_SetConstant(d, "SRS_PP_RECTIFIED_GRID_ANGLE",SWIG_FromCharPtr("rectified_grid_angle"));
13709 4 : SWIG_Python_SetConstant(d, "SRS_PP_LANDSAT_NUMBER",SWIG_FromCharPtr("landsat_number"));
13710 4 : SWIG_Python_SetConstant(d, "SRS_PP_PATH_NUMBER",SWIG_FromCharPtr("path_number"));
13711 4 : SWIG_Python_SetConstant(d, "SRS_PP_PERSPECTIVE_POINT_HEIGHT",SWIG_FromCharPtr("perspective_point_height"));
13712 4 : SWIG_Python_SetConstant(d, "SRS_PP_SATELLITE_HEIGHT",SWIG_FromCharPtr("satellite_height"));
13713 4 : SWIG_Python_SetConstant(d, "SRS_PP_FIPSZONE",SWIG_FromCharPtr("fipszone"));
13714 4 : SWIG_Python_SetConstant(d, "SRS_PP_ZONE",SWIG_FromCharPtr("zone"));
13715 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Latitude_Of_1st_Point"));
13716 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Longitude_Of_1st_Point"));
13717 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Latitude_Of_2nd_Point"));
13718 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Longitude_Of_2nd_Point"));
13719 4 : SWIG_Python_SetConstant(d, "SRS_UL_METER",SWIG_FromCharPtr("Meter"));
13720 4 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT",SWIG_FromCharPtr("Foot (International)"));
13721 4 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
13722 4 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT",SWIG_FromCharPtr("Foot_US"));
13723 4 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT_CONV",SWIG_FromCharPtr("0.3048006096012192"));
13724 4 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE",SWIG_FromCharPtr("Nautical Mile"));
13725 4 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE_CONV",SWIG_FromCharPtr("1852.0"));
13726 4 : SWIG_Python_SetConstant(d, "SRS_UL_LINK",SWIG_FromCharPtr("Link"));
13727 4 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_CONV",SWIG_FromCharPtr("0.20116684023368047"));
13728 4 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN",SWIG_FromCharPtr("Chain"));
13729 4 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN_CONV",SWIG_FromCharPtr("20.116684023368047"));
13730 4 : SWIG_Python_SetConstant(d, "SRS_UL_ROD",SWIG_FromCharPtr("Rod"));
13731 4 : SWIG_Python_SetConstant(d, "SRS_UL_ROD_CONV",SWIG_FromCharPtr("5.02921005842012"));
13732 4 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke",SWIG_FromCharPtr("Link_Clarke"));
13733 4 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke_CONV",SWIG_FromCharPtr("0.2011661949"));
13734 4 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE",SWIG_FromCharPtr("degree"));
13735 4 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE_CONV",SWIG_FromCharPtr("0.0174532925199433"));
13736 4 : SWIG_Python_SetConstant(d, "SRS_UA_RADIAN",SWIG_FromCharPtr("radian"));
13737 4 : SWIG_Python_SetConstant(d, "SRS_PM_GREENWICH",SWIG_FromCharPtr("Greenwich"));
13738 4 : SWIG_Python_SetConstant(d, "SRS_DN_NAD27",SWIG_FromCharPtr("North_American_Datum_1927"));
13739 4 : SWIG_Python_SetConstant(d, "SRS_DN_NAD83",SWIG_FromCharPtr("North_American_Datum_1983"));
13740 4 : SWIG_Python_SetConstant(d, "SRS_DN_WGS72",SWIG_FromCharPtr("WGS_1972"));
13741 4 : SWIG_Python_SetConstant(d, "SRS_DN_WGS84",SWIG_FromCharPtr("WGS_1984"));
13742 4 : SWIG_Python_SetConstant(d, "SRS_WGS84_SEMIMAJOR",SWIG_From_double(static_cast< double >(6378137.0)));
13743 4 : SWIG_Python_SetConstant(d, "SRS_WGS84_INVFLATTENING",SWIG_From_double(static_cast< double >(298.257223563)));
13744 : #if PY_VERSION_HEX >= 0x03000000
13745 : return m;
13746 : #else
13747 : return;
13748 : #endif
13749 8 : }
13750 :
|