Line data Source code
1 : /* ----------------------------------------------------------------------------
2 : * This file was automatically generated by SWIG (http://www.swig.org).
3 : * Version 4.0.1
4 : *
5 : * This file is not intended to be easily readable and contains a number of
6 : * coding conventions designed to improve portability and efficiency. Do not make
7 : * changes to this file unless you know what you are doing--modify the SWIG
8 : * interface file instead.
9 : * ----------------------------------------------------------------------------- */
10 :
11 :
12 : #ifndef SWIGPYTHON
13 : #define SWIGPYTHON
14 : #define SED_HACKS
15 : #endif
16 :
17 : #define SWIG_PYTHON_THREADS
18 : #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
19 :
20 :
21 : #ifdef __cplusplus
22 : /* SwigValueWrapper is described in swig.swg */
23 : template<typename T> class SwigValueWrapper {
24 : struct SwigMovePointer {
25 : T *ptr;
26 : SwigMovePointer(T *p) : ptr(p) { }
27 : ~SwigMovePointer() { delete ptr; }
28 : SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
29 : } pointer;
30 : SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
31 : SwigValueWrapper(const SwigValueWrapper<T>& rhs);
32 : public:
33 : SwigValueWrapper() : pointer(0) { }
34 : SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
35 : operator T&() const { return *pointer.ptr; }
36 : T *operator&() { return pointer.ptr; }
37 : };
38 :
39 : template <typename T> T SwigValueInit() {
40 : return T();
41 : }
42 : #endif
43 :
44 : /* -----------------------------------------------------------------------------
45 : * This section contains generic SWIG labels for method/variable
46 : * declarations/attributes, and other compiler dependent labels.
47 : * ----------------------------------------------------------------------------- */
48 :
49 : /* template workaround for compilers that cannot correctly implement the C++ standard */
50 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
51 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
52 : # define SWIGTEMPLATEDISAMBIGUATOR template
53 : # elif defined(__HP_aCC)
54 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
55 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
56 : # define SWIGTEMPLATEDISAMBIGUATOR template
57 : # else
58 : # define SWIGTEMPLATEDISAMBIGUATOR
59 : # endif
60 : #endif
61 :
62 : /* inline attribute */
63 : #ifndef SWIGINLINE
64 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
65 : # define SWIGINLINE inline
66 : # else
67 : # define SWIGINLINE
68 : # endif
69 : #endif
70 :
71 : /* attribute recognised by some compilers to avoid 'unused' warnings */
72 : #ifndef SWIGUNUSED
73 : # if defined(__GNUC__)
74 : # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
75 : # define SWIGUNUSED __attribute__ ((__unused__))
76 : # else
77 : # define SWIGUNUSED
78 : # endif
79 : # elif defined(__ICC)
80 : # define SWIGUNUSED __attribute__ ((__unused__))
81 : # else
82 : # define SWIGUNUSED
83 : # endif
84 : #endif
85 :
86 : #ifndef SWIG_MSC_UNSUPPRESS_4505
87 : # if defined(_MSC_VER)
88 : # pragma warning(disable : 4505) /* unreferenced local function has been removed */
89 : # endif
90 : #endif
91 :
92 : #ifndef SWIGUNUSEDPARM
93 : # ifdef __cplusplus
94 : # define SWIGUNUSEDPARM(p)
95 : # else
96 : # define SWIGUNUSEDPARM(p) p SWIGUNUSED
97 : # endif
98 : #endif
99 :
100 : /* internal SWIG method */
101 : #ifndef SWIGINTERN
102 : # define SWIGINTERN static SWIGUNUSED
103 : #endif
104 :
105 : /* internal inline SWIG method */
106 : #ifndef SWIGINTERNINLINE
107 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
108 : #endif
109 :
110 : /* exporting methods */
111 : #if defined(__GNUC__)
112 : # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
113 : # ifndef GCC_HASCLASSVISIBILITY
114 : # define GCC_HASCLASSVISIBILITY
115 : # endif
116 : # endif
117 : #endif
118 :
119 : #ifndef SWIGEXPORT
120 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
121 : # if defined(STATIC_LINKED)
122 : # define SWIGEXPORT
123 : # else
124 : # define SWIGEXPORT __declspec(dllexport)
125 : # endif
126 : # else
127 : # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
128 : # define SWIGEXPORT __attribute__ ((visibility("default")))
129 : # else
130 : # define SWIGEXPORT
131 : # endif
132 : # endif
133 : #endif
134 :
135 : /* calling conventions for Windows */
136 : #ifndef SWIGSTDCALL
137 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
138 : # define SWIGSTDCALL __stdcall
139 : # else
140 : # define SWIGSTDCALL
141 : # endif
142 : #endif
143 :
144 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
145 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
146 : # define _CRT_SECURE_NO_DEPRECATE
147 : #endif
148 :
149 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
150 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
151 : # define _SCL_SECURE_NO_DEPRECATE
152 : #endif
153 :
154 : /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
155 : #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
156 : # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
157 : #endif
158 :
159 : /* Intel's compiler complains if a variable which was never initialised is
160 : * cast to void, which is a common idiom which we use to indicate that we
161 : * are aware a variable isn't used. So we just silence that warning.
162 : * See: https://github.com/swig/swig/issues/192 for more discussion.
163 : */
164 : #ifdef __INTEL_COMPILER
165 : # pragma warning disable 592
166 : #endif
167 :
168 :
169 : #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
170 : /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
171 : # include <math.h>
172 : #endif
173 :
174 : #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
175 : /* Use debug wrappers with the Python release dll */
176 : # undef _DEBUG
177 : # include <Python.h>
178 : # define _DEBUG 1
179 : #else
180 : # include <Python.h>
181 : #endif
182 :
183 : /* -----------------------------------------------------------------------------
184 : * swigrun.swg
185 : *
186 : * This file contains generic C API SWIG runtime support for pointer
187 : * type checking.
188 : * ----------------------------------------------------------------------------- */
189 :
190 : /* This should only be incremented when either the layout of swig_type_info changes,
191 : or for whatever reason, the runtime changes incompatibly */
192 : #define SWIG_RUNTIME_VERSION "4"
193 :
194 : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
195 : #ifdef SWIG_TYPE_TABLE
196 : # define SWIG_QUOTE_STRING(x) #x
197 : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
198 : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
199 : #else
200 : # define SWIG_TYPE_TABLE_NAME
201 : #endif
202 :
203 : /*
204 : You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
205 : creating a static or dynamic library from the SWIG runtime code.
206 : In 99.9% of the cases, SWIG just needs to declare them as 'static'.
207 :
208 : But only do this if strictly necessary, ie, if you have problems
209 : with your compiler or suchlike.
210 : */
211 :
212 : #ifndef SWIGRUNTIME
213 : # define SWIGRUNTIME SWIGINTERN
214 : #endif
215 :
216 : #ifndef SWIGRUNTIMEINLINE
217 : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
218 : #endif
219 :
220 : /* Generic buffer size */
221 : #ifndef SWIG_BUFFER_SIZE
222 : # define SWIG_BUFFER_SIZE 1024
223 : #endif
224 :
225 : /* Flags for pointer conversions */
226 : #define SWIG_POINTER_DISOWN 0x1
227 : #define SWIG_CAST_NEW_MEMORY 0x2
228 : #define SWIG_POINTER_NO_NULL 0x4
229 :
230 : /* Flags for new pointer objects */
231 : #define SWIG_POINTER_OWN 0x1
232 :
233 :
234 : /*
235 : Flags/methods for returning states.
236 :
237 : The SWIG conversion methods, as ConvertPtr, return an integer
238 : that tells if the conversion was successful or not. And if not,
239 : an error code can be returned (see swigerrors.swg for the codes).
240 :
241 : Use the following macros/flags to set or process the returning
242 : states.
243 :
244 : In old versions of SWIG, code such as the following was usually written:
245 :
246 : if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
247 : // success code
248 : } else {
249 : //fail code
250 : }
251 :
252 : Now you can be more explicit:
253 :
254 : int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
255 : if (SWIG_IsOK(res)) {
256 : // success code
257 : } else {
258 : // fail code
259 : }
260 :
261 : which is the same really, but now you can also do
262 :
263 : Type *ptr;
264 : int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
265 : if (SWIG_IsOK(res)) {
266 : // success code
267 : if (SWIG_IsNewObj(res) {
268 : ...
269 : delete *ptr;
270 : } else {
271 : ...
272 : }
273 : } else {
274 : // fail code
275 : }
276 :
277 : I.e., now SWIG_ConvertPtr can return new objects and you can
278 : identify the case and take care of the deallocation. Of course that
279 : also requires SWIG_ConvertPtr to return new result values, such as
280 :
281 : int SWIG_ConvertPtr(obj, ptr,...) {
282 : if (<obj is ok>) {
283 : if (<need new object>) {
284 : *ptr = <ptr to new allocated object>;
285 : return SWIG_NEWOBJ;
286 : } else {
287 : *ptr = <ptr to old object>;
288 : return SWIG_OLDOBJ;
289 : }
290 : } else {
291 : return SWIG_BADOBJ;
292 : }
293 : }
294 :
295 : Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
296 : more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
297 : SWIG errors code.
298 :
299 : Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
300 : allows to return the 'cast rank', for example, if you have this
301 :
302 : int food(double)
303 : int fooi(int);
304 :
305 : and you call
306 :
307 : food(1) // cast rank '1' (1 -> 1.0)
308 : fooi(1) // cast rank '0'
309 :
310 : just use the SWIG_AddCast()/SWIG_CheckState()
311 : */
312 :
313 : #define SWIG_OK (0)
314 : #define SWIG_ERROR (-1)
315 : #define SWIG_IsOK(r) (r >= 0)
316 : #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
317 :
318 : /* The CastRankLimit says how many bits are used for the cast rank */
319 : #define SWIG_CASTRANKLIMIT (1 << 8)
320 : /* The NewMask denotes the object was created (using new/malloc) */
321 : #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
322 : /* The TmpMask is for in/out typemaps that use temporal objects */
323 : #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
324 : /* Simple returning values */
325 : #define SWIG_BADOBJ (SWIG_ERROR)
326 : #define SWIG_OLDOBJ (SWIG_OK)
327 : #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
328 : #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
329 : /* Check, add and del mask methods */
330 : #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
331 : #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
332 : #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
333 : #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
334 : #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
335 : #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
336 :
337 : /* Cast-Rank Mode */
338 : #if defined(SWIG_CASTRANK_MODE)
339 : # ifndef SWIG_TypeRank
340 : # define SWIG_TypeRank unsigned long
341 : # endif
342 : # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
343 : # define SWIG_MAXCASTRANK (2)
344 : # endif
345 : # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
346 : # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
347 : SWIGINTERNINLINE int SWIG_AddCast(int r) {
348 : return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
349 : }
350 : SWIGINTERNINLINE int SWIG_CheckState(int r) {
351 : return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
352 : }
353 : #else /* no cast-rank mode */
354 : # define SWIG_AddCast(r) (r)
355 : # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
356 : #endif
357 :
358 :
359 : #include <string.h>
360 :
361 : #ifdef __cplusplus
362 : extern "C" {
363 : #endif
364 :
365 : typedef void *(*swig_converter_func)(void *, int *);
366 : typedef struct swig_type_info *(*swig_dycast_func)(void **);
367 :
368 : /* Structure to store information on one type */
369 : typedef struct swig_type_info {
370 : const char *name; /* mangled name of this type */
371 : const char *str; /* human readable name of this type */
372 : swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
373 : struct swig_cast_info *cast; /* linked list of types that can cast into this type */
374 : void *clientdata; /* language specific type data */
375 : int owndata; /* flag if the structure owns the clientdata */
376 : } swig_type_info;
377 :
378 : /* Structure to store a type and conversion function used for casting */
379 : typedef struct swig_cast_info {
380 : swig_type_info *type; /* pointer to type that is equivalent to this type */
381 : swig_converter_func converter; /* function to cast the void pointers */
382 : struct swig_cast_info *next; /* pointer to next cast in linked list */
383 : struct swig_cast_info *prev; /* pointer to the previous cast */
384 : } swig_cast_info;
385 :
386 : /* Structure used to store module information
387 : * Each module generates one structure like this, and the runtime collects
388 : * all of these structures and stores them in a circularly linked list.*/
389 : typedef struct swig_module_info {
390 : swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
391 : size_t size; /* Number of types in this module */
392 : struct swig_module_info *next; /* Pointer to next element in circularly linked list */
393 : swig_type_info **type_initial; /* Array of initially generated type structures */
394 : swig_cast_info **cast_initial; /* Array of initially generated casting structures */
395 : void *clientdata; /* Language specific module data */
396 : } swig_module_info;
397 :
398 : /*
399 : Compare two type names skipping the space characters, therefore
400 : "char*" == "char *" and "Class<int>" == "Class<int >", etc.
401 :
402 : Return 0 when the two name types are equivalent, as in
403 : strncmp, but skipping ' '.
404 : */
405 : SWIGRUNTIME int
406 0 : SWIG_TypeNameComp(const char *f1, const char *l1,
407 : const char *f2, const char *l2) {
408 0 : for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
409 0 : while ((*f1 == ' ') && (f1 != l1)) ++f1;
410 0 : while ((*f2 == ' ') && (f2 != l2)) ++f2;
411 0 : if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
412 : }
413 0 : return (int)((l1 - f1) - (l2 - f2));
414 : }
415 :
416 : /*
417 : Check type equivalence in a name list like <name1>|<name2>|...
418 : Return 0 if equal, -1 if nb < tb, 1 if nb > tb
419 : */
420 : SWIGRUNTIME int
421 0 : SWIG_TypeCmp(const char *nb, const char *tb) {
422 0 : int equiv = 1;
423 0 : const char* te = tb + strlen(tb);
424 0 : const char* ne = nb;
425 0 : while (equiv != 0 && *ne) {
426 0 : for (nb = ne; *ne; ++ne) {
427 0 : if (*ne == '|') break;
428 : }
429 0 : equiv = SWIG_TypeNameComp(nb, ne, tb, te);
430 0 : if (*ne) ++ne;
431 : }
432 0 : return equiv;
433 : }
434 :
435 : /*
436 : Check type equivalence in a name list like <name1>|<name2>|...
437 : Return 0 if not equal, 1 if equal
438 : */
439 : SWIGRUNTIME int
440 0 : SWIG_TypeEquiv(const char *nb, const char *tb) {
441 0 : return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
442 : }
443 :
444 : /*
445 : Check the typename
446 : */
447 : SWIGRUNTIME swig_cast_info *
448 2199 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
449 2199 : if (ty) {
450 2199 : swig_cast_info *iter = ty->cast;
451 2199 : while (iter) {
452 2199 : if (strcmp(iter->type->name, c) == 0) {
453 2199 : if (iter == ty->cast)
454 : return iter;
455 : /* Move iter to the top of the linked list */
456 0 : iter->prev->next = iter->next;
457 0 : if (iter->next)
458 0 : iter->next->prev = iter->prev;
459 0 : iter->next = ty->cast;
460 0 : iter->prev = 0;
461 0 : if (ty->cast) ty->cast->prev = iter;
462 0 : ty->cast = iter;
463 0 : return iter;
464 : }
465 0 : iter = iter->next;
466 : }
467 : }
468 : return 0;
469 : }
470 :
471 : /*
472 : Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
473 : */
474 : SWIGRUNTIME swig_cast_info *
475 : SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
476 : if (ty) {
477 : swig_cast_info *iter = ty->cast;
478 : while (iter) {
479 : if (iter->type == from) {
480 : if (iter == ty->cast)
481 : return iter;
482 : /* Move iter to the top of the linked list */
483 : iter->prev->next = iter->next;
484 : if (iter->next)
485 : iter->next->prev = iter->prev;
486 : iter->next = ty->cast;
487 : iter->prev = 0;
488 : if (ty->cast) ty->cast->prev = iter;
489 : ty->cast = iter;
490 : return iter;
491 : }
492 : iter = iter->next;
493 : }
494 : }
495 : return 0;
496 : }
497 :
498 : /*
499 : Cast a pointer up an inheritance hierarchy
500 : */
501 : SWIGRUNTIMEINLINE void *
502 0 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
503 0 : return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
504 : }
505 :
506 : /*
507 : Dynamic pointer casting. Down an inheritance hierarchy
508 : */
509 : SWIGRUNTIME swig_type_info *
510 : SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
511 : swig_type_info *lastty = ty;
512 : if (!ty || !ty->dcast) return ty;
513 : while (ty && (ty->dcast)) {
514 : ty = (*ty->dcast)(ptr);
515 : if (ty) lastty = ty;
516 : }
517 : return lastty;
518 : }
519 :
520 : /*
521 : Return the name associated with this type
522 : */
523 : SWIGRUNTIMEINLINE const char *
524 : SWIG_TypeName(const swig_type_info *ty) {
525 : return ty->name;
526 : }
527 :
528 : /*
529 : Return the pretty name associated with this type,
530 : that is an unmangled type name in a form presentable to the user.
531 : */
532 : SWIGRUNTIME const char *
533 1 : SWIG_TypePrettyName(const swig_type_info *type) {
534 : /* The "str" field contains the equivalent pretty names of the
535 : type, separated by vertical-bar characters. We choose
536 : to print the last name, as it is often (?) the most
537 : specific. */
538 1 : if (!type) return NULL;
539 1 : if (type->str != NULL) {
540 : const char *last_name = type->str;
541 : const char *s;
542 28 : for (s = type->str; *s; s++)
543 27 : if (*s == '|') last_name = s+1;
544 : return last_name;
545 : }
546 : else
547 0 : return type->name;
548 : }
549 :
550 : /*
551 : Set the clientdata field for a type
552 : */
553 : SWIGRUNTIME void
554 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
555 : swig_cast_info *cast = ti->cast;
556 : /* if (ti->clientdata == clientdata) return; */
557 : ti->clientdata = clientdata;
558 :
559 : while (cast) {
560 : if (!cast->converter) {
561 : swig_type_info *tc = cast->type;
562 : if (!tc->clientdata) {
563 : SWIG_TypeClientData(tc, clientdata);
564 : }
565 : }
566 : cast = cast->next;
567 : }
568 : }
569 : SWIGRUNTIME void
570 1375 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
571 1375 : SWIG_TypeClientData(ti, clientdata);
572 1375 : ti->owndata = 1;
573 : }
574 :
575 : /*
576 : Search for a swig_type_info structure only by mangled name
577 : Search is a O(log #types)
578 :
579 : We start searching at module start, and finish searching when start == end.
580 : Note: if start == end at the beginning of the function, we go all the way around
581 : the circular list.
582 : */
583 : SWIGRUNTIME swig_type_info *
584 7730 : SWIG_MangledTypeQueryModule(swig_module_info *start,
585 : swig_module_info *end,
586 : const char *name) {
587 7730 : swig_module_info *iter = start;
588 14294 : do {
589 14294 : if (iter->size) {
590 14294 : size_t l = 0;
591 14294 : size_t r = iter->size - 1;
592 63364 : do {
593 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
594 63364 : size_t i = (l + r) >> 1;
595 63364 : const char *iname = iter->types[i]->name;
596 63364 : if (iname) {
597 63364 : int compare = strcmp(name, iname);
598 63364 : if (compare == 0) {
599 4428 : return iter->types[i];
600 58936 : } else if (compare < 0) {
601 21480 : if (i) {
602 19842 : r = i - 1;
603 : } else {
604 : break;
605 : }
606 37456 : } else if (compare > 0) {
607 37456 : l = i + 1;
608 : }
609 : } else {
610 : break; /* should never happen */
611 : }
612 57298 : } while (l <= r);
613 : }
614 9866 : iter = iter->next;
615 9866 : } while (iter != end);
616 : return 0;
617 : }
618 :
619 : /*
620 : Search for a swig_type_info structure for either a mangled name or a human readable name.
621 : It first searches the mangled names of the types, which is a O(log #types)
622 : If a type is not found it then searches the human readable names, which is O(#types).
623 :
624 : We start searching at module start, and finish searching when start == end.
625 : Note: if start == end at the beginning of the function, we go all the way around
626 : the circular list.
627 : */
628 : SWIGRUNTIME swig_type_info *
629 30 : SWIG_TypeQueryModule(swig_module_info *start,
630 : swig_module_info *end,
631 : const char *name) {
632 : /* STEP 1: Search the name field using binary search */
633 30 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
634 30 : if (ret) {
635 : return ret;
636 : } else {
637 : /* STEP 2: If the type hasn't been found, do a complete search
638 : of the str field (the human readable name) */
639 : swig_module_info *iter = start;
640 0 : do {
641 0 : size_t i = 0;
642 0 : for (; i < iter->size; ++i) {
643 0 : if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
644 0 : return iter->types[i];
645 : }
646 0 : iter = iter->next;
647 0 : } while (iter != end);
648 : }
649 :
650 : /* neither found a match */
651 : return 0;
652 : }
653 :
654 : /*
655 : Pack binary data into a string
656 : */
657 : SWIGRUNTIME char *
658 0 : SWIG_PackData(char *c, void *ptr, size_t sz) {
659 0 : static const char hex[17] = "0123456789abcdef";
660 0 : const unsigned char *u = (unsigned char *) ptr;
661 0 : const unsigned char *eu = u + sz;
662 0 : for (; u != eu; ++u) {
663 0 : unsigned char uu = *u;
664 0 : *(c++) = hex[(uu & 0xf0) >> 4];
665 0 : *(c++) = hex[uu & 0xf];
666 : }
667 0 : return c;
668 : }
669 :
670 : /*
671 : Unpack binary data from a string
672 : */
673 : SWIGRUNTIME const char *
674 : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
675 : unsigned char *u = (unsigned char *) ptr;
676 : const unsigned char *eu = u + sz;
677 : for (; u != eu; ++u) {
678 : char d = *(c++);
679 : unsigned char uu;
680 : if ((d >= '0') && (d <= '9'))
681 : uu = (unsigned char)((d - '0') << 4);
682 : else if ((d >= 'a') && (d <= 'f'))
683 : uu = (unsigned char)((d - ('a'-10)) << 4);
684 : else
685 : return (char *) 0;
686 : d = *(c++);
687 : if ((d >= '0') && (d <= '9'))
688 : uu |= (unsigned char)(d - '0');
689 : else if ((d >= 'a') && (d <= 'f'))
690 : uu |= (unsigned char)(d - ('a'-10));
691 : else
692 : return (char *) 0;
693 : *u = uu;
694 : }
695 : return c;
696 : }
697 :
698 : /*
699 : Pack 'void *' into a string buffer.
700 : */
701 : SWIGRUNTIME char *
702 0 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
703 0 : char *r = buff;
704 0 : if ((2*sizeof(void *) + 2) > bsz) return 0;
705 0 : *(r++) = '_';
706 0 : r = SWIG_PackData(r,&ptr,sizeof(void *));
707 0 : if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
708 0 : strcpy(r,name);
709 0 : return buff;
710 : }
711 :
712 : SWIGRUNTIME const char *
713 : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
714 : if (*c != '_') {
715 : if (strcmp(c,"NULL") == 0) {
716 : *ptr = (void *) 0;
717 : return name;
718 : } else {
719 : return 0;
720 : }
721 : }
722 : return SWIG_UnpackData(++c,ptr,sizeof(void *));
723 : }
724 :
725 : SWIGRUNTIME char *
726 0 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
727 0 : char *r = buff;
728 0 : size_t lname = (name ? strlen(name) : 0);
729 0 : if ((2*sz + 2 + lname) > bsz) return 0;
730 0 : *(r++) = '_';
731 0 : r = SWIG_PackData(r,ptr,sz);
732 0 : if (lname) {
733 0 : strncpy(r,name,lname+1);
734 : } else {
735 0 : *r = 0;
736 : }
737 : return buff;
738 : }
739 :
740 : SWIGRUNTIME const char *
741 : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
742 : if (*c != '_') {
743 : if (strcmp(c,"NULL") == 0) {
744 : memset(ptr,0,sz);
745 : return name;
746 : } else {
747 : return 0;
748 : }
749 : }
750 : return SWIG_UnpackData(++c,ptr,sz);
751 : }
752 :
753 : #ifdef __cplusplus
754 : }
755 : #endif
756 :
757 : /* Errors in SWIG */
758 : #define SWIG_UnknownError -1
759 : #define SWIG_IOError -2
760 : #define SWIG_RuntimeError -3
761 : #define SWIG_IndexError -4
762 : #define SWIG_TypeError -5
763 : #define SWIG_DivisionByZero -6
764 : #define SWIG_OverflowError -7
765 : #define SWIG_SyntaxError -8
766 : #define SWIG_ValueError -9
767 : #define SWIG_SystemError -10
768 : #define SWIG_AttributeError -11
769 : #define SWIG_MemoryError -12
770 : #define SWIG_NullReferenceError -13
771 :
772 :
773 :
774 : /* Compatibility macros for Python 3 */
775 : #if PY_VERSION_HEX >= 0x03000000
776 :
777 : #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
778 : #define PyInt_Check(x) PyLong_Check(x)
779 : #define PyInt_AsLong(x) PyLong_AsLong(x)
780 : #define PyInt_FromLong(x) PyLong_FromLong(x)
781 : #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
782 : #define PyString_Check(name) PyBytes_Check(name)
783 : #define PyString_FromString(x) PyUnicode_FromString(x)
784 : #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
785 : #define PyString_AsString(str) PyBytes_AsString(str)
786 : #define PyString_Size(str) PyBytes_Size(str)
787 : #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
788 : #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
789 : #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
790 : #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
791 :
792 : #endif
793 :
794 : #ifndef Py_TYPE
795 : # define Py_TYPE(op) ((op)->ob_type)
796 : #endif
797 :
798 : /* SWIG APIs for compatibility of both Python 2 & 3 */
799 :
800 : #if PY_VERSION_HEX >= 0x03000000
801 : # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
802 : #else
803 : # define SWIG_Python_str_FromFormat PyString_FromFormat
804 : #endif
805 :
806 :
807 : /* Warning: This function will allocate a new string in Python 3,
808 : * so please call SWIG_Python_str_DelForPy3(x) to free the space.
809 : */
810 : SWIGINTERN char*
811 : SWIG_Python_str_AsChar(PyObject *str)
812 : {
813 : #if PY_VERSION_HEX >= 0x03000000
814 : char *newstr = 0;
815 : str = PyUnicode_AsUTF8String(str);
816 : if (str) {
817 : char *cstr;
818 : Py_ssize_t len;
819 : PyBytes_AsStringAndSize(str, &cstr, &len);
820 : newstr = (char *) malloc(len+1);
821 : memcpy(newstr, cstr, len+1);
822 : Py_XDECREF(str);
823 : }
824 : return newstr;
825 : #else
826 : return PyString_AsString(str);
827 : #endif
828 : }
829 :
830 : #if PY_VERSION_HEX >= 0x03000000
831 : # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
832 : #else
833 : # define SWIG_Python_str_DelForPy3(x)
834 : #endif
835 :
836 :
837 : SWIGINTERN PyObject*
838 305 : SWIG_Python_str_FromChar(const char *c)
839 : {
840 : #if PY_VERSION_HEX >= 0x03000000
841 305 : return PyUnicode_FromString(c);
842 : #else
843 : return PyString_FromString(c);
844 : #endif
845 : }
846 :
847 : #ifndef PyObject_DEL
848 : # define PyObject_DEL PyObject_Del
849 : #endif
850 :
851 : // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
852 : // interface files check for it.
853 : # define SWIGPY_USE_CAPSULE
854 : # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
855 :
856 : #if PY_VERSION_HEX < 0x03020000
857 : #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
858 : #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
859 : #define Py_hash_t long
860 : #endif
861 :
862 : /* -----------------------------------------------------------------------------
863 : * error manipulation
864 : * ----------------------------------------------------------------------------- */
865 :
866 : SWIGRUNTIME PyObject*
867 7 : SWIG_Python_ErrorType(int code) {
868 7 : PyObject* type = 0;
869 0 : switch(code) {
870 0 : case SWIG_MemoryError:
871 0 : type = PyExc_MemoryError;
872 0 : break;
873 0 : case SWIG_IOError:
874 0 : type = PyExc_IOError;
875 0 : break;
876 7 : case SWIG_RuntimeError:
877 7 : type = PyExc_RuntimeError;
878 0 : break;
879 0 : case SWIG_IndexError:
880 0 : type = PyExc_IndexError;
881 0 : break;
882 0 : case SWIG_TypeError:
883 0 : type = PyExc_TypeError;
884 0 : break;
885 0 : case SWIG_DivisionByZero:
886 0 : type = PyExc_ZeroDivisionError;
887 0 : break;
888 0 : case SWIG_OverflowError:
889 0 : type = PyExc_OverflowError;
890 0 : break;
891 0 : case SWIG_SyntaxError:
892 0 : type = PyExc_SyntaxError;
893 0 : break;
894 0 : case SWIG_ValueError:
895 0 : type = PyExc_ValueError;
896 0 : break;
897 0 : case SWIG_SystemError:
898 0 : type = PyExc_SystemError;
899 0 : break;
900 0 : case SWIG_AttributeError:
901 0 : type = PyExc_AttributeError;
902 0 : break;
903 0 : default:
904 0 : type = PyExc_RuntimeError;
905 : }
906 7 : return type;
907 : }
908 :
909 :
910 : SWIGRUNTIME void
911 : SWIG_Python_AddErrorMsg(const char* mesg)
912 : {
913 : PyObject *type = 0;
914 : PyObject *value = 0;
915 : PyObject *traceback = 0;
916 :
917 : if (PyErr_Occurred())
918 : PyErr_Fetch(&type, &value, &traceback);
919 : if (value) {
920 : PyObject *old_str = PyObject_Str(value);
921 : const char *tmp = SWIG_Python_str_AsChar(old_str);
922 : PyErr_Clear();
923 : Py_XINCREF(type);
924 : if (tmp)
925 : PyErr_Format(type, "%s %s", tmp, mesg);
926 : else
927 : PyErr_Format(type, "%s", mesg);
928 : SWIG_Python_str_DelForPy3(tmp);
929 : Py_DECREF(old_str);
930 : Py_DECREF(value);
931 : } else {
932 : PyErr_SetString(PyExc_RuntimeError, mesg);
933 : }
934 : }
935 :
936 : SWIGRUNTIME int
937 2 : SWIG_Python_TypeErrorOccurred(PyObject *obj)
938 : {
939 2 : PyObject *error;
940 2 : if (obj)
941 : return 0;
942 2 : error = PyErr_Occurred();
943 2 : return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
944 : }
945 :
946 : SWIGRUNTIME void
947 2 : SWIG_Python_RaiseOrModifyTypeError(const char *message)
948 : {
949 2 : if (SWIG_Python_TypeErrorOccurred(NULL)) {
950 : /* Use existing TypeError to preserve stacktrace and enhance with given message */
951 0 : PyObject *newvalue;
952 0 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
953 0 : PyErr_Fetch(&type, &value, &traceback);
954 : #if PY_VERSION_HEX >= 0x03000000
955 0 : newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
956 : #else
957 : newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
958 : #endif
959 0 : Py_XDECREF(value);
960 0 : PyErr_Restore(type, newvalue, traceback);
961 : } else {
962 : /* Raise TypeError using given message */
963 2 : PyErr_SetString(PyExc_TypeError, message);
964 : }
965 2 : }
966 :
967 : #if defined(SWIG_PYTHON_NO_THREADS)
968 : # if defined(SWIG_PYTHON_THREADS)
969 : # undef SWIG_PYTHON_THREADS
970 : # endif
971 : #endif
972 : #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
973 : # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
974 : # define SWIG_PYTHON_USE_GIL
975 : # endif
976 : # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
977 : # ifndef SWIG_PYTHON_INITIALIZE_THREADS
978 : # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
979 : # endif
980 : # ifdef __cplusplus /* C++ code */
981 : class SWIG_Python_Thread_Block {
982 : bool status;
983 : PyGILState_STATE state;
984 : public:
985 14 : void end() { if (status) { PyGILState_Release(state); status = false;} }
986 14 : SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
987 0 : ~SWIG_Python_Thread_Block() { end(); }
988 : };
989 : class SWIG_Python_Thread_Allow {
990 : bool status;
991 : PyThreadState *save;
992 : public:
993 : void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
994 : SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
995 : ~SWIG_Python_Thread_Allow() { end(); }
996 : };
997 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
998 : # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
999 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1000 : # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1001 : # else /* C code */
1002 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1003 : # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1004 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1005 : # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1006 : # endif
1007 : # else /* Old thread way, not implemented, user must provide it */
1008 : # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1009 : # define SWIG_PYTHON_INITIALIZE_THREADS
1010 : # endif
1011 : # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1012 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1013 : # endif
1014 : # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1015 : # define SWIG_PYTHON_THREAD_END_BLOCK
1016 : # endif
1017 : # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1018 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1019 : # endif
1020 : # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1021 : # define SWIG_PYTHON_THREAD_END_ALLOW
1022 : # endif
1023 : # endif
1024 : #else /* No thread support */
1025 : # define SWIG_PYTHON_INITIALIZE_THREADS
1026 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1027 : # define SWIG_PYTHON_THREAD_END_BLOCK
1028 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1029 : # define SWIG_PYTHON_THREAD_END_ALLOW
1030 : #endif
1031 :
1032 : /* -----------------------------------------------------------------------------
1033 : * Python API portion that goes into the runtime
1034 : * ----------------------------------------------------------------------------- */
1035 :
1036 : #ifdef __cplusplus
1037 : extern "C" {
1038 : #endif
1039 :
1040 : /* -----------------------------------------------------------------------------
1041 : * Constant declarations
1042 : * ----------------------------------------------------------------------------- */
1043 :
1044 : /* Constant Types */
1045 : #define SWIG_PY_POINTER 4
1046 : #define SWIG_PY_BINARY 5
1047 :
1048 : /* Constant information structure */
1049 : typedef struct swig_const_info {
1050 : int type;
1051 : const char *name;
1052 : long lvalue;
1053 : double dvalue;
1054 : void *pvalue;
1055 : swig_type_info **ptype;
1056 : } swig_const_info;
1057 :
1058 : #ifdef __cplusplus
1059 : }
1060 : #endif
1061 :
1062 :
1063 : /* -----------------------------------------------------------------------------
1064 : * pyrun.swg
1065 : *
1066 : * This file contains the runtime support for Python modules
1067 : * and includes code for managing global variables and pointer
1068 : * type checking.
1069 : *
1070 : * ----------------------------------------------------------------------------- */
1071 :
1072 : #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1073 : # error "This version of SWIG only supports Python >= 2.7"
1074 : #endif
1075 :
1076 : #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1077 : # error "This version of SWIG only supports Python 3 >= 3.2"
1078 : #endif
1079 :
1080 : /* Common SWIG API */
1081 :
1082 : /* for raw pointers */
1083 : #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1084 : #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1085 : #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1086 :
1087 : #ifdef SWIGPYTHON_BUILTIN
1088 : #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1089 : #else
1090 : #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1091 : #endif
1092 :
1093 : #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1094 :
1095 : #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1096 : #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1097 : #define swig_owntype int
1098 :
1099 : /* for raw packed data */
1100 : #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1101 : #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1102 :
1103 : /* for class or struct pointers */
1104 : #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1105 : #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1106 :
1107 : /* for C or C++ function pointers */
1108 : #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1109 : #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1110 :
1111 : /* for C++ member pointers, ie, member methods */
1112 : #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1113 : #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1114 :
1115 :
1116 : /* Runtime API */
1117 :
1118 : #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1119 : #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1120 : #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1121 :
1122 : #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1123 : #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1124 : #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1125 : #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1126 : #define SWIG_fail goto fail
1127 :
1128 :
1129 : /* Runtime API implementation */
1130 :
1131 : /* Error manipulation */
1132 :
1133 : SWIGINTERN void
1134 : SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1135 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1136 : PyErr_SetObject(errtype, obj);
1137 : Py_DECREF(obj);
1138 : SWIG_PYTHON_THREAD_END_BLOCK;
1139 : }
1140 :
1141 : SWIGINTERN void
1142 7 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1143 7 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1144 7 : PyErr_SetString(errtype, msg);
1145 7 : SWIG_PYTHON_THREAD_END_BLOCK;
1146 7 : }
1147 :
1148 : #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1149 :
1150 : /* Set a constant value */
1151 :
1152 : #if defined(SWIGPYTHON_BUILTIN)
1153 :
1154 : SWIGINTERN void
1155 : SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1156 : PyObject *s = PyString_InternFromString(key);
1157 : PyList_Append(seq, s);
1158 : Py_DECREF(s);
1159 : }
1160 :
1161 : SWIGINTERN void
1162 : SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1163 : PyDict_SetItemString(d, name, obj);
1164 : Py_DECREF(obj);
1165 : if (public_interface)
1166 : SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1167 : }
1168 :
1169 : #else
1170 :
1171 : SWIGINTERN void
1172 54725 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1173 54725 : PyDict_SetItemString(d, name, obj);
1174 54725 : Py_DECREF(obj);
1175 54725 : }
1176 :
1177 : #endif
1178 :
1179 : /* Append a value to the result obj */
1180 :
1181 : SWIGINTERN PyObject*
1182 1947 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1183 1947 : if (!result) {
1184 : result = obj;
1185 250 : } else if (result == Py_None) {
1186 230 : Py_DECREF(result);
1187 : result = obj;
1188 : } else {
1189 20 : if (!PyList_Check(result)) {
1190 9 : PyObject *o2 = result;
1191 9 : result = PyList_New(1);
1192 9 : PyList_SetItem(result, 0, o2);
1193 : }
1194 20 : PyList_Append(result,obj);
1195 20 : Py_DECREF(obj);
1196 : }
1197 1947 : return result;
1198 : }
1199 :
1200 : /* Unpack the argument tuple */
1201 :
1202 : SWIGINTERN Py_ssize_t
1203 22468 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1204 : {
1205 22468 : if (!args) {
1206 14159 : if (!min && !max) {
1207 : return 1;
1208 : } else {
1209 0 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1210 : name, (min == max ? "" : "at least "), (int)min);
1211 0 : return 0;
1212 : }
1213 : }
1214 8309 : if (!PyTuple_Check(args)) {
1215 1375 : if (min <= 1 && max >= 1) {
1216 1375 : Py_ssize_t i;
1217 1375 : objs[0] = args;
1218 1375 : for (i = 1; i < max; ++i) {
1219 0 : objs[i] = 0;
1220 : }
1221 : return 2;
1222 : }
1223 0 : PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1224 0 : return 0;
1225 : } else {
1226 6934 : Py_ssize_t l = PyTuple_GET_SIZE(args);
1227 6934 : if (l < min) {
1228 0 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1229 : name, (min == max ? "" : "at least "), (int)min, (int)l);
1230 0 : return 0;
1231 6934 : } else if (l > max) {
1232 0 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1233 : name, (min == max ? "" : "at most "), (int)max, (int)l);
1234 0 : return 0;
1235 : } else {
1236 : Py_ssize_t i;
1237 20244 : for (i = 0; i < l; ++i) {
1238 13310 : objs[i] = PyTuple_GET_ITEM(args, i);
1239 : }
1240 8762 : for (; l < max; ++l) {
1241 1828 : objs[l] = 0;
1242 : }
1243 6934 : return i + 1;
1244 : }
1245 : }
1246 : }
1247 :
1248 : /* A functor is a function object with one single object argument */
1249 : #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1250 :
1251 : /*
1252 : Helper for static pointer initialization for both C and C++ code, for example
1253 : static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1254 : */
1255 : #ifdef __cplusplus
1256 : #define SWIG_STATIC_POINTER(var) var
1257 : #else
1258 : #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1259 : #endif
1260 :
1261 : /* -----------------------------------------------------------------------------
1262 : * Pointer declarations
1263 : * ----------------------------------------------------------------------------- */
1264 :
1265 : /* Flags for new pointer objects */
1266 : #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1267 : #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1268 :
1269 : #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1270 :
1271 : #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1272 : #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1273 :
1274 : #ifdef __cplusplus
1275 : extern "C" {
1276 : #endif
1277 :
1278 : /* The python void return value */
1279 :
1280 : SWIGRUNTIMEINLINE PyObject *
1281 38966 : SWIG_Py_Void(void)
1282 : {
1283 38966 : PyObject *none = Py_None;
1284 0 : Py_INCREF(none);
1285 3933 : return none;
1286 : }
1287 :
1288 : /* SwigPyClientData */
1289 :
1290 : typedef struct {
1291 : PyObject *klass;
1292 : PyObject *newraw;
1293 : PyObject *newargs;
1294 : PyObject *destroy;
1295 : int delargs;
1296 : int implicitconv;
1297 : PyTypeObject *pytype;
1298 : } SwigPyClientData;
1299 :
1300 : SWIGRUNTIMEINLINE int
1301 : SWIG_Python_CheckImplicit(swig_type_info *ty)
1302 : {
1303 : SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1304 : int fail = data ? data->implicitconv : 0;
1305 : if (fail)
1306 : PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1307 : return fail;
1308 : }
1309 :
1310 : SWIGRUNTIMEINLINE PyObject *
1311 : SWIG_Python_ExceptionType(swig_type_info *desc) {
1312 : SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1313 : PyObject *klass = data ? data->klass : 0;
1314 : return (klass ? klass : PyExc_RuntimeError);
1315 : }
1316 :
1317 :
1318 : SWIGRUNTIME SwigPyClientData *
1319 1375 : SwigPyClientData_New(PyObject* obj)
1320 : {
1321 1375 : if (!obj) {
1322 : return 0;
1323 : } else {
1324 1375 : SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1325 : /* the klass element */
1326 1375 : data->klass = obj;
1327 1375 : Py_INCREF(data->klass);
1328 : /* the newraw method and newargs arguments used to create a new raw instance */
1329 1375 : if (PyClass_Check(obj)) {
1330 1375 : data->newraw = 0;
1331 1375 : data->newargs = obj;
1332 1375 : Py_INCREF(obj);
1333 : } else {
1334 0 : data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1335 0 : if (data->newraw) {
1336 0 : Py_INCREF(data->newraw);
1337 0 : data->newargs = PyTuple_New(1);
1338 0 : PyTuple_SetItem(data->newargs, 0, obj);
1339 : } else {
1340 0 : data->newargs = obj;
1341 : }
1342 0 : Py_INCREF(data->newargs);
1343 : }
1344 : /* the destroy method, aka as the C++ delete method */
1345 1375 : data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1346 1375 : if (PyErr_Occurred()) {
1347 0 : PyErr_Clear();
1348 0 : data->destroy = 0;
1349 : }
1350 1375 : if (data->destroy) {
1351 1375 : int flags;
1352 1375 : Py_INCREF(data->destroy);
1353 1375 : flags = PyCFunction_GET_FLAGS(data->destroy);
1354 1375 : data->delargs = !(flags & (METH_O));
1355 : } else {
1356 0 : data->delargs = 0;
1357 : }
1358 1375 : data->implicitconv = 0;
1359 1375 : data->pytype = 0;
1360 1375 : return data;
1361 : }
1362 : }
1363 :
1364 : SWIGRUNTIME void
1365 0 : SwigPyClientData_Del(SwigPyClientData *data) {
1366 0 : Py_XDECREF(data->newraw);
1367 0 : Py_XDECREF(data->newargs);
1368 0 : Py_XDECREF(data->destroy);
1369 0 : }
1370 :
1371 : /* =============== SwigPyObject =====================*/
1372 :
1373 : typedef struct {
1374 : PyObject_HEAD
1375 : void *ptr;
1376 : swig_type_info *ty;
1377 : int own;
1378 : PyObject *next;
1379 : #ifdef SWIGPYTHON_BUILTIN
1380 : PyObject *dict;
1381 : #endif
1382 : } SwigPyObject;
1383 :
1384 :
1385 : #ifdef SWIGPYTHON_BUILTIN
1386 :
1387 : SWIGRUNTIME PyObject *
1388 : SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1389 : {
1390 : SwigPyObject *sobj = (SwigPyObject *)v;
1391 :
1392 : if (!sobj->dict)
1393 : sobj->dict = PyDict_New();
1394 :
1395 : Py_INCREF(sobj->dict);
1396 : return sobj->dict;
1397 : }
1398 :
1399 : #endif
1400 :
1401 : SWIGRUNTIME PyObject *
1402 0 : SwigPyObject_long(SwigPyObject *v)
1403 : {
1404 0 : return PyLong_FromVoidPtr(v->ptr);
1405 : }
1406 :
1407 : SWIGRUNTIME PyObject *
1408 : SwigPyObject_format(const char* fmt, SwigPyObject *v)
1409 : {
1410 : PyObject *res = NULL;
1411 : PyObject *args = PyTuple_New(1);
1412 : if (args) {
1413 : if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1414 : PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1415 : if (ofmt) {
1416 : #if PY_VERSION_HEX >= 0x03000000
1417 : res = PyUnicode_Format(ofmt,args);
1418 : #else
1419 : res = PyString_Format(ofmt,args);
1420 : #endif
1421 : Py_DECREF(ofmt);
1422 : }
1423 : Py_DECREF(args);
1424 : }
1425 : }
1426 : return res;
1427 : }
1428 :
1429 : SWIGRUNTIME PyObject *
1430 : SwigPyObject_oct(SwigPyObject *v)
1431 : {
1432 : return SwigPyObject_format("%o",v);
1433 : }
1434 :
1435 : SWIGRUNTIME PyObject *
1436 : SwigPyObject_hex(SwigPyObject *v)
1437 : {
1438 : return SwigPyObject_format("%x",v);
1439 : }
1440 :
1441 : SWIGRUNTIME PyObject *
1442 1 : SwigPyObject_repr(SwigPyObject *v)
1443 : {
1444 1 : const char *name = SWIG_TypePrettyName(v->ty);
1445 1 : PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1446 1 : if (v->next) {
1447 0 : PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1448 : # if PY_VERSION_HEX >= 0x03000000
1449 0 : PyObject *joined = PyUnicode_Concat(repr, nrep);
1450 0 : Py_DecRef(repr);
1451 0 : Py_DecRef(nrep);
1452 0 : repr = joined;
1453 : # else
1454 : PyString_ConcatAndDel(&repr,nrep);
1455 : # endif
1456 : }
1457 1 : return repr;
1458 : }
1459 :
1460 : /* We need a version taking two PyObject* parameters so it's a valid
1461 : * PyCFunction to use in swigobject_methods[]. */
1462 : SWIGRUNTIME PyObject *
1463 0 : SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1464 : {
1465 0 : return SwigPyObject_repr((SwigPyObject*)v);
1466 : }
1467 :
1468 : SWIGRUNTIME int
1469 0 : SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1470 : {
1471 0 : void *i = v->ptr;
1472 0 : void *j = w->ptr;
1473 0 : return (i < j) ? -1 : ((i > j) ? 1 : 0);
1474 : }
1475 :
1476 : /* Added for Python 3.x, would it also be useful for Python 2.x? */
1477 : SWIGRUNTIME PyObject*
1478 0 : SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1479 : {
1480 0 : PyObject* res;
1481 0 : if( op != Py_EQ && op != Py_NE ) {
1482 0 : Py_INCREF(Py_NotImplemented);
1483 0 : return Py_NotImplemented;
1484 : }
1485 0 : res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1486 0 : return res;
1487 : }
1488 :
1489 :
1490 : SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1491 :
1492 : #ifdef SWIGPYTHON_BUILTIN
1493 : static swig_type_info *SwigPyObject_stype = 0;
1494 : SWIGRUNTIME PyTypeObject*
1495 : SwigPyObject_type(void) {
1496 : SwigPyClientData *cd;
1497 : assert(SwigPyObject_stype);
1498 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1499 : assert(cd);
1500 : assert(cd->pytype);
1501 : return cd->pytype;
1502 : }
1503 : #else
1504 : SWIGRUNTIME PyTypeObject*
1505 77134 : SwigPyObject_type(void) {
1506 77134 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1507 77134 : return type;
1508 : }
1509 : #endif
1510 :
1511 : SWIGRUNTIMEINLINE int
1512 : SwigPyObject_Check(PyObject *op) {
1513 : #ifdef SWIGPYTHON_BUILTIN
1514 : PyTypeObject *target_tp = SwigPyObject_type();
1515 : if (PyType_IsSubtype(op->ob_type, target_tp))
1516 : return 1;
1517 : return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1518 : #else
1519 : return (Py_TYPE(op) == SwigPyObject_type())
1520 : || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1521 : #endif
1522 : }
1523 :
1524 : SWIGRUNTIME PyObject *
1525 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1526 :
1527 : SWIGRUNTIME void
1528 9177 : SwigPyObject_dealloc(PyObject *v)
1529 : {
1530 9177 : SwigPyObject *sobj = (SwigPyObject *) v;
1531 9177 : PyObject *next = sobj->next;
1532 9177 : if (sobj->own == SWIG_POINTER_OWN) {
1533 9177 : swig_type_info *ty = sobj->ty;
1534 9177 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1535 9177 : PyObject *destroy = data ? data->destroy : 0;
1536 9177 : if (destroy) {
1537 : /* destroy is always a VARARGS method */
1538 9177 : PyObject *res;
1539 :
1540 : /* PyObject_CallFunction() has the potential to silently drop
1541 : the active exception. In cases of unnamed temporary
1542 : variable or where we just finished iterating over a generator
1543 : StopIteration will be active right now, and this needs to
1544 : remain true upon return from SwigPyObject_dealloc. So save
1545 : and restore. */
1546 :
1547 9177 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
1548 9177 : PyErr_Fetch(&type, &value, &traceback);
1549 :
1550 9177 : if (data->delargs) {
1551 : /* we need to create a temporary object to carry the destroy operation */
1552 0 : PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1553 0 : res = SWIG_Python_CallFunctor(destroy, tmp);
1554 0 : Py_DECREF(tmp);
1555 : } else {
1556 9177 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1557 9177 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1558 9177 : res = ((*meth)(mself, v));
1559 : }
1560 9177 : if (!res)
1561 0 : PyErr_WriteUnraisable(destroy);
1562 :
1563 9177 : PyErr_Restore(type, value, traceback);
1564 :
1565 18354 : Py_XDECREF(res);
1566 : }
1567 : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1568 : else {
1569 : const char *name = SWIG_TypePrettyName(ty);
1570 : printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1571 : }
1572 : #endif
1573 : }
1574 9177 : Py_XDECREF(next);
1575 9177 : PyObject_DEL(v);
1576 9177 : }
1577 :
1578 : SWIGRUNTIME PyObject*
1579 0 : SwigPyObject_append(PyObject* v, PyObject* next)
1580 : {
1581 0 : SwigPyObject *sobj = (SwigPyObject *) v;
1582 0 : if (!SwigPyObject_Check(next)) {
1583 0 : PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1584 0 : return NULL;
1585 : }
1586 0 : sobj->next = next;
1587 0 : Py_INCREF(next);
1588 0 : return SWIG_Py_Void();
1589 : }
1590 :
1591 : SWIGRUNTIME PyObject*
1592 0 : SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1593 : {
1594 0 : SwigPyObject *sobj = (SwigPyObject *) v;
1595 0 : if (sobj->next) {
1596 0 : Py_INCREF(sobj->next);
1597 0 : return sobj->next;
1598 : } else {
1599 0 : return SWIG_Py_Void();
1600 : }
1601 : }
1602 :
1603 : SWIGINTERN PyObject*
1604 0 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1605 : {
1606 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1607 0 : sobj->own = 0;
1608 0 : return SWIG_Py_Void();
1609 : }
1610 :
1611 : SWIGINTERN PyObject*
1612 0 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1613 : {
1614 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1615 0 : sobj->own = SWIG_POINTER_OWN;
1616 0 : return SWIG_Py_Void();
1617 : }
1618 :
1619 : SWIGINTERN PyObject*
1620 0 : SwigPyObject_own(PyObject *v, PyObject *args)
1621 : {
1622 0 : PyObject *val = 0;
1623 0 : if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1624 : return NULL;
1625 : } else {
1626 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1627 0 : PyObject *obj = PyBool_FromLong(sobj->own);
1628 0 : if (val) {
1629 0 : if (PyObject_IsTrue(val)) {
1630 0 : SwigPyObject_acquire(v,args);
1631 : } else {
1632 0 : SwigPyObject_disown(v,args);
1633 : }
1634 : }
1635 0 : return obj;
1636 : }
1637 : }
1638 :
1639 : static PyMethodDef
1640 : swigobject_methods[] = {
1641 : {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1642 : {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1643 : {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1644 : {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1645 : {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1646 : {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1647 : {0, 0, 0, 0}
1648 : };
1649 :
1650 : SWIGRUNTIME PyTypeObject*
1651 275 : SwigPyObject_TypeOnce(void) {
1652 275 : static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1653 :
1654 275 : static PyNumberMethods SwigPyObject_as_number = {
1655 : (binaryfunc)0, /*nb_add*/
1656 : (binaryfunc)0, /*nb_subtract*/
1657 : (binaryfunc)0, /*nb_multiply*/
1658 : /* nb_divide removed in Python 3 */
1659 : #if PY_VERSION_HEX < 0x03000000
1660 : (binaryfunc)0, /*nb_divide*/
1661 : #endif
1662 : (binaryfunc)0, /*nb_remainder*/
1663 : (binaryfunc)0, /*nb_divmod*/
1664 : (ternaryfunc)0,/*nb_power*/
1665 : (unaryfunc)0, /*nb_negative*/
1666 : (unaryfunc)0, /*nb_positive*/
1667 : (unaryfunc)0, /*nb_absolute*/
1668 : (inquiry)0, /*nb_nonzero*/
1669 : 0, /*nb_invert*/
1670 : 0, /*nb_lshift*/
1671 : 0, /*nb_rshift*/
1672 : 0, /*nb_and*/
1673 : 0, /*nb_xor*/
1674 : 0, /*nb_or*/
1675 : #if PY_VERSION_HEX < 0x03000000
1676 : 0, /*nb_coerce*/
1677 : #endif
1678 : (unaryfunc)SwigPyObject_long, /*nb_int*/
1679 : #if PY_VERSION_HEX < 0x03000000
1680 : (unaryfunc)SwigPyObject_long, /*nb_long*/
1681 : #else
1682 : 0, /*nb_reserved*/
1683 : #endif
1684 : (unaryfunc)0, /*nb_float*/
1685 : #if PY_VERSION_HEX < 0x03000000
1686 : (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1687 : (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1688 : #endif
1689 : #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1690 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1691 : #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1692 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1693 : #else
1694 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1695 : #endif
1696 : };
1697 :
1698 275 : static PyTypeObject swigpyobject_type;
1699 275 : static int type_init = 0;
1700 275 : if (!type_init) {
1701 275 : const PyTypeObject tmp = {
1702 : #if PY_VERSION_HEX >= 0x03000000
1703 : PyVarObject_HEAD_INIT(NULL, 0)
1704 : #else
1705 : PyObject_HEAD_INIT(NULL)
1706 : 0, /* ob_size */
1707 : #endif
1708 : "SwigPyObject", /* tp_name */
1709 : sizeof(SwigPyObject), /* tp_basicsize */
1710 : 0, /* tp_itemsize */
1711 : (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1712 : 0, /* tp_print */
1713 : (getattrfunc)0, /* tp_getattr */
1714 : (setattrfunc)0, /* tp_setattr */
1715 : #if PY_VERSION_HEX >= 0x03000000
1716 : 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1717 : #else
1718 : (cmpfunc)SwigPyObject_compare, /* tp_compare */
1719 : #endif
1720 : (reprfunc)SwigPyObject_repr, /* tp_repr */
1721 : &SwigPyObject_as_number, /* tp_as_number */
1722 : 0, /* tp_as_sequence */
1723 : 0, /* tp_as_mapping */
1724 : (hashfunc)0, /* tp_hash */
1725 : (ternaryfunc)0, /* tp_call */
1726 : 0, /* tp_str */
1727 : PyObject_GenericGetAttr, /* tp_getattro */
1728 : 0, /* tp_setattro */
1729 : 0, /* tp_as_buffer */
1730 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1731 : swigobject_doc, /* tp_doc */
1732 : 0, /* tp_traverse */
1733 : 0, /* tp_clear */
1734 : (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1735 : 0, /* tp_weaklistoffset */
1736 : 0, /* tp_iter */
1737 : 0, /* tp_iternext */
1738 : swigobject_methods, /* tp_methods */
1739 : 0, /* tp_members */
1740 : 0, /* tp_getset */
1741 : 0, /* tp_base */
1742 : 0, /* tp_dict */
1743 : 0, /* tp_descr_get */
1744 : 0, /* tp_descr_set */
1745 : 0, /* tp_dictoffset */
1746 : 0, /* tp_init */
1747 : 0, /* tp_alloc */
1748 : 0, /* tp_new */
1749 : 0, /* tp_free */
1750 : 0, /* tp_is_gc */
1751 : 0, /* tp_bases */
1752 : 0, /* tp_mro */
1753 : 0, /* tp_cache */
1754 : 0, /* tp_subclasses */
1755 : 0, /* tp_weaklist */
1756 : 0, /* tp_del */
1757 : 0, /* tp_version_tag */
1758 : #if PY_VERSION_HEX >= 0x03040000
1759 : 0, /* tp_finalize */
1760 : #endif
1761 : #ifdef COUNT_ALLOCS
1762 : 0, /* tp_allocs */
1763 : 0, /* tp_frees */
1764 : 0, /* tp_maxalloc */
1765 : 0, /* tp_prev */
1766 : 0 /* tp_next */
1767 : #endif
1768 : };
1769 275 : swigpyobject_type = tmp;
1770 275 : type_init = 1;
1771 275 : if (PyType_Ready(&swigpyobject_type) < 0)
1772 0 : return NULL;
1773 : }
1774 : return &swigpyobject_type;
1775 : }
1776 :
1777 : SWIGRUNTIME PyObject *
1778 9196 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1779 : {
1780 9196 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1781 9196 : if (sobj) {
1782 9196 : sobj->ptr = ptr;
1783 9196 : sobj->ty = ty;
1784 9196 : sobj->own = own;
1785 9196 : sobj->next = 0;
1786 : }
1787 9196 : return (PyObject *)sobj;
1788 : }
1789 :
1790 : /* -----------------------------------------------------------------------------
1791 : * Implements a simple Swig Packed type, and use it instead of string
1792 : * ----------------------------------------------------------------------------- */
1793 :
1794 : typedef struct {
1795 : PyObject_HEAD
1796 : void *pack;
1797 : swig_type_info *ty;
1798 : size_t size;
1799 : } SwigPyPacked;
1800 :
1801 : SWIGRUNTIME PyObject *
1802 0 : SwigPyPacked_repr(SwigPyPacked *v)
1803 : {
1804 0 : char result[SWIG_BUFFER_SIZE];
1805 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1806 0 : return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1807 : } else {
1808 0 : return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1809 : }
1810 : }
1811 :
1812 : SWIGRUNTIME PyObject *
1813 0 : SwigPyPacked_str(SwigPyPacked *v)
1814 : {
1815 0 : char result[SWIG_BUFFER_SIZE];
1816 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1817 0 : return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1818 : } else {
1819 0 : return SWIG_Python_str_FromChar(v->ty->name);
1820 : }
1821 : }
1822 :
1823 : SWIGRUNTIME int
1824 : SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
1825 : {
1826 : size_t i = v->size;
1827 : size_t j = w->size;
1828 : int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1829 : return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
1830 : }
1831 :
1832 : SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1833 :
1834 : SWIGRUNTIME PyTypeObject*
1835 275 : SwigPyPacked_type(void) {
1836 275 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1837 275 : return type;
1838 : }
1839 :
1840 : SWIGRUNTIMEINLINE int
1841 : SwigPyPacked_Check(PyObject *op) {
1842 : return ((op)->ob_type == SwigPyPacked_TypeOnce())
1843 : || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1844 : }
1845 :
1846 : SWIGRUNTIME void
1847 0 : SwigPyPacked_dealloc(PyObject *v)
1848 : {
1849 0 : if (SwigPyPacked_Check(v)) {
1850 0 : SwigPyPacked *sobj = (SwigPyPacked *) v;
1851 0 : free(sobj->pack);
1852 : }
1853 0 : PyObject_DEL(v);
1854 0 : }
1855 :
1856 : SWIGRUNTIME PyTypeObject*
1857 275 : SwigPyPacked_TypeOnce(void) {
1858 275 : static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1859 275 : static PyTypeObject swigpypacked_type;
1860 275 : static int type_init = 0;
1861 275 : if (!type_init) {
1862 275 : const PyTypeObject tmp = {
1863 : #if PY_VERSION_HEX>=0x03000000
1864 : PyVarObject_HEAD_INIT(NULL, 0)
1865 : #else
1866 : PyObject_HEAD_INIT(NULL)
1867 : 0, /* ob_size */
1868 : #endif
1869 : "SwigPyPacked", /* tp_name */
1870 : sizeof(SwigPyPacked), /* tp_basicsize */
1871 : 0, /* tp_itemsize */
1872 : (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1873 : 0, /* tp_print */
1874 : (getattrfunc)0, /* tp_getattr */
1875 : (setattrfunc)0, /* tp_setattr */
1876 : #if PY_VERSION_HEX>=0x03000000
1877 : 0, /* tp_reserved in 3.0.1 */
1878 : #else
1879 : (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1880 : #endif
1881 : (reprfunc)SwigPyPacked_repr, /* tp_repr */
1882 : 0, /* tp_as_number */
1883 : 0, /* tp_as_sequence */
1884 : 0, /* tp_as_mapping */
1885 : (hashfunc)0, /* tp_hash */
1886 : (ternaryfunc)0, /* tp_call */
1887 : (reprfunc)SwigPyPacked_str, /* tp_str */
1888 : PyObject_GenericGetAttr, /* tp_getattro */
1889 : 0, /* tp_setattro */
1890 : 0, /* tp_as_buffer */
1891 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1892 : swigpacked_doc, /* tp_doc */
1893 : 0, /* tp_traverse */
1894 : 0, /* tp_clear */
1895 : 0, /* tp_richcompare */
1896 : 0, /* tp_weaklistoffset */
1897 : 0, /* tp_iter */
1898 : 0, /* tp_iternext */
1899 : 0, /* tp_methods */
1900 : 0, /* tp_members */
1901 : 0, /* tp_getset */
1902 : 0, /* tp_base */
1903 : 0, /* tp_dict */
1904 : 0, /* tp_descr_get */
1905 : 0, /* tp_descr_set */
1906 : 0, /* tp_dictoffset */
1907 : 0, /* tp_init */
1908 : 0, /* tp_alloc */
1909 : 0, /* tp_new */
1910 : 0, /* tp_free */
1911 : 0, /* tp_is_gc */
1912 : 0, /* tp_bases */
1913 : 0, /* tp_mro */
1914 : 0, /* tp_cache */
1915 : 0, /* tp_subclasses */
1916 : 0, /* tp_weaklist */
1917 : 0, /* tp_del */
1918 : 0, /* tp_version_tag */
1919 : #if PY_VERSION_HEX >= 0x03040000
1920 : 0, /* tp_finalize */
1921 : #endif
1922 : #ifdef COUNT_ALLOCS
1923 : 0, /* tp_allocs */
1924 : 0, /* tp_frees */
1925 : 0, /* tp_maxalloc */
1926 : 0, /* tp_prev */
1927 : 0 /* tp_next */
1928 : #endif
1929 : };
1930 275 : swigpypacked_type = tmp;
1931 275 : type_init = 1;
1932 275 : if (PyType_Ready(&swigpypacked_type) < 0)
1933 0 : return NULL;
1934 : }
1935 : return &swigpypacked_type;
1936 : }
1937 :
1938 : SWIGRUNTIME PyObject *
1939 0 : SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1940 : {
1941 0 : SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1942 0 : if (sobj) {
1943 0 : void *pack = malloc(size);
1944 0 : if (pack) {
1945 0 : memcpy(pack, ptr, size);
1946 0 : sobj->pack = pack;
1947 0 : sobj->ty = ty;
1948 0 : sobj->size = size;
1949 : } else {
1950 0 : PyObject_DEL((PyObject *) sobj);
1951 0 : sobj = 0;
1952 : }
1953 : }
1954 0 : return (PyObject *) sobj;
1955 : }
1956 :
1957 : SWIGRUNTIME swig_type_info *
1958 : SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1959 : {
1960 : if (SwigPyPacked_Check(obj)) {
1961 : SwigPyPacked *sobj = (SwigPyPacked *)obj;
1962 : if (sobj->size != size) return 0;
1963 : memcpy(ptr, sobj->pack, size);
1964 : return sobj->ty;
1965 : } else {
1966 : return 0;
1967 : }
1968 : }
1969 :
1970 : /* -----------------------------------------------------------------------------
1971 : * pointers/data manipulation
1972 : * ----------------------------------------------------------------------------- */
1973 :
1974 : static PyObject *Swig_This_global = NULL;
1975 :
1976 : SWIGRUNTIME PyObject *
1977 27694 : SWIG_This(void)
1978 : {
1979 27694 : if (Swig_This_global == NULL)
1980 275 : Swig_This_global = SWIG_Python_str_FromChar("this");
1981 27694 : return Swig_This_global;
1982 : }
1983 :
1984 : /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1985 :
1986 : /* TODO: I don't know how to implement the fast getset in Python 3 right now */
1987 : #if PY_VERSION_HEX>=0x03000000
1988 : #define SWIG_PYTHON_SLOW_GETSET_THIS
1989 : #endif
1990 :
1991 : SWIGRUNTIME SwigPyObject *
1992 36030 : SWIG_Python_GetSwigThis(PyObject *pyobj)
1993 : {
1994 36032 : PyObject *obj;
1995 :
1996 36032 : if (SwigPyObject_Check(pyobj))
1997 : return (SwigPyObject *) pyobj;
1998 :
1999 : #ifdef SWIGPYTHON_BUILTIN
2000 : (void)obj;
2001 : # ifdef PyWeakref_CheckProxy
2002 : if (PyWeakref_CheckProxy(pyobj)) {
2003 : pyobj = PyWeakref_GET_OBJECT(pyobj);
2004 : if (pyobj && SwigPyObject_Check(pyobj))
2005 : return (SwigPyObject*) pyobj;
2006 : }
2007 : # endif
2008 : return NULL;
2009 : #else
2010 :
2011 24928 : obj = 0;
2012 :
2013 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2014 : if (PyInstance_Check(pyobj)) {
2015 : obj = _PyInstance_Lookup(pyobj, SWIG_This());
2016 : } else {
2017 : PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2018 : if (dictptr != NULL) {
2019 : PyObject *dict = *dictptr;
2020 : obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2021 : } else {
2022 : #ifdef PyWeakref_CheckProxy
2023 : if (PyWeakref_CheckProxy(pyobj)) {
2024 : PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2025 : return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2026 : }
2027 : #endif
2028 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2029 : if (obj) {
2030 : Py_DECREF(obj);
2031 : } else {
2032 : if (PyErr_Occurred()) PyErr_Clear();
2033 : return 0;
2034 : }
2035 : }
2036 : }
2037 : #else
2038 24928 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2039 24928 : if (obj) {
2040 22435 : Py_DECREF(obj);
2041 : } else {
2042 2493 : if (PyErr_Occurred()) PyErr_Clear();
2043 2493 : return 0;
2044 : }
2045 : #endif
2046 22435 : if (obj && !SwigPyObject_Check(obj)) {
2047 : /* a PyObject is called 'this', try to get the 'real this'
2048 : SwigPyObject from it */
2049 : return SWIG_Python_GetSwigThis(obj);
2050 : }
2051 : return (SwigPyObject *)obj;
2052 : #endif
2053 : }
2054 :
2055 : /* Acquire a pointer value */
2056 :
2057 : SWIGRUNTIME int
2058 : SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2059 : if (own == SWIG_POINTER_OWN) {
2060 : SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2061 : if (sobj) {
2062 : int oldown = sobj->own;
2063 : sobj->own = own;
2064 : return oldown;
2065 : }
2066 : }
2067 : return 0;
2068 : }
2069 :
2070 : /* Convert a pointer value */
2071 :
2072 : SWIGRUNTIME int
2073 34070 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2074 34070 : int res;
2075 34070 : SwigPyObject *sobj;
2076 34070 : int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2077 :
2078 34070 : if (!obj)
2079 : return SWIG_ERROR;
2080 34070 : if (obj == Py_None && !implicit_conv) {
2081 531 : if (ptr)
2082 531 : *ptr = 0;
2083 1062 : return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2084 : }
2085 :
2086 33539 : res = SWIG_ERROR;
2087 :
2088 33539 : sobj = SWIG_Python_GetSwigThis(obj);
2089 33539 : if (own)
2090 0 : *own = 0;
2091 33539 : while (sobj) {
2092 33537 : void *vptr = sobj->ptr;
2093 33537 : if (ty) {
2094 33537 : swig_type_info *to = sobj->ty;
2095 33537 : if (to == ty) {
2096 : /* no type cast needed */
2097 33537 : if (ptr) *ptr = vptr;
2098 : break;
2099 : } else {
2100 0 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2101 0 : if (!tc) {
2102 0 : sobj = (SwigPyObject *)sobj->next;
2103 : } else {
2104 0 : if (ptr) {
2105 0 : int newmemory = 0;
2106 0 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2107 0 : if (newmemory == SWIG_CAST_NEW_MEMORY) {
2108 0 : assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2109 0 : if (own)
2110 0 : *own = *own | SWIG_CAST_NEW_MEMORY;
2111 : }
2112 : }
2113 : break;
2114 : }
2115 : }
2116 : } else {
2117 0 : if (ptr) *ptr = vptr;
2118 : break;
2119 : }
2120 : }
2121 33539 : if (sobj) {
2122 33537 : if (own)
2123 0 : *own = *own | sobj->own;
2124 33537 : if (flags & SWIG_POINTER_DISOWN) {
2125 11104 : sobj->own = 0;
2126 : }
2127 : res = SWIG_OK;
2128 : } else {
2129 2 : if (implicit_conv) {
2130 0 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2131 0 : if (data && !data->implicitconv) {
2132 0 : PyObject *klass = data->klass;
2133 0 : if (klass) {
2134 0 : PyObject *impconv;
2135 0 : data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2136 0 : impconv = SWIG_Python_CallFunctor(klass, obj);
2137 0 : data->implicitconv = 0;
2138 0 : if (PyErr_Occurred()) {
2139 0 : PyErr_Clear();
2140 0 : impconv = 0;
2141 : }
2142 0 : if (impconv) {
2143 0 : SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2144 0 : if (iobj) {
2145 0 : void *vptr;
2146 0 : res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2147 0 : if (SWIG_IsOK(res)) {
2148 0 : if (ptr) {
2149 0 : *ptr = vptr;
2150 : /* transfer the ownership to 'ptr' */
2151 0 : iobj->own = 0;
2152 0 : res = SWIG_AddCast(res);
2153 0 : res = SWIG_AddNewMask(res);
2154 : } else {
2155 : res = SWIG_AddCast(res);
2156 : }
2157 : }
2158 : }
2159 0 : Py_DECREF(impconv);
2160 : }
2161 : }
2162 : }
2163 0 : if (!SWIG_IsOK(res) && obj == Py_None) {
2164 0 : if (ptr)
2165 0 : *ptr = 0;
2166 0 : if (PyErr_Occurred())
2167 0 : PyErr_Clear();
2168 : res = SWIG_OK;
2169 : }
2170 : }
2171 : }
2172 : return res;
2173 : }
2174 :
2175 : /* Convert a function ptr value */
2176 :
2177 : SWIGRUNTIME int
2178 : SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2179 : if (!PyCFunction_Check(obj)) {
2180 : return SWIG_ConvertPtr(obj, ptr, ty, 0);
2181 : } else {
2182 : void *vptr = 0;
2183 : swig_cast_info *tc;
2184 :
2185 : /* here we get the method pointer for callbacks */
2186 : const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2187 : const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2188 : if (desc)
2189 : desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2190 : if (!desc)
2191 : return SWIG_ERROR;
2192 : tc = SWIG_TypeCheck(desc,ty);
2193 : if (tc) {
2194 : int newmemory = 0;
2195 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2196 : assert(!newmemory); /* newmemory handling not yet implemented */
2197 : } else {
2198 : return SWIG_ERROR;
2199 : }
2200 : return SWIG_OK;
2201 : }
2202 : }
2203 :
2204 : /* Convert a packed pointer value */
2205 :
2206 : SWIGRUNTIME int
2207 : SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2208 : swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2209 : if (!to) return SWIG_ERROR;
2210 : if (ty) {
2211 : if (to != ty) {
2212 : /* check type cast? */
2213 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2214 : if (!tc) return SWIG_ERROR;
2215 : }
2216 : }
2217 : return SWIG_OK;
2218 : }
2219 :
2220 : /* -----------------------------------------------------------------------------
2221 : * Create a new pointer object
2222 : * ----------------------------------------------------------------------------- */
2223 :
2224 : /*
2225 : Create a new instance object, without calling __init__, and set the
2226 : 'this' attribute.
2227 : */
2228 :
2229 : SWIGRUNTIME PyObject*
2230 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2231 : {
2232 : PyObject *inst = 0;
2233 : PyObject *newraw = data->newraw;
2234 : if (newraw) {
2235 : inst = PyObject_Call(newraw, data->newargs, NULL);
2236 : if (inst) {
2237 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2238 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2239 : if (dictptr != NULL) {
2240 : PyObject *dict = *dictptr;
2241 : if (dict == NULL) {
2242 : dict = PyDict_New();
2243 : *dictptr = dict;
2244 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2245 : }
2246 : }
2247 : #else
2248 : PyObject *key = SWIG_This();
2249 : PyObject_SetAttr(inst, key, swig_this);
2250 : #endif
2251 : }
2252 : } else {
2253 : #if PY_VERSION_HEX >= 0x03000000
2254 : PyObject *empty_args = PyTuple_New(0);
2255 : if (empty_args) {
2256 : PyObject *empty_kwargs = PyDict_New();
2257 : if (empty_kwargs) {
2258 : inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2259 : Py_DECREF(empty_kwargs);
2260 : if (inst) {
2261 : PyObject_SetAttr(inst, SWIG_This(), swig_this);
2262 : Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2263 : }
2264 : }
2265 : Py_DECREF(empty_args);
2266 : }
2267 : #else
2268 : PyObject *dict = PyDict_New();
2269 : if (dict) {
2270 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2271 : inst = PyInstance_NewRaw(data->newargs, dict);
2272 : Py_DECREF(dict);
2273 : }
2274 : #endif
2275 : }
2276 : return inst;
2277 : }
2278 :
2279 : SWIGRUNTIME void
2280 2491 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2281 : {
2282 2491 : PyObject *dict;
2283 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2284 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2285 : if (dictptr != NULL) {
2286 : dict = *dictptr;
2287 : if (dict == NULL) {
2288 : dict = PyDict_New();
2289 : *dictptr = dict;
2290 : }
2291 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2292 : return;
2293 : }
2294 : #endif
2295 2491 : dict = PyObject_GetAttrString(inst, "__dict__");
2296 2491 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2297 2491 : Py_DECREF(dict);
2298 2491 : }
2299 :
2300 :
2301 : SWIGINTERN PyObject *
2302 2491 : SWIG_Python_InitShadowInstance(PyObject *args) {
2303 2491 : PyObject *obj[2];
2304 2491 : if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2305 : return NULL;
2306 : } else {
2307 2491 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2308 2491 : if (sthis) {
2309 0 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2310 : } else {
2311 2491 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2312 : }
2313 2491 : return SWIG_Py_Void();
2314 : }
2315 : }
2316 :
2317 : /* Create a new pointer object */
2318 :
2319 : SWIGRUNTIME PyObject *
2320 9217 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2321 9217 : SwigPyClientData *clientdata;
2322 9217 : PyObject * robj;
2323 9217 : int own;
2324 :
2325 9217 : if (!ptr)
2326 21 : return SWIG_Py_Void();
2327 :
2328 9196 : clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2329 9196 : own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2330 9196 : if (clientdata && clientdata->pytype) {
2331 0 : SwigPyObject *newobj;
2332 0 : if (flags & SWIG_BUILTIN_TP_INIT) {
2333 0 : newobj = (SwigPyObject*) self;
2334 0 : if (newobj->ptr) {
2335 0 : PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2336 0 : while (newobj->next)
2337 : newobj = (SwigPyObject *) newobj->next;
2338 0 : newobj->next = next_self;
2339 0 : newobj = (SwigPyObject *)next_self;
2340 : #ifdef SWIGPYTHON_BUILTIN
2341 : newobj->dict = 0;
2342 : #endif
2343 : }
2344 : } else {
2345 0 : newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2346 : #ifdef SWIGPYTHON_BUILTIN
2347 : newobj->dict = 0;
2348 : #endif
2349 : }
2350 0 : if (newobj) {
2351 0 : newobj->ptr = ptr;
2352 0 : newobj->ty = type;
2353 0 : newobj->own = own;
2354 0 : newobj->next = 0;
2355 0 : return (PyObject*) newobj;
2356 : }
2357 0 : return SWIG_Py_Void();
2358 : }
2359 :
2360 9196 : assert(!(flags & SWIG_BUILTIN_TP_INIT));
2361 :
2362 9196 : robj = SwigPyObject_New(ptr, type, own);
2363 9196 : if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2364 6707 : PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2365 6707 : Py_DECREF(robj);
2366 : robj = inst;
2367 : }
2368 : return robj;
2369 : }
2370 :
2371 : /* Create a new packed object */
2372 :
2373 : SWIGRUNTIMEINLINE PyObject *
2374 0 : SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2375 0 : return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2376 : }
2377 :
2378 : /* -----------------------------------------------------------------------------*
2379 : * Get type list
2380 : * -----------------------------------------------------------------------------*/
2381 :
2382 : #ifdef SWIG_LINK_RUNTIME
2383 : void *SWIG_ReturnGlobalTypeList(void *);
2384 : #endif
2385 :
2386 : SWIGRUNTIME swig_module_info *
2387 : SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2388 : static void *type_pointer = (void *)0;
2389 : /* first check if module already created */
2390 : if (!type_pointer) {
2391 : #ifdef SWIG_LINK_RUNTIME
2392 : type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2393 : #else
2394 : type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2395 : if (PyErr_Occurred()) {
2396 : PyErr_Clear();
2397 : type_pointer = (void *)0;
2398 : }
2399 : #endif
2400 : }
2401 : return (swig_module_info *) type_pointer;
2402 : }
2403 :
2404 : SWIGRUNTIME void
2405 0 : SWIG_Python_DestroyModule(PyObject *obj)
2406 : {
2407 0 : swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2408 0 : swig_type_info **types = swig_module->types;
2409 0 : size_t i;
2410 0 : for (i =0; i < swig_module->size; ++i) {
2411 0 : swig_type_info *ty = types[i];
2412 0 : if (ty->owndata) {
2413 0 : SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2414 0 : if (data) SwigPyClientData_Del(data);
2415 : }
2416 : }
2417 0 : Py_DECREF(SWIG_This());
2418 0 : Swig_This_global = NULL;
2419 0 : }
2420 :
2421 : SWIGRUNTIME void
2422 0 : SWIG_Python_SetModule(swig_module_info *swig_module) {
2423 : #if PY_VERSION_HEX >= 0x03000000
2424 : /* Add a dummy module object into sys.modules */
2425 0 : PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2426 : #else
2427 : static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2428 : PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2429 : #endif
2430 0 : PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2431 0 : if (pointer && module) {
2432 0 : PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2433 : } else {
2434 0 : Py_XDECREF(pointer);
2435 : }
2436 0 : }
2437 :
2438 : /* The python cached type query */
2439 : SWIGRUNTIME PyObject *
2440 305 : SWIG_Python_TypeCache(void) {
2441 305 : static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2442 305 : return cache;
2443 : }
2444 :
2445 : SWIGRUNTIME swig_type_info *
2446 30 : SWIG_Python_TypeQuery(const char *type)
2447 : {
2448 30 : PyObject *cache = SWIG_Python_TypeCache();
2449 30 : PyObject *key = SWIG_Python_str_FromChar(type);
2450 30 : PyObject *obj = PyDict_GetItem(cache, key);
2451 30 : swig_type_info *descriptor;
2452 30 : if (obj) {
2453 0 : descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2454 : } else {
2455 30 : swig_module_info *swig_module = SWIG_GetModule(0);
2456 30 : descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2457 30 : if (descriptor) {
2458 30 : obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2459 30 : PyDict_SetItem(cache, key, obj);
2460 30 : Py_DECREF(obj);
2461 : }
2462 : }
2463 30 : Py_DECREF(key);
2464 30 : return descriptor;
2465 : }
2466 :
2467 : /*
2468 : For backward compatibility only
2469 : */
2470 : #define SWIG_POINTER_EXCEPTION 0
2471 : #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2472 : #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2473 :
2474 : SWIGRUNTIME int
2475 : SWIG_Python_AddErrMesg(const char* mesg, int infront)
2476 : {
2477 : if (PyErr_Occurred()) {
2478 : PyObject *type = 0;
2479 : PyObject *value = 0;
2480 : PyObject *traceback = 0;
2481 : PyErr_Fetch(&type, &value, &traceback);
2482 : if (value) {
2483 : PyObject *old_str = PyObject_Str(value);
2484 : const char *tmp = SWIG_Python_str_AsChar(old_str);
2485 : const char *errmesg = tmp ? tmp : "Invalid error message";
2486 : Py_XINCREF(type);
2487 : PyErr_Clear();
2488 : if (infront) {
2489 : PyErr_Format(type, "%s %s", mesg, errmesg);
2490 : } else {
2491 : PyErr_Format(type, "%s %s", errmesg, mesg);
2492 : }
2493 : SWIG_Python_str_DelForPy3(tmp);
2494 : Py_DECREF(old_str);
2495 : }
2496 : return 1;
2497 : } else {
2498 : return 0;
2499 : }
2500 : }
2501 :
2502 : SWIGRUNTIME int
2503 : SWIG_Python_ArgFail(int argnum)
2504 : {
2505 : if (PyErr_Occurred()) {
2506 : /* add information about failing argument */
2507 : char mesg[256];
2508 : PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2509 : return SWIG_Python_AddErrMesg(mesg, 1);
2510 : } else {
2511 : return 0;
2512 : }
2513 : }
2514 :
2515 : SWIGRUNTIMEINLINE const char *
2516 : SwigPyObject_GetDesc(PyObject *self)
2517 : {
2518 : SwigPyObject *v = (SwigPyObject *)self;
2519 : swig_type_info *ty = v ? v->ty : 0;
2520 : return ty ? ty->str : "";
2521 : }
2522 :
2523 : SWIGRUNTIME void
2524 : SWIG_Python_TypeError(const char *type, PyObject *obj)
2525 : {
2526 : if (type) {
2527 : #if defined(SWIG_COBJECT_TYPES)
2528 : if (obj && SwigPyObject_Check(obj)) {
2529 : const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2530 : if (otype) {
2531 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2532 : type, otype);
2533 : return;
2534 : }
2535 : } else
2536 : #endif
2537 : {
2538 : const char *otype = (obj ? obj->ob_type->tp_name : 0);
2539 : if (otype) {
2540 : PyObject *str = PyObject_Str(obj);
2541 : const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2542 : if (cstr) {
2543 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2544 : type, otype, cstr);
2545 : SWIG_Python_str_DelForPy3(cstr);
2546 : } else {
2547 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2548 : type, otype);
2549 : }
2550 : Py_XDECREF(str);
2551 : return;
2552 : }
2553 : }
2554 : PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2555 : } else {
2556 : PyErr_Format(PyExc_TypeError, "unexpected type is received");
2557 : }
2558 : }
2559 :
2560 :
2561 : /* Convert a pointer value, signal an exception on a type mismatch */
2562 : SWIGRUNTIME void *
2563 : SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2564 : void *result;
2565 : if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2566 : PyErr_Clear();
2567 : #if SWIG_POINTER_EXCEPTION
2568 : if (flags) {
2569 : SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2570 : SWIG_Python_ArgFail(argnum);
2571 : }
2572 : #endif
2573 : }
2574 : return result;
2575 : }
2576 :
2577 : #ifdef SWIGPYTHON_BUILTIN
2578 : SWIGRUNTIME int
2579 : SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2580 : PyTypeObject *tp = obj->ob_type;
2581 : PyObject *descr;
2582 : PyObject *encoded_name;
2583 : descrsetfunc f;
2584 : int res = -1;
2585 :
2586 : # ifdef Py_USING_UNICODE
2587 : if (PyString_Check(name)) {
2588 : name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2589 : if (!name)
2590 : return -1;
2591 : } else if (!PyUnicode_Check(name))
2592 : # else
2593 : if (!PyString_Check(name))
2594 : # endif
2595 : {
2596 : PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2597 : return -1;
2598 : } else {
2599 : Py_INCREF(name);
2600 : }
2601 :
2602 : if (!tp->tp_dict) {
2603 : if (PyType_Ready(tp) < 0)
2604 : goto done;
2605 : }
2606 :
2607 : descr = _PyType_Lookup(tp, name);
2608 : f = NULL;
2609 : if (descr != NULL)
2610 : f = descr->ob_type->tp_descr_set;
2611 : if (!f) {
2612 : if (PyString_Check(name)) {
2613 : encoded_name = name;
2614 : Py_INCREF(name);
2615 : } else {
2616 : encoded_name = PyUnicode_AsUTF8String(name);
2617 : if (!encoded_name)
2618 : return -1;
2619 : }
2620 : PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2621 : Py_DECREF(encoded_name);
2622 : } else {
2623 : res = f(descr, obj, value);
2624 : }
2625 :
2626 : done:
2627 : Py_DECREF(name);
2628 : return res;
2629 : }
2630 : #endif
2631 :
2632 :
2633 : #ifdef __cplusplus
2634 : }
2635 : #endif
2636 :
2637 :
2638 :
2639 : #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2640 :
2641 : #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2642 :
2643 :
2644 :
2645 : #ifdef __cplusplus
2646 : extern "C" {
2647 : #endif
2648 :
2649 : /* Method creation and docstring support functions */
2650 :
2651 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
2652 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2653 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2654 :
2655 : #ifdef __cplusplus
2656 : }
2657 : #endif
2658 :
2659 :
2660 : #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2661 :
2662 :
2663 : /* -------- TYPES TABLE (BEGIN) -------- */
2664 :
2665 : #define SWIGTYPE_p_OGRCoordinateTransformationOptions swig_types[0]
2666 : #define SWIGTYPE_p_OSRAreaOfUse swig_types[1]
2667 : #define SWIGTYPE_p_OSRCRSInfo swig_types[2]
2668 : #define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[3]
2669 : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[4]
2670 : #define SWIGTYPE_p_char swig_types[5]
2671 : #define SWIGTYPE_p_double swig_types[6]
2672 : #define SWIGTYPE_p_int swig_types[7]
2673 : #define SWIGTYPE_p_long swig_types[8]
2674 : #define SWIGTYPE_p_p_char swig_types[9]
2675 : #define SWIGTYPE_p_p_double swig_types[10]
2676 : #define SWIGTYPE_p_p_int swig_types[11]
2677 : #define SWIGTYPE_p_p_p_OSRCRSInfo swig_types[12]
2678 : #define SWIGTYPE_p_p_p_OSRSpatialReferenceShadow swig_types[13]
2679 : static swig_type_info *swig_types[15];
2680 : static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
2681 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2682 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2683 :
2684 : /* -------- TYPES TABLE (END) -------- */
2685 :
2686 : #ifdef SWIG_TypeQuery
2687 : # undef SWIG_TypeQuery
2688 : #endif
2689 : #define SWIG_TypeQuery SWIG_Python_TypeQuery
2690 :
2691 : /*-----------------------------------------------
2692 : @(target):= _osr.so
2693 : ------------------------------------------------*/
2694 : #if PY_VERSION_HEX >= 0x03000000
2695 : # define SWIG_init PyInit__osr
2696 :
2697 : #else
2698 : # define SWIG_init init_osr
2699 :
2700 : #endif
2701 : #define SWIG_name "_osr"
2702 :
2703 : #define SWIGVERSION 0x040001
2704 : #define SWIG_VERSION SWIGVERSION
2705 :
2706 :
2707 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2708 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2709 :
2710 :
2711 : #include <stdexcept>
2712 :
2713 :
2714 : namespace swig {
2715 : class SwigPtr_PyObject {
2716 : protected:
2717 : PyObject *_obj;
2718 :
2719 : public:
2720 : SwigPtr_PyObject() :_obj(0)
2721 : {
2722 : }
2723 :
2724 : SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
2725 : {
2726 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2727 : Py_XINCREF(_obj);
2728 : SWIG_PYTHON_THREAD_END_BLOCK;
2729 : }
2730 :
2731 : SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2732 : {
2733 : if (initial_ref) {
2734 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2735 : Py_XINCREF(_obj);
2736 : SWIG_PYTHON_THREAD_END_BLOCK;
2737 : }
2738 : }
2739 :
2740 : SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
2741 : {
2742 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2743 : Py_XINCREF(item._obj);
2744 : Py_XDECREF(_obj);
2745 : _obj = item._obj;
2746 : SWIG_PYTHON_THREAD_END_BLOCK;
2747 : return *this;
2748 : }
2749 :
2750 : ~SwigPtr_PyObject()
2751 : {
2752 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2753 : Py_XDECREF(_obj);
2754 : SWIG_PYTHON_THREAD_END_BLOCK;
2755 : }
2756 :
2757 : operator PyObject *() const
2758 : {
2759 : return _obj;
2760 : }
2761 :
2762 : PyObject *operator->() const
2763 : {
2764 : return _obj;
2765 : }
2766 : };
2767 : }
2768 :
2769 :
2770 : namespace swig {
2771 : struct SwigVar_PyObject : SwigPtr_PyObject {
2772 : SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2773 :
2774 : SwigVar_PyObject & operator = (PyObject* obj)
2775 : {
2776 : Py_XDECREF(_obj);
2777 : _obj = obj;
2778 : return *this;
2779 : }
2780 : };
2781 : }
2782 :
2783 :
2784 : SWIGINTERN swig_type_info*
2785 509 : SWIG_pchar_descriptor(void)
2786 : {
2787 509 : static int init = 0;
2788 509 : static swig_type_info* info = 0;
2789 509 : if (!init) {
2790 30 : info = SWIG_TypeQuery("_p_char");
2791 30 : init = 1;
2792 : }
2793 509 : return info;
2794 : }
2795 :
2796 :
2797 : SWIGINTERNINLINE PyObject *
2798 58952 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2799 : {
2800 58952 : if (carray) {
2801 58906 : if (size > INT_MAX) {
2802 0 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2803 0 : return pchar_descriptor ?
2804 0 : SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
2805 : } else {
2806 : #if PY_VERSION_HEX >= 0x03000000
2807 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2808 : return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
2809 : #else
2810 58906 : return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
2811 : #endif
2812 : #else
2813 : return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
2814 : #endif
2815 : }
2816 : } else {
2817 46 : return SWIG_Py_Void();
2818 : }
2819 : }
2820 :
2821 :
2822 : SWIGINTERNINLINE PyObject *
2823 58952 : SWIG_FromCharPtr(const char *cptr)
2824 : {
2825 13852 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2826 : }
2827 :
2828 :
2829 : #define SWIG_From_double PyFloat_FromDouble
2830 :
2831 :
2832 : SWIGINTERNINLINE PyObject*
2833 24853 : SWIG_From_int (int value)
2834 : {
2835 24853 : return PyInt_FromLong((long) value);
2836 : }
2837 :
2838 :
2839 : typedef char retStringAndCPLFree;
2840 :
2841 :
2842 : #include <iostream>
2843 : using namespace std;
2844 :
2845 : #define CPL_SUPRESS_CPLUSPLUS
2846 :
2847 : #include "cpl_string.h"
2848 : #include "cpl_conv.h"
2849 :
2850 : #include "ogr_srs_api.h"
2851 :
2852 : #ifdef DEBUG
2853 : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
2854 : typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
2855 : typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
2856 : #else
2857 : typedef void OSRSpatialReferenceShadow;
2858 : typedef void OSRCoordinateTransformationShadow;
2859 : #endif
2860 :
2861 :
2862 : #define MODULE_NAME "osr"
2863 :
2864 :
2865 : #include "cpl_string.h"
2866 : #include "cpl_conv.h"
2867 :
2868 : static int bUseExceptions=0;
2869 : static int bUserHasSpecifiedIfUsingExceptions = FALSE;
2870 : static thread_local int bUseExceptionsLocal = -1;
2871 :
2872 31199 : struct PythonBindingErrorHandlerContext
2873 : {
2874 : std::string osInitialMsg{};
2875 : std::string osFailureMsg{};
2876 : CPLErrorNum nLastCode = CPLE_None;
2877 : bool bMemoryError = false;
2878 : };
2879 :
2880 : static void CPL_STDCALL
2881 36 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
2882 : {
2883 36 : PythonBindingErrorHandlerContext* ctxt = static_cast<
2884 36 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
2885 :
2886 : /*
2887 : ** Generally we want to suppress error reporting if we have exceptions
2888 : ** enabled as the error message will be in the exception thrown in
2889 : ** Python.
2890 : */
2891 :
2892 : /* If the error class is CE_Fatal, we want to have a message issued
2893 : because the CPL support code does an abort() before any exception
2894 : can be generated */
2895 36 : if (eclass == CE_Fatal ) {
2896 0 : CPLCallPreviousHandler(eclass, err_no, msg );
2897 : }
2898 :
2899 : /*
2900 : ** We do not want to interfere with non-failure messages since
2901 : ** they won't be translated into exceptions.
2902 : */
2903 36 : else if (eclass != CE_Failure ) {
2904 7 : CPLCallPreviousHandler(eclass, err_no, msg );
2905 : }
2906 : else {
2907 29 : ctxt->nLastCode = err_no;
2908 29 : try
2909 : {
2910 29 : if( ctxt->osFailureMsg.empty() ) {
2911 29 : ctxt->osFailureMsg = msg;
2912 29 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2913 : } else {
2914 0 : if( ctxt->osFailureMsg.size() < 10000 ) {
2915 0 : std::string osTmp(msg);
2916 0 : osTmp += "\nMay be caused by: ";
2917 0 : osTmp += ctxt->osFailureMsg;
2918 0 : ctxt->osFailureMsg = std::move(osTmp);
2919 0 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2920 : }
2921 : else
2922 : {
2923 0 : std::string osTmp(msg);
2924 0 : osTmp += "\n[...]\nMay be caused by: ";
2925 0 : osTmp += ctxt->osInitialMsg;
2926 0 : ctxt->osFailureMsg = std::move(osTmp);
2927 : }
2928 : }
2929 : }
2930 0 : catch( const std::exception& )
2931 : {
2932 0 : ctxt->bMemoryError = true;
2933 : }
2934 : }
2935 36 : }
2936 :
2937 :
2938 :
2939 :
2940 : static
2941 106217 : int GetUseExceptions() {
2942 68358 : return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
2943 : }
2944 :
2945 11601 : static int _GetExceptionsLocal()
2946 : {
2947 11601 : return bUseExceptionsLocal;
2948 : }
2949 :
2950 23202 : static void _SetExceptionsLocal(int bVal)
2951 : {
2952 23202 : bUseExceptionsLocal = bVal;
2953 : }
2954 :
2955 : static
2956 26 : void _UseExceptions() {
2957 26 : CPLErrorReset();
2958 26 : bUserHasSpecifiedIfUsingExceptions = TRUE;
2959 26 : if( !bUseExceptions )
2960 : {
2961 25 : bUseExceptions = 1;
2962 : }
2963 : }
2964 :
2965 : static
2966 5 : void _DontUseExceptions() {
2967 5 : CPLErrorReset();
2968 5 : bUserHasSpecifiedIfUsingExceptions = TRUE;
2969 5 : if( bUseExceptions )
2970 : {
2971 0 : bUseExceptions = 0;
2972 : }
2973 : }
2974 :
2975 2311 : static int _UserHasSpecifiedIfUsingExceptions()
2976 : {
2977 299 : return bUserHasSpecifiedIfUsingExceptions || bUseExceptionsLocal >= 0;
2978 : }
2979 :
2980 :
2981 :
2982 : #include <limits.h>
2983 : #if !defined(SWIG_NO_LLONG_MAX)
2984 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
2985 : # define LLONG_MAX __LONG_LONG_MAX__
2986 : # define LLONG_MIN (-LLONG_MAX - 1LL)
2987 : # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
2988 : # endif
2989 : #endif
2990 :
2991 :
2992 : SWIGINTERN int
2993 1362 : SWIG_AsVal_double (PyObject *obj, double *val)
2994 : {
2995 1362 : int res = SWIG_TypeError;
2996 1362 : if (PyFloat_Check(obj)) {
2997 865 : if (val) *val = PyFloat_AsDouble(obj);
2998 865 : return SWIG_OK;
2999 : #if PY_VERSION_HEX < 0x03000000
3000 : } else if (PyInt_Check(obj)) {
3001 : if (val) *val = (double) PyInt_AsLong(obj);
3002 : return SWIG_OK;
3003 : #endif
3004 497 : } else if (PyLong_Check(obj)) {
3005 497 : double v = PyLong_AsDouble(obj);
3006 497 : if (!PyErr_Occurred()) {
3007 497 : if (val) *val = v;
3008 497 : return SWIG_OK;
3009 : } else {
3010 0 : PyErr_Clear();
3011 : }
3012 : }
3013 : #ifdef SWIG_PYTHON_CAST_MODE
3014 : {
3015 : int dispatch = 0;
3016 : double d = PyFloat_AsDouble(obj);
3017 : if (!PyErr_Occurred()) {
3018 : if (val) *val = d;
3019 : return SWIG_AddCast(SWIG_OK);
3020 : } else {
3021 : PyErr_Clear();
3022 : }
3023 : if (!dispatch) {
3024 : long v = PyLong_AsLong(obj);
3025 : if (!PyErr_Occurred()) {
3026 : if (val) *val = v;
3027 : return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3028 : } else {
3029 : PyErr_Clear();
3030 : }
3031 : }
3032 : }
3033 : #endif
3034 : return res;
3035 : }
3036 :
3037 :
3038 : #include <float.h>
3039 :
3040 :
3041 : #include <math.h>
3042 :
3043 :
3044 : SWIGINTERNINLINE int
3045 : SWIG_CanCastAsInteger(double *d, double min, double max) {
3046 : double x = *d;
3047 : if ((min <= x && x <= max)) {
3048 : double fx = floor(x);
3049 : double cx = ceil(x);
3050 : double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3051 : if ((errno == EDOM) || (errno == ERANGE)) {
3052 : errno = 0;
3053 : } else {
3054 : double summ, reps, diff;
3055 : if (rd < x) {
3056 : diff = x - rd;
3057 : } else if (rd > x) {
3058 : diff = rd - x;
3059 : } else {
3060 : return 1;
3061 : }
3062 : summ = rd + x;
3063 : reps = diff/summ;
3064 : if (reps < 8*DBL_EPSILON) {
3065 : *d = rd;
3066 : return 1;
3067 : }
3068 : }
3069 : }
3070 : return 0;
3071 : }
3072 :
3073 :
3074 : SWIGINTERN int
3075 24711 : SWIG_AsVal_long (PyObject *obj, long* val)
3076 : {
3077 : #if PY_VERSION_HEX < 0x03000000
3078 : if (PyInt_Check(obj)) {
3079 : if (val) *val = PyInt_AsLong(obj);
3080 : return SWIG_OK;
3081 : } else
3082 : #endif
3083 24711 : if (PyLong_Check(obj)) {
3084 24711 : long v = PyLong_AsLong(obj);
3085 24711 : if (!PyErr_Occurred()) {
3086 24711 : if (val) *val = v;
3087 24711 : return SWIG_OK;
3088 : } else {
3089 0 : PyErr_Clear();
3090 0 : return SWIG_OverflowError;
3091 : }
3092 : }
3093 : #ifdef SWIG_PYTHON_CAST_MODE
3094 : {
3095 : int dispatch = 0;
3096 : long v = PyInt_AsLong(obj);
3097 : if (!PyErr_Occurred()) {
3098 : if (val) *val = v;
3099 : return SWIG_AddCast(SWIG_OK);
3100 : } else {
3101 : PyErr_Clear();
3102 : }
3103 : if (!dispatch) {
3104 : double d;
3105 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3106 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3107 : if (val) *val = (long)(d);
3108 : return res;
3109 : }
3110 : }
3111 : }
3112 : #endif
3113 : return SWIG_TypeError;
3114 : }
3115 :
3116 :
3117 : SWIGINTERN int
3118 24705 : SWIG_AsVal_int (PyObject * obj, int *val)
3119 : {
3120 24705 : long v;
3121 49410 : int res = SWIG_AsVal_long (obj, &v);
3122 24705 : if (SWIG_IsOK(res)) {
3123 24705 : if ((v < INT_MIN || v > INT_MAX)) {
3124 : return SWIG_OverflowError;
3125 : } else {
3126 24705 : if (val) *val = static_cast< int >(v);
3127 : }
3128 : }
3129 : return res;
3130 : }
3131 :
3132 :
3133 : /* Completely unrelated: just to avoid Coverity warnings */
3134 :
3135 : static int bReturnSame = 1;
3136 :
3137 0 : void NeverCallMePlease() {
3138 0 : bReturnSame = 0;
3139 0 : }
3140 :
3141 : /* Some SWIG code generates dead code, which Coverity warns about */
3142 114467 : template<class T> static T ReturnSame(T x)
3143 : {
3144 1697 : if( bReturnSame )
3145 : return x;
3146 : return 0;
3147 : }
3148 :
3149 31199 : static void pushErrorHandler()
3150 : {
3151 31199 : CPLErrorReset();
3152 31199 : PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
3153 31199 : CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
3154 31199 : }
3155 :
3156 31199 : static void popErrorHandler()
3157 : {
3158 31199 : PythonBindingErrorHandlerContext* ctxt = static_cast<
3159 31199 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
3160 31199 : CPLPopErrorHandler();
3161 31199 : if( ctxt->bMemoryError )
3162 : {
3163 0 : CPLErrorSetState(
3164 : CE_Failure, CPLE_OutOfMemory, "Out of memory");
3165 : }
3166 31199 : else if( !ctxt->osFailureMsg.empty() )
3167 : {
3168 29 : CPLErrorSetState(
3169 29 : CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
3170 : ctxt->nLastCode, ctxt->osFailureMsg.c_str());
3171 : }
3172 31199 : delete ctxt;
3173 31199 : }
3174 :
3175 :
3176 :
3177 :
3178 : /* Return a PyObject* from a NULL terminated C String */
3179 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
3180 1781 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
3181 : {
3182 1781 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3183 608702 : while(*pszIter != 0)
3184 : {
3185 606924 : if (*pszIter > 127)
3186 : {
3187 3 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
3188 3 : if (pyObj != NULL && !PyErr_Occurred())
3189 : return pyObj;
3190 0 : PyErr_Clear();
3191 0 : return PyBytes_FromString(pszStr);
3192 : }
3193 606921 : pszIter ++;
3194 : }
3195 1778 : return PyUnicode_FromString(pszStr);
3196 : }
3197 :
3198 : /* Return a NULL terminated c String from a PyObject */
3199 : /* Result must be freed with GDALPythonFreeCStr */
3200 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3201 46 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
3202 : {
3203 46 : *pbToFree = 0;
3204 46 : if (PyUnicode_Check(pyObject))
3205 : {
3206 46 : char *pszStr;
3207 46 : char *pszNewStr;
3208 46 : Py_ssize_t nLen;
3209 46 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
3210 46 : if( pyUTF8Str == NULL )
3211 : return NULL;
3212 46 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3213 46 : pszNewStr = (char *) malloc(nLen+1);
3214 46 : if( pszNewStr == NULL )
3215 : {
3216 0 : CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
3217 : (unsigned long long)(nLen + 1));
3218 0 : Py_XDECREF(pyUTF8Str);
3219 0 : return NULL;
3220 : }
3221 46 : memcpy(pszNewStr, pszStr, nLen+1);
3222 46 : Py_XDECREF(pyUTF8Str);
3223 46 : *pbToFree = 1;
3224 46 : return pszNewStr;
3225 : }
3226 0 : else if( PyBytes_Check(pyObject) )
3227 : {
3228 0 : char* ret = PyBytes_AsString(pyObject);
3229 :
3230 : // Check if there are \0 bytes inside the string
3231 0 : const Py_ssize_t size = PyBytes_Size(pyObject);
3232 0 : for( Py_ssize_t i = 0; i < size; i++ )
3233 : {
3234 0 : if( ret[i] == 0 )
3235 : {
3236 0 : CPLError(CE_Failure, CPLE_AppDefined,
3237 : "bytes object cast as string contains a zero-byte.");
3238 0 : return NULL;
3239 : }
3240 : }
3241 :
3242 : return ret;
3243 : }
3244 : else
3245 : {
3246 0 : CPLError(CE_Failure, CPLE_AppDefined,
3247 : "Passed object is neither of type string nor bytes");
3248 0 : return NULL;
3249 : }
3250 : }
3251 :
3252 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3253 0 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
3254 : {
3255 0 : PyObject* os = PyImport_ImportModule("os");
3256 0 : if (os == NULL)
3257 : {
3258 : return NULL;
3259 : }
3260 :
3261 0 : PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
3262 0 : if (pathLike == NULL)
3263 : {
3264 0 : Py_DECREF(os);
3265 0 : return NULL;
3266 : }
3267 :
3268 0 : if (!PyObject_IsInstance(pyObject, pathLike))
3269 : {
3270 0 : Py_DECREF(pathLike);
3271 0 : Py_DECREF(os);
3272 0 : return NULL;
3273 : }
3274 :
3275 0 : PyObject* str = PyObject_Str(pyObject);
3276 0 : char* ret = NULL;
3277 0 : if (str != NULL)
3278 : {
3279 0 : ret = GDALPythonObjectToCStr(str, pbToFree);
3280 0 : Py_DECREF(str);
3281 : }
3282 :
3283 0 : Py_DECREF(pathLike);
3284 0 : Py_DECREF(os);
3285 :
3286 : return ret;
3287 : }
3288 :
3289 :
3290 : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
3291 46 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
3292 : {
3293 46 : if (bToFree)
3294 46 : free(ptr);
3295 : }
3296 :
3297 :
3298 :
3299 0 : OGRErr GetWellKnownGeogCSAsWKT( const char *name, char **argout ) {
3300 0 : OGRSpatialReferenceH srs = OSRNewSpatialReference("");
3301 0 : OGRErr rcode = OSRSetWellKnownGeogCS( srs, name );
3302 0 : if( rcode == OGRERR_NONE )
3303 0 : rcode = OSRExportToWkt ( srs, argout );
3304 0 : OSRRelease( srs );
3305 0 : return rcode;
3306 : }
3307 :
3308 :
3309 : SWIGINTERN int
3310 1957 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3311 : {
3312 : #if PY_VERSION_HEX>=0x03000000
3313 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3314 : if (PyBytes_Check(obj))
3315 : #else
3316 1957 : if (PyUnicode_Check(obj))
3317 : #endif
3318 : #else
3319 : if (PyString_Check(obj))
3320 : #endif
3321 : {
3322 1448 : char *cstr; Py_ssize_t len;
3323 1448 : int ret = SWIG_OK;
3324 : #if PY_VERSION_HEX>=0x03000000
3325 : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3326 1448 : if (!alloc && cptr) {
3327 : /* We can't allow converting without allocation, since the internal
3328 : representation of string in Python 3 is UCS-2/UCS-4 but we require
3329 : a UTF-8 representation.
3330 : TODO(bhy) More detailed explanation */
3331 : return SWIG_RuntimeError;
3332 : }
3333 1448 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3334 1448 : if (!obj)
3335 : return SWIG_TypeError;
3336 1448 : if (alloc)
3337 1448 : *alloc = SWIG_NEWOBJ;
3338 : #endif
3339 1448 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3340 : #else
3341 : PyString_AsStringAndSize(obj, &cstr, &len);
3342 : #endif
3343 1448 : if (cptr) {
3344 1448 : if (alloc) {
3345 1448 : if (*alloc == SWIG_NEWOBJ) {
3346 1448 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3347 1448 : *alloc = SWIG_NEWOBJ;
3348 : } else {
3349 0 : *cptr = cstr;
3350 0 : *alloc = SWIG_OLDOBJ;
3351 : }
3352 : } else {
3353 : #if PY_VERSION_HEX>=0x03000000
3354 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3355 : *cptr = PyBytes_AsString(obj);
3356 : #else
3357 : assert(0); /* Should never reach here with Unicode strings in Python 3 */
3358 : #endif
3359 : #else
3360 : *cptr = SWIG_Python_str_AsChar(obj);
3361 : if (!*cptr)
3362 : ret = SWIG_TypeError;
3363 : #endif
3364 : }
3365 : }
3366 1448 : if (psize) *psize = len + 1;
3367 : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3368 1448 : Py_XDECREF(obj);
3369 : #endif
3370 1448 : return ret;
3371 : } else {
3372 : #if defined(SWIG_PYTHON_2_UNICODE)
3373 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3374 : #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3375 : #endif
3376 : #if PY_VERSION_HEX<0x03000000
3377 : if (PyUnicode_Check(obj)) {
3378 : char *cstr; Py_ssize_t len;
3379 : if (!alloc && cptr) {
3380 : return SWIG_RuntimeError;
3381 : }
3382 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3383 : if (!obj)
3384 : return SWIG_TypeError;
3385 : if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3386 : if (cptr) {
3387 : if (alloc) *alloc = SWIG_NEWOBJ;
3388 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3389 : }
3390 : if (psize) *psize = len + 1;
3391 :
3392 : Py_XDECREF(obj);
3393 : return SWIG_OK;
3394 : } else {
3395 : Py_XDECREF(obj);
3396 : }
3397 : }
3398 : #endif
3399 : #endif
3400 :
3401 509 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3402 509 : if (pchar_descriptor) {
3403 509 : void* vptr = 0;
3404 509 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3405 509 : if (cptr) *cptr = (char *) vptr;
3406 509 : if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3407 509 : if (alloc) *alloc = SWIG_OLDOBJ;
3408 509 : return SWIG_OK;
3409 : }
3410 : }
3411 : }
3412 : return SWIG_TypeError;
3413 : }
3414 :
3415 :
3416 :
3417 :
3418 :
3419 :
3420 : #include "ogr_core.h"
3421 : static char const *
3422 39 : OGRErrMessages( int rc ) {
3423 39 : switch( rc ) {
3424 : case OGRERR_NONE:
3425 : return "OGR Error: None";
3426 0 : case OGRERR_NOT_ENOUGH_DATA:
3427 0 : return "OGR Error: Not enough data to deserialize";
3428 0 : case OGRERR_NOT_ENOUGH_MEMORY:
3429 0 : return "OGR Error: Not enough memory";
3430 0 : case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
3431 0 : return "OGR Error: Unsupported geometry type";
3432 0 : case OGRERR_UNSUPPORTED_OPERATION:
3433 0 : return "OGR Error: Unsupported operation";
3434 37 : case OGRERR_CORRUPT_DATA:
3435 37 : return "OGR Error: Corrupt data";
3436 1 : case OGRERR_FAILURE:
3437 1 : return "OGR Error: General Error";
3438 1 : case OGRERR_UNSUPPORTED_SRS:
3439 1 : return "OGR Error: Unsupported SRS";
3440 0 : case OGRERR_INVALID_HANDLE:
3441 0 : return "OGR Error: Invalid handle";
3442 0 : case OGRERR_NON_EXISTING_FEATURE:
3443 0 : return "OGR Error: Non existing feature";
3444 0 : default:
3445 0 : return "OGR Error: Unknown";
3446 : }
3447 : }
3448 :
3449 :
3450 12 : OGRErr GetUserInputAsWKT( const char *name, char **argout ) {
3451 12 : OGRSpatialReferenceH srs = OSRNewSpatialReference("");
3452 12 : OGRErr rcode = OSRSetFromUserInput( srs, name );
3453 12 : if( rcode == OGRERR_NONE )
3454 12 : rcode = OSRExportToWkt ( srs, argout );
3455 12 : OSRRelease( srs );
3456 12 : return rcode;
3457 : }
3458 :
3459 :
3460 : typedef struct
3461 : {
3462 : double west_lon_degree;
3463 : double south_lat_degree;
3464 : double east_lon_degree;
3465 : double north_lat_degree;
3466 : char* name;
3467 : } OSRAreaOfUse;
3468 :
3469 1 : SWIGINTERN OSRAreaOfUse *new_OSRAreaOfUse(double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char *name){
3470 0 : OSRAreaOfUse *self = (OSRAreaOfUse*) CPLMalloc( sizeof( OSRAreaOfUse ) );
3471 1 : self->west_lon_degree = west_lon_degree;
3472 1 : self->south_lat_degree = south_lat_degree;
3473 1 : self->east_lon_degree = east_lon_degree;
3474 1 : self->north_lat_degree = north_lat_degree;
3475 0 : self->name = name ? CPLStrdup(name) : NULL;
3476 1 : return self;
3477 : }
3478 1 : SWIGINTERN void delete_OSRAreaOfUse(OSRAreaOfUse *self){
3479 1 : CPLFree( self->name );
3480 1 : CPLFree( self );
3481 : }
3482 :
3483 :
3484 1 : double OSRAreaOfUse_west_lon_degree_get( OSRAreaOfUse *area ) {
3485 1 : return area->west_lon_degree;
3486 : }
3487 :
3488 1 : double OSRAreaOfUse_south_lat_degree_get( OSRAreaOfUse *area ) {
3489 1 : return area->south_lat_degree;
3490 : }
3491 :
3492 1 : double OSRAreaOfUse_east_lon_degree_get( OSRAreaOfUse *area ) {
3493 1 : return area->east_lon_degree;
3494 : }
3495 :
3496 1 : double OSRAreaOfUse_north_lat_degree_get( OSRAreaOfUse *area ) {
3497 1 : return area->north_lat_degree;
3498 : }
3499 :
3500 1 : const char* OSRAreaOfUse_name_get( OSRAreaOfUse *area ) {
3501 1 : return area->name;
3502 : }
3503 :
3504 :
3505 2330 : SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
3506 2330 : return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
3507 : }
3508 4332 : SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
3509 4332 : OSRRelease( self );
3510 : }
3511 4 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow___str__(OSRSpatialReferenceShadow *self){
3512 4 : char *buf = 0;
3513 4 : OSRExportToPrettyWkt( self, &buf, 0 );
3514 4 : return buf;
3515 : }
3516 39 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetName(OSRSpatialReferenceShadow *self){
3517 39 : return OSRGetName( self );
3518 : }
3519 :
3520 : /************************************************************************/
3521 : /* CSLFromPySequence() */
3522 : /************************************************************************/
3523 137 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
3524 :
3525 : {
3526 137 : *pbErr = FALSE;
3527 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
3528 137 : if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
3529 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
3530 0 : *pbErr = TRUE;
3531 0 : return NULL;
3532 : }
3533 :
3534 137 : Py_ssize_t size = PySequence_Size(pySeq);
3535 137 : if( size > (Py_ssize_t)(INT_MAX - 1) ) {
3536 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
3537 0 : *pbErr = TRUE;
3538 0 : return NULL;
3539 : }
3540 137 : if( size == 0 ) {
3541 : return NULL;
3542 : }
3543 137 : char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
3544 137 : if( !papszRet ) {
3545 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3546 0 : *pbErr = TRUE;
3547 0 : return NULL;
3548 : }
3549 392 : for (int i = 0; i < (int)size; i++) {
3550 255 : PyObject* pyObj = PySequence_GetItem(pySeq,i);
3551 255 : if (PyUnicode_Check(pyObj))
3552 : {
3553 255 : char *pszStr;
3554 255 : Py_ssize_t nLen;
3555 255 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
3556 255 : if( !pyUTF8Str )
3557 : {
3558 0 : Py_DECREF(pyObj);
3559 0 : PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
3560 0 : CSLDestroy(papszRet);
3561 0 : *pbErr = TRUE;
3562 0 : return NULL;
3563 : }
3564 255 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3565 255 : papszRet[i] = VSIStrdup(pszStr);
3566 507 : Py_XDECREF(pyUTF8Str);
3567 : }
3568 0 : else if (PyBytes_Check(pyObj))
3569 0 : papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
3570 : else
3571 : {
3572 0 : Py_DECREF(pyObj);
3573 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
3574 0 : CSLDestroy(papszRet);
3575 0 : *pbErr = TRUE;
3576 0 : return NULL;
3577 : }
3578 255 : Py_DECREF(pyObj);
3579 255 : if( !papszRet[i] )
3580 : {
3581 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3582 0 : CSLDestroy(papszRet);
3583 0 : *pbErr = TRUE;
3584 0 : return NULL;
3585 : }
3586 : }
3587 : return papszRet;
3588 : }
3589 :
3590 :
3591 8 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
3592 :
3593 : {
3594 8 : char** retCSL = NULL;
3595 8 : Py_ssize_t size = PyMapping_Length( pyObj );
3596 8 : if ( size > 0 && size == (int)size) {
3597 4 : PyObject *item_list = PyMapping_Items( pyObj );
3598 26 : for( int i=0; i<(int)size; i++ ) {
3599 22 : PyObject *it = PySequence_GetItem( item_list, i );
3600 :
3601 22 : PyObject *k, *v;
3602 22 : if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
3603 0 : Py_DECREF(it);
3604 0 : Py_DECREF(item_list);
3605 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
3606 0 : CSLDestroy(retCSL);
3607 0 : *pbErr = TRUE;
3608 0 : return NULL;
3609 : }
3610 :
3611 22 : PyObject* kStr = PyObject_Str(k);
3612 22 : if( PyErr_Occurred() )
3613 : {
3614 0 : Py_DECREF(it);
3615 0 : Py_DECREF(item_list);
3616 0 : CSLDestroy(retCSL);
3617 0 : *pbErr = TRUE;
3618 0 : return NULL;
3619 : }
3620 :
3621 22 : PyObject* vStr;
3622 22 : if( PyBytes_Check(v) )
3623 : {
3624 0 : vStr = v;
3625 0 : Py_INCREF(vStr);
3626 : }
3627 : else
3628 : {
3629 22 : vStr = PyObject_Str(v);
3630 22 : if( PyErr_Occurred() )
3631 : {
3632 0 : Py_DECREF(it);
3633 0 : Py_DECREF(kStr);
3634 0 : Py_DECREF(item_list);
3635 0 : CSLDestroy(retCSL);
3636 0 : *pbErr = TRUE;
3637 0 : return NULL;
3638 : }
3639 : }
3640 :
3641 22 : int bFreeK, bFreeV;
3642 22 : char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
3643 22 : char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
3644 22 : if( pszK == NULL || pszV == NULL )
3645 : {
3646 0 : GDALPythonFreeCStr(pszK, bFreeK);
3647 0 : GDALPythonFreeCStr(pszV, bFreeV);
3648 0 : Py_DECREF(kStr);
3649 0 : Py_DECREF(vStr);
3650 0 : Py_DECREF(it);
3651 0 : Py_DECREF(item_list);
3652 0 : PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
3653 0 : CSLDestroy(retCSL);
3654 0 : *pbErr = TRUE;
3655 0 : return NULL;
3656 : }
3657 22 : retCSL = CSLAddNameValue( retCSL, pszK, pszV );
3658 :
3659 22 : GDALPythonFreeCStr(pszK, bFreeK);
3660 22 : GDALPythonFreeCStr(pszV, bFreeV);
3661 22 : Py_DECREF(kStr);
3662 22 : Py_DECREF(vStr);
3663 22 : Py_DECREF(it);
3664 : }
3665 4 : Py_DECREF(item_list);
3666 : }
3667 8 : *pbErr = FALSE;
3668 8 : return retCSL;
3669 : }
3670 :
3671 600 : SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs,char **options=NULL){
3672 600 : return OSRIsSameEx( self, rhs, options );
3673 : }
3674 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3675 0 : return OSRIsSameGeogCS( self, rhs );
3676 : }
3677 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameVertCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3678 0 : return OSRIsSameVertCS( self, rhs );
3679 : }
3680 242 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
3681 242 : return OSRIsGeographic(self);
3682 : }
3683 1 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedGeographic(OSRSpatialReferenceShadow *self){
3684 1 : return OSRIsDerivedGeographic(self);
3685 : }
3686 409 : SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
3687 409 : return OSRIsProjected(self);
3688 : }
3689 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedProjected(OSRSpatialReferenceShadow *self){
3690 0 : return OSRIsDerivedProjected(self);
3691 : }
3692 5 : SWIGINTERN int OSRSpatialReferenceShadow_IsCompound(OSRSpatialReferenceShadow *self){
3693 5 : return OSRIsCompound(self);
3694 : }
3695 2 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeocentric(OSRSpatialReferenceShadow *self){
3696 2 : return OSRIsGeocentric(self);
3697 : }
3698 4 : SWIGINTERN int OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow *self){
3699 4 : return OSRIsLocal(self);
3700 : }
3701 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsVertical(OSRSpatialReferenceShadow *self){
3702 0 : return OSRIsVertical(self);
3703 : }
3704 0 : SWIGINTERN bool OSRSpatialReferenceShadow_IsDynamic(OSRSpatialReferenceShadow *self){
3705 0 : return OSRIsDynamic(self);
3706 : }
3707 :
3708 : SWIGINTERNINLINE PyObject*
3709 21 : SWIG_From_bool (bool value)
3710 : {
3711 21 : return PyBool_FromLong(value ? 1 : 0);
3712 : }
3713 :
3714 0 : SWIGINTERN bool OSRSpatialReferenceShadow_HasPointMotionOperation(OSRSpatialReferenceShadow *self){
3715 0 : return OSRHasPointMotionOperation(self);
3716 : }
3717 29 : SWIGINTERN double OSRSpatialReferenceShadow_GetCoordinateEpoch(OSRSpatialReferenceShadow *self){
3718 29 : return OSRGetCoordinateEpoch(self);
3719 : }
3720 31 : SWIGINTERN void OSRSpatialReferenceShadow_SetCoordinateEpoch(OSRSpatialReferenceShadow *self,double coordinateEpoch){
3721 31 : OSRSetCoordinateEpoch(self, coordinateEpoch);
3722 : }
3723 179 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
3724 179 : return OSREPSGTreatsAsLatLong(self);
3725 : }
3726 186 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(OSRSpatialReferenceShadow *self){
3727 186 : return OSREPSGTreatsAsNorthingEasting(self);
3728 : }
3729 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAuthority(OSRSpatialReferenceShadow *self,char const *pszTargetKey,char const *pszAuthority,int nCode){
3730 0 : return OSRSetAuthority( self, pszTargetKey, pszAuthority, nCode );
3731 : }
3732 34 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
3733 34 : return OSRGetAttrValue( self, name, child );
3734 : }
3735 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
3736 1 : return OSRSetAttrValue( self, name, value );
3737 : }
3738 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow *self,char const *name,double to_radians){
3739 0 : return OSRSetAngularUnits( self, name, to_radians );
3740 : }
3741 0 : SWIGINTERN double OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow *self){
3742 : // Return code ignored.
3743 0 : return OSRGetAngularUnits( self, 0 );
3744 : }
3745 1 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAngularUnitsName(OSRSpatialReferenceShadow *self){
3746 1 : char *name = 0;
3747 1 : OSRGetAngularUnits( self, &name );
3748 : // This is really a const char* that is returned and shouldn't be freed
3749 1 : return (const char*)name;
3750 : }
3751 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target,char const *name,double to_meters){
3752 1 : return OSRSetTargetLinearUnits( self, target, name, to_meters );
3753 : }
3754 6 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3755 6 : return OSRSetLinearUnits( self, name, to_meters );
3756 : }
3757 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3758 1 : return OSRSetLinearUnitsAndUpdateParameters( self, name, to_meters );
3759 : }
3760 4 : SWIGINTERN double OSRSpatialReferenceShadow_GetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target_key){
3761 : // Return code ignored.
3762 4 : return OSRGetTargetLinearUnits( self, target_key, 0 );
3763 : }
3764 202 : SWIGINTERN double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
3765 : // Return code ignored.
3766 202 : return OSRGetLinearUnits( self, 0 );
3767 : }
3768 24 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetLinearUnitsName(OSRSpatialReferenceShadow *self){
3769 24 : char *name = NULL;
3770 : // Return code ignored.
3771 24 : OSRGetLinearUnits( self, &name );
3772 24 : return (const char*)name;
3773 : }
3774 482 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key){
3775 482 : return OSRGetAuthorityCode( self, target_key );
3776 : }
3777 44 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow *self,char const *target_key){
3778 44 : return OSRGetAuthorityName( self, target_key );
3779 : }
3780 1 : SWIGINTERN OSRAreaOfUse *OSRSpatialReferenceShadow_GetAreaOfUse(OSRSpatialReferenceShadow *self){
3781 1 : OSRAreaOfUse* pArea = new_OSRAreaOfUse(0,0,0,0,NULL);
3782 1 : const char* name = NULL;
3783 1 : if( !OSRGetAreaOfUse(self,
3784 : &pArea->west_lon_degree,
3785 : &pArea->south_lat_degree,
3786 : &pArea->east_lon_degree,
3787 : &pArea->north_lat_degree,
3788 : &name) )
3789 : {
3790 0 : delete_OSRAreaOfUse(pArea);
3791 0 : return NULL;
3792 : }
3793 1 : pArea->name = name ? CPLStrdup(name) : NULL;
3794 1 : return pArea;
3795 : }
3796 6 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAxisName(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
3797 6 : return OSRGetAxis( self, target_key, iAxis, NULL );
3798 : }
3799 6 : SWIGINTERN int OSRSpatialReferenceShadow_GetAxesCount(OSRSpatialReferenceShadow *self){
3800 6 : return OSRGetAxesCount(self);
3801 : }
3802 5 : SWIGINTERN OGRAxisOrientation OSRSpatialReferenceShadow_GetAxisOrientation(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
3803 5 : OGRAxisOrientation orientation = OAO_Other;
3804 5 : OSRGetAxis( self, target_key, iAxis, &orientation );
3805 5 : return orientation;
3806 : }
3807 37 : SWIGINTERN OSRAxisMappingStrategy OSRSpatialReferenceShadow_GetAxisMappingStrategy(OSRSpatialReferenceShadow *self){
3808 37 : return OSRGetAxisMappingStrategy(self);
3809 : }
3810 516 : SWIGINTERN void OSRSpatialReferenceShadow_SetAxisMappingStrategy(OSRSpatialReferenceShadow *self,OSRAxisMappingStrategy strategy){
3811 516 : OSRSetAxisMappingStrategy(self, strategy);
3812 : }
3813 88 : SWIGINTERN void OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int *nLen,int const **pList){
3814 176 : *pList = OSRGetDataAxisToSRSAxisMapping(self, nLen);
3815 : }
3816 :
3817 : static int*
3818 12 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
3819 : /* check if is List */
3820 12 : if ( !PySequence_Check(pySeq) ) {
3821 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
3822 0 : *pnSize = -1;
3823 0 : return NULL;
3824 : }
3825 12 : Py_ssize_t size = PySequence_Size(pySeq);
3826 12 : if( size > (Py_ssize_t)INT_MAX ) {
3827 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
3828 0 : *pnSize = -1;
3829 0 : return NULL;
3830 : }
3831 12 : if( (size_t)size > SIZE_MAX / sizeof(int) ) {
3832 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
3833 0 : *pnSize = -1;
3834 0 : return NULL;
3835 : }
3836 12 : *pnSize = (int)size;
3837 12 : int* ret = (int*) malloc((*pnSize)*sizeof(int));
3838 12 : if( !ret ) {
3839 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3840 0 : *pnSize = -1;
3841 0 : return NULL;
3842 : }
3843 38 : for( int i = 0; i<*pnSize; i++ ) {
3844 26 : PyObject *o = PySequence_GetItem(pySeq,i);
3845 26 : if ( !PyArg_Parse(o,"i",&ret[i]) ) {
3846 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
3847 0 : Py_DECREF(o);
3848 0 : free(ret);
3849 0 : *pnSize = -1;
3850 0 : return NULL;
3851 : }
3852 26 : Py_DECREF(o);
3853 : }
3854 : return ret;
3855 : }
3856 :
3857 12 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int nList,int *pList){
3858 12 : return OSRSetDataAxisToSRSAxisMapping(self, nList, pList);
3859 : }
3860 16 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow *self,int zone,int north=1){
3861 16 : return OSRSetUTM( self, zone, north );
3862 : }
3863 6 : SWIGINTERN int OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow *self){
3864 : // Note: we will return south zones as negative since it is
3865 : // hard to return two values as the C API does.
3866 6 : int bNorth = FALSE;
3867 12 : int nZone = OSRGetUTMZone( self, &bNorth );
3868 6 : if( !bNorth )
3869 3 : nZone = -1 * ABS(nZone);
3870 6 : return nZone;
3871 : }
3872 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
3873 2 : return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
3874 : }
3875 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
3876 5 : return OSRAutoIdentifyEPSG( self );
3877 : }
3878 5 : SWIGINTERN void OSRSpatialReferenceShadow_FindMatches(OSRSpatialReferenceShadow *self,char **options=NULL,OSRSpatialReferenceShadow ***matches=NULL,int *nvalues=NULL,int **confidence_values=NULL){
3879 10 : *matches = OSRFindMatches(self, options, nvalues, confidence_values);
3880 : }
3881 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
3882 0 : return OSRSetProjection( self, arg );
3883 : }
3884 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3885 0 : return OSRSetProjParm( self, name, val );
3886 : }
3887 65 : SWIGINTERN double OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3888 : // Return code ignored.
3889 65 : return OSRGetProjParm( self, name, default_val, 0 );
3890 : }
3891 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3892 0 : return OSRSetNormProjParm( self, name, val );
3893 : }
3894 1 : SWIGINTERN double OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3895 : // Return code ignored.
3896 1 : return OSRGetNormProjParm( self, name, default_val, 0 );
3897 : }
3898 8 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
3899 : // Return code ignored.
3900 8 : return OSRGetSemiMajor( self, 0 );
3901 : }
3902 4 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
3903 : // Return code ignored.
3904 4 : return OSRGetSemiMinor( self, 0 );
3905 : }
3906 10 : SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
3907 : // Return code ignored.
3908 10 : return OSRGetInvFlattening( self, 0 );
3909 : }
3910 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3911 0 : return OSRSetACEA( self, stdp1, stdp2, clat, clong,
3912 : fe, fn );
3913 : }
3914 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3915 0 : return OSRSetAE( self, clat, clong,
3916 : fe, fn );
3917 : }
3918 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double stdp,double cm,double fe,double fn){
3919 0 : return OSRSetBonne( self, stdp, cm, fe, fn );
3920 : }
3921 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow *self,double stdp1,double cm,double fe,double fn){
3922 0 : return OSRSetCEA( self, stdp1, cm,
3923 : fe, fn );
3924 : }
3925 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3926 0 : return OSRSetCS( self, clat, clong,
3927 : fe, fn );
3928 : }
3929 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3930 0 : return OSRSetEC( self, stdp1, stdp2, clat, clong,
3931 : fe, fn );
3932 : }
3933 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3934 0 : return OSRSetEckertIV( self, cm, fe, fn);
3935 : }
3936 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3937 0 : return OSRSetEckertVI( self, cm, fe, fn);
3938 : }
3939 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3940 0 : return OSRSetEquirectangular( self, clat, clong,
3941 : fe, fn );
3942 : }
3943 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow *self,double clat,double clong,double pseudostdparallellat,double fe,double fn){
3944 3 : return OSRSetEquirectangular2( self, clat, clong,
3945 : pseudostdparallellat,
3946 : fe, fn );
3947 : }
3948 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double sc,double fe,double fn){
3949 0 : return OSRSetGaussSchreiberTMercator( self, clat, clong, sc, fe, fn );
3950 : }
3951 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3952 1 : return OSRSetGS( self, cm, fe, fn );
3953 : }
3954 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3955 0 : return OSRSetGH( self, cm, fe, fn );
3956 : }
3957 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow *self){
3958 0 : return OSRSetIGH( self );
3959 : }
3960 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
3961 0 : return OSRSetGEOS( self, cm, satelliteheight,
3962 : fe, fn );
3963 : }
3964 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3965 0 : return OSRSetGnomonic( self, clat, clong,
3966 : fe, fn );
3967 : }
3968 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn){
3969 0 : return OSRSetHOM( self, clat, clong, azimuth, recttoskew,
3970 : scale, fe, fn );
3971 : }
3972 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow *self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn){
3973 0 : return OSRSetHOM2PNO( self, clat, dfLat1, dfLong1, dfLat2, dfLong2,
3974 : scale, fe, fn );
3975 : }
3976 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn){
3977 0 : return OSRSetKrovak( self, clat, clong,
3978 : azimuth, pseudostdparallellat,
3979 : scale, fe, fn );
3980 : }
3981 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3982 0 : return OSRSetLAEA( self, clat, clong,
3983 : fe, fn );
3984 : }
3985 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3986 1 : return OSRSetLCC( self, stdp1, stdp2, clat, clong,
3987 : fe, fn );
3988 : }
3989 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3990 0 : return OSRSetLCC1SP( self, clat, clong, scale,
3991 : fe, fn );
3992 : }
3993 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3994 0 : return OSRSetLCCB( self, stdp1, stdp2, clat, clong,
3995 : fe, fn );
3996 : }
3997 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3998 0 : return OSRSetMC( self, clat, clong,
3999 : fe, fn );
4000 : }
4001 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4002 2 : return OSRSetMercator( self, clat, clong,
4003 : scale, fe, fn );
4004 : }
4005 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator2SP(OSRSpatialReferenceShadow *self,double stdp1,double clat,double clong,double fe,double fn){
4006 1 : return OSRSetMercator2SP( self, stdp1, clat, clong, fe, fn );
4007 : }
4008 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
4009 0 : return OSRSetMollweide( self, cm,
4010 : fe, fn );
4011 : }
4012 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4013 0 : return OSRSetNZMG( self, clat, clong,
4014 : fe, fn );
4015 : }
4016 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow *self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn){
4017 0 : return OSRSetOS( self, dfOriginLat, dfCMeridian, scale,
4018 : fe, fn );
4019 : }
4020 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4021 1 : return OSRSetOrthographic( self, clat, clong,
4022 : fe, fn );
4023 : }
4024 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4025 0 : return OSRSetPolyconic( self, clat, clong,
4026 : fe, fn );
4027 : }
4028 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4029 1 : return OSRSetPS( self, clat, clong, scale,
4030 : fe, fn );
4031 : }
4032 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4033 0 : return OSRSetRobinson( self, clong, fe, fn );
4034 : }
4035 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4036 1 : return OSRSetSinusoidal( self, clong, fe, fn );
4037 : }
4038 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4039 0 : return OSRSetStereographic( self, clat, clong, scale,
4040 : fe, fn );
4041 : }
4042 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow *self,double latitudeoforigin,double cm,double fe,double fn){
4043 0 : return OSRSetSOC( self, latitudeoforigin, cm,
4044 : fe, fn );
4045 : }
4046 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4047 1 : return OSRSetTM( self, clat, clong, scale,
4048 : fe, fn );
4049 : }
4050 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow *self,char const *pszVariantName,double clat,double clong,double scale,double fe,double fn){
4051 0 : return OSRSetTMVariant( self, pszVariantName, clat, clong,
4052 : scale, fe, fn );
4053 : }
4054 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4055 0 : return OSRSetTMG( self, clat, clong,
4056 : fe, fn );
4057 : }
4058 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4059 0 : return OSRSetTMSO( self, clat, clong, scale,
4060 : fe, fn );
4061 : }
4062 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4063 0 : return OSRSetVDG( self, clong, fe, fn );
4064 : }
4065 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVerticalPerspective(OSRSpatialReferenceShadow *self,double topoOriginLat,double topoOriginLon,double topoOriginHeight,double viewPointHeight,double fe,double fn){
4066 1 : return OSRSetVerticalPerspective( self,
4067 : topoOriginLat, topoOriginLon, topoOriginHeight, viewPointHeight, fe, fn );
4068 : }
4069 63 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
4070 63 : return OSRSetWellKnownGeogCS( self, name );
4071 : }
4072 704 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name,char **options=NULL){
4073 704 : return OSRSetFromUserInputEx( self, name, options );
4074 : }
4075 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
4076 1 : return OSRCopyGeogCSFrom( self, rhs );
4077 : }
4078 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTOWGS84(OSRSpatialReferenceShadow *self,double p1,double p2,double p3,double p4=0.0,double p5=0.0,double p6=0.0,double p7=0.0){
4079 :
4080 3 : return OSRSetTOWGS84( self, p1, p2, p3, p4, p5, p6, p7 );
4081 : }
4082 4 : SWIGINTERN bool OSRSpatialReferenceShadow_HasTOWGS84(OSRSpatialReferenceShadow *self){
4083 4 : double ignored[7];
4084 8 : return OSRGetTOWGS84( self, ignored, 7 ) == OGRERR_NONE;
4085 : }
4086 :
4087 : static PyObject *
4088 242 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
4089 242 : PyObject *out = PyTuple_New( size );
4090 1122 : for( unsigned int i=0; i<size; i++ ) {
4091 880 : PyObject *val = PyFloat_FromDouble( *first );
4092 880 : ++first;
4093 880 : PyTuple_SetItem( out, i, val );
4094 : }
4095 242 : return out;
4096 : }
4097 :
4098 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow *self,double argout[7]){
4099 4 : return OSRGetTOWGS84( self, argout, 7 );
4100 : }
4101 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AddGuessedTOWGS84(OSRSpatialReferenceShadow *self){
4102 2 : return OSRAddGuessedTOWGS84( self );
4103 : }
4104 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLocalCS(OSRSpatialReferenceShadow *self,char const *pszName){
4105 1 : return OSRSetLocalCS( self, pszName );
4106 : }
4107 17 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeogCS(OSRSpatialReferenceShadow *self,char const *pszGeogName,char const *pszDatumName,char const *pszEllipsoidName,double dfSemiMajor,double dfInvFlattening,char const *pszPMName="Greenwich",double dfPMOffset=0.0,char const *pszUnits="degree",double dfConvertToRadians=0.0174532925199433){
4108 17 : return OSRSetGeogCS( self, pszGeogName, pszDatumName, pszEllipsoidName,
4109 : dfSemiMajor, dfInvFlattening,
4110 : pszPMName, dfPMOffset, pszUnits, dfConvertToRadians );
4111 : }
4112 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
4113 1 : return OSRSetProjCS( self, name );
4114 : }
4115 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeocCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
4116 4 : return OSRSetGeocCS( self, name );
4117 : }
4118 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVertCS(OSRSpatialReferenceShadow *self,char const *VertCSName="unnamed",char const *VertDatumName="unnamed",int VertDatumType=0){
4119 0 : return OSRSetVertCS( self, VertCSName, VertDatumName, VertDatumType );
4120 : }
4121 8 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCompoundCS(OSRSpatialReferenceShadow *self,char const *name,OSRSpatialReferenceShadow *horizcs,OSRSpatialReferenceShadow *vertcs){
4122 8 : return OSRSetCompoundCS( self, name, horizcs, vertcs );
4123 : }
4124 290 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
4125 290 : return OSRImportFromWkt( self, ppszInput );
4126 : }
4127 179 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
4128 179 : return OSRImportFromProj4( self, ppszInput );
4129 : }
4130 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUrl(OSRSpatialReferenceShadow *self,char *url){
4131 3 : return OSRImportFromUrl( self, url );
4132 : }
4133 11 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow *self,char **ppszInput){
4134 11 : return OSRImportFromESRI( self, ppszInput );
4135 : }
4136 906 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
4137 906 : return OSRImportFromEPSG(self, arg);
4138 : }
4139 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow *self,int arg){
4140 2 : return OSRImportFromEPSGA(self, arg);
4141 : }
4142 7 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
4143 7 : return OSRImportFromPCI( self, proj, units, argin );
4144 : }
4145 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUSGS(OSRSpatialReferenceShadow *self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0){
4146 2 : return OSRImportFromUSGS( self, proj_code, zone, argin, datum_code );
4147 : }
4148 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
4149 1 : return OSRImportFromXML( self, xmlString );
4150 : }
4151 7 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
4152 7 : return OSRImportFromERM( self, proj, datum, units );
4153 : }
4154 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
4155 3 : return OSRImportFromMICoordSys( self, pszCoordSys );
4156 : }
4157 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *const *papszLines){
4158 3 : return OSRImportFromOzi( self, papszLines );
4159 : }
4160 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromCF1(OSRSpatialReferenceShadow *self,char **keyValues,char const *units=NULL){
4161 4 : return OSRImportFromCF1(self, keyValues, units);
4162 : }
4163 1194 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4164 1194 : return OSRExportToWktEx( self, argout, options );
4165 : }
4166 50 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
4167 50 : return OSRExportToPrettyWkt( self, argout, simplify );
4168 : }
4169 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPROJJSON(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4170 2 : return OSRExportToPROJJSON( self, argout, options );
4171 : }
4172 423 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
4173 423 : return OSRExportToProj4( self, argout );
4174 : }
4175 6 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *params[17]){
4176 6 : return OSRExportToPCI( self, proj, units, params );
4177 : }
4178 :
4179 : #define SWIG_From_long PyInt_FromLong
4180 :
4181 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *params[15],long *datum){
4182 2 : return OSRExportToUSGS( self, code, zone, params, datum );
4183 : }
4184 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToERM(OSRSpatialReferenceShadow *self,char **proj,char **datum,char **units){
4185 1 : char szProj[32] = {0}, szDatum[32] = {0}, szUnits[32] = {0};
4186 1 : OGRErr ret = OSRExportToERM( self, szProj, szDatum, szUnits );
4187 1 : *proj = CPLStrdup(szProj);
4188 1 : *datum = CPLStrdup(szDatum);
4189 1 : *units = CPLStrdup(szUnits);
4190 1 : return ret;
4191 : }
4192 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
4193 2 : return OSRExportToXML( self, argout, dialect );
4194 : }
4195 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
4196 5 : return OSRExportToMICoordSys( self, argout );
4197 : }
4198 4 : SWIGINTERN char **OSRSpatialReferenceShadow_ExportToCF1(OSRSpatialReferenceShadow *self,char **options=NULL){
4199 4 : char** ret = NULL;
4200 4 : OSRExportToCF1(self, NULL, &ret, NULL, options);
4201 4 : return ret;
4202 : }
4203 :
4204 : /* Return a PyObject* from a C String */
4205 44 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
4206 : {
4207 44 : const unsigned char* pszIter = (const unsigned char*) pszStr;
4208 854 : for( size_t i = 0; i < nLen; ++i)
4209 : {
4210 810 : if (pszIter[i] > 127)
4211 : {
4212 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
4213 0 : if (pyObj != NULL && !PyErr_Occurred())
4214 : return pyObj;
4215 0 : PyErr_Clear();
4216 0 : return PyBytes_FromStringAndSize(pszStr, nLen);
4217 : }
4218 : }
4219 44 : return PyUnicode_FromStringAndSize(pszStr, nLen);
4220 : }
4221 :
4222 :
4223 : static PyObject*
4224 4 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
4225 4 : PyObject* dict = PyDict_New();
4226 4 : if ( stringarray != NULL ) {
4227 48 : for (char** iter = stringarray; *iter; ++iter ) {
4228 44 : const char* pszSep = strchr( *iter, '=' );
4229 44 : if ( pszSep != NULL) {
4230 44 : const char* keyptr = *iter;
4231 44 : const char* valptr = pszSep + 1;
4232 44 : PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
4233 44 : PyObject *val = GDALPythonObjectFromCStr( valptr );
4234 44 : PyDict_SetItem(dict, nm, val );
4235 44 : Py_DECREF(nm);
4236 44 : Py_DECREF(val);
4237 : }
4238 : }
4239 : }
4240 4 : if( bFreeCSL )
4241 4 : CSLDestroy(stringarray);
4242 4 : return dict;
4243 : }
4244 :
4245 1 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow_ExportToCF1Units(OSRSpatialReferenceShadow *self,char **options=NULL){
4246 1 : char* units = NULL;
4247 1 : OSRExportToCF1(self, NULL, NULL, &units, options);
4248 1 : return units;
4249 : }
4250 16 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
4251 16 : return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
4252 : }
4253 59 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
4254 59 : return (OSRSpatialReferenceShadow*) OSRClone(self);
4255 : }
4256 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripVertical(OSRSpatialReferenceShadow *self){
4257 1 : return OSRStripVertical(self);
4258 : }
4259 114 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
4260 114 : return OSRValidate(self);
4261 : }
4262 20 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
4263 20 : return OSRMorphToESRI(self);
4264 : }
4265 19 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
4266 19 : return OSRMorphFromESRI(self);
4267 : }
4268 28 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_ConvertToOtherProjection(OSRSpatialReferenceShadow *self,char const *other_projection,char **options=NULL){
4269 28 : return OSRConvertToOtherProjection(self, other_projection, options);
4270 : }
4271 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_PromoteTo3D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4272 3 : return OSRPromoteTo3D(self, name);
4273 : }
4274 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_DemoteTo2D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4275 1 : return OSRDemoteTo2D(self, name);
4276 : }
4277 11 : SWIGINTERN OGRCoordinateTransformationOptions *new_OGRCoordinateTransformationOptions(){
4278 11 : return OCTNewCoordinateTransformationOptions();
4279 : }
4280 11 : SWIGINTERN void delete_OGRCoordinateTransformationOptions(OGRCoordinateTransformationOptions *self){
4281 11 : OCTDestroyCoordinateTransformationOptions( self );
4282 : }
4283 5 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetAreaOfInterest(OGRCoordinateTransformationOptions *self,double westLongitudeDeg,double southLatitudeDeg,double eastLongitudeDeg,double northLatitudeDeg){
4284 5 : return OCTCoordinateTransformationOptionsSetAreaOfInterest(self,
4285 : westLongitudeDeg, southLatitudeDeg,
4286 5 : eastLongitudeDeg, northLatitudeDeg);
4287 : }
4288 :
4289 : SWIGINTERN int
4290 2 : SWIG_AsVal_bool (PyObject *obj, bool *val)
4291 : {
4292 2 : int r;
4293 2 : if (!PyBool_Check(obj))
4294 : return SWIG_ERROR;
4295 2 : r = PyObject_IsTrue(obj);
4296 2 : if (r == -1)
4297 : return SWIG_ERROR;
4298 2 : if (val) *val = r ? true : false;
4299 : return SWIG_OK;
4300 : }
4301 :
4302 8 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOperation(OGRCoordinateTransformationOptions *self,char const *operation,bool inverseCT=false){
4303 16 : return OCTCoordinateTransformationOptionsSetOperation(self, operation, inverseCT);
4304 : }
4305 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetDesiredAccuracy(OGRCoordinateTransformationOptions *self,double accuracy){
4306 2 : return OCTCoordinateTransformationOptionsSetDesiredAccuracy(self, accuracy);
4307 : }
4308 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetBallparkAllowed(OGRCoordinateTransformationOptions *self,bool allowBallpark){
4309 2 : return OCTCoordinateTransformationOptionsSetBallparkAllowed(self, allowBallpark);
4310 : }
4311 0 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOnlyBest(OGRCoordinateTransformationOptions *self,bool onlyBest){
4312 0 : return OCTCoordinateTransformationOptionsSetOnlyBest(self, onlyBest);
4313 : }
4314 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_0(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
4315 : return (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation(src, dst);
4316 : }
4317 10 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_1(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst,OGRCoordinateTransformationOptions *options){
4318 10 : return (OSRCoordinateTransformationShadow*)
4319 10 : options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst);
4320 : }
4321 151 : SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
4322 151 : OCTDestroyCoordinateTransformation( self );
4323 : }
4324 1 : SWIGINTERN OSRCoordinateTransformationShadow *OSRCoordinateTransformationShadow_GetInverse(OSRCoordinateTransformationShadow *self){
4325 1 : return OCTGetInverse(self);
4326 : }
4327 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint3Double(OSRCoordinateTransformationShadow *self,double inout[3]){
4328 :
4329 :
4330 :
4331 1 : if (self == NULL)
4332 : return;
4333 1 : OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
4334 : }
4335 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint4Double(OSRCoordinateTransformationShadow *self,double inout[4]){
4336 :
4337 :
4338 :
4339 1 : if (self == NULL)
4340 : return;
4341 1 : OCTTransform4D( self, 1, &inout[0], &inout[1], &inout[2], &inout[3], NULL );
4342 : }
4343 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
4344 : if (self == NULL)
4345 : return;
4346 : argout[0] = x;
4347 : argout[1] = y;
4348 : argout[2] = z;
4349 : OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
4350 : }
4351 4 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
4352 4 : if (self == NULL)
4353 : return;
4354 4 : argout[0] = x;
4355 4 : argout[1] = y;
4356 4 : argout[2] = z;
4357 4 : argout[3] = t;
4358 4 : OCTTransform4D( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], NULL );
4359 : }
4360 0 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPointWithErrorCode(OSRCoordinateTransformationShadow *self,double argout[4],int errorCode[1],double x,double y,double z,double t){
4361 0 : if (self == NULL)
4362 : return;
4363 0 : argout[0] = x;
4364 0 : argout[1] = y;
4365 0 : argout[2] = z;
4366 0 : argout[3] = t;
4367 0 : OCTTransform4DWithErrorCodes( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], errorCode );
4368 : }
4369 :
4370 : static int
4371 10 : DecomposeSequenceOf4DCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z, double *t, int *pbFoundTime )
4372 : {
4373 10 : *pbFoundTime = FALSE;
4374 33 : for( int i = 0; i<nCount; ++i )
4375 : {
4376 :
4377 23 : PyObject *o = PySequence_GetItem(seq, i);
4378 23 : if ( !PySequence_Check(o) )
4379 : {
4380 0 : Py_DECREF(o);
4381 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4382 :
4383 0 : return FALSE;
4384 : }
4385 :
4386 23 : Py_ssize_t len = PySequence_Size(o);
4387 :
4388 23 : if (len >= 2 && len <= 4)
4389 : {
4390 23 : PyObject *o1 = PySequence_GetItem(o, 0);
4391 23 : if (!PyNumber_Check(o1))
4392 : {
4393 0 : Py_DECREF(o); Py_DECREF(o1);
4394 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4395 :
4396 0 : return FALSE;
4397 : }
4398 23 : x[i] = PyFloat_AsDouble(o1);
4399 23 : Py_DECREF(o1);
4400 :
4401 23 : o1 = PySequence_GetItem(o, 1);
4402 23 : if (!PyNumber_Check(o1))
4403 : {
4404 0 : Py_DECREF(o); Py_DECREF(o1);
4405 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4406 :
4407 0 : return FALSE;
4408 : }
4409 23 : y[i] = PyFloat_AsDouble(o1);
4410 23 : Py_DECREF(o1);
4411 :
4412 : /* The 3rd coordinate is optional, default 0.0 */
4413 23 : if (len >= 3)
4414 : {
4415 16 : o1 = PySequence_GetItem(o, 2);
4416 16 : if (!PyNumber_Check(o1))
4417 : {
4418 0 : Py_DECREF(o); Py_DECREF(o1);
4419 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4420 :
4421 0 : return FALSE;
4422 : }
4423 16 : z[i] = PyFloat_AsDouble(o1);
4424 16 : Py_DECREF(o1);
4425 : }
4426 : else
4427 : {
4428 7 : z[i] = 0.0;
4429 : }
4430 :
4431 : /* The 4th coordinate is optional, default 0.0 */
4432 23 : if (len >= 4)
4433 : {
4434 8 : o1 = PySequence_GetItem(o, 3);
4435 8 : if (!PyNumber_Check(o1))
4436 : {
4437 0 : Py_DECREF(o); Py_DECREF(o1);
4438 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4439 :
4440 0 : return FALSE;
4441 : }
4442 8 : *pbFoundTime = TRUE;
4443 8 : t[i] = PyFloat_AsDouble(o1);
4444 8 : Py_DECREF(o1);
4445 : }
4446 : else
4447 : {
4448 15 : t[i] = 0.0;
4449 : }
4450 : }
4451 : else
4452 : {
4453 0 : Py_DECREF(o);
4454 0 : PyErr_SetString(PyExc_TypeError, "invalid coordinate");
4455 :
4456 0 : return FALSE;
4457 : }
4458 :
4459 23 : Py_DECREF(o);
4460 : }
4461 :
4462 : return TRUE;
4463 : }
4464 :
4465 10 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z,double *t){
4466 10 : if (self == NULL)
4467 : return;
4468 10 : OCTTransform4D( self, nCount, x, y, z, t, NULL );
4469 : }
4470 25 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformBounds(OSRCoordinateTransformationShadow *self,double argout[4],double minx,double miny,double maxx,double maxy,int densify_pts){
4471 25 : argout[0] = HUGE_VAL;
4472 25 : argout[1] = HUGE_VAL;
4473 25 : argout[2] = HUGE_VAL;
4474 25 : argout[3] = HUGE_VAL;
4475 25 : if (self == NULL)
4476 : return;
4477 25 : OCTTransformBounds(
4478 : self,
4479 : minx, miny, maxx, maxy,
4480 : &argout[0], &argout[1], &argout[2], &argout[3],
4481 : densify_pts
4482 : );
4483 : }
4484 :
4485 2 : OSRCoordinateTransformationShadow *CreateCoordinateTransformation( OSRSpatialReferenceShadow *src, OSRSpatialReferenceShadow *dst, OGRCoordinateTransformationOptions* options = NULL ) {
4486 2 : return (OSRCoordinateTransformationShadow*)
4487 2 : options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst);
4488 : }
4489 :
4490 6609 : SWIGINTERN OSRCRSInfo *new_OSRCRSInfo(char const *auth_name,char const *code,char const *name,OSRCRSType type,bool deprecated,bool bbox_valid,double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char const *area_name,char const *projection_method){
4491 6609 : OSRCRSInfo *self = (OSRCRSInfo*) CPLMalloc( sizeof( OSRCRSInfo ) );
4492 6609 : self->pszAuthName = auth_name ? CPLStrdup(auth_name) : NULL;
4493 6609 : self->pszCode = code ? CPLStrdup(code) : NULL;
4494 6609 : self->pszName = name ? CPLStrdup(name) : NULL;
4495 6609 : self->eType = type;
4496 6609 : self->bDeprecated = deprecated;
4497 6609 : self->bBboxValid = bbox_valid;
4498 6609 : self->dfWestLongitudeDeg = west_lon_degree;
4499 6609 : self->dfSouthLatitudeDeg = south_lat_degree;
4500 6609 : self->dfEastLongitudeDeg = east_lon_degree;
4501 6609 : self->dfNorthLatitudeDeg = north_lat_degree;
4502 6609 : self->pszAreaName = area_name ? CPLStrdup(area_name) : NULL;
4503 6609 : self->pszProjectionMethod = projection_method ? CPLStrdup(projection_method) : NULL;
4504 6609 : return self;
4505 : }
4506 6609 : SWIGINTERN void delete_OSRCRSInfo(OSRCRSInfo *self){
4507 6609 : CPLFree( self->pszAuthName );
4508 6609 : CPLFree( self->pszCode );
4509 6609 : CPLFree( self->pszName );
4510 6609 : CPLFree( self->pszAreaName );
4511 6609 : CPLFree( self->pszProjectionMethod );
4512 6609 : CPLFree( self );
4513 6609 : }
4514 :
4515 :
4516 6609 : const char* OSRCRSInfo_auth_name_get( OSRCRSInfo *crsInfo ) {
4517 6609 : return crsInfo->pszAuthName;
4518 : }
4519 :
4520 6609 : const char* OSRCRSInfo_code_get( OSRCRSInfo *crsInfo ) {
4521 6609 : return crsInfo->pszCode;
4522 : }
4523 :
4524 1 : const char* OSRCRSInfo_name_get( OSRCRSInfo *crsInfo ) {
4525 1 : return crsInfo->pszName;
4526 : }
4527 :
4528 1 : OSRCRSType OSRCRSInfo_type_get( OSRCRSInfo *crsInfo ) {
4529 1 : return crsInfo->eType;
4530 : }
4531 :
4532 1 : bool OSRCRSInfo_deprecated_get( OSRCRSInfo *crsInfo ) {
4533 1 : return crsInfo->bDeprecated;
4534 : }
4535 :
4536 1 : bool OSRCRSInfo_bbox_valid_get( OSRCRSInfo *crsInfo ) {
4537 1 : return crsInfo->bBboxValid;
4538 : }
4539 :
4540 1 : double OSRCRSInfo_west_lon_degree_get( OSRCRSInfo *crsInfo ) {
4541 1 : return crsInfo->dfWestLongitudeDeg;
4542 : }
4543 :
4544 1 : double OSRCRSInfo_south_lat_degree_get( OSRCRSInfo *crsInfo ) {
4545 1 : return crsInfo->dfSouthLatitudeDeg;
4546 : }
4547 :
4548 1 : double OSRCRSInfo_east_lon_degree_get( OSRCRSInfo *crsInfo ) {
4549 1 : return crsInfo->dfEastLongitudeDeg;
4550 : }
4551 :
4552 1 : double OSRCRSInfo_north_lat_degree_get( OSRCRSInfo *crsInfo ) {
4553 1 : return crsInfo->dfNorthLatitudeDeg;
4554 : }
4555 :
4556 1 : const char* OSRCRSInfo_area_name_get( OSRCRSInfo *crsInfo ) {
4557 1 : return crsInfo->pszAreaName;
4558 : }
4559 :
4560 1 : const char* OSRCRSInfo_projection_method_get( OSRCRSInfo *crsInfo ) {
4561 1 : return crsInfo->pszProjectionMethod;
4562 : }
4563 :
4564 :
4565 :
4566 1 : char** GetAuthorityListFromDatabase()
4567 : {
4568 1 : return OSRGetAuthorityListFromDatabase();
4569 : }
4570 :
4571 :
4572 22 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
4573 : {
4574 22 : PyObject* res;
4575 22 : if ( stringarray == NULL ) {
4576 0 : res = Py_None;
4577 0 : Py_INCREF( res );
4578 : }
4579 : else {
4580 22 : int len = CSLCount( stringarray );
4581 22 : res = PyList_New( len );
4582 22 : if( !res ) {
4583 0 : *pbErr = true;
4584 0 : return res;
4585 : }
4586 55 : for ( int i = 0; i < len; ++i ) {
4587 33 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
4588 33 : PyList_SetItem(res, i, o );
4589 : }
4590 : }
4591 22 : *pbErr = false;
4592 22 : return res;
4593 : }
4594 :
4595 :
4596 1 : void GetCRSInfoListFromDatabase( const char *authName,
4597 : OSRCRSInfo*** pList,
4598 : int* pnListCount)
4599 : {
4600 1 : *pList = OSRGetCRSInfoListFromDatabase(authName, NULL, pnListCount);
4601 1 : }
4602 :
4603 :
4604 1 : void SetPROJSearchPath( const char *utf8_path )
4605 : {
4606 1 : const char* const apszPaths[2] = { utf8_path, NULL };
4607 1 : OSRSetPROJSearchPaths(apszPaths);
4608 1 : }
4609 :
4610 :
4611 16 : void SetPROJSearchPaths( char** paths )
4612 : {
4613 16 : OSRSetPROJSearchPaths(paths);
4614 16 : }
4615 :
4616 :
4617 21 : char** GetPROJSearchPaths()
4618 : {
4619 21 : return OSRGetPROJSearchPaths();
4620 : }
4621 :
4622 :
4623 70 : int GetPROJVersionMajor()
4624 : {
4625 70 : int num;
4626 70 : OSRGetPROJVersion(&num, NULL, NULL);
4627 70 : return num;
4628 : }
4629 :
4630 64 : int GetPROJVersionMinor()
4631 : {
4632 64 : int num;
4633 64 : OSRGetPROJVersion(NULL, &num, NULL);
4634 64 : return num;
4635 : }
4636 :
4637 49 : int GetPROJVersionMicro()
4638 : {
4639 49 : int num;
4640 49 : OSRGetPROJVersion(NULL, NULL, &num);
4641 49 : return num;
4642 : }
4643 :
4644 0 : bool GetPROJEnableNetwork()
4645 : {
4646 0 : return OSRGetPROJEnableNetwork();
4647 : }
4648 :
4649 0 : void SetPROJEnableNetwork(bool enabled)
4650 : {
4651 0 : OSRSetPROJEnableNetwork(enabled);
4652 0 : }
4653 :
4654 :
4655 1 : void SetPROJAuxDbPath( const char *utf8_path )
4656 : {
4657 1 : const char* const apszPaths[2] = { utf8_path, NULL };
4658 1 : OSRSetPROJAuxDbPaths(apszPaths);
4659 1 : }
4660 :
4661 :
4662 0 : void SetPROJAuxDbPaths( char** paths )
4663 : {
4664 0 : OSRSetPROJAuxDbPaths(paths);
4665 0 : }
4666 :
4667 :
4668 0 : char** GetPROJAuxDbPaths()
4669 : {
4670 0 : return OSRGetPROJAuxDbPaths();
4671 : }
4672 :
4673 : #ifdef __cplusplus
4674 : extern "C" {
4675 : #endif
4676 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4677 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4678 0 : int result;
4679 :
4680 0 : if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
4681 0 : {
4682 : #ifdef SED_HACKS
4683 0 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4684 : #endif
4685 0 : result = GetUseExceptions();
4686 : }
4687 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4688 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4689 : return resultobj;
4690 0 : fail:
4691 0 : return NULL;
4692 : }
4693 :
4694 :
4695 11601 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4696 11601 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4697 11601 : int result;
4698 :
4699 11601 : if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
4700 11601 : {
4701 : #ifdef SED_HACKS
4702 11601 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4703 : #endif
4704 11601 : result = (int)_GetExceptionsLocal();
4705 : }
4706 11601 : resultobj = SWIG_From_int(static_cast< int >(result));
4707 11601 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4708 : return resultobj;
4709 0 : fail:
4710 0 : return NULL;
4711 : }
4712 :
4713 :
4714 23202 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4715 23202 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4716 23202 : int arg1 ;
4717 23202 : int val1 ;
4718 23202 : int ecode1 = 0 ;
4719 23202 : PyObject *swig_obj[1] ;
4720 :
4721 23202 : if (!args) SWIG_fail;
4722 23202 : swig_obj[0] = args;
4723 23202 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
4724 23202 : if (!SWIG_IsOK(ecode1)) {
4725 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
4726 : }
4727 23202 : arg1 = static_cast< int >(val1);
4728 23202 : {
4729 : #ifdef SED_HACKS
4730 23202 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4731 : #endif
4732 23202 : _SetExceptionsLocal(arg1);
4733 : }
4734 23202 : resultobj = SWIG_Py_Void();
4735 23202 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4736 : return resultobj;
4737 : fail:
4738 : return NULL;
4739 : }
4740 :
4741 :
4742 26 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4743 26 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4744 :
4745 26 : if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
4746 26 : _UseExceptions();
4747 26 : resultobj = SWIG_Py_Void();
4748 26 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4749 : return resultobj;
4750 0 : fail:
4751 0 : return NULL;
4752 : }
4753 :
4754 :
4755 5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4756 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4757 :
4758 5 : if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
4759 5 : _DontUseExceptions();
4760 5 : resultobj = SWIG_Py_Void();
4761 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4762 : return resultobj;
4763 0 : fail:
4764 0 : return NULL;
4765 : }
4766 :
4767 :
4768 2311 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4769 2311 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4770 2311 : int result;
4771 :
4772 2311 : if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
4773 2311 : {
4774 : #ifdef SED_HACKS
4775 2311 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4776 : #endif
4777 2311 : result = (int)_UserHasSpecifiedIfUsingExceptions();
4778 : }
4779 2311 : resultobj = SWIG_From_int(static_cast< int >(result));
4780 2311 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4781 : return resultobj;
4782 0 : fail:
4783 0 : return NULL;
4784 : }
4785 :
4786 :
4787 0 : SWIGINTERN PyObject *_wrap_GetWellKnownGeogCSAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4788 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4789 0 : char *arg1 = (char *) 0 ;
4790 0 : char **arg2 = (char **) 0 ;
4791 0 : int res1 ;
4792 0 : char *buf1 = 0 ;
4793 0 : int alloc1 = 0 ;
4794 0 : char *argout2 = 0 ;
4795 0 : PyObject *swig_obj[1] ;
4796 0 : OGRErr result;
4797 :
4798 0 : {
4799 : /* %typemap(in,numinputs=0) (char **argout2) */
4800 0 : arg2 = &argout2;
4801 : }
4802 0 : if (!args) SWIG_fail;
4803 0 : swig_obj[0] = args;
4804 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4805 0 : if (!SWIG_IsOK(res1)) {
4806 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetWellKnownGeogCSAsWKT" "', argument " "1"" of type '" "char const *""'");
4807 : }
4808 0 : arg1 = reinterpret_cast< char * >(buf1);
4809 0 : {
4810 0 : if (!arg1) {
4811 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4812 : }
4813 : }
4814 0 : {
4815 0 : const int bLocalUseExceptions = GetUseExceptions();
4816 0 : if ( bLocalUseExceptions ) {
4817 0 : pushErrorHandler();
4818 : }
4819 0 : result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
4820 0 : if ( bLocalUseExceptions ) {
4821 0 : popErrorHandler();
4822 : }
4823 : #ifndef SED_HACKS
4824 : if ( bLocalUseExceptions ) {
4825 : CPLErr eclass = CPLGetLastErrorType();
4826 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4827 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4828 : }
4829 : }
4830 : #endif
4831 : }
4832 0 : {
4833 : /* %typemap(out) OGRErr */
4834 0 : if ( result != 0 && GetUseExceptions()) {
4835 0 : const char* pszMessage = CPLGetLastErrorMsg();
4836 0 : if( pszMessage[0] != '\0' )
4837 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4838 : else
4839 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4840 0 : SWIG_fail;
4841 : }
4842 : }
4843 0 : {
4844 : /* %typemap(argout) (char **argout) */
4845 0 : PyObject *o;
4846 0 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4847 0 : o = GDALPythonObjectFromCStr( *arg2 );
4848 : }
4849 : else {
4850 0 : o = Py_None;
4851 0 : Py_INCREF( o );
4852 : }
4853 : #if SWIG_VERSION >= 0x040300
4854 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
4855 : #else
4856 0 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
4857 : #endif
4858 : }
4859 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4860 0 : {
4861 : /* %typemap(freearg) (char **argout) */
4862 0 : if ( *arg2 )
4863 0 : CPLFree( *arg2 );
4864 : }
4865 0 : {
4866 : /* %typemap(ret) OGRErr */
4867 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4868 0 : resultobj = PyInt_FromLong( result );
4869 : }
4870 : }
4871 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4872 : return resultobj;
4873 0 : fail:
4874 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4875 0 : {
4876 : /* %typemap(freearg) (char **argout) */
4877 0 : if ( *arg2 )
4878 0 : CPLFree( *arg2 );
4879 : }
4880 : return NULL;
4881 : }
4882 :
4883 :
4884 12 : SWIGINTERN PyObject *_wrap_GetUserInputAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4885 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4886 12 : char *arg1 = (char *) 0 ;
4887 12 : char **arg2 = (char **) 0 ;
4888 12 : int res1 ;
4889 12 : char *buf1 = 0 ;
4890 12 : int alloc1 = 0 ;
4891 12 : char *argout2 = 0 ;
4892 12 : PyObject *swig_obj[1] ;
4893 12 : OGRErr result;
4894 :
4895 12 : {
4896 : /* %typemap(in,numinputs=0) (char **argout2) */
4897 12 : arg2 = &argout2;
4898 : }
4899 12 : if (!args) SWIG_fail;
4900 12 : swig_obj[0] = args;
4901 12 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4902 12 : if (!SWIG_IsOK(res1)) {
4903 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetUserInputAsWKT" "', argument " "1"" of type '" "char const *""'");
4904 : }
4905 12 : arg1 = reinterpret_cast< char * >(buf1);
4906 12 : {
4907 12 : if (!arg1) {
4908 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4909 : }
4910 : }
4911 12 : {
4912 12 : const int bLocalUseExceptions = GetUseExceptions();
4913 12 : if ( bLocalUseExceptions ) {
4914 12 : pushErrorHandler();
4915 : }
4916 12 : result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
4917 12 : if ( bLocalUseExceptions ) {
4918 12 : popErrorHandler();
4919 : }
4920 : #ifndef SED_HACKS
4921 : if ( bLocalUseExceptions ) {
4922 : CPLErr eclass = CPLGetLastErrorType();
4923 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4924 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4925 : }
4926 : }
4927 : #endif
4928 : }
4929 12 : {
4930 : /* %typemap(out) OGRErr */
4931 12 : if ( result != 0 && GetUseExceptions()) {
4932 0 : const char* pszMessage = CPLGetLastErrorMsg();
4933 0 : if( pszMessage[0] != '\0' )
4934 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4935 : else
4936 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4937 0 : SWIG_fail;
4938 : }
4939 : }
4940 12 : {
4941 : /* %typemap(argout) (char **argout) */
4942 12 : PyObject *o;
4943 12 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4944 12 : o = GDALPythonObjectFromCStr( *arg2 );
4945 : }
4946 : else {
4947 0 : o = Py_None;
4948 0 : Py_INCREF( o );
4949 : }
4950 : #if SWIG_VERSION >= 0x040300
4951 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
4952 : #else
4953 12 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
4954 : #endif
4955 : }
4956 12 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4957 12 : {
4958 : /* %typemap(freearg) (char **argout) */
4959 12 : if ( *arg2 )
4960 12 : CPLFree( *arg2 );
4961 : }
4962 12 : {
4963 : /* %typemap(ret) OGRErr */
4964 24 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4965 0 : resultobj = PyInt_FromLong( result );
4966 : }
4967 : }
4968 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4969 : return resultobj;
4970 0 : fail:
4971 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4972 0 : {
4973 : /* %typemap(freearg) (char **argout) */
4974 0 : if ( *arg2 )
4975 0 : CPLFree( *arg2 );
4976 : }
4977 : return NULL;
4978 : }
4979 :
4980 :
4981 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4982 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4983 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
4984 1 : void *argp1 = 0 ;
4985 1 : int res1 = 0 ;
4986 1 : PyObject *swig_obj[1] ;
4987 1 : double result;
4988 :
4989 1 : if (!args) SWIG_fail;
4990 1 : swig_obj[0] = args;
4991 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
4992 1 : if (!SWIG_IsOK(res1)) {
4993 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
4994 : }
4995 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
4996 1 : {
4997 1 : const int bLocalUseExceptions = GetUseExceptions();
4998 1 : if ( bLocalUseExceptions ) {
4999 1 : pushErrorHandler();
5000 : }
5001 1 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5002 1 : if ( bLocalUseExceptions ) {
5003 1 : popErrorHandler();
5004 : }
5005 : #ifndef SED_HACKS
5006 : if ( bLocalUseExceptions ) {
5007 : CPLErr eclass = CPLGetLastErrorType();
5008 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5009 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5010 : }
5011 : }
5012 : #endif
5013 : }
5014 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5015 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5016 : return resultobj;
5017 : fail:
5018 : return NULL;
5019 : }
5020 :
5021 :
5022 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5023 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5024 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5025 1 : void *argp1 = 0 ;
5026 1 : int res1 = 0 ;
5027 1 : PyObject *swig_obj[1] ;
5028 1 : double result;
5029 :
5030 1 : if (!args) SWIG_fail;
5031 1 : swig_obj[0] = args;
5032 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5033 1 : if (!SWIG_IsOK(res1)) {
5034 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5035 : }
5036 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5037 1 : {
5038 1 : const int bLocalUseExceptions = GetUseExceptions();
5039 1 : if ( bLocalUseExceptions ) {
5040 1 : pushErrorHandler();
5041 : }
5042 1 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5043 1 : if ( bLocalUseExceptions ) {
5044 1 : popErrorHandler();
5045 : }
5046 : #ifndef SED_HACKS
5047 : if ( bLocalUseExceptions ) {
5048 : CPLErr eclass = CPLGetLastErrorType();
5049 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5050 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5051 : }
5052 : }
5053 : #endif
5054 : }
5055 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5056 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5057 : return resultobj;
5058 : fail:
5059 : return NULL;
5060 : }
5061 :
5062 :
5063 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5064 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5065 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5066 1 : void *argp1 = 0 ;
5067 1 : int res1 = 0 ;
5068 1 : PyObject *swig_obj[1] ;
5069 1 : double result;
5070 :
5071 1 : if (!args) SWIG_fail;
5072 1 : swig_obj[0] = args;
5073 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5074 1 : if (!SWIG_IsOK(res1)) {
5075 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5076 : }
5077 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5078 1 : {
5079 1 : const int bLocalUseExceptions = GetUseExceptions();
5080 1 : if ( bLocalUseExceptions ) {
5081 1 : pushErrorHandler();
5082 : }
5083 1 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5084 1 : if ( bLocalUseExceptions ) {
5085 1 : popErrorHandler();
5086 : }
5087 : #ifndef SED_HACKS
5088 : if ( bLocalUseExceptions ) {
5089 : CPLErr eclass = CPLGetLastErrorType();
5090 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5091 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5092 : }
5093 : }
5094 : #endif
5095 : }
5096 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5097 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5098 : return resultobj;
5099 : fail:
5100 : return NULL;
5101 : }
5102 :
5103 :
5104 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5105 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5106 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5107 1 : void *argp1 = 0 ;
5108 1 : int res1 = 0 ;
5109 1 : PyObject *swig_obj[1] ;
5110 1 : double result;
5111 :
5112 1 : if (!args) SWIG_fail;
5113 1 : swig_obj[0] = args;
5114 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5115 1 : if (!SWIG_IsOK(res1)) {
5116 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5117 : }
5118 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5119 1 : {
5120 1 : const int bLocalUseExceptions = GetUseExceptions();
5121 1 : if ( bLocalUseExceptions ) {
5122 1 : pushErrorHandler();
5123 : }
5124 1 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5125 1 : if ( bLocalUseExceptions ) {
5126 1 : popErrorHandler();
5127 : }
5128 : #ifndef SED_HACKS
5129 : if ( bLocalUseExceptions ) {
5130 : CPLErr eclass = CPLGetLastErrorType();
5131 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5132 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5133 : }
5134 : }
5135 : #endif
5136 : }
5137 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5138 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5139 : return resultobj;
5140 : fail:
5141 : return NULL;
5142 : }
5143 :
5144 :
5145 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5146 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5147 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5148 1 : void *argp1 = 0 ;
5149 1 : int res1 = 0 ;
5150 1 : PyObject *swig_obj[1] ;
5151 1 : char *result = 0 ;
5152 :
5153 1 : if (!args) SWIG_fail;
5154 1 : swig_obj[0] = args;
5155 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5156 1 : if (!SWIG_IsOK(res1)) {
5157 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5158 : }
5159 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5160 1 : {
5161 1 : const int bLocalUseExceptions = GetUseExceptions();
5162 1 : if ( bLocalUseExceptions ) {
5163 1 : pushErrorHandler();
5164 : }
5165 1 : result = (char *)OSRAreaOfUse_name_get(arg1);
5166 1 : if ( bLocalUseExceptions ) {
5167 1 : popErrorHandler();
5168 : }
5169 : #ifndef SED_HACKS
5170 : if ( bLocalUseExceptions ) {
5171 : CPLErr eclass = CPLGetLastErrorType();
5172 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5173 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5174 : }
5175 : }
5176 : #endif
5177 : }
5178 1 : resultobj = SWIG_FromCharPtr((const char *)result);
5179 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5180 : return resultobj;
5181 : fail:
5182 : return NULL;
5183 : }
5184 :
5185 :
5186 0 : SWIGINTERN PyObject *_wrap_new_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5187 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5188 0 : double arg1 ;
5189 0 : double arg2 ;
5190 0 : double arg3 ;
5191 0 : double arg4 ;
5192 0 : char *arg5 = (char *) 0 ;
5193 0 : double val1 ;
5194 0 : int ecode1 = 0 ;
5195 0 : double val2 ;
5196 0 : int ecode2 = 0 ;
5197 0 : double val3 ;
5198 0 : int ecode3 = 0 ;
5199 0 : double val4 ;
5200 0 : int ecode4 = 0 ;
5201 0 : int res5 ;
5202 0 : char *buf5 = 0 ;
5203 0 : int alloc5 = 0 ;
5204 0 : PyObject *swig_obj[5] ;
5205 0 : OSRAreaOfUse *result = 0 ;
5206 :
5207 0 : if (!SWIG_Python_UnpackTuple(args, "new_AreaOfUse", 5, 5, swig_obj)) SWIG_fail;
5208 0 : ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
5209 0 : if (!SWIG_IsOK(ecode1)) {
5210 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AreaOfUse" "', argument " "1"" of type '" "double""'");
5211 : }
5212 0 : arg1 = static_cast< double >(val1);
5213 0 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5214 0 : if (!SWIG_IsOK(ecode2)) {
5215 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AreaOfUse" "', argument " "2"" of type '" "double""'");
5216 : }
5217 0 : arg2 = static_cast< double >(val2);
5218 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5219 0 : if (!SWIG_IsOK(ecode3)) {
5220 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AreaOfUse" "', argument " "3"" of type '" "double""'");
5221 : }
5222 0 : arg3 = static_cast< double >(val3);
5223 0 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
5224 0 : if (!SWIG_IsOK(ecode4)) {
5225 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_AreaOfUse" "', argument " "4"" of type '" "double""'");
5226 : }
5227 0 : arg4 = static_cast< double >(val4);
5228 0 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
5229 0 : if (!SWIG_IsOK(res5)) {
5230 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_AreaOfUse" "', argument " "5"" of type '" "char *""'");
5231 : }
5232 0 : arg5 = reinterpret_cast< char * >(buf5);
5233 0 : {
5234 0 : const int bLocalUseExceptions = GetUseExceptions();
5235 0 : if ( bLocalUseExceptions ) {
5236 0 : pushErrorHandler();
5237 : }
5238 0 : result = (OSRAreaOfUse *)new_OSRAreaOfUse(arg1,arg2,arg3,arg4,arg5);
5239 0 : if ( bLocalUseExceptions ) {
5240 0 : popErrorHandler();
5241 : }
5242 : #ifndef SED_HACKS
5243 : if ( bLocalUseExceptions ) {
5244 : CPLErr eclass = CPLGetLastErrorType();
5245 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5246 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5247 : }
5248 : }
5249 : #endif
5250 : }
5251 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_NEW | 0 );
5252 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5253 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5254 : return resultobj;
5255 0 : fail:
5256 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5257 : return NULL;
5258 : }
5259 :
5260 :
5261 1 : SWIGINTERN PyObject *_wrap_delete_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5262 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5263 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5264 1 : void *argp1 = 0 ;
5265 1 : int res1 = 0 ;
5266 1 : PyObject *swig_obj[1] ;
5267 :
5268 1 : if (!args) SWIG_fail;
5269 1 : swig_obj[0] = args;
5270 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_DISOWN | 0 );
5271 1 : if (!SWIG_IsOK(res1)) {
5272 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AreaOfUse" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5273 : }
5274 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5275 1 : {
5276 1 : const int bLocalUseExceptions = GetUseExceptions();
5277 1 : if ( bLocalUseExceptions ) {
5278 1 : pushErrorHandler();
5279 : }
5280 1 : delete_OSRAreaOfUse(arg1);
5281 1 : if ( bLocalUseExceptions ) {
5282 1 : popErrorHandler();
5283 : }
5284 : #ifndef SED_HACKS
5285 : if ( bLocalUseExceptions ) {
5286 : CPLErr eclass = CPLGetLastErrorType();
5287 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5288 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5289 : }
5290 : }
5291 : #endif
5292 : }
5293 1 : resultobj = SWIG_Py_Void();
5294 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5295 : return resultobj;
5296 : fail:
5297 : return NULL;
5298 : }
5299 :
5300 :
5301 275 : SWIGINTERN PyObject *AreaOfUse_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5302 275 : PyObject *obj;
5303 275 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5304 275 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRAreaOfUse, SWIG_NewClientData(obj));
5305 275 : return SWIG_Py_Void();
5306 : }
5307 :
5308 0 : SWIGINTERN PyObject *AreaOfUse_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5309 0 : return SWIG_Python_InitShadowInstance(args);
5310 : }
5311 :
5312 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5313 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5314 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5315 0 : void *argp1 = 0 ;
5316 0 : int res1 = 0 ;
5317 0 : PyObject *swig_obj[1] ;
5318 0 : double result;
5319 :
5320 0 : if (!args) SWIG_fail;
5321 0 : swig_obj[0] = args;
5322 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5323 0 : if (!SWIG_IsOK(res1)) {
5324 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5325 : }
5326 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5327 0 : {
5328 0 : if (!arg1) {
5329 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5330 : }
5331 : }
5332 0 : {
5333 0 : const int bLocalUseExceptions = GetUseExceptions();
5334 0 : if ( bLocalUseExceptions ) {
5335 0 : pushErrorHandler();
5336 : }
5337 0 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5338 0 : if ( bLocalUseExceptions ) {
5339 0 : popErrorHandler();
5340 : }
5341 : #ifndef SED_HACKS
5342 : if ( bLocalUseExceptions ) {
5343 : CPLErr eclass = CPLGetLastErrorType();
5344 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5345 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5346 : }
5347 : }
5348 : #endif
5349 : }
5350 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5351 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5352 : return resultobj;
5353 : fail:
5354 : return NULL;
5355 : }
5356 :
5357 :
5358 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5359 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5360 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5361 0 : void *argp1 = 0 ;
5362 0 : int res1 = 0 ;
5363 0 : PyObject *swig_obj[1] ;
5364 0 : double result;
5365 :
5366 0 : if (!args) SWIG_fail;
5367 0 : swig_obj[0] = args;
5368 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5369 0 : if (!SWIG_IsOK(res1)) {
5370 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5371 : }
5372 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5373 0 : {
5374 0 : if (!arg1) {
5375 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5376 : }
5377 : }
5378 0 : {
5379 0 : const int bLocalUseExceptions = GetUseExceptions();
5380 0 : if ( bLocalUseExceptions ) {
5381 0 : pushErrorHandler();
5382 : }
5383 0 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5384 0 : if ( bLocalUseExceptions ) {
5385 0 : popErrorHandler();
5386 : }
5387 : #ifndef SED_HACKS
5388 : if ( bLocalUseExceptions ) {
5389 : CPLErr eclass = CPLGetLastErrorType();
5390 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5391 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5392 : }
5393 : }
5394 : #endif
5395 : }
5396 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5397 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5398 : return resultobj;
5399 : fail:
5400 : return NULL;
5401 : }
5402 :
5403 :
5404 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5405 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5406 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5407 0 : void *argp1 = 0 ;
5408 0 : int res1 = 0 ;
5409 0 : PyObject *swig_obj[1] ;
5410 0 : double result;
5411 :
5412 0 : if (!args) SWIG_fail;
5413 0 : swig_obj[0] = args;
5414 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5415 0 : if (!SWIG_IsOK(res1)) {
5416 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5417 : }
5418 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5419 0 : {
5420 0 : if (!arg1) {
5421 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5422 : }
5423 : }
5424 0 : {
5425 0 : const int bLocalUseExceptions = GetUseExceptions();
5426 0 : if ( bLocalUseExceptions ) {
5427 0 : pushErrorHandler();
5428 : }
5429 0 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5430 0 : if ( bLocalUseExceptions ) {
5431 0 : popErrorHandler();
5432 : }
5433 : #ifndef SED_HACKS
5434 : if ( bLocalUseExceptions ) {
5435 : CPLErr eclass = CPLGetLastErrorType();
5436 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5437 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5438 : }
5439 : }
5440 : #endif
5441 : }
5442 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5443 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5444 : return resultobj;
5445 : fail:
5446 : return NULL;
5447 : }
5448 :
5449 :
5450 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5451 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5452 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5453 0 : void *argp1 = 0 ;
5454 0 : int res1 = 0 ;
5455 0 : PyObject *swig_obj[1] ;
5456 0 : double result;
5457 :
5458 0 : if (!args) SWIG_fail;
5459 0 : swig_obj[0] = args;
5460 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5461 0 : if (!SWIG_IsOK(res1)) {
5462 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5463 : }
5464 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5465 0 : {
5466 0 : if (!arg1) {
5467 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5468 : }
5469 : }
5470 0 : {
5471 0 : const int bLocalUseExceptions = GetUseExceptions();
5472 0 : if ( bLocalUseExceptions ) {
5473 0 : pushErrorHandler();
5474 : }
5475 0 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5476 0 : if ( bLocalUseExceptions ) {
5477 0 : popErrorHandler();
5478 : }
5479 : #ifndef SED_HACKS
5480 : if ( bLocalUseExceptions ) {
5481 : CPLErr eclass = CPLGetLastErrorType();
5482 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5483 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5484 : }
5485 : }
5486 : #endif
5487 : }
5488 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5489 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5490 : return resultobj;
5491 : fail:
5492 : return NULL;
5493 : }
5494 :
5495 :
5496 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5497 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5498 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5499 0 : void *argp1 = 0 ;
5500 0 : int res1 = 0 ;
5501 0 : PyObject *swig_obj[1] ;
5502 0 : char *result = 0 ;
5503 :
5504 0 : if (!args) SWIG_fail;
5505 0 : swig_obj[0] = args;
5506 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5507 0 : if (!SWIG_IsOK(res1)) {
5508 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5509 : }
5510 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5511 0 : {
5512 0 : if (!arg1) {
5513 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5514 : }
5515 : }
5516 0 : {
5517 0 : const int bLocalUseExceptions = GetUseExceptions();
5518 0 : if ( bLocalUseExceptions ) {
5519 0 : pushErrorHandler();
5520 : }
5521 0 : result = (char *)OSRAreaOfUse_name_get(arg1);
5522 0 : if ( bLocalUseExceptions ) {
5523 0 : popErrorHandler();
5524 : }
5525 : #ifndef SED_HACKS
5526 : if ( bLocalUseExceptions ) {
5527 : CPLErr eclass = CPLGetLastErrorType();
5528 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5529 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5530 : }
5531 : }
5532 : #endif
5533 : }
5534 0 : resultobj = SWIG_FromCharPtr((const char *)result);
5535 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5536 : return resultobj;
5537 : fail:
5538 : return NULL;
5539 : }
5540 :
5541 :
5542 2330 : SWIGINTERN PyObject *_wrap_new_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5543 2330 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5544 2330 : char *arg1 = (char *) "" ;
5545 2330 : int res1 ;
5546 2330 : char *buf1 = 0 ;
5547 2330 : int alloc1 = 0 ;
5548 2330 : PyObject * obj0 = 0 ;
5549 2330 : char * kwnames[] = {
5550 : (char *)"wkt", NULL
5551 : };
5552 2330 : OSRSpatialReferenceShadow *result = 0 ;
5553 :
5554 2330 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_SpatialReference", kwnames, &obj0)) SWIG_fail;
5555 2330 : if (obj0) {
5556 192 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5557 192 : if (!SWIG_IsOK(res1)) {
5558 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'");
5559 : }
5560 192 : arg1 = reinterpret_cast< char * >(buf1);
5561 : }
5562 2330 : {
5563 2330 : const int bLocalUseExceptions = GetUseExceptions();
5564 2330 : if ( bLocalUseExceptions ) {
5565 2330 : pushErrorHandler();
5566 : }
5567 2330 : result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
5568 2330 : if ( bLocalUseExceptions ) {
5569 2330 : popErrorHandler();
5570 : }
5571 : #ifndef SED_HACKS
5572 : if ( bLocalUseExceptions ) {
5573 : CPLErr eclass = CPLGetLastErrorType();
5574 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5575 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5576 : }
5577 : }
5578 : #endif
5579 : }
5580 2330 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_NEW | 0 );
5581 2330 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5582 2331 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5583 : return resultobj;
5584 0 : fail:
5585 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5586 : return NULL;
5587 : }
5588 :
5589 :
5590 4332 : SWIGINTERN PyObject *_wrap_delete_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5591 4332 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5592 4332 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5593 4332 : void *argp1 = 0 ;
5594 4332 : int res1 = 0 ;
5595 4332 : PyObject *swig_obj[1] ;
5596 :
5597 4332 : if (!args) SWIG_fail;
5598 4332 : swig_obj[0] = args;
5599 4332 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_DISOWN | 0 );
5600 4332 : if (!SWIG_IsOK(res1)) {
5601 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialReference" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5602 : }
5603 4332 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5604 4332 : {
5605 4332 : const int bLocalUseExceptions = GetUseExceptions();
5606 4332 : if ( bLocalUseExceptions ) {
5607 2788 : pushErrorHandler();
5608 : }
5609 4332 : delete_OSRSpatialReferenceShadow(arg1);
5610 4332 : if ( bLocalUseExceptions ) {
5611 2788 : popErrorHandler();
5612 : }
5613 : #ifndef SED_HACKS
5614 : if ( bLocalUseExceptions ) {
5615 : CPLErr eclass = CPLGetLastErrorType();
5616 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5617 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5618 : }
5619 : }
5620 : #endif
5621 : }
5622 4332 : resultobj = SWIG_Py_Void();
5623 4332 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5624 : return resultobj;
5625 : fail:
5626 : return NULL;
5627 : }
5628 :
5629 :
5630 4 : SWIGINTERN PyObject *_wrap_SpatialReference___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5631 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5632 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5633 4 : void *argp1 = 0 ;
5634 4 : int res1 = 0 ;
5635 4 : PyObject *swig_obj[1] ;
5636 4 : retStringAndCPLFree *result = 0 ;
5637 :
5638 4 : if (!args) SWIG_fail;
5639 4 : swig_obj[0] = args;
5640 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5641 4 : if (!SWIG_IsOK(res1)) {
5642 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference___str__" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5643 : }
5644 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5645 4 : {
5646 4 : const int bLocalUseExceptions = GetUseExceptions();
5647 4 : if ( bLocalUseExceptions ) {
5648 3 : pushErrorHandler();
5649 : }
5650 4 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
5651 4 : if ( bLocalUseExceptions ) {
5652 3 : popErrorHandler();
5653 : }
5654 : #ifndef SED_HACKS
5655 : if ( bLocalUseExceptions ) {
5656 : CPLErr eclass = CPLGetLastErrorType();
5657 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5658 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5659 : }
5660 : }
5661 : #endif
5662 : }
5663 4 : {
5664 : /* %typemap(out) (retStringAndCPLFree*) */
5665 4 : Py_XDECREF(resultobj);
5666 4 : if(result)
5667 : {
5668 4 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
5669 4 : CPLFree(result);
5670 : }
5671 : else
5672 : {
5673 0 : resultobj = Py_None;
5674 0 : Py_INCREF(resultobj);
5675 : }
5676 : }
5677 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5678 : return resultobj;
5679 : fail:
5680 : return NULL;
5681 : }
5682 :
5683 :
5684 39 : SWIGINTERN PyObject *_wrap_SpatialReference_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5685 39 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5686 39 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5687 39 : void *argp1 = 0 ;
5688 39 : int res1 = 0 ;
5689 39 : PyObject *swig_obj[1] ;
5690 39 : char *result = 0 ;
5691 :
5692 39 : if (!args) SWIG_fail;
5693 39 : swig_obj[0] = args;
5694 39 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5695 39 : if (!SWIG_IsOK(res1)) {
5696 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5697 : }
5698 39 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5699 39 : {
5700 39 : const int bLocalUseExceptions = GetUseExceptions();
5701 39 : if ( bLocalUseExceptions ) {
5702 28 : pushErrorHandler();
5703 : }
5704 39 : result = (char *)OSRSpatialReferenceShadow_GetName(arg1);
5705 39 : if ( bLocalUseExceptions ) {
5706 28 : popErrorHandler();
5707 : }
5708 : #ifndef SED_HACKS
5709 : if ( bLocalUseExceptions ) {
5710 : CPLErr eclass = CPLGetLastErrorType();
5711 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5712 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5713 : }
5714 : }
5715 : #endif
5716 : }
5717 39 : resultobj = SWIG_FromCharPtr((const char *)result);
5718 39 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5719 : return resultobj;
5720 : fail:
5721 : return NULL;
5722 : }
5723 :
5724 :
5725 600 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5726 600 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5727 600 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5728 600 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5729 600 : char **arg3 = (char **) NULL ;
5730 600 : void *argp1 = 0 ;
5731 600 : int res1 = 0 ;
5732 600 : void *argp2 = 0 ;
5733 600 : int res2 = 0 ;
5734 600 : PyObject * obj0 = 0 ;
5735 600 : PyObject * obj1 = 0 ;
5736 600 : PyObject * obj2 = 0 ;
5737 600 : char * kwnames[] = {
5738 : (char *)"self", (char *)"rhs", (char *)"options", NULL
5739 : };
5740 600 : int result;
5741 :
5742 600 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_IsSame", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
5743 600 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5744 600 : if (!SWIG_IsOK(res1)) {
5745 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSame" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5746 : }
5747 600 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5748 600 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5749 600 : if (!SWIG_IsOK(res2)) {
5750 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSame" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5751 : }
5752 600 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5753 600 : if (obj2) {
5754 82 : {
5755 : /* %typemap(in) char **dict */
5756 82 : arg3 = NULL;
5757 82 : if ( PySequence_Check( obj2 ) ) {
5758 82 : int bErr = FALSE;
5759 82 : arg3 = CSLFromPySequence(obj2, &bErr);
5760 82 : if ( bErr )
5761 : {
5762 0 : SWIG_fail;
5763 : }
5764 : }
5765 0 : else if ( PyMapping_Check( obj2 ) ) {
5766 0 : int bErr = FALSE;
5767 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
5768 0 : if ( bErr )
5769 : {
5770 0 : SWIG_fail;
5771 : }
5772 : }
5773 : else {
5774 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
5775 0 : SWIG_fail;
5776 : }
5777 : }
5778 : }
5779 600 : {
5780 600 : if (!arg2) {
5781 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5782 : }
5783 : }
5784 600 : {
5785 600 : const int bLocalUseExceptions = GetUseExceptions();
5786 600 : if ( bLocalUseExceptions ) {
5787 332 : pushErrorHandler();
5788 : }
5789 600 : result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2,arg3);
5790 600 : if ( bLocalUseExceptions ) {
5791 332 : popErrorHandler();
5792 : }
5793 : #ifndef SED_HACKS
5794 : if ( bLocalUseExceptions ) {
5795 : CPLErr eclass = CPLGetLastErrorType();
5796 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5797 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5798 : }
5799 : }
5800 : #endif
5801 : }
5802 600 : resultobj = SWIG_From_int(static_cast< int >(result));
5803 600 : {
5804 : /* %typemap(freearg) char **dict */
5805 600 : CSLDestroy( arg3 );
5806 : }
5807 600 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5808 : return resultobj;
5809 0 : fail:
5810 0 : {
5811 : /* %typemap(freearg) char **dict */
5812 0 : CSLDestroy( arg3 );
5813 : }
5814 : return NULL;
5815 : }
5816 :
5817 :
5818 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5819 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5820 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5821 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5822 0 : void *argp1 = 0 ;
5823 0 : int res1 = 0 ;
5824 0 : void *argp2 = 0 ;
5825 0 : int res2 = 0 ;
5826 0 : PyObject *swig_obj[2] ;
5827 0 : int result;
5828 :
5829 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameGeogCS", 2, 2, swig_obj)) SWIG_fail;
5830 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5831 0 : if (!SWIG_IsOK(res1)) {
5832 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5833 : }
5834 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5835 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5836 0 : if (!SWIG_IsOK(res2)) {
5837 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5838 : }
5839 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5840 0 : {
5841 0 : if (!arg2) {
5842 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5843 : }
5844 : }
5845 0 : {
5846 0 : const int bLocalUseExceptions = GetUseExceptions();
5847 0 : if ( bLocalUseExceptions ) {
5848 0 : pushErrorHandler();
5849 : }
5850 0 : result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
5851 0 : if ( bLocalUseExceptions ) {
5852 0 : popErrorHandler();
5853 : }
5854 : #ifndef SED_HACKS
5855 : if ( bLocalUseExceptions ) {
5856 : CPLErr eclass = CPLGetLastErrorType();
5857 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5858 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5859 : }
5860 : }
5861 : #endif
5862 : }
5863 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5864 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5865 : return resultobj;
5866 : fail:
5867 : return NULL;
5868 : }
5869 :
5870 :
5871 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5872 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5873 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5874 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5875 0 : void *argp1 = 0 ;
5876 0 : int res1 = 0 ;
5877 0 : void *argp2 = 0 ;
5878 0 : int res2 = 0 ;
5879 0 : PyObject *swig_obj[2] ;
5880 0 : int result;
5881 :
5882 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameVertCS", 2, 2, swig_obj)) SWIG_fail;
5883 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5884 0 : if (!SWIG_IsOK(res1)) {
5885 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5886 : }
5887 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5888 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5889 0 : if (!SWIG_IsOK(res2)) {
5890 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5891 : }
5892 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5893 0 : {
5894 0 : if (!arg2) {
5895 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5896 : }
5897 : }
5898 0 : {
5899 0 : const int bLocalUseExceptions = GetUseExceptions();
5900 0 : if ( bLocalUseExceptions ) {
5901 0 : pushErrorHandler();
5902 : }
5903 0 : result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
5904 0 : if ( bLocalUseExceptions ) {
5905 0 : popErrorHandler();
5906 : }
5907 : #ifndef SED_HACKS
5908 : if ( bLocalUseExceptions ) {
5909 : CPLErr eclass = CPLGetLastErrorType();
5910 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5911 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5912 : }
5913 : }
5914 : #endif
5915 : }
5916 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5917 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5918 : return resultobj;
5919 : fail:
5920 : return NULL;
5921 : }
5922 :
5923 :
5924 242 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5925 242 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5926 242 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5927 242 : void *argp1 = 0 ;
5928 242 : int res1 = 0 ;
5929 242 : PyObject *swig_obj[1] ;
5930 242 : int result;
5931 :
5932 242 : if (!args) SWIG_fail;
5933 242 : swig_obj[0] = args;
5934 242 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5935 242 : if (!SWIG_IsOK(res1)) {
5936 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5937 : }
5938 242 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5939 242 : {
5940 242 : const int bLocalUseExceptions = GetUseExceptions();
5941 242 : if ( bLocalUseExceptions ) {
5942 239 : pushErrorHandler();
5943 : }
5944 242 : result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
5945 242 : if ( bLocalUseExceptions ) {
5946 239 : popErrorHandler();
5947 : }
5948 : #ifndef SED_HACKS
5949 : if ( bLocalUseExceptions ) {
5950 : CPLErr eclass = CPLGetLastErrorType();
5951 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5952 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5953 : }
5954 : }
5955 : #endif
5956 : }
5957 242 : resultobj = SWIG_From_int(static_cast< int >(result));
5958 242 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5959 : return resultobj;
5960 : fail:
5961 : return NULL;
5962 : }
5963 :
5964 :
5965 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5966 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5967 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5968 1 : void *argp1 = 0 ;
5969 1 : int res1 = 0 ;
5970 1 : PyObject *swig_obj[1] ;
5971 1 : int result;
5972 :
5973 1 : if (!args) SWIG_fail;
5974 1 : swig_obj[0] = args;
5975 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5976 1 : if (!SWIG_IsOK(res1)) {
5977 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5978 : }
5979 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5980 1 : {
5981 1 : const int bLocalUseExceptions = GetUseExceptions();
5982 1 : if ( bLocalUseExceptions ) {
5983 0 : pushErrorHandler();
5984 : }
5985 1 : result = (int)OSRSpatialReferenceShadow_IsDerivedGeographic(arg1);
5986 1 : if ( bLocalUseExceptions ) {
5987 0 : popErrorHandler();
5988 : }
5989 : #ifndef SED_HACKS
5990 : if ( bLocalUseExceptions ) {
5991 : CPLErr eclass = CPLGetLastErrorType();
5992 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5993 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5994 : }
5995 : }
5996 : #endif
5997 : }
5998 1 : resultobj = SWIG_From_int(static_cast< int >(result));
5999 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6000 : return resultobj;
6001 : fail:
6002 : return NULL;
6003 : }
6004 :
6005 :
6006 409 : SWIGINTERN PyObject *_wrap_SpatialReference_IsProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6007 409 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6008 409 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6009 409 : void *argp1 = 0 ;
6010 409 : int res1 = 0 ;
6011 409 : PyObject *swig_obj[1] ;
6012 409 : int result;
6013 :
6014 409 : if (!args) SWIG_fail;
6015 409 : swig_obj[0] = args;
6016 409 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6017 409 : if (!SWIG_IsOK(res1)) {
6018 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6019 : }
6020 409 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6021 409 : {
6022 409 : const int bLocalUseExceptions = GetUseExceptions();
6023 409 : if ( bLocalUseExceptions ) {
6024 407 : pushErrorHandler();
6025 : }
6026 409 : result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
6027 409 : if ( bLocalUseExceptions ) {
6028 407 : popErrorHandler();
6029 : }
6030 : #ifndef SED_HACKS
6031 : if ( bLocalUseExceptions ) {
6032 : CPLErr eclass = CPLGetLastErrorType();
6033 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6034 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6035 : }
6036 : }
6037 : #endif
6038 : }
6039 409 : resultobj = SWIG_From_int(static_cast< int >(result));
6040 409 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6041 : return resultobj;
6042 : fail:
6043 : return NULL;
6044 : }
6045 :
6046 :
6047 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6048 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6049 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6050 0 : void *argp1 = 0 ;
6051 0 : int res1 = 0 ;
6052 0 : PyObject *swig_obj[1] ;
6053 0 : int result;
6054 :
6055 0 : if (!args) SWIG_fail;
6056 0 : swig_obj[0] = args;
6057 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6058 0 : if (!SWIG_IsOK(res1)) {
6059 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6060 : }
6061 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6062 0 : {
6063 0 : const int bLocalUseExceptions = GetUseExceptions();
6064 0 : if ( bLocalUseExceptions ) {
6065 0 : pushErrorHandler();
6066 : }
6067 0 : result = (int)OSRSpatialReferenceShadow_IsDerivedProjected(arg1);
6068 0 : if ( bLocalUseExceptions ) {
6069 0 : popErrorHandler();
6070 : }
6071 : #ifndef SED_HACKS
6072 : if ( bLocalUseExceptions ) {
6073 : CPLErr eclass = CPLGetLastErrorType();
6074 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6075 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6076 : }
6077 : }
6078 : #endif
6079 : }
6080 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6081 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6082 : return resultobj;
6083 : fail:
6084 : return NULL;
6085 : }
6086 :
6087 :
6088 5 : SWIGINTERN PyObject *_wrap_SpatialReference_IsCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6089 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6090 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6091 5 : void *argp1 = 0 ;
6092 5 : int res1 = 0 ;
6093 5 : PyObject *swig_obj[1] ;
6094 5 : int result;
6095 :
6096 5 : if (!args) SWIG_fail;
6097 5 : swig_obj[0] = args;
6098 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6099 5 : if (!SWIG_IsOK(res1)) {
6100 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6101 : }
6102 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6103 5 : {
6104 5 : const int bLocalUseExceptions = GetUseExceptions();
6105 5 : if ( bLocalUseExceptions ) {
6106 3 : pushErrorHandler();
6107 : }
6108 5 : result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
6109 5 : if ( bLocalUseExceptions ) {
6110 3 : popErrorHandler();
6111 : }
6112 : #ifndef SED_HACKS
6113 : if ( bLocalUseExceptions ) {
6114 : CPLErr eclass = CPLGetLastErrorType();
6115 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6116 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6117 : }
6118 : }
6119 : #endif
6120 : }
6121 5 : resultobj = SWIG_From_int(static_cast< int >(result));
6122 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6123 : return resultobj;
6124 : fail:
6125 : return NULL;
6126 : }
6127 :
6128 :
6129 2 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeocentric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6130 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6131 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6132 2 : void *argp1 = 0 ;
6133 2 : int res1 = 0 ;
6134 2 : PyObject *swig_obj[1] ;
6135 2 : int result;
6136 :
6137 2 : if (!args) SWIG_fail;
6138 2 : swig_obj[0] = args;
6139 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6140 2 : if (!SWIG_IsOK(res1)) {
6141 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6142 : }
6143 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6144 2 : {
6145 2 : const int bLocalUseExceptions = GetUseExceptions();
6146 2 : if ( bLocalUseExceptions ) {
6147 2 : pushErrorHandler();
6148 : }
6149 2 : result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
6150 2 : if ( bLocalUseExceptions ) {
6151 2 : popErrorHandler();
6152 : }
6153 : #ifndef SED_HACKS
6154 : if ( bLocalUseExceptions ) {
6155 : CPLErr eclass = CPLGetLastErrorType();
6156 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6157 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6158 : }
6159 : }
6160 : #endif
6161 : }
6162 2 : resultobj = SWIG_From_int(static_cast< int >(result));
6163 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6164 : return resultobj;
6165 : fail:
6166 : return NULL;
6167 : }
6168 :
6169 :
6170 4 : SWIGINTERN PyObject *_wrap_SpatialReference_IsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6171 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6172 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6173 4 : void *argp1 = 0 ;
6174 4 : int res1 = 0 ;
6175 4 : PyObject *swig_obj[1] ;
6176 4 : int result;
6177 :
6178 4 : if (!args) SWIG_fail;
6179 4 : swig_obj[0] = args;
6180 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6181 4 : if (!SWIG_IsOK(res1)) {
6182 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsLocal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6183 : }
6184 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6185 4 : {
6186 4 : const int bLocalUseExceptions = GetUseExceptions();
6187 4 : if ( bLocalUseExceptions ) {
6188 1 : pushErrorHandler();
6189 : }
6190 4 : result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
6191 4 : if ( bLocalUseExceptions ) {
6192 1 : popErrorHandler();
6193 : }
6194 : #ifndef SED_HACKS
6195 : if ( bLocalUseExceptions ) {
6196 : CPLErr eclass = CPLGetLastErrorType();
6197 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6198 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6199 : }
6200 : }
6201 : #endif
6202 : }
6203 4 : resultobj = SWIG_From_int(static_cast< int >(result));
6204 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6205 : return resultobj;
6206 : fail:
6207 : return NULL;
6208 : }
6209 :
6210 :
6211 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6212 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6213 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6214 0 : void *argp1 = 0 ;
6215 0 : int res1 = 0 ;
6216 0 : PyObject *swig_obj[1] ;
6217 0 : int result;
6218 :
6219 0 : if (!args) SWIG_fail;
6220 0 : swig_obj[0] = args;
6221 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6222 0 : if (!SWIG_IsOK(res1)) {
6223 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6224 : }
6225 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6226 0 : {
6227 0 : const int bLocalUseExceptions = GetUseExceptions();
6228 0 : if ( bLocalUseExceptions ) {
6229 0 : pushErrorHandler();
6230 : }
6231 0 : result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
6232 0 : if ( bLocalUseExceptions ) {
6233 0 : popErrorHandler();
6234 : }
6235 : #ifndef SED_HACKS
6236 : if ( bLocalUseExceptions ) {
6237 : CPLErr eclass = CPLGetLastErrorType();
6238 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6239 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6240 : }
6241 : }
6242 : #endif
6243 : }
6244 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6245 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6246 : return resultobj;
6247 : fail:
6248 : return NULL;
6249 : }
6250 :
6251 :
6252 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDynamic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6253 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6254 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6255 0 : void *argp1 = 0 ;
6256 0 : int res1 = 0 ;
6257 0 : PyObject *swig_obj[1] ;
6258 0 : bool result;
6259 :
6260 0 : if (!args) SWIG_fail;
6261 0 : swig_obj[0] = args;
6262 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6263 0 : if (!SWIG_IsOK(res1)) {
6264 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDynamic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6265 : }
6266 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6267 0 : {
6268 0 : const int bLocalUseExceptions = GetUseExceptions();
6269 0 : if ( bLocalUseExceptions ) {
6270 0 : pushErrorHandler();
6271 : }
6272 0 : result = (bool)OSRSpatialReferenceShadow_IsDynamic(arg1);
6273 0 : if ( bLocalUseExceptions ) {
6274 0 : popErrorHandler();
6275 : }
6276 : #ifndef SED_HACKS
6277 : if ( bLocalUseExceptions ) {
6278 : CPLErr eclass = CPLGetLastErrorType();
6279 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6280 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6281 : }
6282 : }
6283 : #endif
6284 : }
6285 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6286 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6287 : return resultobj;
6288 : fail:
6289 : return NULL;
6290 : }
6291 :
6292 :
6293 0 : SWIGINTERN PyObject *_wrap_SpatialReference_HasPointMotionOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6294 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6295 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6296 0 : void *argp1 = 0 ;
6297 0 : int res1 = 0 ;
6298 0 : PyObject *swig_obj[1] ;
6299 0 : bool result;
6300 :
6301 0 : if (!args) SWIG_fail;
6302 0 : swig_obj[0] = args;
6303 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6304 0 : if (!SWIG_IsOK(res1)) {
6305 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasPointMotionOperation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6306 : }
6307 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6308 0 : {
6309 0 : const int bLocalUseExceptions = GetUseExceptions();
6310 0 : if ( bLocalUseExceptions ) {
6311 0 : pushErrorHandler();
6312 : }
6313 0 : result = (bool)OSRSpatialReferenceShadow_HasPointMotionOperation(arg1);
6314 0 : if ( bLocalUseExceptions ) {
6315 0 : popErrorHandler();
6316 : }
6317 : #ifndef SED_HACKS
6318 : if ( bLocalUseExceptions ) {
6319 : CPLErr eclass = CPLGetLastErrorType();
6320 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6321 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6322 : }
6323 : }
6324 : #endif
6325 : }
6326 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6327 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6328 : return resultobj;
6329 : fail:
6330 : return NULL;
6331 : }
6332 :
6333 :
6334 29 : SWIGINTERN PyObject *_wrap_SpatialReference_GetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6335 29 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6336 29 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6337 29 : void *argp1 = 0 ;
6338 29 : int res1 = 0 ;
6339 29 : PyObject *swig_obj[1] ;
6340 29 : double result;
6341 :
6342 29 : if (!args) SWIG_fail;
6343 29 : swig_obj[0] = args;
6344 29 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6345 29 : if (!SWIG_IsOK(res1)) {
6346 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6347 : }
6348 29 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6349 29 : {
6350 29 : const int bLocalUseExceptions = GetUseExceptions();
6351 29 : if ( bLocalUseExceptions ) {
6352 15 : pushErrorHandler();
6353 : }
6354 29 : result = (double)OSRSpatialReferenceShadow_GetCoordinateEpoch(arg1);
6355 29 : if ( bLocalUseExceptions ) {
6356 15 : popErrorHandler();
6357 : }
6358 : #ifndef SED_HACKS
6359 : if ( bLocalUseExceptions ) {
6360 : CPLErr eclass = CPLGetLastErrorType();
6361 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6362 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6363 : }
6364 : }
6365 : #endif
6366 : }
6367 29 : resultobj = SWIG_From_double(static_cast< double >(result));
6368 29 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6369 : return resultobj;
6370 : fail:
6371 : return NULL;
6372 : }
6373 :
6374 :
6375 31 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6376 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6377 31 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6378 31 : double arg2 ;
6379 31 : void *argp1 = 0 ;
6380 31 : int res1 = 0 ;
6381 31 : double val2 ;
6382 31 : int ecode2 = 0 ;
6383 31 : PyObject *swig_obj[2] ;
6384 :
6385 31 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCoordinateEpoch", 2, 2, swig_obj)) SWIG_fail;
6386 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6387 31 : if (!SWIG_IsOK(res1)) {
6388 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6389 : }
6390 31 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6391 31 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6392 31 : if (!SWIG_IsOK(ecode2)) {
6393 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "2"" of type '" "double""'");
6394 : }
6395 31 : arg2 = static_cast< double >(val2);
6396 31 : {
6397 31 : const int bLocalUseExceptions = GetUseExceptions();
6398 31 : if ( bLocalUseExceptions ) {
6399 17 : pushErrorHandler();
6400 : }
6401 31 : OSRSpatialReferenceShadow_SetCoordinateEpoch(arg1,arg2);
6402 31 : if ( bLocalUseExceptions ) {
6403 17 : popErrorHandler();
6404 : }
6405 : #ifndef SED_HACKS
6406 : if ( bLocalUseExceptions ) {
6407 : CPLErr eclass = CPLGetLastErrorType();
6408 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6409 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6410 : }
6411 : }
6412 : #endif
6413 : }
6414 31 : resultobj = SWIG_Py_Void();
6415 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6416 : return resultobj;
6417 : fail:
6418 : return NULL;
6419 : }
6420 :
6421 :
6422 179 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsLatLong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6423 179 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6424 179 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6425 179 : void *argp1 = 0 ;
6426 179 : int res1 = 0 ;
6427 179 : PyObject *swig_obj[1] ;
6428 179 : int result;
6429 :
6430 179 : if (!args) SWIG_fail;
6431 179 : swig_obj[0] = args;
6432 179 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6433 179 : if (!SWIG_IsOK(res1)) {
6434 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsLatLong" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6435 : }
6436 179 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6437 179 : {
6438 179 : const int bLocalUseExceptions = GetUseExceptions();
6439 179 : if ( bLocalUseExceptions ) {
6440 179 : pushErrorHandler();
6441 : }
6442 179 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
6443 179 : if ( bLocalUseExceptions ) {
6444 179 : popErrorHandler();
6445 : }
6446 : #ifndef SED_HACKS
6447 : if ( bLocalUseExceptions ) {
6448 : CPLErr eclass = CPLGetLastErrorType();
6449 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6450 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6451 : }
6452 : }
6453 : #endif
6454 : }
6455 179 : resultobj = SWIG_From_int(static_cast< int >(result));
6456 179 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6457 : return resultobj;
6458 : fail:
6459 : return NULL;
6460 : }
6461 :
6462 :
6463 186 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsNorthingEasting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6464 186 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6465 186 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6466 186 : void *argp1 = 0 ;
6467 186 : int res1 = 0 ;
6468 186 : PyObject *swig_obj[1] ;
6469 186 : int result;
6470 :
6471 186 : if (!args) SWIG_fail;
6472 186 : swig_obj[0] = args;
6473 186 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6474 186 : if (!SWIG_IsOK(res1)) {
6475 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsNorthingEasting" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6476 : }
6477 186 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6478 186 : {
6479 186 : const int bLocalUseExceptions = GetUseExceptions();
6480 186 : if ( bLocalUseExceptions ) {
6481 186 : pushErrorHandler();
6482 : }
6483 186 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(arg1);
6484 186 : if ( bLocalUseExceptions ) {
6485 186 : popErrorHandler();
6486 : }
6487 : #ifndef SED_HACKS
6488 : if ( bLocalUseExceptions ) {
6489 : CPLErr eclass = CPLGetLastErrorType();
6490 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6491 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6492 : }
6493 : }
6494 : #endif
6495 : }
6496 186 : resultobj = SWIG_From_int(static_cast< int >(result));
6497 186 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6498 : return resultobj;
6499 : fail:
6500 : return NULL;
6501 : }
6502 :
6503 :
6504 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAuthority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6505 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6506 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6507 0 : char *arg2 = (char *) 0 ;
6508 0 : char *arg3 = (char *) 0 ;
6509 0 : int arg4 ;
6510 0 : void *argp1 = 0 ;
6511 0 : int res1 = 0 ;
6512 0 : int res2 ;
6513 0 : char *buf2 = 0 ;
6514 0 : int alloc2 = 0 ;
6515 0 : int res3 ;
6516 0 : char *buf3 = 0 ;
6517 0 : int alloc3 = 0 ;
6518 0 : int val4 ;
6519 0 : int ecode4 = 0 ;
6520 0 : PyObject *swig_obj[4] ;
6521 0 : OGRErr result;
6522 :
6523 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAuthority", 4, 4, swig_obj)) SWIG_fail;
6524 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6525 0 : if (!SWIG_IsOK(res1)) {
6526 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAuthority" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6527 : }
6528 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6529 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6530 0 : if (!SWIG_IsOK(res2)) {
6531 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAuthority" "', argument " "2"" of type '" "char const *""'");
6532 : }
6533 0 : arg2 = reinterpret_cast< char * >(buf2);
6534 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6535 0 : if (!SWIG_IsOK(res3)) {
6536 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAuthority" "', argument " "3"" of type '" "char const *""'");
6537 : }
6538 0 : arg3 = reinterpret_cast< char * >(buf3);
6539 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
6540 0 : if (!SWIG_IsOK(ecode4)) {
6541 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAuthority" "', argument " "4"" of type '" "int""'");
6542 : }
6543 0 : arg4 = static_cast< int >(val4);
6544 0 : {
6545 0 : const int bLocalUseExceptions = GetUseExceptions();
6546 0 : if ( bLocalUseExceptions ) {
6547 0 : pushErrorHandler();
6548 : }
6549 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
6550 0 : if ( bLocalUseExceptions ) {
6551 0 : popErrorHandler();
6552 : }
6553 : #ifndef SED_HACKS
6554 : if ( bLocalUseExceptions ) {
6555 : CPLErr eclass = CPLGetLastErrorType();
6556 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6557 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6558 : }
6559 : }
6560 : #endif
6561 : }
6562 0 : {
6563 : /* %typemap(out) OGRErr */
6564 0 : if ( result != 0 && GetUseExceptions()) {
6565 0 : const char* pszMessage = CPLGetLastErrorMsg();
6566 0 : if( pszMessage[0] != '\0' )
6567 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6568 : else
6569 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6570 0 : SWIG_fail;
6571 : }
6572 : }
6573 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6574 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6575 0 : {
6576 : /* %typemap(ret) OGRErr */
6577 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6578 0 : resultobj = PyInt_FromLong( result );
6579 : }
6580 : }
6581 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6582 : return resultobj;
6583 0 : fail:
6584 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6585 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6586 : return NULL;
6587 : }
6588 :
6589 :
6590 34 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6591 34 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6592 34 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6593 34 : char *arg2 = (char *) 0 ;
6594 34 : int arg3 = (int) 0 ;
6595 34 : void *argp1 = 0 ;
6596 34 : int res1 = 0 ;
6597 34 : int res2 ;
6598 34 : char *buf2 = 0 ;
6599 34 : int alloc2 = 0 ;
6600 34 : int val3 ;
6601 34 : int ecode3 = 0 ;
6602 34 : PyObject *swig_obj[3] ;
6603 34 : char *result = 0 ;
6604 :
6605 34 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAttrValue", 2, 3, swig_obj)) SWIG_fail;
6606 34 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6607 34 : if (!SWIG_IsOK(res1)) {
6608 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6609 : }
6610 34 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6611 34 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6612 34 : if (!SWIG_IsOK(res2)) {
6613 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAttrValue" "', argument " "2"" of type '" "char const *""'");
6614 : }
6615 34 : arg2 = reinterpret_cast< char * >(buf2);
6616 34 : if (swig_obj[2]) {
6617 6 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
6618 6 : if (!SWIG_IsOK(ecode3)) {
6619 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAttrValue" "', argument " "3"" of type '" "int""'");
6620 : }
6621 : arg3 = static_cast< int >(val3);
6622 : }
6623 34 : {
6624 34 : if (!arg2) {
6625 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6626 : }
6627 : }
6628 34 : {
6629 34 : const int bLocalUseExceptions = GetUseExceptions();
6630 34 : if ( bLocalUseExceptions ) {
6631 21 : pushErrorHandler();
6632 : }
6633 34 : result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
6634 34 : if ( bLocalUseExceptions ) {
6635 21 : popErrorHandler();
6636 : }
6637 : #ifndef SED_HACKS
6638 : if ( bLocalUseExceptions ) {
6639 : CPLErr eclass = CPLGetLastErrorType();
6640 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6641 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6642 : }
6643 : }
6644 : #endif
6645 : }
6646 34 : resultobj = SWIG_FromCharPtr((const char *)result);
6647 34 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6648 34 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6649 : return resultobj;
6650 0 : fail:
6651 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6652 : return NULL;
6653 : }
6654 :
6655 :
6656 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6657 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6658 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6659 1 : char *arg2 = (char *) 0 ;
6660 1 : char *arg3 = (char *) 0 ;
6661 1 : void *argp1 = 0 ;
6662 1 : int res1 = 0 ;
6663 1 : int res2 ;
6664 1 : char *buf2 = 0 ;
6665 1 : int alloc2 = 0 ;
6666 1 : int res3 ;
6667 1 : char *buf3 = 0 ;
6668 1 : int alloc3 = 0 ;
6669 1 : PyObject *swig_obj[3] ;
6670 1 : OGRErr result;
6671 :
6672 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAttrValue", 3, 3, swig_obj)) SWIG_fail;
6673 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6674 1 : if (!SWIG_IsOK(res1)) {
6675 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6676 : }
6677 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6678 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6679 1 : if (!SWIG_IsOK(res2)) {
6680 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAttrValue" "', argument " "2"" of type '" "char const *""'");
6681 : }
6682 1 : arg2 = reinterpret_cast< char * >(buf2);
6683 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6684 1 : if (!SWIG_IsOK(res3)) {
6685 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAttrValue" "', argument " "3"" of type '" "char const *""'");
6686 : }
6687 1 : arg3 = reinterpret_cast< char * >(buf3);
6688 1 : {
6689 1 : if (!arg2) {
6690 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6691 : }
6692 : }
6693 1 : {
6694 1 : const int bLocalUseExceptions = GetUseExceptions();
6695 1 : if ( bLocalUseExceptions ) {
6696 1 : pushErrorHandler();
6697 : }
6698 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
6699 1 : if ( bLocalUseExceptions ) {
6700 1 : popErrorHandler();
6701 : }
6702 : #ifndef SED_HACKS
6703 : if ( bLocalUseExceptions ) {
6704 : CPLErr eclass = CPLGetLastErrorType();
6705 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6706 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6707 : }
6708 : }
6709 : #endif
6710 : }
6711 1 : {
6712 : /* %typemap(out) OGRErr */
6713 1 : if ( result != 0 && GetUseExceptions()) {
6714 0 : const char* pszMessage = CPLGetLastErrorMsg();
6715 0 : if( pszMessage[0] != '\0' )
6716 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6717 : else
6718 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6719 0 : SWIG_fail;
6720 : }
6721 : }
6722 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6723 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6724 1 : {
6725 : /* %typemap(ret) OGRErr */
6726 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6727 1 : resultobj = PyInt_FromLong( result );
6728 : }
6729 : }
6730 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6731 : return resultobj;
6732 0 : fail:
6733 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6734 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6735 : return NULL;
6736 : }
6737 :
6738 :
6739 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6740 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6741 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6742 0 : char *arg2 = (char *) 0 ;
6743 0 : double arg3 ;
6744 0 : void *argp1 = 0 ;
6745 0 : int res1 = 0 ;
6746 0 : int res2 ;
6747 0 : char *buf2 = 0 ;
6748 0 : int alloc2 = 0 ;
6749 0 : double val3 ;
6750 0 : int ecode3 = 0 ;
6751 0 : PyObject *swig_obj[3] ;
6752 0 : OGRErr result;
6753 :
6754 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAngularUnits", 3, 3, swig_obj)) SWIG_fail;
6755 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6756 0 : if (!SWIG_IsOK(res1)) {
6757 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6758 : }
6759 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6760 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6761 0 : if (!SWIG_IsOK(res2)) {
6762 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAngularUnits" "', argument " "2"" of type '" "char const *""'");
6763 : }
6764 0 : arg2 = reinterpret_cast< char * >(buf2);
6765 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6766 0 : if (!SWIG_IsOK(ecode3)) {
6767 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAngularUnits" "', argument " "3"" of type '" "double""'");
6768 : }
6769 0 : arg3 = static_cast< double >(val3);
6770 0 : {
6771 0 : if (!arg2) {
6772 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6773 : }
6774 : }
6775 0 : {
6776 0 : const int bLocalUseExceptions = GetUseExceptions();
6777 0 : if ( bLocalUseExceptions ) {
6778 0 : pushErrorHandler();
6779 : }
6780 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
6781 0 : if ( bLocalUseExceptions ) {
6782 0 : popErrorHandler();
6783 : }
6784 : #ifndef SED_HACKS
6785 : if ( bLocalUseExceptions ) {
6786 : CPLErr eclass = CPLGetLastErrorType();
6787 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6788 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6789 : }
6790 : }
6791 : #endif
6792 : }
6793 0 : {
6794 : /* %typemap(out) OGRErr */
6795 0 : if ( result != 0 && GetUseExceptions()) {
6796 0 : const char* pszMessage = CPLGetLastErrorMsg();
6797 0 : if( pszMessage[0] != '\0' )
6798 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6799 : else
6800 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6801 0 : SWIG_fail;
6802 : }
6803 : }
6804 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6805 0 : {
6806 : /* %typemap(ret) OGRErr */
6807 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6808 0 : resultobj = PyInt_FromLong( result );
6809 : }
6810 : }
6811 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6812 : return resultobj;
6813 0 : fail:
6814 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6815 : return NULL;
6816 : }
6817 :
6818 :
6819 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6820 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6821 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6822 0 : void *argp1 = 0 ;
6823 0 : int res1 = 0 ;
6824 0 : PyObject *swig_obj[1] ;
6825 0 : double result;
6826 :
6827 0 : if (!args) SWIG_fail;
6828 0 : swig_obj[0] = args;
6829 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6830 0 : if (!SWIG_IsOK(res1)) {
6831 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6832 : }
6833 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6834 0 : {
6835 0 : const int bLocalUseExceptions = GetUseExceptions();
6836 0 : if ( bLocalUseExceptions ) {
6837 0 : pushErrorHandler();
6838 : }
6839 0 : result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
6840 0 : if ( bLocalUseExceptions ) {
6841 0 : popErrorHandler();
6842 : }
6843 : #ifndef SED_HACKS
6844 : if ( bLocalUseExceptions ) {
6845 : CPLErr eclass = CPLGetLastErrorType();
6846 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6847 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6848 : }
6849 : }
6850 : #endif
6851 : }
6852 0 : resultobj = SWIG_From_double(static_cast< double >(result));
6853 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6854 : return resultobj;
6855 : fail:
6856 : return NULL;
6857 : }
6858 :
6859 :
6860 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6861 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6862 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6863 1 : void *argp1 = 0 ;
6864 1 : int res1 = 0 ;
6865 1 : PyObject *swig_obj[1] ;
6866 1 : char *result = 0 ;
6867 :
6868 1 : if (!args) SWIG_fail;
6869 1 : swig_obj[0] = args;
6870 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6871 1 : if (!SWIG_IsOK(res1)) {
6872 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6873 : }
6874 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6875 1 : {
6876 1 : const int bLocalUseExceptions = GetUseExceptions();
6877 1 : if ( bLocalUseExceptions ) {
6878 1 : pushErrorHandler();
6879 : }
6880 1 : result = (char *)OSRSpatialReferenceShadow_GetAngularUnitsName(arg1);
6881 1 : if ( bLocalUseExceptions ) {
6882 1 : popErrorHandler();
6883 : }
6884 : #ifndef SED_HACKS
6885 : if ( bLocalUseExceptions ) {
6886 : CPLErr eclass = CPLGetLastErrorType();
6887 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6888 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6889 : }
6890 : }
6891 : #endif
6892 : }
6893 1 : resultobj = SWIG_FromCharPtr((const char *)result);
6894 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6895 : return resultobj;
6896 : fail:
6897 : return NULL;
6898 : }
6899 :
6900 :
6901 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6902 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6903 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6904 1 : char *arg2 = (char *) 0 ;
6905 1 : char *arg3 = (char *) 0 ;
6906 1 : double arg4 ;
6907 1 : void *argp1 = 0 ;
6908 1 : int res1 = 0 ;
6909 1 : int res2 ;
6910 1 : char *buf2 = 0 ;
6911 1 : int alloc2 = 0 ;
6912 1 : int res3 ;
6913 1 : char *buf3 = 0 ;
6914 1 : int alloc3 = 0 ;
6915 1 : double val4 ;
6916 1 : int ecode4 = 0 ;
6917 1 : PyObject *swig_obj[4] ;
6918 1 : OGRErr result;
6919 :
6920 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTargetLinearUnits", 4, 4, swig_obj)) SWIG_fail;
6921 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6922 1 : if (!SWIG_IsOK(res1)) {
6923 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6924 : }
6925 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6926 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6927 1 : if (!SWIG_IsOK(res2)) {
6928 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
6929 : }
6930 1 : arg2 = reinterpret_cast< char * >(buf2);
6931 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6932 1 : if (!SWIG_IsOK(res3)) {
6933 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "3"" of type '" "char const *""'");
6934 : }
6935 1 : arg3 = reinterpret_cast< char * >(buf3);
6936 1 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
6937 1 : if (!SWIG_IsOK(ecode4)) {
6938 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
6939 : }
6940 1 : arg4 = static_cast< double >(val4);
6941 1 : {
6942 1 : if (!arg3) {
6943 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6944 : }
6945 : }
6946 1 : {
6947 1 : const int bLocalUseExceptions = GetUseExceptions();
6948 1 : if ( bLocalUseExceptions ) {
6949 1 : pushErrorHandler();
6950 : }
6951 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
6952 1 : if ( bLocalUseExceptions ) {
6953 1 : popErrorHandler();
6954 : }
6955 : #ifndef SED_HACKS
6956 : if ( bLocalUseExceptions ) {
6957 : CPLErr eclass = CPLGetLastErrorType();
6958 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6959 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6960 : }
6961 : }
6962 : #endif
6963 : }
6964 1 : {
6965 : /* %typemap(out) OGRErr */
6966 1 : if ( result != 0 && GetUseExceptions()) {
6967 0 : const char* pszMessage = CPLGetLastErrorMsg();
6968 0 : if( pszMessage[0] != '\0' )
6969 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6970 : else
6971 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6972 0 : SWIG_fail;
6973 : }
6974 : }
6975 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6976 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6977 1 : {
6978 : /* %typemap(ret) OGRErr */
6979 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6980 1 : resultobj = PyInt_FromLong( result );
6981 : }
6982 : }
6983 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6984 : return resultobj;
6985 0 : fail:
6986 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6987 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6988 : return NULL;
6989 : }
6990 :
6991 :
6992 6 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6993 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6994 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6995 6 : char *arg2 = (char *) 0 ;
6996 6 : double arg3 ;
6997 6 : void *argp1 = 0 ;
6998 6 : int res1 = 0 ;
6999 6 : int res2 ;
7000 6 : char *buf2 = 0 ;
7001 6 : int alloc2 = 0 ;
7002 6 : double val3 ;
7003 6 : int ecode3 = 0 ;
7004 6 : PyObject *swig_obj[3] ;
7005 6 : OGRErr result;
7006 :
7007 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnits", 3, 3, swig_obj)) SWIG_fail;
7008 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7009 6 : if (!SWIG_IsOK(res1)) {
7010 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7011 : }
7012 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7013 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7014 6 : if (!SWIG_IsOK(res2)) {
7015 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7016 : }
7017 6 : arg2 = reinterpret_cast< char * >(buf2);
7018 6 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7019 6 : if (!SWIG_IsOK(ecode3)) {
7020 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnits" "', argument " "3"" of type '" "double""'");
7021 : }
7022 6 : arg3 = static_cast< double >(val3);
7023 6 : {
7024 6 : if (!arg2) {
7025 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7026 : }
7027 : }
7028 6 : {
7029 6 : const int bLocalUseExceptions = GetUseExceptions();
7030 6 : if ( bLocalUseExceptions ) {
7031 6 : pushErrorHandler();
7032 : }
7033 6 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
7034 6 : if ( bLocalUseExceptions ) {
7035 6 : popErrorHandler();
7036 : }
7037 : #ifndef SED_HACKS
7038 : if ( bLocalUseExceptions ) {
7039 : CPLErr eclass = CPLGetLastErrorType();
7040 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7041 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7042 : }
7043 : }
7044 : #endif
7045 : }
7046 6 : {
7047 : /* %typemap(out) OGRErr */
7048 6 : if ( result != 0 && GetUseExceptions()) {
7049 0 : const char* pszMessage = CPLGetLastErrorMsg();
7050 0 : if( pszMessage[0] != '\0' )
7051 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7052 : else
7053 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7054 0 : SWIG_fail;
7055 : }
7056 : }
7057 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7058 6 : {
7059 : /* %typemap(ret) OGRErr */
7060 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7061 6 : resultobj = PyInt_FromLong( result );
7062 : }
7063 : }
7064 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7065 : return resultobj;
7066 0 : fail:
7067 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7068 : return NULL;
7069 : }
7070 :
7071 :
7072 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7073 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7074 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7075 1 : char *arg2 = (char *) 0 ;
7076 1 : double arg3 ;
7077 1 : void *argp1 = 0 ;
7078 1 : int res1 = 0 ;
7079 1 : int res2 ;
7080 1 : char *buf2 = 0 ;
7081 1 : int alloc2 = 0 ;
7082 1 : double val3 ;
7083 1 : int ecode3 = 0 ;
7084 1 : PyObject *swig_obj[3] ;
7085 1 : OGRErr result;
7086 :
7087 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnitsAndUpdateParameters", 3, 3, swig_obj)) SWIG_fail;
7088 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7089 1 : if (!SWIG_IsOK(res1)) {
7090 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7091 : }
7092 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7093 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7094 1 : if (!SWIG_IsOK(res2)) {
7095 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "2"" of type '" "char const *""'");
7096 : }
7097 1 : arg2 = reinterpret_cast< char * >(buf2);
7098 1 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7099 1 : if (!SWIG_IsOK(ecode3)) {
7100 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "3"" of type '" "double""'");
7101 : }
7102 1 : arg3 = static_cast< double >(val3);
7103 1 : {
7104 1 : if (!arg2) {
7105 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7106 : }
7107 : }
7108 1 : {
7109 1 : const int bLocalUseExceptions = GetUseExceptions();
7110 1 : if ( bLocalUseExceptions ) {
7111 1 : pushErrorHandler();
7112 : }
7113 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
7114 1 : if ( bLocalUseExceptions ) {
7115 1 : popErrorHandler();
7116 : }
7117 : #ifndef SED_HACKS
7118 : if ( bLocalUseExceptions ) {
7119 : CPLErr eclass = CPLGetLastErrorType();
7120 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7121 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7122 : }
7123 : }
7124 : #endif
7125 : }
7126 1 : {
7127 : /* %typemap(out) OGRErr */
7128 1 : if ( result != 0 && GetUseExceptions()) {
7129 0 : const char* pszMessage = CPLGetLastErrorMsg();
7130 0 : if( pszMessage[0] != '\0' )
7131 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7132 : else
7133 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7134 0 : SWIG_fail;
7135 : }
7136 : }
7137 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7138 1 : {
7139 : /* %typemap(ret) OGRErr */
7140 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7141 1 : resultobj = PyInt_FromLong( result );
7142 : }
7143 : }
7144 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7145 : return resultobj;
7146 0 : fail:
7147 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7148 : return NULL;
7149 : }
7150 :
7151 :
7152 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7153 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7154 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7155 4 : char *arg2 = (char *) 0 ;
7156 4 : void *argp1 = 0 ;
7157 4 : int res1 = 0 ;
7158 4 : int res2 ;
7159 4 : char *buf2 = 0 ;
7160 4 : int alloc2 = 0 ;
7161 4 : PyObject *swig_obj[2] ;
7162 4 : double result;
7163 :
7164 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetTargetLinearUnits", 2, 2, swig_obj)) SWIG_fail;
7165 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7166 4 : if (!SWIG_IsOK(res1)) {
7167 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7168 : }
7169 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7170 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7171 4 : if (!SWIG_IsOK(res2)) {
7172 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7173 : }
7174 4 : arg2 = reinterpret_cast< char * >(buf2);
7175 4 : {
7176 4 : const int bLocalUseExceptions = GetUseExceptions();
7177 4 : if ( bLocalUseExceptions ) {
7178 4 : pushErrorHandler();
7179 : }
7180 4 : result = (double)OSRSpatialReferenceShadow_GetTargetLinearUnits(arg1,(char const *)arg2);
7181 4 : if ( bLocalUseExceptions ) {
7182 4 : popErrorHandler();
7183 : }
7184 : #ifndef SED_HACKS
7185 : if ( bLocalUseExceptions ) {
7186 : CPLErr eclass = CPLGetLastErrorType();
7187 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7188 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7189 : }
7190 : }
7191 : #endif
7192 : }
7193 4 : resultobj = SWIG_From_double(static_cast< double >(result));
7194 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7195 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7196 : return resultobj;
7197 0 : fail:
7198 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7199 : return NULL;
7200 : }
7201 :
7202 :
7203 202 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7204 202 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7205 202 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7206 202 : void *argp1 = 0 ;
7207 202 : int res1 = 0 ;
7208 202 : PyObject *swig_obj[1] ;
7209 202 : double result;
7210 :
7211 202 : if (!args) SWIG_fail;
7212 202 : swig_obj[0] = args;
7213 202 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7214 202 : if (!SWIG_IsOK(res1)) {
7215 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7216 : }
7217 202 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7218 202 : {
7219 202 : const int bLocalUseExceptions = GetUseExceptions();
7220 202 : if ( bLocalUseExceptions ) {
7221 200 : pushErrorHandler();
7222 : }
7223 202 : result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
7224 202 : if ( bLocalUseExceptions ) {
7225 200 : popErrorHandler();
7226 : }
7227 : #ifndef SED_HACKS
7228 : if ( bLocalUseExceptions ) {
7229 : CPLErr eclass = CPLGetLastErrorType();
7230 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7231 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7232 : }
7233 : }
7234 : #endif
7235 : }
7236 202 : resultobj = SWIG_From_double(static_cast< double >(result));
7237 202 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7238 : return resultobj;
7239 : fail:
7240 : return NULL;
7241 : }
7242 :
7243 :
7244 24 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7245 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7246 24 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7247 24 : void *argp1 = 0 ;
7248 24 : int res1 = 0 ;
7249 24 : PyObject *swig_obj[1] ;
7250 24 : char *result = 0 ;
7251 :
7252 24 : if (!args) SWIG_fail;
7253 24 : swig_obj[0] = args;
7254 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7255 24 : if (!SWIG_IsOK(res1)) {
7256 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7257 : }
7258 24 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7259 24 : {
7260 24 : const int bLocalUseExceptions = GetUseExceptions();
7261 24 : if ( bLocalUseExceptions ) {
7262 24 : pushErrorHandler();
7263 : }
7264 24 : result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
7265 24 : if ( bLocalUseExceptions ) {
7266 24 : popErrorHandler();
7267 : }
7268 : #ifndef SED_HACKS
7269 : if ( bLocalUseExceptions ) {
7270 : CPLErr eclass = CPLGetLastErrorType();
7271 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7272 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7273 : }
7274 : }
7275 : #endif
7276 : }
7277 24 : resultobj = SWIG_FromCharPtr((const char *)result);
7278 24 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7279 : return resultobj;
7280 : fail:
7281 : return NULL;
7282 : }
7283 :
7284 :
7285 482 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7286 482 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7287 482 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7288 482 : char *arg2 = (char *) 0 ;
7289 482 : void *argp1 = 0 ;
7290 482 : int res1 = 0 ;
7291 482 : int res2 ;
7292 482 : char *buf2 = 0 ;
7293 482 : int alloc2 = 0 ;
7294 482 : PyObject *swig_obj[2] ;
7295 482 : char *result = 0 ;
7296 :
7297 482 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityCode", 2, 2, swig_obj)) SWIG_fail;
7298 482 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7299 482 : if (!SWIG_IsOK(res1)) {
7300 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7301 : }
7302 482 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7303 482 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7304 482 : if (!SWIG_IsOK(res2)) {
7305 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "2"" of type '" "char const *""'");
7306 : }
7307 482 : arg2 = reinterpret_cast< char * >(buf2);
7308 482 : {
7309 482 : const int bLocalUseExceptions = GetUseExceptions();
7310 482 : if ( bLocalUseExceptions ) {
7311 206 : pushErrorHandler();
7312 : }
7313 482 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
7314 482 : if ( bLocalUseExceptions ) {
7315 206 : popErrorHandler();
7316 : }
7317 : #ifndef SED_HACKS
7318 : if ( bLocalUseExceptions ) {
7319 : CPLErr eclass = CPLGetLastErrorType();
7320 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7321 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7322 : }
7323 : }
7324 : #endif
7325 : }
7326 482 : resultobj = SWIG_FromCharPtr((const char *)result);
7327 482 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7328 482 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7329 : return resultobj;
7330 0 : fail:
7331 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7332 : return NULL;
7333 : }
7334 :
7335 :
7336 44 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7337 44 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7338 44 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7339 44 : char *arg2 = (char *) 0 ;
7340 44 : void *argp1 = 0 ;
7341 44 : int res1 = 0 ;
7342 44 : int res2 ;
7343 44 : char *buf2 = 0 ;
7344 44 : int alloc2 = 0 ;
7345 44 : PyObject *swig_obj[2] ;
7346 44 : char *result = 0 ;
7347 :
7348 44 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityName", 2, 2, swig_obj)) SWIG_fail;
7349 44 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7350 44 : if (!SWIG_IsOK(res1)) {
7351 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7352 : }
7353 44 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7354 44 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7355 44 : if (!SWIG_IsOK(res2)) {
7356 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityName" "', argument " "2"" of type '" "char const *""'");
7357 : }
7358 44 : arg2 = reinterpret_cast< char * >(buf2);
7359 44 : {
7360 44 : const int bLocalUseExceptions = GetUseExceptions();
7361 44 : if ( bLocalUseExceptions ) {
7362 42 : pushErrorHandler();
7363 : }
7364 44 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
7365 44 : if ( bLocalUseExceptions ) {
7366 42 : popErrorHandler();
7367 : }
7368 : #ifndef SED_HACKS
7369 : if ( bLocalUseExceptions ) {
7370 : CPLErr eclass = CPLGetLastErrorType();
7371 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7372 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7373 : }
7374 : }
7375 : #endif
7376 : }
7377 44 : resultobj = SWIG_FromCharPtr((const char *)result);
7378 44 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7379 44 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7380 : return resultobj;
7381 0 : fail:
7382 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7383 : return NULL;
7384 : }
7385 :
7386 :
7387 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7388 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7389 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7390 1 : void *argp1 = 0 ;
7391 1 : int res1 = 0 ;
7392 1 : PyObject *swig_obj[1] ;
7393 1 : OSRAreaOfUse *result = 0 ;
7394 :
7395 1 : if (!args) SWIG_fail;
7396 1 : swig_obj[0] = args;
7397 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7398 1 : if (!SWIG_IsOK(res1)) {
7399 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAreaOfUse" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7400 : }
7401 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7402 1 : {
7403 1 : const int bLocalUseExceptions = GetUseExceptions();
7404 1 : if ( bLocalUseExceptions ) {
7405 1 : pushErrorHandler();
7406 : }
7407 1 : result = (OSRAreaOfUse *)OSRSpatialReferenceShadow_GetAreaOfUse(arg1);
7408 1 : if ( bLocalUseExceptions ) {
7409 1 : popErrorHandler();
7410 : }
7411 : #ifndef SED_HACKS
7412 : if ( bLocalUseExceptions ) {
7413 : CPLErr eclass = CPLGetLastErrorType();
7414 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7415 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7416 : }
7417 : }
7418 : #endif
7419 : }
7420 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_OWN | 0 );
7421 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7422 : return resultobj;
7423 : fail:
7424 : return NULL;
7425 : }
7426 :
7427 :
7428 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7429 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7430 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7431 6 : char *arg2 = (char *) 0 ;
7432 6 : int arg3 ;
7433 6 : void *argp1 = 0 ;
7434 6 : int res1 = 0 ;
7435 6 : int res2 ;
7436 6 : char *buf2 = 0 ;
7437 6 : int alloc2 = 0 ;
7438 6 : int val3 ;
7439 6 : int ecode3 = 0 ;
7440 6 : PyObject *swig_obj[3] ;
7441 6 : char *result = 0 ;
7442 :
7443 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisName", 3, 3, swig_obj)) SWIG_fail;
7444 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7445 6 : if (!SWIG_IsOK(res1)) {
7446 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7447 : }
7448 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7449 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7450 6 : if (!SWIG_IsOK(res2)) {
7451 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisName" "', argument " "2"" of type '" "char const *""'");
7452 : }
7453 6 : arg2 = reinterpret_cast< char * >(buf2);
7454 6 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7455 6 : if (!SWIG_IsOK(ecode3)) {
7456 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisName" "', argument " "3"" of type '" "int""'");
7457 : }
7458 6 : arg3 = static_cast< int >(val3);
7459 6 : {
7460 6 : const int bLocalUseExceptions = GetUseExceptions();
7461 6 : if ( bLocalUseExceptions ) {
7462 5 : pushErrorHandler();
7463 : }
7464 6 : result = (char *)OSRSpatialReferenceShadow_GetAxisName(arg1,(char const *)arg2,arg3);
7465 6 : if ( bLocalUseExceptions ) {
7466 5 : popErrorHandler();
7467 : }
7468 : #ifndef SED_HACKS
7469 : if ( bLocalUseExceptions ) {
7470 : CPLErr eclass = CPLGetLastErrorType();
7471 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7472 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7473 : }
7474 : }
7475 : #endif
7476 : }
7477 6 : resultobj = SWIG_FromCharPtr((const char *)result);
7478 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7479 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7480 : return resultobj;
7481 0 : fail:
7482 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7483 : return NULL;
7484 : }
7485 :
7486 :
7487 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxesCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7488 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7489 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7490 6 : void *argp1 = 0 ;
7491 6 : int res1 = 0 ;
7492 6 : PyObject *swig_obj[1] ;
7493 6 : int result;
7494 :
7495 6 : if (!args) SWIG_fail;
7496 6 : swig_obj[0] = args;
7497 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7498 6 : if (!SWIG_IsOK(res1)) {
7499 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxesCount" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7500 : }
7501 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7502 6 : {
7503 6 : const int bLocalUseExceptions = GetUseExceptions();
7504 6 : if ( bLocalUseExceptions ) {
7505 5 : pushErrorHandler();
7506 : }
7507 6 : result = (int)OSRSpatialReferenceShadow_GetAxesCount(arg1);
7508 6 : if ( bLocalUseExceptions ) {
7509 5 : popErrorHandler();
7510 : }
7511 : #ifndef SED_HACKS
7512 : if ( bLocalUseExceptions ) {
7513 : CPLErr eclass = CPLGetLastErrorType();
7514 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7515 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7516 : }
7517 : }
7518 : #endif
7519 : }
7520 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7521 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7522 : return resultobj;
7523 : fail:
7524 : return NULL;
7525 : }
7526 :
7527 :
7528 5 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7529 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7530 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7531 5 : char *arg2 = (char *) 0 ;
7532 5 : int arg3 ;
7533 5 : void *argp1 = 0 ;
7534 5 : int res1 = 0 ;
7535 5 : int res2 ;
7536 5 : char *buf2 = 0 ;
7537 5 : int alloc2 = 0 ;
7538 5 : int val3 ;
7539 5 : int ecode3 = 0 ;
7540 5 : PyObject *swig_obj[3] ;
7541 5 : OGRAxisOrientation result;
7542 :
7543 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisOrientation", 3, 3, swig_obj)) SWIG_fail;
7544 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7545 5 : if (!SWIG_IsOK(res1)) {
7546 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7547 : }
7548 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7549 5 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7550 5 : if (!SWIG_IsOK(res2)) {
7551 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "2"" of type '" "char const *""'");
7552 : }
7553 5 : arg2 = reinterpret_cast< char * >(buf2);
7554 5 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7555 5 : if (!SWIG_IsOK(ecode3)) {
7556 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "3"" of type '" "int""'");
7557 : }
7558 5 : arg3 = static_cast< int >(val3);
7559 5 : {
7560 5 : const int bLocalUseExceptions = GetUseExceptions();
7561 5 : if ( bLocalUseExceptions ) {
7562 5 : pushErrorHandler();
7563 : }
7564 5 : result = (OGRAxisOrientation)OSRSpatialReferenceShadow_GetAxisOrientation(arg1,(char const *)arg2,arg3);
7565 5 : if ( bLocalUseExceptions ) {
7566 5 : popErrorHandler();
7567 : }
7568 : #ifndef SED_HACKS
7569 : if ( bLocalUseExceptions ) {
7570 : CPLErr eclass = CPLGetLastErrorType();
7571 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7572 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7573 : }
7574 : }
7575 : #endif
7576 : }
7577 5 : resultobj = SWIG_From_int(static_cast< int >(result));
7578 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7579 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7580 : return resultobj;
7581 0 : fail:
7582 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7583 : return NULL;
7584 : }
7585 :
7586 :
7587 37 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7588 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7589 37 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7590 37 : void *argp1 = 0 ;
7591 37 : int res1 = 0 ;
7592 37 : PyObject *swig_obj[1] ;
7593 37 : OSRAxisMappingStrategy result;
7594 :
7595 37 : if (!args) SWIG_fail;
7596 37 : swig_obj[0] = args;
7597 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7598 37 : if (!SWIG_IsOK(res1)) {
7599 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7600 : }
7601 37 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7602 37 : {
7603 37 : const int bLocalUseExceptions = GetUseExceptions();
7604 37 : if ( bLocalUseExceptions ) {
7605 36 : pushErrorHandler();
7606 : }
7607 37 : result = (OSRAxisMappingStrategy)OSRSpatialReferenceShadow_GetAxisMappingStrategy(arg1);
7608 37 : if ( bLocalUseExceptions ) {
7609 36 : popErrorHandler();
7610 : }
7611 : #ifndef SED_HACKS
7612 : if ( bLocalUseExceptions ) {
7613 : CPLErr eclass = CPLGetLastErrorType();
7614 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7615 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7616 : }
7617 : }
7618 : #endif
7619 : }
7620 37 : resultobj = SWIG_From_int(static_cast< int >(result));
7621 37 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7622 : return resultobj;
7623 : fail:
7624 : return NULL;
7625 : }
7626 :
7627 :
7628 516 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7629 516 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7630 516 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7631 516 : OSRAxisMappingStrategy arg2 ;
7632 516 : void *argp1 = 0 ;
7633 516 : int res1 = 0 ;
7634 516 : int val2 ;
7635 516 : int ecode2 = 0 ;
7636 516 : PyObject *swig_obj[2] ;
7637 :
7638 516 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAxisMappingStrategy", 2, 2, swig_obj)) SWIG_fail;
7639 516 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7640 516 : if (!SWIG_IsOK(res1)) {
7641 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7642 : }
7643 516 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7644 516 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7645 516 : if (!SWIG_IsOK(ecode2)) {
7646 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "2"" of type '" "OSRAxisMappingStrategy""'");
7647 : }
7648 516 : arg2 = static_cast< OSRAxisMappingStrategy >(val2);
7649 516 : {
7650 516 : const int bLocalUseExceptions = GetUseExceptions();
7651 516 : if ( bLocalUseExceptions ) {
7652 414 : pushErrorHandler();
7653 : }
7654 516 : OSRSpatialReferenceShadow_SetAxisMappingStrategy(arg1,arg2);
7655 516 : if ( bLocalUseExceptions ) {
7656 414 : popErrorHandler();
7657 : }
7658 : #ifndef SED_HACKS
7659 : if ( bLocalUseExceptions ) {
7660 : CPLErr eclass = CPLGetLastErrorType();
7661 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7662 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7663 : }
7664 : }
7665 : #endif
7666 : }
7667 516 : resultobj = SWIG_Py_Void();
7668 516 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7669 : return resultobj;
7670 : fail:
7671 : return NULL;
7672 : }
7673 :
7674 :
7675 88 : SWIGINTERN PyObject *_wrap_SpatialReference_GetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7676 88 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7677 88 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7678 88 : int *arg2 = (int *) 0 ;
7679 88 : int **arg3 = (int **) 0 ;
7680 88 : void *argp1 = 0 ;
7681 88 : int res1 = 0 ;
7682 88 : int nLen2 = 0 ;
7683 88 : int *pList2 = NULL ;
7684 88 : PyObject *swig_obj[1] ;
7685 :
7686 88 : {
7687 : /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
7688 88 : arg2 = &nLen2;
7689 88 : arg3 = &pList2;
7690 : }
7691 88 : if (!args) SWIG_fail;
7692 88 : swig_obj[0] = args;
7693 88 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7694 88 : if (!SWIG_IsOK(res1)) {
7695 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7696 : }
7697 88 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7698 88 : {
7699 88 : const int bLocalUseExceptions = GetUseExceptions();
7700 88 : if ( bLocalUseExceptions ) {
7701 47 : pushErrorHandler();
7702 : }
7703 88 : OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(arg1,arg2,(int const **)arg3);
7704 88 : if ( bLocalUseExceptions ) {
7705 47 : popErrorHandler();
7706 : }
7707 : #ifndef SED_HACKS
7708 : if ( bLocalUseExceptions ) {
7709 : CPLErr eclass = CPLGetLastErrorType();
7710 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7711 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7712 : }
7713 : }
7714 : #endif
7715 : }
7716 88 : resultobj = SWIG_Py_Void();
7717 88 : {
7718 : /* %typemap(argout) (int *nLen, const int **pList ) */
7719 88 : Py_DECREF(resultobj);
7720 88 : PyObject *out = PyList_New( *arg2 );
7721 88 : if( !out ) {
7722 0 : SWIG_fail;
7723 : }
7724 266 : for( int i=0; i<*arg2; i++ ) {
7725 178 : PyObject *val = PyInt_FromLong( (*arg3)[i] );
7726 178 : PyList_SetItem( out, i, val );
7727 : }
7728 88 : resultobj = out;
7729 : }
7730 88 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7731 : return resultobj;
7732 : fail:
7733 : return NULL;
7734 : }
7735 :
7736 :
7737 12 : SWIGINTERN PyObject *_wrap_SpatialReference_SetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7738 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7739 12 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7740 12 : int arg2 ;
7741 12 : int *arg3 = (int *) 0 ;
7742 12 : void *argp1 = 0 ;
7743 12 : int res1 = 0 ;
7744 12 : PyObject *swig_obj[2] ;
7745 12 : OGRErr result;
7746 :
7747 12 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetDataAxisToSRSAxisMapping", 2, 2, swig_obj)) SWIG_fail;
7748 12 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7749 12 : if (!SWIG_IsOK(res1)) {
7750 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7751 : }
7752 12 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7753 12 : {
7754 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
7755 12 : arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
7756 12 : if( arg2 < 0 ) {
7757 0 : SWIG_fail;
7758 : }
7759 : }
7760 12 : {
7761 12 : const int bLocalUseExceptions = GetUseExceptions();
7762 12 : if ( bLocalUseExceptions ) {
7763 7 : pushErrorHandler();
7764 : }
7765 12 : result = (OGRErr)OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(arg1,arg2,arg3);
7766 12 : if ( bLocalUseExceptions ) {
7767 7 : popErrorHandler();
7768 : }
7769 : #ifndef SED_HACKS
7770 : if ( bLocalUseExceptions ) {
7771 : CPLErr eclass = CPLGetLastErrorType();
7772 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7773 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7774 : }
7775 : }
7776 : #endif
7777 : }
7778 12 : {
7779 : /* %typemap(out) OGRErr */
7780 12 : if ( result != 0 && GetUseExceptions()) {
7781 0 : const char* pszMessage = CPLGetLastErrorMsg();
7782 0 : if( pszMessage[0] != '\0' )
7783 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7784 : else
7785 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7786 0 : SWIG_fail;
7787 : }
7788 : }
7789 12 : {
7790 : /* %typemap(freearg) (int nList, int* pList) */
7791 12 : free(arg3);
7792 : }
7793 12 : {
7794 : /* %typemap(ret) OGRErr */
7795 12 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7796 12 : resultobj = PyInt_FromLong( result );
7797 : }
7798 : }
7799 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7800 : return resultobj;
7801 0 : fail:
7802 0 : {
7803 : /* %typemap(freearg) (int nList, int* pList) */
7804 0 : free(arg3);
7805 : }
7806 0 : return NULL;
7807 : }
7808 :
7809 :
7810 16 : SWIGINTERN PyObject *_wrap_SpatialReference_SetUTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7811 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7812 16 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7813 16 : int arg2 ;
7814 16 : int arg3 = (int) 1 ;
7815 16 : void *argp1 = 0 ;
7816 16 : int res1 = 0 ;
7817 16 : int val2 ;
7818 16 : int ecode2 = 0 ;
7819 16 : int val3 ;
7820 16 : int ecode3 = 0 ;
7821 16 : PyObject *swig_obj[3] ;
7822 16 : OGRErr result;
7823 :
7824 16 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetUTM", 2, 3, swig_obj)) SWIG_fail;
7825 16 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7826 16 : if (!SWIG_IsOK(res1)) {
7827 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetUTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7828 : }
7829 16 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7830 16 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7831 16 : if (!SWIG_IsOK(ecode2)) {
7832 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetUTM" "', argument " "2"" of type '" "int""'");
7833 : }
7834 16 : arg2 = static_cast< int >(val2);
7835 16 : if (swig_obj[2]) {
7836 3 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7837 3 : if (!SWIG_IsOK(ecode3)) {
7838 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetUTM" "', argument " "3"" of type '" "int""'");
7839 : }
7840 : arg3 = static_cast< int >(val3);
7841 : }
7842 16 : {
7843 16 : const int bLocalUseExceptions = GetUseExceptions();
7844 16 : if ( bLocalUseExceptions ) {
7845 15 : pushErrorHandler();
7846 : }
7847 16 : result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
7848 16 : if ( bLocalUseExceptions ) {
7849 15 : popErrorHandler();
7850 : }
7851 : #ifndef SED_HACKS
7852 : if ( bLocalUseExceptions ) {
7853 : CPLErr eclass = CPLGetLastErrorType();
7854 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7855 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7856 : }
7857 : }
7858 : #endif
7859 : }
7860 16 : {
7861 : /* %typemap(out) OGRErr */
7862 16 : if ( result != 0 && GetUseExceptions()) {
7863 0 : const char* pszMessage = CPLGetLastErrorMsg();
7864 0 : if( pszMessage[0] != '\0' )
7865 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7866 : else
7867 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7868 0 : SWIG_fail;
7869 : }
7870 : }
7871 16 : {
7872 : /* %typemap(ret) OGRErr */
7873 16 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7874 16 : resultobj = PyInt_FromLong( result );
7875 : }
7876 : }
7877 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7878 : return resultobj;
7879 : fail:
7880 : return NULL;
7881 : }
7882 :
7883 :
7884 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetUTMZone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7885 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7886 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7887 6 : void *argp1 = 0 ;
7888 6 : int res1 = 0 ;
7889 6 : PyObject *swig_obj[1] ;
7890 6 : int result;
7891 :
7892 6 : if (!args) SWIG_fail;
7893 6 : swig_obj[0] = args;
7894 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7895 6 : if (!SWIG_IsOK(res1)) {
7896 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7897 : }
7898 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7899 6 : {
7900 6 : const int bLocalUseExceptions = GetUseExceptions();
7901 6 : if ( bLocalUseExceptions ) {
7902 6 : pushErrorHandler();
7903 : }
7904 6 : result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
7905 6 : if ( bLocalUseExceptions ) {
7906 6 : popErrorHandler();
7907 : }
7908 : #ifndef SED_HACKS
7909 : if ( bLocalUseExceptions ) {
7910 : CPLErr eclass = CPLGetLastErrorType();
7911 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7912 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7913 : }
7914 : }
7915 : #endif
7916 : }
7917 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7918 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7919 : return resultobj;
7920 : fail:
7921 : return NULL;
7922 : }
7923 :
7924 :
7925 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStatePlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7926 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7927 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7928 2 : int arg2 ;
7929 2 : int arg3 = (int) 1 ;
7930 2 : char *arg4 = (char *) "" ;
7931 2 : double arg5 = (double) 0.0 ;
7932 2 : void *argp1 = 0 ;
7933 2 : int res1 = 0 ;
7934 2 : int val2 ;
7935 2 : int ecode2 = 0 ;
7936 2 : int val3 ;
7937 2 : int ecode3 = 0 ;
7938 2 : int res4 ;
7939 2 : char *buf4 = 0 ;
7940 2 : int alloc4 = 0 ;
7941 2 : double val5 ;
7942 2 : int ecode5 = 0 ;
7943 2 : PyObject *swig_obj[5] ;
7944 2 : OGRErr result;
7945 :
7946 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetStatePlane", 2, 5, swig_obj)) SWIG_fail;
7947 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7948 2 : if (!SWIG_IsOK(res1)) {
7949 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStatePlane" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7950 : }
7951 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7952 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7953 2 : if (!SWIG_IsOK(ecode2)) {
7954 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStatePlane" "', argument " "2"" of type '" "int""'");
7955 : }
7956 2 : arg2 = static_cast< int >(val2);
7957 2 : if (swig_obj[2]) {
7958 2 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7959 2 : if (!SWIG_IsOK(ecode3)) {
7960 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStatePlane" "', argument " "3"" of type '" "int""'");
7961 : }
7962 : arg3 = static_cast< int >(val3);
7963 : }
7964 2 : if (swig_obj[3]) {
7965 1 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
7966 1 : if (!SWIG_IsOK(res4)) {
7967 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetStatePlane" "', argument " "4"" of type '" "char const *""'");
7968 : }
7969 1 : arg4 = reinterpret_cast< char * >(buf4);
7970 : }
7971 2 : if (swig_obj[4]) {
7972 1 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
7973 1 : if (!SWIG_IsOK(ecode5)) {
7974 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStatePlane" "', argument " "5"" of type '" "double""'");
7975 : }
7976 1 : arg5 = static_cast< double >(val5);
7977 : }
7978 2 : {
7979 2 : const int bLocalUseExceptions = GetUseExceptions();
7980 2 : if ( bLocalUseExceptions ) {
7981 2 : pushErrorHandler();
7982 : }
7983 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
7984 2 : if ( bLocalUseExceptions ) {
7985 2 : popErrorHandler();
7986 : }
7987 : #ifndef SED_HACKS
7988 : if ( bLocalUseExceptions ) {
7989 : CPLErr eclass = CPLGetLastErrorType();
7990 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7991 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7992 : }
7993 : }
7994 : #endif
7995 : }
7996 2 : {
7997 : /* %typemap(out) OGRErr */
7998 2 : if ( result != 0 && GetUseExceptions()) {
7999 0 : const char* pszMessage = CPLGetLastErrorMsg();
8000 0 : if( pszMessage[0] != '\0' )
8001 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8002 : else
8003 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8004 0 : SWIG_fail;
8005 : }
8006 : }
8007 2 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8008 2 : {
8009 : /* %typemap(ret) OGRErr */
8010 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8011 2 : resultobj = PyInt_FromLong( result );
8012 : }
8013 : }
8014 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8015 : return resultobj;
8016 0 : fail:
8017 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8018 : return NULL;
8019 : }
8020 :
8021 :
8022 5 : SWIGINTERN PyObject *_wrap_SpatialReference_AutoIdentifyEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8023 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8024 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8025 5 : void *argp1 = 0 ;
8026 5 : int res1 = 0 ;
8027 5 : PyObject *swig_obj[1] ;
8028 5 : OGRErr result;
8029 :
8030 5 : if (!args) SWIG_fail;
8031 5 : swig_obj[0] = args;
8032 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8033 5 : if (!SWIG_IsOK(res1)) {
8034 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AutoIdentifyEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8035 : }
8036 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8037 5 : {
8038 5 : const int bLocalUseExceptions = GetUseExceptions();
8039 5 : if ( bLocalUseExceptions ) {
8040 5 : pushErrorHandler();
8041 : }
8042 5 : result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
8043 5 : if ( bLocalUseExceptions ) {
8044 5 : popErrorHandler();
8045 : }
8046 : #ifndef SED_HACKS
8047 : if ( bLocalUseExceptions ) {
8048 : CPLErr eclass = CPLGetLastErrorType();
8049 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8050 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8051 : }
8052 : }
8053 : #endif
8054 : }
8055 5 : {
8056 : /* %typemap(out) OGRErr */
8057 6 : if ( result != 0 && GetUseExceptions()) {
8058 1 : const char* pszMessage = CPLGetLastErrorMsg();
8059 1 : if( pszMessage[0] != '\0' )
8060 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8061 : else
8062 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8063 1 : SWIG_fail;
8064 : }
8065 : }
8066 4 : {
8067 : /* %typemap(ret) OGRErr */
8068 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8069 4 : resultobj = PyInt_FromLong( result );
8070 : }
8071 : }
8072 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8073 : return resultobj;
8074 : fail:
8075 : return NULL;
8076 : }
8077 :
8078 :
8079 5 : SWIGINTERN PyObject *_wrap_SpatialReference_FindMatches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8080 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8081 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8082 5 : char **arg2 = (char **) NULL ;
8083 5 : OSRSpatialReferenceShadow ***arg3 = (OSRSpatialReferenceShadow ***) NULL ;
8084 5 : int *arg4 = (int *) NULL ;
8085 5 : int **arg5 = (int **) NULL ;
8086 5 : void *argp1 = 0 ;
8087 5 : int res1 = 0 ;
8088 5 : OGRSpatialReferenceH *pahSRS3 = NULL ;
8089 5 : int nvalues3 = 0 ;
8090 5 : int *confidence_values3 = NULL ;
8091 5 : PyObject *swig_obj[2] ;
8092 :
8093 5 : {
8094 : /* %typemap(in) (OSRSpatialReferenceShadow***, int* nvalues3, int** confidence_values3) */
8095 5 : arg3 = &pahSRS3;
8096 5 : arg4 = &nvalues3;
8097 5 : arg5 = &confidence_values3;
8098 : }
8099 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_FindMatches", 1, 2, swig_obj)) SWIG_fail;
8100 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8101 5 : if (!SWIG_IsOK(res1)) {
8102 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_FindMatches" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8103 : }
8104 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8105 5 : if (swig_obj[1]) {
8106 0 : {
8107 : /* %typemap(in) char **dict */
8108 0 : arg2 = NULL;
8109 0 : if ( PySequence_Check( swig_obj[1] ) ) {
8110 0 : int bErr = FALSE;
8111 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
8112 0 : if ( bErr )
8113 : {
8114 0 : SWIG_fail;
8115 : }
8116 : }
8117 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
8118 0 : int bErr = FALSE;
8119 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
8120 0 : if ( bErr )
8121 : {
8122 0 : SWIG_fail;
8123 : }
8124 : }
8125 : else {
8126 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
8127 0 : SWIG_fail;
8128 : }
8129 : }
8130 : }
8131 5 : {
8132 5 : const int bLocalUseExceptions = GetUseExceptions();
8133 5 : if ( bLocalUseExceptions ) {
8134 5 : pushErrorHandler();
8135 : }
8136 5 : OSRSpatialReferenceShadow_FindMatches(arg1,arg2,arg3,arg4,arg5);
8137 5 : if ( bLocalUseExceptions ) {
8138 5 : popErrorHandler();
8139 : }
8140 : #ifndef SED_HACKS
8141 : if ( bLocalUseExceptions ) {
8142 : CPLErr eclass = CPLGetLastErrorType();
8143 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8144 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8145 : }
8146 : }
8147 : #endif
8148 : }
8149 5 : resultobj = SWIG_Py_Void();
8150 5 : {
8151 : /* %typemap(argout) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8152 :
8153 5 : Py_DECREF(resultobj);
8154 :
8155 5 : resultobj = PyList_New( *(arg4));
8156 5 : if( !resultobj ) {
8157 0 : SWIG_fail;
8158 : }
8159 14 : for( int i = 0; i < *(arg4); i++ )
8160 : {
8161 9 : PyObject *tuple = PyTuple_New( 2 );
8162 9 : OSRReference((*(arg3))[i]);
8163 9 : PyTuple_SetItem( tuple, 0,
8164 : SWIG_NewPointerObj(SWIG_as_voidptr((*(arg3))[i]), SWIGTYPE_p_OSRSpatialReferenceShadow, 1 ) );
8165 9 : PyTuple_SetItem( tuple, 1, PyInt_FromLong((*(arg5))[i]) );
8166 9 : PyList_SetItem( resultobj, i, tuple );
8167 : }
8168 : }
8169 5 : {
8170 : /* %typemap(freearg) char **dict */
8171 5 : CSLDestroy( arg2 );
8172 : }
8173 5 : {
8174 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8175 5 : OSRFreeSRSArray( *(arg3) );
8176 5 : CPLFree( *(arg5) );
8177 : }
8178 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8179 : return resultobj;
8180 0 : fail:
8181 0 : {
8182 : /* %typemap(freearg) char **dict */
8183 0 : CSLDestroy( arg2 );
8184 : }
8185 0 : {
8186 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8187 0 : OSRFreeSRSArray( *(arg3) );
8188 0 : CPLFree( *(arg5) );
8189 : }
8190 : return NULL;
8191 : }
8192 :
8193 :
8194 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8195 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8196 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8197 0 : char *arg2 = (char *) 0 ;
8198 0 : void *argp1 = 0 ;
8199 0 : int res1 = 0 ;
8200 0 : int res2 ;
8201 0 : char *buf2 = 0 ;
8202 0 : int alloc2 = 0 ;
8203 0 : PyObject *swig_obj[2] ;
8204 0 : OGRErr result;
8205 :
8206 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjection", 2, 2, swig_obj)) SWIG_fail;
8207 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8208 0 : if (!SWIG_IsOK(res1)) {
8209 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8210 : }
8211 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8212 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8213 0 : if (!SWIG_IsOK(res2)) {
8214 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjection" "', argument " "2"" of type '" "char const *""'");
8215 : }
8216 0 : arg2 = reinterpret_cast< char * >(buf2);
8217 0 : {
8218 0 : const int bLocalUseExceptions = GetUseExceptions();
8219 0 : if ( bLocalUseExceptions ) {
8220 0 : pushErrorHandler();
8221 : }
8222 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
8223 0 : if ( bLocalUseExceptions ) {
8224 0 : popErrorHandler();
8225 : }
8226 : #ifndef SED_HACKS
8227 : if ( bLocalUseExceptions ) {
8228 : CPLErr eclass = CPLGetLastErrorType();
8229 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8230 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8231 : }
8232 : }
8233 : #endif
8234 : }
8235 0 : {
8236 : /* %typemap(out) OGRErr */
8237 0 : if ( result != 0 && GetUseExceptions()) {
8238 0 : const char* pszMessage = CPLGetLastErrorMsg();
8239 0 : if( pszMessage[0] != '\0' )
8240 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8241 : else
8242 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8243 0 : SWIG_fail;
8244 : }
8245 : }
8246 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8247 0 : {
8248 : /* %typemap(ret) OGRErr */
8249 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8250 0 : resultobj = PyInt_FromLong( result );
8251 : }
8252 : }
8253 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8254 : return resultobj;
8255 0 : fail:
8256 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8257 : return NULL;
8258 : }
8259 :
8260 :
8261 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8262 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8263 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8264 0 : char *arg2 = (char *) 0 ;
8265 0 : double arg3 ;
8266 0 : void *argp1 = 0 ;
8267 0 : int res1 = 0 ;
8268 0 : int res2 ;
8269 0 : char *buf2 = 0 ;
8270 0 : int alloc2 = 0 ;
8271 0 : double val3 ;
8272 0 : int ecode3 = 0 ;
8273 0 : PyObject *swig_obj[3] ;
8274 0 : OGRErr result;
8275 :
8276 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjParm", 3, 3, swig_obj)) SWIG_fail;
8277 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8278 0 : if (!SWIG_IsOK(res1)) {
8279 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8280 : }
8281 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8282 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8283 0 : if (!SWIG_IsOK(res2)) {
8284 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjParm" "', argument " "2"" of type '" "char const *""'");
8285 : }
8286 0 : arg2 = reinterpret_cast< char * >(buf2);
8287 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8288 0 : if (!SWIG_IsOK(ecode3)) {
8289 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetProjParm" "', argument " "3"" of type '" "double""'");
8290 : }
8291 0 : arg3 = static_cast< double >(val3);
8292 0 : {
8293 0 : if (!arg2) {
8294 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8295 : }
8296 : }
8297 0 : {
8298 0 : const int bLocalUseExceptions = GetUseExceptions();
8299 0 : if ( bLocalUseExceptions ) {
8300 0 : pushErrorHandler();
8301 : }
8302 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
8303 0 : if ( bLocalUseExceptions ) {
8304 0 : popErrorHandler();
8305 : }
8306 : #ifndef SED_HACKS
8307 : if ( bLocalUseExceptions ) {
8308 : CPLErr eclass = CPLGetLastErrorType();
8309 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8310 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8311 : }
8312 : }
8313 : #endif
8314 : }
8315 0 : {
8316 : /* %typemap(out) OGRErr */
8317 0 : if ( result != 0 && GetUseExceptions()) {
8318 0 : const char* pszMessage = CPLGetLastErrorMsg();
8319 0 : if( pszMessage[0] != '\0' )
8320 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8321 : else
8322 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8323 0 : SWIG_fail;
8324 : }
8325 : }
8326 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8327 0 : {
8328 : /* %typemap(ret) OGRErr */
8329 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8330 0 : resultobj = PyInt_FromLong( result );
8331 : }
8332 : }
8333 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8334 : return resultobj;
8335 0 : fail:
8336 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8337 : return NULL;
8338 : }
8339 :
8340 :
8341 65 : SWIGINTERN PyObject *_wrap_SpatialReference_GetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8342 65 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8343 65 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8344 65 : char *arg2 = (char *) 0 ;
8345 65 : double arg3 = (double) 0.0 ;
8346 65 : void *argp1 = 0 ;
8347 65 : int res1 = 0 ;
8348 65 : int res2 ;
8349 65 : char *buf2 = 0 ;
8350 65 : int alloc2 = 0 ;
8351 65 : double val3 ;
8352 65 : int ecode3 = 0 ;
8353 65 : PyObject *swig_obj[3] ;
8354 65 : double result;
8355 :
8356 65 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetProjParm", 2, 3, swig_obj)) SWIG_fail;
8357 65 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8358 65 : if (!SWIG_IsOK(res1)) {
8359 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8360 : }
8361 65 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8362 65 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8363 65 : if (!SWIG_IsOK(res2)) {
8364 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetProjParm" "', argument " "2"" of type '" "char const *""'");
8365 : }
8366 65 : arg2 = reinterpret_cast< char * >(buf2);
8367 65 : if (swig_obj[2]) {
8368 24 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8369 24 : if (!SWIG_IsOK(ecode3)) {
8370 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetProjParm" "', argument " "3"" of type '" "double""'");
8371 : }
8372 24 : arg3 = static_cast< double >(val3);
8373 : }
8374 65 : {
8375 65 : if (!arg2) {
8376 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8377 : }
8378 : }
8379 65 : {
8380 65 : const int bLocalUseExceptions = GetUseExceptions();
8381 65 : if ( bLocalUseExceptions ) {
8382 58 : pushErrorHandler();
8383 : }
8384 65 : result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
8385 65 : if ( bLocalUseExceptions ) {
8386 58 : popErrorHandler();
8387 : }
8388 : #ifndef SED_HACKS
8389 : if ( bLocalUseExceptions ) {
8390 : CPLErr eclass = CPLGetLastErrorType();
8391 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8392 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8393 : }
8394 : }
8395 : #endif
8396 : }
8397 65 : resultobj = SWIG_From_double(static_cast< double >(result));
8398 65 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8399 65 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8400 : return resultobj;
8401 0 : fail:
8402 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8403 : return NULL;
8404 : }
8405 :
8406 :
8407 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8408 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8409 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8410 0 : char *arg2 = (char *) 0 ;
8411 0 : double arg3 ;
8412 0 : void *argp1 = 0 ;
8413 0 : int res1 = 0 ;
8414 0 : int res2 ;
8415 0 : char *buf2 = 0 ;
8416 0 : int alloc2 = 0 ;
8417 0 : double val3 ;
8418 0 : int ecode3 = 0 ;
8419 0 : PyObject *swig_obj[3] ;
8420 0 : OGRErr result;
8421 :
8422 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetNormProjParm", 3, 3, swig_obj)) SWIG_fail;
8423 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8424 0 : if (!SWIG_IsOK(res1)) {
8425 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8426 : }
8427 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8428 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8429 0 : if (!SWIG_IsOK(res2)) {
8430 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8431 : }
8432 0 : arg2 = reinterpret_cast< char * >(buf2);
8433 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8434 0 : if (!SWIG_IsOK(ecode3)) {
8435 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNormProjParm" "', argument " "3"" of type '" "double""'");
8436 : }
8437 0 : arg3 = static_cast< double >(val3);
8438 0 : {
8439 0 : if (!arg2) {
8440 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8441 : }
8442 : }
8443 0 : {
8444 0 : const int bLocalUseExceptions = GetUseExceptions();
8445 0 : if ( bLocalUseExceptions ) {
8446 0 : pushErrorHandler();
8447 : }
8448 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
8449 0 : if ( bLocalUseExceptions ) {
8450 0 : popErrorHandler();
8451 : }
8452 : #ifndef SED_HACKS
8453 : if ( bLocalUseExceptions ) {
8454 : CPLErr eclass = CPLGetLastErrorType();
8455 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8456 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8457 : }
8458 : }
8459 : #endif
8460 : }
8461 0 : {
8462 : /* %typemap(out) OGRErr */
8463 0 : if ( result != 0 && GetUseExceptions()) {
8464 0 : const char* pszMessage = CPLGetLastErrorMsg();
8465 0 : if( pszMessage[0] != '\0' )
8466 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8467 : else
8468 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8469 0 : SWIG_fail;
8470 : }
8471 : }
8472 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8473 0 : {
8474 : /* %typemap(ret) OGRErr */
8475 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8476 0 : resultobj = PyInt_FromLong( result );
8477 : }
8478 : }
8479 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8480 : return resultobj;
8481 0 : fail:
8482 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8483 : return NULL;
8484 : }
8485 :
8486 :
8487 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8488 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8489 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8490 1 : char *arg2 = (char *) 0 ;
8491 1 : double arg3 = (double) 0.0 ;
8492 1 : void *argp1 = 0 ;
8493 1 : int res1 = 0 ;
8494 1 : int res2 ;
8495 1 : char *buf2 = 0 ;
8496 1 : int alloc2 = 0 ;
8497 1 : double val3 ;
8498 1 : int ecode3 = 0 ;
8499 1 : PyObject *swig_obj[3] ;
8500 1 : double result;
8501 :
8502 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetNormProjParm", 2, 3, swig_obj)) SWIG_fail;
8503 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8504 1 : if (!SWIG_IsOK(res1)) {
8505 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8506 : }
8507 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8508 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8509 1 : if (!SWIG_IsOK(res2)) {
8510 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8511 : }
8512 1 : arg2 = reinterpret_cast< char * >(buf2);
8513 1 : if (swig_obj[2]) {
8514 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8515 0 : if (!SWIG_IsOK(ecode3)) {
8516 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetNormProjParm" "', argument " "3"" of type '" "double""'");
8517 : }
8518 0 : arg3 = static_cast< double >(val3);
8519 : }
8520 1 : {
8521 1 : if (!arg2) {
8522 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8523 : }
8524 : }
8525 1 : {
8526 1 : const int bLocalUseExceptions = GetUseExceptions();
8527 1 : if ( bLocalUseExceptions ) {
8528 1 : pushErrorHandler();
8529 : }
8530 1 : result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
8531 1 : if ( bLocalUseExceptions ) {
8532 1 : popErrorHandler();
8533 : }
8534 : #ifndef SED_HACKS
8535 : if ( bLocalUseExceptions ) {
8536 : CPLErr eclass = CPLGetLastErrorType();
8537 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8538 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8539 : }
8540 : }
8541 : #endif
8542 : }
8543 1 : resultobj = SWIG_From_double(static_cast< double >(result));
8544 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8545 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8546 : return resultobj;
8547 0 : fail:
8548 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8549 : return NULL;
8550 : }
8551 :
8552 :
8553 8 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8554 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8555 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8556 8 : void *argp1 = 0 ;
8557 8 : int res1 = 0 ;
8558 8 : PyObject *swig_obj[1] ;
8559 8 : double result;
8560 :
8561 8 : if (!args) SWIG_fail;
8562 8 : swig_obj[0] = args;
8563 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8564 8 : if (!SWIG_IsOK(res1)) {
8565 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8566 : }
8567 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8568 8 : {
8569 8 : const int bLocalUseExceptions = GetUseExceptions();
8570 8 : if ( bLocalUseExceptions ) {
8571 7 : pushErrorHandler();
8572 : }
8573 8 : result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
8574 8 : if ( bLocalUseExceptions ) {
8575 7 : popErrorHandler();
8576 : }
8577 : #ifndef SED_HACKS
8578 : if ( bLocalUseExceptions ) {
8579 : CPLErr eclass = CPLGetLastErrorType();
8580 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8581 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8582 : }
8583 : }
8584 : #endif
8585 : }
8586 8 : resultobj = SWIG_From_double(static_cast< double >(result));
8587 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8588 : return resultobj;
8589 : fail:
8590 : return NULL;
8591 : }
8592 :
8593 :
8594 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8595 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8596 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8597 4 : void *argp1 = 0 ;
8598 4 : int res1 = 0 ;
8599 4 : PyObject *swig_obj[1] ;
8600 4 : double result;
8601 :
8602 4 : if (!args) SWIG_fail;
8603 4 : swig_obj[0] = args;
8604 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8605 4 : if (!SWIG_IsOK(res1)) {
8606 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8607 : }
8608 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8609 4 : {
8610 4 : const int bLocalUseExceptions = GetUseExceptions();
8611 4 : if ( bLocalUseExceptions ) {
8612 3 : pushErrorHandler();
8613 : }
8614 4 : result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
8615 4 : if ( bLocalUseExceptions ) {
8616 3 : popErrorHandler();
8617 : }
8618 : #ifndef SED_HACKS
8619 : if ( bLocalUseExceptions ) {
8620 : CPLErr eclass = CPLGetLastErrorType();
8621 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8622 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8623 : }
8624 : }
8625 : #endif
8626 : }
8627 4 : resultobj = SWIG_From_double(static_cast< double >(result));
8628 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8629 : return resultobj;
8630 : fail:
8631 : return NULL;
8632 : }
8633 :
8634 :
8635 10 : SWIGINTERN PyObject *_wrap_SpatialReference_GetInvFlattening(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8636 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8637 10 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8638 10 : void *argp1 = 0 ;
8639 10 : int res1 = 0 ;
8640 10 : PyObject *swig_obj[1] ;
8641 10 : double result;
8642 :
8643 10 : if (!args) SWIG_fail;
8644 10 : swig_obj[0] = args;
8645 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8646 10 : if (!SWIG_IsOK(res1)) {
8647 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8648 : }
8649 10 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8650 10 : {
8651 10 : const int bLocalUseExceptions = GetUseExceptions();
8652 10 : if ( bLocalUseExceptions ) {
8653 7 : pushErrorHandler();
8654 : }
8655 10 : result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
8656 10 : if ( bLocalUseExceptions ) {
8657 7 : popErrorHandler();
8658 : }
8659 : #ifndef SED_HACKS
8660 : if ( bLocalUseExceptions ) {
8661 : CPLErr eclass = CPLGetLastErrorType();
8662 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8663 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8664 : }
8665 : }
8666 : #endif
8667 : }
8668 10 : resultobj = SWIG_From_double(static_cast< double >(result));
8669 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8670 : return resultobj;
8671 : fail:
8672 : return NULL;
8673 : }
8674 :
8675 :
8676 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetACEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8677 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8678 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8679 0 : double arg2 ;
8680 0 : double arg3 ;
8681 0 : double arg4 ;
8682 0 : double arg5 ;
8683 0 : double arg6 ;
8684 0 : double arg7 ;
8685 0 : void *argp1 = 0 ;
8686 0 : int res1 = 0 ;
8687 0 : double val2 ;
8688 0 : int ecode2 = 0 ;
8689 0 : double val3 ;
8690 0 : int ecode3 = 0 ;
8691 0 : double val4 ;
8692 0 : int ecode4 = 0 ;
8693 0 : double val5 ;
8694 0 : int ecode5 = 0 ;
8695 0 : double val6 ;
8696 0 : int ecode6 = 0 ;
8697 0 : double val7 ;
8698 0 : int ecode7 = 0 ;
8699 0 : PyObject * obj0 = 0 ;
8700 0 : PyObject * obj1 = 0 ;
8701 0 : PyObject * obj2 = 0 ;
8702 0 : PyObject * obj3 = 0 ;
8703 0 : PyObject * obj4 = 0 ;
8704 0 : PyObject * obj5 = 0 ;
8705 0 : PyObject * obj6 = 0 ;
8706 0 : char * kwnames[] = {
8707 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8708 : };
8709 0 : OGRErr result;
8710 :
8711 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetACEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
8712 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8713 0 : if (!SWIG_IsOK(res1)) {
8714 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetACEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8715 : }
8716 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8717 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8718 0 : if (!SWIG_IsOK(ecode2)) {
8719 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetACEA" "', argument " "2"" of type '" "double""'");
8720 : }
8721 0 : arg2 = static_cast< double >(val2);
8722 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8723 0 : if (!SWIG_IsOK(ecode3)) {
8724 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetACEA" "', argument " "3"" of type '" "double""'");
8725 : }
8726 0 : arg3 = static_cast< double >(val3);
8727 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8728 0 : if (!SWIG_IsOK(ecode4)) {
8729 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetACEA" "', argument " "4"" of type '" "double""'");
8730 : }
8731 0 : arg4 = static_cast< double >(val4);
8732 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8733 0 : if (!SWIG_IsOK(ecode5)) {
8734 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetACEA" "', argument " "5"" of type '" "double""'");
8735 : }
8736 0 : arg5 = static_cast< double >(val5);
8737 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8738 0 : if (!SWIG_IsOK(ecode6)) {
8739 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetACEA" "', argument " "6"" of type '" "double""'");
8740 : }
8741 0 : arg6 = static_cast< double >(val6);
8742 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
8743 0 : if (!SWIG_IsOK(ecode7)) {
8744 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetACEA" "', argument " "7"" of type '" "double""'");
8745 : }
8746 0 : arg7 = static_cast< double >(val7);
8747 0 : {
8748 0 : const int bLocalUseExceptions = GetUseExceptions();
8749 0 : if ( bLocalUseExceptions ) {
8750 0 : pushErrorHandler();
8751 : }
8752 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
8753 0 : if ( bLocalUseExceptions ) {
8754 0 : popErrorHandler();
8755 : }
8756 : #ifndef SED_HACKS
8757 : if ( bLocalUseExceptions ) {
8758 : CPLErr eclass = CPLGetLastErrorType();
8759 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8760 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8761 : }
8762 : }
8763 : #endif
8764 : }
8765 0 : {
8766 : /* %typemap(out) OGRErr */
8767 0 : if ( result != 0 && GetUseExceptions()) {
8768 0 : const char* pszMessage = CPLGetLastErrorMsg();
8769 0 : if( pszMessage[0] != '\0' )
8770 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8771 : else
8772 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8773 0 : SWIG_fail;
8774 : }
8775 : }
8776 0 : {
8777 : /* %typemap(ret) OGRErr */
8778 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8779 0 : resultobj = PyInt_FromLong( result );
8780 : }
8781 : }
8782 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8783 : return resultobj;
8784 : fail:
8785 : return NULL;
8786 : }
8787 :
8788 :
8789 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAE(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8790 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8791 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8792 0 : double arg2 ;
8793 0 : double arg3 ;
8794 0 : double arg4 ;
8795 0 : double arg5 ;
8796 0 : void *argp1 = 0 ;
8797 0 : int res1 = 0 ;
8798 0 : double val2 ;
8799 0 : int ecode2 = 0 ;
8800 0 : double val3 ;
8801 0 : int ecode3 = 0 ;
8802 0 : double val4 ;
8803 0 : int ecode4 = 0 ;
8804 0 : double val5 ;
8805 0 : int ecode5 = 0 ;
8806 0 : PyObject * obj0 = 0 ;
8807 0 : PyObject * obj1 = 0 ;
8808 0 : PyObject * obj2 = 0 ;
8809 0 : PyObject * obj3 = 0 ;
8810 0 : PyObject * obj4 = 0 ;
8811 0 : char * kwnames[] = {
8812 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8813 : };
8814 0 : OGRErr result;
8815 :
8816 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetAE", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8817 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8818 0 : if (!SWIG_IsOK(res1)) {
8819 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAE" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8820 : }
8821 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8822 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8823 0 : if (!SWIG_IsOK(ecode2)) {
8824 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAE" "', argument " "2"" of type '" "double""'");
8825 : }
8826 0 : arg2 = static_cast< double >(val2);
8827 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8828 0 : if (!SWIG_IsOK(ecode3)) {
8829 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAE" "', argument " "3"" of type '" "double""'");
8830 : }
8831 0 : arg3 = static_cast< double >(val3);
8832 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8833 0 : if (!SWIG_IsOK(ecode4)) {
8834 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAE" "', argument " "4"" of type '" "double""'");
8835 : }
8836 0 : arg4 = static_cast< double >(val4);
8837 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8838 0 : if (!SWIG_IsOK(ecode5)) {
8839 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetAE" "', argument " "5"" of type '" "double""'");
8840 : }
8841 0 : arg5 = static_cast< double >(val5);
8842 0 : {
8843 0 : const int bLocalUseExceptions = GetUseExceptions();
8844 0 : if ( bLocalUseExceptions ) {
8845 0 : pushErrorHandler();
8846 : }
8847 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
8848 0 : if ( bLocalUseExceptions ) {
8849 0 : popErrorHandler();
8850 : }
8851 : #ifndef SED_HACKS
8852 : if ( bLocalUseExceptions ) {
8853 : CPLErr eclass = CPLGetLastErrorType();
8854 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8855 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8856 : }
8857 : }
8858 : #endif
8859 : }
8860 0 : {
8861 : /* %typemap(out) OGRErr */
8862 0 : if ( result != 0 && GetUseExceptions()) {
8863 0 : const char* pszMessage = CPLGetLastErrorMsg();
8864 0 : if( pszMessage[0] != '\0' )
8865 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8866 : else
8867 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8868 0 : SWIG_fail;
8869 : }
8870 : }
8871 0 : {
8872 : /* %typemap(ret) OGRErr */
8873 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8874 0 : resultobj = PyInt_FromLong( result );
8875 : }
8876 : }
8877 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8878 : return resultobj;
8879 : fail:
8880 : return NULL;
8881 : }
8882 :
8883 :
8884 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetBonne(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8885 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8886 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8887 0 : double arg2 ;
8888 0 : double arg3 ;
8889 0 : double arg4 ;
8890 0 : double arg5 ;
8891 0 : void *argp1 = 0 ;
8892 0 : int res1 = 0 ;
8893 0 : double val2 ;
8894 0 : int ecode2 = 0 ;
8895 0 : double val3 ;
8896 0 : int ecode3 = 0 ;
8897 0 : double val4 ;
8898 0 : int ecode4 = 0 ;
8899 0 : double val5 ;
8900 0 : int ecode5 = 0 ;
8901 0 : PyObject * obj0 = 0 ;
8902 0 : PyObject * obj1 = 0 ;
8903 0 : PyObject * obj2 = 0 ;
8904 0 : PyObject * obj3 = 0 ;
8905 0 : PyObject * obj4 = 0 ;
8906 0 : char * kwnames[] = {
8907 : (char *)"self", (char *)"stdp", (char *)"cm", (char *)"fe", (char *)"fn", NULL
8908 : };
8909 0 : OGRErr result;
8910 :
8911 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetBonne", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8912 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8913 0 : if (!SWIG_IsOK(res1)) {
8914 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetBonne" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8915 : }
8916 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8917 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8918 0 : if (!SWIG_IsOK(ecode2)) {
8919 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetBonne" "', argument " "2"" of type '" "double""'");
8920 : }
8921 0 : arg2 = static_cast< double >(val2);
8922 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8923 0 : if (!SWIG_IsOK(ecode3)) {
8924 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetBonne" "', argument " "3"" of type '" "double""'");
8925 : }
8926 0 : arg3 = static_cast< double >(val3);
8927 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8928 0 : if (!SWIG_IsOK(ecode4)) {
8929 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetBonne" "', argument " "4"" of type '" "double""'");
8930 : }
8931 0 : arg4 = static_cast< double >(val4);
8932 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8933 0 : if (!SWIG_IsOK(ecode5)) {
8934 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetBonne" "', argument " "5"" of type '" "double""'");
8935 : }
8936 0 : arg5 = static_cast< double >(val5);
8937 0 : {
8938 0 : const int bLocalUseExceptions = GetUseExceptions();
8939 0 : if ( bLocalUseExceptions ) {
8940 0 : pushErrorHandler();
8941 : }
8942 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
8943 0 : if ( bLocalUseExceptions ) {
8944 0 : popErrorHandler();
8945 : }
8946 : #ifndef SED_HACKS
8947 : if ( bLocalUseExceptions ) {
8948 : CPLErr eclass = CPLGetLastErrorType();
8949 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8950 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8951 : }
8952 : }
8953 : #endif
8954 : }
8955 0 : {
8956 : /* %typemap(out) OGRErr */
8957 0 : if ( result != 0 && GetUseExceptions()) {
8958 0 : const char* pszMessage = CPLGetLastErrorMsg();
8959 0 : if( pszMessage[0] != '\0' )
8960 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8961 : else
8962 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8963 0 : SWIG_fail;
8964 : }
8965 : }
8966 0 : {
8967 : /* %typemap(ret) OGRErr */
8968 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8969 0 : resultobj = PyInt_FromLong( result );
8970 : }
8971 : }
8972 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8973 : return resultobj;
8974 : fail:
8975 : return NULL;
8976 : }
8977 :
8978 :
8979 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8980 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8981 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8982 0 : double arg2 ;
8983 0 : double arg3 ;
8984 0 : double arg4 ;
8985 0 : double arg5 ;
8986 0 : void *argp1 = 0 ;
8987 0 : int res1 = 0 ;
8988 0 : double val2 ;
8989 0 : int ecode2 = 0 ;
8990 0 : double val3 ;
8991 0 : int ecode3 = 0 ;
8992 0 : double val4 ;
8993 0 : int ecode4 = 0 ;
8994 0 : double val5 ;
8995 0 : int ecode5 = 0 ;
8996 0 : PyObject * obj0 = 0 ;
8997 0 : PyObject * obj1 = 0 ;
8998 0 : PyObject * obj2 = 0 ;
8999 0 : PyObject * obj3 = 0 ;
9000 0 : PyObject * obj4 = 0 ;
9001 0 : char * kwnames[] = {
9002 : (char *)"self", (char *)"stdp1", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9003 : };
9004 0 : OGRErr result;
9005 :
9006 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9007 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9008 0 : if (!SWIG_IsOK(res1)) {
9009 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9010 : }
9011 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9012 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9013 0 : if (!SWIG_IsOK(ecode2)) {
9014 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCEA" "', argument " "2"" of type '" "double""'");
9015 : }
9016 0 : arg2 = static_cast< double >(val2);
9017 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9018 0 : if (!SWIG_IsOK(ecode3)) {
9019 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCEA" "', argument " "3"" of type '" "double""'");
9020 : }
9021 0 : arg3 = static_cast< double >(val3);
9022 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9023 0 : if (!SWIG_IsOK(ecode4)) {
9024 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCEA" "', argument " "4"" of type '" "double""'");
9025 : }
9026 0 : arg4 = static_cast< double >(val4);
9027 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9028 0 : if (!SWIG_IsOK(ecode5)) {
9029 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCEA" "', argument " "5"" of type '" "double""'");
9030 : }
9031 0 : arg5 = static_cast< double >(val5);
9032 0 : {
9033 0 : const int bLocalUseExceptions = GetUseExceptions();
9034 0 : if ( bLocalUseExceptions ) {
9035 0 : pushErrorHandler();
9036 : }
9037 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
9038 0 : if ( bLocalUseExceptions ) {
9039 0 : popErrorHandler();
9040 : }
9041 : #ifndef SED_HACKS
9042 : if ( bLocalUseExceptions ) {
9043 : CPLErr eclass = CPLGetLastErrorType();
9044 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9045 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9046 : }
9047 : }
9048 : #endif
9049 : }
9050 0 : {
9051 : /* %typemap(out) OGRErr */
9052 0 : if ( result != 0 && GetUseExceptions()) {
9053 0 : const char* pszMessage = CPLGetLastErrorMsg();
9054 0 : if( pszMessage[0] != '\0' )
9055 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9056 : else
9057 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9058 0 : SWIG_fail;
9059 : }
9060 : }
9061 0 : {
9062 : /* %typemap(ret) OGRErr */
9063 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9064 0 : resultobj = PyInt_FromLong( result );
9065 : }
9066 : }
9067 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9068 : return resultobj;
9069 : fail:
9070 : return NULL;
9071 : }
9072 :
9073 :
9074 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9075 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9076 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9077 0 : double arg2 ;
9078 0 : double arg3 ;
9079 0 : double arg4 ;
9080 0 : double arg5 ;
9081 0 : void *argp1 = 0 ;
9082 0 : int res1 = 0 ;
9083 0 : double val2 ;
9084 0 : int ecode2 = 0 ;
9085 0 : double val3 ;
9086 0 : int ecode3 = 0 ;
9087 0 : double val4 ;
9088 0 : int ecode4 = 0 ;
9089 0 : double val5 ;
9090 0 : int ecode5 = 0 ;
9091 0 : PyObject * obj0 = 0 ;
9092 0 : PyObject * obj1 = 0 ;
9093 0 : PyObject * obj2 = 0 ;
9094 0 : PyObject * obj3 = 0 ;
9095 0 : PyObject * obj4 = 0 ;
9096 0 : char * kwnames[] = {
9097 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9098 : };
9099 0 : OGRErr result;
9100 :
9101 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9102 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9103 0 : if (!SWIG_IsOK(res1)) {
9104 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9105 : }
9106 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9107 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9108 0 : if (!SWIG_IsOK(ecode2)) {
9109 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCS" "', argument " "2"" of type '" "double""'");
9110 : }
9111 0 : arg2 = static_cast< double >(val2);
9112 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9113 0 : if (!SWIG_IsOK(ecode3)) {
9114 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCS" "', argument " "3"" of type '" "double""'");
9115 : }
9116 0 : arg3 = static_cast< double >(val3);
9117 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9118 0 : if (!SWIG_IsOK(ecode4)) {
9119 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCS" "', argument " "4"" of type '" "double""'");
9120 : }
9121 0 : arg4 = static_cast< double >(val4);
9122 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9123 0 : if (!SWIG_IsOK(ecode5)) {
9124 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCS" "', argument " "5"" of type '" "double""'");
9125 : }
9126 0 : arg5 = static_cast< double >(val5);
9127 0 : {
9128 0 : const int bLocalUseExceptions = GetUseExceptions();
9129 0 : if ( bLocalUseExceptions ) {
9130 0 : pushErrorHandler();
9131 : }
9132 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
9133 0 : if ( bLocalUseExceptions ) {
9134 0 : popErrorHandler();
9135 : }
9136 : #ifndef SED_HACKS
9137 : if ( bLocalUseExceptions ) {
9138 : CPLErr eclass = CPLGetLastErrorType();
9139 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9140 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9141 : }
9142 : }
9143 : #endif
9144 : }
9145 0 : {
9146 : /* %typemap(out) OGRErr */
9147 0 : if ( result != 0 && GetUseExceptions()) {
9148 0 : const char* pszMessage = CPLGetLastErrorMsg();
9149 0 : if( pszMessage[0] != '\0' )
9150 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9151 : else
9152 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9153 0 : SWIG_fail;
9154 : }
9155 : }
9156 0 : {
9157 : /* %typemap(ret) OGRErr */
9158 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9159 0 : resultobj = PyInt_FromLong( result );
9160 : }
9161 : }
9162 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9163 : return resultobj;
9164 : fail:
9165 : return NULL;
9166 : }
9167 :
9168 :
9169 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9170 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9171 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9172 0 : double arg2 ;
9173 0 : double arg3 ;
9174 0 : double arg4 ;
9175 0 : double arg5 ;
9176 0 : double arg6 ;
9177 0 : double arg7 ;
9178 0 : void *argp1 = 0 ;
9179 0 : int res1 = 0 ;
9180 0 : double val2 ;
9181 0 : int ecode2 = 0 ;
9182 0 : double val3 ;
9183 0 : int ecode3 = 0 ;
9184 0 : double val4 ;
9185 0 : int ecode4 = 0 ;
9186 0 : double val5 ;
9187 0 : int ecode5 = 0 ;
9188 0 : double val6 ;
9189 0 : int ecode6 = 0 ;
9190 0 : double val7 ;
9191 0 : int ecode7 = 0 ;
9192 0 : PyObject * obj0 = 0 ;
9193 0 : PyObject * obj1 = 0 ;
9194 0 : PyObject * obj2 = 0 ;
9195 0 : PyObject * obj3 = 0 ;
9196 0 : PyObject * obj4 = 0 ;
9197 0 : PyObject * obj5 = 0 ;
9198 0 : PyObject * obj6 = 0 ;
9199 0 : char * kwnames[] = {
9200 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9201 : };
9202 0 : OGRErr result;
9203 :
9204 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetEC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
9205 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9206 0 : if (!SWIG_IsOK(res1)) {
9207 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9208 : }
9209 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9210 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9211 0 : if (!SWIG_IsOK(ecode2)) {
9212 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEC" "', argument " "2"" of type '" "double""'");
9213 : }
9214 0 : arg2 = static_cast< double >(val2);
9215 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9216 0 : if (!SWIG_IsOK(ecode3)) {
9217 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEC" "', argument " "3"" of type '" "double""'");
9218 : }
9219 0 : arg3 = static_cast< double >(val3);
9220 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9221 0 : if (!SWIG_IsOK(ecode4)) {
9222 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEC" "', argument " "4"" of type '" "double""'");
9223 : }
9224 0 : arg4 = static_cast< double >(val4);
9225 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9226 0 : if (!SWIG_IsOK(ecode5)) {
9227 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEC" "', argument " "5"" of type '" "double""'");
9228 : }
9229 0 : arg5 = static_cast< double >(val5);
9230 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9231 0 : if (!SWIG_IsOK(ecode6)) {
9232 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEC" "', argument " "6"" of type '" "double""'");
9233 : }
9234 0 : arg6 = static_cast< double >(val6);
9235 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9236 0 : if (!SWIG_IsOK(ecode7)) {
9237 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetEC" "', argument " "7"" of type '" "double""'");
9238 : }
9239 0 : arg7 = static_cast< double >(val7);
9240 0 : {
9241 0 : const int bLocalUseExceptions = GetUseExceptions();
9242 0 : if ( bLocalUseExceptions ) {
9243 0 : pushErrorHandler();
9244 : }
9245 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
9246 0 : if ( bLocalUseExceptions ) {
9247 0 : popErrorHandler();
9248 : }
9249 : #ifndef SED_HACKS
9250 : if ( bLocalUseExceptions ) {
9251 : CPLErr eclass = CPLGetLastErrorType();
9252 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9253 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9254 : }
9255 : }
9256 : #endif
9257 : }
9258 0 : {
9259 : /* %typemap(out) OGRErr */
9260 0 : if ( result != 0 && GetUseExceptions()) {
9261 0 : const char* pszMessage = CPLGetLastErrorMsg();
9262 0 : if( pszMessage[0] != '\0' )
9263 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9264 : else
9265 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9266 0 : SWIG_fail;
9267 : }
9268 : }
9269 0 : {
9270 : /* %typemap(ret) OGRErr */
9271 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9272 0 : resultobj = PyInt_FromLong( result );
9273 : }
9274 : }
9275 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9276 : return resultobj;
9277 : fail:
9278 : return NULL;
9279 : }
9280 :
9281 :
9282 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9283 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9284 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9285 0 : double arg2 ;
9286 0 : double arg3 ;
9287 0 : double arg4 ;
9288 0 : void *argp1 = 0 ;
9289 0 : int res1 = 0 ;
9290 0 : double val2 ;
9291 0 : int ecode2 = 0 ;
9292 0 : double val3 ;
9293 0 : int ecode3 = 0 ;
9294 0 : double val4 ;
9295 0 : int ecode4 = 0 ;
9296 0 : PyObject * obj0 = 0 ;
9297 0 : PyObject * obj1 = 0 ;
9298 0 : PyObject * obj2 = 0 ;
9299 0 : PyObject * obj3 = 0 ;
9300 0 : char * kwnames[] = {
9301 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9302 : };
9303 0 : OGRErr result;
9304 :
9305 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertIV", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9306 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9307 0 : if (!SWIG_IsOK(res1)) {
9308 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertIV" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9309 : }
9310 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9311 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9312 0 : if (!SWIG_IsOK(ecode2)) {
9313 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertIV" "', argument " "2"" of type '" "double""'");
9314 : }
9315 0 : arg2 = static_cast< double >(val2);
9316 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9317 0 : if (!SWIG_IsOK(ecode3)) {
9318 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertIV" "', argument " "3"" of type '" "double""'");
9319 : }
9320 0 : arg3 = static_cast< double >(val3);
9321 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9322 0 : if (!SWIG_IsOK(ecode4)) {
9323 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertIV" "', argument " "4"" of type '" "double""'");
9324 : }
9325 0 : arg4 = static_cast< double >(val4);
9326 0 : {
9327 0 : const int bLocalUseExceptions = GetUseExceptions();
9328 0 : if ( bLocalUseExceptions ) {
9329 0 : pushErrorHandler();
9330 : }
9331 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
9332 0 : if ( bLocalUseExceptions ) {
9333 0 : popErrorHandler();
9334 : }
9335 : #ifndef SED_HACKS
9336 : if ( bLocalUseExceptions ) {
9337 : CPLErr eclass = CPLGetLastErrorType();
9338 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9339 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9340 : }
9341 : }
9342 : #endif
9343 : }
9344 0 : {
9345 : /* %typemap(out) OGRErr */
9346 0 : if ( result != 0 && GetUseExceptions()) {
9347 0 : const char* pszMessage = CPLGetLastErrorMsg();
9348 0 : if( pszMessage[0] != '\0' )
9349 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9350 : else
9351 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9352 0 : SWIG_fail;
9353 : }
9354 : }
9355 0 : {
9356 : /* %typemap(ret) OGRErr */
9357 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9358 0 : resultobj = PyInt_FromLong( result );
9359 : }
9360 : }
9361 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9362 : return resultobj;
9363 : fail:
9364 : return NULL;
9365 : }
9366 :
9367 :
9368 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertVI(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9369 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9370 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9371 0 : double arg2 ;
9372 0 : double arg3 ;
9373 0 : double arg4 ;
9374 0 : void *argp1 = 0 ;
9375 0 : int res1 = 0 ;
9376 0 : double val2 ;
9377 0 : int ecode2 = 0 ;
9378 0 : double val3 ;
9379 0 : int ecode3 = 0 ;
9380 0 : double val4 ;
9381 0 : int ecode4 = 0 ;
9382 0 : PyObject * obj0 = 0 ;
9383 0 : PyObject * obj1 = 0 ;
9384 0 : PyObject * obj2 = 0 ;
9385 0 : PyObject * obj3 = 0 ;
9386 0 : char * kwnames[] = {
9387 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9388 : };
9389 0 : OGRErr result;
9390 :
9391 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertVI", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9392 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9393 0 : if (!SWIG_IsOK(res1)) {
9394 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertVI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9395 : }
9396 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9397 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9398 0 : if (!SWIG_IsOK(ecode2)) {
9399 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertVI" "', argument " "2"" of type '" "double""'");
9400 : }
9401 0 : arg2 = static_cast< double >(val2);
9402 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9403 0 : if (!SWIG_IsOK(ecode3)) {
9404 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertVI" "', argument " "3"" of type '" "double""'");
9405 : }
9406 0 : arg3 = static_cast< double >(val3);
9407 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9408 0 : if (!SWIG_IsOK(ecode4)) {
9409 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertVI" "', argument " "4"" of type '" "double""'");
9410 : }
9411 0 : arg4 = static_cast< double >(val4);
9412 0 : {
9413 0 : const int bLocalUseExceptions = GetUseExceptions();
9414 0 : if ( bLocalUseExceptions ) {
9415 0 : pushErrorHandler();
9416 : }
9417 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
9418 0 : if ( bLocalUseExceptions ) {
9419 0 : popErrorHandler();
9420 : }
9421 : #ifndef SED_HACKS
9422 : if ( bLocalUseExceptions ) {
9423 : CPLErr eclass = CPLGetLastErrorType();
9424 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9425 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9426 : }
9427 : }
9428 : #endif
9429 : }
9430 0 : {
9431 : /* %typemap(out) OGRErr */
9432 0 : if ( result != 0 && GetUseExceptions()) {
9433 0 : const char* pszMessage = CPLGetLastErrorMsg();
9434 0 : if( pszMessage[0] != '\0' )
9435 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9436 : else
9437 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9438 0 : SWIG_fail;
9439 : }
9440 : }
9441 0 : {
9442 : /* %typemap(ret) OGRErr */
9443 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9444 0 : resultobj = PyInt_FromLong( result );
9445 : }
9446 : }
9447 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9448 : return resultobj;
9449 : fail:
9450 : return NULL;
9451 : }
9452 :
9453 :
9454 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9455 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9456 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9457 0 : double arg2 ;
9458 0 : double arg3 ;
9459 0 : double arg4 ;
9460 0 : double arg5 ;
9461 0 : void *argp1 = 0 ;
9462 0 : int res1 = 0 ;
9463 0 : double val2 ;
9464 0 : int ecode2 = 0 ;
9465 0 : double val3 ;
9466 0 : int ecode3 = 0 ;
9467 0 : double val4 ;
9468 0 : int ecode4 = 0 ;
9469 0 : double val5 ;
9470 0 : int ecode5 = 0 ;
9471 0 : PyObject * obj0 = 0 ;
9472 0 : PyObject * obj1 = 0 ;
9473 0 : PyObject * obj2 = 0 ;
9474 0 : PyObject * obj3 = 0 ;
9475 0 : PyObject * obj4 = 0 ;
9476 0 : char * kwnames[] = {
9477 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9478 : };
9479 0 : OGRErr result;
9480 :
9481 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetEquirectangular", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9482 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9483 0 : if (!SWIG_IsOK(res1)) {
9484 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9485 : }
9486 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9487 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9488 0 : if (!SWIG_IsOK(ecode2)) {
9489 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular" "', argument " "2"" of type '" "double""'");
9490 : }
9491 0 : arg2 = static_cast< double >(val2);
9492 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9493 0 : if (!SWIG_IsOK(ecode3)) {
9494 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular" "', argument " "3"" of type '" "double""'");
9495 : }
9496 0 : arg3 = static_cast< double >(val3);
9497 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9498 0 : if (!SWIG_IsOK(ecode4)) {
9499 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular" "', argument " "4"" of type '" "double""'");
9500 : }
9501 0 : arg4 = static_cast< double >(val4);
9502 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9503 0 : if (!SWIG_IsOK(ecode5)) {
9504 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular" "', argument " "5"" of type '" "double""'");
9505 : }
9506 0 : arg5 = static_cast< double >(val5);
9507 0 : {
9508 0 : const int bLocalUseExceptions = GetUseExceptions();
9509 0 : if ( bLocalUseExceptions ) {
9510 0 : pushErrorHandler();
9511 : }
9512 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
9513 0 : if ( bLocalUseExceptions ) {
9514 0 : popErrorHandler();
9515 : }
9516 : #ifndef SED_HACKS
9517 : if ( bLocalUseExceptions ) {
9518 : CPLErr eclass = CPLGetLastErrorType();
9519 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9520 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9521 : }
9522 : }
9523 : #endif
9524 : }
9525 0 : {
9526 : /* %typemap(out) OGRErr */
9527 0 : if ( result != 0 && GetUseExceptions()) {
9528 0 : const char* pszMessage = CPLGetLastErrorMsg();
9529 0 : if( pszMessage[0] != '\0' )
9530 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9531 : else
9532 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9533 0 : SWIG_fail;
9534 : }
9535 : }
9536 0 : {
9537 : /* %typemap(ret) OGRErr */
9538 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9539 0 : resultobj = PyInt_FromLong( result );
9540 : }
9541 : }
9542 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9543 : return resultobj;
9544 : fail:
9545 : return NULL;
9546 : }
9547 :
9548 :
9549 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular2(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9550 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9551 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9552 3 : double arg2 ;
9553 3 : double arg3 ;
9554 3 : double arg4 ;
9555 3 : double arg5 ;
9556 3 : double arg6 ;
9557 3 : void *argp1 = 0 ;
9558 3 : int res1 = 0 ;
9559 3 : double val2 ;
9560 3 : int ecode2 = 0 ;
9561 3 : double val3 ;
9562 3 : int ecode3 = 0 ;
9563 3 : double val4 ;
9564 3 : int ecode4 = 0 ;
9565 3 : double val5 ;
9566 3 : int ecode5 = 0 ;
9567 3 : double val6 ;
9568 3 : int ecode6 = 0 ;
9569 3 : PyObject * obj0 = 0 ;
9570 3 : PyObject * obj1 = 0 ;
9571 3 : PyObject * obj2 = 0 ;
9572 3 : PyObject * obj3 = 0 ;
9573 3 : PyObject * obj4 = 0 ;
9574 3 : PyObject * obj5 = 0 ;
9575 3 : char * kwnames[] = {
9576 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"pseudostdparallellat", (char *)"fe", (char *)"fn", NULL
9577 : };
9578 3 : OGRErr result;
9579 :
9580 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetEquirectangular2", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9581 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9582 3 : if (!SWIG_IsOK(res1)) {
9583 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9584 : }
9585 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9586 3 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9587 3 : if (!SWIG_IsOK(ecode2)) {
9588 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "2"" of type '" "double""'");
9589 : }
9590 3 : arg2 = static_cast< double >(val2);
9591 3 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9592 3 : if (!SWIG_IsOK(ecode3)) {
9593 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "3"" of type '" "double""'");
9594 : }
9595 3 : arg3 = static_cast< double >(val3);
9596 3 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9597 3 : if (!SWIG_IsOK(ecode4)) {
9598 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "4"" of type '" "double""'");
9599 : }
9600 3 : arg4 = static_cast< double >(val4);
9601 3 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9602 3 : if (!SWIG_IsOK(ecode5)) {
9603 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "5"" of type '" "double""'");
9604 : }
9605 3 : arg5 = static_cast< double >(val5);
9606 3 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9607 3 : if (!SWIG_IsOK(ecode6)) {
9608 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "6"" of type '" "double""'");
9609 : }
9610 3 : arg6 = static_cast< double >(val6);
9611 3 : {
9612 3 : const int bLocalUseExceptions = GetUseExceptions();
9613 3 : if ( bLocalUseExceptions ) {
9614 3 : pushErrorHandler();
9615 : }
9616 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
9617 3 : if ( bLocalUseExceptions ) {
9618 3 : popErrorHandler();
9619 : }
9620 : #ifndef SED_HACKS
9621 : if ( bLocalUseExceptions ) {
9622 : CPLErr eclass = CPLGetLastErrorType();
9623 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9624 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9625 : }
9626 : }
9627 : #endif
9628 : }
9629 3 : {
9630 : /* %typemap(out) OGRErr */
9631 3 : if ( result != 0 && GetUseExceptions()) {
9632 0 : const char* pszMessage = CPLGetLastErrorMsg();
9633 0 : if( pszMessage[0] != '\0' )
9634 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9635 : else
9636 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9637 0 : SWIG_fail;
9638 : }
9639 : }
9640 3 : {
9641 : /* %typemap(ret) OGRErr */
9642 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9643 3 : resultobj = PyInt_FromLong( result );
9644 : }
9645 : }
9646 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9647 : return resultobj;
9648 : fail:
9649 : return NULL;
9650 : }
9651 :
9652 :
9653 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGaussSchreiberTMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9654 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9655 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9656 0 : double arg2 ;
9657 0 : double arg3 ;
9658 0 : double arg4 ;
9659 0 : double arg5 ;
9660 0 : double arg6 ;
9661 0 : void *argp1 = 0 ;
9662 0 : int res1 = 0 ;
9663 0 : double val2 ;
9664 0 : int ecode2 = 0 ;
9665 0 : double val3 ;
9666 0 : int ecode3 = 0 ;
9667 0 : double val4 ;
9668 0 : int ecode4 = 0 ;
9669 0 : double val5 ;
9670 0 : int ecode5 = 0 ;
9671 0 : double val6 ;
9672 0 : int ecode6 = 0 ;
9673 0 : PyObject * obj0 = 0 ;
9674 0 : PyObject * obj1 = 0 ;
9675 0 : PyObject * obj2 = 0 ;
9676 0 : PyObject * obj3 = 0 ;
9677 0 : PyObject * obj4 = 0 ;
9678 0 : PyObject * obj5 = 0 ;
9679 0 : char * kwnames[] = {
9680 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"sc", (char *)"fe", (char *)"fn", NULL
9681 : };
9682 0 : OGRErr result;
9683 :
9684 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetGaussSchreiberTMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9685 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9686 0 : if (!SWIG_IsOK(res1)) {
9687 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9688 : }
9689 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9690 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9691 0 : if (!SWIG_IsOK(ecode2)) {
9692 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "2"" of type '" "double""'");
9693 : }
9694 0 : arg2 = static_cast< double >(val2);
9695 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9696 0 : if (!SWIG_IsOK(ecode3)) {
9697 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "3"" of type '" "double""'");
9698 : }
9699 0 : arg3 = static_cast< double >(val3);
9700 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9701 0 : if (!SWIG_IsOK(ecode4)) {
9702 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "4"" of type '" "double""'");
9703 : }
9704 0 : arg4 = static_cast< double >(val4);
9705 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9706 0 : if (!SWIG_IsOK(ecode5)) {
9707 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "5"" of type '" "double""'");
9708 : }
9709 0 : arg5 = static_cast< double >(val5);
9710 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9711 0 : if (!SWIG_IsOK(ecode6)) {
9712 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "6"" of type '" "double""'");
9713 : }
9714 0 : arg6 = static_cast< double >(val6);
9715 0 : {
9716 0 : const int bLocalUseExceptions = GetUseExceptions();
9717 0 : if ( bLocalUseExceptions ) {
9718 0 : pushErrorHandler();
9719 : }
9720 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
9721 0 : if ( bLocalUseExceptions ) {
9722 0 : popErrorHandler();
9723 : }
9724 : #ifndef SED_HACKS
9725 : if ( bLocalUseExceptions ) {
9726 : CPLErr eclass = CPLGetLastErrorType();
9727 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9728 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9729 : }
9730 : }
9731 : #endif
9732 : }
9733 0 : {
9734 : /* %typemap(out) OGRErr */
9735 0 : if ( result != 0 && GetUseExceptions()) {
9736 0 : const char* pszMessage = CPLGetLastErrorMsg();
9737 0 : if( pszMessage[0] != '\0' )
9738 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9739 : else
9740 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9741 0 : SWIG_fail;
9742 : }
9743 : }
9744 0 : {
9745 : /* %typemap(ret) OGRErr */
9746 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9747 0 : resultobj = PyInt_FromLong( result );
9748 : }
9749 : }
9750 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9751 : return resultobj;
9752 : fail:
9753 : return NULL;
9754 : }
9755 :
9756 :
9757 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9758 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9759 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9760 1 : double arg2 ;
9761 1 : double arg3 ;
9762 1 : double arg4 ;
9763 1 : void *argp1 = 0 ;
9764 1 : int res1 = 0 ;
9765 1 : double val2 ;
9766 1 : int ecode2 = 0 ;
9767 1 : double val3 ;
9768 1 : int ecode3 = 0 ;
9769 1 : double val4 ;
9770 1 : int ecode4 = 0 ;
9771 1 : PyObject * obj0 = 0 ;
9772 1 : PyObject * obj1 = 0 ;
9773 1 : PyObject * obj2 = 0 ;
9774 1 : PyObject * obj3 = 0 ;
9775 1 : char * kwnames[] = {
9776 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9777 : };
9778 1 : OGRErr result;
9779 :
9780 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGS", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9781 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9782 1 : if (!SWIG_IsOK(res1)) {
9783 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9784 : }
9785 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9786 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9787 1 : if (!SWIG_IsOK(ecode2)) {
9788 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGS" "', argument " "2"" of type '" "double""'");
9789 : }
9790 1 : arg2 = static_cast< double >(val2);
9791 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9792 1 : if (!SWIG_IsOK(ecode3)) {
9793 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGS" "', argument " "3"" of type '" "double""'");
9794 : }
9795 1 : arg3 = static_cast< double >(val3);
9796 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9797 1 : if (!SWIG_IsOK(ecode4)) {
9798 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGS" "', argument " "4"" of type '" "double""'");
9799 : }
9800 1 : arg4 = static_cast< double >(val4);
9801 1 : {
9802 1 : const int bLocalUseExceptions = GetUseExceptions();
9803 1 : if ( bLocalUseExceptions ) {
9804 1 : pushErrorHandler();
9805 : }
9806 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
9807 1 : if ( bLocalUseExceptions ) {
9808 1 : popErrorHandler();
9809 : }
9810 : #ifndef SED_HACKS
9811 : if ( bLocalUseExceptions ) {
9812 : CPLErr eclass = CPLGetLastErrorType();
9813 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9814 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9815 : }
9816 : }
9817 : #endif
9818 : }
9819 1 : {
9820 : /* %typemap(out) OGRErr */
9821 1 : if ( result != 0 && GetUseExceptions()) {
9822 0 : const char* pszMessage = CPLGetLastErrorMsg();
9823 0 : if( pszMessage[0] != '\0' )
9824 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9825 : else
9826 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9827 0 : SWIG_fail;
9828 : }
9829 : }
9830 1 : {
9831 : /* %typemap(ret) OGRErr */
9832 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9833 1 : resultobj = PyInt_FromLong( result );
9834 : }
9835 : }
9836 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9837 : return resultobj;
9838 : fail:
9839 : return NULL;
9840 : }
9841 :
9842 :
9843 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9844 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9845 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9846 0 : double arg2 ;
9847 0 : double arg3 ;
9848 0 : double arg4 ;
9849 0 : void *argp1 = 0 ;
9850 0 : int res1 = 0 ;
9851 0 : double val2 ;
9852 0 : int ecode2 = 0 ;
9853 0 : double val3 ;
9854 0 : int ecode3 = 0 ;
9855 0 : double val4 ;
9856 0 : int ecode4 = 0 ;
9857 0 : PyObject * obj0 = 0 ;
9858 0 : PyObject * obj1 = 0 ;
9859 0 : PyObject * obj2 = 0 ;
9860 0 : PyObject * obj3 = 0 ;
9861 0 : char * kwnames[] = {
9862 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9863 : };
9864 0 : OGRErr result;
9865 :
9866 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGH", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9867 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9868 0 : if (!SWIG_IsOK(res1)) {
9869 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9870 : }
9871 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9872 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9873 0 : if (!SWIG_IsOK(ecode2)) {
9874 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGH" "', argument " "2"" of type '" "double""'");
9875 : }
9876 0 : arg2 = static_cast< double >(val2);
9877 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9878 0 : if (!SWIG_IsOK(ecode3)) {
9879 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGH" "', argument " "3"" of type '" "double""'");
9880 : }
9881 0 : arg3 = static_cast< double >(val3);
9882 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9883 0 : if (!SWIG_IsOK(ecode4)) {
9884 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGH" "', argument " "4"" of type '" "double""'");
9885 : }
9886 0 : arg4 = static_cast< double >(val4);
9887 0 : {
9888 0 : const int bLocalUseExceptions = GetUseExceptions();
9889 0 : if ( bLocalUseExceptions ) {
9890 0 : pushErrorHandler();
9891 : }
9892 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
9893 0 : if ( bLocalUseExceptions ) {
9894 0 : popErrorHandler();
9895 : }
9896 : #ifndef SED_HACKS
9897 : if ( bLocalUseExceptions ) {
9898 : CPLErr eclass = CPLGetLastErrorType();
9899 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9900 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9901 : }
9902 : }
9903 : #endif
9904 : }
9905 0 : {
9906 : /* %typemap(out) OGRErr */
9907 0 : if ( result != 0 && GetUseExceptions()) {
9908 0 : const char* pszMessage = CPLGetLastErrorMsg();
9909 0 : if( pszMessage[0] != '\0' )
9910 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9911 : else
9912 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9913 0 : SWIG_fail;
9914 : }
9915 : }
9916 0 : {
9917 : /* %typemap(ret) OGRErr */
9918 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9919 0 : resultobj = PyInt_FromLong( result );
9920 : }
9921 : }
9922 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9923 : return resultobj;
9924 : fail:
9925 : return NULL;
9926 : }
9927 :
9928 :
9929 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetIGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9930 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9931 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9932 0 : void *argp1 = 0 ;
9933 0 : int res1 = 0 ;
9934 0 : PyObject *swig_obj[1] ;
9935 0 : OGRErr result;
9936 :
9937 0 : if (!args) SWIG_fail;
9938 0 : swig_obj[0] = args;
9939 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9940 0 : if (!SWIG_IsOK(res1)) {
9941 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9942 : }
9943 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9944 0 : {
9945 0 : const int bLocalUseExceptions = GetUseExceptions();
9946 0 : if ( bLocalUseExceptions ) {
9947 0 : pushErrorHandler();
9948 : }
9949 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
9950 0 : if ( bLocalUseExceptions ) {
9951 0 : popErrorHandler();
9952 : }
9953 : #ifndef SED_HACKS
9954 : if ( bLocalUseExceptions ) {
9955 : CPLErr eclass = CPLGetLastErrorType();
9956 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9957 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9958 : }
9959 : }
9960 : #endif
9961 : }
9962 0 : {
9963 : /* %typemap(out) OGRErr */
9964 0 : if ( result != 0 && GetUseExceptions()) {
9965 0 : const char* pszMessage = CPLGetLastErrorMsg();
9966 0 : if( pszMessage[0] != '\0' )
9967 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9968 : else
9969 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9970 0 : SWIG_fail;
9971 : }
9972 : }
9973 0 : {
9974 : /* %typemap(ret) OGRErr */
9975 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9976 0 : resultobj = PyInt_FromLong( result );
9977 : }
9978 : }
9979 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9980 : return resultobj;
9981 : fail:
9982 : return NULL;
9983 : }
9984 :
9985 :
9986 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGEOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9987 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9988 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9989 0 : double arg2 ;
9990 0 : double arg3 ;
9991 0 : double arg4 ;
9992 0 : double arg5 ;
9993 0 : void *argp1 = 0 ;
9994 0 : int res1 = 0 ;
9995 0 : double val2 ;
9996 0 : int ecode2 = 0 ;
9997 0 : double val3 ;
9998 0 : int ecode3 = 0 ;
9999 0 : double val4 ;
10000 0 : int ecode4 = 0 ;
10001 0 : double val5 ;
10002 0 : int ecode5 = 0 ;
10003 0 : PyObject * obj0 = 0 ;
10004 0 : PyObject * obj1 = 0 ;
10005 0 : PyObject * obj2 = 0 ;
10006 0 : PyObject * obj3 = 0 ;
10007 0 : PyObject * obj4 = 0 ;
10008 0 : char * kwnames[] = {
10009 : (char *)"self", (char *)"cm", (char *)"satelliteheight", (char *)"fe", (char *)"fn", NULL
10010 : };
10011 0 : OGRErr result;
10012 :
10013 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGEOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10014 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10015 0 : if (!SWIG_IsOK(res1)) {
10016 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGEOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10017 : }
10018 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10019 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10020 0 : if (!SWIG_IsOK(ecode2)) {
10021 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGEOS" "', argument " "2"" of type '" "double""'");
10022 : }
10023 0 : arg2 = static_cast< double >(val2);
10024 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10025 0 : if (!SWIG_IsOK(ecode3)) {
10026 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGEOS" "', argument " "3"" of type '" "double""'");
10027 : }
10028 0 : arg3 = static_cast< double >(val3);
10029 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10030 0 : if (!SWIG_IsOK(ecode4)) {
10031 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGEOS" "', argument " "4"" of type '" "double""'");
10032 : }
10033 0 : arg4 = static_cast< double >(val4);
10034 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10035 0 : if (!SWIG_IsOK(ecode5)) {
10036 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGEOS" "', argument " "5"" of type '" "double""'");
10037 : }
10038 0 : arg5 = static_cast< double >(val5);
10039 0 : {
10040 0 : const int bLocalUseExceptions = GetUseExceptions();
10041 0 : if ( bLocalUseExceptions ) {
10042 0 : pushErrorHandler();
10043 : }
10044 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
10045 0 : if ( bLocalUseExceptions ) {
10046 0 : popErrorHandler();
10047 : }
10048 : #ifndef SED_HACKS
10049 : if ( bLocalUseExceptions ) {
10050 : CPLErr eclass = CPLGetLastErrorType();
10051 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10052 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10053 : }
10054 : }
10055 : #endif
10056 : }
10057 0 : {
10058 : /* %typemap(out) OGRErr */
10059 0 : if ( result != 0 && GetUseExceptions()) {
10060 0 : const char* pszMessage = CPLGetLastErrorMsg();
10061 0 : if( pszMessage[0] != '\0' )
10062 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10063 : else
10064 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10065 0 : SWIG_fail;
10066 : }
10067 : }
10068 0 : {
10069 : /* %typemap(ret) OGRErr */
10070 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10071 0 : resultobj = PyInt_FromLong( result );
10072 : }
10073 : }
10074 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10075 : return resultobj;
10076 : fail:
10077 : return NULL;
10078 : }
10079 :
10080 :
10081 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGnomonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10082 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10083 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10084 0 : double arg2 ;
10085 0 : double arg3 ;
10086 0 : double arg4 ;
10087 0 : double arg5 ;
10088 0 : void *argp1 = 0 ;
10089 0 : int res1 = 0 ;
10090 0 : double val2 ;
10091 0 : int ecode2 = 0 ;
10092 0 : double val3 ;
10093 0 : int ecode3 = 0 ;
10094 0 : double val4 ;
10095 0 : int ecode4 = 0 ;
10096 0 : double val5 ;
10097 0 : int ecode5 = 0 ;
10098 0 : PyObject * obj0 = 0 ;
10099 0 : PyObject * obj1 = 0 ;
10100 0 : PyObject * obj2 = 0 ;
10101 0 : PyObject * obj3 = 0 ;
10102 0 : PyObject * obj4 = 0 ;
10103 0 : char * kwnames[] = {
10104 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10105 : };
10106 0 : OGRErr result;
10107 :
10108 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGnomonic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10109 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10110 0 : if (!SWIG_IsOK(res1)) {
10111 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGnomonic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10112 : }
10113 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10114 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10115 0 : if (!SWIG_IsOK(ecode2)) {
10116 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGnomonic" "', argument " "2"" of type '" "double""'");
10117 : }
10118 0 : arg2 = static_cast< double >(val2);
10119 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10120 0 : if (!SWIG_IsOK(ecode3)) {
10121 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGnomonic" "', argument " "3"" of type '" "double""'");
10122 : }
10123 0 : arg3 = static_cast< double >(val3);
10124 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10125 0 : if (!SWIG_IsOK(ecode4)) {
10126 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGnomonic" "', argument " "4"" of type '" "double""'");
10127 : }
10128 0 : arg4 = static_cast< double >(val4);
10129 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10130 0 : if (!SWIG_IsOK(ecode5)) {
10131 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGnomonic" "', argument " "5"" of type '" "double""'");
10132 : }
10133 0 : arg5 = static_cast< double >(val5);
10134 0 : {
10135 0 : const int bLocalUseExceptions = GetUseExceptions();
10136 0 : if ( bLocalUseExceptions ) {
10137 0 : pushErrorHandler();
10138 : }
10139 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
10140 0 : if ( bLocalUseExceptions ) {
10141 0 : popErrorHandler();
10142 : }
10143 : #ifndef SED_HACKS
10144 : if ( bLocalUseExceptions ) {
10145 : CPLErr eclass = CPLGetLastErrorType();
10146 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10147 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10148 : }
10149 : }
10150 : #endif
10151 : }
10152 0 : {
10153 : /* %typemap(out) OGRErr */
10154 0 : if ( result != 0 && GetUseExceptions()) {
10155 0 : const char* pszMessage = CPLGetLastErrorMsg();
10156 0 : if( pszMessage[0] != '\0' )
10157 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10158 : else
10159 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10160 0 : SWIG_fail;
10161 : }
10162 : }
10163 0 : {
10164 : /* %typemap(ret) OGRErr */
10165 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10166 0 : resultobj = PyInt_FromLong( result );
10167 : }
10168 : }
10169 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10170 : return resultobj;
10171 : fail:
10172 : return NULL;
10173 : }
10174 :
10175 :
10176 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10177 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10178 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10179 0 : double arg2 ;
10180 0 : double arg3 ;
10181 0 : double arg4 ;
10182 0 : double arg5 ;
10183 0 : double arg6 ;
10184 0 : double arg7 ;
10185 0 : double arg8 ;
10186 0 : void *argp1 = 0 ;
10187 0 : int res1 = 0 ;
10188 0 : double val2 ;
10189 0 : int ecode2 = 0 ;
10190 0 : double val3 ;
10191 0 : int ecode3 = 0 ;
10192 0 : double val4 ;
10193 0 : int ecode4 = 0 ;
10194 0 : double val5 ;
10195 0 : int ecode5 = 0 ;
10196 0 : double val6 ;
10197 0 : int ecode6 = 0 ;
10198 0 : double val7 ;
10199 0 : int ecode7 = 0 ;
10200 0 : double val8 ;
10201 0 : int ecode8 = 0 ;
10202 0 : PyObject * obj0 = 0 ;
10203 0 : PyObject * obj1 = 0 ;
10204 0 : PyObject * obj2 = 0 ;
10205 0 : PyObject * obj3 = 0 ;
10206 0 : PyObject * obj4 = 0 ;
10207 0 : PyObject * obj5 = 0 ;
10208 0 : PyObject * obj6 = 0 ;
10209 0 : PyObject * obj7 = 0 ;
10210 0 : char * kwnames[] = {
10211 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"recttoskew", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10212 : };
10213 0 : OGRErr result;
10214 :
10215 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetHOM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10216 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10217 0 : if (!SWIG_IsOK(res1)) {
10218 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10219 : }
10220 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10221 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10222 0 : if (!SWIG_IsOK(ecode2)) {
10223 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM" "', argument " "2"" of type '" "double""'");
10224 : }
10225 0 : arg2 = static_cast< double >(val2);
10226 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10227 0 : if (!SWIG_IsOK(ecode3)) {
10228 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM" "', argument " "3"" of type '" "double""'");
10229 : }
10230 0 : arg3 = static_cast< double >(val3);
10231 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10232 0 : if (!SWIG_IsOK(ecode4)) {
10233 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM" "', argument " "4"" of type '" "double""'");
10234 : }
10235 0 : arg4 = static_cast< double >(val4);
10236 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10237 0 : if (!SWIG_IsOK(ecode5)) {
10238 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM" "', argument " "5"" of type '" "double""'");
10239 : }
10240 0 : arg5 = static_cast< double >(val5);
10241 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10242 0 : if (!SWIG_IsOK(ecode6)) {
10243 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM" "', argument " "6"" of type '" "double""'");
10244 : }
10245 0 : arg6 = static_cast< double >(val6);
10246 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10247 0 : if (!SWIG_IsOK(ecode7)) {
10248 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM" "', argument " "7"" of type '" "double""'");
10249 : }
10250 0 : arg7 = static_cast< double >(val7);
10251 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10252 0 : if (!SWIG_IsOK(ecode8)) {
10253 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM" "', argument " "8"" of type '" "double""'");
10254 : }
10255 0 : arg8 = static_cast< double >(val8);
10256 0 : {
10257 0 : const int bLocalUseExceptions = GetUseExceptions();
10258 0 : if ( bLocalUseExceptions ) {
10259 0 : pushErrorHandler();
10260 : }
10261 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10262 0 : if ( bLocalUseExceptions ) {
10263 0 : popErrorHandler();
10264 : }
10265 : #ifndef SED_HACKS
10266 : if ( bLocalUseExceptions ) {
10267 : CPLErr eclass = CPLGetLastErrorType();
10268 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10269 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10270 : }
10271 : }
10272 : #endif
10273 : }
10274 0 : {
10275 : /* %typemap(out) OGRErr */
10276 0 : if ( result != 0 && GetUseExceptions()) {
10277 0 : const char* pszMessage = CPLGetLastErrorMsg();
10278 0 : if( pszMessage[0] != '\0' )
10279 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10280 : else
10281 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10282 0 : SWIG_fail;
10283 : }
10284 : }
10285 0 : {
10286 : /* %typemap(ret) OGRErr */
10287 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10288 0 : resultobj = PyInt_FromLong( result );
10289 : }
10290 : }
10291 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10292 : return resultobj;
10293 : fail:
10294 : return NULL;
10295 : }
10296 :
10297 :
10298 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM2PNO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10299 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10300 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10301 0 : double arg2 ;
10302 0 : double arg3 ;
10303 0 : double arg4 ;
10304 0 : double arg5 ;
10305 0 : double arg6 ;
10306 0 : double arg7 ;
10307 0 : double arg8 ;
10308 0 : double arg9 ;
10309 0 : void *argp1 = 0 ;
10310 0 : int res1 = 0 ;
10311 0 : double val2 ;
10312 0 : int ecode2 = 0 ;
10313 0 : double val3 ;
10314 0 : int ecode3 = 0 ;
10315 0 : double val4 ;
10316 0 : int ecode4 = 0 ;
10317 0 : double val5 ;
10318 0 : int ecode5 = 0 ;
10319 0 : double val6 ;
10320 0 : int ecode6 = 0 ;
10321 0 : double val7 ;
10322 0 : int ecode7 = 0 ;
10323 0 : double val8 ;
10324 0 : int ecode8 = 0 ;
10325 0 : double val9 ;
10326 0 : int ecode9 = 0 ;
10327 0 : PyObject * obj0 = 0 ;
10328 0 : PyObject * obj1 = 0 ;
10329 0 : PyObject * obj2 = 0 ;
10330 0 : PyObject * obj3 = 0 ;
10331 0 : PyObject * obj4 = 0 ;
10332 0 : PyObject * obj5 = 0 ;
10333 0 : PyObject * obj6 = 0 ;
10334 0 : PyObject * obj7 = 0 ;
10335 0 : PyObject * obj8 = 0 ;
10336 0 : char * kwnames[] = {
10337 : (char *)"self", (char *)"clat", (char *)"dfLat1", (char *)"dfLong1", (char *)"dfLat2", (char *)"dfLong2", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10338 : };
10339 0 : OGRErr result;
10340 :
10341 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:SpatialReference_SetHOM2PNO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
10342 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10343 0 : if (!SWIG_IsOK(res1)) {
10344 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10345 : }
10346 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10347 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10348 0 : if (!SWIG_IsOK(ecode2)) {
10349 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "2"" of type '" "double""'");
10350 : }
10351 0 : arg2 = static_cast< double >(val2);
10352 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10353 0 : if (!SWIG_IsOK(ecode3)) {
10354 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "3"" of type '" "double""'");
10355 : }
10356 0 : arg3 = static_cast< double >(val3);
10357 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10358 0 : if (!SWIG_IsOK(ecode4)) {
10359 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "4"" of type '" "double""'");
10360 : }
10361 0 : arg4 = static_cast< double >(val4);
10362 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10363 0 : if (!SWIG_IsOK(ecode5)) {
10364 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "5"" of type '" "double""'");
10365 : }
10366 0 : arg5 = static_cast< double >(val5);
10367 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10368 0 : if (!SWIG_IsOK(ecode6)) {
10369 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "6"" of type '" "double""'");
10370 : }
10371 0 : arg6 = static_cast< double >(val6);
10372 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10373 0 : if (!SWIG_IsOK(ecode7)) {
10374 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "7"" of type '" "double""'");
10375 : }
10376 0 : arg7 = static_cast< double >(val7);
10377 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10378 0 : if (!SWIG_IsOK(ecode8)) {
10379 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "8"" of type '" "double""'");
10380 : }
10381 0 : arg8 = static_cast< double >(val8);
10382 0 : ecode9 = SWIG_AsVal_double(obj8, &val9);
10383 0 : if (!SWIG_IsOK(ecode9)) {
10384 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "9"" of type '" "double""'");
10385 : }
10386 0 : arg9 = static_cast< double >(val9);
10387 0 : {
10388 0 : const int bLocalUseExceptions = GetUseExceptions();
10389 0 : if ( bLocalUseExceptions ) {
10390 0 : pushErrorHandler();
10391 : }
10392 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
10393 0 : if ( bLocalUseExceptions ) {
10394 0 : popErrorHandler();
10395 : }
10396 : #ifndef SED_HACKS
10397 : if ( bLocalUseExceptions ) {
10398 : CPLErr eclass = CPLGetLastErrorType();
10399 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10400 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10401 : }
10402 : }
10403 : #endif
10404 : }
10405 0 : {
10406 : /* %typemap(out) OGRErr */
10407 0 : if ( result != 0 && GetUseExceptions()) {
10408 0 : const char* pszMessage = CPLGetLastErrorMsg();
10409 0 : if( pszMessage[0] != '\0' )
10410 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10411 : else
10412 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10413 0 : SWIG_fail;
10414 : }
10415 : }
10416 0 : {
10417 : /* %typemap(ret) OGRErr */
10418 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10419 0 : resultobj = PyInt_FromLong( result );
10420 : }
10421 : }
10422 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10423 : return resultobj;
10424 : fail:
10425 : return NULL;
10426 : }
10427 :
10428 :
10429 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetKrovak(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10430 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10431 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10432 0 : double arg2 ;
10433 0 : double arg3 ;
10434 0 : double arg4 ;
10435 0 : double arg5 ;
10436 0 : double arg6 ;
10437 0 : double arg7 ;
10438 0 : double arg8 ;
10439 0 : void *argp1 = 0 ;
10440 0 : int res1 = 0 ;
10441 0 : double val2 ;
10442 0 : int ecode2 = 0 ;
10443 0 : double val3 ;
10444 0 : int ecode3 = 0 ;
10445 0 : double val4 ;
10446 0 : int ecode4 = 0 ;
10447 0 : double val5 ;
10448 0 : int ecode5 = 0 ;
10449 0 : double val6 ;
10450 0 : int ecode6 = 0 ;
10451 0 : double val7 ;
10452 0 : int ecode7 = 0 ;
10453 0 : double val8 ;
10454 0 : int ecode8 = 0 ;
10455 0 : PyObject * obj0 = 0 ;
10456 0 : PyObject * obj1 = 0 ;
10457 0 : PyObject * obj2 = 0 ;
10458 0 : PyObject * obj3 = 0 ;
10459 0 : PyObject * obj4 = 0 ;
10460 0 : PyObject * obj5 = 0 ;
10461 0 : PyObject * obj6 = 0 ;
10462 0 : PyObject * obj7 = 0 ;
10463 0 : char * kwnames[] = {
10464 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"pseudostdparallellat", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10465 : };
10466 0 : OGRErr result;
10467 :
10468 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetKrovak", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10469 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10470 0 : if (!SWIG_IsOK(res1)) {
10471 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetKrovak" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10472 : }
10473 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10474 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10475 0 : if (!SWIG_IsOK(ecode2)) {
10476 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetKrovak" "', argument " "2"" of type '" "double""'");
10477 : }
10478 0 : arg2 = static_cast< double >(val2);
10479 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10480 0 : if (!SWIG_IsOK(ecode3)) {
10481 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetKrovak" "', argument " "3"" of type '" "double""'");
10482 : }
10483 0 : arg3 = static_cast< double >(val3);
10484 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10485 0 : if (!SWIG_IsOK(ecode4)) {
10486 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetKrovak" "', argument " "4"" of type '" "double""'");
10487 : }
10488 0 : arg4 = static_cast< double >(val4);
10489 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10490 0 : if (!SWIG_IsOK(ecode5)) {
10491 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetKrovak" "', argument " "5"" of type '" "double""'");
10492 : }
10493 0 : arg5 = static_cast< double >(val5);
10494 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10495 0 : if (!SWIG_IsOK(ecode6)) {
10496 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetKrovak" "', argument " "6"" of type '" "double""'");
10497 : }
10498 0 : arg6 = static_cast< double >(val6);
10499 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10500 0 : if (!SWIG_IsOK(ecode7)) {
10501 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetKrovak" "', argument " "7"" of type '" "double""'");
10502 : }
10503 0 : arg7 = static_cast< double >(val7);
10504 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10505 0 : if (!SWIG_IsOK(ecode8)) {
10506 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetKrovak" "', argument " "8"" of type '" "double""'");
10507 : }
10508 0 : arg8 = static_cast< double >(val8);
10509 0 : {
10510 0 : const int bLocalUseExceptions = GetUseExceptions();
10511 0 : if ( bLocalUseExceptions ) {
10512 0 : pushErrorHandler();
10513 : }
10514 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10515 0 : if ( bLocalUseExceptions ) {
10516 0 : popErrorHandler();
10517 : }
10518 : #ifndef SED_HACKS
10519 : if ( bLocalUseExceptions ) {
10520 : CPLErr eclass = CPLGetLastErrorType();
10521 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10522 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10523 : }
10524 : }
10525 : #endif
10526 : }
10527 0 : {
10528 : /* %typemap(out) OGRErr */
10529 0 : if ( result != 0 && GetUseExceptions()) {
10530 0 : const char* pszMessage = CPLGetLastErrorMsg();
10531 0 : if( pszMessage[0] != '\0' )
10532 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10533 : else
10534 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10535 0 : SWIG_fail;
10536 : }
10537 : }
10538 0 : {
10539 : /* %typemap(ret) OGRErr */
10540 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10541 0 : resultobj = PyInt_FromLong( result );
10542 : }
10543 : }
10544 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10545 : return resultobj;
10546 : fail:
10547 : return NULL;
10548 : }
10549 :
10550 :
10551 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLAEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10552 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10553 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10554 0 : double arg2 ;
10555 0 : double arg3 ;
10556 0 : double arg4 ;
10557 0 : double arg5 ;
10558 0 : void *argp1 = 0 ;
10559 0 : int res1 = 0 ;
10560 0 : double val2 ;
10561 0 : int ecode2 = 0 ;
10562 0 : double val3 ;
10563 0 : int ecode3 = 0 ;
10564 0 : double val4 ;
10565 0 : int ecode4 = 0 ;
10566 0 : double val5 ;
10567 0 : int ecode5 = 0 ;
10568 0 : PyObject * obj0 = 0 ;
10569 0 : PyObject * obj1 = 0 ;
10570 0 : PyObject * obj2 = 0 ;
10571 0 : PyObject * obj3 = 0 ;
10572 0 : PyObject * obj4 = 0 ;
10573 0 : char * kwnames[] = {
10574 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10575 : };
10576 0 : OGRErr result;
10577 :
10578 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetLAEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10579 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10580 0 : if (!SWIG_IsOK(res1)) {
10581 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLAEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10582 : }
10583 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10584 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10585 0 : if (!SWIG_IsOK(ecode2)) {
10586 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLAEA" "', argument " "2"" of type '" "double""'");
10587 : }
10588 0 : arg2 = static_cast< double >(val2);
10589 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10590 0 : if (!SWIG_IsOK(ecode3)) {
10591 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLAEA" "', argument " "3"" of type '" "double""'");
10592 : }
10593 0 : arg3 = static_cast< double >(val3);
10594 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10595 0 : if (!SWIG_IsOK(ecode4)) {
10596 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLAEA" "', argument " "4"" of type '" "double""'");
10597 : }
10598 0 : arg4 = static_cast< double >(val4);
10599 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10600 0 : if (!SWIG_IsOK(ecode5)) {
10601 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLAEA" "', argument " "5"" of type '" "double""'");
10602 : }
10603 0 : arg5 = static_cast< double >(val5);
10604 0 : {
10605 0 : const int bLocalUseExceptions = GetUseExceptions();
10606 0 : if ( bLocalUseExceptions ) {
10607 0 : pushErrorHandler();
10608 : }
10609 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
10610 0 : if ( bLocalUseExceptions ) {
10611 0 : popErrorHandler();
10612 : }
10613 : #ifndef SED_HACKS
10614 : if ( bLocalUseExceptions ) {
10615 : CPLErr eclass = CPLGetLastErrorType();
10616 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10617 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10618 : }
10619 : }
10620 : #endif
10621 : }
10622 0 : {
10623 : /* %typemap(out) OGRErr */
10624 0 : if ( result != 0 && GetUseExceptions()) {
10625 0 : const char* pszMessage = CPLGetLastErrorMsg();
10626 0 : if( pszMessage[0] != '\0' )
10627 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10628 : else
10629 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10630 0 : SWIG_fail;
10631 : }
10632 : }
10633 0 : {
10634 : /* %typemap(ret) OGRErr */
10635 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10636 0 : resultobj = PyInt_FromLong( result );
10637 : }
10638 : }
10639 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10640 : return resultobj;
10641 : fail:
10642 : return NULL;
10643 : }
10644 :
10645 :
10646 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10647 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10648 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10649 1 : double arg2 ;
10650 1 : double arg3 ;
10651 1 : double arg4 ;
10652 1 : double arg5 ;
10653 1 : double arg6 ;
10654 1 : double arg7 ;
10655 1 : void *argp1 = 0 ;
10656 1 : int res1 = 0 ;
10657 1 : double val2 ;
10658 1 : int ecode2 = 0 ;
10659 1 : double val3 ;
10660 1 : int ecode3 = 0 ;
10661 1 : double val4 ;
10662 1 : int ecode4 = 0 ;
10663 1 : double val5 ;
10664 1 : int ecode5 = 0 ;
10665 1 : double val6 ;
10666 1 : int ecode6 = 0 ;
10667 1 : double val7 ;
10668 1 : int ecode7 = 0 ;
10669 1 : PyObject * obj0 = 0 ;
10670 1 : PyObject * obj1 = 0 ;
10671 1 : PyObject * obj2 = 0 ;
10672 1 : PyObject * obj3 = 0 ;
10673 1 : PyObject * obj4 = 0 ;
10674 1 : PyObject * obj5 = 0 ;
10675 1 : PyObject * obj6 = 0 ;
10676 1 : char * kwnames[] = {
10677 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10678 : };
10679 1 : OGRErr result;
10680 :
10681 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10682 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10683 1 : if (!SWIG_IsOK(res1)) {
10684 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10685 : }
10686 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10687 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10688 1 : if (!SWIG_IsOK(ecode2)) {
10689 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC" "', argument " "2"" of type '" "double""'");
10690 : }
10691 1 : arg2 = static_cast< double >(val2);
10692 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10693 1 : if (!SWIG_IsOK(ecode3)) {
10694 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC" "', argument " "3"" of type '" "double""'");
10695 : }
10696 1 : arg3 = static_cast< double >(val3);
10697 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10698 1 : if (!SWIG_IsOK(ecode4)) {
10699 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC" "', argument " "4"" of type '" "double""'");
10700 : }
10701 1 : arg4 = static_cast< double >(val4);
10702 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10703 1 : if (!SWIG_IsOK(ecode5)) {
10704 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC" "', argument " "5"" of type '" "double""'");
10705 : }
10706 1 : arg5 = static_cast< double >(val5);
10707 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10708 1 : if (!SWIG_IsOK(ecode6)) {
10709 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC" "', argument " "6"" of type '" "double""'");
10710 : }
10711 1 : arg6 = static_cast< double >(val6);
10712 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10713 1 : if (!SWIG_IsOK(ecode7)) {
10714 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCC" "', argument " "7"" of type '" "double""'");
10715 : }
10716 1 : arg7 = static_cast< double >(val7);
10717 1 : {
10718 1 : const int bLocalUseExceptions = GetUseExceptions();
10719 1 : if ( bLocalUseExceptions ) {
10720 1 : pushErrorHandler();
10721 : }
10722 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10723 1 : if ( bLocalUseExceptions ) {
10724 1 : popErrorHandler();
10725 : }
10726 : #ifndef SED_HACKS
10727 : if ( bLocalUseExceptions ) {
10728 : CPLErr eclass = CPLGetLastErrorType();
10729 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10730 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10731 : }
10732 : }
10733 : #endif
10734 : }
10735 1 : {
10736 : /* %typemap(out) OGRErr */
10737 1 : if ( result != 0 && GetUseExceptions()) {
10738 0 : const char* pszMessage = CPLGetLastErrorMsg();
10739 0 : if( pszMessage[0] != '\0' )
10740 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10741 : else
10742 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10743 0 : SWIG_fail;
10744 : }
10745 : }
10746 1 : {
10747 : /* %typemap(ret) OGRErr */
10748 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10749 1 : resultobj = PyInt_FromLong( result );
10750 : }
10751 : }
10752 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10753 : return resultobj;
10754 : fail:
10755 : return NULL;
10756 : }
10757 :
10758 :
10759 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC1SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10760 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10761 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10762 0 : double arg2 ;
10763 0 : double arg3 ;
10764 0 : double arg4 ;
10765 0 : double arg5 ;
10766 0 : double arg6 ;
10767 0 : void *argp1 = 0 ;
10768 0 : int res1 = 0 ;
10769 0 : double val2 ;
10770 0 : int ecode2 = 0 ;
10771 0 : double val3 ;
10772 0 : int ecode3 = 0 ;
10773 0 : double val4 ;
10774 0 : int ecode4 = 0 ;
10775 0 : double val5 ;
10776 0 : int ecode5 = 0 ;
10777 0 : double val6 ;
10778 0 : int ecode6 = 0 ;
10779 0 : PyObject * obj0 = 0 ;
10780 0 : PyObject * obj1 = 0 ;
10781 0 : PyObject * obj2 = 0 ;
10782 0 : PyObject * obj3 = 0 ;
10783 0 : PyObject * obj4 = 0 ;
10784 0 : PyObject * obj5 = 0 ;
10785 0 : char * kwnames[] = {
10786 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10787 : };
10788 0 : OGRErr result;
10789 :
10790 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetLCC1SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
10791 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10792 0 : if (!SWIG_IsOK(res1)) {
10793 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC1SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10794 : }
10795 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10796 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10797 0 : if (!SWIG_IsOK(ecode2)) {
10798 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC1SP" "', argument " "2"" of type '" "double""'");
10799 : }
10800 0 : arg2 = static_cast< double >(val2);
10801 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10802 0 : if (!SWIG_IsOK(ecode3)) {
10803 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC1SP" "', argument " "3"" of type '" "double""'");
10804 : }
10805 0 : arg3 = static_cast< double >(val3);
10806 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10807 0 : if (!SWIG_IsOK(ecode4)) {
10808 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC1SP" "', argument " "4"" of type '" "double""'");
10809 : }
10810 0 : arg4 = static_cast< double >(val4);
10811 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10812 0 : if (!SWIG_IsOK(ecode5)) {
10813 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC1SP" "', argument " "5"" of type '" "double""'");
10814 : }
10815 0 : arg5 = static_cast< double >(val5);
10816 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10817 0 : if (!SWIG_IsOK(ecode6)) {
10818 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC1SP" "', argument " "6"" of type '" "double""'");
10819 : }
10820 0 : arg6 = static_cast< double >(val6);
10821 0 : {
10822 0 : const int bLocalUseExceptions = GetUseExceptions();
10823 0 : if ( bLocalUseExceptions ) {
10824 0 : pushErrorHandler();
10825 : }
10826 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
10827 0 : if ( bLocalUseExceptions ) {
10828 0 : popErrorHandler();
10829 : }
10830 : #ifndef SED_HACKS
10831 : if ( bLocalUseExceptions ) {
10832 : CPLErr eclass = CPLGetLastErrorType();
10833 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10834 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10835 : }
10836 : }
10837 : #endif
10838 : }
10839 0 : {
10840 : /* %typemap(out) OGRErr */
10841 0 : if ( result != 0 && GetUseExceptions()) {
10842 0 : const char* pszMessage = CPLGetLastErrorMsg();
10843 0 : if( pszMessage[0] != '\0' )
10844 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10845 : else
10846 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10847 0 : SWIG_fail;
10848 : }
10849 : }
10850 0 : {
10851 : /* %typemap(ret) OGRErr */
10852 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10853 0 : resultobj = PyInt_FromLong( result );
10854 : }
10855 : }
10856 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10857 : return resultobj;
10858 : fail:
10859 : return NULL;
10860 : }
10861 :
10862 :
10863 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCCB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10864 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10865 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10866 0 : double arg2 ;
10867 0 : double arg3 ;
10868 0 : double arg4 ;
10869 0 : double arg5 ;
10870 0 : double arg6 ;
10871 0 : double arg7 ;
10872 0 : void *argp1 = 0 ;
10873 0 : int res1 = 0 ;
10874 0 : double val2 ;
10875 0 : int ecode2 = 0 ;
10876 0 : double val3 ;
10877 0 : int ecode3 = 0 ;
10878 0 : double val4 ;
10879 0 : int ecode4 = 0 ;
10880 0 : double val5 ;
10881 0 : int ecode5 = 0 ;
10882 0 : double val6 ;
10883 0 : int ecode6 = 0 ;
10884 0 : double val7 ;
10885 0 : int ecode7 = 0 ;
10886 0 : PyObject * obj0 = 0 ;
10887 0 : PyObject * obj1 = 0 ;
10888 0 : PyObject * obj2 = 0 ;
10889 0 : PyObject * obj3 = 0 ;
10890 0 : PyObject * obj4 = 0 ;
10891 0 : PyObject * obj5 = 0 ;
10892 0 : PyObject * obj6 = 0 ;
10893 0 : char * kwnames[] = {
10894 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10895 : };
10896 0 : OGRErr result;
10897 :
10898 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCCB", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10899 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10900 0 : if (!SWIG_IsOK(res1)) {
10901 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCCB" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10902 : }
10903 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10904 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10905 0 : if (!SWIG_IsOK(ecode2)) {
10906 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCCB" "', argument " "2"" of type '" "double""'");
10907 : }
10908 0 : arg2 = static_cast< double >(val2);
10909 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10910 0 : if (!SWIG_IsOK(ecode3)) {
10911 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCCB" "', argument " "3"" of type '" "double""'");
10912 : }
10913 0 : arg3 = static_cast< double >(val3);
10914 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10915 0 : if (!SWIG_IsOK(ecode4)) {
10916 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCCB" "', argument " "4"" of type '" "double""'");
10917 : }
10918 0 : arg4 = static_cast< double >(val4);
10919 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10920 0 : if (!SWIG_IsOK(ecode5)) {
10921 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCCB" "', argument " "5"" of type '" "double""'");
10922 : }
10923 0 : arg5 = static_cast< double >(val5);
10924 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10925 0 : if (!SWIG_IsOK(ecode6)) {
10926 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCCB" "', argument " "6"" of type '" "double""'");
10927 : }
10928 0 : arg6 = static_cast< double >(val6);
10929 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10930 0 : if (!SWIG_IsOK(ecode7)) {
10931 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCCB" "', argument " "7"" of type '" "double""'");
10932 : }
10933 0 : arg7 = static_cast< double >(val7);
10934 0 : {
10935 0 : const int bLocalUseExceptions = GetUseExceptions();
10936 0 : if ( bLocalUseExceptions ) {
10937 0 : pushErrorHandler();
10938 : }
10939 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10940 0 : if ( bLocalUseExceptions ) {
10941 0 : popErrorHandler();
10942 : }
10943 : #ifndef SED_HACKS
10944 : if ( bLocalUseExceptions ) {
10945 : CPLErr eclass = CPLGetLastErrorType();
10946 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10947 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10948 : }
10949 : }
10950 : #endif
10951 : }
10952 0 : {
10953 : /* %typemap(out) OGRErr */
10954 0 : if ( result != 0 && GetUseExceptions()) {
10955 0 : const char* pszMessage = CPLGetLastErrorMsg();
10956 0 : if( pszMessage[0] != '\0' )
10957 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10958 : else
10959 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10960 0 : SWIG_fail;
10961 : }
10962 : }
10963 0 : {
10964 : /* %typemap(ret) OGRErr */
10965 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10966 0 : resultobj = PyInt_FromLong( result );
10967 : }
10968 : }
10969 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10970 : return resultobj;
10971 : fail:
10972 : return NULL;
10973 : }
10974 :
10975 :
10976 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10977 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10978 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10979 0 : double arg2 ;
10980 0 : double arg3 ;
10981 0 : double arg4 ;
10982 0 : double arg5 ;
10983 0 : void *argp1 = 0 ;
10984 0 : int res1 = 0 ;
10985 0 : double val2 ;
10986 0 : int ecode2 = 0 ;
10987 0 : double val3 ;
10988 0 : int ecode3 = 0 ;
10989 0 : double val4 ;
10990 0 : int ecode4 = 0 ;
10991 0 : double val5 ;
10992 0 : int ecode5 = 0 ;
10993 0 : PyObject * obj0 = 0 ;
10994 0 : PyObject * obj1 = 0 ;
10995 0 : PyObject * obj2 = 0 ;
10996 0 : PyObject * obj3 = 0 ;
10997 0 : PyObject * obj4 = 0 ;
10998 0 : char * kwnames[] = {
10999 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11000 : };
11001 0 : OGRErr result;
11002 :
11003 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetMC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11004 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11005 0 : if (!SWIG_IsOK(res1)) {
11006 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11007 : }
11008 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11009 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11010 0 : if (!SWIG_IsOK(ecode2)) {
11011 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMC" "', argument " "2"" of type '" "double""'");
11012 : }
11013 0 : arg2 = static_cast< double >(val2);
11014 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11015 0 : if (!SWIG_IsOK(ecode3)) {
11016 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMC" "', argument " "3"" of type '" "double""'");
11017 : }
11018 0 : arg3 = static_cast< double >(val3);
11019 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11020 0 : if (!SWIG_IsOK(ecode4)) {
11021 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMC" "', argument " "4"" of type '" "double""'");
11022 : }
11023 0 : arg4 = static_cast< double >(val4);
11024 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11025 0 : if (!SWIG_IsOK(ecode5)) {
11026 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMC" "', argument " "5"" of type '" "double""'");
11027 : }
11028 0 : arg5 = static_cast< double >(val5);
11029 0 : {
11030 0 : const int bLocalUseExceptions = GetUseExceptions();
11031 0 : if ( bLocalUseExceptions ) {
11032 0 : pushErrorHandler();
11033 : }
11034 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
11035 0 : if ( bLocalUseExceptions ) {
11036 0 : popErrorHandler();
11037 : }
11038 : #ifndef SED_HACKS
11039 : if ( bLocalUseExceptions ) {
11040 : CPLErr eclass = CPLGetLastErrorType();
11041 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11042 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11043 : }
11044 : }
11045 : #endif
11046 : }
11047 0 : {
11048 : /* %typemap(out) OGRErr */
11049 0 : if ( result != 0 && GetUseExceptions()) {
11050 0 : const char* pszMessage = CPLGetLastErrorMsg();
11051 0 : if( pszMessage[0] != '\0' )
11052 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11053 : else
11054 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11055 0 : SWIG_fail;
11056 : }
11057 : }
11058 0 : {
11059 : /* %typemap(ret) OGRErr */
11060 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11061 0 : resultobj = PyInt_FromLong( result );
11062 : }
11063 : }
11064 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11065 : return resultobj;
11066 : fail:
11067 : return NULL;
11068 : }
11069 :
11070 :
11071 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11072 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11073 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11074 2 : double arg2 ;
11075 2 : double arg3 ;
11076 2 : double arg4 ;
11077 2 : double arg5 ;
11078 2 : double arg6 ;
11079 2 : void *argp1 = 0 ;
11080 2 : int res1 = 0 ;
11081 2 : double val2 ;
11082 2 : int ecode2 = 0 ;
11083 2 : double val3 ;
11084 2 : int ecode3 = 0 ;
11085 2 : double val4 ;
11086 2 : int ecode4 = 0 ;
11087 2 : double val5 ;
11088 2 : int ecode5 = 0 ;
11089 2 : double val6 ;
11090 2 : int ecode6 = 0 ;
11091 2 : PyObject * obj0 = 0 ;
11092 2 : PyObject * obj1 = 0 ;
11093 2 : PyObject * obj2 = 0 ;
11094 2 : PyObject * obj3 = 0 ;
11095 2 : PyObject * obj4 = 0 ;
11096 2 : PyObject * obj5 = 0 ;
11097 2 : char * kwnames[] = {
11098 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11099 : };
11100 2 : OGRErr result;
11101 :
11102 2 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11103 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11104 2 : if (!SWIG_IsOK(res1)) {
11105 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11106 : }
11107 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11108 2 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11109 2 : if (!SWIG_IsOK(ecode2)) {
11110 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator" "', argument " "2"" of type '" "double""'");
11111 : }
11112 2 : arg2 = static_cast< double >(val2);
11113 2 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11114 2 : if (!SWIG_IsOK(ecode3)) {
11115 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator" "', argument " "3"" of type '" "double""'");
11116 : }
11117 2 : arg3 = static_cast< double >(val3);
11118 2 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11119 2 : if (!SWIG_IsOK(ecode4)) {
11120 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator" "', argument " "4"" of type '" "double""'");
11121 : }
11122 2 : arg4 = static_cast< double >(val4);
11123 2 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11124 2 : if (!SWIG_IsOK(ecode5)) {
11125 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator" "', argument " "5"" of type '" "double""'");
11126 : }
11127 2 : arg5 = static_cast< double >(val5);
11128 2 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11129 2 : if (!SWIG_IsOK(ecode6)) {
11130 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator" "', argument " "6"" of type '" "double""'");
11131 : }
11132 2 : arg6 = static_cast< double >(val6);
11133 2 : {
11134 2 : const int bLocalUseExceptions = GetUseExceptions();
11135 2 : if ( bLocalUseExceptions ) {
11136 2 : pushErrorHandler();
11137 : }
11138 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
11139 2 : if ( bLocalUseExceptions ) {
11140 2 : popErrorHandler();
11141 : }
11142 : #ifndef SED_HACKS
11143 : if ( bLocalUseExceptions ) {
11144 : CPLErr eclass = CPLGetLastErrorType();
11145 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11146 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11147 : }
11148 : }
11149 : #endif
11150 : }
11151 2 : {
11152 : /* %typemap(out) OGRErr */
11153 2 : if ( result != 0 && GetUseExceptions()) {
11154 0 : const char* pszMessage = CPLGetLastErrorMsg();
11155 0 : if( pszMessage[0] != '\0' )
11156 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11157 : else
11158 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11159 0 : SWIG_fail;
11160 : }
11161 : }
11162 2 : {
11163 : /* %typemap(ret) OGRErr */
11164 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11165 2 : resultobj = PyInt_FromLong( result );
11166 : }
11167 : }
11168 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11169 : return resultobj;
11170 : fail:
11171 : return NULL;
11172 : }
11173 :
11174 :
11175 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator2SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11176 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11177 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11178 1 : double arg2 ;
11179 1 : double arg3 ;
11180 1 : double arg4 ;
11181 1 : double arg5 ;
11182 1 : double arg6 ;
11183 1 : void *argp1 = 0 ;
11184 1 : int res1 = 0 ;
11185 1 : double val2 ;
11186 1 : int ecode2 = 0 ;
11187 1 : double val3 ;
11188 1 : int ecode3 = 0 ;
11189 1 : double val4 ;
11190 1 : int ecode4 = 0 ;
11191 1 : double val5 ;
11192 1 : int ecode5 = 0 ;
11193 1 : double val6 ;
11194 1 : int ecode6 = 0 ;
11195 1 : PyObject * obj0 = 0 ;
11196 1 : PyObject * obj1 = 0 ;
11197 1 : PyObject * obj2 = 0 ;
11198 1 : PyObject * obj3 = 0 ;
11199 1 : PyObject * obj4 = 0 ;
11200 1 : PyObject * obj5 = 0 ;
11201 1 : char * kwnames[] = {
11202 : (char *)"self", (char *)"stdp1", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11203 : };
11204 1 : OGRErr result;
11205 :
11206 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator2SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11207 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11208 1 : if (!SWIG_IsOK(res1)) {
11209 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator2SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11210 : }
11211 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11212 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11213 1 : if (!SWIG_IsOK(ecode2)) {
11214 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator2SP" "', argument " "2"" of type '" "double""'");
11215 : }
11216 1 : arg2 = static_cast< double >(val2);
11217 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11218 1 : if (!SWIG_IsOK(ecode3)) {
11219 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator2SP" "', argument " "3"" of type '" "double""'");
11220 : }
11221 1 : arg3 = static_cast< double >(val3);
11222 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11223 1 : if (!SWIG_IsOK(ecode4)) {
11224 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator2SP" "', argument " "4"" of type '" "double""'");
11225 : }
11226 1 : arg4 = static_cast< double >(val4);
11227 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11228 1 : if (!SWIG_IsOK(ecode5)) {
11229 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator2SP" "', argument " "5"" of type '" "double""'");
11230 : }
11231 1 : arg5 = static_cast< double >(val5);
11232 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11233 1 : if (!SWIG_IsOK(ecode6)) {
11234 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator2SP" "', argument " "6"" of type '" "double""'");
11235 : }
11236 1 : arg6 = static_cast< double >(val6);
11237 1 : {
11238 1 : const int bLocalUseExceptions = GetUseExceptions();
11239 1 : if ( bLocalUseExceptions ) {
11240 1 : pushErrorHandler();
11241 : }
11242 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator2SP(arg1,arg2,arg3,arg4,arg5,arg6);
11243 1 : if ( bLocalUseExceptions ) {
11244 1 : popErrorHandler();
11245 : }
11246 : #ifndef SED_HACKS
11247 : if ( bLocalUseExceptions ) {
11248 : CPLErr eclass = CPLGetLastErrorType();
11249 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11250 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11251 : }
11252 : }
11253 : #endif
11254 : }
11255 1 : {
11256 : /* %typemap(out) OGRErr */
11257 1 : if ( result != 0 && GetUseExceptions()) {
11258 0 : const char* pszMessage = CPLGetLastErrorMsg();
11259 0 : if( pszMessage[0] != '\0' )
11260 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11261 : else
11262 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11263 0 : SWIG_fail;
11264 : }
11265 : }
11266 1 : {
11267 : /* %typemap(ret) OGRErr */
11268 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11269 1 : resultobj = PyInt_FromLong( result );
11270 : }
11271 : }
11272 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11273 : return resultobj;
11274 : fail:
11275 : return NULL;
11276 : }
11277 :
11278 :
11279 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMollweide(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11280 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11281 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11282 0 : double arg2 ;
11283 0 : double arg3 ;
11284 0 : double arg4 ;
11285 0 : void *argp1 = 0 ;
11286 0 : int res1 = 0 ;
11287 0 : double val2 ;
11288 0 : int ecode2 = 0 ;
11289 0 : double val3 ;
11290 0 : int ecode3 = 0 ;
11291 0 : double val4 ;
11292 0 : int ecode4 = 0 ;
11293 0 : PyObject * obj0 = 0 ;
11294 0 : PyObject * obj1 = 0 ;
11295 0 : PyObject * obj2 = 0 ;
11296 0 : PyObject * obj3 = 0 ;
11297 0 : char * kwnames[] = {
11298 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
11299 : };
11300 0 : OGRErr result;
11301 :
11302 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetMollweide", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11303 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11304 0 : if (!SWIG_IsOK(res1)) {
11305 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMollweide" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11306 : }
11307 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11308 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11309 0 : if (!SWIG_IsOK(ecode2)) {
11310 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMollweide" "', argument " "2"" of type '" "double""'");
11311 : }
11312 0 : arg2 = static_cast< double >(val2);
11313 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11314 0 : if (!SWIG_IsOK(ecode3)) {
11315 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMollweide" "', argument " "3"" of type '" "double""'");
11316 : }
11317 0 : arg3 = static_cast< double >(val3);
11318 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11319 0 : if (!SWIG_IsOK(ecode4)) {
11320 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMollweide" "', argument " "4"" of type '" "double""'");
11321 : }
11322 0 : arg4 = static_cast< double >(val4);
11323 0 : {
11324 0 : const int bLocalUseExceptions = GetUseExceptions();
11325 0 : if ( bLocalUseExceptions ) {
11326 0 : pushErrorHandler();
11327 : }
11328 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
11329 0 : if ( bLocalUseExceptions ) {
11330 0 : popErrorHandler();
11331 : }
11332 : #ifndef SED_HACKS
11333 : if ( bLocalUseExceptions ) {
11334 : CPLErr eclass = CPLGetLastErrorType();
11335 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11336 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11337 : }
11338 : }
11339 : #endif
11340 : }
11341 0 : {
11342 : /* %typemap(out) OGRErr */
11343 0 : if ( result != 0 && GetUseExceptions()) {
11344 0 : const char* pszMessage = CPLGetLastErrorMsg();
11345 0 : if( pszMessage[0] != '\0' )
11346 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11347 : else
11348 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11349 0 : SWIG_fail;
11350 : }
11351 : }
11352 0 : {
11353 : /* %typemap(ret) OGRErr */
11354 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11355 0 : resultobj = PyInt_FromLong( result );
11356 : }
11357 : }
11358 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11359 : return resultobj;
11360 : fail:
11361 : return NULL;
11362 : }
11363 :
11364 :
11365 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNZMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11366 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11367 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11368 0 : double arg2 ;
11369 0 : double arg3 ;
11370 0 : double arg4 ;
11371 0 : double arg5 ;
11372 0 : void *argp1 = 0 ;
11373 0 : int res1 = 0 ;
11374 0 : double val2 ;
11375 0 : int ecode2 = 0 ;
11376 0 : double val3 ;
11377 0 : int ecode3 = 0 ;
11378 0 : double val4 ;
11379 0 : int ecode4 = 0 ;
11380 0 : double val5 ;
11381 0 : int ecode5 = 0 ;
11382 0 : PyObject * obj0 = 0 ;
11383 0 : PyObject * obj1 = 0 ;
11384 0 : PyObject * obj2 = 0 ;
11385 0 : PyObject * obj3 = 0 ;
11386 0 : PyObject * obj4 = 0 ;
11387 0 : char * kwnames[] = {
11388 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11389 : };
11390 0 : OGRErr result;
11391 :
11392 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetNZMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11393 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11394 0 : if (!SWIG_IsOK(res1)) {
11395 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNZMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11396 : }
11397 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11398 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11399 0 : if (!SWIG_IsOK(ecode2)) {
11400 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetNZMG" "', argument " "2"" of type '" "double""'");
11401 : }
11402 0 : arg2 = static_cast< double >(val2);
11403 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11404 0 : if (!SWIG_IsOK(ecode3)) {
11405 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNZMG" "', argument " "3"" of type '" "double""'");
11406 : }
11407 0 : arg3 = static_cast< double >(val3);
11408 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11409 0 : if (!SWIG_IsOK(ecode4)) {
11410 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetNZMG" "', argument " "4"" of type '" "double""'");
11411 : }
11412 0 : arg4 = static_cast< double >(val4);
11413 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11414 0 : if (!SWIG_IsOK(ecode5)) {
11415 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetNZMG" "', argument " "5"" of type '" "double""'");
11416 : }
11417 0 : arg5 = static_cast< double >(val5);
11418 0 : {
11419 0 : const int bLocalUseExceptions = GetUseExceptions();
11420 0 : if ( bLocalUseExceptions ) {
11421 0 : pushErrorHandler();
11422 : }
11423 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
11424 0 : if ( bLocalUseExceptions ) {
11425 0 : popErrorHandler();
11426 : }
11427 : #ifndef SED_HACKS
11428 : if ( bLocalUseExceptions ) {
11429 : CPLErr eclass = CPLGetLastErrorType();
11430 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11431 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11432 : }
11433 : }
11434 : #endif
11435 : }
11436 0 : {
11437 : /* %typemap(out) OGRErr */
11438 0 : if ( result != 0 && GetUseExceptions()) {
11439 0 : const char* pszMessage = CPLGetLastErrorMsg();
11440 0 : if( pszMessage[0] != '\0' )
11441 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11442 : else
11443 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11444 0 : SWIG_fail;
11445 : }
11446 : }
11447 0 : {
11448 : /* %typemap(ret) OGRErr */
11449 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11450 0 : resultobj = PyInt_FromLong( result );
11451 : }
11452 : }
11453 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11454 : return resultobj;
11455 : fail:
11456 : return NULL;
11457 : }
11458 :
11459 :
11460 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11461 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11462 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11463 0 : double arg2 ;
11464 0 : double arg3 ;
11465 0 : double arg4 ;
11466 0 : double arg5 ;
11467 0 : double arg6 ;
11468 0 : void *argp1 = 0 ;
11469 0 : int res1 = 0 ;
11470 0 : double val2 ;
11471 0 : int ecode2 = 0 ;
11472 0 : double val3 ;
11473 0 : int ecode3 = 0 ;
11474 0 : double val4 ;
11475 0 : int ecode4 = 0 ;
11476 0 : double val5 ;
11477 0 : int ecode5 = 0 ;
11478 0 : double val6 ;
11479 0 : int ecode6 = 0 ;
11480 0 : PyObject * obj0 = 0 ;
11481 0 : PyObject * obj1 = 0 ;
11482 0 : PyObject * obj2 = 0 ;
11483 0 : PyObject * obj3 = 0 ;
11484 0 : PyObject * obj4 = 0 ;
11485 0 : PyObject * obj5 = 0 ;
11486 0 : char * kwnames[] = {
11487 : (char *)"self", (char *)"dfOriginLat", (char *)"dfCMeridian", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11488 : };
11489 0 : OGRErr result;
11490 :
11491 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11492 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11493 0 : if (!SWIG_IsOK(res1)) {
11494 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11495 : }
11496 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11497 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11498 0 : if (!SWIG_IsOK(ecode2)) {
11499 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOS" "', argument " "2"" of type '" "double""'");
11500 : }
11501 0 : arg2 = static_cast< double >(val2);
11502 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11503 0 : if (!SWIG_IsOK(ecode3)) {
11504 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOS" "', argument " "3"" of type '" "double""'");
11505 : }
11506 0 : arg3 = static_cast< double >(val3);
11507 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11508 0 : if (!SWIG_IsOK(ecode4)) {
11509 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOS" "', argument " "4"" of type '" "double""'");
11510 : }
11511 0 : arg4 = static_cast< double >(val4);
11512 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11513 0 : if (!SWIG_IsOK(ecode5)) {
11514 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOS" "', argument " "5"" of type '" "double""'");
11515 : }
11516 0 : arg5 = static_cast< double >(val5);
11517 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11518 0 : if (!SWIG_IsOK(ecode6)) {
11519 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetOS" "', argument " "6"" of type '" "double""'");
11520 : }
11521 0 : arg6 = static_cast< double >(val6);
11522 0 : {
11523 0 : const int bLocalUseExceptions = GetUseExceptions();
11524 0 : if ( bLocalUseExceptions ) {
11525 0 : pushErrorHandler();
11526 : }
11527 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
11528 0 : if ( bLocalUseExceptions ) {
11529 0 : popErrorHandler();
11530 : }
11531 : #ifndef SED_HACKS
11532 : if ( bLocalUseExceptions ) {
11533 : CPLErr eclass = CPLGetLastErrorType();
11534 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11535 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11536 : }
11537 : }
11538 : #endif
11539 : }
11540 0 : {
11541 : /* %typemap(out) OGRErr */
11542 0 : if ( result != 0 && GetUseExceptions()) {
11543 0 : const char* pszMessage = CPLGetLastErrorMsg();
11544 0 : if( pszMessage[0] != '\0' )
11545 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11546 : else
11547 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11548 0 : SWIG_fail;
11549 : }
11550 : }
11551 0 : {
11552 : /* %typemap(ret) OGRErr */
11553 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11554 0 : resultobj = PyInt_FromLong( result );
11555 : }
11556 : }
11557 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11558 : return resultobj;
11559 : fail:
11560 : return NULL;
11561 : }
11562 :
11563 :
11564 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOrthographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11565 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11566 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11567 1 : double arg2 ;
11568 1 : double arg3 ;
11569 1 : double arg4 ;
11570 1 : double arg5 ;
11571 1 : void *argp1 = 0 ;
11572 1 : int res1 = 0 ;
11573 1 : double val2 ;
11574 1 : int ecode2 = 0 ;
11575 1 : double val3 ;
11576 1 : int ecode3 = 0 ;
11577 1 : double val4 ;
11578 1 : int ecode4 = 0 ;
11579 1 : double val5 ;
11580 1 : int ecode5 = 0 ;
11581 1 : PyObject * obj0 = 0 ;
11582 1 : PyObject * obj1 = 0 ;
11583 1 : PyObject * obj2 = 0 ;
11584 1 : PyObject * obj3 = 0 ;
11585 1 : PyObject * obj4 = 0 ;
11586 1 : char * kwnames[] = {
11587 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11588 : };
11589 1 : OGRErr result;
11590 :
11591 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetOrthographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11592 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11593 1 : if (!SWIG_IsOK(res1)) {
11594 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOrthographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11595 : }
11596 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11597 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11598 1 : if (!SWIG_IsOK(ecode2)) {
11599 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOrthographic" "', argument " "2"" of type '" "double""'");
11600 : }
11601 1 : arg2 = static_cast< double >(val2);
11602 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11603 1 : if (!SWIG_IsOK(ecode3)) {
11604 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOrthographic" "', argument " "3"" of type '" "double""'");
11605 : }
11606 1 : arg3 = static_cast< double >(val3);
11607 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11608 1 : if (!SWIG_IsOK(ecode4)) {
11609 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOrthographic" "', argument " "4"" of type '" "double""'");
11610 : }
11611 1 : arg4 = static_cast< double >(val4);
11612 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11613 1 : if (!SWIG_IsOK(ecode5)) {
11614 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOrthographic" "', argument " "5"" of type '" "double""'");
11615 : }
11616 1 : arg5 = static_cast< double >(val5);
11617 1 : {
11618 1 : const int bLocalUseExceptions = GetUseExceptions();
11619 1 : if ( bLocalUseExceptions ) {
11620 1 : pushErrorHandler();
11621 : }
11622 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
11623 1 : if ( bLocalUseExceptions ) {
11624 1 : popErrorHandler();
11625 : }
11626 : #ifndef SED_HACKS
11627 : if ( bLocalUseExceptions ) {
11628 : CPLErr eclass = CPLGetLastErrorType();
11629 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11630 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11631 : }
11632 : }
11633 : #endif
11634 : }
11635 1 : {
11636 : /* %typemap(out) OGRErr */
11637 1 : if ( result != 0 && GetUseExceptions()) {
11638 0 : const char* pszMessage = CPLGetLastErrorMsg();
11639 0 : if( pszMessage[0] != '\0' )
11640 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11641 : else
11642 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11643 0 : SWIG_fail;
11644 : }
11645 : }
11646 1 : {
11647 : /* %typemap(ret) OGRErr */
11648 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11649 1 : resultobj = PyInt_FromLong( result );
11650 : }
11651 : }
11652 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11653 : return resultobj;
11654 : fail:
11655 : return NULL;
11656 : }
11657 :
11658 :
11659 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPolyconic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11660 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11661 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11662 0 : double arg2 ;
11663 0 : double arg3 ;
11664 0 : double arg4 ;
11665 0 : double arg5 ;
11666 0 : void *argp1 = 0 ;
11667 0 : int res1 = 0 ;
11668 0 : double val2 ;
11669 0 : int ecode2 = 0 ;
11670 0 : double val3 ;
11671 0 : int ecode3 = 0 ;
11672 0 : double val4 ;
11673 0 : int ecode4 = 0 ;
11674 0 : double val5 ;
11675 0 : int ecode5 = 0 ;
11676 0 : PyObject * obj0 = 0 ;
11677 0 : PyObject * obj1 = 0 ;
11678 0 : PyObject * obj2 = 0 ;
11679 0 : PyObject * obj3 = 0 ;
11680 0 : PyObject * obj4 = 0 ;
11681 0 : char * kwnames[] = {
11682 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11683 : };
11684 0 : OGRErr result;
11685 :
11686 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetPolyconic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11687 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11688 0 : if (!SWIG_IsOK(res1)) {
11689 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPolyconic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11690 : }
11691 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11692 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11693 0 : if (!SWIG_IsOK(ecode2)) {
11694 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPolyconic" "', argument " "2"" of type '" "double""'");
11695 : }
11696 0 : arg2 = static_cast< double >(val2);
11697 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11698 0 : if (!SWIG_IsOK(ecode3)) {
11699 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPolyconic" "', argument " "3"" of type '" "double""'");
11700 : }
11701 0 : arg3 = static_cast< double >(val3);
11702 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11703 0 : if (!SWIG_IsOK(ecode4)) {
11704 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPolyconic" "', argument " "4"" of type '" "double""'");
11705 : }
11706 0 : arg4 = static_cast< double >(val4);
11707 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11708 0 : if (!SWIG_IsOK(ecode5)) {
11709 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPolyconic" "', argument " "5"" of type '" "double""'");
11710 : }
11711 0 : arg5 = static_cast< double >(val5);
11712 0 : {
11713 0 : const int bLocalUseExceptions = GetUseExceptions();
11714 0 : if ( bLocalUseExceptions ) {
11715 0 : pushErrorHandler();
11716 : }
11717 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
11718 0 : if ( bLocalUseExceptions ) {
11719 0 : popErrorHandler();
11720 : }
11721 : #ifndef SED_HACKS
11722 : if ( bLocalUseExceptions ) {
11723 : CPLErr eclass = CPLGetLastErrorType();
11724 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11725 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11726 : }
11727 : }
11728 : #endif
11729 : }
11730 0 : {
11731 : /* %typemap(out) OGRErr */
11732 0 : if ( result != 0 && GetUseExceptions()) {
11733 0 : const char* pszMessage = CPLGetLastErrorMsg();
11734 0 : if( pszMessage[0] != '\0' )
11735 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11736 : else
11737 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11738 0 : SWIG_fail;
11739 : }
11740 : }
11741 0 : {
11742 : /* %typemap(ret) OGRErr */
11743 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11744 0 : resultobj = PyInt_FromLong( result );
11745 : }
11746 : }
11747 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11748 : return resultobj;
11749 : fail:
11750 : return NULL;
11751 : }
11752 :
11753 :
11754 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11755 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11756 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11757 1 : double arg2 ;
11758 1 : double arg3 ;
11759 1 : double arg4 ;
11760 1 : double arg5 ;
11761 1 : double arg6 ;
11762 1 : void *argp1 = 0 ;
11763 1 : int res1 = 0 ;
11764 1 : double val2 ;
11765 1 : int ecode2 = 0 ;
11766 1 : double val3 ;
11767 1 : int ecode3 = 0 ;
11768 1 : double val4 ;
11769 1 : int ecode4 = 0 ;
11770 1 : double val5 ;
11771 1 : int ecode5 = 0 ;
11772 1 : double val6 ;
11773 1 : int ecode6 = 0 ;
11774 1 : PyObject * obj0 = 0 ;
11775 1 : PyObject * obj1 = 0 ;
11776 1 : PyObject * obj2 = 0 ;
11777 1 : PyObject * obj3 = 0 ;
11778 1 : PyObject * obj4 = 0 ;
11779 1 : PyObject * obj5 = 0 ;
11780 1 : char * kwnames[] = {
11781 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11782 : };
11783 1 : OGRErr result;
11784 :
11785 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetPS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11786 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11787 1 : if (!SWIG_IsOK(res1)) {
11788 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11789 : }
11790 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11791 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11792 1 : if (!SWIG_IsOK(ecode2)) {
11793 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPS" "', argument " "2"" of type '" "double""'");
11794 : }
11795 1 : arg2 = static_cast< double >(val2);
11796 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11797 1 : if (!SWIG_IsOK(ecode3)) {
11798 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPS" "', argument " "3"" of type '" "double""'");
11799 : }
11800 1 : arg3 = static_cast< double >(val3);
11801 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11802 1 : if (!SWIG_IsOK(ecode4)) {
11803 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPS" "', argument " "4"" of type '" "double""'");
11804 : }
11805 1 : arg4 = static_cast< double >(val4);
11806 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11807 1 : if (!SWIG_IsOK(ecode5)) {
11808 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPS" "', argument " "5"" of type '" "double""'");
11809 : }
11810 1 : arg5 = static_cast< double >(val5);
11811 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11812 1 : if (!SWIG_IsOK(ecode6)) {
11813 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetPS" "', argument " "6"" of type '" "double""'");
11814 : }
11815 1 : arg6 = static_cast< double >(val6);
11816 1 : {
11817 1 : const int bLocalUseExceptions = GetUseExceptions();
11818 1 : if ( bLocalUseExceptions ) {
11819 1 : pushErrorHandler();
11820 : }
11821 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
11822 1 : if ( bLocalUseExceptions ) {
11823 1 : popErrorHandler();
11824 : }
11825 : #ifndef SED_HACKS
11826 : if ( bLocalUseExceptions ) {
11827 : CPLErr eclass = CPLGetLastErrorType();
11828 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11829 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11830 : }
11831 : }
11832 : #endif
11833 : }
11834 1 : {
11835 : /* %typemap(out) OGRErr */
11836 1 : if ( result != 0 && GetUseExceptions()) {
11837 0 : const char* pszMessage = CPLGetLastErrorMsg();
11838 0 : if( pszMessage[0] != '\0' )
11839 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11840 : else
11841 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11842 0 : SWIG_fail;
11843 : }
11844 : }
11845 1 : {
11846 : /* %typemap(ret) OGRErr */
11847 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11848 1 : resultobj = PyInt_FromLong( result );
11849 : }
11850 : }
11851 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11852 : return resultobj;
11853 : fail:
11854 : return NULL;
11855 : }
11856 :
11857 :
11858 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetRobinson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11859 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11860 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11861 0 : double arg2 ;
11862 0 : double arg3 ;
11863 0 : double arg4 ;
11864 0 : void *argp1 = 0 ;
11865 0 : int res1 = 0 ;
11866 0 : double val2 ;
11867 0 : int ecode2 = 0 ;
11868 0 : double val3 ;
11869 0 : int ecode3 = 0 ;
11870 0 : double val4 ;
11871 0 : int ecode4 = 0 ;
11872 0 : PyObject * obj0 = 0 ;
11873 0 : PyObject * obj1 = 0 ;
11874 0 : PyObject * obj2 = 0 ;
11875 0 : PyObject * obj3 = 0 ;
11876 0 : char * kwnames[] = {
11877 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11878 : };
11879 0 : OGRErr result;
11880 :
11881 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetRobinson", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11882 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11883 0 : if (!SWIG_IsOK(res1)) {
11884 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetRobinson" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11885 : }
11886 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11887 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11888 0 : if (!SWIG_IsOK(ecode2)) {
11889 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetRobinson" "', argument " "2"" of type '" "double""'");
11890 : }
11891 0 : arg2 = static_cast< double >(val2);
11892 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11893 0 : if (!SWIG_IsOK(ecode3)) {
11894 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetRobinson" "', argument " "3"" of type '" "double""'");
11895 : }
11896 0 : arg3 = static_cast< double >(val3);
11897 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11898 0 : if (!SWIG_IsOK(ecode4)) {
11899 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetRobinson" "', argument " "4"" of type '" "double""'");
11900 : }
11901 0 : arg4 = static_cast< double >(val4);
11902 0 : {
11903 0 : const int bLocalUseExceptions = GetUseExceptions();
11904 0 : if ( bLocalUseExceptions ) {
11905 0 : pushErrorHandler();
11906 : }
11907 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
11908 0 : if ( bLocalUseExceptions ) {
11909 0 : popErrorHandler();
11910 : }
11911 : #ifndef SED_HACKS
11912 : if ( bLocalUseExceptions ) {
11913 : CPLErr eclass = CPLGetLastErrorType();
11914 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11915 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11916 : }
11917 : }
11918 : #endif
11919 : }
11920 0 : {
11921 : /* %typemap(out) OGRErr */
11922 0 : if ( result != 0 && GetUseExceptions()) {
11923 0 : const char* pszMessage = CPLGetLastErrorMsg();
11924 0 : if( pszMessage[0] != '\0' )
11925 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11926 : else
11927 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11928 0 : SWIG_fail;
11929 : }
11930 : }
11931 0 : {
11932 : /* %typemap(ret) OGRErr */
11933 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11934 0 : resultobj = PyInt_FromLong( result );
11935 : }
11936 : }
11937 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11938 : return resultobj;
11939 : fail:
11940 : return NULL;
11941 : }
11942 :
11943 :
11944 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSinusoidal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11945 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11946 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11947 1 : double arg2 ;
11948 1 : double arg3 ;
11949 1 : double arg4 ;
11950 1 : void *argp1 = 0 ;
11951 1 : int res1 = 0 ;
11952 1 : double val2 ;
11953 1 : int ecode2 = 0 ;
11954 1 : double val3 ;
11955 1 : int ecode3 = 0 ;
11956 1 : double val4 ;
11957 1 : int ecode4 = 0 ;
11958 1 : PyObject * obj0 = 0 ;
11959 1 : PyObject * obj1 = 0 ;
11960 1 : PyObject * obj2 = 0 ;
11961 1 : PyObject * obj3 = 0 ;
11962 1 : char * kwnames[] = {
11963 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11964 : };
11965 1 : OGRErr result;
11966 :
11967 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetSinusoidal", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11968 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11969 1 : if (!SWIG_IsOK(res1)) {
11970 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSinusoidal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11971 : }
11972 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11973 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11974 1 : if (!SWIG_IsOK(ecode2)) {
11975 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSinusoidal" "', argument " "2"" of type '" "double""'");
11976 : }
11977 1 : arg2 = static_cast< double >(val2);
11978 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11979 1 : if (!SWIG_IsOK(ecode3)) {
11980 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSinusoidal" "', argument " "3"" of type '" "double""'");
11981 : }
11982 1 : arg3 = static_cast< double >(val3);
11983 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11984 1 : if (!SWIG_IsOK(ecode4)) {
11985 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSinusoidal" "', argument " "4"" of type '" "double""'");
11986 : }
11987 1 : arg4 = static_cast< double >(val4);
11988 1 : {
11989 1 : const int bLocalUseExceptions = GetUseExceptions();
11990 1 : if ( bLocalUseExceptions ) {
11991 1 : pushErrorHandler();
11992 : }
11993 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
11994 1 : if ( bLocalUseExceptions ) {
11995 1 : popErrorHandler();
11996 : }
11997 : #ifndef SED_HACKS
11998 : if ( bLocalUseExceptions ) {
11999 : CPLErr eclass = CPLGetLastErrorType();
12000 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12001 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12002 : }
12003 : }
12004 : #endif
12005 : }
12006 1 : {
12007 : /* %typemap(out) OGRErr */
12008 1 : if ( result != 0 && GetUseExceptions()) {
12009 0 : const char* pszMessage = CPLGetLastErrorMsg();
12010 0 : if( pszMessage[0] != '\0' )
12011 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12012 : else
12013 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12014 0 : SWIG_fail;
12015 : }
12016 : }
12017 1 : {
12018 : /* %typemap(ret) OGRErr */
12019 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12020 1 : resultobj = PyInt_FromLong( result );
12021 : }
12022 : }
12023 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12024 : return resultobj;
12025 : fail:
12026 : return NULL;
12027 : }
12028 :
12029 :
12030 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStereographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12031 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12032 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12033 0 : double arg2 ;
12034 0 : double arg3 ;
12035 0 : double arg4 ;
12036 0 : double arg5 ;
12037 0 : double arg6 ;
12038 0 : void *argp1 = 0 ;
12039 0 : int res1 = 0 ;
12040 0 : double val2 ;
12041 0 : int ecode2 = 0 ;
12042 0 : double val3 ;
12043 0 : int ecode3 = 0 ;
12044 0 : double val4 ;
12045 0 : int ecode4 = 0 ;
12046 0 : double val5 ;
12047 0 : int ecode5 = 0 ;
12048 0 : double val6 ;
12049 0 : int ecode6 = 0 ;
12050 0 : PyObject * obj0 = 0 ;
12051 0 : PyObject * obj1 = 0 ;
12052 0 : PyObject * obj2 = 0 ;
12053 0 : PyObject * obj3 = 0 ;
12054 0 : PyObject * obj4 = 0 ;
12055 0 : PyObject * obj5 = 0 ;
12056 0 : char * kwnames[] = {
12057 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12058 : };
12059 0 : OGRErr result;
12060 :
12061 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetStereographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12062 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12063 0 : if (!SWIG_IsOK(res1)) {
12064 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStereographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12065 : }
12066 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12067 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12068 0 : if (!SWIG_IsOK(ecode2)) {
12069 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStereographic" "', argument " "2"" of type '" "double""'");
12070 : }
12071 0 : arg2 = static_cast< double >(val2);
12072 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12073 0 : if (!SWIG_IsOK(ecode3)) {
12074 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStereographic" "', argument " "3"" of type '" "double""'");
12075 : }
12076 0 : arg3 = static_cast< double >(val3);
12077 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12078 0 : if (!SWIG_IsOK(ecode4)) {
12079 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetStereographic" "', argument " "4"" of type '" "double""'");
12080 : }
12081 0 : arg4 = static_cast< double >(val4);
12082 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12083 0 : if (!SWIG_IsOK(ecode5)) {
12084 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStereographic" "', argument " "5"" of type '" "double""'");
12085 : }
12086 0 : arg5 = static_cast< double >(val5);
12087 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12088 0 : if (!SWIG_IsOK(ecode6)) {
12089 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetStereographic" "', argument " "6"" of type '" "double""'");
12090 : }
12091 0 : arg6 = static_cast< double >(val6);
12092 0 : {
12093 0 : const int bLocalUseExceptions = GetUseExceptions();
12094 0 : if ( bLocalUseExceptions ) {
12095 0 : pushErrorHandler();
12096 : }
12097 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
12098 0 : if ( bLocalUseExceptions ) {
12099 0 : popErrorHandler();
12100 : }
12101 : #ifndef SED_HACKS
12102 : if ( bLocalUseExceptions ) {
12103 : CPLErr eclass = CPLGetLastErrorType();
12104 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12105 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12106 : }
12107 : }
12108 : #endif
12109 : }
12110 0 : {
12111 : /* %typemap(out) OGRErr */
12112 0 : if ( result != 0 && GetUseExceptions()) {
12113 0 : const char* pszMessage = CPLGetLastErrorMsg();
12114 0 : if( pszMessage[0] != '\0' )
12115 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12116 : else
12117 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12118 0 : SWIG_fail;
12119 : }
12120 : }
12121 0 : {
12122 : /* %typemap(ret) OGRErr */
12123 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12124 0 : resultobj = PyInt_FromLong( result );
12125 : }
12126 : }
12127 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12128 : return resultobj;
12129 : fail:
12130 : return NULL;
12131 : }
12132 :
12133 :
12134 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSOC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12135 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12136 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12137 0 : double arg2 ;
12138 0 : double arg3 ;
12139 0 : double arg4 ;
12140 0 : double arg5 ;
12141 0 : void *argp1 = 0 ;
12142 0 : int res1 = 0 ;
12143 0 : double val2 ;
12144 0 : int ecode2 = 0 ;
12145 0 : double val3 ;
12146 0 : int ecode3 = 0 ;
12147 0 : double val4 ;
12148 0 : int ecode4 = 0 ;
12149 0 : double val5 ;
12150 0 : int ecode5 = 0 ;
12151 0 : PyObject * obj0 = 0 ;
12152 0 : PyObject * obj1 = 0 ;
12153 0 : PyObject * obj2 = 0 ;
12154 0 : PyObject * obj3 = 0 ;
12155 0 : PyObject * obj4 = 0 ;
12156 0 : char * kwnames[] = {
12157 : (char *)"self", (char *)"latitudeoforigin", (char *)"cm", (char *)"fe", (char *)"fn", NULL
12158 : };
12159 0 : OGRErr result;
12160 :
12161 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetSOC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12162 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12163 0 : if (!SWIG_IsOK(res1)) {
12164 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSOC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12165 : }
12166 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12167 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12168 0 : if (!SWIG_IsOK(ecode2)) {
12169 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSOC" "', argument " "2"" of type '" "double""'");
12170 : }
12171 0 : arg2 = static_cast< double >(val2);
12172 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12173 0 : if (!SWIG_IsOK(ecode3)) {
12174 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSOC" "', argument " "3"" of type '" "double""'");
12175 : }
12176 0 : arg3 = static_cast< double >(val3);
12177 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12178 0 : if (!SWIG_IsOK(ecode4)) {
12179 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSOC" "', argument " "4"" of type '" "double""'");
12180 : }
12181 0 : arg4 = static_cast< double >(val4);
12182 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12183 0 : if (!SWIG_IsOK(ecode5)) {
12184 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetSOC" "', argument " "5"" of type '" "double""'");
12185 : }
12186 0 : arg5 = static_cast< double >(val5);
12187 0 : {
12188 0 : const int bLocalUseExceptions = GetUseExceptions();
12189 0 : if ( bLocalUseExceptions ) {
12190 0 : pushErrorHandler();
12191 : }
12192 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
12193 0 : if ( bLocalUseExceptions ) {
12194 0 : popErrorHandler();
12195 : }
12196 : #ifndef SED_HACKS
12197 : if ( bLocalUseExceptions ) {
12198 : CPLErr eclass = CPLGetLastErrorType();
12199 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12200 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12201 : }
12202 : }
12203 : #endif
12204 : }
12205 0 : {
12206 : /* %typemap(out) OGRErr */
12207 0 : if ( result != 0 && GetUseExceptions()) {
12208 0 : const char* pszMessage = CPLGetLastErrorMsg();
12209 0 : if( pszMessage[0] != '\0' )
12210 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12211 : else
12212 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12213 0 : SWIG_fail;
12214 : }
12215 : }
12216 0 : {
12217 : /* %typemap(ret) OGRErr */
12218 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12219 0 : resultobj = PyInt_FromLong( result );
12220 : }
12221 : }
12222 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12223 : return resultobj;
12224 : fail:
12225 : return NULL;
12226 : }
12227 :
12228 :
12229 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12230 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12231 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12232 1 : double arg2 ;
12233 1 : double arg3 ;
12234 1 : double arg4 ;
12235 1 : double arg5 ;
12236 1 : double arg6 ;
12237 1 : void *argp1 = 0 ;
12238 1 : int res1 = 0 ;
12239 1 : double val2 ;
12240 1 : int ecode2 = 0 ;
12241 1 : double val3 ;
12242 1 : int ecode3 = 0 ;
12243 1 : double val4 ;
12244 1 : int ecode4 = 0 ;
12245 1 : double val5 ;
12246 1 : int ecode5 = 0 ;
12247 1 : double val6 ;
12248 1 : int ecode6 = 0 ;
12249 1 : PyObject * obj0 = 0 ;
12250 1 : PyObject * obj1 = 0 ;
12251 1 : PyObject * obj2 = 0 ;
12252 1 : PyObject * obj3 = 0 ;
12253 1 : PyObject * obj4 = 0 ;
12254 1 : PyObject * obj5 = 0 ;
12255 1 : char * kwnames[] = {
12256 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12257 : };
12258 1 : OGRErr result;
12259 :
12260 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12261 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12262 1 : if (!SWIG_IsOK(res1)) {
12263 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12264 : }
12265 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12266 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12267 1 : if (!SWIG_IsOK(ecode2)) {
12268 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTM" "', argument " "2"" of type '" "double""'");
12269 : }
12270 1 : arg2 = static_cast< double >(val2);
12271 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12272 1 : if (!SWIG_IsOK(ecode3)) {
12273 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTM" "', argument " "3"" of type '" "double""'");
12274 : }
12275 1 : arg3 = static_cast< double >(val3);
12276 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12277 1 : if (!SWIG_IsOK(ecode4)) {
12278 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTM" "', argument " "4"" of type '" "double""'");
12279 : }
12280 1 : arg4 = static_cast< double >(val4);
12281 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12282 1 : if (!SWIG_IsOK(ecode5)) {
12283 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTM" "', argument " "5"" of type '" "double""'");
12284 : }
12285 1 : arg5 = static_cast< double >(val5);
12286 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12287 1 : if (!SWIG_IsOK(ecode6)) {
12288 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTM" "', argument " "6"" of type '" "double""'");
12289 : }
12290 1 : arg6 = static_cast< double >(val6);
12291 1 : {
12292 1 : const int bLocalUseExceptions = GetUseExceptions();
12293 1 : if ( bLocalUseExceptions ) {
12294 1 : pushErrorHandler();
12295 : }
12296 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
12297 1 : if ( bLocalUseExceptions ) {
12298 1 : popErrorHandler();
12299 : }
12300 : #ifndef SED_HACKS
12301 : if ( bLocalUseExceptions ) {
12302 : CPLErr eclass = CPLGetLastErrorType();
12303 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12304 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12305 : }
12306 : }
12307 : #endif
12308 : }
12309 1 : {
12310 : /* %typemap(out) OGRErr */
12311 1 : if ( result != 0 && GetUseExceptions()) {
12312 0 : const char* pszMessage = CPLGetLastErrorMsg();
12313 0 : if( pszMessage[0] != '\0' )
12314 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12315 : else
12316 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12317 0 : SWIG_fail;
12318 : }
12319 : }
12320 1 : {
12321 : /* %typemap(ret) OGRErr */
12322 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12323 1 : resultobj = PyInt_FromLong( result );
12324 : }
12325 : }
12326 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12327 : return resultobj;
12328 : fail:
12329 : return NULL;
12330 : }
12331 :
12332 :
12333 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMVariant(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12334 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12335 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12336 0 : char *arg2 = (char *) 0 ;
12337 0 : double arg3 ;
12338 0 : double arg4 ;
12339 0 : double arg5 ;
12340 0 : double arg6 ;
12341 0 : double arg7 ;
12342 0 : void *argp1 = 0 ;
12343 0 : int res1 = 0 ;
12344 0 : int res2 ;
12345 0 : char *buf2 = 0 ;
12346 0 : int alloc2 = 0 ;
12347 0 : double val3 ;
12348 0 : int ecode3 = 0 ;
12349 0 : double val4 ;
12350 0 : int ecode4 = 0 ;
12351 0 : double val5 ;
12352 0 : int ecode5 = 0 ;
12353 0 : double val6 ;
12354 0 : int ecode6 = 0 ;
12355 0 : double val7 ;
12356 0 : int ecode7 = 0 ;
12357 0 : PyObject * obj0 = 0 ;
12358 0 : PyObject * obj1 = 0 ;
12359 0 : PyObject * obj2 = 0 ;
12360 0 : PyObject * obj3 = 0 ;
12361 0 : PyObject * obj4 = 0 ;
12362 0 : PyObject * obj5 = 0 ;
12363 0 : PyObject * obj6 = 0 ;
12364 0 : char * kwnames[] = {
12365 : (char *)"self", (char *)"pszVariantName", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12366 : };
12367 0 : OGRErr result;
12368 :
12369 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetTMVariant", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12370 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12371 0 : if (!SWIG_IsOK(res1)) {
12372 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMVariant" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12373 : }
12374 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12375 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12376 0 : if (!SWIG_IsOK(res2)) {
12377 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTMVariant" "', argument " "2"" of type '" "char const *""'");
12378 : }
12379 0 : arg2 = reinterpret_cast< char * >(buf2);
12380 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12381 0 : if (!SWIG_IsOK(ecode3)) {
12382 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMVariant" "', argument " "3"" of type '" "double""'");
12383 : }
12384 0 : arg3 = static_cast< double >(val3);
12385 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12386 0 : if (!SWIG_IsOK(ecode4)) {
12387 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMVariant" "', argument " "4"" of type '" "double""'");
12388 : }
12389 0 : arg4 = static_cast< double >(val4);
12390 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12391 0 : if (!SWIG_IsOK(ecode5)) {
12392 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMVariant" "', argument " "5"" of type '" "double""'");
12393 : }
12394 0 : arg5 = static_cast< double >(val5);
12395 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12396 0 : if (!SWIG_IsOK(ecode6)) {
12397 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMVariant" "', argument " "6"" of type '" "double""'");
12398 : }
12399 0 : arg6 = static_cast< double >(val6);
12400 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12401 0 : if (!SWIG_IsOK(ecode7)) {
12402 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTMVariant" "', argument " "7"" of type '" "double""'");
12403 : }
12404 0 : arg7 = static_cast< double >(val7);
12405 0 : {
12406 0 : const int bLocalUseExceptions = GetUseExceptions();
12407 0 : if ( bLocalUseExceptions ) {
12408 0 : pushErrorHandler();
12409 : }
12410 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
12411 0 : if ( bLocalUseExceptions ) {
12412 0 : popErrorHandler();
12413 : }
12414 : #ifndef SED_HACKS
12415 : if ( bLocalUseExceptions ) {
12416 : CPLErr eclass = CPLGetLastErrorType();
12417 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12418 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12419 : }
12420 : }
12421 : #endif
12422 : }
12423 0 : {
12424 : /* %typemap(out) OGRErr */
12425 0 : if ( result != 0 && GetUseExceptions()) {
12426 0 : const char* pszMessage = CPLGetLastErrorMsg();
12427 0 : if( pszMessage[0] != '\0' )
12428 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12429 : else
12430 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12431 0 : SWIG_fail;
12432 : }
12433 : }
12434 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12435 0 : {
12436 : /* %typemap(ret) OGRErr */
12437 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12438 0 : resultobj = PyInt_FromLong( result );
12439 : }
12440 : }
12441 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12442 : return resultobj;
12443 0 : fail:
12444 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12445 : return NULL;
12446 : }
12447 :
12448 :
12449 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12450 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12451 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12452 0 : double arg2 ;
12453 0 : double arg3 ;
12454 0 : double arg4 ;
12455 0 : double arg5 ;
12456 0 : void *argp1 = 0 ;
12457 0 : int res1 = 0 ;
12458 0 : double val2 ;
12459 0 : int ecode2 = 0 ;
12460 0 : double val3 ;
12461 0 : int ecode3 = 0 ;
12462 0 : double val4 ;
12463 0 : int ecode4 = 0 ;
12464 0 : double val5 ;
12465 0 : int ecode5 = 0 ;
12466 0 : PyObject * obj0 = 0 ;
12467 0 : PyObject * obj1 = 0 ;
12468 0 : PyObject * obj2 = 0 ;
12469 0 : PyObject * obj3 = 0 ;
12470 0 : PyObject * obj4 = 0 ;
12471 0 : char * kwnames[] = {
12472 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12473 : };
12474 0 : OGRErr result;
12475 :
12476 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetTMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12477 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12478 0 : if (!SWIG_IsOK(res1)) {
12479 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12480 : }
12481 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12482 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12483 0 : if (!SWIG_IsOK(ecode2)) {
12484 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMG" "', argument " "2"" of type '" "double""'");
12485 : }
12486 0 : arg2 = static_cast< double >(val2);
12487 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12488 0 : if (!SWIG_IsOK(ecode3)) {
12489 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMG" "', argument " "3"" of type '" "double""'");
12490 : }
12491 0 : arg3 = static_cast< double >(val3);
12492 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12493 0 : if (!SWIG_IsOK(ecode4)) {
12494 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMG" "', argument " "4"" of type '" "double""'");
12495 : }
12496 0 : arg4 = static_cast< double >(val4);
12497 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12498 0 : if (!SWIG_IsOK(ecode5)) {
12499 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMG" "', argument " "5"" of type '" "double""'");
12500 : }
12501 0 : arg5 = static_cast< double >(val5);
12502 0 : {
12503 0 : const int bLocalUseExceptions = GetUseExceptions();
12504 0 : if ( bLocalUseExceptions ) {
12505 0 : pushErrorHandler();
12506 : }
12507 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
12508 0 : if ( bLocalUseExceptions ) {
12509 0 : popErrorHandler();
12510 : }
12511 : #ifndef SED_HACKS
12512 : if ( bLocalUseExceptions ) {
12513 : CPLErr eclass = CPLGetLastErrorType();
12514 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12515 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12516 : }
12517 : }
12518 : #endif
12519 : }
12520 0 : {
12521 : /* %typemap(out) OGRErr */
12522 0 : if ( result != 0 && GetUseExceptions()) {
12523 0 : const char* pszMessage = CPLGetLastErrorMsg();
12524 0 : if( pszMessage[0] != '\0' )
12525 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12526 : else
12527 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12528 0 : SWIG_fail;
12529 : }
12530 : }
12531 0 : {
12532 : /* %typemap(ret) OGRErr */
12533 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12534 0 : resultobj = PyInt_FromLong( result );
12535 : }
12536 : }
12537 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12538 : return resultobj;
12539 : fail:
12540 : return NULL;
12541 : }
12542 :
12543 :
12544 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMSO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12545 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12546 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12547 0 : double arg2 ;
12548 0 : double arg3 ;
12549 0 : double arg4 ;
12550 0 : double arg5 ;
12551 0 : double arg6 ;
12552 0 : void *argp1 = 0 ;
12553 0 : int res1 = 0 ;
12554 0 : double val2 ;
12555 0 : int ecode2 = 0 ;
12556 0 : double val3 ;
12557 0 : int ecode3 = 0 ;
12558 0 : double val4 ;
12559 0 : int ecode4 = 0 ;
12560 0 : double val5 ;
12561 0 : int ecode5 = 0 ;
12562 0 : double val6 ;
12563 0 : int ecode6 = 0 ;
12564 0 : PyObject * obj0 = 0 ;
12565 0 : PyObject * obj1 = 0 ;
12566 0 : PyObject * obj2 = 0 ;
12567 0 : PyObject * obj3 = 0 ;
12568 0 : PyObject * obj4 = 0 ;
12569 0 : PyObject * obj5 = 0 ;
12570 0 : char * kwnames[] = {
12571 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12572 : };
12573 0 : OGRErr result;
12574 :
12575 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTMSO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12576 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12577 0 : if (!SWIG_IsOK(res1)) {
12578 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMSO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12579 : }
12580 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12581 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12582 0 : if (!SWIG_IsOK(ecode2)) {
12583 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMSO" "', argument " "2"" of type '" "double""'");
12584 : }
12585 0 : arg2 = static_cast< double >(val2);
12586 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12587 0 : if (!SWIG_IsOK(ecode3)) {
12588 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMSO" "', argument " "3"" of type '" "double""'");
12589 : }
12590 0 : arg3 = static_cast< double >(val3);
12591 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12592 0 : if (!SWIG_IsOK(ecode4)) {
12593 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMSO" "', argument " "4"" of type '" "double""'");
12594 : }
12595 0 : arg4 = static_cast< double >(val4);
12596 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12597 0 : if (!SWIG_IsOK(ecode5)) {
12598 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMSO" "', argument " "5"" of type '" "double""'");
12599 : }
12600 0 : arg5 = static_cast< double >(val5);
12601 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12602 0 : if (!SWIG_IsOK(ecode6)) {
12603 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMSO" "', argument " "6"" of type '" "double""'");
12604 : }
12605 0 : arg6 = static_cast< double >(val6);
12606 0 : {
12607 0 : const int bLocalUseExceptions = GetUseExceptions();
12608 0 : if ( bLocalUseExceptions ) {
12609 0 : pushErrorHandler();
12610 : }
12611 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
12612 0 : if ( bLocalUseExceptions ) {
12613 0 : popErrorHandler();
12614 : }
12615 : #ifndef SED_HACKS
12616 : if ( bLocalUseExceptions ) {
12617 : CPLErr eclass = CPLGetLastErrorType();
12618 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12619 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12620 : }
12621 : }
12622 : #endif
12623 : }
12624 0 : {
12625 : /* %typemap(out) OGRErr */
12626 0 : if ( result != 0 && GetUseExceptions()) {
12627 0 : const char* pszMessage = CPLGetLastErrorMsg();
12628 0 : if( pszMessage[0] != '\0' )
12629 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12630 : else
12631 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12632 0 : SWIG_fail;
12633 : }
12634 : }
12635 0 : {
12636 : /* %typemap(ret) OGRErr */
12637 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12638 0 : resultobj = PyInt_FromLong( result );
12639 : }
12640 : }
12641 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12642 : return resultobj;
12643 : fail:
12644 : return NULL;
12645 : }
12646 :
12647 :
12648 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVDG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12649 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12650 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12651 0 : double arg2 ;
12652 0 : double arg3 ;
12653 0 : double arg4 ;
12654 0 : void *argp1 = 0 ;
12655 0 : int res1 = 0 ;
12656 0 : double val2 ;
12657 0 : int ecode2 = 0 ;
12658 0 : double val3 ;
12659 0 : int ecode3 = 0 ;
12660 0 : double val4 ;
12661 0 : int ecode4 = 0 ;
12662 0 : PyObject * obj0 = 0 ;
12663 0 : PyObject * obj1 = 0 ;
12664 0 : PyObject * obj2 = 0 ;
12665 0 : PyObject * obj3 = 0 ;
12666 0 : char * kwnames[] = {
12667 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12668 : };
12669 0 : OGRErr result;
12670 :
12671 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetVDG", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
12672 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12673 0 : if (!SWIG_IsOK(res1)) {
12674 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVDG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12675 : }
12676 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12677 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12678 0 : if (!SWIG_IsOK(ecode2)) {
12679 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVDG" "', argument " "2"" of type '" "double""'");
12680 : }
12681 0 : arg2 = static_cast< double >(val2);
12682 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12683 0 : if (!SWIG_IsOK(ecode3)) {
12684 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVDG" "', argument " "3"" of type '" "double""'");
12685 : }
12686 0 : arg3 = static_cast< double >(val3);
12687 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12688 0 : if (!SWIG_IsOK(ecode4)) {
12689 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVDG" "', argument " "4"" of type '" "double""'");
12690 : }
12691 0 : arg4 = static_cast< double >(val4);
12692 0 : {
12693 0 : const int bLocalUseExceptions = GetUseExceptions();
12694 0 : if ( bLocalUseExceptions ) {
12695 0 : pushErrorHandler();
12696 : }
12697 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
12698 0 : if ( bLocalUseExceptions ) {
12699 0 : popErrorHandler();
12700 : }
12701 : #ifndef SED_HACKS
12702 : if ( bLocalUseExceptions ) {
12703 : CPLErr eclass = CPLGetLastErrorType();
12704 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12705 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12706 : }
12707 : }
12708 : #endif
12709 : }
12710 0 : {
12711 : /* %typemap(out) OGRErr */
12712 0 : if ( result != 0 && GetUseExceptions()) {
12713 0 : const char* pszMessage = CPLGetLastErrorMsg();
12714 0 : if( pszMessage[0] != '\0' )
12715 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12716 : else
12717 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12718 0 : SWIG_fail;
12719 : }
12720 : }
12721 0 : {
12722 : /* %typemap(ret) OGRErr */
12723 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12724 0 : resultobj = PyInt_FromLong( result );
12725 : }
12726 : }
12727 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12728 : return resultobj;
12729 : fail:
12730 : return NULL;
12731 : }
12732 :
12733 :
12734 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVerticalPerspective(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12735 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12736 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12737 1 : double arg2 ;
12738 1 : double arg3 ;
12739 1 : double arg4 ;
12740 1 : double arg5 ;
12741 1 : double arg6 ;
12742 1 : double arg7 ;
12743 1 : void *argp1 = 0 ;
12744 1 : int res1 = 0 ;
12745 1 : double val2 ;
12746 1 : int ecode2 = 0 ;
12747 1 : double val3 ;
12748 1 : int ecode3 = 0 ;
12749 1 : double val4 ;
12750 1 : int ecode4 = 0 ;
12751 1 : double val5 ;
12752 1 : int ecode5 = 0 ;
12753 1 : double val6 ;
12754 1 : int ecode6 = 0 ;
12755 1 : double val7 ;
12756 1 : int ecode7 = 0 ;
12757 1 : PyObject * obj0 = 0 ;
12758 1 : PyObject * obj1 = 0 ;
12759 1 : PyObject * obj2 = 0 ;
12760 1 : PyObject * obj3 = 0 ;
12761 1 : PyObject * obj4 = 0 ;
12762 1 : PyObject * obj5 = 0 ;
12763 1 : PyObject * obj6 = 0 ;
12764 1 : char * kwnames[] = {
12765 : (char *)"self", (char *)"topoOriginLat", (char *)"topoOriginLon", (char *)"topoOriginHeight", (char *)"viewPointHeight", (char *)"fe", (char *)"fn", NULL
12766 : };
12767 1 : OGRErr result;
12768 :
12769 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetVerticalPerspective", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12770 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12771 1 : if (!SWIG_IsOK(res1)) {
12772 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12773 : }
12774 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12775 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12776 1 : if (!SWIG_IsOK(ecode2)) {
12777 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "2"" of type '" "double""'");
12778 : }
12779 1 : arg2 = static_cast< double >(val2);
12780 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12781 1 : if (!SWIG_IsOK(ecode3)) {
12782 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "3"" of type '" "double""'");
12783 : }
12784 1 : arg3 = static_cast< double >(val3);
12785 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12786 1 : if (!SWIG_IsOK(ecode4)) {
12787 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "4"" of type '" "double""'");
12788 : }
12789 1 : arg4 = static_cast< double >(val4);
12790 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12791 1 : if (!SWIG_IsOK(ecode5)) {
12792 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "5"" of type '" "double""'");
12793 : }
12794 1 : arg5 = static_cast< double >(val5);
12795 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12796 1 : if (!SWIG_IsOK(ecode6)) {
12797 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "6"" of type '" "double""'");
12798 : }
12799 1 : arg6 = static_cast< double >(val6);
12800 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12801 1 : if (!SWIG_IsOK(ecode7)) {
12802 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "7"" of type '" "double""'");
12803 : }
12804 1 : arg7 = static_cast< double >(val7);
12805 1 : {
12806 1 : const int bLocalUseExceptions = GetUseExceptions();
12807 1 : if ( bLocalUseExceptions ) {
12808 1 : pushErrorHandler();
12809 : }
12810 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetVerticalPerspective(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
12811 1 : if ( bLocalUseExceptions ) {
12812 1 : popErrorHandler();
12813 : }
12814 : #ifndef SED_HACKS
12815 : if ( bLocalUseExceptions ) {
12816 : CPLErr eclass = CPLGetLastErrorType();
12817 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12818 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12819 : }
12820 : }
12821 : #endif
12822 : }
12823 1 : {
12824 : /* %typemap(out) OGRErr */
12825 1 : if ( result != 0 && GetUseExceptions()) {
12826 0 : const char* pszMessage = CPLGetLastErrorMsg();
12827 0 : if( pszMessage[0] != '\0' )
12828 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12829 : else
12830 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12831 0 : SWIG_fail;
12832 : }
12833 : }
12834 1 : {
12835 : /* %typemap(ret) OGRErr */
12836 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12837 1 : resultobj = PyInt_FromLong( result );
12838 : }
12839 : }
12840 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12841 : return resultobj;
12842 : fail:
12843 : return NULL;
12844 : }
12845 :
12846 :
12847 63 : SWIGINTERN PyObject *_wrap_SpatialReference_SetWellKnownGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12848 63 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12849 63 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12850 63 : char *arg2 = (char *) 0 ;
12851 63 : void *argp1 = 0 ;
12852 63 : int res1 = 0 ;
12853 63 : int res2 ;
12854 63 : char *buf2 = 0 ;
12855 63 : int alloc2 = 0 ;
12856 63 : PyObject *swig_obj[2] ;
12857 63 : OGRErr result;
12858 :
12859 63 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetWellKnownGeogCS", 2, 2, swig_obj)) SWIG_fail;
12860 63 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12861 63 : if (!SWIG_IsOK(res1)) {
12862 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12863 : }
12864 63 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12865 63 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
12866 63 : if (!SWIG_IsOK(res2)) {
12867 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "2"" of type '" "char const *""'");
12868 : }
12869 63 : arg2 = reinterpret_cast< char * >(buf2);
12870 63 : {
12871 63 : if (!arg2) {
12872 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12873 : }
12874 : }
12875 63 : {
12876 63 : const int bLocalUseExceptions = GetUseExceptions();
12877 63 : if ( bLocalUseExceptions ) {
12878 62 : pushErrorHandler();
12879 : }
12880 63 : result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
12881 63 : if ( bLocalUseExceptions ) {
12882 62 : popErrorHandler();
12883 : }
12884 : #ifndef SED_HACKS
12885 : if ( bLocalUseExceptions ) {
12886 : CPLErr eclass = CPLGetLastErrorType();
12887 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12888 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12889 : }
12890 : }
12891 : #endif
12892 : }
12893 63 : {
12894 : /* %typemap(out) OGRErr */
12895 63 : if ( result != 0 && GetUseExceptions()) {
12896 0 : const char* pszMessage = CPLGetLastErrorMsg();
12897 0 : if( pszMessage[0] != '\0' )
12898 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12899 : else
12900 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12901 0 : SWIG_fail;
12902 : }
12903 : }
12904 63 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12905 63 : {
12906 : /* %typemap(ret) OGRErr */
12907 63 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12908 63 : resultobj = PyInt_FromLong( result );
12909 : }
12910 : }
12911 63 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12912 : return resultobj;
12913 0 : fail:
12914 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12915 : return NULL;
12916 : }
12917 :
12918 :
12919 704 : SWIGINTERN PyObject *_wrap_SpatialReference_SetFromUserInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12920 704 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12921 704 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12922 704 : char *arg2 = (char *) 0 ;
12923 704 : char **arg3 = (char **) NULL ;
12924 704 : void *argp1 = 0 ;
12925 704 : int res1 = 0 ;
12926 704 : int res2 ;
12927 704 : char *buf2 = 0 ;
12928 704 : int alloc2 = 0 ;
12929 704 : PyObject * obj0 = 0 ;
12930 704 : PyObject * obj1 = 0 ;
12931 704 : PyObject * obj2 = 0 ;
12932 704 : char * kwnames[] = {
12933 : (char *)"self", (char *)"name", (char *)"options", NULL
12934 : };
12935 704 : OGRErr result;
12936 :
12937 704 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_SetFromUserInput", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
12938 704 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12939 704 : if (!SWIG_IsOK(res1)) {
12940 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetFromUserInput" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12941 : }
12942 704 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12943 704 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12944 704 : if (!SWIG_IsOK(res2)) {
12945 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetFromUserInput" "', argument " "2"" of type '" "char const *""'");
12946 : }
12947 704 : arg2 = reinterpret_cast< char * >(buf2);
12948 704 : if (obj2) {
12949 1 : {
12950 : /* %typemap(in) char **dict */
12951 1 : arg3 = NULL;
12952 1 : if ( PySequence_Check( obj2 ) ) {
12953 1 : int bErr = FALSE;
12954 1 : arg3 = CSLFromPySequence(obj2, &bErr);
12955 1 : if ( bErr )
12956 : {
12957 0 : SWIG_fail;
12958 : }
12959 : }
12960 0 : else if ( PyMapping_Check( obj2 ) ) {
12961 0 : int bErr = FALSE;
12962 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
12963 0 : if ( bErr )
12964 : {
12965 0 : SWIG_fail;
12966 : }
12967 : }
12968 : else {
12969 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12970 0 : SWIG_fail;
12971 : }
12972 : }
12973 : }
12974 704 : {
12975 704 : if (!arg2) {
12976 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12977 : }
12978 : }
12979 704 : {
12980 704 : const int bLocalUseExceptions = GetUseExceptions();
12981 704 : if ( bLocalUseExceptions ) {
12982 526 : pushErrorHandler();
12983 : }
12984 704 : result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2,arg3);
12985 704 : if ( bLocalUseExceptions ) {
12986 526 : popErrorHandler();
12987 : }
12988 : #ifndef SED_HACKS
12989 : if ( bLocalUseExceptions ) {
12990 : CPLErr eclass = CPLGetLastErrorType();
12991 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12992 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12993 : }
12994 : }
12995 : #endif
12996 : }
12997 704 : {
12998 : /* %typemap(out) OGRErr */
12999 714 : if ( result != 0 && GetUseExceptions()) {
13000 9 : const char* pszMessage = CPLGetLastErrorMsg();
13001 9 : if( pszMessage[0] != '\0' )
13002 8 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13003 : else
13004 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13005 9 : SWIG_fail;
13006 : }
13007 : }
13008 695 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13009 695 : {
13010 : /* %typemap(freearg) char **dict */
13011 695 : CSLDestroy( arg3 );
13012 : }
13013 695 : {
13014 : /* %typemap(ret) OGRErr */
13015 695 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13016 695 : resultobj = PyInt_FromLong( result );
13017 : }
13018 : }
13019 695 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13020 : return resultobj;
13021 9 : fail:
13022 9 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13023 9 : {
13024 : /* %typemap(freearg) char **dict */
13025 9 : CSLDestroy( arg3 );
13026 : }
13027 : return NULL;
13028 : }
13029 :
13030 :
13031 1 : SWIGINTERN PyObject *_wrap_SpatialReference_CopyGeogCSFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13032 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13033 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13034 1 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
13035 1 : void *argp1 = 0 ;
13036 1 : int res1 = 0 ;
13037 1 : void *argp2 = 0 ;
13038 1 : int res2 = 0 ;
13039 1 : PyObject *swig_obj[2] ;
13040 1 : OGRErr result;
13041 :
13042 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_CopyGeogCSFrom", 2, 2, swig_obj)) SWIG_fail;
13043 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13044 1 : if (!SWIG_IsOK(res1)) {
13045 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13046 : }
13047 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13048 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13049 1 : if (!SWIG_IsOK(res2)) {
13050 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
13051 : }
13052 1 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
13053 1 : {
13054 1 : if (!arg2) {
13055 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13056 : }
13057 : }
13058 1 : {
13059 1 : const int bLocalUseExceptions = GetUseExceptions();
13060 1 : if ( bLocalUseExceptions ) {
13061 0 : pushErrorHandler();
13062 : }
13063 1 : result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
13064 1 : if ( bLocalUseExceptions ) {
13065 0 : popErrorHandler();
13066 : }
13067 : #ifndef SED_HACKS
13068 : if ( bLocalUseExceptions ) {
13069 : CPLErr eclass = CPLGetLastErrorType();
13070 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13071 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13072 : }
13073 : }
13074 : #endif
13075 : }
13076 1 : {
13077 : /* %typemap(out) OGRErr */
13078 1 : if ( result != 0 && GetUseExceptions()) {
13079 0 : const char* pszMessage = CPLGetLastErrorMsg();
13080 0 : if( pszMessage[0] != '\0' )
13081 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13082 : else
13083 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13084 0 : SWIG_fail;
13085 : }
13086 : }
13087 1 : {
13088 : /* %typemap(ret) OGRErr */
13089 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13090 1 : resultobj = PyInt_FromLong( result );
13091 : }
13092 : }
13093 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13094 : return resultobj;
13095 : fail:
13096 : return NULL;
13097 : }
13098 :
13099 :
13100 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13101 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13102 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13103 3 : double arg2 ;
13104 3 : double arg3 ;
13105 3 : double arg4 ;
13106 3 : double arg5 = (double) 0.0 ;
13107 3 : double arg6 = (double) 0.0 ;
13108 3 : double arg7 = (double) 0.0 ;
13109 3 : double arg8 = (double) 0.0 ;
13110 3 : void *argp1 = 0 ;
13111 3 : int res1 = 0 ;
13112 3 : double val2 ;
13113 3 : int ecode2 = 0 ;
13114 3 : double val3 ;
13115 3 : int ecode3 = 0 ;
13116 3 : double val4 ;
13117 3 : int ecode4 = 0 ;
13118 3 : double val5 ;
13119 3 : int ecode5 = 0 ;
13120 3 : double val6 ;
13121 3 : int ecode6 = 0 ;
13122 3 : double val7 ;
13123 3 : int ecode7 = 0 ;
13124 3 : double val8 ;
13125 3 : int ecode8 = 0 ;
13126 3 : PyObject *swig_obj[8] ;
13127 3 : OGRErr result;
13128 :
13129 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTOWGS84", 4, 8, swig_obj)) SWIG_fail;
13130 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13131 3 : if (!SWIG_IsOK(res1)) {
13132 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13133 : }
13134 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13135 3 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
13136 3 : if (!SWIG_IsOK(ecode2)) {
13137 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTOWGS84" "', argument " "2"" of type '" "double""'");
13138 : }
13139 3 : arg2 = static_cast< double >(val2);
13140 3 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
13141 3 : if (!SWIG_IsOK(ecode3)) {
13142 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTOWGS84" "', argument " "3"" of type '" "double""'");
13143 : }
13144 3 : arg3 = static_cast< double >(val3);
13145 3 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
13146 3 : if (!SWIG_IsOK(ecode4)) {
13147 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTOWGS84" "', argument " "4"" of type '" "double""'");
13148 : }
13149 3 : arg4 = static_cast< double >(val4);
13150 3 : if (swig_obj[4]) {
13151 2 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13152 2 : if (!SWIG_IsOK(ecode5)) {
13153 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTOWGS84" "', argument " "5"" of type '" "double""'");
13154 : }
13155 2 : arg5 = static_cast< double >(val5);
13156 : }
13157 3 : if (swig_obj[5]) {
13158 2 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13159 2 : if (!SWIG_IsOK(ecode6)) {
13160 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTOWGS84" "', argument " "6"" of type '" "double""'");
13161 : }
13162 2 : arg6 = static_cast< double >(val6);
13163 : }
13164 3 : if (swig_obj[6]) {
13165 2 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
13166 2 : if (!SWIG_IsOK(ecode7)) {
13167 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTOWGS84" "', argument " "7"" of type '" "double""'");
13168 : }
13169 2 : arg7 = static_cast< double >(val7);
13170 : }
13171 3 : if (swig_obj[7]) {
13172 2 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13173 2 : if (!SWIG_IsOK(ecode8)) {
13174 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetTOWGS84" "', argument " "8"" of type '" "double""'");
13175 : }
13176 2 : arg8 = static_cast< double >(val8);
13177 : }
13178 3 : {
13179 3 : const int bLocalUseExceptions = GetUseExceptions();
13180 3 : if ( bLocalUseExceptions ) {
13181 1 : pushErrorHandler();
13182 : }
13183 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
13184 3 : if ( bLocalUseExceptions ) {
13185 1 : popErrorHandler();
13186 : }
13187 : #ifndef SED_HACKS
13188 : if ( bLocalUseExceptions ) {
13189 : CPLErr eclass = CPLGetLastErrorType();
13190 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13191 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13192 : }
13193 : }
13194 : #endif
13195 : }
13196 3 : {
13197 : /* %typemap(out) OGRErr */
13198 3 : if ( result != 0 && GetUseExceptions()) {
13199 0 : const char* pszMessage = CPLGetLastErrorMsg();
13200 0 : if( pszMessage[0] != '\0' )
13201 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13202 : else
13203 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13204 0 : SWIG_fail;
13205 : }
13206 : }
13207 3 : {
13208 : /* %typemap(ret) OGRErr */
13209 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13210 3 : resultobj = PyInt_FromLong( result );
13211 : }
13212 : }
13213 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13214 : return resultobj;
13215 : fail:
13216 : return NULL;
13217 : }
13218 :
13219 :
13220 4 : SWIGINTERN PyObject *_wrap_SpatialReference_HasTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13221 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13222 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13223 4 : void *argp1 = 0 ;
13224 4 : int res1 = 0 ;
13225 4 : PyObject *swig_obj[1] ;
13226 4 : bool result;
13227 :
13228 4 : if (!args) SWIG_fail;
13229 4 : swig_obj[0] = args;
13230 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13231 4 : if (!SWIG_IsOK(res1)) {
13232 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13233 : }
13234 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13235 4 : {
13236 4 : const int bLocalUseExceptions = GetUseExceptions();
13237 4 : if ( bLocalUseExceptions ) {
13238 0 : pushErrorHandler();
13239 : }
13240 4 : result = (bool)OSRSpatialReferenceShadow_HasTOWGS84(arg1);
13241 4 : if ( bLocalUseExceptions ) {
13242 0 : popErrorHandler();
13243 : }
13244 : #ifndef SED_HACKS
13245 : if ( bLocalUseExceptions ) {
13246 : CPLErr eclass = CPLGetLastErrorType();
13247 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13248 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13249 : }
13250 : }
13251 : #endif
13252 : }
13253 4 : resultobj = SWIG_From_bool(static_cast< bool >(result));
13254 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13255 : return resultobj;
13256 : fail:
13257 : return NULL;
13258 : }
13259 :
13260 :
13261 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13262 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13263 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13264 4 : double *arg2 ;
13265 4 : void *argp1 = 0 ;
13266 4 : int res1 = 0 ;
13267 4 : double argout2[7] ;
13268 4 : PyObject *swig_obj[1] ;
13269 4 : OGRErr result;
13270 :
13271 4 : {
13272 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
13273 4 : memset(argout2, 0, sizeof(argout2));
13274 4 : arg2 = argout2;
13275 : }
13276 4 : if (!args) SWIG_fail;
13277 4 : swig_obj[0] = args;
13278 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13279 4 : if (!SWIG_IsOK(res1)) {
13280 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13281 : }
13282 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13283 4 : {
13284 4 : const int bLocalUseExceptions = GetUseExceptions();
13285 4 : if ( bLocalUseExceptions ) {
13286 2 : pushErrorHandler();
13287 : }
13288 4 : result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
13289 4 : if ( bLocalUseExceptions ) {
13290 2 : popErrorHandler();
13291 : }
13292 : #ifndef SED_HACKS
13293 : if ( bLocalUseExceptions ) {
13294 : CPLErr eclass = CPLGetLastErrorType();
13295 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13296 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13297 : }
13298 : }
13299 : #endif
13300 : }
13301 4 : {
13302 : /* %typemap(out) OGRErr */
13303 4 : if ( result != 0 && GetUseExceptions()) {
13304 0 : const char* pszMessage = CPLGetLastErrorMsg();
13305 0 : if( pszMessage[0] != '\0' )
13306 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13307 : else
13308 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13309 0 : SWIG_fail;
13310 : }
13311 : }
13312 4 : {
13313 : /* %typemap(argout) (double argout[ANY]) */
13314 4 : PyObject *out = CreateTupleFromDoubleArray( arg2, 7 );
13315 : #if SWIG_VERSION >= 0x040300
13316 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
13317 : #else
13318 4 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
13319 : #endif
13320 : }
13321 4 : {
13322 : /* %typemap(ret) OGRErr */
13323 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13324 0 : resultobj = PyInt_FromLong( result );
13325 : }
13326 : }
13327 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13328 : return resultobj;
13329 : fail:
13330 : return NULL;
13331 : }
13332 :
13333 :
13334 2 : SWIGINTERN PyObject *_wrap_SpatialReference_AddGuessedTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13335 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13336 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13337 2 : void *argp1 = 0 ;
13338 2 : int res1 = 0 ;
13339 2 : PyObject *swig_obj[1] ;
13340 2 : OGRErr result;
13341 :
13342 2 : if (!args) SWIG_fail;
13343 2 : swig_obj[0] = args;
13344 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13345 2 : if (!SWIG_IsOK(res1)) {
13346 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AddGuessedTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13347 : }
13348 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13349 2 : {
13350 2 : const int bLocalUseExceptions = GetUseExceptions();
13351 2 : if ( bLocalUseExceptions ) {
13352 0 : pushErrorHandler();
13353 : }
13354 2 : result = (OGRErr)OSRSpatialReferenceShadow_AddGuessedTOWGS84(arg1);
13355 2 : if ( bLocalUseExceptions ) {
13356 0 : popErrorHandler();
13357 : }
13358 : #ifndef SED_HACKS
13359 : if ( bLocalUseExceptions ) {
13360 : CPLErr eclass = CPLGetLastErrorType();
13361 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13362 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13363 : }
13364 : }
13365 : #endif
13366 : }
13367 2 : {
13368 : /* %typemap(out) OGRErr */
13369 2 : if ( result != 0 && GetUseExceptions()) {
13370 0 : const char* pszMessage = CPLGetLastErrorMsg();
13371 0 : if( pszMessage[0] != '\0' )
13372 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13373 : else
13374 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13375 0 : SWIG_fail;
13376 : }
13377 : }
13378 2 : {
13379 : /* %typemap(ret) OGRErr */
13380 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13381 2 : resultobj = PyInt_FromLong( result );
13382 : }
13383 : }
13384 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13385 : return resultobj;
13386 : fail:
13387 : return NULL;
13388 : }
13389 :
13390 :
13391 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLocalCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13392 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13393 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13394 1 : char *arg2 = (char *) 0 ;
13395 1 : void *argp1 = 0 ;
13396 1 : int res1 = 0 ;
13397 1 : int res2 ;
13398 1 : char *buf2 = 0 ;
13399 1 : int alloc2 = 0 ;
13400 1 : PyObject *swig_obj[2] ;
13401 1 : OGRErr result;
13402 :
13403 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLocalCS", 2, 2, swig_obj)) SWIG_fail;
13404 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13405 1 : if (!SWIG_IsOK(res1)) {
13406 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLocalCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13407 : }
13408 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13409 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13410 1 : if (!SWIG_IsOK(res2)) {
13411 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLocalCS" "', argument " "2"" of type '" "char const *""'");
13412 : }
13413 1 : arg2 = reinterpret_cast< char * >(buf2);
13414 1 : {
13415 1 : const int bLocalUseExceptions = GetUseExceptions();
13416 1 : if ( bLocalUseExceptions ) {
13417 1 : pushErrorHandler();
13418 : }
13419 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
13420 1 : if ( bLocalUseExceptions ) {
13421 1 : popErrorHandler();
13422 : }
13423 : #ifndef SED_HACKS
13424 : if ( bLocalUseExceptions ) {
13425 : CPLErr eclass = CPLGetLastErrorType();
13426 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13427 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13428 : }
13429 : }
13430 : #endif
13431 : }
13432 1 : {
13433 : /* %typemap(out) OGRErr */
13434 1 : if ( result != 0 && GetUseExceptions()) {
13435 0 : const char* pszMessage = CPLGetLastErrorMsg();
13436 0 : if( pszMessage[0] != '\0' )
13437 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13438 : else
13439 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13440 0 : SWIG_fail;
13441 : }
13442 : }
13443 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13444 1 : {
13445 : /* %typemap(ret) OGRErr */
13446 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13447 1 : resultobj = PyInt_FromLong( result );
13448 : }
13449 : }
13450 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13451 : return resultobj;
13452 0 : fail:
13453 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13454 : return NULL;
13455 : }
13456 :
13457 :
13458 17 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13459 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13460 17 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13461 17 : char *arg2 = (char *) 0 ;
13462 17 : char *arg3 = (char *) 0 ;
13463 17 : char *arg4 = (char *) 0 ;
13464 17 : double arg5 ;
13465 17 : double arg6 ;
13466 17 : char *arg7 = (char *) "Greenwich" ;
13467 17 : double arg8 = (double) 0.0 ;
13468 17 : char *arg9 = (char *) "degree" ;
13469 17 : double arg10 = (double) 0.0174532925199433 ;
13470 17 : void *argp1 = 0 ;
13471 17 : int res1 = 0 ;
13472 17 : int res2 ;
13473 17 : char *buf2 = 0 ;
13474 17 : int alloc2 = 0 ;
13475 17 : int res3 ;
13476 17 : char *buf3 = 0 ;
13477 17 : int alloc3 = 0 ;
13478 17 : int res4 ;
13479 17 : char *buf4 = 0 ;
13480 17 : int alloc4 = 0 ;
13481 17 : double val5 ;
13482 17 : int ecode5 = 0 ;
13483 17 : double val6 ;
13484 17 : int ecode6 = 0 ;
13485 17 : int res7 ;
13486 17 : char *buf7 = 0 ;
13487 17 : int alloc7 = 0 ;
13488 17 : double val8 ;
13489 17 : int ecode8 = 0 ;
13490 17 : int res9 ;
13491 17 : char *buf9 = 0 ;
13492 17 : int alloc9 = 0 ;
13493 17 : double val10 ;
13494 17 : int ecode10 = 0 ;
13495 17 : PyObject *swig_obj[10] ;
13496 17 : OGRErr result;
13497 :
13498 17 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeogCS", 6, 10, swig_obj)) SWIG_fail;
13499 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13500 17 : if (!SWIG_IsOK(res1)) {
13501 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13502 : }
13503 17 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13504 17 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13505 17 : if (!SWIG_IsOK(res2)) {
13506 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeogCS" "', argument " "2"" of type '" "char const *""'");
13507 : }
13508 17 : arg2 = reinterpret_cast< char * >(buf2);
13509 17 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13510 17 : if (!SWIG_IsOK(res3)) {
13511 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetGeogCS" "', argument " "3"" of type '" "char const *""'");
13512 : }
13513 17 : arg3 = reinterpret_cast< char * >(buf3);
13514 17 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
13515 17 : if (!SWIG_IsOK(res4)) {
13516 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetGeogCS" "', argument " "4"" of type '" "char const *""'");
13517 : }
13518 17 : arg4 = reinterpret_cast< char * >(buf4);
13519 17 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13520 17 : if (!SWIG_IsOK(ecode5)) {
13521 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGeogCS" "', argument " "5"" of type '" "double""'");
13522 : }
13523 17 : arg5 = static_cast< double >(val5);
13524 17 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13525 17 : if (!SWIG_IsOK(ecode6)) {
13526 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGeogCS" "', argument " "6"" of type '" "double""'");
13527 : }
13528 17 : arg6 = static_cast< double >(val6);
13529 17 : if (swig_obj[6]) {
13530 3 : res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
13531 3 : if (!SWIG_IsOK(res7)) {
13532 0 : SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "SpatialReference_SetGeogCS" "', argument " "7"" of type '" "char const *""'");
13533 : }
13534 3 : arg7 = reinterpret_cast< char * >(buf7);
13535 : }
13536 17 : if (swig_obj[7]) {
13537 3 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13538 3 : if (!SWIG_IsOK(ecode8)) {
13539 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetGeogCS" "', argument " "8"" of type '" "double""'");
13540 : }
13541 3 : arg8 = static_cast< double >(val8);
13542 : }
13543 17 : if (swig_obj[8]) {
13544 3 : res9 = SWIG_AsCharPtrAndSize(swig_obj[8], &buf9, NULL, &alloc9);
13545 3 : if (!SWIG_IsOK(res9)) {
13546 0 : SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "SpatialReference_SetGeogCS" "', argument " "9"" of type '" "char const *""'");
13547 : }
13548 3 : arg9 = reinterpret_cast< char * >(buf9);
13549 : }
13550 17 : if (swig_obj[9]) {
13551 3 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
13552 3 : if (!SWIG_IsOK(ecode10)) {
13553 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "SpatialReference_SetGeogCS" "', argument " "10"" of type '" "double""'");
13554 : }
13555 3 : arg10 = static_cast< double >(val10);
13556 : }
13557 17 : {
13558 17 : const int bLocalUseExceptions = GetUseExceptions();
13559 17 : if ( bLocalUseExceptions ) {
13560 15 : pushErrorHandler();
13561 : }
13562 17 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9,arg10);
13563 17 : if ( bLocalUseExceptions ) {
13564 15 : popErrorHandler();
13565 : }
13566 : #ifndef SED_HACKS
13567 : if ( bLocalUseExceptions ) {
13568 : CPLErr eclass = CPLGetLastErrorType();
13569 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13570 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13571 : }
13572 : }
13573 : #endif
13574 : }
13575 17 : {
13576 : /* %typemap(out) OGRErr */
13577 17 : if ( result != 0 && GetUseExceptions()) {
13578 0 : const char* pszMessage = CPLGetLastErrorMsg();
13579 0 : if( pszMessage[0] != '\0' )
13580 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13581 : else
13582 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13583 0 : SWIG_fail;
13584 : }
13585 : }
13586 17 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13587 17 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13588 17 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13589 17 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13590 17 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13591 17 : {
13592 : /* %typemap(ret) OGRErr */
13593 17 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13594 17 : resultobj = PyInt_FromLong( result );
13595 : }
13596 : }
13597 17 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13598 : return resultobj;
13599 0 : fail:
13600 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13601 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13602 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13603 0 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13604 0 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13605 : return NULL;
13606 : }
13607 :
13608 :
13609 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13610 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13611 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13612 1 : char *arg2 = (char *) "unnamed" ;
13613 1 : void *argp1 = 0 ;
13614 1 : int res1 = 0 ;
13615 1 : int res2 ;
13616 1 : char *buf2 = 0 ;
13617 1 : int alloc2 = 0 ;
13618 1 : PyObject *swig_obj[2] ;
13619 1 : OGRErr result;
13620 :
13621 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjCS", 1, 2, swig_obj)) SWIG_fail;
13622 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13623 1 : if (!SWIG_IsOK(res1)) {
13624 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13625 : }
13626 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13627 1 : if (swig_obj[1]) {
13628 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13629 1 : if (!SWIG_IsOK(res2)) {
13630 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjCS" "', argument " "2"" of type '" "char const *""'");
13631 : }
13632 1 : arg2 = reinterpret_cast< char * >(buf2);
13633 : }
13634 1 : {
13635 1 : if (!arg2) {
13636 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13637 : }
13638 : }
13639 1 : {
13640 1 : const int bLocalUseExceptions = GetUseExceptions();
13641 1 : if ( bLocalUseExceptions ) {
13642 1 : pushErrorHandler();
13643 : }
13644 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
13645 1 : if ( bLocalUseExceptions ) {
13646 1 : popErrorHandler();
13647 : }
13648 : #ifndef SED_HACKS
13649 : if ( bLocalUseExceptions ) {
13650 : CPLErr eclass = CPLGetLastErrorType();
13651 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13652 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13653 : }
13654 : }
13655 : #endif
13656 : }
13657 1 : {
13658 : /* %typemap(out) OGRErr */
13659 1 : if ( result != 0 && GetUseExceptions()) {
13660 0 : const char* pszMessage = CPLGetLastErrorMsg();
13661 0 : if( pszMessage[0] != '\0' )
13662 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13663 : else
13664 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13665 0 : SWIG_fail;
13666 : }
13667 : }
13668 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13669 1 : {
13670 : /* %typemap(ret) OGRErr */
13671 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13672 1 : resultobj = PyInt_FromLong( result );
13673 : }
13674 : }
13675 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13676 : return resultobj;
13677 0 : fail:
13678 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13679 : return NULL;
13680 : }
13681 :
13682 :
13683 4 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeocCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13684 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13685 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13686 4 : char *arg2 = (char *) "unnamed" ;
13687 4 : void *argp1 = 0 ;
13688 4 : int res1 = 0 ;
13689 4 : int res2 ;
13690 4 : char *buf2 = 0 ;
13691 4 : int alloc2 = 0 ;
13692 4 : PyObject *swig_obj[2] ;
13693 4 : OGRErr result;
13694 :
13695 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeocCS", 1, 2, swig_obj)) SWIG_fail;
13696 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13697 4 : if (!SWIG_IsOK(res1)) {
13698 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13699 : }
13700 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13701 4 : if (swig_obj[1]) {
13702 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13703 4 : if (!SWIG_IsOK(res2)) {
13704 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeocCS" "', argument " "2"" of type '" "char const *""'");
13705 : }
13706 4 : arg2 = reinterpret_cast< char * >(buf2);
13707 : }
13708 4 : {
13709 4 : if (!arg2) {
13710 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13711 : }
13712 : }
13713 4 : {
13714 4 : const int bLocalUseExceptions = GetUseExceptions();
13715 4 : if ( bLocalUseExceptions ) {
13716 4 : pushErrorHandler();
13717 : }
13718 4 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
13719 4 : if ( bLocalUseExceptions ) {
13720 4 : popErrorHandler();
13721 : }
13722 : #ifndef SED_HACKS
13723 : if ( bLocalUseExceptions ) {
13724 : CPLErr eclass = CPLGetLastErrorType();
13725 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13726 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13727 : }
13728 : }
13729 : #endif
13730 : }
13731 4 : {
13732 : /* %typemap(out) OGRErr */
13733 5 : if ( result != 0 && GetUseExceptions()) {
13734 1 : const char* pszMessage = CPLGetLastErrorMsg();
13735 1 : if( pszMessage[0] != '\0' )
13736 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13737 : else
13738 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13739 1 : SWIG_fail;
13740 : }
13741 : }
13742 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13743 3 : {
13744 : /* %typemap(ret) OGRErr */
13745 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13746 3 : resultobj = PyInt_FromLong( result );
13747 : }
13748 : }
13749 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13750 : return resultobj;
13751 1 : fail:
13752 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13753 : return NULL;
13754 : }
13755 :
13756 :
13757 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13758 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13759 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13760 0 : char *arg2 = (char *) "unnamed" ;
13761 0 : char *arg3 = (char *) "unnamed" ;
13762 0 : int arg4 = (int) 0 ;
13763 0 : void *argp1 = 0 ;
13764 0 : int res1 = 0 ;
13765 0 : int res2 ;
13766 0 : char *buf2 = 0 ;
13767 0 : int alloc2 = 0 ;
13768 0 : int res3 ;
13769 0 : char *buf3 = 0 ;
13770 0 : int alloc3 = 0 ;
13771 0 : int val4 ;
13772 0 : int ecode4 = 0 ;
13773 0 : PyObject *swig_obj[4] ;
13774 0 : OGRErr result;
13775 :
13776 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetVertCS", 1, 4, swig_obj)) SWIG_fail;
13777 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13778 0 : if (!SWIG_IsOK(res1)) {
13779 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13780 : }
13781 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13782 0 : if (swig_obj[1]) {
13783 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13784 0 : if (!SWIG_IsOK(res2)) {
13785 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
13786 : }
13787 0 : arg2 = reinterpret_cast< char * >(buf2);
13788 : }
13789 0 : if (swig_obj[2]) {
13790 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13791 0 : if (!SWIG_IsOK(res3)) {
13792 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
13793 : }
13794 0 : arg3 = reinterpret_cast< char * >(buf3);
13795 : }
13796 0 : if (swig_obj[3]) {
13797 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
13798 0 : if (!SWIG_IsOK(ecode4)) {
13799 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
13800 : }
13801 : arg4 = static_cast< int >(val4);
13802 : }
13803 0 : {
13804 0 : const int bLocalUseExceptions = GetUseExceptions();
13805 0 : if ( bLocalUseExceptions ) {
13806 0 : pushErrorHandler();
13807 : }
13808 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
13809 0 : if ( bLocalUseExceptions ) {
13810 0 : popErrorHandler();
13811 : }
13812 : #ifndef SED_HACKS
13813 : if ( bLocalUseExceptions ) {
13814 : CPLErr eclass = CPLGetLastErrorType();
13815 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13816 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13817 : }
13818 : }
13819 : #endif
13820 : }
13821 0 : {
13822 : /* %typemap(out) OGRErr */
13823 0 : if ( result != 0 && GetUseExceptions()) {
13824 0 : const char* pszMessage = CPLGetLastErrorMsg();
13825 0 : if( pszMessage[0] != '\0' )
13826 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13827 : else
13828 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13829 0 : SWIG_fail;
13830 : }
13831 : }
13832 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13833 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13834 0 : {
13835 : /* %typemap(ret) OGRErr */
13836 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13837 0 : resultobj = PyInt_FromLong( result );
13838 : }
13839 : }
13840 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13841 : return resultobj;
13842 0 : fail:
13843 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13844 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13845 : return NULL;
13846 : }
13847 :
13848 :
13849 8 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCompoundCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13850 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13851 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13852 8 : char *arg2 = (char *) 0 ;
13853 8 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
13854 8 : OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
13855 8 : void *argp1 = 0 ;
13856 8 : int res1 = 0 ;
13857 8 : int res2 ;
13858 8 : char *buf2 = 0 ;
13859 8 : int alloc2 = 0 ;
13860 8 : void *argp3 = 0 ;
13861 8 : int res3 = 0 ;
13862 8 : void *argp4 = 0 ;
13863 8 : int res4 = 0 ;
13864 8 : PyObject *swig_obj[4] ;
13865 8 : OGRErr result;
13866 :
13867 8 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCompoundCS", 4, 4, swig_obj)) SWIG_fail;
13868 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13869 8 : if (!SWIG_IsOK(res1)) {
13870 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13871 : }
13872 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13873 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13874 8 : if (!SWIG_IsOK(res2)) {
13875 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetCompoundCS" "', argument " "2"" of type '" "char const *""'");
13876 : }
13877 8 : arg2 = reinterpret_cast< char * >(buf2);
13878 8 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13879 8 : if (!SWIG_IsOK(res3)) {
13880 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
13881 : }
13882 8 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
13883 8 : res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13884 8 : if (!SWIG_IsOK(res4)) {
13885 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'");
13886 : }
13887 8 : arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
13888 8 : {
13889 8 : if (!arg2) {
13890 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13891 : }
13892 : }
13893 8 : {
13894 8 : if (!arg3) {
13895 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13896 : }
13897 : }
13898 8 : {
13899 8 : if (!arg4) {
13900 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13901 : }
13902 : }
13903 8 : {
13904 8 : const int bLocalUseExceptions = GetUseExceptions();
13905 8 : if ( bLocalUseExceptions ) {
13906 8 : pushErrorHandler();
13907 : }
13908 8 : result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
13909 8 : if ( bLocalUseExceptions ) {
13910 8 : popErrorHandler();
13911 : }
13912 : #ifndef SED_HACKS
13913 : if ( bLocalUseExceptions ) {
13914 : CPLErr eclass = CPLGetLastErrorType();
13915 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13916 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13917 : }
13918 : }
13919 : #endif
13920 : }
13921 8 : {
13922 : /* %typemap(out) OGRErr */
13923 8 : if ( result != 0 && GetUseExceptions()) {
13924 0 : const char* pszMessage = CPLGetLastErrorMsg();
13925 0 : if( pszMessage[0] != '\0' )
13926 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13927 : else
13928 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13929 0 : SWIG_fail;
13930 : }
13931 : }
13932 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13933 8 : {
13934 : /* %typemap(ret) OGRErr */
13935 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13936 8 : resultobj = PyInt_FromLong( result );
13937 : }
13938 : }
13939 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13940 : return resultobj;
13941 0 : fail:
13942 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13943 : return NULL;
13944 : }
13945 :
13946 :
13947 290 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13948 290 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13949 290 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13950 290 : char **arg2 = (char **) 0 ;
13951 290 : void *argp1 = 0 ;
13952 290 : int res1 = 0 ;
13953 290 : char *val2 ;
13954 290 : PyObject *swig_obj[2] ;
13955 290 : OGRErr result;
13956 :
13957 290 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromWkt", 2, 2, swig_obj)) SWIG_fail;
13958 290 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13959 290 : if (!SWIG_IsOK(res1)) {
13960 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13961 : }
13962 290 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13963 290 : {
13964 : /* %typemap(in) (char **ignorechange) */
13965 290 : if( !PyArg_Parse( swig_obj[1], "s", &val2 ) ) {
13966 0 : PyErr_SetString( PyExc_TypeError, "not a string" );
13967 0 : SWIG_fail;
13968 : }
13969 290 : arg2 = &val2;
13970 : }
13971 290 : {
13972 290 : const int bLocalUseExceptions = GetUseExceptions();
13973 290 : if ( bLocalUseExceptions ) {
13974 182 : pushErrorHandler();
13975 : }
13976 290 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
13977 290 : if ( bLocalUseExceptions ) {
13978 182 : popErrorHandler();
13979 : }
13980 : #ifndef SED_HACKS
13981 : if ( bLocalUseExceptions ) {
13982 : CPLErr eclass = CPLGetLastErrorType();
13983 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13984 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13985 : }
13986 : }
13987 : #endif
13988 : }
13989 290 : {
13990 : /* %typemap(out) OGRErr */
13991 325 : if ( result != 0 && GetUseExceptions()) {
13992 0 : const char* pszMessage = CPLGetLastErrorMsg();
13993 0 : if( pszMessage[0] != '\0' )
13994 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13995 : else
13996 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13997 0 : SWIG_fail;
13998 : }
13999 : }
14000 290 : {
14001 : /* %typemap(ret) OGRErr */
14002 290 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14003 290 : resultobj = PyInt_FromLong( result );
14004 : }
14005 : }
14006 290 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14007 : return resultobj;
14008 : fail:
14009 : return NULL;
14010 : }
14011 :
14012 :
14013 179 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14014 179 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14015 179 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14016 179 : char *arg2 = (char *) 0 ;
14017 179 : void *argp1 = 0 ;
14018 179 : int res1 = 0 ;
14019 179 : int res2 ;
14020 179 : char *buf2 = 0 ;
14021 179 : int alloc2 = 0 ;
14022 179 : PyObject *swig_obj[2] ;
14023 179 : OGRErr result;
14024 :
14025 179 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromProj4", 2, 2, swig_obj)) SWIG_fail;
14026 179 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14027 179 : if (!SWIG_IsOK(res1)) {
14028 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14029 : }
14030 179 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14031 179 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14032 179 : if (!SWIG_IsOK(res2)) {
14033 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromProj4" "', argument " "2"" of type '" "char *""'");
14034 : }
14035 179 : arg2 = reinterpret_cast< char * >(buf2);
14036 179 : {
14037 179 : const int bLocalUseExceptions = GetUseExceptions();
14038 179 : if ( bLocalUseExceptions ) {
14039 150 : pushErrorHandler();
14040 : }
14041 179 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
14042 179 : if ( bLocalUseExceptions ) {
14043 150 : popErrorHandler();
14044 : }
14045 : #ifndef SED_HACKS
14046 : if ( bLocalUseExceptions ) {
14047 : CPLErr eclass = CPLGetLastErrorType();
14048 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14049 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14050 : }
14051 : }
14052 : #endif
14053 : }
14054 179 : {
14055 : /* %typemap(out) OGRErr */
14056 184 : if ( result != 0 && GetUseExceptions()) {
14057 5 : const char* pszMessage = CPLGetLastErrorMsg();
14058 5 : if( pszMessage[0] != '\0' )
14059 5 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14060 : else
14061 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14062 5 : SWIG_fail;
14063 : }
14064 : }
14065 174 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14066 174 : {
14067 : /* %typemap(ret) OGRErr */
14068 174 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14069 174 : resultobj = PyInt_FromLong( result );
14070 : }
14071 : }
14072 174 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14073 : return resultobj;
14074 5 : fail:
14075 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14076 : return NULL;
14077 : }
14078 :
14079 :
14080 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14081 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14082 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14083 3 : char *arg2 = (char *) 0 ;
14084 3 : void *argp1 = 0 ;
14085 3 : int res1 = 0 ;
14086 3 : int res2 ;
14087 3 : char *buf2 = 0 ;
14088 3 : int alloc2 = 0 ;
14089 3 : PyObject *swig_obj[2] ;
14090 3 : OGRErr result;
14091 :
14092 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUrl", 2, 2, swig_obj)) SWIG_fail;
14093 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14094 3 : if (!SWIG_IsOK(res1)) {
14095 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUrl" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14096 : }
14097 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14098 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14099 3 : if (!SWIG_IsOK(res2)) {
14100 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromUrl" "', argument " "2"" of type '" "char *""'");
14101 : }
14102 3 : arg2 = reinterpret_cast< char * >(buf2);
14103 3 : {
14104 3 : if (!arg2) {
14105 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14106 : }
14107 : }
14108 3 : {
14109 3 : const int bLocalUseExceptions = GetUseExceptions();
14110 3 : if ( bLocalUseExceptions ) {
14111 3 : pushErrorHandler();
14112 : }
14113 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
14114 3 : if ( bLocalUseExceptions ) {
14115 3 : popErrorHandler();
14116 : }
14117 : #ifndef SED_HACKS
14118 : if ( bLocalUseExceptions ) {
14119 : CPLErr eclass = CPLGetLastErrorType();
14120 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14121 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14122 : }
14123 : }
14124 : #endif
14125 : }
14126 3 : {
14127 : /* %typemap(out) OGRErr */
14128 3 : if ( result != 0 && GetUseExceptions()) {
14129 0 : const char* pszMessage = CPLGetLastErrorMsg();
14130 0 : if( pszMessage[0] != '\0' )
14131 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14132 : else
14133 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14134 0 : SWIG_fail;
14135 : }
14136 : }
14137 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14138 3 : {
14139 : /* %typemap(ret) OGRErr */
14140 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14141 3 : resultobj = PyInt_FromLong( result );
14142 : }
14143 : }
14144 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14145 : return resultobj;
14146 0 : fail:
14147 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14148 : return NULL;
14149 : }
14150 :
14151 :
14152 11 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14153 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14154 11 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14155 11 : char **arg2 = (char **) 0 ;
14156 11 : void *argp1 = 0 ;
14157 11 : int res1 = 0 ;
14158 11 : PyObject *swig_obj[2] ;
14159 11 : OGRErr result;
14160 :
14161 11 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromESRI", 2, 2, swig_obj)) SWIG_fail;
14162 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14163 11 : if (!SWIG_IsOK(res1)) {
14164 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14165 : }
14166 11 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14167 11 : {
14168 : /* %typemap(in) char **dict */
14169 11 : arg2 = NULL;
14170 11 : if ( PySequence_Check( swig_obj[1] ) ) {
14171 11 : int bErr = FALSE;
14172 11 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14173 11 : if ( bErr )
14174 : {
14175 0 : SWIG_fail;
14176 : }
14177 : }
14178 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14179 0 : int bErr = FALSE;
14180 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14181 0 : if ( bErr )
14182 : {
14183 0 : SWIG_fail;
14184 : }
14185 : }
14186 : else {
14187 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14188 0 : SWIG_fail;
14189 : }
14190 : }
14191 11 : {
14192 11 : const int bLocalUseExceptions = GetUseExceptions();
14193 11 : if ( bLocalUseExceptions ) {
14194 11 : pushErrorHandler();
14195 : }
14196 11 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
14197 11 : if ( bLocalUseExceptions ) {
14198 11 : popErrorHandler();
14199 : }
14200 : #ifndef SED_HACKS
14201 : if ( bLocalUseExceptions ) {
14202 : CPLErr eclass = CPLGetLastErrorType();
14203 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14204 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14205 : }
14206 : }
14207 : #endif
14208 : }
14209 11 : {
14210 : /* %typemap(out) OGRErr */
14211 12 : if ( result != 0 && GetUseExceptions()) {
14212 1 : const char* pszMessage = CPLGetLastErrorMsg();
14213 1 : if( pszMessage[0] != '\0' )
14214 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14215 : else
14216 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14217 1 : SWIG_fail;
14218 : }
14219 : }
14220 10 : {
14221 : /* %typemap(freearg) char **dict */
14222 10 : CSLDestroy( arg2 );
14223 : }
14224 10 : {
14225 : /* %typemap(ret) OGRErr */
14226 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14227 10 : resultobj = PyInt_FromLong( result );
14228 : }
14229 : }
14230 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14231 : return resultobj;
14232 1 : fail:
14233 1 : {
14234 : /* %typemap(freearg) char **dict */
14235 1 : CSLDestroy( arg2 );
14236 : }
14237 : return NULL;
14238 : }
14239 :
14240 :
14241 906 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14242 906 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14243 906 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14244 906 : int arg2 ;
14245 906 : void *argp1 = 0 ;
14246 906 : int res1 = 0 ;
14247 906 : int val2 ;
14248 906 : int ecode2 = 0 ;
14249 906 : PyObject *swig_obj[2] ;
14250 906 : OGRErr result;
14251 :
14252 906 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSG", 2, 2, swig_obj)) SWIG_fail;
14253 906 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14254 906 : if (!SWIG_IsOK(res1)) {
14255 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14256 : }
14257 906 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14258 906 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14259 906 : if (!SWIG_IsOK(ecode2)) {
14260 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "2"" of type '" "int""'");
14261 : }
14262 906 : arg2 = static_cast< int >(val2);
14263 906 : {
14264 906 : const int bLocalUseExceptions = GetUseExceptions();
14265 906 : if ( bLocalUseExceptions ) {
14266 582 : pushErrorHandler();
14267 : }
14268 906 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
14269 906 : if ( bLocalUseExceptions ) {
14270 582 : popErrorHandler();
14271 : }
14272 : #ifndef SED_HACKS
14273 : if ( bLocalUseExceptions ) {
14274 : CPLErr eclass = CPLGetLastErrorType();
14275 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14276 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14277 : }
14278 : }
14279 : #endif
14280 : }
14281 906 : {
14282 : /* %typemap(out) OGRErr */
14283 910 : if ( result != 0 && GetUseExceptions()) {
14284 4 : const char* pszMessage = CPLGetLastErrorMsg();
14285 4 : if( pszMessage[0] != '\0' )
14286 4 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14287 : else
14288 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14289 4 : SWIG_fail;
14290 : }
14291 : }
14292 902 : {
14293 : /* %typemap(ret) OGRErr */
14294 902 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14295 902 : resultobj = PyInt_FromLong( result );
14296 : }
14297 : }
14298 902 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14299 : return resultobj;
14300 : fail:
14301 : return NULL;
14302 : }
14303 :
14304 :
14305 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSGA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14306 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14307 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14308 2 : int arg2 ;
14309 2 : void *argp1 = 0 ;
14310 2 : int res1 = 0 ;
14311 2 : int val2 ;
14312 2 : int ecode2 = 0 ;
14313 2 : PyObject *swig_obj[2] ;
14314 2 : OGRErr result;
14315 :
14316 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSGA", 2, 2, swig_obj)) SWIG_fail;
14317 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14318 2 : if (!SWIG_IsOK(res1)) {
14319 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14320 : }
14321 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14322 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14323 2 : if (!SWIG_IsOK(ecode2)) {
14324 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "2"" of type '" "int""'");
14325 : }
14326 2 : arg2 = static_cast< int >(val2);
14327 2 : {
14328 2 : const int bLocalUseExceptions = GetUseExceptions();
14329 2 : if ( bLocalUseExceptions ) {
14330 2 : pushErrorHandler();
14331 : }
14332 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
14333 2 : if ( bLocalUseExceptions ) {
14334 2 : popErrorHandler();
14335 : }
14336 : #ifndef SED_HACKS
14337 : if ( bLocalUseExceptions ) {
14338 : CPLErr eclass = CPLGetLastErrorType();
14339 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14340 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14341 : }
14342 : }
14343 : #endif
14344 : }
14345 2 : {
14346 : /* %typemap(out) OGRErr */
14347 2 : if ( result != 0 && GetUseExceptions()) {
14348 0 : const char* pszMessage = CPLGetLastErrorMsg();
14349 0 : if( pszMessage[0] != '\0' )
14350 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14351 : else
14352 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14353 0 : SWIG_fail;
14354 : }
14355 : }
14356 2 : {
14357 : /* %typemap(ret) OGRErr */
14358 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14359 2 : resultobj = PyInt_FromLong( result );
14360 : }
14361 : }
14362 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14363 : return resultobj;
14364 : fail:
14365 : return NULL;
14366 : }
14367 :
14368 :
14369 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14370 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14371 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14372 7 : char *arg2 = (char *) 0 ;
14373 7 : char *arg3 = (char *) "METRE" ;
14374 7 : double *arg4 = (double *) (double *)0 ;
14375 7 : void *argp1 = 0 ;
14376 7 : int res1 = 0 ;
14377 7 : int res2 ;
14378 7 : char *buf2 = 0 ;
14379 7 : int alloc2 = 0 ;
14380 7 : int res3 ;
14381 7 : char *buf3 = 0 ;
14382 7 : int alloc3 = 0 ;
14383 7 : double argin4[17] ;
14384 7 : PyObject *swig_obj[4] ;
14385 7 : OGRErr result;
14386 :
14387 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromPCI", 2, 4, swig_obj)) SWIG_fail;
14388 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14389 7 : if (!SWIG_IsOK(res1)) {
14390 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14391 : }
14392 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14393 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14394 7 : if (!SWIG_IsOK(res2)) {
14395 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromPCI" "', argument " "2"" of type '" "char const *""'");
14396 : }
14397 7 : arg2 = reinterpret_cast< char * >(buf2);
14398 7 : if (swig_obj[2]) {
14399 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14400 7 : if (!SWIG_IsOK(res3)) {
14401 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromPCI" "', argument " "3"" of type '" "char const *""'");
14402 : }
14403 7 : arg3 = reinterpret_cast< char * >(buf3);
14404 : }
14405 7 : if (swig_obj[3]) {
14406 7 : {
14407 : /* %typemap(in) (double argin4[ANY]) */
14408 7 : arg4 = argin4;
14409 7 : if (! PySequence_Check(swig_obj[3]) ) {
14410 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14411 0 : SWIG_fail;
14412 : }
14413 7 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14414 7 : if ( seq_size != 17 ) {
14415 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14416 0 : SWIG_fail;
14417 : }
14418 126 : for (unsigned int i=0; i<17; i++) {
14419 119 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14420 119 : double val;
14421 119 : if ( !PyArg_Parse(o, "d", &val ) ) {
14422 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14423 0 : Py_DECREF(o);
14424 0 : SWIG_fail;
14425 : }
14426 119 : arg4[i] = val;
14427 119 : Py_DECREF(o);
14428 : }
14429 : }
14430 : }
14431 7 : {
14432 7 : const int bLocalUseExceptions = GetUseExceptions();
14433 7 : if ( bLocalUseExceptions ) {
14434 7 : pushErrorHandler();
14435 : }
14436 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
14437 7 : if ( bLocalUseExceptions ) {
14438 7 : popErrorHandler();
14439 : }
14440 : #ifndef SED_HACKS
14441 : if ( bLocalUseExceptions ) {
14442 : CPLErr eclass = CPLGetLastErrorType();
14443 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14444 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14445 : }
14446 : }
14447 : #endif
14448 : }
14449 7 : {
14450 : /* %typemap(out) OGRErr */
14451 7 : if ( result != 0 && GetUseExceptions()) {
14452 0 : const char* pszMessage = CPLGetLastErrorMsg();
14453 0 : if( pszMessage[0] != '\0' )
14454 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14455 : else
14456 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14457 0 : SWIG_fail;
14458 : }
14459 : }
14460 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14461 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14462 7 : {
14463 : /* %typemap(ret) OGRErr */
14464 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14465 7 : resultobj = PyInt_FromLong( result );
14466 : }
14467 : }
14468 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14469 : return resultobj;
14470 0 : fail:
14471 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14472 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14473 : return NULL;
14474 : }
14475 :
14476 :
14477 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14478 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14479 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14480 2 : long arg2 ;
14481 2 : long arg3 = (long) 0 ;
14482 2 : double *arg4 = (double *) (double *)0 ;
14483 2 : long arg5 = (long) 0 ;
14484 2 : void *argp1 = 0 ;
14485 2 : int res1 = 0 ;
14486 2 : long val2 ;
14487 2 : int ecode2 = 0 ;
14488 2 : long val3 ;
14489 2 : int ecode3 = 0 ;
14490 2 : double argin4[15] ;
14491 2 : long val5 ;
14492 2 : int ecode5 = 0 ;
14493 2 : PyObject *swig_obj[5] ;
14494 2 : OGRErr result;
14495 :
14496 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUSGS", 2, 5, swig_obj)) SWIG_fail;
14497 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14498 2 : if (!SWIG_IsOK(res1)) {
14499 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14500 : }
14501 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14502 2 : ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
14503 2 : if (!SWIG_IsOK(ecode2)) {
14504 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "2"" of type '" "long""'");
14505 : }
14506 2 : arg2 = static_cast< long >(val2);
14507 2 : if (swig_obj[2]) {
14508 2 : ecode3 = SWIG_AsVal_long(swig_obj[2], &val3);
14509 2 : if (!SWIG_IsOK(ecode3)) {
14510 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "3"" of type '" "long""'");
14511 : }
14512 2 : arg3 = static_cast< long >(val3);
14513 : }
14514 2 : if (swig_obj[3]) {
14515 2 : {
14516 : /* %typemap(in) (double argin4[ANY]) */
14517 2 : arg4 = argin4;
14518 2 : if (! PySequence_Check(swig_obj[3]) ) {
14519 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14520 0 : SWIG_fail;
14521 : }
14522 2 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14523 2 : if ( seq_size != 15 ) {
14524 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14525 0 : SWIG_fail;
14526 : }
14527 32 : for (unsigned int i=0; i<15; i++) {
14528 30 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14529 30 : double val;
14530 30 : if ( !PyArg_Parse(o, "d", &val ) ) {
14531 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14532 0 : Py_DECREF(o);
14533 0 : SWIG_fail;
14534 : }
14535 30 : arg4[i] = val;
14536 30 : Py_DECREF(o);
14537 : }
14538 : }
14539 : }
14540 2 : if (swig_obj[4]) {
14541 2 : ecode5 = SWIG_AsVal_long(swig_obj[4], &val5);
14542 2 : if (!SWIG_IsOK(ecode5)) {
14543 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "5"" of type '" "long""'");
14544 : }
14545 2 : arg5 = static_cast< long >(val5);
14546 : }
14547 2 : {
14548 2 : const int bLocalUseExceptions = GetUseExceptions();
14549 2 : if ( bLocalUseExceptions ) {
14550 2 : pushErrorHandler();
14551 : }
14552 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
14553 2 : if ( bLocalUseExceptions ) {
14554 2 : popErrorHandler();
14555 : }
14556 : #ifndef SED_HACKS
14557 : if ( bLocalUseExceptions ) {
14558 : CPLErr eclass = CPLGetLastErrorType();
14559 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14560 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14561 : }
14562 : }
14563 : #endif
14564 : }
14565 2 : {
14566 : /* %typemap(out) OGRErr */
14567 2 : if ( result != 0 && GetUseExceptions()) {
14568 0 : const char* pszMessage = CPLGetLastErrorMsg();
14569 0 : if( pszMessage[0] != '\0' )
14570 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14571 : else
14572 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14573 0 : SWIG_fail;
14574 : }
14575 : }
14576 2 : {
14577 : /* %typemap(ret) OGRErr */
14578 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14579 2 : resultobj = PyInt_FromLong( result );
14580 : }
14581 : }
14582 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14583 : return resultobj;
14584 : fail:
14585 : return NULL;
14586 : }
14587 :
14588 :
14589 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14590 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14591 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14592 1 : char *arg2 = (char *) 0 ;
14593 1 : void *argp1 = 0 ;
14594 1 : int res1 = 0 ;
14595 1 : int res2 ;
14596 1 : char *buf2 = 0 ;
14597 1 : int alloc2 = 0 ;
14598 1 : PyObject *swig_obj[2] ;
14599 1 : OGRErr result;
14600 :
14601 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromXML", 2, 2, swig_obj)) SWIG_fail;
14602 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14603 1 : if (!SWIG_IsOK(res1)) {
14604 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14605 : }
14606 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14607 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14608 1 : if (!SWIG_IsOK(res2)) {
14609 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromXML" "', argument " "2"" of type '" "char const *""'");
14610 : }
14611 1 : arg2 = reinterpret_cast< char * >(buf2);
14612 1 : {
14613 1 : const int bLocalUseExceptions = GetUseExceptions();
14614 1 : if ( bLocalUseExceptions ) {
14615 1 : pushErrorHandler();
14616 : }
14617 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
14618 1 : if ( bLocalUseExceptions ) {
14619 1 : popErrorHandler();
14620 : }
14621 : #ifndef SED_HACKS
14622 : if ( bLocalUseExceptions ) {
14623 : CPLErr eclass = CPLGetLastErrorType();
14624 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14625 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14626 : }
14627 : }
14628 : #endif
14629 : }
14630 1 : {
14631 : /* %typemap(out) OGRErr */
14632 1 : if ( result != 0 && GetUseExceptions()) {
14633 0 : const char* pszMessage = CPLGetLastErrorMsg();
14634 0 : if( pszMessage[0] != '\0' )
14635 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14636 : else
14637 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14638 0 : SWIG_fail;
14639 : }
14640 : }
14641 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14642 1 : {
14643 : /* %typemap(ret) OGRErr */
14644 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14645 1 : resultobj = PyInt_FromLong( result );
14646 : }
14647 : }
14648 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14649 : return resultobj;
14650 0 : fail:
14651 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14652 : return NULL;
14653 : }
14654 :
14655 :
14656 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14657 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14658 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14659 7 : char *arg2 = (char *) 0 ;
14660 7 : char *arg3 = (char *) 0 ;
14661 7 : char *arg4 = (char *) 0 ;
14662 7 : void *argp1 = 0 ;
14663 7 : int res1 = 0 ;
14664 7 : int res2 ;
14665 7 : char *buf2 = 0 ;
14666 7 : int alloc2 = 0 ;
14667 7 : int res3 ;
14668 7 : char *buf3 = 0 ;
14669 7 : int alloc3 = 0 ;
14670 7 : int res4 ;
14671 7 : char *buf4 = 0 ;
14672 7 : int alloc4 = 0 ;
14673 7 : PyObject *swig_obj[4] ;
14674 7 : OGRErr result;
14675 :
14676 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromERM", 4, 4, swig_obj)) SWIG_fail;
14677 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14678 7 : if (!SWIG_IsOK(res1)) {
14679 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14680 : }
14681 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14682 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14683 7 : if (!SWIG_IsOK(res2)) {
14684 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
14685 : }
14686 7 : arg2 = reinterpret_cast< char * >(buf2);
14687 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14688 7 : if (!SWIG_IsOK(res3)) {
14689 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
14690 : }
14691 7 : arg3 = reinterpret_cast< char * >(buf3);
14692 7 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
14693 7 : if (!SWIG_IsOK(res4)) {
14694 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
14695 : }
14696 7 : arg4 = reinterpret_cast< char * >(buf4);
14697 7 : {
14698 7 : if (!arg2) {
14699 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14700 : }
14701 : }
14702 7 : {
14703 7 : if (!arg3) {
14704 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14705 : }
14706 : }
14707 7 : {
14708 7 : const int bLocalUseExceptions = GetUseExceptions();
14709 7 : if ( bLocalUseExceptions ) {
14710 7 : pushErrorHandler();
14711 : }
14712 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
14713 7 : if ( bLocalUseExceptions ) {
14714 7 : popErrorHandler();
14715 : }
14716 : #ifndef SED_HACKS
14717 : if ( bLocalUseExceptions ) {
14718 : CPLErr eclass = CPLGetLastErrorType();
14719 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14720 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14721 : }
14722 : }
14723 : #endif
14724 : }
14725 7 : {
14726 : /* %typemap(out) OGRErr */
14727 7 : if ( result != 0 && GetUseExceptions()) {
14728 0 : const char* pszMessage = CPLGetLastErrorMsg();
14729 0 : if( pszMessage[0] != '\0' )
14730 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14731 : else
14732 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14733 0 : SWIG_fail;
14734 : }
14735 : }
14736 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14737 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14738 7 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14739 7 : {
14740 : /* %typemap(ret) OGRErr */
14741 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14742 7 : resultobj = PyInt_FromLong( result );
14743 : }
14744 : }
14745 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14746 : return resultobj;
14747 0 : fail:
14748 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14749 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14750 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14751 : return NULL;
14752 : }
14753 :
14754 :
14755 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14756 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14757 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14758 3 : char *arg2 = (char *) 0 ;
14759 3 : void *argp1 = 0 ;
14760 3 : int res1 = 0 ;
14761 3 : int res2 ;
14762 3 : char *buf2 = 0 ;
14763 3 : int alloc2 = 0 ;
14764 3 : PyObject *swig_obj[2] ;
14765 3 : OGRErr result;
14766 :
14767 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromMICoordSys", 2, 2, swig_obj)) SWIG_fail;
14768 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14769 3 : if (!SWIG_IsOK(res1)) {
14770 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14771 : }
14772 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14773 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14774 3 : if (!SWIG_IsOK(res2)) {
14775 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "2"" of type '" "char const *""'");
14776 : }
14777 3 : arg2 = reinterpret_cast< char * >(buf2);
14778 3 : {
14779 3 : const int bLocalUseExceptions = GetUseExceptions();
14780 3 : if ( bLocalUseExceptions ) {
14781 2 : pushErrorHandler();
14782 : }
14783 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
14784 3 : if ( bLocalUseExceptions ) {
14785 2 : popErrorHandler();
14786 : }
14787 : #ifndef SED_HACKS
14788 : if ( bLocalUseExceptions ) {
14789 : CPLErr eclass = CPLGetLastErrorType();
14790 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14791 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14792 : }
14793 : }
14794 : #endif
14795 : }
14796 3 : {
14797 : /* %typemap(out) OGRErr */
14798 3 : if ( result != 0 && GetUseExceptions()) {
14799 0 : const char* pszMessage = CPLGetLastErrorMsg();
14800 0 : if( pszMessage[0] != '\0' )
14801 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14802 : else
14803 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14804 0 : SWIG_fail;
14805 : }
14806 : }
14807 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14808 3 : {
14809 : /* %typemap(ret) OGRErr */
14810 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14811 3 : resultobj = PyInt_FromLong( result );
14812 : }
14813 : }
14814 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14815 : return resultobj;
14816 0 : fail:
14817 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14818 : return NULL;
14819 : }
14820 :
14821 :
14822 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromOzi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14823 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14824 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14825 3 : char **arg2 = (char **) 0 ;
14826 3 : void *argp1 = 0 ;
14827 3 : int res1 = 0 ;
14828 3 : PyObject *swig_obj[2] ;
14829 3 : OGRErr result;
14830 :
14831 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromOzi", 2, 2, swig_obj)) SWIG_fail;
14832 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14833 3 : if (!SWIG_IsOK(res1)) {
14834 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromOzi" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14835 : }
14836 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14837 3 : {
14838 : /* %typemap(in) char **dict */
14839 3 : arg2 = NULL;
14840 3 : if ( PySequence_Check( swig_obj[1] ) ) {
14841 3 : int bErr = FALSE;
14842 3 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14843 3 : if ( bErr )
14844 : {
14845 0 : SWIG_fail;
14846 : }
14847 : }
14848 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14849 0 : int bErr = FALSE;
14850 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14851 0 : if ( bErr )
14852 : {
14853 0 : SWIG_fail;
14854 : }
14855 : }
14856 : else {
14857 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14858 0 : SWIG_fail;
14859 : }
14860 : }
14861 3 : {
14862 3 : if (!arg2) {
14863 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14864 : }
14865 : }
14866 3 : {
14867 3 : const int bLocalUseExceptions = GetUseExceptions();
14868 3 : if ( bLocalUseExceptions ) {
14869 3 : pushErrorHandler();
14870 : }
14871 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *const *)arg2);
14872 3 : if ( bLocalUseExceptions ) {
14873 3 : popErrorHandler();
14874 : }
14875 : #ifndef SED_HACKS
14876 : if ( bLocalUseExceptions ) {
14877 : CPLErr eclass = CPLGetLastErrorType();
14878 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14879 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14880 : }
14881 : }
14882 : #endif
14883 : }
14884 3 : {
14885 : /* %typemap(out) OGRErr */
14886 3 : if ( result != 0 && GetUseExceptions()) {
14887 0 : const char* pszMessage = CPLGetLastErrorMsg();
14888 0 : if( pszMessage[0] != '\0' )
14889 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14890 : else
14891 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14892 0 : SWIG_fail;
14893 : }
14894 : }
14895 3 : {
14896 : /* %typemap(freearg) char **dict */
14897 3 : CSLDestroy( arg2 );
14898 : }
14899 3 : {
14900 : /* %typemap(ret) OGRErr */
14901 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14902 3 : resultobj = PyInt_FromLong( result );
14903 : }
14904 : }
14905 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14906 : return resultobj;
14907 0 : fail:
14908 0 : {
14909 : /* %typemap(freearg) char **dict */
14910 0 : CSLDestroy( arg2 );
14911 : }
14912 : return NULL;
14913 : }
14914 :
14915 :
14916 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14917 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14918 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14919 4 : char **arg2 = (char **) 0 ;
14920 4 : char *arg3 = (char *) NULL ;
14921 4 : void *argp1 = 0 ;
14922 4 : int res1 = 0 ;
14923 4 : int res3 ;
14924 4 : char *buf3 = 0 ;
14925 4 : int alloc3 = 0 ;
14926 4 : PyObject *swig_obj[3] ;
14927 4 : OGRErr result;
14928 :
14929 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromCF1", 2, 3, swig_obj)) SWIG_fail;
14930 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14931 4 : if (!SWIG_IsOK(res1)) {
14932 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14933 : }
14934 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14935 4 : {
14936 : /* %typemap(in) char **dict */
14937 4 : arg2 = NULL;
14938 4 : if ( PySequence_Check( swig_obj[1] ) ) {
14939 0 : int bErr = FALSE;
14940 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14941 0 : if ( bErr )
14942 : {
14943 0 : SWIG_fail;
14944 : }
14945 : }
14946 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14947 4 : int bErr = FALSE;
14948 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14949 4 : if ( bErr )
14950 : {
14951 0 : SWIG_fail;
14952 : }
14953 : }
14954 : else {
14955 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14956 0 : SWIG_fail;
14957 : }
14958 : }
14959 4 : if (swig_obj[2]) {
14960 4 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14961 4 : if (!SWIG_IsOK(res3)) {
14962 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromCF1" "', argument " "3"" of type '" "char const *""'");
14963 : }
14964 4 : arg3 = reinterpret_cast< char * >(buf3);
14965 : }
14966 4 : {
14967 4 : const int bLocalUseExceptions = GetUseExceptions();
14968 4 : if ( bLocalUseExceptions ) {
14969 4 : pushErrorHandler();
14970 : }
14971 4 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromCF1(arg1,arg2,(char const *)arg3);
14972 4 : if ( bLocalUseExceptions ) {
14973 4 : popErrorHandler();
14974 : }
14975 : #ifndef SED_HACKS
14976 : if ( bLocalUseExceptions ) {
14977 : CPLErr eclass = CPLGetLastErrorType();
14978 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14979 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14980 : }
14981 : }
14982 : #endif
14983 : }
14984 4 : {
14985 : /* %typemap(out) OGRErr */
14986 4 : if ( result != 0 && GetUseExceptions()) {
14987 0 : const char* pszMessage = CPLGetLastErrorMsg();
14988 0 : if( pszMessage[0] != '\0' )
14989 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14990 : else
14991 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14992 0 : SWIG_fail;
14993 : }
14994 : }
14995 4 : {
14996 : /* %typemap(freearg) char **dict */
14997 4 : CSLDestroy( arg2 );
14998 : }
14999 4 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15000 4 : {
15001 : /* %typemap(ret) OGRErr */
15002 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15003 4 : resultobj = PyInt_FromLong( result );
15004 : }
15005 : }
15006 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15007 : return resultobj;
15008 0 : fail:
15009 0 : {
15010 : /* %typemap(freearg) char **dict */
15011 0 : CSLDestroy( arg2 );
15012 : }
15013 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15014 : return NULL;
15015 : }
15016 :
15017 :
15018 1194 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15019 1194 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15020 1194 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15021 1194 : char **arg2 = (char **) 0 ;
15022 1194 : char **arg3 = (char **) NULL ;
15023 1194 : void *argp1 = 0 ;
15024 1194 : int res1 = 0 ;
15025 1194 : char *argout2 = 0 ;
15026 1194 : PyObject *swig_obj[2] ;
15027 1194 : OGRErr result;
15028 :
15029 1194 : {
15030 : /* %typemap(in,numinputs=0) (char **argout2) */
15031 1194 : arg2 = &argout2;
15032 : }
15033 1194 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToWkt", 1, 2, swig_obj)) SWIG_fail;
15034 1194 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15035 1194 : if (!SWIG_IsOK(res1)) {
15036 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15037 : }
15038 1194 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15039 1194 : if (swig_obj[1]) {
15040 24 : {
15041 : /* %typemap(in) char **dict */
15042 24 : arg3 = NULL;
15043 24 : if ( PySequence_Check( swig_obj[1] ) ) {
15044 24 : int bErr = FALSE;
15045 24 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15046 24 : if ( bErr )
15047 : {
15048 0 : SWIG_fail;
15049 : }
15050 : }
15051 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15052 0 : int bErr = FALSE;
15053 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15054 0 : if ( bErr )
15055 : {
15056 0 : SWIG_fail;
15057 : }
15058 : }
15059 : else {
15060 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15061 0 : SWIG_fail;
15062 : }
15063 : }
15064 : }
15065 1194 : {
15066 1194 : const int bLocalUseExceptions = GetUseExceptions();
15067 1194 : if ( bLocalUseExceptions ) {
15068 873 : pushErrorHandler();
15069 : }
15070 1194 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2,arg3);
15071 1194 : if ( bLocalUseExceptions ) {
15072 873 : popErrorHandler();
15073 : }
15074 : #ifndef SED_HACKS
15075 : if ( bLocalUseExceptions ) {
15076 : CPLErr eclass = CPLGetLastErrorType();
15077 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15078 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15079 : }
15080 : }
15081 : #endif
15082 : }
15083 1194 : {
15084 : /* %typemap(out) OGRErr */
15085 1194 : if ( result != 0 && GetUseExceptions()) {
15086 0 : const char* pszMessage = CPLGetLastErrorMsg();
15087 0 : if( pszMessage[0] != '\0' )
15088 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15089 : else
15090 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15091 0 : SWIG_fail;
15092 : }
15093 : }
15094 1194 : {
15095 : /* %typemap(argout) (char **argout) */
15096 1194 : PyObject *o;
15097 1194 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15098 1194 : o = GDALPythonObjectFromCStr( *arg2 );
15099 : }
15100 : else {
15101 0 : o = Py_None;
15102 0 : Py_INCREF( o );
15103 : }
15104 : #if SWIG_VERSION >= 0x040300
15105 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15106 : #else
15107 1194 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15108 : #endif
15109 : }
15110 1194 : {
15111 : /* %typemap(freearg) (char **argout) */
15112 1194 : if ( *arg2 )
15113 1194 : CPLFree( *arg2 );
15114 : }
15115 1194 : {
15116 : /* %typemap(freearg) char **dict */
15117 1194 : CSLDestroy( arg3 );
15118 : }
15119 1194 : {
15120 : /* %typemap(ret) OGRErr */
15121 2388 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15122 0 : resultobj = PyInt_FromLong( result );
15123 : }
15124 : }
15125 1194 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15126 : return resultobj;
15127 0 : fail:
15128 0 : {
15129 : /* %typemap(freearg) (char **argout) */
15130 0 : if ( *arg2 )
15131 0 : CPLFree( *arg2 );
15132 : }
15133 0 : {
15134 : /* %typemap(freearg) char **dict */
15135 0 : CSLDestroy( arg3 );
15136 : }
15137 : return NULL;
15138 : }
15139 :
15140 :
15141 50 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPrettyWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15142 50 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15143 50 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15144 50 : char **arg2 = (char **) 0 ;
15145 50 : int arg3 = (int) 0 ;
15146 50 : void *argp1 = 0 ;
15147 50 : int res1 = 0 ;
15148 50 : char *argout2 = 0 ;
15149 50 : int val3 ;
15150 50 : int ecode3 = 0 ;
15151 50 : PyObject *swig_obj[2] ;
15152 50 : OGRErr result;
15153 :
15154 50 : {
15155 : /* %typemap(in,numinputs=0) (char **argout2) */
15156 50 : arg2 = &argout2;
15157 : }
15158 50 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPrettyWkt", 1, 2, swig_obj)) SWIG_fail;
15159 50 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15160 50 : if (!SWIG_IsOK(res1)) {
15161 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15162 : }
15163 50 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15164 50 : if (swig_obj[1]) {
15165 14 : ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
15166 14 : if (!SWIG_IsOK(ecode3)) {
15167 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "3"" of type '" "int""'");
15168 : }
15169 : arg3 = static_cast< int >(val3);
15170 : }
15171 50 : {
15172 50 : const int bLocalUseExceptions = GetUseExceptions();
15173 50 : if ( bLocalUseExceptions ) {
15174 21 : pushErrorHandler();
15175 : }
15176 50 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
15177 50 : if ( bLocalUseExceptions ) {
15178 21 : popErrorHandler();
15179 : }
15180 : #ifndef SED_HACKS
15181 : if ( bLocalUseExceptions ) {
15182 : CPLErr eclass = CPLGetLastErrorType();
15183 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15184 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15185 : }
15186 : }
15187 : #endif
15188 : }
15189 50 : {
15190 : /* %typemap(out) OGRErr */
15191 50 : if ( result != 0 && GetUseExceptions()) {
15192 0 : const char* pszMessage = CPLGetLastErrorMsg();
15193 0 : if( pszMessage[0] != '\0' )
15194 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15195 : else
15196 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15197 0 : SWIG_fail;
15198 : }
15199 : }
15200 50 : {
15201 : /* %typemap(argout) (char **argout) */
15202 50 : PyObject *o;
15203 50 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15204 50 : o = GDALPythonObjectFromCStr( *arg2 );
15205 : }
15206 : else {
15207 0 : o = Py_None;
15208 0 : Py_INCREF( o );
15209 : }
15210 : #if SWIG_VERSION >= 0x040300
15211 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15212 : #else
15213 50 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15214 : #endif
15215 : }
15216 50 : {
15217 : /* %typemap(freearg) (char **argout) */
15218 50 : if ( *arg2 )
15219 50 : CPLFree( *arg2 );
15220 : }
15221 50 : {
15222 : /* %typemap(ret) OGRErr */
15223 100 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15224 0 : resultobj = PyInt_FromLong( result );
15225 : }
15226 : }
15227 50 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15228 : return resultobj;
15229 0 : fail:
15230 0 : {
15231 : /* %typemap(freearg) (char **argout) */
15232 0 : if ( *arg2 )
15233 0 : CPLFree( *arg2 );
15234 : }
15235 : return NULL;
15236 : }
15237 :
15238 :
15239 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPROJJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15240 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15241 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15242 2 : char **arg2 = (char **) 0 ;
15243 2 : char **arg3 = (char **) NULL ;
15244 2 : void *argp1 = 0 ;
15245 2 : int res1 = 0 ;
15246 2 : char *argout2 = 0 ;
15247 2 : PyObject *swig_obj[2] ;
15248 2 : OGRErr result;
15249 :
15250 2 : {
15251 : /* %typemap(in,numinputs=0) (char **argout2) */
15252 2 : arg2 = &argout2;
15253 : }
15254 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPROJJSON", 1, 2, swig_obj)) SWIG_fail;
15255 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15256 2 : if (!SWIG_IsOK(res1)) {
15257 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPROJJSON" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15258 : }
15259 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15260 2 : if (swig_obj[1]) {
15261 0 : {
15262 : /* %typemap(in) char **dict */
15263 0 : arg3 = NULL;
15264 0 : if ( PySequence_Check( swig_obj[1] ) ) {
15265 0 : int bErr = FALSE;
15266 0 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15267 0 : if ( bErr )
15268 : {
15269 0 : SWIG_fail;
15270 : }
15271 : }
15272 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15273 0 : int bErr = FALSE;
15274 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15275 0 : if ( bErr )
15276 : {
15277 0 : SWIG_fail;
15278 : }
15279 : }
15280 : else {
15281 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15282 0 : SWIG_fail;
15283 : }
15284 : }
15285 : }
15286 2 : {
15287 2 : const int bLocalUseExceptions = GetUseExceptions();
15288 2 : if ( bLocalUseExceptions ) {
15289 2 : pushErrorHandler();
15290 : }
15291 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPROJJSON(arg1,arg2,arg3);
15292 2 : if ( bLocalUseExceptions ) {
15293 2 : popErrorHandler();
15294 : }
15295 : #ifndef SED_HACKS
15296 : if ( bLocalUseExceptions ) {
15297 : CPLErr eclass = CPLGetLastErrorType();
15298 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15299 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15300 : }
15301 : }
15302 : #endif
15303 : }
15304 2 : {
15305 : /* %typemap(out) OGRErr */
15306 2 : if ( result != 0 && GetUseExceptions()) {
15307 0 : const char* pszMessage = CPLGetLastErrorMsg();
15308 0 : if( pszMessage[0] != '\0' )
15309 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15310 : else
15311 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15312 0 : SWIG_fail;
15313 : }
15314 : }
15315 2 : {
15316 : /* %typemap(argout) (char **argout) */
15317 2 : PyObject *o;
15318 2 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15319 2 : o = GDALPythonObjectFromCStr( *arg2 );
15320 : }
15321 : else {
15322 0 : o = Py_None;
15323 0 : Py_INCREF( o );
15324 : }
15325 : #if SWIG_VERSION >= 0x040300
15326 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15327 : #else
15328 2 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15329 : #endif
15330 : }
15331 2 : {
15332 : /* %typemap(freearg) (char **argout) */
15333 2 : if ( *arg2 )
15334 2 : CPLFree( *arg2 );
15335 : }
15336 2 : {
15337 : /* %typemap(freearg) char **dict */
15338 2 : CSLDestroy( arg3 );
15339 : }
15340 2 : {
15341 : /* %typemap(ret) OGRErr */
15342 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15343 0 : resultobj = PyInt_FromLong( result );
15344 : }
15345 : }
15346 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15347 : return resultobj;
15348 0 : fail:
15349 0 : {
15350 : /* %typemap(freearg) (char **argout) */
15351 0 : if ( *arg2 )
15352 0 : CPLFree( *arg2 );
15353 : }
15354 0 : {
15355 : /* %typemap(freearg) char **dict */
15356 0 : CSLDestroy( arg3 );
15357 : }
15358 : return NULL;
15359 : }
15360 :
15361 :
15362 423 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15363 423 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15364 423 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15365 423 : char **arg2 = (char **) 0 ;
15366 423 : void *argp1 = 0 ;
15367 423 : int res1 = 0 ;
15368 423 : char *argout2 = 0 ;
15369 423 : PyObject *swig_obj[1] ;
15370 423 : OGRErr result;
15371 :
15372 423 : {
15373 : /* %typemap(in,numinputs=0) (char **argout2) */
15374 423 : arg2 = &argout2;
15375 : }
15376 423 : if (!args) SWIG_fail;
15377 423 : swig_obj[0] = args;
15378 423 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15379 423 : if (!SWIG_IsOK(res1)) {
15380 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15381 : }
15382 423 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15383 423 : {
15384 423 : const int bLocalUseExceptions = GetUseExceptions();
15385 423 : if ( bLocalUseExceptions ) {
15386 311 : pushErrorHandler();
15387 : }
15388 423 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
15389 423 : if ( bLocalUseExceptions ) {
15390 311 : popErrorHandler();
15391 : }
15392 : #ifndef SED_HACKS
15393 : if ( bLocalUseExceptions ) {
15394 : CPLErr eclass = CPLGetLastErrorType();
15395 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15396 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15397 : }
15398 : }
15399 : #endif
15400 : }
15401 423 : {
15402 : /* %typemap(out) OGRErr */
15403 427 : if ( result != 0 && GetUseExceptions()) {
15404 3 : const char* pszMessage = CPLGetLastErrorMsg();
15405 3 : if( pszMessage[0] != '\0' )
15406 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15407 : else
15408 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15409 3 : SWIG_fail;
15410 : }
15411 : }
15412 420 : {
15413 : /* %typemap(argout) (char **argout) */
15414 420 : PyObject *o;
15415 420 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15416 420 : o = GDALPythonObjectFromCStr( *arg2 );
15417 : }
15418 : else {
15419 0 : o = Py_None;
15420 0 : Py_INCREF( o );
15421 : }
15422 : #if SWIG_VERSION >= 0x040300
15423 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15424 : #else
15425 420 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15426 : #endif
15427 : }
15428 420 : {
15429 : /* %typemap(freearg) (char **argout) */
15430 420 : if ( *arg2 )
15431 420 : CPLFree( *arg2 );
15432 : }
15433 420 : {
15434 : /* %typemap(ret) OGRErr */
15435 840 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15436 0 : resultobj = PyInt_FromLong( result );
15437 : }
15438 : }
15439 420 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15440 : return resultobj;
15441 3 : fail:
15442 3 : {
15443 : /* %typemap(freearg) (char **argout) */
15444 3 : if ( *arg2 )
15445 3 : CPLFree( *arg2 );
15446 : }
15447 : return NULL;
15448 : }
15449 :
15450 :
15451 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15452 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15453 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15454 6 : char **arg2 = (char **) 0 ;
15455 6 : char **arg3 = (char **) 0 ;
15456 6 : double **arg4 ;
15457 6 : void *argp1 = 0 ;
15458 6 : int res1 = 0 ;
15459 6 : char *argout2 = 0 ;
15460 6 : char *argout3 = 0 ;
15461 6 : double *argout4 ;
15462 6 : PyObject *swig_obj[1] ;
15463 6 : OGRErr result;
15464 :
15465 6 : {
15466 : /* %typemap(in,numinputs=0) (char **argout2) */
15467 6 : arg2 = &argout2;
15468 : }
15469 6 : {
15470 : /* %typemap(in,numinputs=0) (char **argout3) */
15471 6 : arg3 = &argout3;
15472 : }
15473 6 : {
15474 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15475 6 : argout4 = NULL;
15476 6 : arg4 = &argout4;
15477 : }
15478 6 : if (!args) SWIG_fail;
15479 6 : swig_obj[0] = args;
15480 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15481 6 : if (!SWIG_IsOK(res1)) {
15482 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15483 : }
15484 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15485 6 : {
15486 6 : const int bLocalUseExceptions = GetUseExceptions();
15487 6 : if ( bLocalUseExceptions ) {
15488 6 : pushErrorHandler();
15489 : }
15490 6 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
15491 6 : if ( bLocalUseExceptions ) {
15492 6 : popErrorHandler();
15493 : }
15494 : #ifndef SED_HACKS
15495 : if ( bLocalUseExceptions ) {
15496 : CPLErr eclass = CPLGetLastErrorType();
15497 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15498 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15499 : }
15500 : }
15501 : #endif
15502 : }
15503 6 : {
15504 : /* %typemap(out) OGRErr */
15505 6 : if ( result != 0 && GetUseExceptions()) {
15506 0 : const char* pszMessage = CPLGetLastErrorMsg();
15507 0 : if( pszMessage[0] != '\0' )
15508 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15509 : else
15510 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15511 0 : SWIG_fail;
15512 : }
15513 : }
15514 6 : {
15515 : /* %typemap(argout) (char **argout) */
15516 6 : PyObject *o;
15517 6 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15518 6 : o = GDALPythonObjectFromCStr( *arg2 );
15519 : }
15520 : else {
15521 0 : o = Py_None;
15522 0 : Py_INCREF( o );
15523 : }
15524 : #if SWIG_VERSION >= 0x040300
15525 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15526 : #else
15527 6 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15528 : #endif
15529 : }
15530 6 : {
15531 : /* %typemap(argout) (char **argout) */
15532 6 : PyObject *o;
15533 6 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15534 6 : o = GDALPythonObjectFromCStr( *arg3 );
15535 : }
15536 : else {
15537 0 : o = Py_None;
15538 0 : Py_INCREF( o );
15539 : }
15540 : #if SWIG_VERSION >= 0x040300
15541 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15542 : #else
15543 6 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15544 : #endif
15545 : }
15546 6 : {
15547 : /* %typemap(argout) (double *argout[ANY]) */
15548 6 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 17 );
15549 : #if SWIG_VERSION >= 0x040300
15550 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
15551 : #else
15552 6 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
15553 : #endif
15554 : }
15555 6 : {
15556 : /* %typemap(freearg) (char **argout) */
15557 6 : if ( *arg2 )
15558 6 : CPLFree( *arg2 );
15559 : }
15560 6 : {
15561 : /* %typemap(freearg) (char **argout) */
15562 6 : if ( *arg3 )
15563 6 : CPLFree( *arg3 );
15564 : }
15565 6 : {
15566 : /* %typemap(freearg) (double *argout[ANY]) */
15567 6 : CPLFree(*arg4);
15568 : }
15569 6 : {
15570 : /* %typemap(ret) OGRErr */
15571 12 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15572 0 : resultobj = PyInt_FromLong( result );
15573 : }
15574 : }
15575 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15576 : return resultobj;
15577 0 : fail:
15578 0 : {
15579 : /* %typemap(freearg) (char **argout) */
15580 0 : if ( *arg2 )
15581 0 : CPLFree( *arg2 );
15582 : }
15583 0 : {
15584 : /* %typemap(freearg) (char **argout) */
15585 0 : if ( *arg3 )
15586 0 : CPLFree( *arg3 );
15587 : }
15588 0 : {
15589 : /* %typemap(freearg) (double *argout[ANY]) */
15590 0 : CPLFree(*arg4);
15591 : }
15592 : return NULL;
15593 : }
15594 :
15595 :
15596 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15597 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15598 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15599 2 : long *arg2 = (long *) 0 ;
15600 2 : long *arg3 = (long *) 0 ;
15601 2 : double **arg4 ;
15602 2 : long *arg5 = (long *) 0 ;
15603 2 : void *argp1 = 0 ;
15604 2 : int res1 = 0 ;
15605 2 : long temp2 ;
15606 2 : int res2 = SWIG_TMPOBJ ;
15607 2 : long temp3 ;
15608 2 : int res3 = SWIG_TMPOBJ ;
15609 2 : double *argout4 ;
15610 2 : long temp5 ;
15611 2 : int res5 = SWIG_TMPOBJ ;
15612 2 : PyObject *swig_obj[1] ;
15613 2 : OGRErr result;
15614 :
15615 2 : arg2 = &temp2;
15616 2 : arg3 = &temp3;
15617 2 : {
15618 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15619 2 : argout4 = NULL;
15620 2 : arg4 = &argout4;
15621 : }
15622 2 : arg5 = &temp5;
15623 2 : if (!args) SWIG_fail;
15624 2 : swig_obj[0] = args;
15625 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15626 2 : if (!SWIG_IsOK(res1)) {
15627 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15628 : }
15629 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15630 2 : {
15631 2 : const int bLocalUseExceptions = GetUseExceptions();
15632 2 : if ( bLocalUseExceptions ) {
15633 2 : pushErrorHandler();
15634 : }
15635 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
15636 2 : if ( bLocalUseExceptions ) {
15637 2 : popErrorHandler();
15638 : }
15639 : #ifndef SED_HACKS
15640 : if ( bLocalUseExceptions ) {
15641 : CPLErr eclass = CPLGetLastErrorType();
15642 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15643 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15644 : }
15645 : }
15646 : #endif
15647 : }
15648 2 : {
15649 : /* %typemap(out) OGRErr */
15650 2 : if ( result != 0 && GetUseExceptions()) {
15651 0 : const char* pszMessage = CPLGetLastErrorMsg();
15652 0 : if( pszMessage[0] != '\0' )
15653 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15654 : else
15655 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15656 0 : SWIG_fail;
15657 : }
15658 : }
15659 2 : if (ReturnSame(SWIG_IsTmpObj(res2))) {
15660 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg2)));
15661 : } else {
15662 0 : int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15663 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, new_flags));
15664 : }
15665 2 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
15666 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg3)));
15667 : } else {
15668 0 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15669 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags));
15670 : }
15671 2 : {
15672 : /* %typemap(argout) (double *argout[ANY]) */
15673 2 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 15 );
15674 : #if SWIG_VERSION >= 0x040300
15675 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
15676 : #else
15677 2 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
15678 : #endif
15679 : }
15680 2 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
15681 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg5)));
15682 : } else {
15683 0 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15684 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags));
15685 : }
15686 2 : {
15687 : /* %typemap(freearg) (double *argout[ANY]) */
15688 2 : CPLFree(*arg4);
15689 : }
15690 2 : {
15691 : /* %typemap(ret) OGRErr */
15692 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15693 0 : resultobj = PyInt_FromLong( result );
15694 : }
15695 : }
15696 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15697 : return resultobj;
15698 0 : fail:
15699 0 : {
15700 : /* %typemap(freearg) (double *argout[ANY]) */
15701 0 : CPLFree(*arg4);
15702 : }
15703 : return NULL;
15704 : }
15705 :
15706 :
15707 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15708 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15709 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15710 1 : char **arg2 = (char **) 0 ;
15711 1 : char **arg3 = (char **) 0 ;
15712 1 : char **arg4 = (char **) 0 ;
15713 1 : void *argp1 = 0 ;
15714 1 : int res1 = 0 ;
15715 1 : char *argout2 = 0 ;
15716 1 : char *argout3 = 0 ;
15717 1 : char *argout4 = 0 ;
15718 1 : PyObject *swig_obj[1] ;
15719 1 : OGRErr result;
15720 :
15721 1 : {
15722 : /* %typemap(in,numinputs=0) (char **argout2) */
15723 1 : arg2 = &argout2;
15724 : }
15725 1 : {
15726 : /* %typemap(in,numinputs=0) (char **argout3) */
15727 1 : arg3 = &argout3;
15728 : }
15729 1 : {
15730 : /* %typemap(in,numinputs=0) (char **argout4) */
15731 1 : arg4 = &argout4;
15732 : }
15733 1 : if (!args) SWIG_fail;
15734 1 : swig_obj[0] = args;
15735 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15736 1 : if (!SWIG_IsOK(res1)) {
15737 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15738 : }
15739 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15740 1 : {
15741 1 : const int bLocalUseExceptions = GetUseExceptions();
15742 1 : if ( bLocalUseExceptions ) {
15743 1 : pushErrorHandler();
15744 : }
15745 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToERM(arg1,arg2,arg3,arg4);
15746 1 : if ( bLocalUseExceptions ) {
15747 1 : popErrorHandler();
15748 : }
15749 : #ifndef SED_HACKS
15750 : if ( bLocalUseExceptions ) {
15751 : CPLErr eclass = CPLGetLastErrorType();
15752 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15753 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15754 : }
15755 : }
15756 : #endif
15757 : }
15758 1 : {
15759 : /* %typemap(out) OGRErr */
15760 1 : if ( result != 0 && GetUseExceptions()) {
15761 0 : const char* pszMessage = CPLGetLastErrorMsg();
15762 0 : if( pszMessage[0] != '\0' )
15763 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15764 : else
15765 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15766 0 : SWIG_fail;
15767 : }
15768 : }
15769 1 : {
15770 : /* %typemap(argout) (char **argout) */
15771 1 : PyObject *o;
15772 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15773 1 : o = GDALPythonObjectFromCStr( *arg2 );
15774 : }
15775 : else {
15776 0 : o = Py_None;
15777 0 : Py_INCREF( o );
15778 : }
15779 : #if SWIG_VERSION >= 0x040300
15780 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15781 : #else
15782 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15783 : #endif
15784 : }
15785 1 : {
15786 : /* %typemap(argout) (char **argout) */
15787 1 : PyObject *o;
15788 1 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15789 1 : o = GDALPythonObjectFromCStr( *arg3 );
15790 : }
15791 : else {
15792 0 : o = Py_None;
15793 0 : Py_INCREF( o );
15794 : }
15795 : #if SWIG_VERSION >= 0x040300
15796 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15797 : #else
15798 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15799 : #endif
15800 : }
15801 1 : {
15802 : /* %typemap(argout) (char **argout) */
15803 1 : PyObject *o;
15804 1 : if ( ReturnSame(arg4) != NULL && *arg4 != NULL ) {
15805 1 : o = GDALPythonObjectFromCStr( *arg4 );
15806 : }
15807 : else {
15808 0 : o = Py_None;
15809 0 : Py_INCREF( o );
15810 : }
15811 : #if SWIG_VERSION >= 0x040300
15812 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15813 : #else
15814 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15815 : #endif
15816 : }
15817 1 : {
15818 : /* %typemap(freearg) (char **argout) */
15819 1 : if ( *arg2 )
15820 1 : CPLFree( *arg2 );
15821 : }
15822 1 : {
15823 : /* %typemap(freearg) (char **argout) */
15824 1 : if ( *arg3 )
15825 1 : CPLFree( *arg3 );
15826 : }
15827 1 : {
15828 : /* %typemap(freearg) (char **argout) */
15829 1 : if ( *arg4 )
15830 1 : CPLFree( *arg4 );
15831 : }
15832 1 : {
15833 : /* %typemap(ret) OGRErr */
15834 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15835 0 : resultobj = PyInt_FromLong( result );
15836 : }
15837 : }
15838 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15839 : return resultobj;
15840 0 : fail:
15841 0 : {
15842 : /* %typemap(freearg) (char **argout) */
15843 0 : if ( *arg2 )
15844 0 : CPLFree( *arg2 );
15845 : }
15846 0 : {
15847 : /* %typemap(freearg) (char **argout) */
15848 0 : if ( *arg3 )
15849 0 : CPLFree( *arg3 );
15850 : }
15851 0 : {
15852 : /* %typemap(freearg) (char **argout) */
15853 0 : if ( *arg4 )
15854 0 : CPLFree( *arg4 );
15855 : }
15856 : return NULL;
15857 : }
15858 :
15859 :
15860 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15861 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15862 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15863 2 : char **arg2 = (char **) 0 ;
15864 2 : char *arg3 = (char *) "" ;
15865 2 : void *argp1 = 0 ;
15866 2 : int res1 = 0 ;
15867 2 : char *argout2 = 0 ;
15868 2 : int res3 ;
15869 2 : char *buf3 = 0 ;
15870 2 : int alloc3 = 0 ;
15871 2 : PyObject *swig_obj[2] ;
15872 2 : OGRErr result;
15873 :
15874 2 : {
15875 : /* %typemap(in,numinputs=0) (char **argout2) */
15876 2 : arg2 = &argout2;
15877 : }
15878 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToXML", 1, 2, swig_obj)) SWIG_fail;
15879 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15880 2 : if (!SWIG_IsOK(res1)) {
15881 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15882 : }
15883 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15884 2 : if (swig_obj[1]) {
15885 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf3, NULL, &alloc3);
15886 0 : if (!SWIG_IsOK(res3)) {
15887 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ExportToXML" "', argument " "3"" of type '" "char const *""'");
15888 : }
15889 0 : arg3 = reinterpret_cast< char * >(buf3);
15890 : }
15891 2 : {
15892 2 : const int bLocalUseExceptions = GetUseExceptions();
15893 2 : if ( bLocalUseExceptions ) {
15894 2 : pushErrorHandler();
15895 : }
15896 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
15897 2 : if ( bLocalUseExceptions ) {
15898 2 : popErrorHandler();
15899 : }
15900 : #ifndef SED_HACKS
15901 : if ( bLocalUseExceptions ) {
15902 : CPLErr eclass = CPLGetLastErrorType();
15903 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15904 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15905 : }
15906 : }
15907 : #endif
15908 : }
15909 2 : {
15910 : /* %typemap(out) OGRErr */
15911 3 : if ( result != 0 && GetUseExceptions()) {
15912 1 : const char* pszMessage = CPLGetLastErrorMsg();
15913 1 : if( pszMessage[0] != '\0' )
15914 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15915 : else
15916 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15917 1 : SWIG_fail;
15918 : }
15919 : }
15920 1 : {
15921 : /* %typemap(argout) (char **argout) */
15922 1 : PyObject *o;
15923 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15924 1 : o = GDALPythonObjectFromCStr( *arg2 );
15925 : }
15926 : else {
15927 0 : o = Py_None;
15928 0 : Py_INCREF( o );
15929 : }
15930 : #if SWIG_VERSION >= 0x040300
15931 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15932 : #else
15933 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15934 : #endif
15935 : }
15936 1 : {
15937 : /* %typemap(freearg) (char **argout) */
15938 1 : if ( *arg2 )
15939 1 : CPLFree( *arg2 );
15940 : }
15941 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15942 1 : {
15943 : /* %typemap(ret) OGRErr */
15944 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15945 0 : resultobj = PyInt_FromLong( result );
15946 : }
15947 : }
15948 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15949 : return resultobj;
15950 1 : fail:
15951 1 : {
15952 : /* %typemap(freearg) (char **argout) */
15953 1 : if ( *arg2 )
15954 0 : CPLFree( *arg2 );
15955 : }
15956 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15957 : return NULL;
15958 : }
15959 :
15960 :
15961 5 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15962 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15963 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15964 5 : char **arg2 = (char **) 0 ;
15965 5 : void *argp1 = 0 ;
15966 5 : int res1 = 0 ;
15967 5 : char *argout2 = 0 ;
15968 5 : PyObject *swig_obj[1] ;
15969 5 : OGRErr result;
15970 :
15971 5 : {
15972 : /* %typemap(in,numinputs=0) (char **argout2) */
15973 5 : arg2 = &argout2;
15974 : }
15975 5 : if (!args) SWIG_fail;
15976 5 : swig_obj[0] = args;
15977 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15978 5 : if (!SWIG_IsOK(res1)) {
15979 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15980 : }
15981 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15982 5 : {
15983 5 : const int bLocalUseExceptions = GetUseExceptions();
15984 5 : if ( bLocalUseExceptions ) {
15985 3 : pushErrorHandler();
15986 : }
15987 5 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
15988 5 : if ( bLocalUseExceptions ) {
15989 3 : popErrorHandler();
15990 : }
15991 : #ifndef SED_HACKS
15992 : if ( bLocalUseExceptions ) {
15993 : CPLErr eclass = CPLGetLastErrorType();
15994 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15995 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15996 : }
15997 : }
15998 : #endif
15999 : }
16000 5 : {
16001 : /* %typemap(out) OGRErr */
16002 5 : if ( result != 0 && GetUseExceptions()) {
16003 0 : const char* pszMessage = CPLGetLastErrorMsg();
16004 0 : if( pszMessage[0] != '\0' )
16005 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16006 : else
16007 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16008 0 : SWIG_fail;
16009 : }
16010 : }
16011 5 : {
16012 : /* %typemap(argout) (char **argout) */
16013 5 : PyObject *o;
16014 5 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
16015 5 : o = GDALPythonObjectFromCStr( *arg2 );
16016 : }
16017 : else {
16018 0 : o = Py_None;
16019 0 : Py_INCREF( o );
16020 : }
16021 : #if SWIG_VERSION >= 0x040300
16022 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
16023 : #else
16024 5 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
16025 : #endif
16026 : }
16027 5 : {
16028 : /* %typemap(freearg) (char **argout) */
16029 5 : if ( *arg2 )
16030 5 : CPLFree( *arg2 );
16031 : }
16032 5 : {
16033 : /* %typemap(ret) OGRErr */
16034 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16035 0 : resultobj = PyInt_FromLong( result );
16036 : }
16037 : }
16038 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16039 : return resultobj;
16040 0 : fail:
16041 0 : {
16042 : /* %typemap(freearg) (char **argout) */
16043 0 : if ( *arg2 )
16044 0 : CPLFree( *arg2 );
16045 : }
16046 : return NULL;
16047 : }
16048 :
16049 :
16050 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16051 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16052 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16053 4 : char **arg2 = (char **) NULL ;
16054 4 : void *argp1 = 0 ;
16055 4 : int res1 = 0 ;
16056 4 : PyObject *swig_obj[2] ;
16057 4 : char **result = 0 ;
16058 :
16059 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1", 1, 2, swig_obj)) SWIG_fail;
16060 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16061 4 : if (!SWIG_IsOK(res1)) {
16062 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16063 : }
16064 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16065 4 : if (swig_obj[1]) {
16066 4 : {
16067 : /* %typemap(in) char **dict */
16068 4 : arg2 = NULL;
16069 4 : if ( PySequence_Check( swig_obj[1] ) ) {
16070 0 : int bErr = FALSE;
16071 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16072 0 : if ( bErr )
16073 : {
16074 0 : SWIG_fail;
16075 : }
16076 : }
16077 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16078 4 : int bErr = FALSE;
16079 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16080 4 : if ( bErr )
16081 : {
16082 0 : SWIG_fail;
16083 : }
16084 : }
16085 : else {
16086 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16087 0 : SWIG_fail;
16088 : }
16089 : }
16090 : }
16091 4 : {
16092 4 : const int bLocalUseExceptions = GetUseExceptions();
16093 4 : if ( bLocalUseExceptions ) {
16094 4 : pushErrorHandler();
16095 : }
16096 4 : result = (char **)OSRSpatialReferenceShadow_ExportToCF1(arg1,arg2);
16097 4 : if ( bLocalUseExceptions ) {
16098 4 : popErrorHandler();
16099 : }
16100 : #ifndef SED_HACKS
16101 : if ( bLocalUseExceptions ) {
16102 : CPLErr eclass = CPLGetLastErrorType();
16103 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16104 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16105 : }
16106 : }
16107 : #endif
16108 : }
16109 4 : {
16110 : /* %typemap(out) char **dict */
16111 4 : resultobj = GetCSLStringAsPyDict(result, true);
16112 : }
16113 4 : {
16114 : /* %typemap(freearg) char **dict */
16115 4 : CSLDestroy( arg2 );
16116 : }
16117 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16118 : return resultobj;
16119 0 : fail:
16120 0 : {
16121 : /* %typemap(freearg) char **dict */
16122 0 : CSLDestroy( arg2 );
16123 : }
16124 : return NULL;
16125 : }
16126 :
16127 :
16128 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1Units(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16129 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16130 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16131 1 : char **arg2 = (char **) NULL ;
16132 1 : void *argp1 = 0 ;
16133 1 : int res1 = 0 ;
16134 1 : PyObject *swig_obj[2] ;
16135 1 : retStringAndCPLFree *result = 0 ;
16136 :
16137 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1Units", 1, 2, swig_obj)) SWIG_fail;
16138 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16139 1 : if (!SWIG_IsOK(res1)) {
16140 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1Units" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16141 : }
16142 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16143 1 : if (swig_obj[1]) {
16144 0 : {
16145 : /* %typemap(in) char **dict */
16146 0 : arg2 = NULL;
16147 0 : if ( PySequence_Check( swig_obj[1] ) ) {
16148 0 : int bErr = FALSE;
16149 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16150 0 : if ( bErr )
16151 : {
16152 0 : SWIG_fail;
16153 : }
16154 : }
16155 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16156 0 : int bErr = FALSE;
16157 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16158 0 : if ( bErr )
16159 : {
16160 0 : SWIG_fail;
16161 : }
16162 : }
16163 : else {
16164 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16165 0 : SWIG_fail;
16166 : }
16167 : }
16168 : }
16169 1 : {
16170 1 : const int bLocalUseExceptions = GetUseExceptions();
16171 1 : if ( bLocalUseExceptions ) {
16172 1 : pushErrorHandler();
16173 : }
16174 1 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow_ExportToCF1Units(arg1,arg2);
16175 1 : if ( bLocalUseExceptions ) {
16176 1 : popErrorHandler();
16177 : }
16178 : #ifndef SED_HACKS
16179 : if ( bLocalUseExceptions ) {
16180 : CPLErr eclass = CPLGetLastErrorType();
16181 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16182 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16183 : }
16184 : }
16185 : #endif
16186 : }
16187 1 : {
16188 : /* %typemap(out) (retStringAndCPLFree*) */
16189 1 : Py_XDECREF(resultobj);
16190 1 : if(result)
16191 : {
16192 1 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
16193 1 : CPLFree(result);
16194 : }
16195 : else
16196 : {
16197 0 : resultobj = Py_None;
16198 0 : Py_INCREF(resultobj);
16199 : }
16200 : }
16201 1 : {
16202 : /* %typemap(freearg) char **dict */
16203 1 : CSLDestroy( arg2 );
16204 : }
16205 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16206 : return resultobj;
16207 0 : fail:
16208 0 : {
16209 : /* %typemap(freearg) char **dict */
16210 0 : CSLDestroy( arg2 );
16211 : }
16212 : return NULL;
16213 : }
16214 :
16215 :
16216 16 : SWIGINTERN PyObject *_wrap_SpatialReference_CloneGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16217 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16218 16 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16219 16 : void *argp1 = 0 ;
16220 16 : int res1 = 0 ;
16221 16 : PyObject *swig_obj[1] ;
16222 16 : OSRSpatialReferenceShadow *result = 0 ;
16223 :
16224 16 : if (!args) SWIG_fail;
16225 16 : swig_obj[0] = args;
16226 16 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16227 16 : if (!SWIG_IsOK(res1)) {
16228 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CloneGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16229 : }
16230 16 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16231 16 : {
16232 16 : const int bLocalUseExceptions = GetUseExceptions();
16233 16 : if ( bLocalUseExceptions ) {
16234 3 : pushErrorHandler();
16235 : }
16236 16 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
16237 16 : if ( bLocalUseExceptions ) {
16238 3 : popErrorHandler();
16239 : }
16240 : #ifndef SED_HACKS
16241 : if ( bLocalUseExceptions ) {
16242 : CPLErr eclass = CPLGetLastErrorType();
16243 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16244 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16245 : }
16246 : }
16247 : #endif
16248 : }
16249 16 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16250 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16251 : return resultobj;
16252 : fail:
16253 : return NULL;
16254 : }
16255 :
16256 :
16257 59 : SWIGINTERN PyObject *_wrap_SpatialReference_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16258 59 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16259 59 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16260 59 : void *argp1 = 0 ;
16261 59 : int res1 = 0 ;
16262 59 : PyObject *swig_obj[1] ;
16263 59 : OSRSpatialReferenceShadow *result = 0 ;
16264 :
16265 59 : if (!args) SWIG_fail;
16266 59 : swig_obj[0] = args;
16267 59 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16268 59 : if (!SWIG_IsOK(res1)) {
16269 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Clone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16270 : }
16271 59 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16272 59 : {
16273 59 : const int bLocalUseExceptions = GetUseExceptions();
16274 59 : if ( bLocalUseExceptions ) {
16275 4 : pushErrorHandler();
16276 : }
16277 59 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
16278 59 : if ( bLocalUseExceptions ) {
16279 4 : popErrorHandler();
16280 : }
16281 : #ifndef SED_HACKS
16282 : if ( bLocalUseExceptions ) {
16283 : CPLErr eclass = CPLGetLastErrorType();
16284 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16285 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16286 : }
16287 : }
16288 : #endif
16289 : }
16290 59 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16291 59 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16292 : return resultobj;
16293 : fail:
16294 : return NULL;
16295 : }
16296 :
16297 :
16298 1 : SWIGINTERN PyObject *_wrap_SpatialReference_StripVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16299 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16300 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16301 1 : void *argp1 = 0 ;
16302 1 : int res1 = 0 ;
16303 1 : PyObject *swig_obj[1] ;
16304 1 : OGRErr result;
16305 :
16306 1 : if (!args) SWIG_fail;
16307 1 : swig_obj[0] = args;
16308 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16309 1 : if (!SWIG_IsOK(res1)) {
16310 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_StripVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16311 : }
16312 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16313 1 : {
16314 1 : const int bLocalUseExceptions = GetUseExceptions();
16315 1 : if ( bLocalUseExceptions ) {
16316 1 : pushErrorHandler();
16317 : }
16318 1 : result = (OGRErr)OSRSpatialReferenceShadow_StripVertical(arg1);
16319 1 : if ( bLocalUseExceptions ) {
16320 1 : popErrorHandler();
16321 : }
16322 : #ifndef SED_HACKS
16323 : if ( bLocalUseExceptions ) {
16324 : CPLErr eclass = CPLGetLastErrorType();
16325 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16326 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16327 : }
16328 : }
16329 : #endif
16330 : }
16331 1 : {
16332 : /* %typemap(out) OGRErr */
16333 1 : if ( result != 0 && GetUseExceptions()) {
16334 0 : const char* pszMessage = CPLGetLastErrorMsg();
16335 0 : if( pszMessage[0] != '\0' )
16336 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16337 : else
16338 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16339 0 : SWIG_fail;
16340 : }
16341 : }
16342 1 : {
16343 : /* %typemap(ret) OGRErr */
16344 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16345 1 : resultobj = PyInt_FromLong( result );
16346 : }
16347 : }
16348 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16349 : return resultobj;
16350 : fail:
16351 : return NULL;
16352 : }
16353 :
16354 :
16355 114 : SWIGINTERN PyObject *_wrap_SpatialReference_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16356 114 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16357 114 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16358 114 : void *argp1 = 0 ;
16359 114 : int res1 = 0 ;
16360 114 : PyObject *swig_obj[1] ;
16361 114 : OGRErr result;
16362 :
16363 114 : if (!args) SWIG_fail;
16364 114 : swig_obj[0] = args;
16365 114 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16366 114 : if (!SWIG_IsOK(res1)) {
16367 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Validate" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16368 : }
16369 114 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16370 114 : {
16371 114 : const int bLocalUseExceptions = GetUseExceptions();
16372 114 : if ( bLocalUseExceptions ) {
16373 114 : pushErrorHandler();
16374 : }
16375 114 : result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
16376 114 : if ( bLocalUseExceptions ) {
16377 114 : popErrorHandler();
16378 : }
16379 : #ifndef SED_HACKS
16380 : if ( bLocalUseExceptions ) {
16381 : CPLErr eclass = CPLGetLastErrorType();
16382 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16383 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16384 : }
16385 : }
16386 : #endif
16387 : }
16388 114 : {
16389 : /* %typemap(out) OGRErr */
16390 150 : if ( result != 0 && GetUseExceptions()) {
16391 36 : const char* pszMessage = CPLGetLastErrorMsg();
16392 36 : if( pszMessage[0] != '\0' )
16393 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16394 : else
16395 36 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16396 36 : SWIG_fail;
16397 : }
16398 : }
16399 78 : {
16400 : /* %typemap(ret) OGRErr */
16401 78 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16402 78 : resultobj = PyInt_FromLong( result );
16403 : }
16404 : }
16405 78 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16406 : return resultobj;
16407 : fail:
16408 : return NULL;
16409 : }
16410 :
16411 :
16412 20 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphToESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16413 20 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16414 20 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16415 20 : void *argp1 = 0 ;
16416 20 : int res1 = 0 ;
16417 20 : PyObject *swig_obj[1] ;
16418 20 : OGRErr result;
16419 :
16420 20 : if (!args) SWIG_fail;
16421 20 : swig_obj[0] = args;
16422 20 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16423 20 : if (!SWIG_IsOK(res1)) {
16424 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphToESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16425 : }
16426 20 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16427 20 : {
16428 20 : const int bLocalUseExceptions = GetUseExceptions();
16429 20 : if ( bLocalUseExceptions ) {
16430 17 : pushErrorHandler();
16431 : }
16432 20 : result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
16433 20 : if ( bLocalUseExceptions ) {
16434 17 : popErrorHandler();
16435 : }
16436 : #ifndef SED_HACKS
16437 : if ( bLocalUseExceptions ) {
16438 : CPLErr eclass = CPLGetLastErrorType();
16439 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16440 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16441 : }
16442 : }
16443 : #endif
16444 : }
16445 20 : {
16446 : /* %typemap(out) OGRErr */
16447 20 : if ( result != 0 && GetUseExceptions()) {
16448 0 : const char* pszMessage = CPLGetLastErrorMsg();
16449 0 : if( pszMessage[0] != '\0' )
16450 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16451 : else
16452 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16453 0 : SWIG_fail;
16454 : }
16455 : }
16456 20 : {
16457 : /* %typemap(ret) OGRErr */
16458 20 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16459 20 : resultobj = PyInt_FromLong( result );
16460 : }
16461 : }
16462 20 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16463 : return resultobj;
16464 : fail:
16465 : return NULL;
16466 : }
16467 :
16468 :
16469 19 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16470 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16471 19 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16472 19 : void *argp1 = 0 ;
16473 19 : int res1 = 0 ;
16474 19 : PyObject *swig_obj[1] ;
16475 19 : OGRErr result;
16476 :
16477 19 : if (!args) SWIG_fail;
16478 19 : swig_obj[0] = args;
16479 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16480 19 : if (!SWIG_IsOK(res1)) {
16481 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16482 : }
16483 19 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16484 19 : {
16485 19 : const int bLocalUseExceptions = GetUseExceptions();
16486 19 : if ( bLocalUseExceptions ) {
16487 19 : pushErrorHandler();
16488 : }
16489 19 : result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
16490 19 : if ( bLocalUseExceptions ) {
16491 19 : popErrorHandler();
16492 : }
16493 : #ifndef SED_HACKS
16494 : if ( bLocalUseExceptions ) {
16495 : CPLErr eclass = CPLGetLastErrorType();
16496 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16497 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16498 : }
16499 : }
16500 : #endif
16501 : }
16502 19 : {
16503 : /* %typemap(out) OGRErr */
16504 19 : if ( result != 0 && GetUseExceptions()) {
16505 0 : const char* pszMessage = CPLGetLastErrorMsg();
16506 0 : if( pszMessage[0] != '\0' )
16507 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16508 : else
16509 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16510 0 : SWIG_fail;
16511 : }
16512 : }
16513 19 : {
16514 : /* %typemap(ret) OGRErr */
16515 19 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16516 19 : resultobj = PyInt_FromLong( result );
16517 : }
16518 : }
16519 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16520 : return resultobj;
16521 : fail:
16522 : return NULL;
16523 : }
16524 :
16525 :
16526 28 : SWIGINTERN PyObject *_wrap_SpatialReference_ConvertToOtherProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16527 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16528 28 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16529 28 : char *arg2 = (char *) 0 ;
16530 28 : char **arg3 = (char **) NULL ;
16531 28 : void *argp1 = 0 ;
16532 28 : int res1 = 0 ;
16533 28 : int res2 ;
16534 28 : char *buf2 = 0 ;
16535 28 : int alloc2 = 0 ;
16536 28 : PyObject *swig_obj[3] ;
16537 28 : OSRSpatialReferenceShadow *result = 0 ;
16538 :
16539 28 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ConvertToOtherProjection", 2, 3, swig_obj)) SWIG_fail;
16540 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16541 28 : if (!SWIG_IsOK(res1)) {
16542 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16543 : }
16544 28 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16545 28 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16546 28 : if (!SWIG_IsOK(res2)) {
16547 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "2"" of type '" "char const *""'");
16548 : }
16549 28 : arg2 = reinterpret_cast< char * >(buf2);
16550 28 : if (swig_obj[2]) {
16551 0 : {
16552 : /* %typemap(in) char **dict */
16553 0 : arg3 = NULL;
16554 0 : if ( PySequence_Check( swig_obj[2] ) ) {
16555 0 : int bErr = FALSE;
16556 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
16557 0 : if ( bErr )
16558 : {
16559 0 : SWIG_fail;
16560 : }
16561 : }
16562 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
16563 0 : int bErr = FALSE;
16564 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
16565 0 : if ( bErr )
16566 : {
16567 0 : SWIG_fail;
16568 : }
16569 : }
16570 : else {
16571 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16572 0 : SWIG_fail;
16573 : }
16574 : }
16575 : }
16576 28 : {
16577 28 : const int bLocalUseExceptions = GetUseExceptions();
16578 28 : if ( bLocalUseExceptions ) {
16579 14 : pushErrorHandler();
16580 : }
16581 28 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_ConvertToOtherProjection(arg1,(char const *)arg2,arg3);
16582 28 : if ( bLocalUseExceptions ) {
16583 14 : popErrorHandler();
16584 : }
16585 : #ifndef SED_HACKS
16586 : if ( bLocalUseExceptions ) {
16587 : CPLErr eclass = CPLGetLastErrorType();
16588 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16589 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16590 : }
16591 : }
16592 : #endif
16593 : }
16594 28 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16595 28 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16596 28 : {
16597 : /* %typemap(freearg) char **dict */
16598 28 : CSLDestroy( arg3 );
16599 : }
16600 28 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16601 : return resultobj;
16602 0 : fail:
16603 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16604 0 : {
16605 : /* %typemap(freearg) char **dict */
16606 0 : CSLDestroy( arg3 );
16607 : }
16608 : return NULL;
16609 : }
16610 :
16611 :
16612 3 : SWIGINTERN PyObject *_wrap_SpatialReference_PromoteTo3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16613 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16614 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16615 3 : char *arg2 = (char *) NULL ;
16616 3 : void *argp1 = 0 ;
16617 3 : int res1 = 0 ;
16618 3 : int res2 ;
16619 3 : char *buf2 = 0 ;
16620 3 : int alloc2 = 0 ;
16621 3 : PyObject *swig_obj[2] ;
16622 3 : OGRErr result;
16623 :
16624 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_PromoteTo3D", 1, 2, swig_obj)) SWIG_fail;
16625 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16626 3 : if (!SWIG_IsOK(res1)) {
16627 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_PromoteTo3D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16628 : }
16629 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16630 3 : if (swig_obj[1]) {
16631 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16632 0 : if (!SWIG_IsOK(res2)) {
16633 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_PromoteTo3D" "', argument " "2"" of type '" "char const *""'");
16634 : }
16635 0 : arg2 = reinterpret_cast< char * >(buf2);
16636 : }
16637 3 : {
16638 3 : const int bLocalUseExceptions = GetUseExceptions();
16639 3 : if ( bLocalUseExceptions ) {
16640 3 : pushErrorHandler();
16641 : }
16642 3 : result = (OGRErr)OSRSpatialReferenceShadow_PromoteTo3D(arg1,(char const *)arg2);
16643 3 : if ( bLocalUseExceptions ) {
16644 3 : popErrorHandler();
16645 : }
16646 : #ifndef SED_HACKS
16647 : if ( bLocalUseExceptions ) {
16648 : CPLErr eclass = CPLGetLastErrorType();
16649 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16650 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16651 : }
16652 : }
16653 : #endif
16654 : }
16655 3 : {
16656 : /* %typemap(out) OGRErr */
16657 3 : if ( result != 0 && GetUseExceptions()) {
16658 0 : const char* pszMessage = CPLGetLastErrorMsg();
16659 0 : if( pszMessage[0] != '\0' )
16660 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16661 : else
16662 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16663 0 : SWIG_fail;
16664 : }
16665 : }
16666 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16667 3 : {
16668 : /* %typemap(ret) OGRErr */
16669 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16670 3 : resultobj = PyInt_FromLong( result );
16671 : }
16672 : }
16673 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16674 : return resultobj;
16675 0 : fail:
16676 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16677 : return NULL;
16678 : }
16679 :
16680 :
16681 1 : SWIGINTERN PyObject *_wrap_SpatialReference_DemoteTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16682 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16683 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16684 1 : char *arg2 = (char *) NULL ;
16685 1 : void *argp1 = 0 ;
16686 1 : int res1 = 0 ;
16687 1 : int res2 ;
16688 1 : char *buf2 = 0 ;
16689 1 : int alloc2 = 0 ;
16690 1 : PyObject *swig_obj[2] ;
16691 1 : OGRErr result;
16692 :
16693 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_DemoteTo2D", 1, 2, swig_obj)) SWIG_fail;
16694 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16695 1 : if (!SWIG_IsOK(res1)) {
16696 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_DemoteTo2D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16697 : }
16698 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16699 1 : if (swig_obj[1]) {
16700 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16701 0 : if (!SWIG_IsOK(res2)) {
16702 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_DemoteTo2D" "', argument " "2"" of type '" "char const *""'");
16703 : }
16704 0 : arg2 = reinterpret_cast< char * >(buf2);
16705 : }
16706 1 : {
16707 1 : const int bLocalUseExceptions = GetUseExceptions();
16708 1 : if ( bLocalUseExceptions ) {
16709 1 : pushErrorHandler();
16710 : }
16711 1 : result = (OGRErr)OSRSpatialReferenceShadow_DemoteTo2D(arg1,(char const *)arg2);
16712 1 : if ( bLocalUseExceptions ) {
16713 1 : popErrorHandler();
16714 : }
16715 : #ifndef SED_HACKS
16716 : if ( bLocalUseExceptions ) {
16717 : CPLErr eclass = CPLGetLastErrorType();
16718 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16719 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16720 : }
16721 : }
16722 : #endif
16723 : }
16724 1 : {
16725 : /* %typemap(out) OGRErr */
16726 1 : if ( result != 0 && GetUseExceptions()) {
16727 0 : const char* pszMessage = CPLGetLastErrorMsg();
16728 0 : if( pszMessage[0] != '\0' )
16729 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16730 : else
16731 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16732 0 : SWIG_fail;
16733 : }
16734 : }
16735 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16736 1 : {
16737 : /* %typemap(ret) OGRErr */
16738 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16739 1 : resultobj = PyInt_FromLong( result );
16740 : }
16741 : }
16742 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16743 : return resultobj;
16744 0 : fail:
16745 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16746 : return NULL;
16747 : }
16748 :
16749 :
16750 275 : SWIGINTERN PyObject *SpatialReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16751 275 : PyObject *obj;
16752 275 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
16753 275 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_NewClientData(obj));
16754 275 : return SWIG_Py_Void();
16755 : }
16756 :
16757 2329 : SWIGINTERN PyObject *SpatialReference_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16758 2329 : return SWIG_Python_InitShadowInstance(args);
16759 : }
16760 :
16761 11 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16762 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16763 11 : OGRCoordinateTransformationOptions *result = 0 ;
16764 :
16765 11 : if (!SWIG_Python_UnpackTuple(args, "new_CoordinateTransformationOptions", 0, 0, 0)) SWIG_fail;
16766 11 : {
16767 11 : const int bLocalUseExceptions = GetUseExceptions();
16768 11 : if ( bLocalUseExceptions ) {
16769 10 : pushErrorHandler();
16770 : }
16771 11 : result = (OGRCoordinateTransformationOptions *)new_OGRCoordinateTransformationOptions();
16772 11 : if ( bLocalUseExceptions ) {
16773 10 : popErrorHandler();
16774 : }
16775 : #ifndef SED_HACKS
16776 : if ( bLocalUseExceptions ) {
16777 : CPLErr eclass = CPLGetLastErrorType();
16778 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16779 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16780 : }
16781 : }
16782 : #endif
16783 : }
16784 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_NEW | 0 );
16785 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16786 : return resultobj;
16787 0 : fail:
16788 0 : return NULL;
16789 : }
16790 :
16791 :
16792 11 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16793 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16794 11 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16795 11 : void *argp1 = 0 ;
16796 11 : int res1 = 0 ;
16797 11 : PyObject *swig_obj[1] ;
16798 :
16799 11 : if (!args) SWIG_fail;
16800 11 : swig_obj[0] = args;
16801 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_DISOWN | 0 );
16802 11 : if (!SWIG_IsOK(res1)) {
16803 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformationOptions" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16804 : }
16805 11 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16806 11 : {
16807 11 : const int bLocalUseExceptions = GetUseExceptions();
16808 11 : if ( bLocalUseExceptions ) {
16809 10 : pushErrorHandler();
16810 : }
16811 11 : delete_OGRCoordinateTransformationOptions(arg1);
16812 11 : if ( bLocalUseExceptions ) {
16813 10 : popErrorHandler();
16814 : }
16815 : #ifndef SED_HACKS
16816 : if ( bLocalUseExceptions ) {
16817 : CPLErr eclass = CPLGetLastErrorType();
16818 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16819 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16820 : }
16821 : }
16822 : #endif
16823 : }
16824 11 : resultobj = SWIG_Py_Void();
16825 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16826 : return resultobj;
16827 : fail:
16828 : return NULL;
16829 : }
16830 :
16831 :
16832 5 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetAreaOfInterest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16833 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16834 5 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16835 5 : double arg2 ;
16836 5 : double arg3 ;
16837 5 : double arg4 ;
16838 5 : double arg5 ;
16839 5 : void *argp1 = 0 ;
16840 5 : int res1 = 0 ;
16841 5 : double val2 ;
16842 5 : int ecode2 = 0 ;
16843 5 : double val3 ;
16844 5 : int ecode3 = 0 ;
16845 5 : double val4 ;
16846 5 : int ecode4 = 0 ;
16847 5 : double val5 ;
16848 5 : int ecode5 = 0 ;
16849 5 : PyObject *swig_obj[5] ;
16850 5 : bool result;
16851 :
16852 5 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetAreaOfInterest", 5, 5, swig_obj)) SWIG_fail;
16853 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16854 5 : if (!SWIG_IsOK(res1)) {
16855 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16856 : }
16857 5 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16858 5 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
16859 5 : if (!SWIG_IsOK(ecode2)) {
16860 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "2"" of type '" "double""'");
16861 : }
16862 5 : arg2 = static_cast< double >(val2);
16863 5 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
16864 5 : if (!SWIG_IsOK(ecode3)) {
16865 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "3"" of type '" "double""'");
16866 : }
16867 5 : arg3 = static_cast< double >(val3);
16868 5 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
16869 5 : if (!SWIG_IsOK(ecode4)) {
16870 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "4"" of type '" "double""'");
16871 : }
16872 5 : arg4 = static_cast< double >(val4);
16873 5 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
16874 5 : if (!SWIG_IsOK(ecode5)) {
16875 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "5"" of type '" "double""'");
16876 : }
16877 5 : arg5 = static_cast< double >(val5);
16878 5 : {
16879 5 : const int bLocalUseExceptions = GetUseExceptions();
16880 5 : if ( bLocalUseExceptions ) {
16881 5 : pushErrorHandler();
16882 : }
16883 5 : result = (bool)OGRCoordinateTransformationOptions_SetAreaOfInterest(arg1,arg2,arg3,arg4,arg5);
16884 5 : if ( bLocalUseExceptions ) {
16885 5 : popErrorHandler();
16886 : }
16887 : #ifndef SED_HACKS
16888 : if ( bLocalUseExceptions ) {
16889 : CPLErr eclass = CPLGetLastErrorType();
16890 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16891 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16892 : }
16893 : }
16894 : #endif
16895 : }
16896 5 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16897 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16898 : return resultobj;
16899 : fail:
16900 : return NULL;
16901 : }
16902 :
16903 :
16904 8 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16905 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16906 8 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16907 8 : char *arg2 = (char *) 0 ;
16908 8 : bool arg3 = (bool) false ;
16909 8 : void *argp1 = 0 ;
16910 8 : int res1 = 0 ;
16911 8 : int res2 ;
16912 8 : char *buf2 = 0 ;
16913 8 : int alloc2 = 0 ;
16914 8 : bool val3 ;
16915 8 : int ecode3 = 0 ;
16916 8 : PyObject *swig_obj[3] ;
16917 8 : bool result;
16918 :
16919 8 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOperation", 2, 3, swig_obj)) SWIG_fail;
16920 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16921 8 : if (!SWIG_IsOK(res1)) {
16922 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16923 : }
16924 8 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16925 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16926 8 : if (!SWIG_IsOK(res2)) {
16927 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "2"" of type '" "char const *""'");
16928 : }
16929 8 : arg2 = reinterpret_cast< char * >(buf2);
16930 8 : if (swig_obj[2]) {
16931 1 : ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
16932 1 : if (!SWIG_IsOK(ecode3)) {
16933 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "3"" of type '" "bool""'");
16934 : }
16935 : arg3 = static_cast< bool >(val3);
16936 : }
16937 8 : {
16938 8 : const int bLocalUseExceptions = GetUseExceptions();
16939 8 : if ( bLocalUseExceptions ) {
16940 7 : pushErrorHandler();
16941 : }
16942 8 : result = (bool)OGRCoordinateTransformationOptions_SetOperation(arg1,(char const *)arg2,arg3);
16943 8 : if ( bLocalUseExceptions ) {
16944 7 : popErrorHandler();
16945 : }
16946 : #ifndef SED_HACKS
16947 : if ( bLocalUseExceptions ) {
16948 : CPLErr eclass = CPLGetLastErrorType();
16949 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16950 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16951 : }
16952 : }
16953 : #endif
16954 : }
16955 8 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16956 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16957 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16958 : return resultobj;
16959 0 : fail:
16960 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16961 : return NULL;
16962 : }
16963 :
16964 :
16965 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetDesiredAccuracy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16966 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16967 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16968 1 : double arg2 ;
16969 1 : void *argp1 = 0 ;
16970 1 : int res1 = 0 ;
16971 1 : double val2 ;
16972 1 : int ecode2 = 0 ;
16973 1 : PyObject *swig_obj[2] ;
16974 1 : bool result;
16975 :
16976 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetDesiredAccuracy", 2, 2, swig_obj)) SWIG_fail;
16977 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16978 1 : if (!SWIG_IsOK(res1)) {
16979 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16980 : }
16981 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16982 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
16983 1 : if (!SWIG_IsOK(ecode2)) {
16984 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "2"" of type '" "double""'");
16985 : }
16986 1 : arg2 = static_cast< double >(val2);
16987 1 : {
16988 1 : const int bLocalUseExceptions = GetUseExceptions();
16989 1 : if ( bLocalUseExceptions ) {
16990 1 : pushErrorHandler();
16991 : }
16992 1 : result = (bool)OGRCoordinateTransformationOptions_SetDesiredAccuracy(arg1,arg2);
16993 1 : if ( bLocalUseExceptions ) {
16994 1 : popErrorHandler();
16995 : }
16996 : #ifndef SED_HACKS
16997 : if ( bLocalUseExceptions ) {
16998 : CPLErr eclass = CPLGetLastErrorType();
16999 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17000 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17001 : }
17002 : }
17003 : #endif
17004 : }
17005 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17006 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17007 : return resultobj;
17008 : fail:
17009 : return NULL;
17010 : }
17011 :
17012 :
17013 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetBallparkAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17014 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17015 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17016 1 : bool arg2 ;
17017 1 : void *argp1 = 0 ;
17018 1 : int res1 = 0 ;
17019 1 : bool val2 ;
17020 1 : int ecode2 = 0 ;
17021 1 : PyObject *swig_obj[2] ;
17022 1 : bool result;
17023 :
17024 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetBallparkAllowed", 2, 2, swig_obj)) SWIG_fail;
17025 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17026 1 : if (!SWIG_IsOK(res1)) {
17027 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17028 : }
17029 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17030 1 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
17031 1 : if (!SWIG_IsOK(ecode2)) {
17032 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "2"" of type '" "bool""'");
17033 : }
17034 1 : arg2 = static_cast< bool >(val2);
17035 1 : {
17036 1 : const int bLocalUseExceptions = GetUseExceptions();
17037 1 : if ( bLocalUseExceptions ) {
17038 1 : pushErrorHandler();
17039 : }
17040 1 : result = (bool)OGRCoordinateTransformationOptions_SetBallparkAllowed(arg1,arg2);
17041 1 : if ( bLocalUseExceptions ) {
17042 1 : popErrorHandler();
17043 : }
17044 : #ifndef SED_HACKS
17045 : if ( bLocalUseExceptions ) {
17046 : CPLErr eclass = CPLGetLastErrorType();
17047 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17048 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17049 : }
17050 : }
17051 : #endif
17052 : }
17053 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17054 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17055 : return resultobj;
17056 : fail:
17057 : return NULL;
17058 : }
17059 :
17060 :
17061 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOnlyBest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17062 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17063 0 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17064 0 : bool arg2 ;
17065 0 : void *argp1 = 0 ;
17066 0 : int res1 = 0 ;
17067 0 : bool val2 ;
17068 0 : int ecode2 = 0 ;
17069 0 : PyObject *swig_obj[2] ;
17070 0 : bool result;
17071 :
17072 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOnlyBest", 2, 2, swig_obj)) SWIG_fail;
17073 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17074 0 : if (!SWIG_IsOK(res1)) {
17075 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17076 : }
17077 0 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17078 0 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
17079 0 : if (!SWIG_IsOK(ecode2)) {
17080 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "2"" of type '" "bool""'");
17081 : }
17082 0 : arg2 = static_cast< bool >(val2);
17083 0 : {
17084 0 : const int bLocalUseExceptions = GetUseExceptions();
17085 0 : if ( bLocalUseExceptions ) {
17086 0 : pushErrorHandler();
17087 : }
17088 0 : result = (bool)OGRCoordinateTransformationOptions_SetOnlyBest(arg1,arg2);
17089 0 : if ( bLocalUseExceptions ) {
17090 0 : popErrorHandler();
17091 : }
17092 : #ifndef SED_HACKS
17093 : if ( bLocalUseExceptions ) {
17094 : CPLErr eclass = CPLGetLastErrorType();
17095 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17096 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17097 : }
17098 : }
17099 : #endif
17100 : }
17101 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17102 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17103 : return resultobj;
17104 : fail:
17105 : return NULL;
17106 : }
17107 :
17108 :
17109 275 : SWIGINTERN PyObject *CoordinateTransformationOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17110 275 : PyObject *obj;
17111 275 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
17112 275 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_NewClientData(obj));
17113 275 : return SWIG_Py_Void();
17114 : }
17115 :
17116 11 : SWIGINTERN PyObject *CoordinateTransformationOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17117 11 : return SWIG_Python_InitShadowInstance(args);
17118 : }
17119 :
17120 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17121 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17122 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17123 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17124 : void *argp1 = 0 ;
17125 : int res1 = 0 ;
17126 : void *argp2 = 0 ;
17127 : int res2 = 0 ;
17128 : OSRCoordinateTransformationShadow *result = 0 ;
17129 :
17130 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17131 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17132 : if (!SWIG_IsOK(res1)) {
17133 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17134 : }
17135 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17136 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17137 : if (!SWIG_IsOK(res2)) {
17138 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17139 : }
17140 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17141 : {
17142 : const int bLocalUseExceptions = GetUseExceptions();
17143 : if ( bLocalUseExceptions ) {
17144 : pushErrorHandler();
17145 : }
17146 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_0(arg1,arg2);
17147 : if ( bLocalUseExceptions ) {
17148 : popErrorHandler();
17149 : }
17150 : #ifndef SED_HACKS
17151 : if ( bLocalUseExceptions ) {
17152 : CPLErr eclass = CPLGetLastErrorType();
17153 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17154 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17155 : }
17156 : }
17157 : #endif
17158 : }
17159 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17160 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17161 : return resultobj;
17162 : fail:
17163 : return NULL;
17164 : }
17165 :
17166 :
17167 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17168 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17169 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17170 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17171 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) 0 ;
17172 : void *argp1 = 0 ;
17173 : int res1 = 0 ;
17174 : void *argp2 = 0 ;
17175 : int res2 = 0 ;
17176 : void *argp3 = 0 ;
17177 : int res3 = 0 ;
17178 : OSRCoordinateTransformationShadow *result = 0 ;
17179 :
17180 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
17181 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17182 : if (!SWIG_IsOK(res1)) {
17183 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17184 : }
17185 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17186 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17187 : if (!SWIG_IsOK(res2)) {
17188 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17189 : }
17190 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17191 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17192 : if (!SWIG_IsOK(res3)) {
17193 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
17194 : }
17195 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
17196 : {
17197 : const int bLocalUseExceptions = GetUseExceptions();
17198 : if ( bLocalUseExceptions ) {
17199 : pushErrorHandler();
17200 : }
17201 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_1(arg1,arg2,arg3);
17202 : if ( bLocalUseExceptions ) {
17203 : popErrorHandler();
17204 : }
17205 : #ifndef SED_HACKS
17206 : if ( bLocalUseExceptions ) {
17207 : CPLErr eclass = CPLGetLastErrorType();
17208 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17209 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17210 : }
17211 : }
17212 : #endif
17213 : }
17214 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17215 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17216 : return resultobj;
17217 : fail:
17218 : return NULL;
17219 : }
17220 :
17221 :
17222 151 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation(PyObject *self, PyObject *args) {
17223 151 : Py_ssize_t argc;
17224 151 : PyObject *argv[4] = {
17225 : 0
17226 : };
17227 :
17228 151 : if (!(argc = SWIG_Python_UnpackTuple(args, "new_CoordinateTransformation", 0, 3, argv))) SWIG_fail;
17229 151 : --argc;
17230 151 : if (argc == 2) {
17231 141 : int _v;
17232 141 : void *vptr = 0;
17233 141 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17234 141 : _v = SWIG_CheckState(res);
17235 141 : if (_v) {
17236 141 : void *vptr = 0;
17237 141 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17238 141 : _v = SWIG_CheckState(res);
17239 0 : if (_v) {
17240 141 : return _wrap_new_CoordinateTransformation__SWIG_0(self, argc, argv);
17241 : }
17242 : }
17243 : }
17244 10 : if (argc == 3) {
17245 10 : int _v;
17246 10 : void *vptr = 0;
17247 10 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17248 10 : _v = SWIG_CheckState(res);
17249 10 : if (_v) {
17250 10 : void *vptr = 0;
17251 10 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17252 10 : _v = SWIG_CheckState(res);
17253 10 : if (_v) {
17254 10 : void *vptr = 0;
17255 10 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRCoordinateTransformationOptions, 0);
17256 10 : _v = SWIG_CheckState(res);
17257 0 : if (_v) {
17258 10 : return _wrap_new_CoordinateTransformation__SWIG_1(self, argc, argv);
17259 : }
17260 : }
17261 : }
17262 : }
17263 :
17264 0 : fail:
17265 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CoordinateTransformation'.\n"
17266 : " Possible C/C++ prototypes are:\n"
17267 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *)\n"
17268 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *,OGRCoordinateTransformationOptions *)\n");
17269 : return 0;
17270 : }
17271 :
17272 :
17273 151 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17274 151 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17275 151 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17276 151 : void *argp1 = 0 ;
17277 151 : int res1 = 0 ;
17278 151 : PyObject *swig_obj[1] ;
17279 :
17280 151 : if (!args) SWIG_fail;
17281 151 : swig_obj[0] = args;
17282 151 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_DISOWN | 0 );
17283 151 : if (!SWIG_IsOK(res1)) {
17284 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformation" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17285 : }
17286 151 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17287 151 : {
17288 151 : const int bLocalUseExceptions = GetUseExceptions();
17289 151 : if ( bLocalUseExceptions ) {
17290 133 : pushErrorHandler();
17291 : }
17292 151 : delete_OSRCoordinateTransformationShadow(arg1);
17293 151 : if ( bLocalUseExceptions ) {
17294 133 : popErrorHandler();
17295 : }
17296 : #ifndef SED_HACKS
17297 : if ( bLocalUseExceptions ) {
17298 : CPLErr eclass = CPLGetLastErrorType();
17299 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17300 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17301 : }
17302 : }
17303 : #endif
17304 : }
17305 151 : resultobj = SWIG_Py_Void();
17306 151 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17307 : return resultobj;
17308 : fail:
17309 : return NULL;
17310 : }
17311 :
17312 :
17313 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_GetInverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17314 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17315 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17316 1 : void *argp1 = 0 ;
17317 1 : int res1 = 0 ;
17318 1 : PyObject *swig_obj[1] ;
17319 1 : OSRCoordinateTransformationShadow *result = 0 ;
17320 :
17321 1 : if (!args) SWIG_fail;
17322 1 : swig_obj[0] = args;
17323 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17324 1 : if (!SWIG_IsOK(res1)) {
17325 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_GetInverse" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17326 : }
17327 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17328 1 : {
17329 1 : const int bLocalUseExceptions = GetUseExceptions();
17330 1 : if ( bLocalUseExceptions ) {
17331 1 : pushErrorHandler();
17332 : }
17333 1 : result = (OSRCoordinateTransformationShadow *)OSRCoordinateTransformationShadow_GetInverse(arg1);
17334 1 : if ( bLocalUseExceptions ) {
17335 1 : popErrorHandler();
17336 : }
17337 : #ifndef SED_HACKS
17338 : if ( bLocalUseExceptions ) {
17339 : CPLErr eclass = CPLGetLastErrorType();
17340 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17341 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17342 : }
17343 : }
17344 : #endif
17345 : }
17346 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
17347 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17348 : return resultobj;
17349 : fail:
17350 : return NULL;
17351 : }
17352 :
17353 :
17354 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint3Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17355 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17356 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17357 1 : double *arg2 ;
17358 1 : void *argp1 = 0 ;
17359 1 : int res1 = 0 ;
17360 1 : double argin2[3] ;
17361 1 : PyObject *swig_obj[2] ;
17362 :
17363 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint3Double", 2, 2, swig_obj)) SWIG_fail;
17364 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17365 1 : if (!SWIG_IsOK(res1)) {
17366 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint3Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17367 : }
17368 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17369 1 : {
17370 : /* %typemap(in) (double argin2[ANY]) */
17371 1 : arg2 = argin2;
17372 1 : if (! PySequence_Check(swig_obj[1]) ) {
17373 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17374 0 : SWIG_fail;
17375 : }
17376 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17377 1 : if ( seq_size != 3 ) {
17378 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17379 0 : SWIG_fail;
17380 : }
17381 4 : for (unsigned int i=0; i<3; i++) {
17382 3 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17383 3 : double val;
17384 3 : if ( !PyArg_Parse(o, "d", &val ) ) {
17385 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17386 0 : Py_DECREF(o);
17387 0 : SWIG_fail;
17388 : }
17389 3 : arg2[i] = val;
17390 3 : Py_DECREF(o);
17391 : }
17392 : }
17393 1 : {
17394 1 : const int bLocalUseExceptions = GetUseExceptions();
17395 1 : if ( bLocalUseExceptions ) {
17396 1 : pushErrorHandler();
17397 : }
17398 1 : OSRCoordinateTransformationShadow__TransformPoint3Double(arg1,arg2);
17399 1 : if ( bLocalUseExceptions ) {
17400 1 : popErrorHandler();
17401 : }
17402 : #ifndef SED_HACKS
17403 : if ( bLocalUseExceptions ) {
17404 : CPLErr eclass = CPLGetLastErrorType();
17405 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17406 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17407 : }
17408 : }
17409 : #endif
17410 : }
17411 1 : resultobj = SWIG_Py_Void();
17412 1 : {
17413 : /* %typemap(argout) (double argout[ANY]) */
17414 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17415 : #if SWIG_VERSION >= 0x040300
17416 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17417 : #else
17418 1 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17419 : #endif
17420 : }
17421 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17422 : return resultobj;
17423 : fail:
17424 : return NULL;
17425 : }
17426 :
17427 :
17428 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint4Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17429 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17430 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17431 1 : double *arg2 ;
17432 1 : void *argp1 = 0 ;
17433 1 : int res1 = 0 ;
17434 1 : double argin2[4] ;
17435 1 : PyObject *swig_obj[2] ;
17436 :
17437 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint4Double", 2, 2, swig_obj)) SWIG_fail;
17438 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17439 1 : if (!SWIG_IsOK(res1)) {
17440 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint4Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17441 : }
17442 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17443 1 : {
17444 : /* %typemap(in) (double argin2[ANY]) */
17445 1 : arg2 = argin2;
17446 1 : if (! PySequence_Check(swig_obj[1]) ) {
17447 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17448 0 : SWIG_fail;
17449 : }
17450 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17451 1 : if ( seq_size != 4 ) {
17452 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17453 0 : SWIG_fail;
17454 : }
17455 5 : for (unsigned int i=0; i<4; i++) {
17456 4 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17457 4 : double val;
17458 4 : if ( !PyArg_Parse(o, "d", &val ) ) {
17459 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17460 0 : Py_DECREF(o);
17461 0 : SWIG_fail;
17462 : }
17463 4 : arg2[i] = val;
17464 4 : Py_DECREF(o);
17465 : }
17466 : }
17467 1 : {
17468 1 : const int bLocalUseExceptions = GetUseExceptions();
17469 1 : if ( bLocalUseExceptions ) {
17470 1 : pushErrorHandler();
17471 : }
17472 1 : OSRCoordinateTransformationShadow__TransformPoint4Double(arg1,arg2);
17473 1 : if ( bLocalUseExceptions ) {
17474 1 : popErrorHandler();
17475 : }
17476 : #ifndef SED_HACKS
17477 : if ( bLocalUseExceptions ) {
17478 : CPLErr eclass = CPLGetLastErrorType();
17479 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17480 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17481 : }
17482 : }
17483 : #endif
17484 : }
17485 1 : resultobj = SWIG_Py_Void();
17486 1 : {
17487 : /* %typemap(argout) (double argout[ANY]) */
17488 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17489 : #if SWIG_VERSION >= 0x040300
17490 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17491 : #else
17492 1 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17493 : #endif
17494 : }
17495 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17496 : return resultobj;
17497 : fail:
17498 : return NULL;
17499 : }
17500 :
17501 :
17502 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17503 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17504 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17505 : double *arg2 ;
17506 : double arg3 ;
17507 : double arg4 ;
17508 : double arg5 = (double) 0.0 ;
17509 : void *argp1 = 0 ;
17510 : int res1 = 0 ;
17511 : double argout2[3] ;
17512 : double val3 ;
17513 : int ecode3 = 0 ;
17514 : double val4 ;
17515 : int ecode4 = 0 ;
17516 : double val5 ;
17517 : int ecode5 = 0 ;
17518 :
17519 : {
17520 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17521 : memset(argout2, 0, sizeof(argout2));
17522 : arg2 = argout2;
17523 : }
17524 : if ((nobjs < 3) || (nobjs > 4)) SWIG_fail;
17525 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17526 : if (!SWIG_IsOK(res1)) {
17527 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17528 : }
17529 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17530 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17531 : if (!SWIG_IsOK(ecode3)) {
17532 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17533 : }
17534 : arg3 = static_cast< double >(val3);
17535 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17536 : if (!SWIG_IsOK(ecode4)) {
17537 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17538 : }
17539 : arg4 = static_cast< double >(val4);
17540 : if (swig_obj[3]) {
17541 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17542 : if (!SWIG_IsOK(ecode5)) {
17543 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17544 : }
17545 : arg5 = static_cast< double >(val5);
17546 : }
17547 : {
17548 : const int bLocalUseExceptions = GetUseExceptions();
17549 : if ( bLocalUseExceptions ) {
17550 : pushErrorHandler();
17551 : }
17552 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2,arg3,arg4,arg5);
17553 : if ( bLocalUseExceptions ) {
17554 : popErrorHandler();
17555 : }
17556 : #ifndef SED_HACKS
17557 : if ( bLocalUseExceptions ) {
17558 : CPLErr eclass = CPLGetLastErrorType();
17559 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17560 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17561 : }
17562 : }
17563 : #endif
17564 : }
17565 : resultobj = SWIG_Py_Void();
17566 : {
17567 : /* %typemap(argout) (double argout[ANY]) */
17568 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17569 : #if SWIG_VERSION >= 0x040300
17570 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17571 : #else
17572 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17573 : #endif
17574 : }
17575 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17576 : return resultobj;
17577 : fail:
17578 : return NULL;
17579 : }
17580 :
17581 :
17582 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17583 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17584 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17585 : double *arg2 ;
17586 : double arg3 ;
17587 : double arg4 ;
17588 : double arg5 ;
17589 : double arg6 ;
17590 : void *argp1 = 0 ;
17591 : int res1 = 0 ;
17592 : double argout2[4] ;
17593 : double val3 ;
17594 : int ecode3 = 0 ;
17595 : double val4 ;
17596 : int ecode4 = 0 ;
17597 : double val5 ;
17598 : int ecode5 = 0 ;
17599 : double val6 ;
17600 : int ecode6 = 0 ;
17601 :
17602 : {
17603 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17604 : memset(argout2, 0, sizeof(argout2));
17605 : arg2 = argout2;
17606 : }
17607 : if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
17608 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17609 : if (!SWIG_IsOK(res1)) {
17610 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17611 : }
17612 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17613 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17614 : if (!SWIG_IsOK(ecode3)) {
17615 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17616 : }
17617 : arg3 = static_cast< double >(val3);
17618 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17619 : if (!SWIG_IsOK(ecode4)) {
17620 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17621 : }
17622 : arg4 = static_cast< double >(val4);
17623 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17624 : if (!SWIG_IsOK(ecode5)) {
17625 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17626 : }
17627 : arg5 = static_cast< double >(val5);
17628 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
17629 : if (!SWIG_IsOK(ecode6)) {
17630 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "6"" of type '" "double""'");
17631 : }
17632 : arg6 = static_cast< double >(val6);
17633 : {
17634 : const int bLocalUseExceptions = GetUseExceptions();
17635 : if ( bLocalUseExceptions ) {
17636 : pushErrorHandler();
17637 : }
17638 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
17639 : if ( bLocalUseExceptions ) {
17640 : popErrorHandler();
17641 : }
17642 : #ifndef SED_HACKS
17643 : if ( bLocalUseExceptions ) {
17644 : CPLErr eclass = CPLGetLastErrorType();
17645 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17646 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17647 : }
17648 : }
17649 : #endif
17650 : }
17651 : resultobj = SWIG_Py_Void();
17652 : {
17653 : /* %typemap(argout) (double argout[ANY]) */
17654 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17655 : #if SWIG_VERSION >= 0x040300
17656 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17657 : #else
17658 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17659 : #endif
17660 : }
17661 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17662 : return resultobj;
17663 : fail:
17664 : return NULL;
17665 : }
17666 :
17667 :
17668 205 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint(PyObject *self, PyObject *args) {
17669 205 : Py_ssize_t argc;
17670 205 : PyObject *argv[6] = {
17671 : 0
17672 : };
17673 :
17674 205 : if (!(argc = SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoint", 0, 5, argv))) SWIG_fail;
17675 205 : --argc;
17676 205 : if ((argc >= 3) && (argc <= 4)) {
17677 201 : int _v;
17678 201 : void *vptr = 0;
17679 201 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17680 201 : _v = SWIG_CheckState(res);
17681 199 : if (_v) {
17682 199 : {
17683 199 : int res = SWIG_AsVal_double(argv[1], NULL);
17684 199 : _v = SWIG_CheckState(res);
17685 : }
17686 199 : if (_v) {
17687 199 : {
17688 199 : int res = SWIG_AsVal_double(argv[2], NULL);
17689 199 : _v = SWIG_CheckState(res);
17690 : }
17691 199 : if (_v) {
17692 199 : if (argc <= 3) {
17693 199 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17694 : }
17695 115 : {
17696 115 : int res = SWIG_AsVal_double(argv[3], NULL);
17697 115 : _v = SWIG_CheckState(res);
17698 : }
17699 115 : if (_v) {
17700 115 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17701 : }
17702 : }
17703 : }
17704 : }
17705 : }
17706 6 : if (argc == 5) {
17707 4 : int _v;
17708 4 : void *vptr = 0;
17709 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17710 4 : _v = SWIG_CheckState(res);
17711 4 : if (_v) {
17712 4 : {
17713 4 : int res = SWIG_AsVal_double(argv[1], NULL);
17714 4 : _v = SWIG_CheckState(res);
17715 : }
17716 4 : if (_v) {
17717 4 : {
17718 4 : int res = SWIG_AsVal_double(argv[2], NULL);
17719 4 : _v = SWIG_CheckState(res);
17720 : }
17721 4 : if (_v) {
17722 4 : {
17723 4 : int res = SWIG_AsVal_double(argv[3], NULL);
17724 4 : _v = SWIG_CheckState(res);
17725 : }
17726 4 : if (_v) {
17727 4 : {
17728 4 : int res = SWIG_AsVal_double(argv[4], NULL);
17729 4 : _v = SWIG_CheckState(res);
17730 : }
17731 4 : if (_v) {
17732 4 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, argc, argv);
17733 : }
17734 : }
17735 : }
17736 : }
17737 : }
17738 : }
17739 :
17740 2 : fail:
17741 2 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'.\n"
17742 : " Possible C/C++ prototypes are:\n"
17743 : " OSRCoordinateTransformationShadow::TransformPoint(double [3],double,double,double)\n"
17744 : " OSRCoordinateTransformationShadow::TransformPoint(double [4],double,double,double,double)\n");
17745 : return 0;
17746 : }
17747 :
17748 :
17749 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPointWithErrorCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17750 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17751 0 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17752 0 : double *arg2 ;
17753 0 : int *arg3 ;
17754 0 : double arg4 ;
17755 0 : double arg5 ;
17756 0 : double arg6 ;
17757 0 : double arg7 ;
17758 0 : void *argp1 = 0 ;
17759 0 : int res1 = 0 ;
17760 0 : double argout2[4] ;
17761 0 : int errorCode2[1] ;
17762 0 : double val4 ;
17763 0 : int ecode4 = 0 ;
17764 0 : double val5 ;
17765 0 : int ecode5 = 0 ;
17766 0 : double val6 ;
17767 0 : int ecode6 = 0 ;
17768 0 : double val7 ;
17769 0 : int ecode7 = 0 ;
17770 0 : PyObject *swig_obj[5] ;
17771 :
17772 0 : {
17773 : /* %typemap(in) (double argout2[4], int errorCode2[1]) */
17774 0 : arg2 = argout2;
17775 0 : arg3 = errorCode2;
17776 : }
17777 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPointWithErrorCode", 5, 5, swig_obj)) SWIG_fail;
17778 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17779 0 : if (!SWIG_IsOK(res1)) {
17780 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17781 : }
17782 0 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17783 0 : ecode4 = SWIG_AsVal_double(swig_obj[1], &val4);
17784 0 : if (!SWIG_IsOK(ecode4)) {
17785 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "4"" of type '" "double""'");
17786 : }
17787 0 : arg4 = static_cast< double >(val4);
17788 0 : ecode5 = SWIG_AsVal_double(swig_obj[2], &val5);
17789 0 : if (!SWIG_IsOK(ecode5)) {
17790 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "5"" of type '" "double""'");
17791 : }
17792 0 : arg5 = static_cast< double >(val5);
17793 0 : ecode6 = SWIG_AsVal_double(swig_obj[3], &val6);
17794 0 : if (!SWIG_IsOK(ecode6)) {
17795 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "6"" of type '" "double""'");
17796 : }
17797 0 : arg6 = static_cast< double >(val6);
17798 0 : ecode7 = SWIG_AsVal_double(swig_obj[4], &val7);
17799 0 : if (!SWIG_IsOK(ecode7)) {
17800 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "7"" of type '" "double""'");
17801 : }
17802 0 : arg7 = static_cast< double >(val7);
17803 0 : {
17804 0 : const int bLocalUseExceptions = GetUseExceptions();
17805 0 : if ( bLocalUseExceptions ) {
17806 0 : pushErrorHandler();
17807 : }
17808 0 : OSRCoordinateTransformationShadow_TransformPointWithErrorCode(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
17809 0 : if ( bLocalUseExceptions ) {
17810 0 : popErrorHandler();
17811 : }
17812 : #ifndef SED_HACKS
17813 : if ( bLocalUseExceptions ) {
17814 : CPLErr eclass = CPLGetLastErrorType();
17815 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17816 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17817 : }
17818 : }
17819 : #endif
17820 : }
17821 0 : resultobj = SWIG_Py_Void();
17822 0 : {
17823 : /* %typemap(argout) (double argout[4], int errorCode[1]) */
17824 0 : PyObject *r = PyTuple_New( 5 );
17825 0 : PyTuple_SetItem( r, 0, PyFloat_FromDouble(arg2[0]));
17826 0 : PyTuple_SetItem( r, 1, PyFloat_FromDouble(arg2[1]));
17827 0 : PyTuple_SetItem( r, 2, PyFloat_FromDouble(arg2[2]));
17828 0 : PyTuple_SetItem( r, 3, PyFloat_FromDouble(arg2[3]));
17829 0 : PyTuple_SetItem( r, 4, PyLong_FromLong(arg3[0]));
17830 : #if SWIG_VERSION >= 0x040300
17831 : resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
17832 : #else
17833 0 : resultobj = SWIG_Python_AppendOutput(resultobj,r);
17834 : #endif
17835 : }
17836 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17837 : return resultobj;
17838 : fail:
17839 : return NULL;
17840 : }
17841 :
17842 :
17843 10 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17844 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17845 10 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17846 10 : int arg2 ;
17847 10 : double *arg3 = (double *) 0 ;
17848 10 : double *arg4 = (double *) 0 ;
17849 10 : double *arg5 = (double *) 0 ;
17850 10 : double *arg6 = (double *) 0 ;
17851 10 : void *argp1 = 0 ;
17852 10 : int res1 = 0 ;
17853 10 : int foundTime2 = FALSE ;
17854 10 : PyObject *swig_obj[2] ;
17855 :
17856 10 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoints", 2, 2, swig_obj)) SWIG_fail;
17857 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17858 10 : if (!SWIG_IsOK(res1)) {
17859 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoints" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17860 : }
17861 10 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17862 10 : {
17863 10 : if ( !PySequence_Check(swig_obj[1]) ) {
17864 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17865 0 : SWIG_fail;
17866 : }
17867 :
17868 10 : Py_ssize_t size = PySequence_Size(swig_obj[1]);
17869 10 : if( size != (int)size ) {
17870 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
17871 0 : SWIG_fail;
17872 : }
17873 10 : arg2 = (int)size;
17874 10 : arg3 = (double*) VSIMalloc(arg2*sizeof(double));
17875 10 : arg4 = (double*) VSIMalloc(arg2*sizeof(double));
17876 10 : arg5 = (double*) VSIMalloc(arg2*sizeof(double));
17877 10 : arg6 = (double*) VSIMalloc(arg2*sizeof(double));
17878 :
17879 10 : if (arg3 == NULL || arg4 == NULL || arg5 == NULL || arg6 == NULL)
17880 : {
17881 0 : PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
17882 0 : SWIG_fail;
17883 : }
17884 :
17885 10 : if (!DecomposeSequenceOf4DCoordinates(swig_obj[1],arg2,arg3,arg4,arg5,arg6, &foundTime2)) {
17886 0 : SWIG_fail;
17887 : }
17888 : }
17889 10 : {
17890 10 : const int bLocalUseExceptions = GetUseExceptions();
17891 10 : if ( bLocalUseExceptions ) {
17892 10 : pushErrorHandler();
17893 : }
17894 10 : OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6);
17895 10 : if ( bLocalUseExceptions ) {
17896 10 : popErrorHandler();
17897 : }
17898 : #ifndef SED_HACKS
17899 : if ( bLocalUseExceptions ) {
17900 : CPLErr eclass = CPLGetLastErrorType();
17901 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17902 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17903 : }
17904 : }
17905 : #endif
17906 : }
17907 10 : resultobj = SWIG_Py_Void();
17908 10 : {
17909 : /* %typemap(argout) (int nCount, double *x, double *y, double *z, double *t) */
17910 10 : Py_DECREF(resultobj);
17911 10 : PyObject *out = PyList_New( arg2 );
17912 10 : if( !out ) {
17913 0 : SWIG_fail;
17914 : }
17915 10 : int foundTime = foundTime2;
17916 33 : for( int i=0; i< arg2; i++ ) {
17917 38 : PyObject *tuple = PyTuple_New( foundTime ? 4 : 3 );
17918 23 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg3)[i] ) );
17919 23 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg4)[i] ) );
17920 23 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg5)[i] ) );
17921 23 : if( foundTime )
17922 8 : PyTuple_SetItem( tuple, 3, PyFloat_FromDouble( (arg6)[i] ) );
17923 23 : PyList_SetItem( out, i, tuple );
17924 : }
17925 10 : resultobj = out;
17926 : }
17927 10 : {
17928 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
17929 10 : VSIFree(arg3);
17930 10 : VSIFree(arg4);
17931 10 : VSIFree(arg5);
17932 10 : VSIFree(arg6);
17933 : }
17934 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17935 : return resultobj;
17936 0 : fail:
17937 0 : {
17938 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
17939 0 : VSIFree(arg3);
17940 0 : VSIFree(arg4);
17941 0 : VSIFree(arg5);
17942 0 : VSIFree(arg6);
17943 : }
17944 : return NULL;
17945 : }
17946 :
17947 :
17948 25 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17949 25 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17950 25 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17951 25 : double *arg2 ;
17952 25 : double arg3 ;
17953 25 : double arg4 ;
17954 25 : double arg5 ;
17955 25 : double arg6 ;
17956 25 : int arg7 ;
17957 25 : void *argp1 = 0 ;
17958 25 : int res1 = 0 ;
17959 25 : double argout2[4] ;
17960 25 : double val3 ;
17961 25 : int ecode3 = 0 ;
17962 25 : double val4 ;
17963 25 : int ecode4 = 0 ;
17964 25 : double val5 ;
17965 25 : int ecode5 = 0 ;
17966 25 : double val6 ;
17967 25 : int ecode6 = 0 ;
17968 25 : int val7 ;
17969 25 : int ecode7 = 0 ;
17970 25 : PyObject *swig_obj[6] ;
17971 :
17972 25 : {
17973 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17974 25 : memset(argout2, 0, sizeof(argout2));
17975 25 : arg2 = argout2;
17976 : }
17977 25 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformBounds", 6, 6, swig_obj)) SWIG_fail;
17978 25 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17979 25 : if (!SWIG_IsOK(res1)) {
17980 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17981 : }
17982 25 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17983 25 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17984 25 : if (!SWIG_IsOK(ecode3)) {
17985 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "3"" of type '" "double""'");
17986 : }
17987 25 : arg3 = static_cast< double >(val3);
17988 25 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17989 25 : if (!SWIG_IsOK(ecode4)) {
17990 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "4"" of type '" "double""'");
17991 : }
17992 25 : arg4 = static_cast< double >(val4);
17993 25 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17994 25 : if (!SWIG_IsOK(ecode5)) {
17995 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "5"" of type '" "double""'");
17996 : }
17997 25 : arg5 = static_cast< double >(val5);
17998 25 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
17999 25 : if (!SWIG_IsOK(ecode6)) {
18000 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "6"" of type '" "double""'");
18001 : }
18002 25 : arg6 = static_cast< double >(val6);
18003 25 : ecode7 = SWIG_AsVal_int(swig_obj[5], &val7);
18004 25 : if (!SWIG_IsOK(ecode7)) {
18005 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "7"" of type '" "int""'");
18006 : }
18007 25 : arg7 = static_cast< int >(val7);
18008 25 : {
18009 25 : const int bLocalUseExceptions = GetUseExceptions();
18010 25 : if ( bLocalUseExceptions ) {
18011 24 : pushErrorHandler();
18012 : }
18013 25 : OSRCoordinateTransformationShadow_TransformBounds(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
18014 25 : if ( bLocalUseExceptions ) {
18015 24 : popErrorHandler();
18016 : }
18017 : #ifndef SED_HACKS
18018 : if ( bLocalUseExceptions ) {
18019 : CPLErr eclass = CPLGetLastErrorType();
18020 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18021 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18022 : }
18023 : }
18024 : #endif
18025 : }
18026 25 : resultobj = SWIG_Py_Void();
18027 25 : {
18028 : /* %typemap(argout) (double argout[ANY]) */
18029 25 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
18030 : #if SWIG_VERSION >= 0x040300
18031 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
18032 : #else
18033 25 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
18034 : #endif
18035 : }
18036 26 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18037 : return resultobj;
18038 : fail:
18039 : return NULL;
18040 : }
18041 :
18042 :
18043 275 : SWIGINTERN PyObject *CoordinateTransformation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18044 275 : PyObject *obj;
18045 275 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18046 275 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_NewClientData(obj));
18047 275 : return SWIG_Py_Void();
18048 : }
18049 :
18050 151 : SWIGINTERN PyObject *CoordinateTransformation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18051 151 : return SWIG_Python_InitShadowInstance(args);
18052 : }
18053 :
18054 2 : SWIGINTERN PyObject *_wrap_CreateCoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18055 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18056 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
18057 2 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
18058 2 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) NULL ;
18059 2 : void *argp1 = 0 ;
18060 2 : int res1 = 0 ;
18061 2 : void *argp2 = 0 ;
18062 2 : int res2 = 0 ;
18063 2 : void *argp3 = 0 ;
18064 2 : int res3 = 0 ;
18065 2 : PyObject *swig_obj[3] ;
18066 2 : OSRCoordinateTransformationShadow *result = 0 ;
18067 :
18068 2 : if (!SWIG_Python_UnpackTuple(args, "CreateCoordinateTransformation", 2, 3, swig_obj)) SWIG_fail;
18069 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
18070 2 : if (!SWIG_IsOK(res1)) {
18071 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
18072 : }
18073 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
18074 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
18075 2 : if (!SWIG_IsOK(res2)) {
18076 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
18077 : }
18078 2 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
18079 2 : if (swig_obj[2]) {
18080 0 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
18081 0 : if (!SWIG_IsOK(res3)) {
18082 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateCoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
18083 : }
18084 0 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
18085 : }
18086 2 : {
18087 2 : const int bLocalUseExceptions = GetUseExceptions();
18088 2 : if ( bLocalUseExceptions ) {
18089 2 : pushErrorHandler();
18090 : }
18091 2 : result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2,arg3);
18092 2 : if ( bLocalUseExceptions ) {
18093 2 : popErrorHandler();
18094 : }
18095 : #ifndef SED_HACKS
18096 : if ( bLocalUseExceptions ) {
18097 : CPLErr eclass = CPLGetLastErrorType();
18098 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18099 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18100 : }
18101 : }
18102 : #endif
18103 : }
18104 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
18105 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18106 : return resultobj;
18107 : fail:
18108 : return NULL;
18109 : }
18110 :
18111 :
18112 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18113 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18114 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18115 6609 : void *argp1 = 0 ;
18116 6609 : int res1 = 0 ;
18117 6609 : PyObject *swig_obj[1] ;
18118 6609 : char *result = 0 ;
18119 :
18120 6609 : if (!args) SWIG_fail;
18121 6609 : swig_obj[0] = args;
18122 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18123 6609 : if (!SWIG_IsOK(res1)) {
18124 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18125 : }
18126 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18127 6609 : {
18128 6609 : const int bLocalUseExceptions = GetUseExceptions();
18129 6609 : if ( bLocalUseExceptions ) {
18130 6609 : pushErrorHandler();
18131 : }
18132 6609 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18133 6609 : if ( bLocalUseExceptions ) {
18134 6609 : popErrorHandler();
18135 : }
18136 : #ifndef SED_HACKS
18137 : if ( bLocalUseExceptions ) {
18138 : CPLErr eclass = CPLGetLastErrorType();
18139 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18140 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18141 : }
18142 : }
18143 : #endif
18144 : }
18145 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18146 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18147 : return resultobj;
18148 : fail:
18149 : return NULL;
18150 : }
18151 :
18152 :
18153 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18154 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18155 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18156 6609 : void *argp1 = 0 ;
18157 6609 : int res1 = 0 ;
18158 6609 : PyObject *swig_obj[1] ;
18159 6609 : char *result = 0 ;
18160 :
18161 6609 : if (!args) SWIG_fail;
18162 6609 : swig_obj[0] = args;
18163 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18164 6609 : if (!SWIG_IsOK(res1)) {
18165 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18166 : }
18167 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18168 6609 : {
18169 6609 : const int bLocalUseExceptions = GetUseExceptions();
18170 6609 : if ( bLocalUseExceptions ) {
18171 6609 : pushErrorHandler();
18172 : }
18173 6609 : result = (char *)OSRCRSInfo_code_get(arg1);
18174 6609 : if ( bLocalUseExceptions ) {
18175 6609 : popErrorHandler();
18176 : }
18177 : #ifndef SED_HACKS
18178 : if ( bLocalUseExceptions ) {
18179 : CPLErr eclass = CPLGetLastErrorType();
18180 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18181 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18182 : }
18183 : }
18184 : #endif
18185 : }
18186 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18187 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18188 : return resultobj;
18189 : fail:
18190 : return NULL;
18191 : }
18192 :
18193 :
18194 1 : SWIGINTERN PyObject *_wrap_CRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18195 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18196 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18197 1 : void *argp1 = 0 ;
18198 1 : int res1 = 0 ;
18199 1 : PyObject *swig_obj[1] ;
18200 1 : char *result = 0 ;
18201 :
18202 1 : if (!args) SWIG_fail;
18203 1 : swig_obj[0] = args;
18204 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18205 1 : if (!SWIG_IsOK(res1)) {
18206 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18207 : }
18208 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18209 1 : {
18210 1 : const int bLocalUseExceptions = GetUseExceptions();
18211 1 : if ( bLocalUseExceptions ) {
18212 1 : pushErrorHandler();
18213 : }
18214 1 : result = (char *)OSRCRSInfo_name_get(arg1);
18215 1 : if ( bLocalUseExceptions ) {
18216 1 : popErrorHandler();
18217 : }
18218 : #ifndef SED_HACKS
18219 : if ( bLocalUseExceptions ) {
18220 : CPLErr eclass = CPLGetLastErrorType();
18221 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18222 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18223 : }
18224 : }
18225 : #endif
18226 : }
18227 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18228 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18229 : return resultobj;
18230 : fail:
18231 : return NULL;
18232 : }
18233 :
18234 :
18235 1 : SWIGINTERN PyObject *_wrap_CRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18236 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18237 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18238 1 : void *argp1 = 0 ;
18239 1 : int res1 = 0 ;
18240 1 : PyObject *swig_obj[1] ;
18241 1 : OSRCRSType result;
18242 :
18243 1 : if (!args) SWIG_fail;
18244 1 : swig_obj[0] = args;
18245 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18246 1 : if (!SWIG_IsOK(res1)) {
18247 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18248 : }
18249 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18250 1 : {
18251 1 : const int bLocalUseExceptions = GetUseExceptions();
18252 1 : if ( bLocalUseExceptions ) {
18253 1 : pushErrorHandler();
18254 : }
18255 1 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
18256 1 : if ( bLocalUseExceptions ) {
18257 1 : popErrorHandler();
18258 : }
18259 : #ifndef SED_HACKS
18260 : if ( bLocalUseExceptions ) {
18261 : CPLErr eclass = CPLGetLastErrorType();
18262 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18263 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18264 : }
18265 : }
18266 : #endif
18267 : }
18268 1 : resultobj = SWIG_From_int(static_cast< int >(result));
18269 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18270 : return resultobj;
18271 : fail:
18272 : return NULL;
18273 : }
18274 :
18275 :
18276 1 : SWIGINTERN PyObject *_wrap_CRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18277 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18278 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18279 1 : void *argp1 = 0 ;
18280 1 : int res1 = 0 ;
18281 1 : PyObject *swig_obj[1] ;
18282 1 : bool result;
18283 :
18284 1 : if (!args) SWIG_fail;
18285 1 : swig_obj[0] = args;
18286 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18287 1 : if (!SWIG_IsOK(res1)) {
18288 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18289 : }
18290 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18291 1 : {
18292 1 : const int bLocalUseExceptions = GetUseExceptions();
18293 1 : if ( bLocalUseExceptions ) {
18294 1 : pushErrorHandler();
18295 : }
18296 1 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
18297 1 : if ( bLocalUseExceptions ) {
18298 1 : popErrorHandler();
18299 : }
18300 : #ifndef SED_HACKS
18301 : if ( bLocalUseExceptions ) {
18302 : CPLErr eclass = CPLGetLastErrorType();
18303 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18304 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18305 : }
18306 : }
18307 : #endif
18308 : }
18309 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18310 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18311 : return resultobj;
18312 : fail:
18313 : return NULL;
18314 : }
18315 :
18316 :
18317 1 : SWIGINTERN PyObject *_wrap_CRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18318 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18319 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18320 1 : void *argp1 = 0 ;
18321 1 : int res1 = 0 ;
18322 1 : PyObject *swig_obj[1] ;
18323 1 : bool result;
18324 :
18325 1 : if (!args) SWIG_fail;
18326 1 : swig_obj[0] = args;
18327 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18328 1 : if (!SWIG_IsOK(res1)) {
18329 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18330 : }
18331 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18332 1 : {
18333 1 : const int bLocalUseExceptions = GetUseExceptions();
18334 1 : if ( bLocalUseExceptions ) {
18335 1 : pushErrorHandler();
18336 : }
18337 1 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
18338 1 : if ( bLocalUseExceptions ) {
18339 1 : popErrorHandler();
18340 : }
18341 : #ifndef SED_HACKS
18342 : if ( bLocalUseExceptions ) {
18343 : CPLErr eclass = CPLGetLastErrorType();
18344 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18345 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18346 : }
18347 : }
18348 : #endif
18349 : }
18350 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18351 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18352 : return resultobj;
18353 : fail:
18354 : return NULL;
18355 : }
18356 :
18357 :
18358 1 : SWIGINTERN PyObject *_wrap_CRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18359 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18360 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18361 1 : void *argp1 = 0 ;
18362 1 : int res1 = 0 ;
18363 1 : PyObject *swig_obj[1] ;
18364 1 : double result;
18365 :
18366 1 : if (!args) SWIG_fail;
18367 1 : swig_obj[0] = args;
18368 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18369 1 : if (!SWIG_IsOK(res1)) {
18370 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18371 : }
18372 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18373 1 : {
18374 1 : const int bLocalUseExceptions = GetUseExceptions();
18375 1 : if ( bLocalUseExceptions ) {
18376 1 : pushErrorHandler();
18377 : }
18378 1 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
18379 1 : if ( bLocalUseExceptions ) {
18380 1 : popErrorHandler();
18381 : }
18382 : #ifndef SED_HACKS
18383 : if ( bLocalUseExceptions ) {
18384 : CPLErr eclass = CPLGetLastErrorType();
18385 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18386 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18387 : }
18388 : }
18389 : #endif
18390 : }
18391 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18392 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18393 : return resultobj;
18394 : fail:
18395 : return NULL;
18396 : }
18397 :
18398 :
18399 1 : SWIGINTERN PyObject *_wrap_CRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18400 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18401 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18402 1 : void *argp1 = 0 ;
18403 1 : int res1 = 0 ;
18404 1 : PyObject *swig_obj[1] ;
18405 1 : double result;
18406 :
18407 1 : if (!args) SWIG_fail;
18408 1 : swig_obj[0] = args;
18409 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18410 1 : if (!SWIG_IsOK(res1)) {
18411 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18412 : }
18413 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18414 1 : {
18415 1 : const int bLocalUseExceptions = GetUseExceptions();
18416 1 : if ( bLocalUseExceptions ) {
18417 1 : pushErrorHandler();
18418 : }
18419 1 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
18420 1 : if ( bLocalUseExceptions ) {
18421 1 : popErrorHandler();
18422 : }
18423 : #ifndef SED_HACKS
18424 : if ( bLocalUseExceptions ) {
18425 : CPLErr eclass = CPLGetLastErrorType();
18426 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18427 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18428 : }
18429 : }
18430 : #endif
18431 : }
18432 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18433 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18434 : return resultobj;
18435 : fail:
18436 : return NULL;
18437 : }
18438 :
18439 :
18440 1 : SWIGINTERN PyObject *_wrap_CRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18441 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18442 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18443 1 : void *argp1 = 0 ;
18444 1 : int res1 = 0 ;
18445 1 : PyObject *swig_obj[1] ;
18446 1 : double result;
18447 :
18448 1 : if (!args) SWIG_fail;
18449 1 : swig_obj[0] = args;
18450 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18451 1 : if (!SWIG_IsOK(res1)) {
18452 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18453 : }
18454 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18455 1 : {
18456 1 : const int bLocalUseExceptions = GetUseExceptions();
18457 1 : if ( bLocalUseExceptions ) {
18458 1 : pushErrorHandler();
18459 : }
18460 1 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
18461 1 : if ( bLocalUseExceptions ) {
18462 1 : popErrorHandler();
18463 : }
18464 : #ifndef SED_HACKS
18465 : if ( bLocalUseExceptions ) {
18466 : CPLErr eclass = CPLGetLastErrorType();
18467 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18468 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18469 : }
18470 : }
18471 : #endif
18472 : }
18473 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18474 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18475 : return resultobj;
18476 : fail:
18477 : return NULL;
18478 : }
18479 :
18480 :
18481 1 : SWIGINTERN PyObject *_wrap_CRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18482 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18483 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18484 1 : void *argp1 = 0 ;
18485 1 : int res1 = 0 ;
18486 1 : PyObject *swig_obj[1] ;
18487 1 : double result;
18488 :
18489 1 : if (!args) SWIG_fail;
18490 1 : swig_obj[0] = args;
18491 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18492 1 : if (!SWIG_IsOK(res1)) {
18493 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18494 : }
18495 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18496 1 : {
18497 1 : const int bLocalUseExceptions = GetUseExceptions();
18498 1 : if ( bLocalUseExceptions ) {
18499 1 : pushErrorHandler();
18500 : }
18501 1 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
18502 1 : if ( bLocalUseExceptions ) {
18503 1 : popErrorHandler();
18504 : }
18505 : #ifndef SED_HACKS
18506 : if ( bLocalUseExceptions ) {
18507 : CPLErr eclass = CPLGetLastErrorType();
18508 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18509 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18510 : }
18511 : }
18512 : #endif
18513 : }
18514 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18515 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18516 : return resultobj;
18517 : fail:
18518 : return NULL;
18519 : }
18520 :
18521 :
18522 1 : SWIGINTERN PyObject *_wrap_CRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18523 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18524 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18525 1 : void *argp1 = 0 ;
18526 1 : int res1 = 0 ;
18527 1 : PyObject *swig_obj[1] ;
18528 1 : char *result = 0 ;
18529 :
18530 1 : if (!args) SWIG_fail;
18531 1 : swig_obj[0] = args;
18532 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18533 1 : if (!SWIG_IsOK(res1)) {
18534 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18535 : }
18536 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18537 1 : {
18538 1 : const int bLocalUseExceptions = GetUseExceptions();
18539 1 : if ( bLocalUseExceptions ) {
18540 1 : pushErrorHandler();
18541 : }
18542 1 : result = (char *)OSRCRSInfo_area_name_get(arg1);
18543 1 : if ( bLocalUseExceptions ) {
18544 1 : popErrorHandler();
18545 : }
18546 : #ifndef SED_HACKS
18547 : if ( bLocalUseExceptions ) {
18548 : CPLErr eclass = CPLGetLastErrorType();
18549 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18550 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18551 : }
18552 : }
18553 : #endif
18554 : }
18555 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18556 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18557 : return resultobj;
18558 : fail:
18559 : return NULL;
18560 : }
18561 :
18562 :
18563 1 : SWIGINTERN PyObject *_wrap_CRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18564 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18565 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18566 1 : void *argp1 = 0 ;
18567 1 : int res1 = 0 ;
18568 1 : PyObject *swig_obj[1] ;
18569 1 : char *result = 0 ;
18570 :
18571 1 : if (!args) SWIG_fail;
18572 1 : swig_obj[0] = args;
18573 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18574 1 : if (!SWIG_IsOK(res1)) {
18575 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18576 : }
18577 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18578 1 : {
18579 1 : const int bLocalUseExceptions = GetUseExceptions();
18580 1 : if ( bLocalUseExceptions ) {
18581 1 : pushErrorHandler();
18582 : }
18583 1 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
18584 1 : if ( bLocalUseExceptions ) {
18585 1 : popErrorHandler();
18586 : }
18587 : #ifndef SED_HACKS
18588 : if ( bLocalUseExceptions ) {
18589 : CPLErr eclass = CPLGetLastErrorType();
18590 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18591 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18592 : }
18593 : }
18594 : #endif
18595 : }
18596 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18597 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18598 : return resultobj;
18599 : fail:
18600 : return NULL;
18601 : }
18602 :
18603 :
18604 0 : SWIGINTERN PyObject *_wrap_new_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18605 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18606 0 : char *arg1 = (char *) 0 ;
18607 0 : char *arg2 = (char *) 0 ;
18608 0 : char *arg3 = (char *) 0 ;
18609 0 : OSRCRSType arg4 ;
18610 0 : bool arg5 ;
18611 0 : bool arg6 ;
18612 0 : double arg7 ;
18613 0 : double arg8 ;
18614 0 : double arg9 ;
18615 0 : double arg10 ;
18616 0 : char *arg11 = (char *) 0 ;
18617 0 : char *arg12 = (char *) 0 ;
18618 0 : int res1 ;
18619 0 : char *buf1 = 0 ;
18620 0 : int alloc1 = 0 ;
18621 0 : int res2 ;
18622 0 : char *buf2 = 0 ;
18623 0 : int alloc2 = 0 ;
18624 0 : int res3 ;
18625 0 : char *buf3 = 0 ;
18626 0 : int alloc3 = 0 ;
18627 0 : int val4 ;
18628 0 : int ecode4 = 0 ;
18629 0 : bool val5 ;
18630 0 : int ecode5 = 0 ;
18631 0 : bool val6 ;
18632 0 : int ecode6 = 0 ;
18633 0 : double val7 ;
18634 0 : int ecode7 = 0 ;
18635 0 : double val8 ;
18636 0 : int ecode8 = 0 ;
18637 0 : double val9 ;
18638 0 : int ecode9 = 0 ;
18639 0 : double val10 ;
18640 0 : int ecode10 = 0 ;
18641 0 : int res11 ;
18642 0 : char *buf11 = 0 ;
18643 0 : int alloc11 = 0 ;
18644 0 : int res12 ;
18645 0 : char *buf12 = 0 ;
18646 0 : int alloc12 = 0 ;
18647 0 : PyObject *swig_obj[12] ;
18648 0 : OSRCRSInfo *result = 0 ;
18649 :
18650 0 : if (!SWIG_Python_UnpackTuple(args, "new_CRSInfo", 12, 12, swig_obj)) SWIG_fail;
18651 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
18652 0 : if (!SWIG_IsOK(res1)) {
18653 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CRSInfo" "', argument " "1"" of type '" "char const *""'");
18654 : }
18655 0 : arg1 = reinterpret_cast< char * >(buf1);
18656 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
18657 0 : if (!SWIG_IsOK(res2)) {
18658 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CRSInfo" "', argument " "2"" of type '" "char const *""'");
18659 : }
18660 0 : arg2 = reinterpret_cast< char * >(buf2);
18661 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
18662 0 : if (!SWIG_IsOK(res3)) {
18663 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CRSInfo" "', argument " "3"" of type '" "char const *""'");
18664 : }
18665 0 : arg3 = reinterpret_cast< char * >(buf3);
18666 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
18667 0 : if (!SWIG_IsOK(ecode4)) {
18668 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CRSInfo" "', argument " "4"" of type '" "OSRCRSType""'");
18669 : }
18670 0 : arg4 = static_cast< OSRCRSType >(val4);
18671 0 : ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5);
18672 0 : if (!SWIG_IsOK(ecode5)) {
18673 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CRSInfo" "', argument " "5"" of type '" "bool""'");
18674 : }
18675 0 : arg5 = static_cast< bool >(val5);
18676 0 : ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
18677 0 : if (!SWIG_IsOK(ecode6)) {
18678 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CRSInfo" "', argument " "6"" of type '" "bool""'");
18679 : }
18680 0 : arg6 = static_cast< bool >(val6);
18681 0 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
18682 0 : if (!SWIG_IsOK(ecode7)) {
18683 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CRSInfo" "', argument " "7"" of type '" "double""'");
18684 : }
18685 0 : arg7 = static_cast< double >(val7);
18686 0 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
18687 0 : if (!SWIG_IsOK(ecode8)) {
18688 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CRSInfo" "', argument " "8"" of type '" "double""'");
18689 : }
18690 0 : arg8 = static_cast< double >(val8);
18691 0 : ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
18692 0 : if (!SWIG_IsOK(ecode9)) {
18693 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CRSInfo" "', argument " "9"" of type '" "double""'");
18694 : }
18695 0 : arg9 = static_cast< double >(val9);
18696 0 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
18697 0 : if (!SWIG_IsOK(ecode10)) {
18698 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CRSInfo" "', argument " "10"" of type '" "double""'");
18699 : }
18700 0 : arg10 = static_cast< double >(val10);
18701 0 : res11 = SWIG_AsCharPtrAndSize(swig_obj[10], &buf11, NULL, &alloc11);
18702 0 : if (!SWIG_IsOK(res11)) {
18703 0 : SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CRSInfo" "', argument " "11"" of type '" "char const *""'");
18704 : }
18705 0 : arg11 = reinterpret_cast< char * >(buf11);
18706 0 : res12 = SWIG_AsCharPtrAndSize(swig_obj[11], &buf12, NULL, &alloc12);
18707 0 : if (!SWIG_IsOK(res12)) {
18708 0 : SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CRSInfo" "', argument " "12"" of type '" "char const *""'");
18709 : }
18710 0 : arg12 = reinterpret_cast< char * >(buf12);
18711 0 : {
18712 0 : if (!arg3) {
18713 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18714 : }
18715 : }
18716 0 : {
18717 0 : const int bLocalUseExceptions = GetUseExceptions();
18718 0 : if ( bLocalUseExceptions ) {
18719 0 : pushErrorHandler();
18720 : }
18721 0 : result = (OSRCRSInfo *)new_OSRCRSInfo((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11,(char const *)arg12);
18722 0 : if ( bLocalUseExceptions ) {
18723 0 : popErrorHandler();
18724 : }
18725 : #ifndef SED_HACKS
18726 : if ( bLocalUseExceptions ) {
18727 : CPLErr eclass = CPLGetLastErrorType();
18728 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18729 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18730 : }
18731 : }
18732 : #endif
18733 : }
18734 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_NEW | 0 );
18735 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18736 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18737 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18738 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18739 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18740 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18741 : return resultobj;
18742 0 : fail:
18743 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18744 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18745 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18746 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18747 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18748 : return NULL;
18749 : }
18750 :
18751 :
18752 6609 : SWIGINTERN PyObject *_wrap_delete_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18753 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18754 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18755 6609 : void *argp1 = 0 ;
18756 6609 : int res1 = 0 ;
18757 6609 : PyObject *swig_obj[1] ;
18758 :
18759 6609 : if (!args) SWIG_fail;
18760 6609 : swig_obj[0] = args;
18761 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_DISOWN | 0 );
18762 6609 : if (!SWIG_IsOK(res1)) {
18763 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRSInfo" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18764 : }
18765 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18766 6609 : {
18767 6609 : const int bLocalUseExceptions = GetUseExceptions();
18768 6609 : if ( bLocalUseExceptions ) {
18769 6609 : pushErrorHandler();
18770 : }
18771 6609 : delete_OSRCRSInfo(arg1);
18772 6609 : if ( bLocalUseExceptions ) {
18773 6609 : popErrorHandler();
18774 : }
18775 : #ifndef SED_HACKS
18776 : if ( bLocalUseExceptions ) {
18777 : CPLErr eclass = CPLGetLastErrorType();
18778 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18779 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18780 : }
18781 : }
18782 : #endif
18783 : }
18784 6609 : resultobj = SWIG_Py_Void();
18785 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18786 : return resultobj;
18787 : fail:
18788 : return NULL;
18789 : }
18790 :
18791 :
18792 275 : SWIGINTERN PyObject *CRSInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18793 275 : PyObject *obj;
18794 275 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18795 275 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCRSInfo, SWIG_NewClientData(obj));
18796 275 : return SWIG_Py_Void();
18797 : }
18798 :
18799 0 : SWIGINTERN PyObject *CRSInfo_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18800 0 : return SWIG_Python_InitShadowInstance(args);
18801 : }
18802 :
18803 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18804 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18805 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18806 0 : void *argp1 = 0 ;
18807 0 : int res1 = 0 ;
18808 0 : PyObject *swig_obj[1] ;
18809 0 : char *result = 0 ;
18810 :
18811 0 : if (!args) SWIG_fail;
18812 0 : swig_obj[0] = args;
18813 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18814 0 : if (!SWIG_IsOK(res1)) {
18815 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18816 : }
18817 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18818 0 : {
18819 0 : if (!arg1) {
18820 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18821 : }
18822 : }
18823 0 : {
18824 0 : const int bLocalUseExceptions = GetUseExceptions();
18825 0 : if ( bLocalUseExceptions ) {
18826 0 : pushErrorHandler();
18827 : }
18828 0 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18829 0 : if ( bLocalUseExceptions ) {
18830 0 : popErrorHandler();
18831 : }
18832 : #ifndef SED_HACKS
18833 : if ( bLocalUseExceptions ) {
18834 : CPLErr eclass = CPLGetLastErrorType();
18835 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18836 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18837 : }
18838 : }
18839 : #endif
18840 : }
18841 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18842 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18843 : return resultobj;
18844 : fail:
18845 : return NULL;
18846 : }
18847 :
18848 :
18849 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18850 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18851 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18852 0 : void *argp1 = 0 ;
18853 0 : int res1 = 0 ;
18854 0 : PyObject *swig_obj[1] ;
18855 0 : char *result = 0 ;
18856 :
18857 0 : if (!args) SWIG_fail;
18858 0 : swig_obj[0] = args;
18859 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18860 0 : if (!SWIG_IsOK(res1)) {
18861 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18862 : }
18863 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18864 0 : {
18865 0 : if (!arg1) {
18866 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18867 : }
18868 : }
18869 0 : {
18870 0 : const int bLocalUseExceptions = GetUseExceptions();
18871 0 : if ( bLocalUseExceptions ) {
18872 0 : pushErrorHandler();
18873 : }
18874 0 : result = (char *)OSRCRSInfo_code_get(arg1);
18875 0 : if ( bLocalUseExceptions ) {
18876 0 : popErrorHandler();
18877 : }
18878 : #ifndef SED_HACKS
18879 : if ( bLocalUseExceptions ) {
18880 : CPLErr eclass = CPLGetLastErrorType();
18881 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18882 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18883 : }
18884 : }
18885 : #endif
18886 : }
18887 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18888 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18889 : return resultobj;
18890 : fail:
18891 : return NULL;
18892 : }
18893 :
18894 :
18895 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18896 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18897 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18898 0 : void *argp1 = 0 ;
18899 0 : int res1 = 0 ;
18900 0 : PyObject *swig_obj[1] ;
18901 0 : char *result = 0 ;
18902 :
18903 0 : if (!args) SWIG_fail;
18904 0 : swig_obj[0] = args;
18905 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18906 0 : if (!SWIG_IsOK(res1)) {
18907 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18908 : }
18909 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18910 0 : {
18911 0 : if (!arg1) {
18912 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18913 : }
18914 : }
18915 0 : {
18916 0 : const int bLocalUseExceptions = GetUseExceptions();
18917 0 : if ( bLocalUseExceptions ) {
18918 0 : pushErrorHandler();
18919 : }
18920 0 : result = (char *)OSRCRSInfo_name_get(arg1);
18921 0 : if ( bLocalUseExceptions ) {
18922 0 : popErrorHandler();
18923 : }
18924 : #ifndef SED_HACKS
18925 : if ( bLocalUseExceptions ) {
18926 : CPLErr eclass = CPLGetLastErrorType();
18927 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18928 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18929 : }
18930 : }
18931 : #endif
18932 : }
18933 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18934 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18935 : return resultobj;
18936 : fail:
18937 : return NULL;
18938 : }
18939 :
18940 :
18941 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18942 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18943 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18944 0 : void *argp1 = 0 ;
18945 0 : int res1 = 0 ;
18946 0 : PyObject *swig_obj[1] ;
18947 0 : OSRCRSType result;
18948 :
18949 0 : if (!args) SWIG_fail;
18950 0 : swig_obj[0] = args;
18951 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18952 0 : if (!SWIG_IsOK(res1)) {
18953 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18954 : }
18955 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18956 0 : {
18957 0 : if (!arg1) {
18958 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18959 : }
18960 : }
18961 0 : {
18962 0 : const int bLocalUseExceptions = GetUseExceptions();
18963 0 : if ( bLocalUseExceptions ) {
18964 0 : pushErrorHandler();
18965 : }
18966 0 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
18967 0 : if ( bLocalUseExceptions ) {
18968 0 : popErrorHandler();
18969 : }
18970 : #ifndef SED_HACKS
18971 : if ( bLocalUseExceptions ) {
18972 : CPLErr eclass = CPLGetLastErrorType();
18973 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18974 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18975 : }
18976 : }
18977 : #endif
18978 : }
18979 0 : resultobj = SWIG_From_int(static_cast< int >(result));
18980 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18981 : return resultobj;
18982 : fail:
18983 : return NULL;
18984 : }
18985 :
18986 :
18987 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18988 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18989 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18990 0 : void *argp1 = 0 ;
18991 0 : int res1 = 0 ;
18992 0 : PyObject *swig_obj[1] ;
18993 0 : bool result;
18994 :
18995 0 : if (!args) SWIG_fail;
18996 0 : swig_obj[0] = args;
18997 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18998 0 : if (!SWIG_IsOK(res1)) {
18999 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19000 : }
19001 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19002 0 : {
19003 0 : if (!arg1) {
19004 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19005 : }
19006 : }
19007 0 : {
19008 0 : const int bLocalUseExceptions = GetUseExceptions();
19009 0 : if ( bLocalUseExceptions ) {
19010 0 : pushErrorHandler();
19011 : }
19012 0 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
19013 0 : if ( bLocalUseExceptions ) {
19014 0 : popErrorHandler();
19015 : }
19016 : #ifndef SED_HACKS
19017 : if ( bLocalUseExceptions ) {
19018 : CPLErr eclass = CPLGetLastErrorType();
19019 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19020 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19021 : }
19022 : }
19023 : #endif
19024 : }
19025 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19026 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19027 : return resultobj;
19028 : fail:
19029 : return NULL;
19030 : }
19031 :
19032 :
19033 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19034 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19035 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19036 0 : void *argp1 = 0 ;
19037 0 : int res1 = 0 ;
19038 0 : PyObject *swig_obj[1] ;
19039 0 : bool result;
19040 :
19041 0 : if (!args) SWIG_fail;
19042 0 : swig_obj[0] = args;
19043 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19044 0 : if (!SWIG_IsOK(res1)) {
19045 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19046 : }
19047 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19048 0 : {
19049 0 : if (!arg1) {
19050 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19051 : }
19052 : }
19053 0 : {
19054 0 : const int bLocalUseExceptions = GetUseExceptions();
19055 0 : if ( bLocalUseExceptions ) {
19056 0 : pushErrorHandler();
19057 : }
19058 0 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
19059 0 : if ( bLocalUseExceptions ) {
19060 0 : popErrorHandler();
19061 : }
19062 : #ifndef SED_HACKS
19063 : if ( bLocalUseExceptions ) {
19064 : CPLErr eclass = CPLGetLastErrorType();
19065 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19066 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19067 : }
19068 : }
19069 : #endif
19070 : }
19071 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19072 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19073 : return resultobj;
19074 : fail:
19075 : return NULL;
19076 : }
19077 :
19078 :
19079 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19080 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19081 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19082 0 : void *argp1 = 0 ;
19083 0 : int res1 = 0 ;
19084 0 : PyObject *swig_obj[1] ;
19085 0 : double result;
19086 :
19087 0 : if (!args) SWIG_fail;
19088 0 : swig_obj[0] = args;
19089 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19090 0 : if (!SWIG_IsOK(res1)) {
19091 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19092 : }
19093 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19094 0 : {
19095 0 : if (!arg1) {
19096 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19097 : }
19098 : }
19099 0 : {
19100 0 : const int bLocalUseExceptions = GetUseExceptions();
19101 0 : if ( bLocalUseExceptions ) {
19102 0 : pushErrorHandler();
19103 : }
19104 0 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
19105 0 : if ( bLocalUseExceptions ) {
19106 0 : popErrorHandler();
19107 : }
19108 : #ifndef SED_HACKS
19109 : if ( bLocalUseExceptions ) {
19110 : CPLErr eclass = CPLGetLastErrorType();
19111 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19112 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19113 : }
19114 : }
19115 : #endif
19116 : }
19117 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19118 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19119 : return resultobj;
19120 : fail:
19121 : return NULL;
19122 : }
19123 :
19124 :
19125 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19126 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19127 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19128 0 : void *argp1 = 0 ;
19129 0 : int res1 = 0 ;
19130 0 : PyObject *swig_obj[1] ;
19131 0 : double result;
19132 :
19133 0 : if (!args) SWIG_fail;
19134 0 : swig_obj[0] = args;
19135 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19136 0 : if (!SWIG_IsOK(res1)) {
19137 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19138 : }
19139 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19140 0 : {
19141 0 : if (!arg1) {
19142 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19143 : }
19144 : }
19145 0 : {
19146 0 : const int bLocalUseExceptions = GetUseExceptions();
19147 0 : if ( bLocalUseExceptions ) {
19148 0 : pushErrorHandler();
19149 : }
19150 0 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
19151 0 : if ( bLocalUseExceptions ) {
19152 0 : popErrorHandler();
19153 : }
19154 : #ifndef SED_HACKS
19155 : if ( bLocalUseExceptions ) {
19156 : CPLErr eclass = CPLGetLastErrorType();
19157 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19158 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19159 : }
19160 : }
19161 : #endif
19162 : }
19163 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19164 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19165 : return resultobj;
19166 : fail:
19167 : return NULL;
19168 : }
19169 :
19170 :
19171 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19172 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19173 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19174 0 : void *argp1 = 0 ;
19175 0 : int res1 = 0 ;
19176 0 : PyObject *swig_obj[1] ;
19177 0 : double result;
19178 :
19179 0 : if (!args) SWIG_fail;
19180 0 : swig_obj[0] = args;
19181 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19182 0 : if (!SWIG_IsOK(res1)) {
19183 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19184 : }
19185 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19186 0 : {
19187 0 : if (!arg1) {
19188 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19189 : }
19190 : }
19191 0 : {
19192 0 : const int bLocalUseExceptions = GetUseExceptions();
19193 0 : if ( bLocalUseExceptions ) {
19194 0 : pushErrorHandler();
19195 : }
19196 0 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
19197 0 : if ( bLocalUseExceptions ) {
19198 0 : popErrorHandler();
19199 : }
19200 : #ifndef SED_HACKS
19201 : if ( bLocalUseExceptions ) {
19202 : CPLErr eclass = CPLGetLastErrorType();
19203 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19204 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19205 : }
19206 : }
19207 : #endif
19208 : }
19209 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19210 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19211 : return resultobj;
19212 : fail:
19213 : return NULL;
19214 : }
19215 :
19216 :
19217 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19218 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19219 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19220 0 : void *argp1 = 0 ;
19221 0 : int res1 = 0 ;
19222 0 : PyObject *swig_obj[1] ;
19223 0 : double result;
19224 :
19225 0 : if (!args) SWIG_fail;
19226 0 : swig_obj[0] = args;
19227 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19228 0 : if (!SWIG_IsOK(res1)) {
19229 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19230 : }
19231 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19232 0 : {
19233 0 : if (!arg1) {
19234 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19235 : }
19236 : }
19237 0 : {
19238 0 : const int bLocalUseExceptions = GetUseExceptions();
19239 0 : if ( bLocalUseExceptions ) {
19240 0 : pushErrorHandler();
19241 : }
19242 0 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
19243 0 : if ( bLocalUseExceptions ) {
19244 0 : popErrorHandler();
19245 : }
19246 : #ifndef SED_HACKS
19247 : if ( bLocalUseExceptions ) {
19248 : CPLErr eclass = CPLGetLastErrorType();
19249 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19250 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19251 : }
19252 : }
19253 : #endif
19254 : }
19255 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19256 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19257 : return resultobj;
19258 : fail:
19259 : return NULL;
19260 : }
19261 :
19262 :
19263 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19264 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19265 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19266 0 : void *argp1 = 0 ;
19267 0 : int res1 = 0 ;
19268 0 : PyObject *swig_obj[1] ;
19269 0 : char *result = 0 ;
19270 :
19271 0 : if (!args) SWIG_fail;
19272 0 : swig_obj[0] = args;
19273 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19274 0 : if (!SWIG_IsOK(res1)) {
19275 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19276 : }
19277 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19278 0 : {
19279 0 : if (!arg1) {
19280 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19281 : }
19282 : }
19283 0 : {
19284 0 : const int bLocalUseExceptions = GetUseExceptions();
19285 0 : if ( bLocalUseExceptions ) {
19286 0 : pushErrorHandler();
19287 : }
19288 0 : result = (char *)OSRCRSInfo_area_name_get(arg1);
19289 0 : if ( bLocalUseExceptions ) {
19290 0 : popErrorHandler();
19291 : }
19292 : #ifndef SED_HACKS
19293 : if ( bLocalUseExceptions ) {
19294 : CPLErr eclass = CPLGetLastErrorType();
19295 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19296 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19297 : }
19298 : }
19299 : #endif
19300 : }
19301 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19302 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19303 : return resultobj;
19304 : fail:
19305 : return NULL;
19306 : }
19307 :
19308 :
19309 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19310 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19311 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19312 0 : void *argp1 = 0 ;
19313 0 : int res1 = 0 ;
19314 0 : PyObject *swig_obj[1] ;
19315 0 : char *result = 0 ;
19316 :
19317 0 : if (!args) SWIG_fail;
19318 0 : swig_obj[0] = args;
19319 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19320 0 : if (!SWIG_IsOK(res1)) {
19321 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19322 : }
19323 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19324 0 : {
19325 0 : if (!arg1) {
19326 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19327 : }
19328 : }
19329 0 : {
19330 0 : const int bLocalUseExceptions = GetUseExceptions();
19331 0 : if ( bLocalUseExceptions ) {
19332 0 : pushErrorHandler();
19333 : }
19334 0 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
19335 0 : if ( bLocalUseExceptions ) {
19336 0 : popErrorHandler();
19337 : }
19338 : #ifndef SED_HACKS
19339 : if ( bLocalUseExceptions ) {
19340 : CPLErr eclass = CPLGetLastErrorType();
19341 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19342 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19343 : }
19344 : }
19345 : #endif
19346 : }
19347 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19348 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19349 : return resultobj;
19350 : fail:
19351 : return NULL;
19352 : }
19353 :
19354 :
19355 1 : SWIGINTERN PyObject *_wrap_GetAuthorityListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19356 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19357 1 : char **result = 0 ;
19358 :
19359 1 : if (!SWIG_Python_UnpackTuple(args, "GetAuthorityListFromDatabase", 0, 0, 0)) SWIG_fail;
19360 1 : {
19361 1 : const int bLocalUseExceptions = GetUseExceptions();
19362 1 : if ( bLocalUseExceptions ) {
19363 1 : pushErrorHandler();
19364 : }
19365 1 : result = (char **)GetAuthorityListFromDatabase();
19366 1 : if ( bLocalUseExceptions ) {
19367 1 : popErrorHandler();
19368 : }
19369 : #ifndef SED_HACKS
19370 : if ( bLocalUseExceptions ) {
19371 : CPLErr eclass = CPLGetLastErrorType();
19372 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19373 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19374 : }
19375 : }
19376 : #endif
19377 : }
19378 1 : {
19379 : /* %typemap(out) char **CSL -> ( string ) */
19380 1 : bool bErr = false;
19381 1 : resultobj = CSLToList(result, &bErr);
19382 1 : CSLDestroy(result);
19383 1 : if( bErr ) {
19384 0 : SWIG_fail;
19385 : }
19386 : }
19387 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19388 : return resultobj;
19389 : fail:
19390 : return NULL;
19391 : }
19392 :
19393 :
19394 1 : SWIGINTERN PyObject *_wrap_GetCRSInfoListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19395 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19396 1 : char *arg1 = (char *) 0 ;
19397 1 : OSRCRSInfo ***arg2 = (OSRCRSInfo ***) 0 ;
19398 1 : int *arg3 = (int *) 0 ;
19399 1 : int res1 ;
19400 1 : char *buf1 = 0 ;
19401 1 : int alloc1 = 0 ;
19402 1 : OSRCRSInfo **list2 = 0 ;
19403 1 : int count2 = 0 ;
19404 1 : PyObject *swig_obj[1] ;
19405 :
19406 1 : {
19407 : /* %typemap(in,numinputs=0) (OSRCRSInfo*** pList, int* pnListCount) */
19408 1 : arg2 = &list2;
19409 1 : arg3 = &count2;
19410 : }
19411 1 : if (!args) SWIG_fail;
19412 1 : swig_obj[0] = args;
19413 1 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
19414 1 : if (!SWIG_IsOK(res1)) {
19415 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCRSInfoListFromDatabase" "', argument " "1"" of type '" "char const *""'");
19416 : }
19417 1 : arg1 = reinterpret_cast< char * >(buf1);
19418 1 : {
19419 1 : const int bLocalUseExceptions = GetUseExceptions();
19420 1 : if ( bLocalUseExceptions ) {
19421 1 : pushErrorHandler();
19422 : }
19423 1 : GetCRSInfoListFromDatabase((char const *)arg1,arg2,arg3);
19424 1 : if ( bLocalUseExceptions ) {
19425 1 : popErrorHandler();
19426 : }
19427 : #ifndef SED_HACKS
19428 : if ( bLocalUseExceptions ) {
19429 : CPLErr eclass = CPLGetLastErrorType();
19430 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19431 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19432 : }
19433 : }
19434 : #endif
19435 : }
19436 1 : resultobj = SWIG_Py_Void();
19437 1 : {
19438 : /* %typemap(argout) (OSRCRSInfo*** pList, int* pnListCount) */
19439 1 : PyObject *dict = PyTuple_New( *arg3 );
19440 6610 : for( int i = 0; i < *arg3; i++ ) {
19441 13218 : OSRCRSInfo *o = new_OSRCRSInfo( (*arg2)[i]->pszAuthName,
19442 6609 : (*arg2)[i]->pszCode,
19443 6609 : (*arg2)[i]->pszName,
19444 : (*arg2)[i]->eType,
19445 6609 : (*arg2)[i]->bDeprecated,
19446 6609 : (*arg2)[i]->bBboxValid,
19447 : (*arg2)[i]->dfWestLongitudeDeg,
19448 : (*arg2)[i]->dfSouthLatitudeDeg,
19449 : (*arg2)[i]->dfEastLongitudeDeg,
19450 : (*arg2)[i]->dfNorthLatitudeDeg,
19451 6609 : (*arg2)[i]->pszAreaName,
19452 6609 : (*arg2)[i]->pszProjectionMethod );
19453 :
19454 6609 : PyTuple_SetItem(dict, i,
19455 : SWIG_NewPointerObj((void*)o,SWIGTYPE_p_OSRCRSInfo,1) );
19456 : }
19457 1 : Py_DECREF(resultobj);
19458 1 : resultobj = dict;
19459 : }
19460 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19461 1 : {
19462 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19463 1 : OSRDestroyCRSInfoList( *(arg2) );
19464 : }
19465 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19466 : return resultobj;
19467 0 : fail:
19468 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19469 0 : {
19470 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19471 0 : OSRDestroyCRSInfoList( *(arg2) );
19472 : }
19473 : return NULL;
19474 : }
19475 :
19476 :
19477 1 : SWIGINTERN PyObject *_wrap_SetPROJSearchPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19478 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19479 1 : char *arg1 = (char *) 0 ;
19480 1 : int bToFree1 = 0 ;
19481 1 : PyObject *swig_obj[1] ;
19482 :
19483 1 : if (!args) SWIG_fail;
19484 1 : swig_obj[0] = args;
19485 1 : {
19486 : /* %typemap(in) (const char *utf8_path) */
19487 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19488 : {
19489 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19490 : }
19491 : else
19492 : {
19493 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19494 :
19495 : }
19496 1 : if (arg1 == NULL)
19497 : {
19498 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19499 0 : SWIG_fail;
19500 : }
19501 : }
19502 1 : {
19503 1 : const int bLocalUseExceptions = GetUseExceptions();
19504 1 : if ( bLocalUseExceptions ) {
19505 1 : pushErrorHandler();
19506 : }
19507 1 : SetPROJSearchPath((char const *)arg1);
19508 1 : if ( bLocalUseExceptions ) {
19509 1 : popErrorHandler();
19510 : }
19511 : #ifndef SED_HACKS
19512 : if ( bLocalUseExceptions ) {
19513 : CPLErr eclass = CPLGetLastErrorType();
19514 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19515 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19516 : }
19517 : }
19518 : #endif
19519 : }
19520 1 : resultobj = SWIG_Py_Void();
19521 1 : {
19522 : /* %typemap(freearg) (const char *utf8_path) */
19523 1 : GDALPythonFreeCStr(arg1, bToFree1);
19524 : }
19525 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19526 : return resultobj;
19527 0 : fail:
19528 0 : {
19529 : /* %typemap(freearg) (const char *utf8_path) */
19530 0 : GDALPythonFreeCStr(arg1, bToFree1);
19531 : }
19532 : return NULL;
19533 : }
19534 :
19535 :
19536 16 : SWIGINTERN PyObject *_wrap_SetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19537 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19538 16 : char **arg1 = (char **) 0 ;
19539 16 : PyObject *swig_obj[1] ;
19540 :
19541 16 : if (!args) SWIG_fail;
19542 16 : swig_obj[0] = args;
19543 16 : {
19544 : /* %typemap(in) char **dict */
19545 16 : arg1 = NULL;
19546 16 : if ( PySequence_Check( swig_obj[0] ) ) {
19547 16 : int bErr = FALSE;
19548 16 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
19549 16 : if ( bErr )
19550 : {
19551 0 : SWIG_fail;
19552 : }
19553 : }
19554 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
19555 0 : int bErr = FALSE;
19556 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
19557 0 : if ( bErr )
19558 : {
19559 0 : SWIG_fail;
19560 : }
19561 : }
19562 : else {
19563 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19564 0 : SWIG_fail;
19565 : }
19566 : }
19567 16 : {
19568 16 : const int bLocalUseExceptions = GetUseExceptions();
19569 16 : if ( bLocalUseExceptions ) {
19570 16 : pushErrorHandler();
19571 : }
19572 16 : SetPROJSearchPaths(arg1);
19573 16 : if ( bLocalUseExceptions ) {
19574 16 : popErrorHandler();
19575 : }
19576 : #ifndef SED_HACKS
19577 : if ( bLocalUseExceptions ) {
19578 : CPLErr eclass = CPLGetLastErrorType();
19579 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19580 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19581 : }
19582 : }
19583 : #endif
19584 : }
19585 16 : resultobj = SWIG_Py_Void();
19586 16 : {
19587 : /* %typemap(freearg) char **dict */
19588 16 : CSLDestroy( arg1 );
19589 : }
19590 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19591 : return resultobj;
19592 0 : fail:
19593 0 : {
19594 : /* %typemap(freearg) char **dict */
19595 0 : CSLDestroy( arg1 );
19596 : }
19597 : return NULL;
19598 : }
19599 :
19600 :
19601 21 : SWIGINTERN PyObject *_wrap_GetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19602 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19603 21 : char **result = 0 ;
19604 :
19605 21 : if (!SWIG_Python_UnpackTuple(args, "GetPROJSearchPaths", 0, 0, 0)) SWIG_fail;
19606 21 : {
19607 21 : const int bLocalUseExceptions = GetUseExceptions();
19608 21 : if ( bLocalUseExceptions ) {
19609 21 : pushErrorHandler();
19610 : }
19611 21 : result = (char **)GetPROJSearchPaths();
19612 21 : if ( bLocalUseExceptions ) {
19613 21 : popErrorHandler();
19614 : }
19615 : #ifndef SED_HACKS
19616 : if ( bLocalUseExceptions ) {
19617 : CPLErr eclass = CPLGetLastErrorType();
19618 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19619 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19620 : }
19621 : }
19622 : #endif
19623 : }
19624 21 : {
19625 : /* %typemap(out) char **CSL -> ( string ) */
19626 21 : bool bErr = false;
19627 21 : resultobj = CSLToList(result, &bErr);
19628 21 : CSLDestroy(result);
19629 21 : if( bErr ) {
19630 0 : SWIG_fail;
19631 : }
19632 : }
19633 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19634 : return resultobj;
19635 : fail:
19636 : return NULL;
19637 : }
19638 :
19639 :
19640 70 : SWIGINTERN PyObject *_wrap_GetPROJVersionMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19641 70 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19642 70 : int result;
19643 :
19644 70 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMajor", 0, 0, 0)) SWIG_fail;
19645 70 : {
19646 70 : const int bLocalUseExceptions = GetUseExceptions();
19647 70 : if ( bLocalUseExceptions ) {
19648 63 : pushErrorHandler();
19649 : }
19650 70 : result = (int)GetPROJVersionMajor();
19651 70 : if ( bLocalUseExceptions ) {
19652 63 : popErrorHandler();
19653 : }
19654 : #ifndef SED_HACKS
19655 : if ( bLocalUseExceptions ) {
19656 : CPLErr eclass = CPLGetLastErrorType();
19657 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19658 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19659 : }
19660 : }
19661 : #endif
19662 : }
19663 70 : resultobj = SWIG_From_int(static_cast< int >(result));
19664 70 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19665 : return resultobj;
19666 0 : fail:
19667 0 : return NULL;
19668 : }
19669 :
19670 :
19671 64 : SWIGINTERN PyObject *_wrap_GetPROJVersionMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19672 64 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19673 64 : int result;
19674 :
19675 64 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMinor", 0, 0, 0)) SWIG_fail;
19676 64 : {
19677 64 : const int bLocalUseExceptions = GetUseExceptions();
19678 64 : if ( bLocalUseExceptions ) {
19679 60 : pushErrorHandler();
19680 : }
19681 64 : result = (int)GetPROJVersionMinor();
19682 64 : if ( bLocalUseExceptions ) {
19683 60 : popErrorHandler();
19684 : }
19685 : #ifndef SED_HACKS
19686 : if ( bLocalUseExceptions ) {
19687 : CPLErr eclass = CPLGetLastErrorType();
19688 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19689 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19690 : }
19691 : }
19692 : #endif
19693 : }
19694 64 : resultobj = SWIG_From_int(static_cast< int >(result));
19695 64 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19696 : return resultobj;
19697 0 : fail:
19698 0 : return NULL;
19699 : }
19700 :
19701 :
19702 49 : SWIGINTERN PyObject *_wrap_GetPROJVersionMicro(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19703 49 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19704 49 : int result;
19705 :
19706 49 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMicro", 0, 0, 0)) SWIG_fail;
19707 49 : {
19708 49 : const int bLocalUseExceptions = GetUseExceptions();
19709 49 : if ( bLocalUseExceptions ) {
19710 49 : pushErrorHandler();
19711 : }
19712 49 : result = (int)GetPROJVersionMicro();
19713 49 : if ( bLocalUseExceptions ) {
19714 49 : popErrorHandler();
19715 : }
19716 : #ifndef SED_HACKS
19717 : if ( bLocalUseExceptions ) {
19718 : CPLErr eclass = CPLGetLastErrorType();
19719 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19720 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19721 : }
19722 : }
19723 : #endif
19724 : }
19725 49 : resultobj = SWIG_From_int(static_cast< int >(result));
19726 49 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19727 : return resultobj;
19728 0 : fail:
19729 0 : return NULL;
19730 : }
19731 :
19732 :
19733 0 : SWIGINTERN PyObject *_wrap_GetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19734 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19735 0 : bool result;
19736 :
19737 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJEnableNetwork", 0, 0, 0)) SWIG_fail;
19738 0 : {
19739 0 : const int bLocalUseExceptions = GetUseExceptions();
19740 0 : if ( bLocalUseExceptions ) {
19741 0 : pushErrorHandler();
19742 : }
19743 0 : result = (bool)GetPROJEnableNetwork();
19744 0 : if ( bLocalUseExceptions ) {
19745 0 : popErrorHandler();
19746 : }
19747 : #ifndef SED_HACKS
19748 : if ( bLocalUseExceptions ) {
19749 : CPLErr eclass = CPLGetLastErrorType();
19750 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19751 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19752 : }
19753 : }
19754 : #endif
19755 : }
19756 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19757 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19758 : return resultobj;
19759 0 : fail:
19760 0 : return NULL;
19761 : }
19762 :
19763 :
19764 0 : SWIGINTERN PyObject *_wrap_SetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19765 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19766 0 : bool arg1 ;
19767 0 : bool val1 ;
19768 0 : int ecode1 = 0 ;
19769 0 : PyObject *swig_obj[1] ;
19770 :
19771 0 : if (!args) SWIG_fail;
19772 0 : swig_obj[0] = args;
19773 0 : ecode1 = SWIG_AsVal_bool(swig_obj[0], &val1);
19774 0 : if (!SWIG_IsOK(ecode1)) {
19775 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetPROJEnableNetwork" "', argument " "1"" of type '" "bool""'");
19776 : }
19777 0 : arg1 = static_cast< bool >(val1);
19778 0 : {
19779 0 : const int bLocalUseExceptions = GetUseExceptions();
19780 0 : if ( bLocalUseExceptions ) {
19781 0 : pushErrorHandler();
19782 : }
19783 0 : SetPROJEnableNetwork(arg1);
19784 0 : if ( bLocalUseExceptions ) {
19785 0 : popErrorHandler();
19786 : }
19787 : #ifndef SED_HACKS
19788 : if ( bLocalUseExceptions ) {
19789 : CPLErr eclass = CPLGetLastErrorType();
19790 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19791 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19792 : }
19793 : }
19794 : #endif
19795 : }
19796 0 : resultobj = SWIG_Py_Void();
19797 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19798 : return resultobj;
19799 : fail:
19800 : return NULL;
19801 : }
19802 :
19803 :
19804 1 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19805 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19806 1 : char *arg1 = (char *) 0 ;
19807 1 : int bToFree1 = 0 ;
19808 1 : PyObject *swig_obj[1] ;
19809 :
19810 1 : if (!args) SWIG_fail;
19811 1 : swig_obj[0] = args;
19812 1 : {
19813 : /* %typemap(in) (const char *utf8_path) */
19814 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19815 : {
19816 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19817 : }
19818 : else
19819 : {
19820 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19821 :
19822 : }
19823 1 : if (arg1 == NULL)
19824 : {
19825 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19826 0 : SWIG_fail;
19827 : }
19828 : }
19829 1 : {
19830 1 : const int bLocalUseExceptions = GetUseExceptions();
19831 1 : if ( bLocalUseExceptions ) {
19832 1 : pushErrorHandler();
19833 : }
19834 1 : SetPROJAuxDbPath((char const *)arg1);
19835 1 : if ( bLocalUseExceptions ) {
19836 1 : popErrorHandler();
19837 : }
19838 : #ifndef SED_HACKS
19839 : if ( bLocalUseExceptions ) {
19840 : CPLErr eclass = CPLGetLastErrorType();
19841 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19842 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19843 : }
19844 : }
19845 : #endif
19846 : }
19847 1 : resultobj = SWIG_Py_Void();
19848 1 : {
19849 : /* %typemap(freearg) (const char *utf8_path) */
19850 1 : GDALPythonFreeCStr(arg1, bToFree1);
19851 : }
19852 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19853 : return resultobj;
19854 0 : fail:
19855 0 : {
19856 : /* %typemap(freearg) (const char *utf8_path) */
19857 0 : GDALPythonFreeCStr(arg1, bToFree1);
19858 : }
19859 : return NULL;
19860 : }
19861 :
19862 :
19863 0 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19864 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19865 0 : char **arg1 = (char **) 0 ;
19866 0 : PyObject *swig_obj[1] ;
19867 :
19868 0 : if (!args) SWIG_fail;
19869 0 : swig_obj[0] = args;
19870 0 : {
19871 : /* %typemap(in) char **dict */
19872 0 : arg1 = NULL;
19873 0 : if ( PySequence_Check( swig_obj[0] ) ) {
19874 0 : int bErr = FALSE;
19875 0 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
19876 0 : if ( bErr )
19877 : {
19878 0 : SWIG_fail;
19879 : }
19880 : }
19881 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
19882 0 : int bErr = FALSE;
19883 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
19884 0 : if ( bErr )
19885 : {
19886 0 : SWIG_fail;
19887 : }
19888 : }
19889 : else {
19890 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19891 0 : SWIG_fail;
19892 : }
19893 : }
19894 0 : {
19895 0 : const int bLocalUseExceptions = GetUseExceptions();
19896 0 : if ( bLocalUseExceptions ) {
19897 0 : pushErrorHandler();
19898 : }
19899 0 : SetPROJAuxDbPaths(arg1);
19900 0 : if ( bLocalUseExceptions ) {
19901 0 : popErrorHandler();
19902 : }
19903 : #ifndef SED_HACKS
19904 : if ( bLocalUseExceptions ) {
19905 : CPLErr eclass = CPLGetLastErrorType();
19906 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19907 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19908 : }
19909 : }
19910 : #endif
19911 : }
19912 0 : resultobj = SWIG_Py_Void();
19913 0 : {
19914 : /* %typemap(freearg) char **dict */
19915 0 : CSLDestroy( arg1 );
19916 : }
19917 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19918 : return resultobj;
19919 0 : fail:
19920 0 : {
19921 : /* %typemap(freearg) char **dict */
19922 0 : CSLDestroy( arg1 );
19923 : }
19924 : return NULL;
19925 : }
19926 :
19927 :
19928 0 : SWIGINTERN PyObject *_wrap_GetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19929 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19930 0 : char **result = 0 ;
19931 :
19932 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJAuxDbPaths", 0, 0, 0)) SWIG_fail;
19933 0 : {
19934 0 : const int bLocalUseExceptions = GetUseExceptions();
19935 0 : if ( bLocalUseExceptions ) {
19936 0 : pushErrorHandler();
19937 : }
19938 0 : result = (char **)GetPROJAuxDbPaths();
19939 0 : if ( bLocalUseExceptions ) {
19940 0 : popErrorHandler();
19941 : }
19942 : #ifndef SED_HACKS
19943 : if ( bLocalUseExceptions ) {
19944 : CPLErr eclass = CPLGetLastErrorType();
19945 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19946 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19947 : }
19948 : }
19949 : #endif
19950 : }
19951 0 : {
19952 : /* %typemap(out) char **CSL -> ( string ) */
19953 0 : bool bErr = false;
19954 0 : resultobj = CSLToList(result, &bErr);
19955 0 : CSLDestroy(result);
19956 0 : if( bErr ) {
19957 0 : SWIG_fail;
19958 : }
19959 : }
19960 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19961 : return resultobj;
19962 : fail:
19963 : return NULL;
19964 : }
19965 :
19966 :
19967 : static PyMethodDef SwigMethods[] = {
19968 : { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
19969 : { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
19970 : { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
19971 : { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
19972 : { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
19973 : { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
19974 : { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
19975 : { "GetWellKnownGeogCSAsWKT", _wrap_GetWellKnownGeogCSAsWKT, METH_O, "GetWellKnownGeogCSAsWKT(char const * name) -> OGRErr"},
19976 : { "GetUserInputAsWKT", _wrap_GetUserInputAsWKT, METH_O, "GetUserInputAsWKT(char const * name) -> OGRErr"},
19977 : { "AreaOfUse_west_lon_degree_get", _wrap_AreaOfUse_west_lon_degree_get, METH_O, "AreaOfUse_west_lon_degree_get(AreaOfUse self) -> double"},
19978 : { "AreaOfUse_south_lat_degree_get", _wrap_AreaOfUse_south_lat_degree_get, METH_O, "AreaOfUse_south_lat_degree_get(AreaOfUse self) -> double"},
19979 : { "AreaOfUse_east_lon_degree_get", _wrap_AreaOfUse_east_lon_degree_get, METH_O, "AreaOfUse_east_lon_degree_get(AreaOfUse self) -> double"},
19980 : { "AreaOfUse_north_lat_degree_get", _wrap_AreaOfUse_north_lat_degree_get, METH_O, "AreaOfUse_north_lat_degree_get(AreaOfUse self) -> double"},
19981 : { "AreaOfUse_name_get", _wrap_AreaOfUse_name_get, METH_O, "AreaOfUse_name_get(AreaOfUse self) -> char *"},
19982 : { "new_AreaOfUse", _wrap_new_AreaOfUse, METH_VARARGS, "new_AreaOfUse(double west_lon_degree, double south_lat_degree, double east_lon_degree, double north_lat_degree, char * name) -> AreaOfUse"},
19983 : { "delete_AreaOfUse", _wrap_delete_AreaOfUse, METH_O, "delete_AreaOfUse(AreaOfUse self)"},
19984 : { "AreaOfUse_swigregister", AreaOfUse_swigregister, METH_O, NULL},
19985 : { "AreaOfUse_swiginit", AreaOfUse_swiginit, METH_VARARGS, NULL},
19986 : { "OSRAreaOfUse_west_lon_degree_get", _wrap_OSRAreaOfUse_west_lon_degree_get, METH_O, "OSRAreaOfUse_west_lon_degree_get(AreaOfUse area) -> double"},
19987 : { "OSRAreaOfUse_south_lat_degree_get", _wrap_OSRAreaOfUse_south_lat_degree_get, METH_O, "OSRAreaOfUse_south_lat_degree_get(AreaOfUse area) -> double"},
19988 : { "OSRAreaOfUse_east_lon_degree_get", _wrap_OSRAreaOfUse_east_lon_degree_get, METH_O, "OSRAreaOfUse_east_lon_degree_get(AreaOfUse area) -> double"},
19989 : { "OSRAreaOfUse_north_lat_degree_get", _wrap_OSRAreaOfUse_north_lat_degree_get, METH_O, "OSRAreaOfUse_north_lat_degree_get(AreaOfUse area) -> double"},
19990 : { "OSRAreaOfUse_name_get", _wrap_OSRAreaOfUse_name_get, METH_O, "OSRAreaOfUse_name_get(AreaOfUse area) -> char const *"},
19991 : { "new_SpatialReference", (PyCFunction)(void(*)(void))_wrap_new_SpatialReference, METH_VARARGS|METH_KEYWORDS, "\n"
19992 : "new_SpatialReference(char const * wkt=\"\") -> SpatialReference\n"
19993 : "\n"
19994 : "Python proxy of an :cpp:class:`OGRSpatialReference`.\n"
19995 : "\n"
19996 : ""},
19997 : { "delete_SpatialReference", _wrap_delete_SpatialReference, METH_O, "delete_SpatialReference(SpatialReference self)"},
19998 : { "SpatialReference___str__", _wrap_SpatialReference___str__, METH_O, "SpatialReference___str__(SpatialReference self) -> retStringAndCPLFree *"},
19999 : { "SpatialReference_GetName", _wrap_SpatialReference_GetName, METH_O, "\n"
20000 : "SpatialReference_GetName(SpatialReference self) -> char const *\n"
20001 : "\n"
20002 : "\n"
20003 : "Return the CRS name.\n"
20004 : "\n"
20005 : "See :cpp:func:`OGRSpatialReference::GetName`.\n"
20006 : "\n"
20007 : "Returns\n"
20008 : "-------\n"
20009 : "str\n"
20010 : "\n"
20011 : "Examples\n"
20012 : "--------\n"
20013 : ">>> vt_sp = osr.SpatialReference()\n"
20014 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20015 : "0\n"
20016 : ">>> vt_sp.GetName()\n"
20017 : "'NAD83 / Vermont (ftUS)'\n"
20018 : "\n"
20019 : "\n"
20020 : ""},
20021 : { "SpatialReference_IsSame", (PyCFunction)(void(*)(void))_wrap_SpatialReference_IsSame, METH_VARARGS|METH_KEYWORDS, "\n"
20022 : "SpatialReference_IsSame(SpatialReference self, SpatialReference rhs, char ** options=None) -> int\n"
20023 : "\n"
20024 : "\n"
20025 : "Determine if two spatial references describe the same system.\n"
20026 : "\n"
20027 : "See :cpp:func:`OGRSpatialReference::IsSame`.\n"
20028 : "\n"
20029 : "Parameters\n"
20030 : "----------\n"
20031 : "rhs : SpatialReference\n"
20032 : "options : list/dict\n"
20033 : "\n"
20034 : "Returns\n"
20035 : "-------\n"
20036 : "int\n"
20037 : " 1 if the spatial references describe the same system, 0 otherwise\n"
20038 : "\n"
20039 : "\n"
20040 : ""},
20041 : { "SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS, METH_VARARGS, "\n"
20042 : "SpatialReference_IsSameGeogCS(SpatialReference self, SpatialReference rhs) -> int\n"
20043 : "\n"
20044 : "\n"
20045 : "Determine if two spatial references share the same geographic coordinate system.\n"
20046 : "\n"
20047 : "See :cpp:func:`OGRSpatialReference::IsSameGeogCS`.\n"
20048 : "\n"
20049 : "Parameters\n"
20050 : "----------\n"
20051 : "rhs : SpatialReference\n"
20052 : "options : list/dict\n"
20053 : "\n"
20054 : "Returns\n"
20055 : "-------\n"
20056 : "int\n"
20057 : " 1 if the spatial references have the same GeogCS, 0 otherwise\n"
20058 : "\n"
20059 : "\n"
20060 : ""},
20061 : { "SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS, METH_VARARGS, "\n"
20062 : "SpatialReference_IsSameVertCS(SpatialReference self, SpatialReference rhs) -> int\n"
20063 : "\n"
20064 : "\n"
20065 : "Determine if two spatial references share the same vertical coordinate system.\n"
20066 : "\n"
20067 : "See :cpp:func:`OGRSpatialReference::IsSameVertCS`.\n"
20068 : "\n"
20069 : "Parameters\n"
20070 : "----------\n"
20071 : "rhs : SpatialReference\n"
20072 : "options : list/dict\n"
20073 : "\n"
20074 : "Returns\n"
20075 : "-------\n"
20076 : "int\n"
20077 : " 1 if the spatial references have the same VertCS, 0 otherwise\n"
20078 : "\n"
20079 : "\n"
20080 : ""},
20081 : { "SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic, METH_O, "\n"
20082 : "SpatialReference_IsGeographic(SpatialReference self) -> int\n"
20083 : "\n"
20084 : "\n"
20085 : "Check if this SRS is a geographic coordinate system.\n"
20086 : "\n"
20087 : "See :cpp:func:`OGRSpatialReference::IsGeographic`.\n"
20088 : "\n"
20089 : "Returns\n"
20090 : "-------\n"
20091 : "int\n"
20092 : " 1 if the SRS is geographic, 0 otherwise\n"
20093 : "\n"
20094 : ""},
20095 : { "SpatialReference_IsDerivedGeographic", _wrap_SpatialReference_IsDerivedGeographic, METH_O, "\n"
20096 : "SpatialReference_IsDerivedGeographic(SpatialReference self) -> int\n"
20097 : "\n"
20098 : "\n"
20099 : "Check if this CRS is a derived geographic CRS, such as a rotated long/lat grid.\n"
20100 : "\n"
20101 : "See :cpp:func:`OGRSpatialReference::IsDerivedGeographic`.\n"
20102 : "\n"
20103 : "Returns\n"
20104 : "-------\n"
20105 : "int\n"
20106 : " 1 if the CRS is derived geographic, 0 otherwise\n"
20107 : "\n"
20108 : ""},
20109 : { "SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected, METH_O, "\n"
20110 : "SpatialReference_IsProjected(SpatialReference self) -> int\n"
20111 : "\n"
20112 : "\n"
20113 : "Check if this SRS is a projected coordinate system.\n"
20114 : "\n"
20115 : "See :cpp:func:`OGRSpatialReference::IsProjected`.\n"
20116 : "\n"
20117 : "Returns\n"
20118 : "-------\n"
20119 : "int\n"
20120 : " 1 if the SRS is projected, 0 otherwise\n"
20121 : "\n"
20122 : ""},
20123 : { "SpatialReference_IsDerivedProjected", _wrap_SpatialReference_IsDerivedProjected, METH_O, "SpatialReference_IsDerivedProjected(SpatialReference self) -> int"},
20124 : { "SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound, METH_O, "\n"
20125 : "SpatialReference_IsCompound(SpatialReference self) -> int\n"
20126 : "\n"
20127 : "\n"
20128 : "Check if this CRS is a compound CRS.\n"
20129 : "\n"
20130 : "See :cpp:func:`OGRSpatialReference::IsCompound`.\n"
20131 : "\n"
20132 : "Returns\n"
20133 : "-------\n"
20134 : "int\n"
20135 : " 1 if the CRS is compound, 0 otherwise\n"
20136 : "\n"
20137 : ""},
20138 : { "SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric, METH_O, "\n"
20139 : "SpatialReference_IsGeocentric(SpatialReference self) -> int\n"
20140 : "\n"
20141 : "\n"
20142 : "Check if this SRS is a geocentric coordinate system.\n"
20143 : "\n"
20144 : "See :cpp:func:`OGRSpatialReference::IsGeocentric`.\n"
20145 : "\n"
20146 : "Returns\n"
20147 : "-------\n"
20148 : "int\n"
20149 : " 1 if the SRS is geocentric, 0 otherwise\n"
20150 : "\n"
20151 : ""},
20152 : { "SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal, METH_O, "\n"
20153 : "SpatialReference_IsLocal(SpatialReference self) -> int\n"
20154 : "\n"
20155 : "\n"
20156 : "Check if this CRS is a local CRS.\n"
20157 : "\n"
20158 : "See :cpp:func:`OGRSpatialReference::IsLocal`.\n"
20159 : "\n"
20160 : "Returns\n"
20161 : "-------\n"
20162 : "int\n"
20163 : " 1 if the SRS is local, 0 otherwise\n"
20164 : "\n"
20165 : ""},
20166 : { "SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical, METH_O, "\n"
20167 : "SpatialReference_IsVertical(SpatialReference self) -> int\n"
20168 : "\n"
20169 : "\n"
20170 : "Check if this is a vertical coordinate system.\n"
20171 : "\n"
20172 : "See :cpp:func:`OGRSpatialReference::IsVertical`.\n"
20173 : "\n"
20174 : "Returns\n"
20175 : "-------\n"
20176 : "int\n"
20177 : " 1 if the CRS is vertical, 0 otherwise\n"
20178 : "\n"
20179 : "\n"
20180 : ""},
20181 : { "SpatialReference_IsDynamic", _wrap_SpatialReference_IsDynamic, METH_O, "\n"
20182 : "SpatialReference_IsDynamic(SpatialReference self) -> bool\n"
20183 : "\n"
20184 : "\n"
20185 : "Check if this CRS is a dynamic coordinate CRS.\n"
20186 : "\n"
20187 : "See :cpp:func:`OGRSpatialReference::IsDynamic`.\n"
20188 : "\n"
20189 : "Returns\n"
20190 : "-------\n"
20191 : "bool\n"
20192 : "\n"
20193 : ""},
20194 : { "SpatialReference_HasPointMotionOperation", _wrap_SpatialReference_HasPointMotionOperation, METH_O, "\n"
20195 : "SpatialReference_HasPointMotionOperation(SpatialReference self) -> bool\n"
20196 : "\n"
20197 : "\n"
20198 : "Check if a CRS has an associated point motion operation.\n"
20199 : "\n"
20200 : "See :cpp:func:`OGRSpatialReference::HasPointMotionOperation`.\n"
20201 : "\n"
20202 : "Returns\n"
20203 : "-------\n"
20204 : "bool\n"
20205 : "\n"
20206 : "\n"
20207 : ""},
20208 : { "SpatialReference_GetCoordinateEpoch", _wrap_SpatialReference_GetCoordinateEpoch, METH_O, "\n"
20209 : "SpatialReference_GetCoordinateEpoch(SpatialReference self) -> double\n"
20210 : "\n"
20211 : "\n"
20212 : "Return the coordinate epoch as a decimal year.\n"
20213 : "\n"
20214 : "See :cpp:func:`OGRSpatialReference::GetCoordinateEpoch`.\n"
20215 : "\n"
20216 : "Returns\n"
20217 : "-------\n"
20218 : "float\n"
20219 : " coordinate epoch as a decimal year, or 0 if not set/relevant\n"
20220 : "\n"
20221 : "\n"
20222 : ""},
20223 : { "SpatialReference_SetCoordinateEpoch", _wrap_SpatialReference_SetCoordinateEpoch, METH_VARARGS, "SpatialReference_SetCoordinateEpoch(SpatialReference self, double coordinateEpoch)"},
20224 : { "SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong, METH_O, "SpatialReference_EPSGTreatsAsLatLong(SpatialReference self) -> int"},
20225 : { "SpatialReference_EPSGTreatsAsNorthingEasting", _wrap_SpatialReference_EPSGTreatsAsNorthingEasting, METH_O, "SpatialReference_EPSGTreatsAsNorthingEasting(SpatialReference self) -> int"},
20226 : { "SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority, METH_VARARGS, "SpatialReference_SetAuthority(SpatialReference self, char const * pszTargetKey, char const * pszAuthority, int nCode) -> OGRErr"},
20227 : { "SpatialReference_GetAttrValue", _wrap_SpatialReference_GetAttrValue, METH_VARARGS, "\n"
20228 : "SpatialReference_GetAttrValue(SpatialReference self, char const * name, int child=0) -> char const *\n"
20229 : "\n"
20230 : "\n"
20231 : "Fetch indicated attribute of named node.\n"
20232 : "\n"
20233 : "See :cpp:func:`OGRSpatialReference::GetAttrValue`.\n"
20234 : "\n"
20235 : "Parameters\n"
20236 : "----------\n"
20237 : "name : str\n"
20238 : " tree node to look for (case insensitive)\n"
20239 : "child : int, default = 0\n"
20240 : " 0-indexed child of the node\n"
20241 : "\n"
20242 : "Returns\n"
20243 : "-------\n"
20244 : "str\n"
20245 : "\n"
20246 : "Examples\n"
20247 : "--------\n"
20248 : ">>> vt_sp = osr.SpatialReference()\n"
20249 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20250 : "0\n"
20251 : ">>> vt_sp.GetAttrValue('UNIT', 0)\n"
20252 : "'US survey foot'\n"
20253 : "\n"
20254 : "\n"
20255 : ""},
20256 : { "SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue, METH_VARARGS, "SpatialReference_SetAttrValue(SpatialReference self, char const * name, char const * value) -> OGRErr"},
20257 : { "SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits, METH_VARARGS, "SpatialReference_SetAngularUnits(SpatialReference self, char const * name, double to_radians) -> OGRErr"},
20258 : { "SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits, METH_O, "\n"
20259 : "SpatialReference_GetAngularUnits(SpatialReference self) -> double\n"
20260 : "\n"
20261 : "\n"
20262 : "Fetch conversion between angular geographic coordinate system units and radians.\n"
20263 : "\n"
20264 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20265 : "\n"
20266 : "Returns\n"
20267 : "-------\n"
20268 : "float\n"
20269 : " Value to multiply angular distances by to transform them to radians.\n"
20270 : "\n"
20271 : "Examples\n"
20272 : "--------\n"
20273 : ">>> srs = osr.SpatialReference()\n"
20274 : ">>> srs.ImportFromEPSG(4326)\n"
20275 : "0\n"
20276 : ">>> srs.GetAngularUnits()\n"
20277 : "0.017453292519943295\n"
20278 : "\n"
20279 : "\n"
20280 : ""},
20281 : { "SpatialReference_GetAngularUnitsName", _wrap_SpatialReference_GetAngularUnitsName, METH_O, "\n"
20282 : "SpatialReference_GetAngularUnitsName(SpatialReference self) -> char const *\n"
20283 : "\n"
20284 : "\n"
20285 : "Fetch angular geographic coordinate system units.\n"
20286 : "\n"
20287 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20288 : "\n"
20289 : "Returns\n"
20290 : "-------\n"
20291 : "str\n"
20292 : "\n"
20293 : "Examples\n"
20294 : "--------\n"
20295 : ">>> srs = osr.SpatialReference()\n"
20296 : ">>> srs.ImportFromEPSG(4326)\n"
20297 : "0\n"
20298 : ">>> srs.GetAngularUnitsName()\n"
20299 : "'degree'\n"
20300 : "\n"
20301 : "\n"
20302 : ""},
20303 : { "SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits, METH_VARARGS, "SpatialReference_SetTargetLinearUnits(SpatialReference self, char const * target, char const * name, double to_meters) -> OGRErr"},
20304 : { "SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits, METH_VARARGS, "SpatialReference_SetLinearUnits(SpatialReference self, char const * name, double to_meters) -> OGRErr"},
20305 : { "SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters, METH_VARARGS, "SpatialReference_SetLinearUnitsAndUpdateParameters(SpatialReference self, char const * name, double to_meters) -> OGRErr"},
20306 : { "SpatialReference_GetTargetLinearUnits", _wrap_SpatialReference_GetTargetLinearUnits, METH_VARARGS, "\n"
20307 : "SpatialReference_GetTargetLinearUnits(SpatialReference self, char const * target_key) -> double\n"
20308 : "\n"
20309 : "\n"
20310 : "Fetch linear units for a target.\n"
20311 : "\n"
20312 : "See :cpp:func:`OGRSpatialReference::GetTargetLinearUnits`.\n"
20313 : "\n"
20314 : "Parameters\n"
20315 : "----------\n"
20316 : "target_key : str\n"
20317 : " key to look un, such as 'PROJCS' or 'VERT_CS'\n"
20318 : "\n"
20319 : "Returns\n"
20320 : "-------\n"
20321 : "double\n"
20322 : "\n"
20323 : "\n"
20324 : ""},
20325 : { "SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits, METH_O, "\n"
20326 : "SpatialReference_GetLinearUnits(SpatialReference self) -> double\n"
20327 : "\n"
20328 : "\n"
20329 : "Fetch the conversion between linear projection units and meters.\n"
20330 : "\n"
20331 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20332 : "\n"
20333 : "Returns\n"
20334 : "-------\n"
20335 : "float\n"
20336 : "\n"
20337 : "Examples\n"
20338 : "--------\n"
20339 : ">>> vt_sp = osr.SpatialReference()\n"
20340 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20341 : "0\n"
20342 : ">>> vt_sp.GetLinearUnits()\n"
20343 : "0.30480060960121924\n"
20344 : "\n"
20345 : "\n"
20346 : ""},
20347 : { "SpatialReference_GetLinearUnitsName", _wrap_SpatialReference_GetLinearUnitsName, METH_O, "\n"
20348 : "SpatialReference_GetLinearUnitsName(SpatialReference self) -> char const *\n"
20349 : "\n"
20350 : "\n"
20351 : "Fetch the name of the linear projection units.\n"
20352 : "\n"
20353 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20354 : "\n"
20355 : "Returns\n"
20356 : "-------\n"
20357 : "str\n"
20358 : "\n"
20359 : "Examples\n"
20360 : "--------\n"
20361 : ">>> vt_sp = osr.SpatialReference()\n"
20362 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20363 : "0\n"
20364 : ">>> vt_sp.GetLinearUnitsName()\n"
20365 : "'US survey foot'\n"
20366 : "\n"
20367 : "\n"
20368 : ""},
20369 : { "SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode, METH_VARARGS, "\n"
20370 : "SpatialReference_GetAuthorityCode(SpatialReference self, char const * target_key) -> char const *\n"
20371 : "\n"
20372 : "\n"
20373 : "Get the authority code for a node.\n"
20374 : "\n"
20375 : "See :cpp:func:`OGRSpatialReference::GetAuthorityCode`.\n"
20376 : "\n"
20377 : "Parameters\n"
20378 : "----------\n"
20379 : "target_key : str\n"
20380 : " the partial or complete path to the node to get an authority from\n"
20381 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority code\n"
20382 : " on the root element)\n"
20383 : "\n"
20384 : "Returns\n"
20385 : "-------\n"
20386 : "str or ``None`` on failure\n"
20387 : "\n"
20388 : "Examples\n"
20389 : "--------\n"
20390 : ">>> srs = osr.SpatialReference()\n"
20391 : ">>> srs.ImportFromEPSG(4326)\n"
20392 : "0\n"
20393 : ">>> srs.GetAuthorityName('DATUM')\n"
20394 : "'EPSG'\n"
20395 : ">>> srs.GetAuthorityCode('DATUM')\n"
20396 : "'6326'\n"
20397 : ">>> srs.GetAuthorityCode(None)\n"
20398 : "'4326'\n"
20399 : "\n"
20400 : "\n"
20401 : ""},
20402 : { "SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName, METH_VARARGS, "\n"
20403 : "SpatialReference_GetAuthorityName(SpatialReference self, char const * target_key) -> char const *\n"
20404 : "\n"
20405 : "\n"
20406 : "Get the authority name for a node.\n"
20407 : "\n"
20408 : "See :cpp:func:`OGRSpatialReference::GetAuthorityName`.\n"
20409 : "\n"
20410 : "Parameters\n"
20411 : "----------\n"
20412 : "target_key : str\n"
20413 : " the partial or complete path to the node to get an authority from\n"
20414 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority name\n"
20415 : " on the root element)\n"
20416 : "\n"
20417 : "Returns\n"
20418 : "-------\n"
20419 : "str\n"
20420 : "\n"
20421 : ""},
20422 : { "SpatialReference_GetAreaOfUse", _wrap_SpatialReference_GetAreaOfUse, METH_O, "\n"
20423 : "SpatialReference_GetAreaOfUse(SpatialReference self) -> AreaOfUse\n"
20424 : "\n"
20425 : "\n"
20426 : "Return the area of use of the SRS.\n"
20427 : "\n"
20428 : "See :cpp:func:`OGRSpatialReference::GetAreaOfUse`.\n"
20429 : "\n"
20430 : "Returns\n"
20431 : "-------\n"
20432 : "AreaOfUse\n"
20433 : " object providing a description of the area of use as well as bounding parallels / meridians\n"
20434 : "\n"
20435 : "Examples\n"
20436 : "--------\n"
20437 : "\n"
20438 : ">>> vt_sp = osr.SpatialReference()\n"
20439 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20440 : "0\n"
20441 : ">>> aou = vt_sp.GetAreaOfUse()\n"
20442 : ">>> aou.name\n"
20443 : "'United States (USA) - Vermont - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor.'\n"
20444 : ">>> aou.west_lon_degree, aou.south_lat_degree, aou.east_lon_degree, aou.north_lat_degree\n"
20445 : "(-73.44, 42.72, -71.5, 45.03)\n"
20446 : "\n"
20447 : "\n"
20448 : ""},
20449 : { "SpatialReference_GetAxisName", _wrap_SpatialReference_GetAxisName, METH_VARARGS, "\n"
20450 : "SpatialReference_GetAxisName(SpatialReference self, char const * target_key, int iAxis) -> char const *\n"
20451 : "\n"
20452 : "\n"
20453 : "Fetch an axis description.\n"
20454 : "\n"
20455 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20456 : "\n"
20457 : "Parameters\n"
20458 : "----------\n"
20459 : "target_key : str\n"
20460 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20461 : "iAxis : int\n"
20462 : " The 0-based index of the axis to fetch\n"
20463 : "\n"
20464 : "Returns\n"
20465 : "-------\n"
20466 : "str\n"
20467 : "\n"
20468 : "Examples\n"
20469 : "--------\n"
20470 : ">>> srs = osr.SpatialReference()\n"
20471 : ">>> srs.ImportFromEPSG(4979)\n"
20472 : "0\n"
20473 : ">>> for i in range(3):\n"
20474 : "... srs.GetAxisName('GEOGCS', i)\n"
20475 : "...\n"
20476 : "'Geodetic latitude'\n"
20477 : "'Geodetic longitude'\n"
20478 : "'Ellipsoidal height'\n"
20479 : "\n"
20480 : "\n"
20481 : ""},
20482 : { "SpatialReference_GetAxesCount", _wrap_SpatialReference_GetAxesCount, METH_O, "\n"
20483 : "SpatialReference_GetAxesCount(SpatialReference self) -> int\n"
20484 : "\n"
20485 : "\n"
20486 : "Return the number of axes of the coordinate system of the CRS.\n"
20487 : "\n"
20488 : "See :cpp:func:`OGRSpatialReference::GetAxesCount`.\n"
20489 : "\n"
20490 : "Returns\n"
20491 : "-------\n"
20492 : "int\n"
20493 : "\n"
20494 : "Examples\n"
20495 : "--------\n"
20496 : ">>> srs = osr.SpatialReference()\n"
20497 : ">>> srs.ImportFromEPSG(4326)\n"
20498 : "0\n"
20499 : ">>> srs.GetAxesCount()\n"
20500 : "2\n"
20501 : ">>> srs.ImportFromEPSG(4979)\n"
20502 : "0\n"
20503 : ">>> srs.GetAxesCount()\n"
20504 : "3\n"
20505 : "\n"
20506 : ""},
20507 : { "SpatialReference_GetAxisOrientation", _wrap_SpatialReference_GetAxisOrientation, METH_VARARGS, "\n"
20508 : "SpatialReference_GetAxisOrientation(SpatialReference self, char const * target_key, int iAxis) -> OGRAxisOrientation\n"
20509 : "\n"
20510 : "\n"
20511 : "Fetch an axis orientation.\n"
20512 : "\n"
20513 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20514 : "\n"
20515 : "Parameters\n"
20516 : "----------\n"
20517 : "target_key : str\n"
20518 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20519 : "iAxis : int\n"
20520 : " The 0-based index of the axis to fetch\n"
20521 : "\n"
20522 : "Returns\n"
20523 : "-------\n"
20524 : "int\n"
20525 : "\n"
20526 : "Examples\n"
20527 : "--------\n"
20528 : ">>> srs = osr.SpatialReference()\n"
20529 : ">>> srs.ImportFromEPSG(4979)\n"
20530 : "0\n"
20531 : ">>> srs.GetAxisOrientation('GEOGCS', 0) == osr.OAO_North\n"
20532 : "True\n"
20533 : ">>> srs.GetAxisOrientation('GEOGCS', 1) == osr.OAO_East\n"
20534 : "True\n"
20535 : ">>> srs.GetAxisOrientation('GEOGCS', 2) == osr.OAO_Up\n"
20536 : "True\n"
20537 : "\n"
20538 : ""},
20539 : { "SpatialReference_GetAxisMappingStrategy", _wrap_SpatialReference_GetAxisMappingStrategy, METH_O, "\n"
20540 : "SpatialReference_GetAxisMappingStrategy(SpatialReference self) -> OSRAxisMappingStrategy\n"
20541 : "\n"
20542 : "\n"
20543 : "Return the data axis to CRS axis mapping strategy:\n"
20544 : "\n"
20545 : "- :py:const:`OAMS_TRADITIONAL_GIS_ORDER` means that for geographic CRS\n"
20546 : " with lag/long order, the data will still be long/lat ordered. Similarly\n"
20547 : " for a projected CRS with northing/easting order, the data will still be\n"
20548 : " easting/northing ordered.\n"
20549 : "- :py:const:`OAMS_AUTHORITY_COMPLIANT` means that the data axis will be\n"
20550 : " identical to the CRS axis.\n"
20551 : "- :py:const:`OAMS_CUSTOM` means that the ordering is defined with\n"
20552 : " :py:meth:`SetDataAxisToSRSAxisMapping`.\n"
20553 : "\n"
20554 : "See :cpp:func:`OGRSpatialReference::GetAxisMappingStrategy`.\n"
20555 : "\n"
20556 : "Returns\n"
20557 : "-------\n"
20558 : "int\n"
20559 : "\n"
20560 : "\n"
20561 : ""},
20562 : { "SpatialReference_SetAxisMappingStrategy", _wrap_SpatialReference_SetAxisMappingStrategy, METH_VARARGS, "SpatialReference_SetAxisMappingStrategy(SpatialReference self, OSRAxisMappingStrategy strategy)"},
20563 : { "SpatialReference_GetDataAxisToSRSAxisMapping", _wrap_SpatialReference_GetDataAxisToSRSAxisMapping, METH_O, "\n"
20564 : "SpatialReference_GetDataAxisToSRSAxisMapping(SpatialReference self)\n"
20565 : "\n"
20566 : "\n"
20567 : "Return the data axis to SRS axis mapping.\n"
20568 : "\n"
20569 : "See :cpp:func:`OGRSpatialReference::GetDataAxisToSRSAxisMapping`.\n"
20570 : "\n"
20571 : "Returns\n"
20572 : "-------\n"
20573 : "tuple\n"
20574 : "\n"
20575 : "\n"
20576 : ""},
20577 : { "SpatialReference_SetDataAxisToSRSAxisMapping", _wrap_SpatialReference_SetDataAxisToSRSAxisMapping, METH_VARARGS, "SpatialReference_SetDataAxisToSRSAxisMapping(SpatialReference self, int nList) -> OGRErr"},
20578 : { "SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM, METH_VARARGS, "SpatialReference_SetUTM(SpatialReference self, int zone, int north=1) -> OGRErr"},
20579 : { "SpatialReference_GetUTMZone", _wrap_SpatialReference_GetUTMZone, METH_O, "\n"
20580 : "SpatialReference_GetUTMZone(SpatialReference self) -> int\n"
20581 : "\n"
20582 : "\n"
20583 : "Get UTM zone.\n"
20584 : "\n"
20585 : "See :cpp:func:`OGRSpatialReference::GetUTMZone`.\n"
20586 : "\n"
20587 : "Returns\n"
20588 : "-------\n"
20589 : "int\n"
20590 : " UTM zone number. Negative in the southern hemisphere and positive in the northern hemisphere. If the SRS is not UTM, zero will be returned.\n"
20591 : "\n"
20592 : "\n"
20593 : ""},
20594 : { "SpatialReference_SetStatePlane", _wrap_SpatialReference_SetStatePlane, METH_VARARGS, "SpatialReference_SetStatePlane(SpatialReference self, int zone, int is_nad83=1, char const * unitsname=\"\", double units=0.0) -> OGRErr"},
20595 : { "SpatialReference_AutoIdentifyEPSG", _wrap_SpatialReference_AutoIdentifyEPSG, METH_O, "\n"
20596 : "SpatialReference_AutoIdentifyEPSG(SpatialReference self) -> OGRErr\n"
20597 : "\n"
20598 : "\n"
20599 : "Add an EPSG authority code to the CRS\n"
20600 : "where an aspect of the coordinate system can be easily and safely\n"
20601 : "corresponded with an EPSG identifier.\n"
20602 : "\n"
20603 : "See :cpp:func:`OGRSpatialReference::AutoIdentifyEPSG`.\n"
20604 : "\n"
20605 : "Returns\n"
20606 : "-------\n"
20607 : "int\n"
20608 : " :py:const:`OGRERR_NONE` or :py:const:`OGRERR_UNSUPPORTED_SRS`.\n"
20609 : "\n"
20610 : "\n"
20611 : ""},
20612 : { "SpatialReference_FindMatches", _wrap_SpatialReference_FindMatches, METH_VARARGS, "SpatialReference_FindMatches(SpatialReference self, char ** options=None)"},
20613 : { "SpatialReference_SetProjection", _wrap_SpatialReference_SetProjection, METH_VARARGS, "SpatialReference_SetProjection(SpatialReference self, char const * arg) -> OGRErr"},
20614 : { "SpatialReference_SetProjParm", _wrap_SpatialReference_SetProjParm, METH_VARARGS, "SpatialReference_SetProjParm(SpatialReference self, char const * name, double val) -> OGRErr"},
20615 : { "SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm, METH_VARARGS, "\n"
20616 : "SpatialReference_GetProjParm(SpatialReference self, char const * name, double default_val=0.0) -> double\n"
20617 : "\n"
20618 : "\n"
20619 : "Fetch a projection parameter value.\n"
20620 : "\n"
20621 : "See :cpp:func:`OGRSpatialReference::GetProjParm`.\n"
20622 : "\n"
20623 : "Parameters\n"
20624 : "----------\n"
20625 : "name : str\n"
20626 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20627 : "default_val : float, default = 0.0\n"
20628 : " value to return if this parameter doesn't exist\n"
20629 : "\n"
20630 : "Returns\n"
20631 : "-------\n"
20632 : "float\n"
20633 : "\n"
20634 : "Examples\n"
20635 : "--------\n"
20636 : ">>> vt_sp = osr.SpatialReference()\n"
20637 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20638 : "0\n"
20639 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20640 : "1640416.6667\n"
20641 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_NORTHING)\n"
20642 : "0.0\n"
20643 : "\n"
20644 : "\n"
20645 : ""},
20646 : { "SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm, METH_VARARGS, "SpatialReference_SetNormProjParm(SpatialReference self, char const * name, double val) -> OGRErr"},
20647 : { "SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm, METH_VARARGS, "\n"
20648 : "SpatialReference_GetNormProjParm(SpatialReference self, char const * name, double default_val=0.0) -> double\n"
20649 : "\n"
20650 : "\n"
20651 : "Fetch a normalized projection parameter value.\n"
20652 : "\n"
20653 : "This method is the same as :py:meth:`GetProjParm` except that the value of the\n"
20654 : "parameter is normalized into degrees or meters depending on whether it is\n"
20655 : "linear or angular.\n"
20656 : "\n"
20657 : "See :cpp:func:`OGRSpatialReference::GetNormProjParm`.\n"
20658 : "\n"
20659 : "Parameters\n"
20660 : "----------\n"
20661 : "name : str\n"
20662 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20663 : "default_val : float, default = 0.0\n"
20664 : " value to return if this parameter doesn't exist\n"
20665 : "\n"
20666 : "Returns\n"
20667 : "-------\n"
20668 : "float\n"
20669 : "\n"
20670 : "Examples\n"
20671 : "--------\n"
20672 : ">>> vt_sp = osr.SpatialReference()\n"
20673 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20674 : "0\n"
20675 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20676 : "1640416.6667\n"
20677 : ">>> vt_sp.GetNormProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20678 : "500000.0000101601\n"
20679 : "\n"
20680 : "\n"
20681 : ""},
20682 : { "SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor, METH_O, "\n"
20683 : "SpatialReference_GetSemiMajor(SpatialReference self) -> double\n"
20684 : "\n"
20685 : "\n"
20686 : "Get spheroid semi major axis (in meters starting with GDAL 3.0)\n"
20687 : "\n"
20688 : "See :cpp:func:`OGRSpatialReference::GetSemiMajor`.\n"
20689 : "\n"
20690 : "Returns\n"
20691 : "-------\n"
20692 : "float\n"
20693 : " semi-major axis, or :py:const:`SRS_WGS84_SEMIMAJOR` if it cannot be found.\n"
20694 : "\n"
20695 : ""},
20696 : { "SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor, METH_O, "\n"
20697 : "SpatialReference_GetSemiMinor(SpatialReference self) -> double\n"
20698 : "\n"
20699 : "\n"
20700 : "Get spheroid semi minor axis.\n"
20701 : "\n"
20702 : "See :cpp:func:`OGRSpatialReference::GetSemiMinor`.\n"
20703 : "\n"
20704 : "Returns\n"
20705 : "-------\n"
20706 : "float\n"
20707 : " semi-minor axis, or :py:const:`SRS_WGS84_SEMIMINOR` if it cannot be found.\n"
20708 : "\n"
20709 : ""},
20710 : { "SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening, METH_O, "\n"
20711 : "SpatialReference_GetInvFlattening(SpatialReference self) -> double\n"
20712 : "\n"
20713 : "\n"
20714 : "Get the spheroid inverse flattening.\n"
20715 : "\n"
20716 : "See :cpp:func:`OGRSpatialReference::GetInvFlattening`.\n"
20717 : "\n"
20718 : "Returns\n"
20719 : "-------\n"
20720 : "float\n"
20721 : "\n"
20722 : "Examples\n"
20723 : "--------\n"
20724 : ">>> srs = osr.SpatialReference()\n"
20725 : ">>> srs.ImportFromEPSG(4326) # WGS84\n"
20726 : "0\n"
20727 : ">>> srs.GetInvFlattening()\n"
20728 : "298.257223563\n"
20729 : ">>> srs.ImportFromEPSG(4269) # NAD83\n"
20730 : "0\n"
20731 : ">>> srs.GetInvFlattening()\n"
20732 : "298.257222101\n"
20733 : "\n"
20734 : ""},
20735 : { "SpatialReference_SetACEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetACEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetACEA(SpatialReference self, double stdp1, double stdp2, double clat, double clong, double fe, double fn) -> OGRErr"},
20736 : { "SpatialReference_SetAE", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetAE, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetAE(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20737 : { "SpatialReference_SetBonne", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetBonne, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetBonne(SpatialReference self, double stdp, double cm, double fe, double fn) -> OGRErr"},
20738 : { "SpatialReference_SetCEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetCEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetCEA(SpatialReference self, double stdp1, double cm, double fe, double fn) -> OGRErr"},
20739 : { "SpatialReference_SetCS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetCS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetCS(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20740 : { "SpatialReference_SetEC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEC(SpatialReference self, double stdp1, double stdp2, double clat, double clong, double fe, double fn) -> OGRErr"},
20741 : { "SpatialReference_SetEckertIV", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertIV, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertIV(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20742 : { "SpatialReference_SetEckertVI", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertVI, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertVI(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20743 : { "SpatialReference_SetEquirectangular", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEquirectangular, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEquirectangular(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20744 : { "SpatialReference_SetEquirectangular2", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEquirectangular2, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEquirectangular2(SpatialReference self, double clat, double clong, double pseudostdparallellat, double fe, double fn) -> OGRErr"},
20745 : { "SpatialReference_SetGaussSchreiberTMercator", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGaussSchreiberTMercator, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGaussSchreiberTMercator(SpatialReference self, double clat, double clong, double sc, double fe, double fn) -> OGRErr"},
20746 : { "SpatialReference_SetGS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGS(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20747 : { "SpatialReference_SetGH", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGH, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGH(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20748 : { "SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH, METH_O, "SpatialReference_SetIGH(SpatialReference self) -> OGRErr"},
20749 : { "SpatialReference_SetGEOS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGEOS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGEOS(SpatialReference self, double cm, double satelliteheight, double fe, double fn) -> OGRErr"},
20750 : { "SpatialReference_SetGnomonic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGnomonic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGnomonic(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20751 : { "SpatialReference_SetHOM", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetHOM, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetHOM(SpatialReference self, double clat, double clong, double azimuth, double recttoskew, double scale, double fe, double fn) -> OGRErr"},
20752 : { "SpatialReference_SetHOM2PNO", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetHOM2PNO, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetHOM2PNO(SpatialReference self, double clat, double dfLat1, double dfLong1, double dfLat2, double dfLong2, double scale, double fe, double fn) -> OGRErr"},
20753 : { "SpatialReference_SetKrovak", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetKrovak, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetKrovak(SpatialReference self, double clat, double clong, double azimuth, double pseudostdparallellat, double scale, double fe, double fn) -> OGRErr"},
20754 : { "SpatialReference_SetLAEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLAEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLAEA(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20755 : { "SpatialReference_SetLCC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCC(SpatialReference self, double stdp1, double stdp2, double clat, double clong, double fe, double fn) -> OGRErr"},
20756 : { "SpatialReference_SetLCC1SP", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCC1SP, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCC1SP(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20757 : { "SpatialReference_SetLCCB", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCCB, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCCB(SpatialReference self, double stdp1, double stdp2, double clat, double clong, double fe, double fn) -> OGRErr"},
20758 : { "SpatialReference_SetMC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMC(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20759 : { "SpatialReference_SetMercator", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMercator, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMercator(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20760 : { "SpatialReference_SetMercator2SP", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMercator2SP, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMercator2SP(SpatialReference self, double stdp1, double clat, double clong, double fe, double fn) -> OGRErr"},
20761 : { "SpatialReference_SetMollweide", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMollweide, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMollweide(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20762 : { "SpatialReference_SetNZMG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetNZMG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetNZMG(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20763 : { "SpatialReference_SetOS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetOS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetOS(SpatialReference self, double dfOriginLat, double dfCMeridian, double scale, double fe, double fn) -> OGRErr"},
20764 : { "SpatialReference_SetOrthographic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetOrthographic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetOrthographic(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20765 : { "SpatialReference_SetPolyconic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetPolyconic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetPolyconic(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20766 : { "SpatialReference_SetPS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetPS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetPS(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20767 : { "SpatialReference_SetRobinson", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetRobinson, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetRobinson(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20768 : { "SpatialReference_SetSinusoidal", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSinusoidal, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSinusoidal(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20769 : { "SpatialReference_SetStereographic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetStereographic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetStereographic(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20770 : { "SpatialReference_SetSOC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSOC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSOC(SpatialReference self, double latitudeoforigin, double cm, double fe, double fn) -> OGRErr"},
20771 : { "SpatialReference_SetTM", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTM, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTM(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20772 : { "SpatialReference_SetTMVariant", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMVariant, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMVariant(SpatialReference self, char const * pszVariantName, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20773 : { "SpatialReference_SetTMG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMG(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20774 : { "SpatialReference_SetTMSO", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMSO, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMSO(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20775 : { "SpatialReference_SetVDG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVDG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVDG(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20776 : { "SpatialReference_SetVerticalPerspective", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVerticalPerspective, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVerticalPerspective(SpatialReference self, double topoOriginLat, double topoOriginLon, double topoOriginHeight, double viewPointHeight, double fe, double fn) -> OGRErr"},
20777 : { "SpatialReference_SetWellKnownGeogCS", _wrap_SpatialReference_SetWellKnownGeogCS, METH_VARARGS, "SpatialReference_SetWellKnownGeogCS(SpatialReference self, char const * name) -> OGRErr"},
20778 : { "SpatialReference_SetFromUserInput", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetFromUserInput, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetFromUserInput(SpatialReference self, char const * name, char ** options=None) -> OGRErr"},
20779 : { "SpatialReference_CopyGeogCSFrom", _wrap_SpatialReference_CopyGeogCSFrom, METH_VARARGS, "SpatialReference_CopyGeogCSFrom(SpatialReference self, SpatialReference rhs) -> OGRErr"},
20780 : { "SpatialReference_SetTOWGS84", _wrap_SpatialReference_SetTOWGS84, METH_VARARGS, "SpatialReference_SetTOWGS84(SpatialReference self, double p1, double p2, double p3, double p4=0.0, double p5=0.0, double p6=0.0, double p7=0.0) -> OGRErr"},
20781 : { "SpatialReference_HasTOWGS84", _wrap_SpatialReference_HasTOWGS84, METH_O, "\n"
20782 : "SpatialReference_HasTOWGS84(SpatialReference self) -> bool\n"
20783 : "\n"
20784 : "\n"
20785 : "Return whether the SRS has a TOWGS84 parameter.\n"
20786 : "\n"
20787 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
20788 : "\n"
20789 : "Returns\n"
20790 : "-------\n"
20791 : "bool\n"
20792 : "\n"
20793 : "\n"
20794 : ""},
20795 : { "SpatialReference_GetTOWGS84", _wrap_SpatialReference_GetTOWGS84, METH_O, "\n"
20796 : "SpatialReference_GetTOWGS84(SpatialReference self) -> OGRErr\n"
20797 : "\n"
20798 : "\n"
20799 : "Fetch TOWGS84 parameter, if available.\n"
20800 : "\n"
20801 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
20802 : "\n"
20803 : "Returns\n"
20804 : "-------\n"
20805 : "tuple\n"
20806 : "\n"
20807 : "\n"
20808 : ""},
20809 : { "SpatialReference_AddGuessedTOWGS84", _wrap_SpatialReference_AddGuessedTOWGS84, METH_O, "SpatialReference_AddGuessedTOWGS84(SpatialReference self) -> OGRErr"},
20810 : { "SpatialReference_SetLocalCS", _wrap_SpatialReference_SetLocalCS, METH_VARARGS, "SpatialReference_SetLocalCS(SpatialReference self, char const * pszName) -> OGRErr"},
20811 : { "SpatialReference_SetGeogCS", _wrap_SpatialReference_SetGeogCS, METH_VARARGS, "SpatialReference_SetGeogCS(SpatialReference self, char const * pszGeogName, char const * pszDatumName, char const * pszEllipsoidName, double dfSemiMajor, double dfInvFlattening, char const * pszPMName=\"Greenwich\", double dfPMOffset=0.0, char const * pszUnits=\"degree\", double dfConvertToRadians=0.0174532925199433) -> OGRErr"},
20812 : { "SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS, METH_VARARGS, "SpatialReference_SetProjCS(SpatialReference self, char const * name=\"unnamed\") -> OGRErr"},
20813 : { "SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS, METH_VARARGS, "SpatialReference_SetGeocCS(SpatialReference self, char const * name=\"unnamed\") -> OGRErr"},
20814 : { "SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS, METH_VARARGS, "SpatialReference_SetVertCS(SpatialReference self, char const * VertCSName=\"unnamed\", char const * VertDatumName=\"unnamed\", int VertDatumType=0) -> OGRErr"},
20815 : { "SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS, METH_VARARGS, "SpatialReference_SetCompoundCS(SpatialReference self, char const * name, SpatialReference horizcs, SpatialReference vertcs) -> OGRErr"},
20816 : { "SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt, METH_VARARGS, "\n"
20817 : "SpatialReference_ImportFromWkt(SpatialReference self, char ** ppszInput) -> OGRErr\n"
20818 : "\n"
20819 : "\n"
20820 : "Import from WKT string.\n"
20821 : "\n"
20822 : "See :cpp:func:`OGRSpatialReference::importFromWkt`.\n"
20823 : "\n"
20824 : "Parameters\n"
20825 : "----------\n"
20826 : "ppszInput : str\n"
20827 : " WKT string\n"
20828 : "\n"
20829 : "Returns\n"
20830 : "-------\n"
20831 : "int\n"
20832 : " :py:const:`OGRERR_NONE` if import succeeds, or :py:const:`OGRERR_CORRUPT_DATA` if it fails for any reason.\n"
20833 : "\n"
20834 : "\n"
20835 : ""},
20836 : { "SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4, METH_VARARGS, "\n"
20837 : "SpatialReference_ImportFromProj4(SpatialReference self, char * ppszInput) -> OGRErr\n"
20838 : "\n"
20839 : "\n"
20840 : "Initialize SRS based on PROJ coordinate string.\n"
20841 : "\n"
20842 : "See :cpp:func:`OGRSpatialReference::importFromProj4`.\n"
20843 : "\n"
20844 : "Parameters\n"
20845 : "----------\n"
20846 : "ppszInput : str\n"
20847 : " PROJ coordinate string\n"
20848 : "\n"
20849 : "Returns\n"
20850 : "-------\n"
20851 : "int\n"
20852 : " :py:const:`OGRERR_NONE` on success, or :py:const:`OGRERR_CORRUPT_DATA` on failure\n"
20853 : "\n"
20854 : "Examples\n"
20855 : "--------\n"
20856 : ">>> srs = osr.SpatialReference()\n"
20857 : ">>> srs.ImportFromProj4('+proj=utm +zone=18 +datum=WGS84')\n"
20858 : "0\n"
20859 : "\n"
20860 : ""},
20861 : { "SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl, METH_VARARGS, "\n"
20862 : "SpatialReference_ImportFromUrl(SpatialReference self, char * url) -> OGRErr\n"
20863 : "\n"
20864 : "\n"
20865 : "Initialize SRS based on a URL.\n"
20866 : "\n"
20867 : "This method will download the spatial reference at a given URL and\n"
20868 : "feed it into :py:meth:`SetFromUserInput` for you.\n"
20869 : "\n"
20870 : "See :cpp:func:`OGRSpatialReference::importFromUrl`.\n"
20871 : "\n"
20872 : "Parameters\n"
20873 : "----------\n"
20874 : "url : str\n"
20875 : "\n"
20876 : "Returns\n"
20877 : "-------\n"
20878 : "int\n"
20879 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
20880 : "\n"
20881 : "\n"
20882 : ""},
20883 : { "SpatialReference_ImportFromESRI", _wrap_SpatialReference_ImportFromESRI, METH_VARARGS, "SpatialReference_ImportFromESRI(SpatialReference self, char ** ppszInput) -> OGRErr"},
20884 : { "SpatialReference_ImportFromEPSG", _wrap_SpatialReference_ImportFromEPSG, METH_VARARGS, "\n"
20885 : "SpatialReference_ImportFromEPSG(SpatialReference self, int arg) -> OGRErr\n"
20886 : "\n"
20887 : "\n"
20888 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
20889 : "\n"
20890 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSGA`.\n"
20891 : "\n"
20892 : "See :cpp:func:`OGRSpatialReference::importFromEPSG`.\n"
20893 : "\n"
20894 : "Parameters\n"
20895 : "----------\n"
20896 : "arg : int\n"
20897 : " EPSG code to search in PROJ database\n"
20898 : "\n"
20899 : "Returns\n"
20900 : "-------\n"
20901 : "int\n"
20902 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
20903 : "\n"
20904 : "Examples\n"
20905 : "--------\n"
20906 : ">>> srs = osr.SpatialReference()\n"
20907 : ">>> srs.ImportFromEPSG(4326)\n"
20908 : "0\n"
20909 : "\n"
20910 : "\n"
20911 : ""},
20912 : { "SpatialReference_ImportFromEPSGA", _wrap_SpatialReference_ImportFromEPSGA, METH_VARARGS, "\n"
20913 : "SpatialReference_ImportFromEPSGA(SpatialReference self, int arg) -> OGRErr\n"
20914 : "\n"
20915 : "\n"
20916 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
20917 : "\n"
20918 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSG`.\n"
20919 : "\n"
20920 : "See :cpp:func:`OGRSpatialReference::importFromEPSGA`.\n"
20921 : "\n"
20922 : "Parameters\n"
20923 : "----------\n"
20924 : "arg : int\n"
20925 : " EPSG code to search in PROJ database\n"
20926 : "\n"
20927 : "Returns\n"
20928 : "-------\n"
20929 : "int\n"
20930 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
20931 : "\n"
20932 : "\n"
20933 : ""},
20934 : { "SpatialReference_ImportFromPCI", _wrap_SpatialReference_ImportFromPCI, METH_VARARGS, "SpatialReference_ImportFromPCI(SpatialReference self, char const * proj, char const * units=\"METRE\", double [17] argin=0) -> OGRErr"},
20935 : { "SpatialReference_ImportFromUSGS", _wrap_SpatialReference_ImportFromUSGS, METH_VARARGS, "SpatialReference_ImportFromUSGS(SpatialReference self, long proj_code, long zone=0, double [15] argin=0, long datum_code=0) -> OGRErr"},
20936 : { "SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML, METH_VARARGS, "SpatialReference_ImportFromXML(SpatialReference self, char const * xmlString) -> OGRErr"},
20937 : { "SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM, METH_VARARGS, "SpatialReference_ImportFromERM(SpatialReference self, char const * proj, char const * datum, char const * units) -> OGRErr"},
20938 : { "SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys, METH_VARARGS, "SpatialReference_ImportFromMICoordSys(SpatialReference self, char const * pszCoordSys) -> OGRErr"},
20939 : { "SpatialReference_ImportFromOzi", _wrap_SpatialReference_ImportFromOzi, METH_VARARGS, "SpatialReference_ImportFromOzi(SpatialReference self, char const *const * papszLines) -> OGRErr"},
20940 : { "SpatialReference_ImportFromCF1", _wrap_SpatialReference_ImportFromCF1, METH_VARARGS, "SpatialReference_ImportFromCF1(SpatialReference self, char ** keyValues, char const * units=None) -> OGRErr"},
20941 : { "SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt, METH_VARARGS, "\n"
20942 : "SpatialReference_ExportToWkt(SpatialReference self, char ** options=None) -> OGRErr\n"
20943 : "\n"
20944 : "\n"
20945 : "Export this SRS into WKT 1 format.\n"
20946 : "\n"
20947 : "See :cpp:func:`OGRSpatialReference::exportToWkt`.\n"
20948 : "\n"
20949 : "Returns\n"
20950 : "-------\n"
20951 : "str\n"
20952 : "\n"
20953 : "See Also\n"
20954 : "--------\n"
20955 : ":py:meth:`ExportToPrettyWkt`\n"
20956 : "\n"
20957 : "\n"
20958 : ""},
20959 : { "SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt, METH_VARARGS, "\n"
20960 : "SpatialReference_ExportToPrettyWkt(SpatialReference self, int simplify=0) -> OGRErr\n"
20961 : "\n"
20962 : "\n"
20963 : "Convert this SRS into a nicely formatted WKT 1 string for display to a\n"
20964 : "person.\n"
20965 : "\n"
20966 : "See :cpp:func:`OGRSpatialReference::exportToPrettyWkt`.\n"
20967 : "\n"
20968 : "Parameters\n"
20969 : "----------\n"
20970 : "simplify : bool, default = False\n"
20971 : "\n"
20972 : "Returns\n"
20973 : "-------\n"
20974 : "str\n"
20975 : "\n"
20976 : "\n"
20977 : ""},
20978 : { "SpatialReference_ExportToPROJJSON", _wrap_SpatialReference_ExportToPROJJSON, METH_VARARGS, "\n"
20979 : "SpatialReference_ExportToPROJJSON(SpatialReference self, char ** options=None) -> OGRErr\n"
20980 : "\n"
20981 : "\n"
20982 : "Export this SRS in `PROJJSON <https://proj.org/en/latest/specifications/projjson.html>`_ format.\n"
20983 : "\n"
20984 : "See :cpp:func:`OGRSpatialReference::exportToPROJJSON`.\n"
20985 : "\n"
20986 : "Parameters\n"
20987 : "----------\n"
20988 : "options : list/dict\n"
20989 : " Options to control the format of the output. See :cpp:func:`OGRSpatialReference::ExportToPROJJSON`.\n"
20990 : "\n"
20991 : "Returns\n"
20992 : "-------\n"
20993 : "str\n"
20994 : "\n"
20995 : "\n"
20996 : ""},
20997 : { "SpatialReference_ExportToProj4", _wrap_SpatialReference_ExportToProj4, METH_O, "\n"
20998 : "SpatialReference_ExportToProj4(SpatialReference self) -> OGRErr\n"
20999 : "\n"
21000 : "\n"
21001 : "Export this SRS to PROJ.4 legacy format.\n"
21002 : "\n"
21003 : ".. warning::\n"
21004 : "\n"
21005 : " Use of this function is discouraged. See :cpp:func:`OGRSpatialReference::exportToProj4`.\n"
21006 : "\n"
21007 : "Returns\n"
21008 : "-------\n"
21009 : "str\n"
21010 : "\n"
21011 : "\n"
21012 : ""},
21013 : { "SpatialReference_ExportToPCI", _wrap_SpatialReference_ExportToPCI, METH_O, "SpatialReference_ExportToPCI(SpatialReference self) -> OGRErr"},
21014 : { "SpatialReference_ExportToUSGS", _wrap_SpatialReference_ExportToUSGS, METH_O, "SpatialReference_ExportToUSGS(SpatialReference self) -> OGRErr"},
21015 : { "SpatialReference_ExportToERM", _wrap_SpatialReference_ExportToERM, METH_O, "SpatialReference_ExportToERM(SpatialReference self) -> OGRErr"},
21016 : { "SpatialReference_ExportToXML", _wrap_SpatialReference_ExportToXML, METH_VARARGS, "SpatialReference_ExportToXML(SpatialReference self, char const * dialect=\"\") -> OGRErr"},
21017 : { "SpatialReference_ExportToMICoordSys", _wrap_SpatialReference_ExportToMICoordSys, METH_O, "SpatialReference_ExportToMICoordSys(SpatialReference self) -> OGRErr"},
21018 : { "SpatialReference_ExportToCF1", _wrap_SpatialReference_ExportToCF1, METH_VARARGS, "SpatialReference_ExportToCF1(SpatialReference self, char ** options=None) -> char **"},
21019 : { "SpatialReference_ExportToCF1Units", _wrap_SpatialReference_ExportToCF1Units, METH_VARARGS, "SpatialReference_ExportToCF1Units(SpatialReference self, char ** options=None) -> retStringAndCPLFree *"},
21020 : { "SpatialReference_CloneGeogCS", _wrap_SpatialReference_CloneGeogCS, METH_O, "SpatialReference_CloneGeogCS(SpatialReference self) -> SpatialReference"},
21021 : { "SpatialReference_Clone", _wrap_SpatialReference_Clone, METH_O, "SpatialReference_Clone(SpatialReference self) -> SpatialReference"},
21022 : { "SpatialReference_StripVertical", _wrap_SpatialReference_StripVertical, METH_O, "\n"
21023 : "SpatialReference_StripVertical(SpatialReference self) -> OGRErr\n"
21024 : "\n"
21025 : "\n"
21026 : "Convert a compound CRS into a horizontal CRS.\n"
21027 : "\n"
21028 : "See :cpp:func:`OGRSpatialReference::StripVertical`.\n"
21029 : "\n"
21030 : ".. versionadded:: 3.6\n"
21031 : "\n"
21032 : "Returns\n"
21033 : "-------\n"
21034 : "OGRErr:\n"
21035 : " :py:const:`OGRERR_NONE` if the operation succeeds\n"
21036 : "\n"
21037 : ""},
21038 : { "SpatialReference_Validate", _wrap_SpatialReference_Validate, METH_O, "SpatialReference_Validate(SpatialReference self) -> OGRErr"},
21039 : { "SpatialReference_MorphToESRI", _wrap_SpatialReference_MorphToESRI, METH_O, "SpatialReference_MorphToESRI(SpatialReference self) -> OGRErr"},
21040 : { "SpatialReference_MorphFromESRI", _wrap_SpatialReference_MorphFromESRI, METH_O, "SpatialReference_MorphFromESRI(SpatialReference self) -> OGRErr"},
21041 : { "SpatialReference_ConvertToOtherProjection", _wrap_SpatialReference_ConvertToOtherProjection, METH_VARARGS, "SpatialReference_ConvertToOtherProjection(SpatialReference self, char const * other_projection, char ** options=None) -> SpatialReference"},
21042 : { "SpatialReference_PromoteTo3D", _wrap_SpatialReference_PromoteTo3D, METH_VARARGS, "SpatialReference_PromoteTo3D(SpatialReference self, char const * name=None) -> OGRErr"},
21043 : { "SpatialReference_DemoteTo2D", _wrap_SpatialReference_DemoteTo2D, METH_VARARGS, "SpatialReference_DemoteTo2D(SpatialReference self, char const * name=None) -> OGRErr"},
21044 : { "SpatialReference_swigregister", SpatialReference_swigregister, METH_O, NULL},
21045 : { "SpatialReference_swiginit", SpatialReference_swiginit, METH_VARARGS, NULL},
21046 : { "new_CoordinateTransformationOptions", _wrap_new_CoordinateTransformationOptions, METH_NOARGS, "new_CoordinateTransformationOptions() -> CoordinateTransformationOptions"},
21047 : { "delete_CoordinateTransformationOptions", _wrap_delete_CoordinateTransformationOptions, METH_O, "delete_CoordinateTransformationOptions(CoordinateTransformationOptions self)"},
21048 : { "CoordinateTransformationOptions_SetAreaOfInterest", _wrap_CoordinateTransformationOptions_SetAreaOfInterest, METH_VARARGS, "CoordinateTransformationOptions_SetAreaOfInterest(CoordinateTransformationOptions self, double westLongitudeDeg, double southLatitudeDeg, double eastLongitudeDeg, double northLatitudeDeg) -> bool"},
21049 : { "CoordinateTransformationOptions_SetOperation", _wrap_CoordinateTransformationOptions_SetOperation, METH_VARARGS, "CoordinateTransformationOptions_SetOperation(CoordinateTransformationOptions self, char const * operation, bool inverseCT=False) -> bool"},
21050 : { "CoordinateTransformationOptions_SetDesiredAccuracy", _wrap_CoordinateTransformationOptions_SetDesiredAccuracy, METH_VARARGS, "CoordinateTransformationOptions_SetDesiredAccuracy(CoordinateTransformationOptions self, double accuracy) -> bool"},
21051 : { "CoordinateTransformationOptions_SetBallparkAllowed", _wrap_CoordinateTransformationOptions_SetBallparkAllowed, METH_VARARGS, "CoordinateTransformationOptions_SetBallparkAllowed(CoordinateTransformationOptions self, bool allowBallpark) -> bool"},
21052 : { "CoordinateTransformationOptions_SetOnlyBest", _wrap_CoordinateTransformationOptions_SetOnlyBest, METH_VARARGS, "CoordinateTransformationOptions_SetOnlyBest(CoordinateTransformationOptions self, bool onlyBest) -> bool"},
21053 : { "CoordinateTransformationOptions_swigregister", CoordinateTransformationOptions_swigregister, METH_O, NULL},
21054 : { "CoordinateTransformationOptions_swiginit", CoordinateTransformationOptions_swiginit, METH_VARARGS, NULL},
21055 : { "new_CoordinateTransformation", _wrap_new_CoordinateTransformation, METH_VARARGS, "\n"
21056 : "CoordinateTransformation(SpatialReference src, SpatialReference dst)\n"
21057 : "new_CoordinateTransformation(SpatialReference src, SpatialReference dst, CoordinateTransformationOptions options) -> CoordinateTransformation\n"
21058 : "\n"
21059 : "Python proxy of an :cpp:class:`OGRCoordinateTransformation`.\n"
21060 : "\n"
21061 : ""},
21062 : { "delete_CoordinateTransformation", _wrap_delete_CoordinateTransformation, METH_O, "delete_CoordinateTransformation(CoordinateTransformation self)"},
21063 : { "CoordinateTransformation_GetInverse", _wrap_CoordinateTransformation_GetInverse, METH_O, "CoordinateTransformation_GetInverse(CoordinateTransformation self) -> CoordinateTransformation"},
21064 : { "CoordinateTransformation__TransformPoint3Double", _wrap_CoordinateTransformation__TransformPoint3Double, METH_VARARGS, "CoordinateTransformation__TransformPoint3Double(CoordinateTransformation self, double [3] inout)"},
21065 : { "CoordinateTransformation__TransformPoint4Double", _wrap_CoordinateTransformation__TransformPoint4Double, METH_VARARGS, "CoordinateTransformation__TransformPoint4Double(CoordinateTransformation self, double [4] inout)"},
21066 : { "CoordinateTransformation_TransformPoint", _wrap_CoordinateTransformation_TransformPoint, METH_VARARGS, "\n"
21067 : "CoordinateTransformation_TransformPoint(CoordinateTransformation self, double x, double y, double z=0.0)\n"
21068 : "CoordinateTransformation_TransformPoint(CoordinateTransformation self, double x, double y, double z, double t)\n"
21069 : ""},
21070 : { "CoordinateTransformation_TransformPointWithErrorCode", _wrap_CoordinateTransformation_TransformPointWithErrorCode, METH_VARARGS, "\n"
21071 : "CoordinateTransformation_TransformPointWithErrorCode(CoordinateTransformation self, double x, double y, double z, double t)\n"
21072 : "\n"
21073 : "\n"
21074 : "Variant of :py:meth:`TransformPoint` that provides an error code.\n"
21075 : "\n"
21076 : "See :cpp:func:`OCTTransformEx`.\n"
21077 : "\n"
21078 : "Parameters\n"
21079 : "----------\n"
21080 : "x : float\n"
21081 : "y : float\n"
21082 : "z : float\n"
21083 : "t : float\n"
21084 : "\n"
21085 : "Returns\n"
21086 : "-------\n"
21087 : "tuple\n"
21088 : " tuple of (x, y, z, t, error) values\n"
21089 : "\n"
21090 : "\n"
21091 : ""},
21092 : { "CoordinateTransformation_TransformPoints", _wrap_CoordinateTransformation_TransformPoints, METH_VARARGS, "\n"
21093 : "CoordinateTransformation_TransformPoints(CoordinateTransformation self, int nCount)\n"
21094 : "\n"
21095 : "\n"
21096 : "Transform multiple points.\n"
21097 : "\n"
21098 : "See :cpp:func:`OCTTransform`.\n"
21099 : "\n"
21100 : "Parameters\n"
21101 : "----------\n"
21102 : "arg\n"
21103 : " A list of tuples, or a 2xN, 3xN, or 4xN numpy array\n"
21104 : "\n"
21105 : "Returns\n"
21106 : "-------\n"
21107 : "list\n"
21108 : " A list of tuples of (x, y, z) or (x, y, z, t) values, depending on the input.\n"
21109 : "\n"
21110 : "Examples\n"
21111 : "--------\n"
21112 : ">>> ct.TransformPoints([(-72.58, 44.26), (-72.59, 44.26)])\n"
21113 : "[(7390620.052019633, -51202148.77747277, 0.0), (7387261.070131293, -51200373.68798984, 0.0)]\n"
21114 : "\n"
21115 : ">>> import numpy as np\n"
21116 : ">>> ct.TransformPoints(np.array([[-72.58, 44.26], [-72.59, 44.26]]))\n"
21117 : "[(7390620.052019633, -51202148.77747277, 0.0), (7387261.070131293, -51200373.68798984, 0.0)]\n"
21118 : "\n"
21119 : "\n"
21120 : "\n"
21121 : ""},
21122 : { "CoordinateTransformation_TransformBounds", _wrap_CoordinateTransformation_TransformBounds, METH_VARARGS, "\n"
21123 : "CoordinateTransformation_TransformBounds(CoordinateTransformation self, double minx, double miny, double maxx, double maxy, int densify_pts)\n"
21124 : "\n"
21125 : "\n"
21126 : "Transform a boundary, densifying the edges to account for nonlinear\n"
21127 : "transformations along these edges.\n"
21128 : "\n"
21129 : "See :cpp:func:`OCTTransformBounds`.\n"
21130 : "\n"
21131 : "Parameters\n"
21132 : "----------\n"
21133 : "minx : float\n"
21134 : " Minimum bounding coordinate of the first axis in source CRS\n"
21135 : "miny : float\n"
21136 : " Minimum bounding coordinate of the second axis in source CRS\n"
21137 : "maxx : float\n"
21138 : " Maximum bounding coordinate of the first axis in source CRS\n"
21139 : "maxy : float\n"
21140 : " Maximum bounding coordinate of the second axis in source CRS\n"
21141 : "densify_pts : int\n"
21142 : " The number of points to use to densify the bounding polygon.\n"
21143 : " Recommended to use 21.\n"
21144 : "\n"
21145 : "Returns\n"
21146 : "-------\n"
21147 : "tuple\n"
21148 : " Transformed values of xmin, ymin, xmax, ymax\n"
21149 : "\n"
21150 : "Examples\n"
21151 : "--------\n"
21152 : ">>> ct.TransformBounds(-72.5, 44.2, -72.4, 44.3, 21)\n"
21153 : "(7415356.140468472, -51238192.683464445, 7454323.154814391, -51210287.42581475)\n"
21154 : "\n"
21155 : "\n"
21156 : ""},
21157 : { "CoordinateTransformation_swigregister", CoordinateTransformation_swigregister, METH_O, NULL},
21158 : { "CoordinateTransformation_swiginit", CoordinateTransformation_swiginit, METH_VARARGS, NULL},
21159 : { "CreateCoordinateTransformation", _wrap_CreateCoordinateTransformation, METH_VARARGS, "\n"
21160 : "CreateCoordinateTransformation(SpatialReference src, SpatialReference dst, CoordinateTransformationOptions options=None) -> CoordinateTransformation\n"
21161 : "\n"
21162 : "\n"
21163 : "Create a :py:class:`CoordinateTransformation` using a set of :py:class:`CoordinateTransformationOptions`.\n"
21164 : "\n"
21165 : "See :cpp:func:`OCTNewCoordinateTransformationEx`.\n"
21166 : "\n"
21167 : "Parameters\n"
21168 : "----------\n"
21169 : "src : SpatialReference\n"
21170 : " source spatial reference system\n"
21171 : "dst : SpatialReference\n"
21172 : " target spatial reference system\n"
21173 : "options : CoordinateTransformationOptions\n"
21174 : "\n"
21175 : "Returns\n"
21176 : "-------\n"
21177 : "CoordinateTransformation\n"
21178 : "\n"
21179 : "\n"
21180 : ""},
21181 : { "CRSInfo_auth_name_get", _wrap_CRSInfo_auth_name_get, METH_O, "CRSInfo_auth_name_get(CRSInfo self) -> char *"},
21182 : { "CRSInfo_code_get", _wrap_CRSInfo_code_get, METH_O, "CRSInfo_code_get(CRSInfo self) -> char *"},
21183 : { "CRSInfo_name_get", _wrap_CRSInfo_name_get, METH_O, "CRSInfo_name_get(CRSInfo self) -> char *"},
21184 : { "CRSInfo_type_get", _wrap_CRSInfo_type_get, METH_O, "CRSInfo_type_get(CRSInfo self) -> OSRCRSType"},
21185 : { "CRSInfo_deprecated_get", _wrap_CRSInfo_deprecated_get, METH_O, "CRSInfo_deprecated_get(CRSInfo self) -> bool"},
21186 : { "CRSInfo_bbox_valid_get", _wrap_CRSInfo_bbox_valid_get, METH_O, "CRSInfo_bbox_valid_get(CRSInfo self) -> bool"},
21187 : { "CRSInfo_west_lon_degree_get", _wrap_CRSInfo_west_lon_degree_get, METH_O, "CRSInfo_west_lon_degree_get(CRSInfo self) -> double"},
21188 : { "CRSInfo_south_lat_degree_get", _wrap_CRSInfo_south_lat_degree_get, METH_O, "CRSInfo_south_lat_degree_get(CRSInfo self) -> double"},
21189 : { "CRSInfo_east_lon_degree_get", _wrap_CRSInfo_east_lon_degree_get, METH_O, "CRSInfo_east_lon_degree_get(CRSInfo self) -> double"},
21190 : { "CRSInfo_north_lat_degree_get", _wrap_CRSInfo_north_lat_degree_get, METH_O, "CRSInfo_north_lat_degree_get(CRSInfo self) -> double"},
21191 : { "CRSInfo_area_name_get", _wrap_CRSInfo_area_name_get, METH_O, "CRSInfo_area_name_get(CRSInfo self) -> char *"},
21192 : { "CRSInfo_projection_method_get", _wrap_CRSInfo_projection_method_get, METH_O, "CRSInfo_projection_method_get(CRSInfo self) -> char *"},
21193 : { "new_CRSInfo", _wrap_new_CRSInfo, METH_VARARGS, "new_CRSInfo(char const * auth_name, char const * code, char const * name, OSRCRSType type, bool deprecated, bool bbox_valid, double west_lon_degree, double south_lat_degree, double east_lon_degree, double north_lat_degree, char const * area_name, char const * projection_method) -> CRSInfo"},
21194 : { "delete_CRSInfo", _wrap_delete_CRSInfo, METH_O, "delete_CRSInfo(CRSInfo self)"},
21195 : { "CRSInfo_swigregister", CRSInfo_swigregister, METH_O, NULL},
21196 : { "CRSInfo_swiginit", CRSInfo_swiginit, METH_VARARGS, NULL},
21197 : { "OSRCRSInfo_auth_name_get", _wrap_OSRCRSInfo_auth_name_get, METH_O, "OSRCRSInfo_auth_name_get(CRSInfo crsInfo) -> char const *"},
21198 : { "OSRCRSInfo_code_get", _wrap_OSRCRSInfo_code_get, METH_O, "OSRCRSInfo_code_get(CRSInfo crsInfo) -> char const *"},
21199 : { "OSRCRSInfo_name_get", _wrap_OSRCRSInfo_name_get, METH_O, "OSRCRSInfo_name_get(CRSInfo crsInfo) -> char const *"},
21200 : { "OSRCRSInfo_type_get", _wrap_OSRCRSInfo_type_get, METH_O, "OSRCRSInfo_type_get(CRSInfo crsInfo) -> OSRCRSType"},
21201 : { "OSRCRSInfo_deprecated_get", _wrap_OSRCRSInfo_deprecated_get, METH_O, "OSRCRSInfo_deprecated_get(CRSInfo crsInfo) -> bool"},
21202 : { "OSRCRSInfo_bbox_valid_get", _wrap_OSRCRSInfo_bbox_valid_get, METH_O, "OSRCRSInfo_bbox_valid_get(CRSInfo crsInfo) -> bool"},
21203 : { "OSRCRSInfo_west_lon_degree_get", _wrap_OSRCRSInfo_west_lon_degree_get, METH_O, "OSRCRSInfo_west_lon_degree_get(CRSInfo crsInfo) -> double"},
21204 : { "OSRCRSInfo_south_lat_degree_get", _wrap_OSRCRSInfo_south_lat_degree_get, METH_O, "OSRCRSInfo_south_lat_degree_get(CRSInfo crsInfo) -> double"},
21205 : { "OSRCRSInfo_east_lon_degree_get", _wrap_OSRCRSInfo_east_lon_degree_get, METH_O, "OSRCRSInfo_east_lon_degree_get(CRSInfo crsInfo) -> double"},
21206 : { "OSRCRSInfo_north_lat_degree_get", _wrap_OSRCRSInfo_north_lat_degree_get, METH_O, "OSRCRSInfo_north_lat_degree_get(CRSInfo crsInfo) -> double"},
21207 : { "OSRCRSInfo_area_name_get", _wrap_OSRCRSInfo_area_name_get, METH_O, "OSRCRSInfo_area_name_get(CRSInfo crsInfo) -> char const *"},
21208 : { "OSRCRSInfo_projection_method_get", _wrap_OSRCRSInfo_projection_method_get, METH_O, "OSRCRSInfo_projection_method_get(CRSInfo crsInfo) -> char const *"},
21209 : { "GetAuthorityListFromDatabase", _wrap_GetAuthorityListFromDatabase, METH_NOARGS, "GetAuthorityListFromDatabase() -> char **"},
21210 : { "GetCRSInfoListFromDatabase", _wrap_GetCRSInfoListFromDatabase, METH_O, "GetCRSInfoListFromDatabase(char const * authName)"},
21211 : { "SetPROJSearchPath", _wrap_SetPROJSearchPath, METH_O, "SetPROJSearchPath(char const * utf8_path)"},
21212 : { "SetPROJSearchPaths", _wrap_SetPROJSearchPaths, METH_O, "SetPROJSearchPaths(char ** paths)"},
21213 : { "GetPROJSearchPaths", _wrap_GetPROJSearchPaths, METH_NOARGS, "GetPROJSearchPaths() -> char **"},
21214 : { "GetPROJVersionMajor", _wrap_GetPROJVersionMajor, METH_NOARGS, "GetPROJVersionMajor() -> int"},
21215 : { "GetPROJVersionMinor", _wrap_GetPROJVersionMinor, METH_NOARGS, "GetPROJVersionMinor() -> int"},
21216 : { "GetPROJVersionMicro", _wrap_GetPROJVersionMicro, METH_NOARGS, "GetPROJVersionMicro() -> int"},
21217 : { "GetPROJEnableNetwork", _wrap_GetPROJEnableNetwork, METH_NOARGS, "GetPROJEnableNetwork() -> bool"},
21218 : { "SetPROJEnableNetwork", _wrap_SetPROJEnableNetwork, METH_O, "SetPROJEnableNetwork(bool enabled)"},
21219 : { "SetPROJAuxDbPath", _wrap_SetPROJAuxDbPath, METH_O, "SetPROJAuxDbPath(char const * utf8_path)"},
21220 : { "SetPROJAuxDbPaths", _wrap_SetPROJAuxDbPaths, METH_O, "SetPROJAuxDbPaths(char ** paths)"},
21221 : { "GetPROJAuxDbPaths", _wrap_GetPROJAuxDbPaths, METH_NOARGS, "GetPROJAuxDbPaths() -> char **"},
21222 : { NULL, NULL, 0, NULL }
21223 : };
21224 :
21225 : static PyMethodDef SwigMethods_proxydocs[] = {
21226 : { NULL, NULL, 0, NULL }
21227 : };
21228 :
21229 :
21230 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
21231 :
21232 : static swig_type_info _swigt__p_OGRCoordinateTransformationOptions = {"_p_OGRCoordinateTransformationOptions", "OGRCoordinateTransformationOptions *", 0, 0, (void*)0, 0};
21233 : static swig_type_info _swigt__p_OSRAreaOfUse = {"_p_OSRAreaOfUse", "OSRAreaOfUse *", 0, 0, (void*)0, 0};
21234 : static swig_type_info _swigt__p_OSRCRSInfo = {"_p_OSRCRSInfo", "OSRCRSInfo *", 0, 0, (void*)0, 0};
21235 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
21236 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
21237 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
21238 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
21239 : static swig_type_info _swigt__p_int = {"_p_int", "OSRAxisMappingStrategy *|int *|OGRAxisOrientation *|OGRErr *", 0, 0, (void*)0, 0};
21240 : static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
21241 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
21242 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
21243 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
21244 : static swig_type_info _swigt__p_p_p_OSRCRSInfo = {"_p_p_p_OSRCRSInfo", "OSRCRSInfo ***", 0, 0, (void*)0, 0};
21245 : static swig_type_info _swigt__p_p_p_OSRSpatialReferenceShadow = {"_p_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow ***", 0, 0, (void*)0, 0};
21246 :
21247 : static swig_type_info *swig_type_initial[] = {
21248 : &_swigt__p_OGRCoordinateTransformationOptions,
21249 : &_swigt__p_OSRAreaOfUse,
21250 : &_swigt__p_OSRCRSInfo,
21251 : &_swigt__p_OSRCoordinateTransformationShadow,
21252 : &_swigt__p_OSRSpatialReferenceShadow,
21253 : &_swigt__p_char,
21254 : &_swigt__p_double,
21255 : &_swigt__p_int,
21256 : &_swigt__p_long,
21257 : &_swigt__p_p_char,
21258 : &_swigt__p_p_double,
21259 : &_swigt__p_p_int,
21260 : &_swigt__p_p_p_OSRCRSInfo,
21261 : &_swigt__p_p_p_OSRSpatialReferenceShadow,
21262 : };
21263 :
21264 : static swig_cast_info _swigc__p_OGRCoordinateTransformationOptions[] = { {&_swigt__p_OGRCoordinateTransformationOptions, 0, 0, 0},{0, 0, 0, 0}};
21265 : static swig_cast_info _swigc__p_OSRAreaOfUse[] = { {&_swigt__p_OSRAreaOfUse, 0, 0, 0},{0, 0, 0, 0}};
21266 : static swig_cast_info _swigc__p_OSRCRSInfo[] = { {&_swigt__p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21267 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
21268 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21269 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
21270 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
21271 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
21272 : static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
21273 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
21274 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
21275 : static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
21276 : static swig_cast_info _swigc__p_p_p_OSRCRSInfo[] = { {&_swigt__p_p_p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21277 : static swig_cast_info _swigc__p_p_p_OSRSpatialReferenceShadow[] = { {&_swigt__p_p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21278 :
21279 : static swig_cast_info *swig_cast_initial[] = {
21280 : _swigc__p_OGRCoordinateTransformationOptions,
21281 : _swigc__p_OSRAreaOfUse,
21282 : _swigc__p_OSRCRSInfo,
21283 : _swigc__p_OSRCoordinateTransformationShadow,
21284 : _swigc__p_OSRSpatialReferenceShadow,
21285 : _swigc__p_char,
21286 : _swigc__p_double,
21287 : _swigc__p_int,
21288 : _swigc__p_long,
21289 : _swigc__p_p_char,
21290 : _swigc__p_p_double,
21291 : _swigc__p_p_int,
21292 : _swigc__p_p_p_OSRCRSInfo,
21293 : _swigc__p_p_p_OSRSpatialReferenceShadow,
21294 : };
21295 :
21296 :
21297 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
21298 :
21299 : static swig_const_info swig_const_table[] = {
21300 : {0, 0, 0, 0.0, 0, 0}};
21301 :
21302 : #ifdef __cplusplus
21303 : }
21304 : #endif
21305 : /* -----------------------------------------------------------------------------
21306 : * Type initialization:
21307 : * This problem is tough by the requirement that no dynamic
21308 : * memory is used. Also, since swig_type_info structures store pointers to
21309 : * swig_cast_info structures and swig_cast_info structures store pointers back
21310 : * to swig_type_info structures, we need some lookup code at initialization.
21311 : * The idea is that swig generates all the structures that are needed.
21312 : * The runtime then collects these partially filled structures.
21313 : * The SWIG_InitializeModule function takes these initial arrays out of
21314 : * swig_module, and does all the lookup, filling in the swig_module.types
21315 : * array with the correct data and linking the correct swig_cast_info
21316 : * structures together.
21317 : *
21318 : * The generated swig_type_info structures are assigned statically to an initial
21319 : * array. We just loop through that array, and handle each type individually.
21320 : * First we lookup if this type has been already loaded, and if so, use the
21321 : * loaded structure instead of the generated one. Then we have to fill in the
21322 : * cast linked list. The cast data is initially stored in something like a
21323 : * two-dimensional array. Each row corresponds to a type (there are the same
21324 : * number of rows as there are in the swig_type_initial array). Each entry in
21325 : * a column is one of the swig_cast_info structures for that type.
21326 : * The cast_initial array is actually an array of arrays, because each row has
21327 : * a variable number of columns. So to actually build the cast linked list,
21328 : * we find the array of casts associated with the type, and loop through it
21329 : * adding the casts to the list. The one last trick we need to do is making
21330 : * sure the type pointer in the swig_cast_info struct is correct.
21331 : *
21332 : * First off, we lookup the cast->type name to see if it is already loaded.
21333 : * There are three cases to handle:
21334 : * 1) If the cast->type has already been loaded AND the type we are adding
21335 : * casting info to has not been loaded (it is in this module), THEN we
21336 : * replace the cast->type pointer with the type pointer that has already
21337 : * been loaded.
21338 : * 2) If BOTH types (the one we are adding casting info to, and the
21339 : * cast->type) are loaded, THEN the cast info has already been loaded by
21340 : * the previous module so we just ignore it.
21341 : * 3) Finally, if cast->type has not already been loaded, then we add that
21342 : * swig_cast_info to the linked list (because the cast->type) pointer will
21343 : * be correct.
21344 : * ----------------------------------------------------------------------------- */
21345 :
21346 : #ifdef __cplusplus
21347 : extern "C" {
21348 : #if 0
21349 : } /* c-mode */
21350 : #endif
21351 : #endif
21352 :
21353 : #if 0
21354 : #define SWIGRUNTIME_DEBUG
21355 : #endif
21356 :
21357 :
21358 : SWIGRUNTIME void
21359 : SWIG_InitializeModule(void *clientdata) {
21360 : size_t i;
21361 : swig_module_info *module_head, *iter;
21362 : int init;
21363 :
21364 : /* check to see if the circular list has been setup, if not, set it up */
21365 : if (swig_module.next==0) {
21366 : /* Initialize the swig_module */
21367 : swig_module.type_initial = swig_type_initial;
21368 : swig_module.cast_initial = swig_cast_initial;
21369 : swig_module.next = &swig_module;
21370 : init = 1;
21371 : } else {
21372 : init = 0;
21373 : }
21374 :
21375 : /* Try and load any already created modules */
21376 : module_head = SWIG_GetModule(clientdata);
21377 : if (!module_head) {
21378 : /* This is the first module loaded for this interpreter */
21379 : /* so set the swig module into the interpreter */
21380 : SWIG_SetModule(clientdata, &swig_module);
21381 : } else {
21382 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
21383 : iter=module_head;
21384 : do {
21385 : if (iter==&swig_module) {
21386 : /* Our module is already in the list, so there's nothing more to do. */
21387 : return;
21388 : }
21389 : iter=iter->next;
21390 : } while (iter!= module_head);
21391 :
21392 : /* otherwise we must add our module into the list */
21393 : swig_module.next = module_head->next;
21394 : module_head->next = &swig_module;
21395 : }
21396 :
21397 : /* When multiple interpreters are used, a module could have already been initialized in
21398 : a different interpreter, but not yet have a pointer in this interpreter.
21399 : In this case, we do not want to continue adding types... everything should be
21400 : set up already */
21401 : if (init == 0) return;
21402 :
21403 : /* Now work on filling in swig_module.types */
21404 : #ifdef SWIGRUNTIME_DEBUG
21405 : printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
21406 : #endif
21407 : for (i = 0; i < swig_module.size; ++i) {
21408 : swig_type_info *type = 0;
21409 : swig_type_info *ret;
21410 : swig_cast_info *cast;
21411 :
21412 : #ifdef SWIGRUNTIME_DEBUG
21413 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21414 : #endif
21415 :
21416 : /* if there is another module already loaded */
21417 : if (swig_module.next != &swig_module) {
21418 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
21419 : }
21420 : if (type) {
21421 : /* Overwrite clientdata field */
21422 : #ifdef SWIGRUNTIME_DEBUG
21423 : printf("SWIG_InitializeModule: found type %s\n", type->name);
21424 : #endif
21425 : if (swig_module.type_initial[i]->clientdata) {
21426 : type->clientdata = swig_module.type_initial[i]->clientdata;
21427 : #ifdef SWIGRUNTIME_DEBUG
21428 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
21429 : #endif
21430 : }
21431 : } else {
21432 : type = swig_module.type_initial[i];
21433 : }
21434 :
21435 : /* Insert casting types */
21436 : cast = swig_module.cast_initial[i];
21437 : while (cast->type) {
21438 : /* Don't need to add information already in the list */
21439 : ret = 0;
21440 : #ifdef SWIGRUNTIME_DEBUG
21441 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
21442 : #endif
21443 : if (swig_module.next != &swig_module) {
21444 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
21445 : #ifdef SWIGRUNTIME_DEBUG
21446 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
21447 : #endif
21448 : }
21449 : if (ret) {
21450 : if (type == swig_module.type_initial[i]) {
21451 : #ifdef SWIGRUNTIME_DEBUG
21452 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
21453 : #endif
21454 : cast->type = ret;
21455 : ret = 0;
21456 : } else {
21457 : /* Check for casting already in the list */
21458 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
21459 : #ifdef SWIGRUNTIME_DEBUG
21460 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
21461 : #endif
21462 : if (!ocast) ret = 0;
21463 : }
21464 : }
21465 :
21466 : if (!ret) {
21467 : #ifdef SWIGRUNTIME_DEBUG
21468 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
21469 : #endif
21470 : if (type->cast) {
21471 : type->cast->prev = cast;
21472 : cast->next = type->cast;
21473 : }
21474 : type->cast = cast;
21475 : }
21476 : cast++;
21477 : }
21478 : /* Set entry in modules->types array equal to the type */
21479 : swig_module.types[i] = type;
21480 : }
21481 : swig_module.types[i] = 0;
21482 :
21483 : #ifdef SWIGRUNTIME_DEBUG
21484 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21485 : for (i = 0; i < swig_module.size; ++i) {
21486 : int j = 0;
21487 : swig_cast_info *cast = swig_module.cast_initial[i];
21488 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21489 : while (cast->type) {
21490 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
21491 : cast++;
21492 : ++j;
21493 : }
21494 : printf("---- Total casts: %d\n",j);
21495 : }
21496 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21497 : #endif
21498 : }
21499 :
21500 : /* This function will propagate the clientdata field of type to
21501 : * any new swig_type_info structures that have been added into the list
21502 : * of equivalent types. It is like calling
21503 : * SWIG_TypeClientData(type, clientdata) a second time.
21504 : */
21505 : SWIGRUNTIME void
21506 : SWIG_PropagateClientData(void) {
21507 : size_t i;
21508 : swig_cast_info *equiv;
21509 : static int init_run = 0;
21510 :
21511 : if (init_run) return;
21512 : init_run = 1;
21513 :
21514 : for (i = 0; i < swig_module.size; i++) {
21515 : if (swig_module.types[i]->clientdata) {
21516 : equiv = swig_module.types[i]->cast;
21517 : while (equiv) {
21518 : if (!equiv->converter) {
21519 : if (equiv->type && !equiv->type->clientdata)
21520 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
21521 : }
21522 : equiv = equiv->next;
21523 : }
21524 : }
21525 : }
21526 : }
21527 :
21528 : #ifdef __cplusplus
21529 : #if 0
21530 : {
21531 : /* c-mode */
21532 : #endif
21533 : }
21534 : #endif
21535 :
21536 :
21537 :
21538 : #ifdef __cplusplus
21539 : extern "C" {
21540 : #endif
21541 :
21542 : /* Python-specific SWIG API */
21543 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
21544 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
21545 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
21546 :
21547 : /* -----------------------------------------------------------------------------
21548 : * global variable support code.
21549 : * ----------------------------------------------------------------------------- */
21550 :
21551 : typedef struct swig_globalvar {
21552 : char *name; /* Name of global variable */
21553 : PyObject *(*get_attr)(void); /* Return the current value */
21554 : int (*set_attr)(PyObject *); /* Set the value */
21555 : struct swig_globalvar *next;
21556 : } swig_globalvar;
21557 :
21558 : typedef struct swig_varlinkobject {
21559 : PyObject_HEAD
21560 : swig_globalvar *vars;
21561 : } swig_varlinkobject;
21562 :
21563 : SWIGINTERN PyObject *
21564 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
21565 : #if PY_VERSION_HEX >= 0x03000000
21566 : return PyUnicode_InternFromString("<Swig global variables>");
21567 : #else
21568 : return PyString_FromString("<Swig global variables>");
21569 : #endif
21570 : }
21571 :
21572 : SWIGINTERN PyObject *
21573 : swig_varlink_str(swig_varlinkobject *v) {
21574 : #if PY_VERSION_HEX >= 0x03000000
21575 : PyObject *str = PyUnicode_InternFromString("(");
21576 : PyObject *tail;
21577 : PyObject *joined;
21578 : swig_globalvar *var;
21579 : for (var = v->vars; var; var=var->next) {
21580 : tail = PyUnicode_FromString(var->name);
21581 : joined = PyUnicode_Concat(str, tail);
21582 : Py_DecRef(str);
21583 : Py_DecRef(tail);
21584 : str = joined;
21585 : if (var->next) {
21586 : tail = PyUnicode_InternFromString(", ");
21587 : joined = PyUnicode_Concat(str, tail);
21588 : Py_DecRef(str);
21589 : Py_DecRef(tail);
21590 : str = joined;
21591 : }
21592 : }
21593 : tail = PyUnicode_InternFromString(")");
21594 : joined = PyUnicode_Concat(str, tail);
21595 : Py_DecRef(str);
21596 : Py_DecRef(tail);
21597 : str = joined;
21598 : #else
21599 : PyObject *str = PyString_FromString("(");
21600 : swig_globalvar *var;
21601 : for (var = v->vars; var; var=var->next) {
21602 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
21603 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
21604 : }
21605 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
21606 : #endif
21607 : return str;
21608 : }
21609 :
21610 : SWIGINTERN void
21611 : swig_varlink_dealloc(swig_varlinkobject *v) {
21612 : swig_globalvar *var = v->vars;
21613 : while (var) {
21614 : swig_globalvar *n = var->next;
21615 : free(var->name);
21616 : free(var);
21617 : var = n;
21618 : }
21619 : }
21620 :
21621 : SWIGINTERN PyObject *
21622 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
21623 : PyObject *res = NULL;
21624 : swig_globalvar *var = v->vars;
21625 : while (var) {
21626 : if (strcmp(var->name,n) == 0) {
21627 : res = (*var->get_attr)();
21628 : break;
21629 : }
21630 : var = var->next;
21631 : }
21632 : if (res == NULL && !PyErr_Occurred()) {
21633 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21634 : }
21635 : return res;
21636 : }
21637 :
21638 : SWIGINTERN int
21639 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
21640 : int res = 1;
21641 : swig_globalvar *var = v->vars;
21642 : while (var) {
21643 : if (strcmp(var->name,n) == 0) {
21644 : res = (*var->set_attr)(p);
21645 : break;
21646 : }
21647 : var = var->next;
21648 : }
21649 : if (res == 1 && !PyErr_Occurred()) {
21650 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21651 : }
21652 : return res;
21653 : }
21654 :
21655 : SWIGINTERN PyTypeObject*
21656 : swig_varlink_type(void) {
21657 : static char varlink__doc__[] = "Swig var link object";
21658 : static PyTypeObject varlink_type;
21659 : static int type_init = 0;
21660 : if (!type_init) {
21661 : const PyTypeObject tmp = {
21662 : #if PY_VERSION_HEX >= 0x03000000
21663 : PyVarObject_HEAD_INIT(NULL, 0)
21664 : #else
21665 : PyObject_HEAD_INIT(NULL)
21666 : 0, /* ob_size */
21667 : #endif
21668 : "swigvarlink", /* tp_name */
21669 : sizeof(swig_varlinkobject), /* tp_basicsize */
21670 : 0, /* tp_itemsize */
21671 : (destructor) swig_varlink_dealloc, /* tp_dealloc */
21672 : 0, /* tp_print */
21673 : (getattrfunc) swig_varlink_getattr, /* tp_getattr */
21674 : (setattrfunc) swig_varlink_setattr, /* tp_setattr */
21675 : 0, /* tp_compare */
21676 : (reprfunc) swig_varlink_repr, /* tp_repr */
21677 : 0, /* tp_as_number */
21678 : 0, /* tp_as_sequence */
21679 : 0, /* tp_as_mapping */
21680 : 0, /* tp_hash */
21681 : 0, /* tp_call */
21682 : (reprfunc) swig_varlink_str, /* tp_str */
21683 : 0, /* tp_getattro */
21684 : 0, /* tp_setattro */
21685 : 0, /* tp_as_buffer */
21686 : 0, /* tp_flags */
21687 : varlink__doc__, /* tp_doc */
21688 : 0, /* tp_traverse */
21689 : 0, /* tp_clear */
21690 : 0, /* tp_richcompare */
21691 : 0, /* tp_weaklistoffset */
21692 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
21693 : 0, /* tp_del */
21694 : 0, /* tp_version_tag */
21695 : #if PY_VERSION_HEX >= 0x03040000
21696 : 0, /* tp_finalize */
21697 : #endif
21698 : #ifdef COUNT_ALLOCS
21699 : 0, /* tp_allocs */
21700 : 0, /* tp_frees */
21701 : 0, /* tp_maxalloc */
21702 : 0, /* tp_prev */
21703 : 0 /* tp_next */
21704 : #endif
21705 : };
21706 : varlink_type = tmp;
21707 : type_init = 1;
21708 : if (PyType_Ready(&varlink_type) < 0)
21709 : return NULL;
21710 : }
21711 : return &varlink_type;
21712 : }
21713 :
21714 : /* Create a variable linking object for use later */
21715 : SWIGINTERN PyObject *
21716 : SWIG_Python_newvarlink(void) {
21717 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
21718 : if (result) {
21719 : result->vars = 0;
21720 : }
21721 : return ((PyObject*) result);
21722 : }
21723 :
21724 : SWIGINTERN void
21725 : SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
21726 : swig_varlinkobject *v = (swig_varlinkobject *) p;
21727 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
21728 : if (gv) {
21729 : size_t size = strlen(name)+1;
21730 : gv->name = (char *)malloc(size);
21731 : if (gv->name) {
21732 : memcpy(gv->name, name, size);
21733 : gv->get_attr = get_attr;
21734 : gv->set_attr = set_attr;
21735 : gv->next = v->vars;
21736 : }
21737 : }
21738 : v->vars = gv;
21739 : }
21740 :
21741 : SWIGINTERN PyObject *
21742 : SWIG_globals(void) {
21743 : static PyObject *globals = 0;
21744 : if (!globals) {
21745 : globals = SWIG_newvarlink();
21746 : }
21747 : return globals;
21748 : }
21749 :
21750 : /* -----------------------------------------------------------------------------
21751 : * constants/methods manipulation
21752 : * ----------------------------------------------------------------------------- */
21753 :
21754 : /* Install Constants */
21755 : SWIGINTERN void
21756 275 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
21757 275 : PyObject *obj = 0;
21758 275 : size_t i;
21759 275 : for (i = 0; constants[i].type; ++i) {
21760 0 : switch(constants[i].type) {
21761 0 : case SWIG_PY_POINTER:
21762 0 : obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
21763 0 : break;
21764 0 : case SWIG_PY_BINARY:
21765 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
21766 : break;
21767 : default:
21768 : obj = 0;
21769 : break;
21770 : }
21771 0 : if (obj) {
21772 0 : PyDict_SetItemString(d, constants[i].name, obj);
21773 0 : Py_DECREF(obj);
21774 : }
21775 : }
21776 275 : }
21777 :
21778 : /* -----------------------------------------------------------------------------*/
21779 : /* Fix SwigMethods to carry the callback ptrs when needed */
21780 : /* -----------------------------------------------------------------------------*/
21781 :
21782 : SWIGINTERN void
21783 275 : SWIG_Python_FixMethods(PyMethodDef *methods,
21784 : swig_const_info *const_table,
21785 : swig_type_info **types,
21786 : swig_type_info **types_initial) {
21787 275 : size_t i;
21788 63800 : for (i = 0; methods[i].ml_name; ++i) {
21789 63525 : const char *c = methods[i].ml_doc;
21790 63525 : if (!c) continue;
21791 60500 : c = strstr(c, "swig_ptr: ");
21792 60500 : if (c) {
21793 0 : int j;
21794 0 : swig_const_info *ci = 0;
21795 0 : const char *name = c + 10;
21796 0 : for (j = 0; const_table[j].type; ++j) {
21797 0 : if (strncmp(const_table[j].name, name,
21798 : strlen(const_table[j].name)) == 0) {
21799 : ci = &(const_table[j]);
21800 : break;
21801 : }
21802 : }
21803 0 : if (ci) {
21804 63525 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
21805 0 : if (ptr) {
21806 0 : size_t shift = (ci->ptype) - types;
21807 0 : swig_type_info *ty = types_initial[shift];
21808 0 : size_t ldoc = (c - methods[i].ml_doc);
21809 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
21810 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
21811 0 : if (ndoc) {
21812 0 : char *buff = ndoc;
21813 0 : memcpy(buff, methods[i].ml_doc, ldoc);
21814 0 : buff += ldoc;
21815 0 : memcpy(buff, "swig_ptr: ", 10);
21816 0 : buff += 10;
21817 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
21818 0 : methods[i].ml_doc = ndoc;
21819 : }
21820 : }
21821 : }
21822 : }
21823 : }
21824 275 : }
21825 :
21826 : /* -----------------------------------------------------------------------------
21827 : * Method creation and docstring support functions
21828 : * ----------------------------------------------------------------------------- */
21829 :
21830 : /* -----------------------------------------------------------------------------
21831 : * Function to find the method definition with the correct docstring for the
21832 : * proxy module as opposed to the low-level API
21833 : * ----------------------------------------------------------------------------- */
21834 :
21835 0 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
21836 : /* Find the function in the modified method table */
21837 0 : size_t offset = 0;
21838 0 : int found = 0;
21839 0 : while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
21840 0 : if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
21841 : found = 1;
21842 : break;
21843 : }
21844 0 : offset++;
21845 : }
21846 : /* Use the copy with the modified docstring if available */
21847 0 : return found ? &SwigMethods_proxydocs[offset] : NULL;
21848 : }
21849 :
21850 : /* -----------------------------------------------------------------------------
21851 : * Wrapper of PyInstanceMethod_New() used in Python 3
21852 : * It is exported to the generated module, used for -fastproxy
21853 : * ----------------------------------------------------------------------------- */
21854 :
21855 0 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
21856 0 : if (PyCFunction_Check(func)) {
21857 0 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
21858 0 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
21859 0 : if (ml)
21860 0 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
21861 : }
21862 : #if PY_VERSION_HEX >= 0x03000000
21863 0 : return PyInstanceMethod_New(func);
21864 : #else
21865 : return PyMethod_New(func, NULL, NULL);
21866 : #endif
21867 : }
21868 :
21869 : /* -----------------------------------------------------------------------------
21870 : * Wrapper of PyStaticMethod_New()
21871 : * It is exported to the generated module, used for -fastproxy
21872 : * ----------------------------------------------------------------------------- */
21873 :
21874 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
21875 : if (PyCFunction_Check(func)) {
21876 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
21877 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
21878 : if (ml)
21879 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
21880 : }
21881 : return PyStaticMethod_New(func);
21882 : }
21883 :
21884 : #ifdef __cplusplus
21885 : }
21886 : #endif
21887 :
21888 : /* -----------------------------------------------------------------------------*
21889 : * Partial Init method
21890 : * -----------------------------------------------------------------------------*/
21891 :
21892 : #ifdef __cplusplus
21893 : extern "C"
21894 : #endif
21895 :
21896 : SWIGEXPORT
21897 : #if PY_VERSION_HEX >= 0x03000000
21898 : PyObject*
21899 : #else
21900 : void
21901 : #endif
21902 275 : SWIG_init(void) {
21903 275 : PyObject *m, *d, *md, *globals;
21904 :
21905 : #if PY_VERSION_HEX >= 0x03000000
21906 275 : static struct PyModuleDef SWIG_module = {
21907 : PyModuleDef_HEAD_INIT,
21908 : SWIG_name,
21909 : NULL,
21910 : -1,
21911 : SwigMethods,
21912 : NULL,
21913 : NULL,
21914 : NULL,
21915 : NULL
21916 : };
21917 : #endif
21918 :
21919 : #if defined(SWIGPYTHON_BUILTIN)
21920 : static SwigPyClientData SwigPyObject_clientdata = {
21921 : 0, 0, 0, 0, 0, 0, 0
21922 : };
21923 : static PyGetSetDef this_getset_def = {
21924 : (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
21925 : };
21926 : static SwigPyGetSet thisown_getset_closure = {
21927 : SwigPyObject_own,
21928 : SwigPyObject_own
21929 : };
21930 : static PyGetSetDef thisown_getset_def = {
21931 : (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
21932 : };
21933 : PyTypeObject *builtin_pytype;
21934 : int builtin_base_count;
21935 : swig_type_info *builtin_basetype;
21936 : PyObject *tuple;
21937 : PyGetSetDescrObject *static_getset;
21938 : PyTypeObject *metatype;
21939 : PyTypeObject *swigpyobject;
21940 : SwigPyClientData *cd;
21941 : PyObject *public_interface, *public_symbol;
21942 : PyObject *this_descr;
21943 : PyObject *thisown_descr;
21944 : PyObject *self = 0;
21945 : int i;
21946 :
21947 : (void)builtin_pytype;
21948 : (void)builtin_base_count;
21949 : (void)builtin_basetype;
21950 : (void)tuple;
21951 : (void)static_getset;
21952 : (void)self;
21953 :
21954 : /* Metaclass is used to implement static member variables */
21955 : metatype = SwigPyObjectType();
21956 : assert(metatype);
21957 : #endif
21958 :
21959 275 : (void)globals;
21960 :
21961 : /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
21962 275 : SWIG_This();
21963 275 : SWIG_Python_TypeCache();
21964 275 : SwigPyPacked_type();
21965 : #ifndef SWIGPYTHON_BUILTIN
21966 275 : SwigPyObject_type();
21967 : #endif
21968 :
21969 : /* Fix SwigMethods to carry the callback ptrs when needed */
21970 275 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
21971 :
21972 : #if PY_VERSION_HEX >= 0x03000000
21973 275 : m = PyModule_Create(&SWIG_module);
21974 : #else
21975 : m = Py_InitModule(SWIG_name, SwigMethods);
21976 : #endif
21977 :
21978 275 : md = d = PyModule_GetDict(m);
21979 275 : (void)md;
21980 :
21981 275 : SWIG_InitializeModule(0);
21982 :
21983 : #ifdef SWIGPYTHON_BUILTIN
21984 : swigpyobject = SwigPyObject_TypeOnce();
21985 :
21986 : SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
21987 : assert(SwigPyObject_stype);
21988 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
21989 : if (!cd) {
21990 : SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
21991 : SwigPyObject_clientdata.pytype = swigpyobject;
21992 : } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
21993 : PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
21994 : # if PY_VERSION_HEX >= 0x03000000
21995 : return NULL;
21996 : # else
21997 : return;
21998 : # endif
21999 : }
22000 :
22001 : /* All objects have a 'this' attribute */
22002 : this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
22003 : (void)this_descr;
22004 :
22005 : /* All objects have a 'thisown' attribute */
22006 : thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
22007 : (void)thisown_descr;
22008 :
22009 : public_interface = PyList_New(0);
22010 : public_symbol = 0;
22011 : (void)public_symbol;
22012 :
22013 : PyDict_SetItemString(md, "__all__", public_interface);
22014 : Py_DECREF(public_interface);
22015 : for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
22016 : SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
22017 : for (i = 0; swig_const_table[i].name != 0; ++i)
22018 : SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
22019 : #endif
22020 :
22021 275 : SWIG_InstallConstants(d,swig_const_table);
22022 :
22023 275 : SWIG_Python_SetConstant(d, "SRS_WKT_WGS84_LAT_LONG",SWIG_FromCharPtr("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]"));
22024 275 : SWIG_Python_SetConstant(d, "SRS_PT_ALBERS_CONIC_EQUAL_AREA",SWIG_FromCharPtr("Albers_Conic_Equal_Area"));
22025 275 : SWIG_Python_SetConstant(d, "SRS_PT_AZIMUTHAL_EQUIDISTANT",SWIG_FromCharPtr("Azimuthal_Equidistant"));
22026 275 : SWIG_Python_SetConstant(d, "SRS_PT_CASSINI_SOLDNER",SWIG_FromCharPtr("Cassini_Soldner"));
22027 275 : SWIG_Python_SetConstant(d, "SRS_PT_CYLINDRICAL_EQUAL_AREA",SWIG_FromCharPtr("Cylindrical_Equal_Area"));
22028 275 : SWIG_Python_SetConstant(d, "SRS_PT_BONNE",SWIG_FromCharPtr("Bonne"));
22029 275 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_I",SWIG_FromCharPtr("Eckert_I"));
22030 275 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_II",SWIG_FromCharPtr("Eckert_II"));
22031 275 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_III",SWIG_FromCharPtr("Eckert_III"));
22032 275 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_IV",SWIG_FromCharPtr("Eckert_IV"));
22033 275 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_V",SWIG_FromCharPtr("Eckert_V"));
22034 275 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_VI",SWIG_FromCharPtr("Eckert_VI"));
22035 275 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIDISTANT_CONIC",SWIG_FromCharPtr("Equidistant_Conic"));
22036 275 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIRECTANGULAR",SWIG_FromCharPtr("Equirectangular"));
22037 275 : SWIG_Python_SetConstant(d, "SRS_PT_GALL_STEREOGRAPHIC",SWIG_FromCharPtr("Gall_Stereographic"));
22038 275 : SWIG_Python_SetConstant(d, "SRS_PT_GAUSSSCHREIBERTMERCATOR",SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
22039 275 : SWIG_Python_SetConstant(d, "SRS_PT_GEOSTATIONARY_SATELLITE",SWIG_FromCharPtr("Geostationary_Satellite"));
22040 275 : SWIG_Python_SetConstant(d, "SRS_PT_GOODE_HOMOLOSINE",SWIG_FromCharPtr("Goode_Homolosine"));
22041 275 : SWIG_Python_SetConstant(d, "SRS_PT_IGH",SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
22042 275 : SWIG_Python_SetConstant(d, "SRS_PT_GNOMONIC",SWIG_FromCharPtr("Gnomonic"));
22043 275 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Azimuth_Center"));
22044 275 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
22045 275 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
22046 275 : SWIG_Python_SetConstant(d, "SRS_PT_LABORDE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
22047 275 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_1SP"));
22048 275 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP"));
22049 275 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP_Belgium"));
22050 275 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA",SWIG_FromCharPtr("Lambert_Azimuthal_Equal_Area"));
22051 275 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_1SP",SWIG_FromCharPtr("Mercator_1SP"));
22052 275 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_2SP",SWIG_FromCharPtr("Mercator_2SP"));
22053 275 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_AUXILIARY_SPHERE",SWIG_FromCharPtr("Mercator_Auxiliary_Sphere"));
22054 275 : SWIG_Python_SetConstant(d, "SRS_PT_MILLER_CYLINDRICAL",SWIG_FromCharPtr("Miller_Cylindrical"));
22055 275 : SWIG_Python_SetConstant(d, "SRS_PT_MOLLWEIDE",SWIG_FromCharPtr("Mollweide"));
22056 275 : SWIG_Python_SetConstant(d, "SRS_PT_NEW_ZEALAND_MAP_GRID",SWIG_FromCharPtr("New_Zealand_Map_Grid"));
22057 275 : SWIG_Python_SetConstant(d, "SRS_PT_OBLIQUE_STEREOGRAPHIC",SWIG_FromCharPtr("Oblique_Stereographic"));
22058 275 : SWIG_Python_SetConstant(d, "SRS_PT_ORTHOGRAPHIC",SWIG_FromCharPtr("Orthographic"));
22059 275 : SWIG_Python_SetConstant(d, "SRS_PT_POLAR_STEREOGRAPHIC",SWIG_FromCharPtr("Polar_Stereographic"));
22060 275 : SWIG_Python_SetConstant(d, "SRS_PT_POLYCONIC",SWIG_FromCharPtr("Polyconic"));
22061 275 : SWIG_Python_SetConstant(d, "SRS_PT_ROBINSON",SWIG_FromCharPtr("Robinson"));
22062 275 : SWIG_Python_SetConstant(d, "SRS_PT_SINUSOIDAL",SWIG_FromCharPtr("Sinusoidal"));
22063 275 : SWIG_Python_SetConstant(d, "SRS_PT_STEREOGRAPHIC",SWIG_FromCharPtr("Stereographic"));
22064 275 : SWIG_Python_SetConstant(d, "SRS_PT_SWISS_OBLIQUE_CYLINDRICAL",SWIG_FromCharPtr("Swiss_Oblique_Cylindrical"));
22065 275 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR",SWIG_FromCharPtr("Transverse_Mercator"));
22066 275 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED",SWIG_FromCharPtr("Transverse_Mercator_South_Orientated"));
22067 275 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_21",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_21"));
22068 275 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_22",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_22"));
22069 275 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_23",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_23"));
22070 275 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_24",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_24"));
22071 275 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_25",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_25"));
22072 275 : SWIG_Python_SetConstant(d, "SRS_PT_TUNISIA_MINING_GRID",SWIG_FromCharPtr("Tunisia_Mining_Grid"));
22073 275 : SWIG_Python_SetConstant(d, "SRS_PT_TWO_POINT_EQUIDISTANT",SWIG_FromCharPtr("Two_Point_Equidistant"));
22074 275 : SWIG_Python_SetConstant(d, "SRS_PT_VANDERGRINTEN",SWIG_FromCharPtr("VanDerGrinten"));
22075 275 : SWIG_Python_SetConstant(d, "SRS_PT_KROVAK",SWIG_FromCharPtr("Krovak"));
22076 275 : SWIG_Python_SetConstant(d, "SRS_PT_IMW_POLYCONIC",SWIG_FromCharPtr("International_Map_of_the_World_Polyconic"));
22077 275 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_I",SWIG_FromCharPtr("Wagner_I"));
22078 275 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_II",SWIG_FromCharPtr("Wagner_II"));
22079 275 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_III",SWIG_FromCharPtr("Wagner_III"));
22080 275 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_IV",SWIG_FromCharPtr("Wagner_IV"));
22081 275 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_V",SWIG_FromCharPtr("Wagner_V"));
22082 275 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VI",SWIG_FromCharPtr("Wagner_VI"));
22083 275 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VII",SWIG_FromCharPtr("Wagner_VII"));
22084 275 : SWIG_Python_SetConstant(d, "SRS_PT_QSC",SWIG_FromCharPtr("Quadrilateralized_Spherical_Cube"));
22085 275 : SWIG_Python_SetConstant(d, "SRS_PT_AITOFF",SWIG_FromCharPtr("Aitoff"));
22086 275 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_I",SWIG_FromCharPtr("Winkel_I"));
22087 275 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_II",SWIG_FromCharPtr("Winkel_II"));
22088 275 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_TRIPEL",SWIG_FromCharPtr("Winkel_Tripel"));
22089 275 : SWIG_Python_SetConstant(d, "SRS_PT_CRASTER_PARABOLIC",SWIG_FromCharPtr("Craster_Parabolic"));
22090 275 : SWIG_Python_SetConstant(d, "SRS_PT_LOXIMUTHAL",SWIG_FromCharPtr("Loximuthal"));
22091 275 : SWIG_Python_SetConstant(d, "SRS_PT_QUARTIC_AUTHALIC",SWIG_FromCharPtr("Quartic_Authalic"));
22092 275 : SWIG_Python_SetConstant(d, "SRS_PT_SCH",SWIG_FromCharPtr("Spherical_Cross_Track_Height"));
22093 275 : SWIG_Python_SetConstant(d, "SRS_PP_CENTRAL_MERIDIAN",SWIG_FromCharPtr("central_meridian"));
22094 275 : SWIG_Python_SetConstant(d, "SRS_PP_SCALE_FACTOR",SWIG_FromCharPtr("scale_factor"));
22095 275 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_1",SWIG_FromCharPtr("standard_parallel_1"));
22096 275 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_2",SWIG_FromCharPtr("standard_parallel_2"));
22097 275 : SWIG_Python_SetConstant(d, "SRS_PP_PSEUDO_STD_PARALLEL_1",SWIG_FromCharPtr("pseudo_standard_parallel_1"));
22098 275 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_CENTER",SWIG_FromCharPtr("longitude_of_center"));
22099 275 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_CENTER",SWIG_FromCharPtr("latitude_of_center"));
22100 275 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_ORIGIN",SWIG_FromCharPtr("longitude_of_origin"));
22101 275 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_ORIGIN",SWIG_FromCharPtr("latitude_of_origin"));
22102 275 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_EASTING",SWIG_FromCharPtr("false_easting"));
22103 275 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_NORTHING",SWIG_FromCharPtr("false_northing"));
22104 275 : SWIG_Python_SetConstant(d, "SRS_PP_AZIMUTH",SWIG_FromCharPtr("azimuth"));
22105 275 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_1",SWIG_FromCharPtr("longitude_of_point_1"));
22106 275 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_1",SWIG_FromCharPtr("latitude_of_point_1"));
22107 275 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_2",SWIG_FromCharPtr("longitude_of_point_2"));
22108 275 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_2",SWIG_FromCharPtr("latitude_of_point_2"));
22109 275 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_3",SWIG_FromCharPtr("longitude_of_point_3"));
22110 275 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_3",SWIG_FromCharPtr("latitude_of_point_3"));
22111 275 : SWIG_Python_SetConstant(d, "SRS_PP_RECTIFIED_GRID_ANGLE",SWIG_FromCharPtr("rectified_grid_angle"));
22112 275 : SWIG_Python_SetConstant(d, "SRS_PP_LANDSAT_NUMBER",SWIG_FromCharPtr("landsat_number"));
22113 275 : SWIG_Python_SetConstant(d, "SRS_PP_PATH_NUMBER",SWIG_FromCharPtr("path_number"));
22114 275 : SWIG_Python_SetConstant(d, "SRS_PP_PERSPECTIVE_POINT_HEIGHT",SWIG_FromCharPtr("perspective_point_height"));
22115 275 : SWIG_Python_SetConstant(d, "SRS_PP_SATELLITE_HEIGHT",SWIG_FromCharPtr("satellite_height"));
22116 275 : SWIG_Python_SetConstant(d, "SRS_PP_FIPSZONE",SWIG_FromCharPtr("fipszone"));
22117 275 : SWIG_Python_SetConstant(d, "SRS_PP_ZONE",SWIG_FromCharPtr("zone"));
22118 275 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Latitude_Of_1st_Point"));
22119 275 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Longitude_Of_1st_Point"));
22120 275 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Latitude_Of_2nd_Point"));
22121 275 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Longitude_Of_2nd_Point"));
22122 275 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LATITUDE",SWIG_FromCharPtr("peg_point_latitude"));
22123 275 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LONGITUDE",SWIG_FromCharPtr("peg_point_longitude"));
22124 275 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEADING",SWIG_FromCharPtr("peg_point_heading"));
22125 275 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEIGHT",SWIG_FromCharPtr("peg_point_height"));
22126 275 : SWIG_Python_SetConstant(d, "SRS_UL_METER",SWIG_FromCharPtr("Meter"));
22127 275 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT",SWIG_FromCharPtr("Foot (International)"));
22128 275 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
22129 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT",SWIG_FromCharPtr("Foot_US"));
22130 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT_CONV",SWIG_FromCharPtr("0.3048006096012192"));
22131 275 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE",SWIG_FromCharPtr("Nautical Mile"));
22132 275 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE_CONV",SWIG_FromCharPtr("1852.0"));
22133 275 : SWIG_Python_SetConstant(d, "SRS_UL_LINK",SWIG_FromCharPtr("Link"));
22134 275 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_CONV",SWIG_FromCharPtr("0.20116684023368047"));
22135 275 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN",SWIG_FromCharPtr("Chain"));
22136 275 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN_CONV",SWIG_FromCharPtr("20.116684023368047"));
22137 275 : SWIG_Python_SetConstant(d, "SRS_UL_ROD",SWIG_FromCharPtr("Rod"));
22138 275 : SWIG_Python_SetConstant(d, "SRS_UL_ROD_CONV",SWIG_FromCharPtr("5.02921005842012"));
22139 275 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke",SWIG_FromCharPtr("Link_Clarke"));
22140 275 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke_CONV",SWIG_FromCharPtr("0.2011661949"));
22141 275 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER",SWIG_FromCharPtr("Kilometer"));
22142 275 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER_CONV",SWIG_FromCharPtr("1000."));
22143 275 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER",SWIG_FromCharPtr("Decimeter"));
22144 275 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER_CONV",SWIG_FromCharPtr("0.1"));
22145 275 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER",SWIG_FromCharPtr("Centimeter"));
22146 275 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER_CONV",SWIG_FromCharPtr("0.01"));
22147 275 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER",SWIG_FromCharPtr("Millimeter"));
22148 275 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER_CONV",SWIG_FromCharPtr("0.001"));
22149 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE",SWIG_FromCharPtr("Nautical_Mile_International"));
22150 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE_CONV",SWIG_FromCharPtr("1852.0"));
22151 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH",SWIG_FromCharPtr("Inch_International"));
22152 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH_CONV",SWIG_FromCharPtr("0.0254"));
22153 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT",SWIG_FromCharPtr("Foot_International"));
22154 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
22155 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD",SWIG_FromCharPtr("Yard_International"));
22156 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD_CONV",SWIG_FromCharPtr("0.9144"));
22157 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_International"));
22158 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE_CONV",SWIG_FromCharPtr("1609.344"));
22159 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM",SWIG_FromCharPtr("Fathom_International"));
22160 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM_CONV",SWIG_FromCharPtr("1.8288"));
22161 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN",SWIG_FromCharPtr("Chain_International"));
22162 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN_CONV",SWIG_FromCharPtr("20.1168"));
22163 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK",SWIG_FromCharPtr("Link_International"));
22164 275 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK_CONV",SWIG_FromCharPtr("0.201168"));
22165 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH",SWIG_FromCharPtr("Inch_US_Surveyor"));
22166 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH_CONV",SWIG_FromCharPtr("0.025400050800101603"));
22167 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD",SWIG_FromCharPtr("Yard_US_Surveyor"));
22168 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD_CONV",SWIG_FromCharPtr("0.914401828803658"));
22169 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN",SWIG_FromCharPtr("Chain_US_Surveyor"));
22170 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN_CONV",SWIG_FromCharPtr("20.11684023368047"));
22171 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_US_Surveyor"));
22172 275 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE_CONV",SWIG_FromCharPtr("1609.347218694437"));
22173 275 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD",SWIG_FromCharPtr("Yard_Indian"));
22174 275 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD_CONV",SWIG_FromCharPtr("0.91439523"));
22175 275 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT",SWIG_FromCharPtr("Foot_Indian"));
22176 275 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT_CONV",SWIG_FromCharPtr("0.30479841"));
22177 275 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN",SWIG_FromCharPtr("Chain_Indian"));
22178 275 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN_CONV",SWIG_FromCharPtr("20.11669506"));
22179 275 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE",SWIG_FromCharPtr("degree"));
22180 275 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE_CONV",SWIG_FromCharPtr("0.0174532925199433"));
22181 275 : SWIG_Python_SetConstant(d, "SRS_UA_RADIAN",SWIG_FromCharPtr("radian"));
22182 275 : SWIG_Python_SetConstant(d, "SRS_PM_GREENWICH",SWIG_FromCharPtr("Greenwich"));
22183 275 : SWIG_Python_SetConstant(d, "SRS_DN_NAD27",SWIG_FromCharPtr("North_American_Datum_1927"));
22184 275 : SWIG_Python_SetConstant(d, "SRS_DN_NAD83",SWIG_FromCharPtr("North_American_Datum_1983"));
22185 275 : SWIG_Python_SetConstant(d, "SRS_DN_WGS72",SWIG_FromCharPtr("WGS_1972"));
22186 275 : SWIG_Python_SetConstant(d, "SRS_DN_WGS84",SWIG_FromCharPtr("WGS_1984"));
22187 275 : SWIG_Python_SetConstant(d, "SRS_WGS84_SEMIMAJOR",SWIG_From_double(static_cast< double >(6378137.0)));
22188 275 : SWIG_Python_SetConstant(d, "SRS_WGS84_INVFLATTENING",SWIG_From_double(static_cast< double >(298.257223563)));
22189 275 : SWIG_Python_SetConstant(d, "OAO_Other",SWIG_From_int(static_cast< int >(0)));
22190 275 : SWIG_Python_SetConstant(d, "OAO_North",SWIG_From_int(static_cast< int >(1)));
22191 275 : SWIG_Python_SetConstant(d, "OAO_South",SWIG_From_int(static_cast< int >(2)));
22192 275 : SWIG_Python_SetConstant(d, "OAO_East",SWIG_From_int(static_cast< int >(3)));
22193 275 : SWIG_Python_SetConstant(d, "OAO_West",SWIG_From_int(static_cast< int >(4)));
22194 275 : SWIG_Python_SetConstant(d, "OAO_Up",SWIG_From_int(static_cast< int >(5)));
22195 275 : SWIG_Python_SetConstant(d, "OAO_Down",SWIG_From_int(static_cast< int >(6)));
22196 275 : SWIG_Python_SetConstant(d, "OAMS_TRADITIONAL_GIS_ORDER",SWIG_From_int(static_cast< int >(0)));
22197 275 : SWIG_Python_SetConstant(d, "OAMS_AUTHORITY_COMPLIANT",SWIG_From_int(static_cast< int >(1)));
22198 275 : SWIG_Python_SetConstant(d, "OAMS_CUSTOM",SWIG_From_int(static_cast< int >(2)));
22199 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP",SWIG_From_int(static_cast< int >(1024)));
22200 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_WRONG_SYNTAX",SWIG_From_int(static_cast< int >(1025)));
22201 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MISSING_ARG",SWIG_From_int(static_cast< int >(1026)));
22202 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE",SWIG_From_int(static_cast< int >(1027)));
22203 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS",SWIG_From_int(static_cast< int >(1028)));
22204 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID",SWIG_From_int(static_cast< int >(1029)));
22205 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM",SWIG_From_int(static_cast< int >(2048)));
22206 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_INVALID_COORD",SWIG_From_int(static_cast< int >(2049)));
22207 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN",SWIG_From_int(static_cast< int >(2050)));
22208 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_NO_OPERATION",SWIG_From_int(static_cast< int >(2051)));
22209 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID",SWIG_From_int(static_cast< int >(2052)));
22210 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_GRID_AT_NODATA",SWIG_From_int(static_cast< int >(2053)));
22211 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER",SWIG_From_int(static_cast< int >(4096)));
22212 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_API_MISUSE",SWIG_From_int(static_cast< int >(4097)));
22213 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NO_INVERSE_OP",SWIG_From_int(static_cast< int >(4098)));
22214 275 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NETWORK_ERROR",SWIG_From_int(static_cast< int >(4099)));
22215 :
22216 : // Will be turned on for GDAL 4.0
22217 : // UseExceptions();
22218 :
22219 275 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_2D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_2D)));
22220 275 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_3D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_3D)));
22221 275 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOCENTRIC",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOCENTRIC)));
22222 275 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_PROJECTED",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_PROJECTED)));
22223 275 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_VERTICAL",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_VERTICAL)));
22224 275 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_COMPOUND",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_COMPOUND)));
22225 275 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_OTHER",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_OTHER)));
22226 :
22227 : /* Initialize threading */
22228 275 : SWIG_PYTHON_INITIALIZE_THREADS;
22229 : #if PY_VERSION_HEX >= 0x03000000
22230 275 : return m;
22231 : #else
22232 : return;
22233 : #endif
22234 : }
22235 :
|