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 2167 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
449 2167 : if (ty) {
450 2167 : swig_cast_info *iter = ty->cast;
451 2167 : while (iter) {
452 2167 : if (strcmp(iter->type->name, c) == 0) {
453 2167 : 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 1355 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
571 1355 : SWIG_TypeClientData(ti, clientdata);
572 1355 : 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 7618 : SWIG_MangledTypeQueryModule(swig_module_info *start,
585 : swig_module_info *end,
586 : const char *name) {
587 7618 : swig_module_info *iter = start;
588 14086 : do {
589 14086 : if (iter->size) {
590 14086 : size_t l = 0;
591 14086 : size_t r = iter->size - 1;
592 62400 : do {
593 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
594 62400 : size_t i = (l + r) >> 1;
595 62400 : const char *iname = iter->types[i]->name;
596 62400 : if (iname) {
597 62400 : int compare = strcmp(name, iname);
598 62400 : if (compare == 0) {
599 4364 : return iter->types[i];
600 58036 : } else if (compare < 0) {
601 21130 : if (i) {
602 19516 : r = i - 1;
603 : } else {
604 : break;
605 : }
606 36906 : } else if (compare > 0) {
607 36906 : l = i + 1;
608 : }
609 : } else {
610 : break; /* should never happen */
611 : }
612 56422 : } while (l <= r);
613 : }
614 9722 : iter = iter->next;
615 9722 : } 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 301 : SWIG_Python_str_FromChar(const char *c)
839 : {
840 : #if PY_VERSION_HEX >= 0x03000000
841 301 : 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 53929 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1173 53929 : PyDict_SetItemString(d, name, obj);
1174 53929 : Py_DECREF(obj);
1175 53929 : }
1176 :
1177 : #endif
1178 :
1179 : /* Append a value to the result obj */
1180 :
1181 : SWIGINTERN PyObject*
1182 1517 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1183 1517 : if (!result) {
1184 : result = obj;
1185 247 : } else if (result == Py_None) {
1186 230 : Py_DECREF(result);
1187 : result = obj;
1188 : } else {
1189 17 : if (!PyList_Check(result)) {
1190 8 : PyObject *o2 = result;
1191 8 : result = PyList_New(1);
1192 8 : PyList_SetItem(result, 0, o2);
1193 : }
1194 17 : PyList_Append(result,obj);
1195 17 : Py_DECREF(obj);
1196 : }
1197 1517 : return result;
1198 : }
1199 :
1200 : /* Unpack the argument tuple */
1201 :
1202 : SWIGINTERN Py_ssize_t
1203 20775 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1204 : {
1205 20775 : if (!args) {
1206 13133 : 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 7642 : if (!PyTuple_Check(args)) {
1215 1355 : if (min <= 1 && max >= 1) {
1216 1355 : Py_ssize_t i;
1217 1355 : objs[0] = args;
1218 1355 : 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 6287 : Py_ssize_t l = PyTuple_GET_SIZE(args);
1227 6287 : 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 6287 : } 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 18708 : for (i = 0; i < l; ++i) {
1238 12421 : objs[i] = PyTuple_GET_ITEM(args, i);
1239 : }
1240 7707 : for (; l < max; ++l) {
1241 1420 : objs[l] = 0;
1242 : }
1243 6287 : 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 36168 : SWIG_Py_Void(void)
1282 : {
1283 36168 : PyObject *none = Py_None;
1284 0 : Py_INCREF(none);
1285 3800 : 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 1355 : SwigPyClientData_New(PyObject* obj)
1320 : {
1321 1355 : if (!obj) {
1322 : return 0;
1323 : } else {
1324 1355 : SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1325 : /* the klass element */
1326 1355 : data->klass = obj;
1327 1355 : Py_INCREF(data->klass);
1328 : /* the newraw method and newargs arguments used to create a new raw instance */
1329 1355 : if (PyClass_Check(obj)) {
1330 1355 : data->newraw = 0;
1331 1355 : data->newargs = obj;
1332 1355 : 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 1355 : data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1346 1355 : if (PyErr_Occurred()) {
1347 0 : PyErr_Clear();
1348 0 : data->destroy = 0;
1349 : }
1350 1355 : if (data->destroy) {
1351 1355 : int flags;
1352 1355 : Py_INCREF(data->destroy);
1353 1355 : flags = PyCFunction_GET_FLAGS(data->destroy);
1354 1355 : data->delargs = !(flags & (METH_O));
1355 : } else {
1356 0 : data->delargs = 0;
1357 : }
1358 1355 : data->implicitconv = 0;
1359 1355 : data->pytype = 0;
1360 1355 : 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 74020 : SwigPyObject_type(void) {
1506 74020 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1507 74020 : 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 9055 : SwigPyObject_dealloc(PyObject *v)
1529 : {
1530 9055 : SwigPyObject *sobj = (SwigPyObject *) v;
1531 9055 : PyObject *next = sobj->next;
1532 9055 : if (sobj->own == SWIG_POINTER_OWN) {
1533 9055 : swig_type_info *ty = sobj->ty;
1534 9055 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1535 9055 : PyObject *destroy = data ? data->destroy : 0;
1536 9055 : if (destroy) {
1537 : /* destroy is always a VARARGS method */
1538 9055 : 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 9055 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
1548 9055 : PyErr_Fetch(&type, &value, &traceback);
1549 :
1550 9055 : 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 9055 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1557 9055 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1558 9055 : res = ((*meth)(mself, v));
1559 : }
1560 9055 : if (!res)
1561 0 : PyErr_WriteUnraisable(destroy);
1562 :
1563 9055 : PyErr_Restore(type, value, traceback);
1564 :
1565 18110 : Py_XDECREF(res);
1566 : }
1567 : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1568 : else {
1569 0 : const char *name = SWIG_TypePrettyName(ty);
1570 0 : printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1571 : }
1572 : #endif
1573 : }
1574 9055 : Py_XDECREF(next);
1575 9055 : PyObject_DEL(v);
1576 9055 : }
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 271 : SwigPyObject_TypeOnce(void) {
1652 271 : static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1653 :
1654 271 : 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 271 : static PyTypeObject swigpyobject_type;
1699 271 : static int type_init = 0;
1700 271 : if (!type_init) {
1701 271 : 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 271 : swigpyobject_type = tmp;
1770 271 : type_init = 1;
1771 271 : if (PyType_Ready(&swigpyobject_type) < 0)
1772 0 : return NULL;
1773 : }
1774 : return &swigpyobject_type;
1775 : }
1776 :
1777 : SWIGRUNTIME PyObject *
1778 9082 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1779 : {
1780 9082 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1781 9082 : if (sobj) {
1782 9082 : sobj->ptr = ptr;
1783 9082 : sobj->ty = ty;
1784 9082 : sobj->own = own;
1785 9082 : sobj->next = 0;
1786 : }
1787 9082 : 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 271 : SwigPyPacked_type(void) {
1836 271 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1837 271 : 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 271 : SwigPyPacked_TypeOnce(void) {
1858 271 : static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1859 271 : static PyTypeObject swigpypacked_type;
1860 271 : static int type_init = 0;
1861 271 : if (!type_init) {
1862 271 : 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 271 : swigpypacked_type = tmp;
1931 271 : type_init = 1;
1932 271 : 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 26367 : SWIG_This(void)
1978 : {
1979 26367 : if (Swig_This_global == NULL)
1980 271 : Swig_This_global = SWIG_Python_str_FromChar("this");
1981 26367 : 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 34243 : SWIG_Python_GetSwigThis(PyObject *pyobj)
1993 : {
1994 34245 : PyObject *obj;
1995 :
1996 34245 : 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 23719 : 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 23719 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2039 23719 : if (obj) {
2040 21340 : Py_DECREF(obj);
2041 : } else {
2042 2379 : if (PyErr_Occurred()) PyErr_Clear();
2043 2379 : return 0;
2044 : }
2045 : #endif
2046 21340 : 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 32383 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2074 32383 : int res;
2075 32383 : SwigPyObject *sobj;
2076 32383 : int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2077 :
2078 32383 : if (!obj)
2079 : return SWIG_ERROR;
2080 32383 : if (obj == Py_None && !implicit_conv) {
2081 517 : if (ptr)
2082 517 : *ptr = 0;
2083 1034 : return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2084 : }
2085 :
2086 31866 : res = SWIG_ERROR;
2087 :
2088 31866 : sobj = SWIG_Python_GetSwigThis(obj);
2089 31866 : if (own)
2090 0 : *own = 0;
2091 31866 : while (sobj) {
2092 31864 : void *vptr = sobj->ptr;
2093 31864 : if (ty) {
2094 31864 : swig_type_info *to = sobj->ty;
2095 31864 : if (to == ty) {
2096 : /* no type cast needed */
2097 31864 : 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 31866 : if (sobj) {
2122 31864 : if (own)
2123 0 : *own = *own | sobj->own;
2124 31864 : if (flags & SWIG_POINTER_DISOWN) {
2125 10526 : 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 2377 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2281 : {
2282 2377 : 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 2377 : dict = PyObject_GetAttrString(inst, "__dict__");
2296 2377 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2297 2377 : Py_DECREF(dict);
2298 2377 : }
2299 :
2300 :
2301 : SWIGINTERN PyObject *
2302 2377 : SWIG_Python_InitShadowInstance(PyObject *args) {
2303 2377 : PyObject *obj[2];
2304 2377 : if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2305 : return NULL;
2306 : } else {
2307 2377 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2308 2377 : if (sthis) {
2309 0 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2310 : } else {
2311 2377 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2312 : }
2313 2377 : return SWIG_Py_Void();
2314 : }
2315 : }
2316 :
2317 : /* Create a new pointer object */
2318 :
2319 : SWIGRUNTIME PyObject *
2320 9103 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2321 9103 : SwigPyClientData *clientdata;
2322 9103 : PyObject * robj;
2323 9103 : int own;
2324 :
2325 9103 : if (!ptr)
2326 21 : return SWIG_Py_Void();
2327 :
2328 9082 : clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2329 9082 : own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2330 9082 : 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 9082 : assert(!(flags & SWIG_BUILTIN_TP_INIT));
2361 :
2362 9082 : robj = SwigPyObject_New(ptr, type, own);
2363 9082 : 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 301 : SWIG_Python_TypeCache(void) {
2441 301 : static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2442 301 : 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 495 : SWIG_pchar_descriptor(void)
2786 : {
2787 495 : static int init = 0;
2788 495 : static swig_type_info* info = 0;
2789 495 : if (!init) {
2790 30 : info = SWIG_TypeQuery("_p_char");
2791 30 : init = 1;
2792 : }
2793 495 : return info;
2794 : }
2795 :
2796 :
2797 : SWIGINTERNINLINE PyObject *
2798 58279 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2799 : {
2800 58279 : if (carray) {
2801 58232 : 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 58232 : 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 47 : return SWIG_Py_Void();
2818 : }
2819 : }
2820 :
2821 :
2822 : SWIGINTERNINLINE PyObject *
2823 58279 : SWIG_FromCharPtr(const char *cptr)
2824 : {
2825 13835 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2826 : }
2827 :
2828 :
2829 : #define SWIG_From_double PyFloat_FromDouble
2830 :
2831 :
2832 : SWIGINTERNINLINE PyObject*
2833 22966 : SWIG_From_int (int value)
2834 : {
2835 22966 : 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 29532 : struct PythonBindingErrorHandlerContext
2873 : {
2874 : std::string osInitialMsg{};
2875 : std::string osFailureMsg{};
2876 : CPLErrorNum nLastCode = CPLE_None;
2877 : };
2878 :
2879 : static void CPL_STDCALL
2880 36 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
2881 : {
2882 36 : PythonBindingErrorHandlerContext* ctxt = static_cast<
2883 36 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
2884 :
2885 : /*
2886 : ** Generally we want to suppress error reporting if we have exceptions
2887 : ** enabled as the error message will be in the exception thrown in
2888 : ** Python.
2889 : */
2890 :
2891 : /* If the error class is CE_Fatal, we want to have a message issued
2892 : because the CPL support code does an abort() before any exception
2893 : can be generated */
2894 36 : if (eclass == CE_Fatal ) {
2895 0 : CPLCallPreviousHandler(eclass, err_no, msg );
2896 : }
2897 :
2898 : /*
2899 : ** We do not want to interfere with non-failure messages since
2900 : ** they won't be translated into exceptions.
2901 : */
2902 36 : else if (eclass != CE_Failure ) {
2903 7 : CPLCallPreviousHandler(eclass, err_no, msg );
2904 : }
2905 : else {
2906 29 : ctxt->nLastCode = err_no;
2907 29 : if( ctxt->osFailureMsg.empty() ) {
2908 29 : ctxt->osFailureMsg = msg;
2909 29 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2910 : } else {
2911 0 : if( ctxt->osFailureMsg.size() < 10000 ) {
2912 0 : ctxt->osFailureMsg = std::string(msg) + "\nMay be caused by: " + ctxt->osFailureMsg;
2913 0 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2914 : }
2915 : else
2916 0 : ctxt->osFailureMsg = std::string(msg) + "\n[...]\nMay be caused by: " + ctxt->osInitialMsg;
2917 : }
2918 : }
2919 36 : }
2920 :
2921 :
2922 :
2923 :
2924 : static
2925 99317 : int GetUseExceptions() {
2926 69447 : return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
2927 : }
2928 :
2929 10445 : static int _GetExceptionsLocal()
2930 : {
2931 10445 : return bUseExceptionsLocal;
2932 : }
2933 :
2934 20890 : static void _SetExceptionsLocal(int bVal)
2935 : {
2936 20890 : bUseExceptionsLocal = bVal;
2937 : }
2938 :
2939 : static
2940 274 : void _UseExceptions() {
2941 274 : CPLErrorReset();
2942 274 : bUserHasSpecifiedIfUsingExceptions = TRUE;
2943 274 : if( !bUseExceptions )
2944 : {
2945 225 : bUseExceptions = 1;
2946 : }
2947 : }
2948 :
2949 : static
2950 5 : void _DontUseExceptions() {
2951 5 : CPLErrorReset();
2952 5 : bUserHasSpecifiedIfUsingExceptions = TRUE;
2953 5 : if( bUseExceptions )
2954 : {
2955 0 : bUseExceptions = 0;
2956 : }
2957 : }
2958 :
2959 2197 : static int _UserHasSpecifiedIfUsingExceptions()
2960 : {
2961 2197 : return bUserHasSpecifiedIfUsingExceptions;
2962 : }
2963 :
2964 :
2965 :
2966 : #include <limits.h>
2967 : #if !defined(SWIG_NO_LLONG_MAX)
2968 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
2969 : # define LLONG_MAX __LONG_LONG_MAX__
2970 : # define LLONG_MIN (-LLONG_MAX - 1LL)
2971 : # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
2972 : # endif
2973 : #endif
2974 :
2975 :
2976 : SWIGINTERN int
2977 1360 : SWIG_AsVal_double (PyObject *obj, double *val)
2978 : {
2979 1360 : int res = SWIG_TypeError;
2980 1360 : if (PyFloat_Check(obj)) {
2981 863 : if (val) *val = PyFloat_AsDouble(obj);
2982 863 : return SWIG_OK;
2983 : #if PY_VERSION_HEX < 0x03000000
2984 : } else if (PyInt_Check(obj)) {
2985 : if (val) *val = (double) PyInt_AsLong(obj);
2986 : return SWIG_OK;
2987 : #endif
2988 497 : } else if (PyLong_Check(obj)) {
2989 497 : double v = PyLong_AsDouble(obj);
2990 497 : if (!PyErr_Occurred()) {
2991 497 : if (val) *val = v;
2992 497 : return SWIG_OK;
2993 : } else {
2994 0 : PyErr_Clear();
2995 : }
2996 : }
2997 : #ifdef SWIG_PYTHON_CAST_MODE
2998 : {
2999 : int dispatch = 0;
3000 : double d = PyFloat_AsDouble(obj);
3001 : if (!PyErr_Occurred()) {
3002 : if (val) *val = d;
3003 : return SWIG_AddCast(SWIG_OK);
3004 : } else {
3005 : PyErr_Clear();
3006 : }
3007 : if (!dispatch) {
3008 : long v = PyLong_AsLong(obj);
3009 : if (!PyErr_Occurred()) {
3010 : if (val) *val = v;
3011 : return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3012 : } else {
3013 : PyErr_Clear();
3014 : }
3015 : }
3016 : }
3017 : #endif
3018 : return res;
3019 : }
3020 :
3021 :
3022 : #include <float.h>
3023 :
3024 :
3025 : #include <math.h>
3026 :
3027 :
3028 : SWIGINTERNINLINE int
3029 : SWIG_CanCastAsInteger(double *d, double min, double max) {
3030 : double x = *d;
3031 : if ((min <= x && x <= max)) {
3032 : double fx = floor(x);
3033 : double cx = ceil(x);
3034 : double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3035 : if ((errno == EDOM) || (errno == ERANGE)) {
3036 : errno = 0;
3037 : } else {
3038 : double summ, reps, diff;
3039 : if (rd < x) {
3040 : diff = x - rd;
3041 : } else if (rd > x) {
3042 : diff = rd - x;
3043 : } else {
3044 : return 1;
3045 : }
3046 : summ = rd + x;
3047 : reps = diff/summ;
3048 : if (reps < 8*DBL_EPSILON) {
3049 : *d = rd;
3050 : return 1;
3051 : }
3052 : }
3053 : }
3054 : return 0;
3055 : }
3056 :
3057 :
3058 : SWIGINTERN int
3059 22297 : SWIG_AsVal_long (PyObject *obj, long* val)
3060 : {
3061 : #if PY_VERSION_HEX < 0x03000000
3062 : if (PyInt_Check(obj)) {
3063 : if (val) *val = PyInt_AsLong(obj);
3064 : return SWIG_OK;
3065 : } else
3066 : #endif
3067 22297 : if (PyLong_Check(obj)) {
3068 22297 : long v = PyLong_AsLong(obj);
3069 22297 : if (!PyErr_Occurred()) {
3070 22297 : if (val) *val = v;
3071 22297 : return SWIG_OK;
3072 : } else {
3073 0 : PyErr_Clear();
3074 0 : return SWIG_OverflowError;
3075 : }
3076 : }
3077 : #ifdef SWIG_PYTHON_CAST_MODE
3078 : {
3079 : int dispatch = 0;
3080 : long v = PyInt_AsLong(obj);
3081 : if (!PyErr_Occurred()) {
3082 : if (val) *val = v;
3083 : return SWIG_AddCast(SWIG_OK);
3084 : } else {
3085 : PyErr_Clear();
3086 : }
3087 : if (!dispatch) {
3088 : double d;
3089 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3090 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3091 : if (val) *val = (long)(d);
3092 : return res;
3093 : }
3094 : }
3095 : }
3096 : #endif
3097 : return SWIG_TypeError;
3098 : }
3099 :
3100 :
3101 : SWIGINTERN int
3102 22294 : SWIG_AsVal_int (PyObject * obj, int *val)
3103 : {
3104 22294 : long v;
3105 44588 : int res = SWIG_AsVal_long (obj, &v);
3106 22294 : if (SWIG_IsOK(res)) {
3107 22294 : if ((v < INT_MIN || v > INT_MAX)) {
3108 : return SWIG_OverflowError;
3109 : } else {
3110 22294 : if (val) *val = static_cast< int >(v);
3111 : }
3112 : }
3113 : return res;
3114 : }
3115 :
3116 :
3117 : /* Completely unrelated: just to avoid Coverity warnings */
3118 :
3119 : static int bReturnSame = 1;
3120 :
3121 0 : void NeverCallMePlease() {
3122 0 : bReturnSame = 0;
3123 0 : }
3124 :
3125 : /* Some SWIG code generates dead code, which Coverity warns about */
3126 71266 : template<class T> static T ReturnSame(T x)
3127 : {
3128 1270 : if( bReturnSame )
3129 : return x;
3130 : return 0;
3131 : }
3132 :
3133 29532 : static void pushErrorHandler()
3134 : {
3135 29532 : CPLErrorReset();
3136 29532 : PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
3137 29532 : CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
3138 29532 : }
3139 :
3140 29532 : static void popErrorHandler()
3141 : {
3142 29532 : PythonBindingErrorHandlerContext* ctxt = static_cast<
3143 29532 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
3144 29532 : CPLPopErrorHandler();
3145 29532 : if( !ctxt->osFailureMsg.empty() )
3146 : {
3147 29 : CPLErrorSetState(
3148 29 : CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
3149 : ctxt->nLastCode, ctxt->osFailureMsg.c_str());
3150 : }
3151 29532 : delete ctxt;
3152 29532 : }
3153 :
3154 :
3155 :
3156 :
3157 : /* Return a PyObject* from a NULL terminated C String */
3158 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
3159 1350 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
3160 : {
3161 1350 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3162 432598 : while(*pszIter != 0)
3163 : {
3164 431251 : if (*pszIter > 127)
3165 : {
3166 3 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
3167 3 : if (pyObj != NULL && !PyErr_Occurred())
3168 : return pyObj;
3169 0 : PyErr_Clear();
3170 0 : return PyBytes_FromString(pszStr);
3171 : }
3172 431248 : pszIter ++;
3173 : }
3174 1347 : return PyUnicode_FromString(pszStr);
3175 : }
3176 :
3177 : /* Return a NULL terminated c String from a PyObject */
3178 : /* Result must be freed with GDALPythonFreeCStr */
3179 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3180 46 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
3181 : {
3182 46 : *pbToFree = 0;
3183 46 : if (PyUnicode_Check(pyObject))
3184 : {
3185 46 : char *pszStr;
3186 46 : char *pszNewStr;
3187 46 : Py_ssize_t nLen;
3188 46 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
3189 46 : if( pyUTF8Str == NULL )
3190 : return NULL;
3191 46 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3192 46 : pszNewStr = (char *) malloc(nLen+1);
3193 46 : if( pszNewStr == NULL )
3194 : {
3195 0 : CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
3196 : (unsigned long long)(nLen + 1));
3197 0 : Py_XDECREF(pyUTF8Str);
3198 0 : return NULL;
3199 : }
3200 46 : memcpy(pszNewStr, pszStr, nLen+1);
3201 46 : Py_XDECREF(pyUTF8Str);
3202 46 : *pbToFree = 1;
3203 46 : return pszNewStr;
3204 : }
3205 0 : else if( PyBytes_Check(pyObject) )
3206 : {
3207 0 : char* ret = PyBytes_AsString(pyObject);
3208 :
3209 : // Check if there are \0 bytes inside the string
3210 0 : const Py_ssize_t size = PyBytes_Size(pyObject);
3211 0 : for( Py_ssize_t i = 0; i < size; i++ )
3212 : {
3213 0 : if( ret[i] == 0 )
3214 : {
3215 0 : CPLError(CE_Failure, CPLE_AppDefined,
3216 : "bytes object cast as string contains a zero-byte.");
3217 0 : return NULL;
3218 : }
3219 : }
3220 :
3221 : return ret;
3222 : }
3223 : else
3224 : {
3225 0 : CPLError(CE_Failure, CPLE_AppDefined,
3226 : "Passed object is neither of type string nor bytes");
3227 0 : return NULL;
3228 : }
3229 : }
3230 :
3231 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3232 0 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
3233 : {
3234 0 : PyObject* os = PyImport_ImportModule("os");
3235 0 : if (os == NULL)
3236 : {
3237 : return NULL;
3238 : }
3239 :
3240 0 : PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
3241 0 : if (pathLike == NULL)
3242 : {
3243 0 : Py_DECREF(os);
3244 0 : return NULL;
3245 : }
3246 :
3247 0 : if (!PyObject_IsInstance(pyObject, pathLike))
3248 : {
3249 0 : Py_DECREF(pathLike);
3250 0 : Py_DECREF(os);
3251 0 : return NULL;
3252 : }
3253 :
3254 0 : PyObject* str = PyObject_Str(pyObject);
3255 0 : char* ret = NULL;
3256 0 : if (str != NULL)
3257 : {
3258 0 : ret = GDALPythonObjectToCStr(str, pbToFree);
3259 0 : Py_DECREF(str);
3260 : }
3261 :
3262 0 : Py_DECREF(pathLike);
3263 0 : Py_DECREF(os);
3264 :
3265 : return ret;
3266 : }
3267 :
3268 :
3269 : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
3270 46 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
3271 : {
3272 46 : if (bToFree)
3273 46 : free(ptr);
3274 : }
3275 :
3276 :
3277 :
3278 0 : OGRErr GetWellKnownGeogCSAsWKT( const char *name, char **argout ) {
3279 0 : OGRSpatialReferenceH srs = OSRNewSpatialReference("");
3280 0 : OGRErr rcode = OSRSetWellKnownGeogCS( srs, name );
3281 0 : if( rcode == OGRERR_NONE )
3282 0 : rcode = OSRExportToWkt ( srs, argout );
3283 0 : OSRRelease( srs );
3284 0 : return rcode;
3285 : }
3286 :
3287 :
3288 : SWIGINTERN int
3289 1907 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3290 : {
3291 : #if PY_VERSION_HEX>=0x03000000
3292 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3293 : if (PyBytes_Check(obj))
3294 : #else
3295 1907 : if (PyUnicode_Check(obj))
3296 : #endif
3297 : #else
3298 : if (PyString_Check(obj))
3299 : #endif
3300 : {
3301 1412 : char *cstr; Py_ssize_t len;
3302 1412 : int ret = SWIG_OK;
3303 : #if PY_VERSION_HEX>=0x03000000
3304 : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3305 1412 : if (!alloc && cptr) {
3306 : /* We can't allow converting without allocation, since the internal
3307 : representation of string in Python 3 is UCS-2/UCS-4 but we require
3308 : a UTF-8 representation.
3309 : TODO(bhy) More detailed explanation */
3310 : return SWIG_RuntimeError;
3311 : }
3312 1412 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3313 1412 : if (!obj)
3314 : return SWIG_TypeError;
3315 1412 : if (alloc)
3316 1412 : *alloc = SWIG_NEWOBJ;
3317 : #endif
3318 1412 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3319 : #else
3320 : PyString_AsStringAndSize(obj, &cstr, &len);
3321 : #endif
3322 1412 : if (cptr) {
3323 1412 : if (alloc) {
3324 1412 : if (*alloc == SWIG_NEWOBJ) {
3325 1412 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3326 1412 : *alloc = SWIG_NEWOBJ;
3327 : } else {
3328 0 : *cptr = cstr;
3329 0 : *alloc = SWIG_OLDOBJ;
3330 : }
3331 : } else {
3332 : #if PY_VERSION_HEX>=0x03000000
3333 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3334 : *cptr = PyBytes_AsString(obj);
3335 : #else
3336 : assert(0); /* Should never reach here with Unicode strings in Python 3 */
3337 : #endif
3338 : #else
3339 : *cptr = SWIG_Python_str_AsChar(obj);
3340 : if (!*cptr)
3341 : ret = SWIG_TypeError;
3342 : #endif
3343 : }
3344 : }
3345 1412 : if (psize) *psize = len + 1;
3346 : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3347 1412 : Py_XDECREF(obj);
3348 : #endif
3349 1412 : return ret;
3350 : } else {
3351 : #if defined(SWIG_PYTHON_2_UNICODE)
3352 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3353 : #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3354 : #endif
3355 : #if PY_VERSION_HEX<0x03000000
3356 : if (PyUnicode_Check(obj)) {
3357 : char *cstr; Py_ssize_t len;
3358 : if (!alloc && cptr) {
3359 : return SWIG_RuntimeError;
3360 : }
3361 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3362 : if (!obj)
3363 : return SWIG_TypeError;
3364 : if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3365 : if (cptr) {
3366 : if (alloc) *alloc = SWIG_NEWOBJ;
3367 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3368 : }
3369 : if (psize) *psize = len + 1;
3370 :
3371 : Py_XDECREF(obj);
3372 : return SWIG_OK;
3373 : } else {
3374 : Py_XDECREF(obj);
3375 : }
3376 : }
3377 : #endif
3378 : #endif
3379 :
3380 495 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3381 495 : if (pchar_descriptor) {
3382 495 : void* vptr = 0;
3383 495 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3384 495 : if (cptr) *cptr = (char *) vptr;
3385 495 : if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3386 495 : if (alloc) *alloc = SWIG_OLDOBJ;
3387 495 : return SWIG_OK;
3388 : }
3389 : }
3390 : }
3391 : return SWIG_TypeError;
3392 : }
3393 :
3394 :
3395 :
3396 :
3397 :
3398 : #define t_output_helper SWIG_Python_AppendOutput
3399 :
3400 :
3401 :
3402 : #include "ogr_core.h"
3403 : static char const *
3404 39 : OGRErrMessages( int rc ) {
3405 39 : switch( rc ) {
3406 : case OGRERR_NONE:
3407 : return "OGR Error: None";
3408 0 : case OGRERR_NOT_ENOUGH_DATA:
3409 0 : return "OGR Error: Not enough data to deserialize";
3410 0 : case OGRERR_NOT_ENOUGH_MEMORY:
3411 0 : return "OGR Error: Not enough memory";
3412 0 : case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
3413 0 : return "OGR Error: Unsupported geometry type";
3414 0 : case OGRERR_UNSUPPORTED_OPERATION:
3415 0 : return "OGR Error: Unsupported operation";
3416 37 : case OGRERR_CORRUPT_DATA:
3417 37 : return "OGR Error: Corrupt data";
3418 1 : case OGRERR_FAILURE:
3419 1 : return "OGR Error: General Error";
3420 1 : case OGRERR_UNSUPPORTED_SRS:
3421 1 : return "OGR Error: Unsupported SRS";
3422 0 : case OGRERR_INVALID_HANDLE:
3423 0 : return "OGR Error: Invalid handle";
3424 0 : case OGRERR_NON_EXISTING_FEATURE:
3425 0 : return "OGR Error: Non existing feature";
3426 0 : default:
3427 0 : return "OGR Error: Unknown";
3428 : }
3429 : }
3430 :
3431 :
3432 12 : OGRErr GetUserInputAsWKT( const char *name, char **argout ) {
3433 12 : OGRSpatialReferenceH srs = OSRNewSpatialReference("");
3434 12 : OGRErr rcode = OSRSetFromUserInput( srs, name );
3435 12 : if( rcode == OGRERR_NONE )
3436 12 : rcode = OSRExportToWkt ( srs, argout );
3437 12 : OSRRelease( srs );
3438 12 : return rcode;
3439 : }
3440 :
3441 :
3442 : typedef struct
3443 : {
3444 : double west_lon_degree;
3445 : double south_lat_degree;
3446 : double east_lon_degree;
3447 : double north_lat_degree;
3448 : char* name;
3449 : } OSRAreaOfUse;
3450 :
3451 1 : SWIGINTERN OSRAreaOfUse *new_OSRAreaOfUse(double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char *name){
3452 0 : OSRAreaOfUse *self = (OSRAreaOfUse*) CPLMalloc( sizeof( OSRAreaOfUse ) );
3453 1 : self->west_lon_degree = west_lon_degree;
3454 1 : self->south_lat_degree = south_lat_degree;
3455 1 : self->east_lon_degree = east_lon_degree;
3456 1 : self->north_lat_degree = north_lat_degree;
3457 0 : self->name = name ? CPLStrdup(name) : NULL;
3458 1 : return self;
3459 : }
3460 1 : SWIGINTERN void delete_OSRAreaOfUse(OSRAreaOfUse *self){
3461 1 : CPLFree( self->name );
3462 1 : CPLFree( self );
3463 : }
3464 :
3465 :
3466 1 : double OSRAreaOfUse_west_lon_degree_get( OSRAreaOfUse *area ) {
3467 1 : return area->west_lon_degree;
3468 : }
3469 :
3470 1 : double OSRAreaOfUse_south_lat_degree_get( OSRAreaOfUse *area ) {
3471 1 : return area->south_lat_degree;
3472 : }
3473 :
3474 1 : double OSRAreaOfUse_east_lon_degree_get( OSRAreaOfUse *area ) {
3475 1 : return area->east_lon_degree;
3476 : }
3477 :
3478 1 : double OSRAreaOfUse_north_lat_degree_get( OSRAreaOfUse *area ) {
3479 1 : return area->north_lat_degree;
3480 : }
3481 :
3482 1 : const char* OSRAreaOfUse_name_get( OSRAreaOfUse *area ) {
3483 1 : return area->name;
3484 : }
3485 :
3486 :
3487 2216 : SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
3488 2216 : return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
3489 : }
3490 3754 : SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
3491 3754 : OSRRelease( self );
3492 : }
3493 4 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow___str__(OSRSpatialReferenceShadow *self){
3494 4 : char *buf = 0;
3495 4 : OSRExportToPrettyWkt( self, &buf, 0 );
3496 4 : return buf;
3497 : }
3498 38 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetName(OSRSpatialReferenceShadow *self){
3499 38 : return OSRGetName( self );
3500 : }
3501 :
3502 : /************************************************************************/
3503 : /* CSLFromPySequence() */
3504 : /************************************************************************/
3505 132 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
3506 :
3507 : {
3508 132 : *pbErr = FALSE;
3509 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
3510 132 : if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
3511 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
3512 0 : *pbErr = TRUE;
3513 0 : return NULL;
3514 : }
3515 :
3516 132 : Py_ssize_t size = PySequence_Size(pySeq);
3517 132 : if( size > (Py_ssize_t)(INT_MAX - 1) ) {
3518 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
3519 0 : *pbErr = TRUE;
3520 0 : return NULL;
3521 : }
3522 132 : if( size == 0 ) {
3523 : return NULL;
3524 : }
3525 132 : char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
3526 132 : if( !papszRet ) {
3527 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3528 0 : *pbErr = TRUE;
3529 0 : return NULL;
3530 : }
3531 382 : for (int i = 0; i < (int)size; i++) {
3532 250 : PyObject* pyObj = PySequence_GetItem(pySeq,i);
3533 250 : if (PyUnicode_Check(pyObj))
3534 : {
3535 250 : char *pszStr;
3536 250 : Py_ssize_t nLen;
3537 250 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
3538 250 : if( !pyUTF8Str )
3539 : {
3540 0 : Py_DECREF(pyObj);
3541 0 : PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
3542 0 : CSLDestroy(papszRet);
3543 0 : *pbErr = TRUE;
3544 0 : return NULL;
3545 : }
3546 250 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3547 250 : papszRet[i] = VSIStrdup(pszStr);
3548 497 : Py_XDECREF(pyUTF8Str);
3549 : }
3550 0 : else if (PyBytes_Check(pyObj))
3551 0 : papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
3552 : else
3553 : {
3554 0 : Py_DECREF(pyObj);
3555 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
3556 0 : CSLDestroy(papszRet);
3557 0 : *pbErr = TRUE;
3558 0 : return NULL;
3559 : }
3560 250 : Py_DECREF(pyObj);
3561 250 : if( !papszRet[i] )
3562 : {
3563 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3564 0 : CSLDestroy(papszRet);
3565 0 : *pbErr = TRUE;
3566 0 : return NULL;
3567 : }
3568 : }
3569 : return papszRet;
3570 : }
3571 :
3572 :
3573 8 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
3574 :
3575 : {
3576 8 : char** retCSL = NULL;
3577 8 : Py_ssize_t size = PyMapping_Length( pyObj );
3578 8 : if ( size > 0 && size == (int)size) {
3579 4 : PyObject *item_list = PyMapping_Items( pyObj );
3580 26 : for( int i=0; i<(int)size; i++ ) {
3581 22 : PyObject *it = PySequence_GetItem( item_list, i );
3582 :
3583 22 : PyObject *k, *v;
3584 22 : if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
3585 0 : Py_DECREF(it);
3586 0 : Py_DECREF(item_list);
3587 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
3588 0 : CSLDestroy(retCSL);
3589 0 : *pbErr = TRUE;
3590 0 : return NULL;
3591 : }
3592 :
3593 22 : PyObject* kStr = PyObject_Str(k);
3594 22 : if( PyErr_Occurred() )
3595 : {
3596 0 : Py_DECREF(it);
3597 0 : Py_DECREF(item_list);
3598 0 : CSLDestroy(retCSL);
3599 0 : *pbErr = TRUE;
3600 0 : return NULL;
3601 : }
3602 :
3603 22 : PyObject* vStr;
3604 22 : if( PyBytes_Check(v) )
3605 : {
3606 0 : vStr = v;
3607 0 : Py_INCREF(vStr);
3608 : }
3609 : else
3610 : {
3611 22 : vStr = PyObject_Str(v);
3612 22 : if( PyErr_Occurred() )
3613 : {
3614 0 : Py_DECREF(it);
3615 0 : Py_DECREF(kStr);
3616 0 : Py_DECREF(item_list);
3617 0 : CSLDestroy(retCSL);
3618 0 : *pbErr = TRUE;
3619 0 : return NULL;
3620 : }
3621 : }
3622 :
3623 22 : int bFreeK, bFreeV;
3624 22 : char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
3625 22 : char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
3626 22 : if( pszK == NULL || pszV == NULL )
3627 : {
3628 0 : GDALPythonFreeCStr(pszK, bFreeK);
3629 0 : GDALPythonFreeCStr(pszV, bFreeV);
3630 0 : Py_DECREF(kStr);
3631 0 : Py_DECREF(vStr);
3632 0 : Py_DECREF(it);
3633 0 : Py_DECREF(item_list);
3634 0 : PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
3635 0 : CSLDestroy(retCSL);
3636 0 : *pbErr = TRUE;
3637 0 : return NULL;
3638 : }
3639 22 : retCSL = CSLAddNameValue( retCSL, pszK, pszV );
3640 :
3641 22 : GDALPythonFreeCStr(pszK, bFreeK);
3642 22 : GDALPythonFreeCStr(pszV, bFreeV);
3643 22 : Py_DECREF(kStr);
3644 22 : Py_DECREF(vStr);
3645 22 : Py_DECREF(it);
3646 : }
3647 4 : Py_DECREF(item_list);
3648 : }
3649 8 : *pbErr = FALSE;
3650 8 : return retCSL;
3651 : }
3652 :
3653 592 : SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs,char **options=NULL){
3654 592 : return OSRIsSameEx( self, rhs, options );
3655 : }
3656 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3657 0 : return OSRIsSameGeogCS( self, rhs );
3658 : }
3659 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameVertCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3660 0 : return OSRIsSameVertCS( self, rhs );
3661 : }
3662 42 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
3663 42 : return OSRIsGeographic(self);
3664 : }
3665 1 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedGeographic(OSRSpatialReferenceShadow *self){
3666 1 : return OSRIsDerivedGeographic(self);
3667 : }
3668 185 : SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
3669 185 : return OSRIsProjected(self);
3670 : }
3671 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedProjected(OSRSpatialReferenceShadow *self){
3672 0 : return OSRIsDerivedProjected(self);
3673 : }
3674 5 : SWIGINTERN int OSRSpatialReferenceShadow_IsCompound(OSRSpatialReferenceShadow *self){
3675 5 : return OSRIsCompound(self);
3676 : }
3677 2 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeocentric(OSRSpatialReferenceShadow *self){
3678 2 : return OSRIsGeocentric(self);
3679 : }
3680 4 : SWIGINTERN int OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow *self){
3681 4 : return OSRIsLocal(self);
3682 : }
3683 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsVertical(OSRSpatialReferenceShadow *self){
3684 0 : return OSRIsVertical(self);
3685 : }
3686 0 : SWIGINTERN bool OSRSpatialReferenceShadow_IsDynamic(OSRSpatialReferenceShadow *self){
3687 0 : return OSRIsDynamic(self);
3688 : }
3689 :
3690 : SWIGINTERNINLINE PyObject*
3691 21 : SWIG_From_bool (bool value)
3692 : {
3693 21 : return PyBool_FromLong(value ? 1 : 0);
3694 : }
3695 :
3696 0 : SWIGINTERN bool OSRSpatialReferenceShadow_HasPointMotionOperation(OSRSpatialReferenceShadow *self){
3697 0 : return OSRHasPointMotionOperation(self);
3698 : }
3699 29 : SWIGINTERN double OSRSpatialReferenceShadow_GetCoordinateEpoch(OSRSpatialReferenceShadow *self){
3700 29 : return OSRGetCoordinateEpoch(self);
3701 : }
3702 29 : SWIGINTERN void OSRSpatialReferenceShadow_SetCoordinateEpoch(OSRSpatialReferenceShadow *self,double coordinateEpoch){
3703 29 : OSRSetCoordinateEpoch(self, coordinateEpoch);
3704 : }
3705 155 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
3706 155 : return OSREPSGTreatsAsLatLong(self);
3707 : }
3708 160 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(OSRSpatialReferenceShadow *self){
3709 160 : return OSREPSGTreatsAsNorthingEasting(self);
3710 : }
3711 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAuthority(OSRSpatialReferenceShadow *self,char const *pszTargetKey,char const *pszAuthority,int nCode){
3712 0 : return OSRSetAuthority( self, pszTargetKey, pszAuthority, nCode );
3713 : }
3714 34 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
3715 34 : return OSRGetAttrValue( self, name, child );
3716 : }
3717 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
3718 1 : return OSRSetAttrValue( self, name, value );
3719 : }
3720 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow *self,char const *name,double to_radians){
3721 0 : return OSRSetAngularUnits( self, name, to_radians );
3722 : }
3723 0 : SWIGINTERN double OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow *self){
3724 : // Return code ignored.
3725 0 : return OSRGetAngularUnits( self, 0 );
3726 : }
3727 1 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAngularUnitsName(OSRSpatialReferenceShadow *self){
3728 1 : char *name = 0;
3729 1 : OSRGetAngularUnits( self, &name );
3730 : // This is really a const char* that is returned and shouldn't be freed
3731 1 : return (const char*)name;
3732 : }
3733 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target,char const *name,double to_meters){
3734 1 : return OSRSetTargetLinearUnits( self, target, name, to_meters );
3735 : }
3736 6 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3737 6 : return OSRSetLinearUnits( self, name, to_meters );
3738 : }
3739 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3740 1 : return OSRSetLinearUnitsAndUpdateParameters( self, name, to_meters );
3741 : }
3742 4 : SWIGINTERN double OSRSpatialReferenceShadow_GetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target_key){
3743 : // Return code ignored.
3744 4 : return OSRGetTargetLinearUnits( self, target_key, 0 );
3745 : }
3746 178 : SWIGINTERN double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
3747 : // Return code ignored.
3748 178 : return OSRGetLinearUnits( self, 0 );
3749 : }
3750 24 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetLinearUnitsName(OSRSpatialReferenceShadow *self){
3751 24 : char *name = NULL;
3752 : // Return code ignored.
3753 24 : OSRGetLinearUnits( self, &name );
3754 24 : return (const char*)name;
3755 : }
3756 466 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key){
3757 466 : return OSRGetAuthorityCode( self, target_key );
3758 : }
3759 44 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow *self,char const *target_key){
3760 44 : return OSRGetAuthorityName( self, target_key );
3761 : }
3762 1 : SWIGINTERN OSRAreaOfUse *OSRSpatialReferenceShadow_GetAreaOfUse(OSRSpatialReferenceShadow *self){
3763 1 : OSRAreaOfUse* pArea = new_OSRAreaOfUse(0,0,0,0,NULL);
3764 1 : const char* name = NULL;
3765 1 : if( !OSRGetAreaOfUse(self,
3766 : &pArea->west_lon_degree,
3767 : &pArea->south_lat_degree,
3768 : &pArea->east_lon_degree,
3769 : &pArea->north_lat_degree,
3770 : &name) )
3771 : {
3772 0 : delete_OSRAreaOfUse(pArea);
3773 0 : return NULL;
3774 : }
3775 1 : pArea->name = name ? CPLStrdup(name) : NULL;
3776 1 : return pArea;
3777 : }
3778 6 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAxisName(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
3779 6 : return OSRGetAxis( self, target_key, iAxis, NULL );
3780 : }
3781 6 : SWIGINTERN int OSRSpatialReferenceShadow_GetAxesCount(OSRSpatialReferenceShadow *self){
3782 6 : return OSRGetAxesCount(self);
3783 : }
3784 5 : SWIGINTERN OGRAxisOrientation OSRSpatialReferenceShadow_GetAxisOrientation(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
3785 5 : OGRAxisOrientation orientation = OAO_Other;
3786 5 : OSRGetAxis( self, target_key, iAxis, &orientation );
3787 5 : return orientation;
3788 : }
3789 37 : SWIGINTERN OSRAxisMappingStrategy OSRSpatialReferenceShadow_GetAxisMappingStrategy(OSRSpatialReferenceShadow *self){
3790 37 : return OSRGetAxisMappingStrategy(self);
3791 : }
3792 496 : SWIGINTERN void OSRSpatialReferenceShadow_SetAxisMappingStrategy(OSRSpatialReferenceShadow *self,OSRAxisMappingStrategy strategy){
3793 496 : OSRSetAxisMappingStrategy(self, strategy);
3794 : }
3795 87 : SWIGINTERN void OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int *nLen,int const **pList){
3796 174 : *pList = OSRGetDataAxisToSRSAxisMapping(self, nLen);
3797 : }
3798 :
3799 : static int*
3800 12 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
3801 : /* check if is List */
3802 12 : if ( !PySequence_Check(pySeq) ) {
3803 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
3804 0 : *pnSize = -1;
3805 0 : return NULL;
3806 : }
3807 12 : Py_ssize_t size = PySequence_Size(pySeq);
3808 12 : if( size > (Py_ssize_t)INT_MAX ) {
3809 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
3810 0 : *pnSize = -1;
3811 0 : return NULL;
3812 : }
3813 12 : if( (size_t)size > SIZE_MAX / sizeof(int) ) {
3814 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
3815 0 : *pnSize = -1;
3816 0 : return NULL;
3817 : }
3818 12 : *pnSize = (int)size;
3819 12 : int* ret = (int*) malloc((*pnSize)*sizeof(int));
3820 12 : if( !ret ) {
3821 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3822 0 : *pnSize = -1;
3823 0 : return NULL;
3824 : }
3825 38 : for( int i = 0; i<*pnSize; i++ ) {
3826 26 : PyObject *o = PySequence_GetItem(pySeq,i);
3827 26 : if ( !PyArg_Parse(o,"i",&ret[i]) ) {
3828 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
3829 0 : Py_DECREF(o);
3830 0 : free(ret);
3831 0 : *pnSize = -1;
3832 0 : return NULL;
3833 : }
3834 26 : Py_DECREF(o);
3835 : }
3836 : return ret;
3837 : }
3838 :
3839 12 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int nList,int *pList){
3840 12 : return OSRSetDataAxisToSRSAxisMapping(self, nList, pList);
3841 : }
3842 16 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow *self,int zone,int north=1){
3843 16 : return OSRSetUTM( self, zone, north );
3844 : }
3845 6 : SWIGINTERN int OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow *self){
3846 : // Note: we will return south zones as negative since it is
3847 : // hard to return two values as the C API does.
3848 6 : int bNorth = FALSE;
3849 12 : int nZone = OSRGetUTMZone( self, &bNorth );
3850 6 : if( !bNorth )
3851 3 : nZone = -1 * ABS(nZone);
3852 6 : return nZone;
3853 : }
3854 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
3855 2 : return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
3856 : }
3857 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
3858 5 : return OSRAutoIdentifyEPSG( self );
3859 : }
3860 5 : SWIGINTERN void OSRSpatialReferenceShadow_FindMatches(OSRSpatialReferenceShadow *self,char **options=NULL,OSRSpatialReferenceShadow ***matches=NULL,int *nvalues=NULL,int **confidence_values=NULL){
3861 10 : *matches = OSRFindMatches(self, options, nvalues, confidence_values);
3862 : }
3863 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
3864 0 : return OSRSetProjection( self, arg );
3865 : }
3866 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3867 0 : return OSRSetProjParm( self, name, val );
3868 : }
3869 65 : SWIGINTERN double OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3870 : // Return code ignored.
3871 65 : return OSRGetProjParm( self, name, default_val, 0 );
3872 : }
3873 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3874 0 : return OSRSetNormProjParm( self, name, val );
3875 : }
3876 1 : SWIGINTERN double OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3877 : // Return code ignored.
3878 1 : return OSRGetNormProjParm( self, name, default_val, 0 );
3879 : }
3880 8 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
3881 : // Return code ignored.
3882 8 : return OSRGetSemiMajor( self, 0 );
3883 : }
3884 4 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
3885 : // Return code ignored.
3886 4 : return OSRGetSemiMinor( self, 0 );
3887 : }
3888 10 : SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
3889 : // Return code ignored.
3890 10 : return OSRGetInvFlattening( self, 0 );
3891 : }
3892 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3893 0 : return OSRSetACEA( self, stdp1, stdp2, clat, clong,
3894 : fe, fn );
3895 : }
3896 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3897 0 : return OSRSetAE( self, clat, clong,
3898 : fe, fn );
3899 : }
3900 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double stdp,double cm,double fe,double fn){
3901 0 : return OSRSetBonne( self, stdp, cm, fe, fn );
3902 : }
3903 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow *self,double stdp1,double cm,double fe,double fn){
3904 0 : return OSRSetCEA( self, stdp1, cm,
3905 : fe, fn );
3906 : }
3907 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3908 0 : return OSRSetCS( self, clat, clong,
3909 : fe, fn );
3910 : }
3911 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3912 0 : return OSRSetEC( self, stdp1, stdp2, clat, clong,
3913 : fe, fn );
3914 : }
3915 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3916 0 : return OSRSetEckertIV( self, cm, fe, fn);
3917 : }
3918 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3919 0 : return OSRSetEckertVI( self, cm, fe, fn);
3920 : }
3921 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3922 0 : return OSRSetEquirectangular( self, clat, clong,
3923 : fe, fn );
3924 : }
3925 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow *self,double clat,double clong,double pseudostdparallellat,double fe,double fn){
3926 3 : return OSRSetEquirectangular2( self, clat, clong,
3927 : pseudostdparallellat,
3928 : fe, fn );
3929 : }
3930 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double sc,double fe,double fn){
3931 0 : return OSRSetGaussSchreiberTMercator( self, clat, clong, sc, fe, fn );
3932 : }
3933 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3934 1 : return OSRSetGS( self, cm, fe, fn );
3935 : }
3936 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3937 0 : return OSRSetGH( self, cm, fe, fn );
3938 : }
3939 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow *self){
3940 0 : return OSRSetIGH( self );
3941 : }
3942 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
3943 0 : return OSRSetGEOS( self, cm, satelliteheight,
3944 : fe, fn );
3945 : }
3946 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3947 0 : return OSRSetGnomonic( self, clat, clong,
3948 : fe, fn );
3949 : }
3950 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn){
3951 0 : return OSRSetHOM( self, clat, clong, azimuth, recttoskew,
3952 : scale, fe, fn );
3953 : }
3954 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow *self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn){
3955 0 : return OSRSetHOM2PNO( self, clat, dfLat1, dfLong1, dfLat2, dfLong2,
3956 : scale, fe, fn );
3957 : }
3958 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn){
3959 0 : return OSRSetKrovak( self, clat, clong,
3960 : azimuth, pseudostdparallellat,
3961 : scale, fe, fn );
3962 : }
3963 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3964 0 : return OSRSetLAEA( self, clat, clong,
3965 : fe, fn );
3966 : }
3967 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3968 1 : return OSRSetLCC( self, stdp1, stdp2, clat, clong,
3969 : fe, fn );
3970 : }
3971 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3972 0 : return OSRSetLCC1SP( self, clat, clong, scale,
3973 : fe, fn );
3974 : }
3975 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3976 0 : return OSRSetLCCB( self, stdp1, stdp2, clat, clong,
3977 : fe, fn );
3978 : }
3979 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3980 0 : return OSRSetMC( self, clat, clong,
3981 : fe, fn );
3982 : }
3983 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3984 2 : return OSRSetMercator( self, clat, clong,
3985 : scale, fe, fn );
3986 : }
3987 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator2SP(OSRSpatialReferenceShadow *self,double stdp1,double clat,double clong,double fe,double fn){
3988 1 : return OSRSetMercator2SP( self, stdp1, clat, clong, fe, fn );
3989 : }
3990 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3991 0 : return OSRSetMollweide( self, cm,
3992 : fe, fn );
3993 : }
3994 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3995 0 : return OSRSetNZMG( self, clat, clong,
3996 : fe, fn );
3997 : }
3998 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow *self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn){
3999 0 : return OSRSetOS( self, dfOriginLat, dfCMeridian, scale,
4000 : fe, fn );
4001 : }
4002 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4003 1 : return OSRSetOrthographic( self, clat, clong,
4004 : fe, fn );
4005 : }
4006 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4007 0 : return OSRSetPolyconic( self, clat, clong,
4008 : fe, fn );
4009 : }
4010 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4011 1 : return OSRSetPS( self, clat, clong, scale,
4012 : fe, fn );
4013 : }
4014 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4015 0 : return OSRSetRobinson( self, clong, fe, fn );
4016 : }
4017 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4018 1 : return OSRSetSinusoidal( self, clong, fe, fn );
4019 : }
4020 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4021 0 : return OSRSetStereographic( self, clat, clong, scale,
4022 : fe, fn );
4023 : }
4024 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow *self,double latitudeoforigin,double cm,double fe,double fn){
4025 0 : return OSRSetSOC( self, latitudeoforigin, cm,
4026 : fe, fn );
4027 : }
4028 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4029 1 : return OSRSetTM( self, clat, clong, scale,
4030 : fe, fn );
4031 : }
4032 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow *self,char const *pszVariantName,double clat,double clong,double scale,double fe,double fn){
4033 0 : return OSRSetTMVariant( self, pszVariantName, clat, clong,
4034 : scale, fe, fn );
4035 : }
4036 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4037 0 : return OSRSetTMG( self, clat, clong,
4038 : fe, fn );
4039 : }
4040 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4041 0 : return OSRSetTMSO( self, clat, clong, scale,
4042 : fe, fn );
4043 : }
4044 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4045 0 : return OSRSetVDG( self, clong, fe, fn );
4046 : }
4047 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVerticalPerspective(OSRSpatialReferenceShadow *self,double topoOriginLat,double topoOriginLon,double topoOriginHeight,double viewPointHeight,double fe,double fn){
4048 1 : return OSRSetVerticalPerspective( self,
4049 : topoOriginLat, topoOriginLon, topoOriginHeight, viewPointHeight, fe, fn );
4050 : }
4051 61 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
4052 61 : return OSRSetWellKnownGeogCS( self, name );
4053 : }
4054 672 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name,char **options=NULL){
4055 672 : return OSRSetFromUserInputEx( self, name, options );
4056 : }
4057 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
4058 1 : return OSRCopyGeogCSFrom( self, rhs );
4059 : }
4060 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){
4061 :
4062 3 : return OSRSetTOWGS84( self, p1, p2, p3, p4, p5, p6, p7 );
4063 : }
4064 4 : SWIGINTERN bool OSRSpatialReferenceShadow_HasTOWGS84(OSRSpatialReferenceShadow *self){
4065 4 : double ignored[7];
4066 8 : return OSRGetTOWGS84( self, ignored, 7 ) == OGRERR_NONE;
4067 : }
4068 :
4069 : static PyObject *
4070 241 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
4071 241 : PyObject *out = PyTuple_New( size );
4072 1106 : for( unsigned int i=0; i<size; i++ ) {
4073 865 : PyObject *val = PyFloat_FromDouble( *first );
4074 865 : ++first;
4075 865 : PyTuple_SetItem( out, i, val );
4076 : }
4077 241 : return out;
4078 : }
4079 :
4080 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow *self,double argout[7]){
4081 4 : return OSRGetTOWGS84( self, argout, 7 );
4082 : }
4083 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AddGuessedTOWGS84(OSRSpatialReferenceShadow *self){
4084 2 : return OSRAddGuessedTOWGS84( self );
4085 : }
4086 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLocalCS(OSRSpatialReferenceShadow *self,char const *pszName){
4087 1 : return OSRSetLocalCS( self, pszName );
4088 : }
4089 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){
4090 17 : return OSRSetGeogCS( self, pszGeogName, pszDatumName, pszEllipsoidName,
4091 : dfSemiMajor, dfInvFlattening,
4092 : pszPMName, dfPMOffset, pszUnits, dfConvertToRadians );
4093 : }
4094 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
4095 1 : return OSRSetProjCS( self, name );
4096 : }
4097 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeocCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
4098 4 : return OSRSetGeocCS( self, name );
4099 : }
4100 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVertCS(OSRSpatialReferenceShadow *self,char const *VertCSName="unnamed",char const *VertDatumName="unnamed",int VertDatumType=0){
4101 0 : return OSRSetVertCS( self, VertCSName, VertDatumName, VertDatumType );
4102 : }
4103 8 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCompoundCS(OSRSpatialReferenceShadow *self,char const *name,OSRSpatialReferenceShadow *horizcs,OSRSpatialReferenceShadow *vertcs){
4104 8 : return OSRSetCompoundCS( self, name, horizcs, vertcs );
4105 : }
4106 290 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
4107 290 : return OSRImportFromWkt( self, ppszInput );
4108 : }
4109 179 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
4110 179 : return OSRImportFromProj4( self, ppszInput );
4111 : }
4112 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUrl(OSRSpatialReferenceShadow *self,char *url){
4113 3 : return OSRImportFromUrl( self, url );
4114 : }
4115 11 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow *self,char **ppszInput){
4116 11 : return OSRImportFromESRI( self, ppszInput );
4117 : }
4118 827 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
4119 827 : return OSRImportFromEPSG(self, arg);
4120 : }
4121 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow *self,int arg){
4122 2 : return OSRImportFromEPSGA(self, arg);
4123 : }
4124 7 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
4125 7 : return OSRImportFromPCI( self, proj, units, argin );
4126 : }
4127 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUSGS(OSRSpatialReferenceShadow *self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0){
4128 1 : return OSRImportFromUSGS( self, proj_code, zone, argin, datum_code );
4129 : }
4130 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
4131 1 : return OSRImportFromXML( self, xmlString );
4132 : }
4133 7 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
4134 7 : return OSRImportFromERM( self, proj, datum, units );
4135 : }
4136 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
4137 3 : return OSRImportFromMICoordSys( self, pszCoordSys );
4138 : }
4139 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *const *papszLines){
4140 3 : return OSRImportFromOzi( self, papszLines );
4141 : }
4142 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromCF1(OSRSpatialReferenceShadow *self,char **keyValues,char const *units=NULL){
4143 4 : return OSRImportFromCF1(self, keyValues, units);
4144 : }
4145 782 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4146 782 : return OSRExportToWktEx( self, argout, options );
4147 : }
4148 50 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
4149 50 : return OSRExportToPrettyWkt( self, argout, simplify );
4150 : }
4151 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPROJJSON(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4152 1 : return OSRExportToPROJJSON( self, argout, options );
4153 : }
4154 410 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
4155 410 : return OSRExportToProj4( self, argout );
4156 : }
4157 6 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *params[17]){
4158 6 : return OSRExportToPCI( self, proj, units, params );
4159 : }
4160 :
4161 : #define SWIG_From_long PyInt_FromLong
4162 :
4163 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *params[15],long *datum){
4164 1 : return OSRExportToUSGS( self, code, zone, params, datum );
4165 : }
4166 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToERM(OSRSpatialReferenceShadow *self,char **proj,char **datum,char **units){
4167 1 : char szProj[32] = {0}, szDatum[32] = {0}, szUnits[32] = {0};
4168 1 : OGRErr ret = OSRExportToERM( self, szProj, szDatum, szUnits );
4169 1 : *proj = CPLStrdup(szProj);
4170 1 : *datum = CPLStrdup(szDatum);
4171 1 : *units = CPLStrdup(szUnits);
4172 1 : return ret;
4173 : }
4174 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
4175 2 : return OSRExportToXML( self, argout, dialect );
4176 : }
4177 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
4178 5 : return OSRExportToMICoordSys( self, argout );
4179 : }
4180 4 : SWIGINTERN char **OSRSpatialReferenceShadow_ExportToCF1(OSRSpatialReferenceShadow *self,char **options=NULL){
4181 4 : char** ret = NULL;
4182 4 : OSRExportToCF1(self, NULL, &ret, NULL, options);
4183 4 : return ret;
4184 : }
4185 :
4186 : /* Return a PyObject* from a C String */
4187 44 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
4188 : {
4189 44 : const unsigned char* pszIter = (const unsigned char*) pszStr;
4190 854 : for( size_t i = 0; i < nLen; ++i)
4191 : {
4192 810 : if (pszIter[i] > 127)
4193 : {
4194 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
4195 0 : if (pyObj != NULL && !PyErr_Occurred())
4196 : return pyObj;
4197 0 : PyErr_Clear();
4198 0 : return PyBytes_FromStringAndSize(pszStr, nLen);
4199 : }
4200 : }
4201 44 : return PyUnicode_FromStringAndSize(pszStr, nLen);
4202 : }
4203 :
4204 :
4205 : static PyObject*
4206 4 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
4207 4 : PyObject* dict = PyDict_New();
4208 4 : if ( stringarray != NULL ) {
4209 48 : for (char** iter = stringarray; *iter; ++iter ) {
4210 44 : const char* pszSep = strchr( *iter, '=' );
4211 44 : if ( pszSep != NULL) {
4212 44 : const char* keyptr = *iter;
4213 44 : const char* valptr = pszSep + 1;
4214 44 : PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
4215 44 : PyObject *val = GDALPythonObjectFromCStr( valptr );
4216 44 : PyDict_SetItem(dict, nm, val );
4217 44 : Py_DECREF(nm);
4218 44 : Py_DECREF(val);
4219 : }
4220 : }
4221 : }
4222 4 : if( bFreeCSL )
4223 4 : CSLDestroy(stringarray);
4224 4 : return dict;
4225 : }
4226 :
4227 1 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow_ExportToCF1Units(OSRSpatialReferenceShadow *self,char **options=NULL){
4228 1 : char* units = NULL;
4229 1 : OSRExportToCF1(self, NULL, NULL, &units, options);
4230 1 : return units;
4231 : }
4232 16 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
4233 16 : return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
4234 : }
4235 59 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
4236 59 : return (OSRSpatialReferenceShadow*) OSRClone(self);
4237 : }
4238 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripVertical(OSRSpatialReferenceShadow *self){
4239 1 : return OSRStripVertical(self);
4240 : }
4241 114 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
4242 114 : return OSRValidate(self);
4243 : }
4244 20 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
4245 20 : return OSRMorphToESRI(self);
4246 : }
4247 19 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
4248 19 : return OSRMorphFromESRI(self);
4249 : }
4250 28 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_ConvertToOtherProjection(OSRSpatialReferenceShadow *self,char const *other_projection,char **options=NULL){
4251 28 : return OSRConvertToOtherProjection(self, other_projection, options);
4252 : }
4253 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_PromoteTo3D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4254 3 : return OSRPromoteTo3D(self, name);
4255 : }
4256 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_DemoteTo2D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4257 1 : return OSRDemoteTo2D(self, name);
4258 : }
4259 11 : SWIGINTERN OGRCoordinateTransformationOptions *new_OGRCoordinateTransformationOptions(){
4260 11 : return OCTNewCoordinateTransformationOptions();
4261 : }
4262 11 : SWIGINTERN void delete_OGRCoordinateTransformationOptions(OGRCoordinateTransformationOptions *self){
4263 11 : OCTDestroyCoordinateTransformationOptions( self );
4264 : }
4265 5 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetAreaOfInterest(OGRCoordinateTransformationOptions *self,double westLongitudeDeg,double southLatitudeDeg,double eastLongitudeDeg,double northLatitudeDeg){
4266 5 : return OCTCoordinateTransformationOptionsSetAreaOfInterest(self,
4267 : westLongitudeDeg, southLatitudeDeg,
4268 5 : eastLongitudeDeg, northLatitudeDeg);
4269 : }
4270 :
4271 : SWIGINTERN int
4272 2 : SWIG_AsVal_bool (PyObject *obj, bool *val)
4273 : {
4274 2 : int r;
4275 2 : if (!PyBool_Check(obj))
4276 : return SWIG_ERROR;
4277 2 : r = PyObject_IsTrue(obj);
4278 2 : if (r == -1)
4279 : return SWIG_ERROR;
4280 2 : if (val) *val = r ? true : false;
4281 : return SWIG_OK;
4282 : }
4283 :
4284 8 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOperation(OGRCoordinateTransformationOptions *self,char const *operation,bool inverseCT=false){
4285 16 : return OCTCoordinateTransformationOptionsSetOperation(self, operation, inverseCT);
4286 : }
4287 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetDesiredAccuracy(OGRCoordinateTransformationOptions *self,double accuracy){
4288 2 : return OCTCoordinateTransformationOptionsSetDesiredAccuracy(self, accuracy);
4289 : }
4290 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetBallparkAllowed(OGRCoordinateTransformationOptions *self,bool allowBallpark){
4291 2 : return OCTCoordinateTransformationOptionsSetBallparkAllowed(self, allowBallpark);
4292 : }
4293 0 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOnlyBest(OGRCoordinateTransformationOptions *self,bool onlyBest){
4294 0 : return OCTCoordinateTransformationOptionsSetOnlyBest(self, onlyBest);
4295 : }
4296 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_0(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
4297 : return (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation(src, dst);
4298 : }
4299 10 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_1(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst,OGRCoordinateTransformationOptions *options){
4300 10 : return (OSRCoordinateTransformationShadow*)
4301 10 : options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst);
4302 : }
4303 151 : SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
4304 151 : OCTDestroyCoordinateTransformation( self );
4305 : }
4306 1 : SWIGINTERN OSRCoordinateTransformationShadow *OSRCoordinateTransformationShadow_GetInverse(OSRCoordinateTransformationShadow *self){
4307 1 : return OCTGetInverse(self);
4308 : }
4309 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint3Double(OSRCoordinateTransformationShadow *self,double inout[3]){
4310 :
4311 :
4312 :
4313 1 : if (self == NULL)
4314 : return;
4315 1 : OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
4316 : }
4317 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint4Double(OSRCoordinateTransformationShadow *self,double inout[4]){
4318 :
4319 :
4320 :
4321 1 : if (self == NULL)
4322 : return;
4323 1 : OCTTransform4D( self, 1, &inout[0], &inout[1], &inout[2], &inout[3], NULL );
4324 : }
4325 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
4326 : if (self == NULL)
4327 : return;
4328 : argout[0] = x;
4329 : argout[1] = y;
4330 : argout[2] = z;
4331 : OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
4332 : }
4333 4 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
4334 4 : if (self == NULL)
4335 : return;
4336 4 : argout[0] = x;
4337 4 : argout[1] = y;
4338 4 : argout[2] = z;
4339 4 : argout[3] = t;
4340 4 : OCTTransform4D( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], NULL );
4341 : }
4342 0 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPointWithErrorCode(OSRCoordinateTransformationShadow *self,double argout[4],int errorCode[1],double x,double y,double z,double t){
4343 0 : if (self == NULL)
4344 : return;
4345 0 : argout[0] = x;
4346 0 : argout[1] = y;
4347 0 : argout[2] = z;
4348 0 : argout[3] = t;
4349 0 : OCTTransform4DWithErrorCodes( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], errorCode );
4350 : }
4351 :
4352 : static int
4353 10 : DecomposeSequenceOf4DCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z, double *t, int *pbFoundTime )
4354 : {
4355 10 : *pbFoundTime = FALSE;
4356 33 : for( int i = 0; i<nCount; ++i )
4357 : {
4358 :
4359 23 : PyObject *o = PySequence_GetItem(seq, i);
4360 23 : if ( !PySequence_Check(o) )
4361 : {
4362 0 : Py_DECREF(o);
4363 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4364 :
4365 0 : return FALSE;
4366 : }
4367 :
4368 23 : Py_ssize_t len = PySequence_Size(o);
4369 :
4370 23 : if (len >= 2 && len <= 4)
4371 : {
4372 23 : PyObject *o1 = PySequence_GetItem(o, 0);
4373 23 : if (!PyNumber_Check(o1))
4374 : {
4375 0 : Py_DECREF(o); Py_DECREF(o1);
4376 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4377 :
4378 0 : return FALSE;
4379 : }
4380 23 : x[i] = PyFloat_AsDouble(o1);
4381 23 : Py_DECREF(o1);
4382 :
4383 23 : o1 = PySequence_GetItem(o, 1);
4384 23 : if (!PyNumber_Check(o1))
4385 : {
4386 0 : Py_DECREF(o); Py_DECREF(o1);
4387 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4388 :
4389 0 : return FALSE;
4390 : }
4391 23 : y[i] = PyFloat_AsDouble(o1);
4392 23 : Py_DECREF(o1);
4393 :
4394 : /* The 3rd coordinate is optional, default 0.0 */
4395 23 : if (len >= 3)
4396 : {
4397 16 : o1 = PySequence_GetItem(o, 2);
4398 16 : if (!PyNumber_Check(o1))
4399 : {
4400 0 : Py_DECREF(o); Py_DECREF(o1);
4401 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4402 :
4403 0 : return FALSE;
4404 : }
4405 16 : z[i] = PyFloat_AsDouble(o1);
4406 16 : Py_DECREF(o1);
4407 : }
4408 : else
4409 : {
4410 7 : z[i] = 0.0;
4411 : }
4412 :
4413 : /* The 4th coordinate is optional, default 0.0 */
4414 23 : if (len >= 4)
4415 : {
4416 8 : o1 = PySequence_GetItem(o, 3);
4417 8 : if (!PyNumber_Check(o1))
4418 : {
4419 0 : Py_DECREF(o); Py_DECREF(o1);
4420 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4421 :
4422 0 : return FALSE;
4423 : }
4424 8 : *pbFoundTime = TRUE;
4425 8 : t[i] = PyFloat_AsDouble(o1);
4426 8 : Py_DECREF(o1);
4427 : }
4428 : else
4429 : {
4430 15 : t[i] = 0.0;
4431 : }
4432 : }
4433 : else
4434 : {
4435 0 : Py_DECREF(o);
4436 0 : PyErr_SetString(PyExc_TypeError, "invalid coordinate");
4437 :
4438 0 : return FALSE;
4439 : }
4440 :
4441 23 : Py_DECREF(o);
4442 : }
4443 :
4444 : return TRUE;
4445 : }
4446 :
4447 10 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z,double *t){
4448 10 : if (self == NULL)
4449 : return;
4450 10 : OCTTransform4D( self, nCount, x, y, z, t, NULL );
4451 : }
4452 25 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformBounds(OSRCoordinateTransformationShadow *self,double argout[4],double minx,double miny,double maxx,double maxy,int densify_pts){
4453 25 : argout[0] = HUGE_VAL;
4454 25 : argout[1] = HUGE_VAL;
4455 25 : argout[2] = HUGE_VAL;
4456 25 : argout[3] = HUGE_VAL;
4457 25 : if (self == NULL)
4458 : return;
4459 25 : OCTTransformBounds(
4460 : self,
4461 : minx, miny, maxx, maxy,
4462 : &argout[0], &argout[1], &argout[2], &argout[3],
4463 : densify_pts
4464 : );
4465 : }
4466 :
4467 2 : OSRCoordinateTransformationShadow *CreateCoordinateTransformation( OSRSpatialReferenceShadow *src, OSRSpatialReferenceShadow *dst, OGRCoordinateTransformationOptions* options = NULL ) {
4468 2 : return (OSRCoordinateTransformationShadow*)
4469 2 : options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst);
4470 : }
4471 :
4472 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){
4473 6609 : OSRCRSInfo *self = (OSRCRSInfo*) CPLMalloc( sizeof( OSRCRSInfo ) );
4474 6609 : self->pszAuthName = auth_name ? CPLStrdup(auth_name) : NULL;
4475 6609 : self->pszCode = code ? CPLStrdup(code) : NULL;
4476 6609 : self->pszName = name ? CPLStrdup(name) : NULL;
4477 6609 : self->eType = type;
4478 6609 : self->bDeprecated = deprecated;
4479 6609 : self->bBboxValid = bbox_valid;
4480 6609 : self->dfWestLongitudeDeg = west_lon_degree;
4481 6609 : self->dfSouthLatitudeDeg = south_lat_degree;
4482 6609 : self->dfEastLongitudeDeg = east_lon_degree;
4483 6609 : self->dfNorthLatitudeDeg = north_lat_degree;
4484 6609 : self->pszAreaName = area_name ? CPLStrdup(area_name) : NULL;
4485 6609 : self->pszProjectionMethod = projection_method ? CPLStrdup(projection_method) : NULL;
4486 6609 : return self;
4487 : }
4488 6609 : SWIGINTERN void delete_OSRCRSInfo(OSRCRSInfo *self){
4489 6609 : CPLFree( self->pszAuthName );
4490 6609 : CPLFree( self->pszCode );
4491 6609 : CPLFree( self->pszName );
4492 6609 : CPLFree( self->pszAreaName );
4493 6609 : CPLFree( self->pszProjectionMethod );
4494 6609 : CPLFree( self );
4495 6609 : }
4496 :
4497 :
4498 6609 : const char* OSRCRSInfo_auth_name_get( OSRCRSInfo *crsInfo ) {
4499 6609 : return crsInfo->pszAuthName;
4500 : }
4501 :
4502 6609 : const char* OSRCRSInfo_code_get( OSRCRSInfo *crsInfo ) {
4503 6609 : return crsInfo->pszCode;
4504 : }
4505 :
4506 1 : const char* OSRCRSInfo_name_get( OSRCRSInfo *crsInfo ) {
4507 1 : return crsInfo->pszName;
4508 : }
4509 :
4510 1 : OSRCRSType OSRCRSInfo_type_get( OSRCRSInfo *crsInfo ) {
4511 1 : return crsInfo->eType;
4512 : }
4513 :
4514 1 : bool OSRCRSInfo_deprecated_get( OSRCRSInfo *crsInfo ) {
4515 1 : return crsInfo->bDeprecated;
4516 : }
4517 :
4518 1 : bool OSRCRSInfo_bbox_valid_get( OSRCRSInfo *crsInfo ) {
4519 1 : return crsInfo->bBboxValid;
4520 : }
4521 :
4522 1 : double OSRCRSInfo_west_lon_degree_get( OSRCRSInfo *crsInfo ) {
4523 1 : return crsInfo->dfWestLongitudeDeg;
4524 : }
4525 :
4526 1 : double OSRCRSInfo_south_lat_degree_get( OSRCRSInfo *crsInfo ) {
4527 1 : return crsInfo->dfSouthLatitudeDeg;
4528 : }
4529 :
4530 1 : double OSRCRSInfo_east_lon_degree_get( OSRCRSInfo *crsInfo ) {
4531 1 : return crsInfo->dfEastLongitudeDeg;
4532 : }
4533 :
4534 1 : double OSRCRSInfo_north_lat_degree_get( OSRCRSInfo *crsInfo ) {
4535 1 : return crsInfo->dfNorthLatitudeDeg;
4536 : }
4537 :
4538 1 : const char* OSRCRSInfo_area_name_get( OSRCRSInfo *crsInfo ) {
4539 1 : return crsInfo->pszAreaName;
4540 : }
4541 :
4542 1 : const char* OSRCRSInfo_projection_method_get( OSRCRSInfo *crsInfo ) {
4543 1 : return crsInfo->pszProjectionMethod;
4544 : }
4545 :
4546 :
4547 :
4548 1 : void GetCRSInfoListFromDatabase( const char *authName,
4549 : OSRCRSInfo*** pList,
4550 : int* pnListCount)
4551 : {
4552 1 : *pList = OSRGetCRSInfoListFromDatabase(authName, NULL, pnListCount);
4553 1 : }
4554 :
4555 :
4556 1 : void SetPROJSearchPath( const char *utf8_path )
4557 : {
4558 1 : const char* const apszPaths[2] = { utf8_path, NULL };
4559 1 : OSRSetPROJSearchPaths(apszPaths);
4560 1 : }
4561 :
4562 :
4563 16 : void SetPROJSearchPaths( char** paths )
4564 : {
4565 16 : OSRSetPROJSearchPaths(paths);
4566 16 : }
4567 :
4568 :
4569 21 : char** GetPROJSearchPaths()
4570 : {
4571 21 : return OSRGetPROJSearchPaths();
4572 : }
4573 :
4574 :
4575 21 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
4576 : {
4577 21 : PyObject* res;
4578 21 : if ( stringarray == NULL ) {
4579 0 : res = Py_None;
4580 0 : Py_INCREF( res );
4581 : }
4582 : else {
4583 21 : int len = CSLCount( stringarray );
4584 21 : res = PyList_New( len );
4585 21 : if( !res ) {
4586 0 : *pbErr = true;
4587 0 : return res;
4588 : }
4589 49 : for ( int i = 0; i < len; ++i ) {
4590 28 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
4591 28 : PyList_SetItem(res, i, o );
4592 : }
4593 : }
4594 21 : *pbErr = false;
4595 21 : return res;
4596 : }
4597 :
4598 :
4599 69 : int GetPROJVersionMajor()
4600 : {
4601 69 : int num;
4602 69 : OSRGetPROJVersion(&num, NULL, NULL);
4603 69 : return num;
4604 : }
4605 :
4606 63 : int GetPROJVersionMinor()
4607 : {
4608 63 : int num;
4609 63 : OSRGetPROJVersion(NULL, &num, NULL);
4610 63 : return num;
4611 : }
4612 :
4613 48 : int GetPROJVersionMicro()
4614 : {
4615 48 : int num;
4616 48 : OSRGetPROJVersion(NULL, NULL, &num);
4617 48 : return num;
4618 : }
4619 :
4620 0 : bool GetPROJEnableNetwork()
4621 : {
4622 0 : return OSRGetPROJEnableNetwork();
4623 : }
4624 :
4625 0 : void SetPROJEnableNetwork(bool enabled)
4626 : {
4627 0 : OSRSetPROJEnableNetwork(enabled);
4628 0 : }
4629 :
4630 :
4631 1 : void SetPROJAuxDbPath( const char *utf8_path )
4632 : {
4633 1 : const char* const apszPaths[2] = { utf8_path, NULL };
4634 1 : OSRSetPROJAuxDbPaths(apszPaths);
4635 1 : }
4636 :
4637 :
4638 0 : void SetPROJAuxDbPaths( char** paths )
4639 : {
4640 0 : OSRSetPROJAuxDbPaths(paths);
4641 0 : }
4642 :
4643 :
4644 0 : char** GetPROJAuxDbPaths()
4645 : {
4646 0 : return OSRGetPROJAuxDbPaths();
4647 : }
4648 :
4649 : #ifdef __cplusplus
4650 : extern "C" {
4651 : #endif
4652 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4653 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4654 0 : int result;
4655 :
4656 0 : if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
4657 0 : {
4658 : #ifdef SED_HACKS
4659 0 : if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
4660 : #endif
4661 0 : result = GetUseExceptions();
4662 : }
4663 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4664 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4665 : return resultobj;
4666 0 : fail:
4667 0 : return NULL;
4668 : }
4669 :
4670 :
4671 10445 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4672 10445 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4673 10445 : int result;
4674 :
4675 10445 : if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
4676 10445 : {
4677 : #ifdef SED_HACKS
4678 10445 : if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
4679 : #endif
4680 10445 : result = (int)_GetExceptionsLocal();
4681 : }
4682 10445 : resultobj = SWIG_From_int(static_cast< int >(result));
4683 10445 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4684 : return resultobj;
4685 0 : fail:
4686 0 : return NULL;
4687 : }
4688 :
4689 :
4690 20890 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4691 20890 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4692 20890 : int arg1 ;
4693 20890 : int val1 ;
4694 20890 : int ecode1 = 0 ;
4695 20890 : PyObject *swig_obj[1] ;
4696 :
4697 20890 : if (!args) SWIG_fail;
4698 20890 : swig_obj[0] = args;
4699 20890 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
4700 20890 : if (!SWIG_IsOK(ecode1)) {
4701 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
4702 : }
4703 20890 : arg1 = static_cast< int >(val1);
4704 20890 : {
4705 : #ifdef SED_HACKS
4706 20890 : if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
4707 : #endif
4708 20890 : _SetExceptionsLocal(arg1);
4709 : }
4710 20890 : resultobj = SWIG_Py_Void();
4711 20890 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4712 : return resultobj;
4713 : fail:
4714 : return NULL;
4715 : }
4716 :
4717 :
4718 274 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4719 274 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4720 :
4721 274 : if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
4722 274 : _UseExceptions();
4723 274 : resultobj = SWIG_Py_Void();
4724 274 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4725 : return resultobj;
4726 0 : fail:
4727 0 : return NULL;
4728 : }
4729 :
4730 :
4731 5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4732 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4733 :
4734 5 : if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
4735 5 : _DontUseExceptions();
4736 5 : resultobj = SWIG_Py_Void();
4737 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4738 : return resultobj;
4739 0 : fail:
4740 0 : return NULL;
4741 : }
4742 :
4743 :
4744 2197 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4745 2197 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4746 2197 : int result;
4747 :
4748 2197 : if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
4749 2197 : {
4750 : #ifdef SED_HACKS
4751 2197 : if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
4752 : #endif
4753 2197 : result = (int)_UserHasSpecifiedIfUsingExceptions();
4754 : }
4755 2197 : resultobj = SWIG_From_int(static_cast< int >(result));
4756 2197 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4757 : return resultobj;
4758 0 : fail:
4759 0 : return NULL;
4760 : }
4761 :
4762 :
4763 0 : SWIGINTERN PyObject *_wrap_GetWellKnownGeogCSAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4764 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4765 0 : char *arg1 = (char *) 0 ;
4766 0 : char **arg2 = (char **) 0 ;
4767 0 : int res1 ;
4768 0 : char *buf1 = 0 ;
4769 0 : int alloc1 = 0 ;
4770 0 : char *argout2 = 0 ;
4771 0 : PyObject *swig_obj[1] ;
4772 0 : OGRErr result;
4773 :
4774 0 : {
4775 : /* %typemap(in,numinputs=0) (char **argout2) */
4776 0 : arg2 = &argout2;
4777 : }
4778 0 : if (!args) SWIG_fail;
4779 0 : swig_obj[0] = args;
4780 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4781 0 : if (!SWIG_IsOK(res1)) {
4782 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetWellKnownGeogCSAsWKT" "', argument " "1"" of type '" "char const *""'");
4783 : }
4784 0 : arg1 = reinterpret_cast< char * >(buf1);
4785 0 : {
4786 0 : if (!arg1) {
4787 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4788 : }
4789 : }
4790 0 : {
4791 0 : const int bLocalUseExceptions = GetUseExceptions();
4792 0 : if ( bLocalUseExceptions ) {
4793 0 : pushErrorHandler();
4794 : }
4795 0 : result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
4796 0 : if ( bLocalUseExceptions ) {
4797 0 : popErrorHandler();
4798 : }
4799 : #ifndef SED_HACKS
4800 : if ( bLocalUseExceptions ) {
4801 : CPLErr eclass = CPLGetLastErrorType();
4802 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4803 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4804 : }
4805 : }
4806 : #endif
4807 : }
4808 0 : {
4809 : /* %typemap(out) OGRErr */
4810 0 : if ( result != 0 && GetUseExceptions()) {
4811 0 : const char* pszMessage = CPLGetLastErrorMsg();
4812 0 : if( pszMessage[0] != '\0' )
4813 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4814 : else
4815 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4816 0 : SWIG_fail;
4817 : }
4818 : }
4819 0 : {
4820 : /* %typemap(argout) (char **argout) */
4821 0 : PyObject *o;
4822 0 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4823 0 : o = GDALPythonObjectFromCStr( *arg2 );
4824 : }
4825 : else {
4826 0 : o = Py_None;
4827 0 : Py_INCREF( o );
4828 : }
4829 0 : resultobj = t_output_helper(resultobj, o);
4830 : }
4831 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4832 0 : {
4833 : /* %typemap(freearg) (char **argout) */
4834 0 : if ( *arg2 )
4835 0 : CPLFree( *arg2 );
4836 : }
4837 0 : {
4838 : /* %typemap(ret) OGRErr */
4839 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4840 0 : resultobj = PyInt_FromLong( result );
4841 : }
4842 : }
4843 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4844 : return resultobj;
4845 0 : fail:
4846 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4847 0 : {
4848 : /* %typemap(freearg) (char **argout) */
4849 0 : if ( *arg2 )
4850 0 : CPLFree( *arg2 );
4851 : }
4852 : return NULL;
4853 : }
4854 :
4855 :
4856 12 : SWIGINTERN PyObject *_wrap_GetUserInputAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4857 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4858 12 : char *arg1 = (char *) 0 ;
4859 12 : char **arg2 = (char **) 0 ;
4860 12 : int res1 ;
4861 12 : char *buf1 = 0 ;
4862 12 : int alloc1 = 0 ;
4863 12 : char *argout2 = 0 ;
4864 12 : PyObject *swig_obj[1] ;
4865 12 : OGRErr result;
4866 :
4867 12 : {
4868 : /* %typemap(in,numinputs=0) (char **argout2) */
4869 12 : arg2 = &argout2;
4870 : }
4871 12 : if (!args) SWIG_fail;
4872 12 : swig_obj[0] = args;
4873 12 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4874 12 : if (!SWIG_IsOK(res1)) {
4875 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetUserInputAsWKT" "', argument " "1"" of type '" "char const *""'");
4876 : }
4877 12 : arg1 = reinterpret_cast< char * >(buf1);
4878 12 : {
4879 12 : if (!arg1) {
4880 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4881 : }
4882 : }
4883 12 : {
4884 12 : const int bLocalUseExceptions = GetUseExceptions();
4885 12 : if ( bLocalUseExceptions ) {
4886 12 : pushErrorHandler();
4887 : }
4888 12 : result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
4889 12 : if ( bLocalUseExceptions ) {
4890 12 : popErrorHandler();
4891 : }
4892 : #ifndef SED_HACKS
4893 : if ( bLocalUseExceptions ) {
4894 : CPLErr eclass = CPLGetLastErrorType();
4895 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4896 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4897 : }
4898 : }
4899 : #endif
4900 : }
4901 12 : {
4902 : /* %typemap(out) OGRErr */
4903 12 : if ( result != 0 && GetUseExceptions()) {
4904 0 : const char* pszMessage = CPLGetLastErrorMsg();
4905 0 : if( pszMessage[0] != '\0' )
4906 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4907 : else
4908 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4909 0 : SWIG_fail;
4910 : }
4911 : }
4912 12 : {
4913 : /* %typemap(argout) (char **argout) */
4914 12 : PyObject *o;
4915 12 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4916 12 : o = GDALPythonObjectFromCStr( *arg2 );
4917 : }
4918 : else {
4919 0 : o = Py_None;
4920 0 : Py_INCREF( o );
4921 : }
4922 12 : resultobj = t_output_helper(resultobj, o);
4923 : }
4924 12 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4925 12 : {
4926 : /* %typemap(freearg) (char **argout) */
4927 12 : if ( *arg2 )
4928 12 : CPLFree( *arg2 );
4929 : }
4930 12 : {
4931 : /* %typemap(ret) OGRErr */
4932 24 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4933 0 : resultobj = PyInt_FromLong( result );
4934 : }
4935 : }
4936 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4937 : return resultobj;
4938 0 : fail:
4939 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4940 0 : {
4941 : /* %typemap(freearg) (char **argout) */
4942 0 : if ( *arg2 )
4943 0 : CPLFree( *arg2 );
4944 : }
4945 : return NULL;
4946 : }
4947 :
4948 :
4949 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4950 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4951 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
4952 1 : void *argp1 = 0 ;
4953 1 : int res1 = 0 ;
4954 1 : PyObject *swig_obj[1] ;
4955 1 : double result;
4956 :
4957 1 : if (!args) SWIG_fail;
4958 1 : swig_obj[0] = args;
4959 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
4960 1 : if (!SWIG_IsOK(res1)) {
4961 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
4962 : }
4963 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
4964 1 : {
4965 1 : const int bLocalUseExceptions = GetUseExceptions();
4966 1 : if ( bLocalUseExceptions ) {
4967 1 : pushErrorHandler();
4968 : }
4969 1 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
4970 1 : if ( bLocalUseExceptions ) {
4971 1 : popErrorHandler();
4972 : }
4973 : #ifndef SED_HACKS
4974 : if ( bLocalUseExceptions ) {
4975 : CPLErr eclass = CPLGetLastErrorType();
4976 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4977 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4978 : }
4979 : }
4980 : #endif
4981 : }
4982 1 : resultobj = SWIG_From_double(static_cast< double >(result));
4983 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
4984 : return resultobj;
4985 : fail:
4986 : return NULL;
4987 : }
4988 :
4989 :
4990 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4991 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4992 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
4993 1 : void *argp1 = 0 ;
4994 1 : int res1 = 0 ;
4995 1 : PyObject *swig_obj[1] ;
4996 1 : double result;
4997 :
4998 1 : if (!args) SWIG_fail;
4999 1 : swig_obj[0] = args;
5000 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5001 1 : if (!SWIG_IsOK(res1)) {
5002 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5003 : }
5004 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5005 1 : {
5006 1 : const int bLocalUseExceptions = GetUseExceptions();
5007 1 : if ( bLocalUseExceptions ) {
5008 1 : pushErrorHandler();
5009 : }
5010 1 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5011 1 : if ( bLocalUseExceptions ) {
5012 1 : popErrorHandler();
5013 : }
5014 : #ifndef SED_HACKS
5015 : if ( bLocalUseExceptions ) {
5016 : CPLErr eclass = CPLGetLastErrorType();
5017 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5018 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5019 : }
5020 : }
5021 : #endif
5022 : }
5023 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5024 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5025 : return resultobj;
5026 : fail:
5027 : return NULL;
5028 : }
5029 :
5030 :
5031 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5032 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5033 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5034 1 : void *argp1 = 0 ;
5035 1 : int res1 = 0 ;
5036 1 : PyObject *swig_obj[1] ;
5037 1 : double result;
5038 :
5039 1 : if (!args) SWIG_fail;
5040 1 : swig_obj[0] = args;
5041 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5042 1 : if (!SWIG_IsOK(res1)) {
5043 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5044 : }
5045 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5046 1 : {
5047 1 : const int bLocalUseExceptions = GetUseExceptions();
5048 1 : if ( bLocalUseExceptions ) {
5049 1 : pushErrorHandler();
5050 : }
5051 1 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5052 1 : if ( bLocalUseExceptions ) {
5053 1 : popErrorHandler();
5054 : }
5055 : #ifndef SED_HACKS
5056 : if ( bLocalUseExceptions ) {
5057 : CPLErr eclass = CPLGetLastErrorType();
5058 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5059 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5060 : }
5061 : }
5062 : #endif
5063 : }
5064 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5065 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5066 : return resultobj;
5067 : fail:
5068 : return NULL;
5069 : }
5070 :
5071 :
5072 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5073 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5074 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5075 1 : void *argp1 = 0 ;
5076 1 : int res1 = 0 ;
5077 1 : PyObject *swig_obj[1] ;
5078 1 : double result;
5079 :
5080 1 : if (!args) SWIG_fail;
5081 1 : swig_obj[0] = args;
5082 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5083 1 : if (!SWIG_IsOK(res1)) {
5084 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5085 : }
5086 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5087 1 : {
5088 1 : const int bLocalUseExceptions = GetUseExceptions();
5089 1 : if ( bLocalUseExceptions ) {
5090 1 : pushErrorHandler();
5091 : }
5092 1 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5093 1 : if ( bLocalUseExceptions ) {
5094 1 : popErrorHandler();
5095 : }
5096 : #ifndef SED_HACKS
5097 : if ( bLocalUseExceptions ) {
5098 : CPLErr eclass = CPLGetLastErrorType();
5099 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5100 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5101 : }
5102 : }
5103 : #endif
5104 : }
5105 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5106 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5107 : return resultobj;
5108 : fail:
5109 : return NULL;
5110 : }
5111 :
5112 :
5113 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5114 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5115 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5116 1 : void *argp1 = 0 ;
5117 1 : int res1 = 0 ;
5118 1 : PyObject *swig_obj[1] ;
5119 1 : char *result = 0 ;
5120 :
5121 1 : if (!args) SWIG_fail;
5122 1 : swig_obj[0] = args;
5123 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5124 1 : if (!SWIG_IsOK(res1)) {
5125 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5126 : }
5127 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5128 1 : {
5129 1 : const int bLocalUseExceptions = GetUseExceptions();
5130 1 : if ( bLocalUseExceptions ) {
5131 1 : pushErrorHandler();
5132 : }
5133 1 : result = (char *)OSRAreaOfUse_name_get(arg1);
5134 1 : if ( bLocalUseExceptions ) {
5135 1 : popErrorHandler();
5136 : }
5137 : #ifndef SED_HACKS
5138 : if ( bLocalUseExceptions ) {
5139 : CPLErr eclass = CPLGetLastErrorType();
5140 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5141 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5142 : }
5143 : }
5144 : #endif
5145 : }
5146 1 : resultobj = SWIG_FromCharPtr((const char *)result);
5147 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5148 : return resultobj;
5149 : fail:
5150 : return NULL;
5151 : }
5152 :
5153 :
5154 0 : SWIGINTERN PyObject *_wrap_new_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5155 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5156 0 : double arg1 ;
5157 0 : double arg2 ;
5158 0 : double arg3 ;
5159 0 : double arg4 ;
5160 0 : char *arg5 = (char *) 0 ;
5161 0 : double val1 ;
5162 0 : int ecode1 = 0 ;
5163 0 : double val2 ;
5164 0 : int ecode2 = 0 ;
5165 0 : double val3 ;
5166 0 : int ecode3 = 0 ;
5167 0 : double val4 ;
5168 0 : int ecode4 = 0 ;
5169 0 : int res5 ;
5170 0 : char *buf5 = 0 ;
5171 0 : int alloc5 = 0 ;
5172 0 : PyObject *swig_obj[5] ;
5173 0 : OSRAreaOfUse *result = 0 ;
5174 :
5175 0 : if (!SWIG_Python_UnpackTuple(args, "new_AreaOfUse", 5, 5, swig_obj)) SWIG_fail;
5176 0 : ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
5177 0 : if (!SWIG_IsOK(ecode1)) {
5178 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AreaOfUse" "', argument " "1"" of type '" "double""'");
5179 : }
5180 0 : arg1 = static_cast< double >(val1);
5181 0 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5182 0 : if (!SWIG_IsOK(ecode2)) {
5183 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AreaOfUse" "', argument " "2"" of type '" "double""'");
5184 : }
5185 0 : arg2 = static_cast< double >(val2);
5186 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5187 0 : if (!SWIG_IsOK(ecode3)) {
5188 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AreaOfUse" "', argument " "3"" of type '" "double""'");
5189 : }
5190 0 : arg3 = static_cast< double >(val3);
5191 0 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
5192 0 : if (!SWIG_IsOK(ecode4)) {
5193 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_AreaOfUse" "', argument " "4"" of type '" "double""'");
5194 : }
5195 0 : arg4 = static_cast< double >(val4);
5196 0 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
5197 0 : if (!SWIG_IsOK(res5)) {
5198 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_AreaOfUse" "', argument " "5"" of type '" "char *""'");
5199 : }
5200 0 : arg5 = reinterpret_cast< char * >(buf5);
5201 0 : {
5202 0 : const int bLocalUseExceptions = GetUseExceptions();
5203 0 : if ( bLocalUseExceptions ) {
5204 0 : pushErrorHandler();
5205 : }
5206 0 : result = (OSRAreaOfUse *)new_OSRAreaOfUse(arg1,arg2,arg3,arg4,arg5);
5207 0 : if ( bLocalUseExceptions ) {
5208 0 : popErrorHandler();
5209 : }
5210 : #ifndef SED_HACKS
5211 : if ( bLocalUseExceptions ) {
5212 : CPLErr eclass = CPLGetLastErrorType();
5213 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5214 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5215 : }
5216 : }
5217 : #endif
5218 : }
5219 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_NEW | 0 );
5220 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5221 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5222 : return resultobj;
5223 0 : fail:
5224 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5225 : return NULL;
5226 : }
5227 :
5228 :
5229 1 : SWIGINTERN PyObject *_wrap_delete_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5230 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5231 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5232 1 : void *argp1 = 0 ;
5233 1 : int res1 = 0 ;
5234 1 : PyObject *swig_obj[1] ;
5235 :
5236 1 : if (!args) SWIG_fail;
5237 1 : swig_obj[0] = args;
5238 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_DISOWN | 0 );
5239 1 : if (!SWIG_IsOK(res1)) {
5240 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AreaOfUse" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5241 : }
5242 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5243 1 : {
5244 1 : const int bLocalUseExceptions = GetUseExceptions();
5245 1 : if ( bLocalUseExceptions ) {
5246 1 : pushErrorHandler();
5247 : }
5248 1 : delete_OSRAreaOfUse(arg1);
5249 1 : if ( bLocalUseExceptions ) {
5250 1 : popErrorHandler();
5251 : }
5252 : #ifndef SED_HACKS
5253 : if ( bLocalUseExceptions ) {
5254 : CPLErr eclass = CPLGetLastErrorType();
5255 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5256 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5257 : }
5258 : }
5259 : #endif
5260 : }
5261 1 : resultobj = SWIG_Py_Void();
5262 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5263 : return resultobj;
5264 : fail:
5265 : return NULL;
5266 : }
5267 :
5268 :
5269 271 : SWIGINTERN PyObject *AreaOfUse_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5270 271 : PyObject *obj;
5271 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5272 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRAreaOfUse, SWIG_NewClientData(obj));
5273 271 : return SWIG_Py_Void();
5274 : }
5275 :
5276 0 : SWIGINTERN PyObject *AreaOfUse_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5277 0 : return SWIG_Python_InitShadowInstance(args);
5278 : }
5279 :
5280 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5281 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5282 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5283 0 : void *argp1 = 0 ;
5284 0 : int res1 = 0 ;
5285 0 : PyObject *swig_obj[1] ;
5286 0 : double result;
5287 :
5288 0 : if (!args) SWIG_fail;
5289 0 : swig_obj[0] = args;
5290 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5291 0 : if (!SWIG_IsOK(res1)) {
5292 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5293 : }
5294 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5295 0 : {
5296 0 : if (!arg1) {
5297 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5298 : }
5299 : }
5300 0 : {
5301 0 : const int bLocalUseExceptions = GetUseExceptions();
5302 0 : if ( bLocalUseExceptions ) {
5303 0 : pushErrorHandler();
5304 : }
5305 0 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5306 0 : if ( bLocalUseExceptions ) {
5307 0 : popErrorHandler();
5308 : }
5309 : #ifndef SED_HACKS
5310 : if ( bLocalUseExceptions ) {
5311 : CPLErr eclass = CPLGetLastErrorType();
5312 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5313 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5314 : }
5315 : }
5316 : #endif
5317 : }
5318 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5319 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5320 : return resultobj;
5321 : fail:
5322 : return NULL;
5323 : }
5324 :
5325 :
5326 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5327 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5328 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5329 0 : void *argp1 = 0 ;
5330 0 : int res1 = 0 ;
5331 0 : PyObject *swig_obj[1] ;
5332 0 : double result;
5333 :
5334 0 : if (!args) SWIG_fail;
5335 0 : swig_obj[0] = args;
5336 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5337 0 : if (!SWIG_IsOK(res1)) {
5338 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5339 : }
5340 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5341 0 : {
5342 0 : if (!arg1) {
5343 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5344 : }
5345 : }
5346 0 : {
5347 0 : const int bLocalUseExceptions = GetUseExceptions();
5348 0 : if ( bLocalUseExceptions ) {
5349 0 : pushErrorHandler();
5350 : }
5351 0 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5352 0 : if ( bLocalUseExceptions ) {
5353 0 : popErrorHandler();
5354 : }
5355 : #ifndef SED_HACKS
5356 : if ( bLocalUseExceptions ) {
5357 : CPLErr eclass = CPLGetLastErrorType();
5358 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5359 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5360 : }
5361 : }
5362 : #endif
5363 : }
5364 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5365 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5366 : return resultobj;
5367 : fail:
5368 : return NULL;
5369 : }
5370 :
5371 :
5372 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5373 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5374 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5375 0 : void *argp1 = 0 ;
5376 0 : int res1 = 0 ;
5377 0 : PyObject *swig_obj[1] ;
5378 0 : double result;
5379 :
5380 0 : if (!args) SWIG_fail;
5381 0 : swig_obj[0] = args;
5382 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5383 0 : if (!SWIG_IsOK(res1)) {
5384 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5385 : }
5386 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5387 0 : {
5388 0 : if (!arg1) {
5389 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5390 : }
5391 : }
5392 0 : {
5393 0 : const int bLocalUseExceptions = GetUseExceptions();
5394 0 : if ( bLocalUseExceptions ) {
5395 0 : pushErrorHandler();
5396 : }
5397 0 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5398 0 : if ( bLocalUseExceptions ) {
5399 0 : popErrorHandler();
5400 : }
5401 : #ifndef SED_HACKS
5402 : if ( bLocalUseExceptions ) {
5403 : CPLErr eclass = CPLGetLastErrorType();
5404 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5405 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5406 : }
5407 : }
5408 : #endif
5409 : }
5410 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5411 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5412 : return resultobj;
5413 : fail:
5414 : return NULL;
5415 : }
5416 :
5417 :
5418 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5419 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5420 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5421 0 : void *argp1 = 0 ;
5422 0 : int res1 = 0 ;
5423 0 : PyObject *swig_obj[1] ;
5424 0 : double result;
5425 :
5426 0 : if (!args) SWIG_fail;
5427 0 : swig_obj[0] = args;
5428 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5429 0 : if (!SWIG_IsOK(res1)) {
5430 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5431 : }
5432 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5433 0 : {
5434 0 : if (!arg1) {
5435 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5436 : }
5437 : }
5438 0 : {
5439 0 : const int bLocalUseExceptions = GetUseExceptions();
5440 0 : if ( bLocalUseExceptions ) {
5441 0 : pushErrorHandler();
5442 : }
5443 0 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5444 0 : if ( bLocalUseExceptions ) {
5445 0 : popErrorHandler();
5446 : }
5447 : #ifndef SED_HACKS
5448 : if ( bLocalUseExceptions ) {
5449 : CPLErr eclass = CPLGetLastErrorType();
5450 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5451 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5452 : }
5453 : }
5454 : #endif
5455 : }
5456 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5457 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5458 : return resultobj;
5459 : fail:
5460 : return NULL;
5461 : }
5462 :
5463 :
5464 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5465 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5466 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5467 0 : void *argp1 = 0 ;
5468 0 : int res1 = 0 ;
5469 0 : PyObject *swig_obj[1] ;
5470 0 : char *result = 0 ;
5471 :
5472 0 : if (!args) SWIG_fail;
5473 0 : swig_obj[0] = args;
5474 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5475 0 : if (!SWIG_IsOK(res1)) {
5476 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5477 : }
5478 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5479 0 : {
5480 0 : if (!arg1) {
5481 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5482 : }
5483 : }
5484 0 : {
5485 0 : const int bLocalUseExceptions = GetUseExceptions();
5486 0 : if ( bLocalUseExceptions ) {
5487 0 : pushErrorHandler();
5488 : }
5489 0 : result = (char *)OSRAreaOfUse_name_get(arg1);
5490 0 : if ( bLocalUseExceptions ) {
5491 0 : popErrorHandler();
5492 : }
5493 : #ifndef SED_HACKS
5494 : if ( bLocalUseExceptions ) {
5495 : CPLErr eclass = CPLGetLastErrorType();
5496 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5497 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5498 : }
5499 : }
5500 : #endif
5501 : }
5502 0 : resultobj = SWIG_FromCharPtr((const char *)result);
5503 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5504 : return resultobj;
5505 : fail:
5506 : return NULL;
5507 : }
5508 :
5509 :
5510 2216 : SWIGINTERN PyObject *_wrap_new_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5511 2216 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5512 2216 : char *arg1 = (char *) "" ;
5513 2216 : int res1 ;
5514 2216 : char *buf1 = 0 ;
5515 2216 : int alloc1 = 0 ;
5516 2216 : PyObject * obj0 = 0 ;
5517 2216 : char * kwnames[] = {
5518 : (char *)"wkt", NULL
5519 : };
5520 2216 : OSRSpatialReferenceShadow *result = 0 ;
5521 :
5522 2216 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_SpatialReference", kwnames, &obj0)) SWIG_fail;
5523 2216 : if (obj0) {
5524 192 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5525 192 : if (!SWIG_IsOK(res1)) {
5526 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'");
5527 : }
5528 192 : arg1 = reinterpret_cast< char * >(buf1);
5529 : }
5530 2216 : {
5531 2216 : const int bLocalUseExceptions = GetUseExceptions();
5532 2216 : if ( bLocalUseExceptions ) {
5533 2216 : pushErrorHandler();
5534 : }
5535 2216 : result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
5536 2216 : if ( bLocalUseExceptions ) {
5537 2216 : popErrorHandler();
5538 : }
5539 : #ifndef SED_HACKS
5540 : if ( bLocalUseExceptions ) {
5541 : CPLErr eclass = CPLGetLastErrorType();
5542 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5543 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5544 : }
5545 : }
5546 : #endif
5547 : }
5548 2216 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_NEW | 0 );
5549 2216 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5550 2217 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5551 : return resultobj;
5552 0 : fail:
5553 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5554 : return NULL;
5555 : }
5556 :
5557 :
5558 3754 : SWIGINTERN PyObject *_wrap_delete_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5559 3754 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5560 3754 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5561 3754 : void *argp1 = 0 ;
5562 3754 : int res1 = 0 ;
5563 3754 : PyObject *swig_obj[1] ;
5564 :
5565 3754 : if (!args) SWIG_fail;
5566 3754 : swig_obj[0] = args;
5567 3754 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_DISOWN | 0 );
5568 3754 : if (!SWIG_IsOK(res1)) {
5569 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialReference" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5570 : }
5571 3754 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5572 3754 : {
5573 3754 : const int bLocalUseExceptions = GetUseExceptions();
5574 3754 : if ( bLocalUseExceptions ) {
5575 2304 : pushErrorHandler();
5576 : }
5577 3754 : delete_OSRSpatialReferenceShadow(arg1);
5578 3754 : if ( bLocalUseExceptions ) {
5579 2304 : popErrorHandler();
5580 : }
5581 : #ifndef SED_HACKS
5582 : if ( bLocalUseExceptions ) {
5583 : CPLErr eclass = CPLGetLastErrorType();
5584 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5585 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5586 : }
5587 : }
5588 : #endif
5589 : }
5590 3754 : resultobj = SWIG_Py_Void();
5591 3754 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5592 : return resultobj;
5593 : fail:
5594 : return NULL;
5595 : }
5596 :
5597 :
5598 4 : SWIGINTERN PyObject *_wrap_SpatialReference___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5599 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5600 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5601 4 : void *argp1 = 0 ;
5602 4 : int res1 = 0 ;
5603 4 : PyObject *swig_obj[1] ;
5604 4 : retStringAndCPLFree *result = 0 ;
5605 :
5606 4 : if (!args) SWIG_fail;
5607 4 : swig_obj[0] = args;
5608 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5609 4 : if (!SWIG_IsOK(res1)) {
5610 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference___str__" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5611 : }
5612 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5613 4 : {
5614 4 : const int bLocalUseExceptions = GetUseExceptions();
5615 4 : if ( bLocalUseExceptions ) {
5616 3 : pushErrorHandler();
5617 : }
5618 4 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
5619 4 : if ( bLocalUseExceptions ) {
5620 3 : popErrorHandler();
5621 : }
5622 : #ifndef SED_HACKS
5623 : if ( bLocalUseExceptions ) {
5624 : CPLErr eclass = CPLGetLastErrorType();
5625 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5626 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5627 : }
5628 : }
5629 : #endif
5630 : }
5631 4 : {
5632 : /* %typemap(out) (retStringAndCPLFree*) */
5633 4 : Py_XDECREF(resultobj);
5634 4 : if(result)
5635 : {
5636 4 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
5637 4 : CPLFree(result);
5638 : }
5639 : else
5640 : {
5641 0 : resultobj = Py_None;
5642 0 : Py_INCREF(resultobj);
5643 : }
5644 : }
5645 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5646 : return resultobj;
5647 : fail:
5648 : return NULL;
5649 : }
5650 :
5651 :
5652 38 : SWIGINTERN PyObject *_wrap_SpatialReference_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5653 38 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5654 38 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5655 38 : void *argp1 = 0 ;
5656 38 : int res1 = 0 ;
5657 38 : PyObject *swig_obj[1] ;
5658 38 : char *result = 0 ;
5659 :
5660 38 : if (!args) SWIG_fail;
5661 38 : swig_obj[0] = args;
5662 38 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5663 38 : if (!SWIG_IsOK(res1)) {
5664 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5665 : }
5666 38 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5667 38 : {
5668 38 : const int bLocalUseExceptions = GetUseExceptions();
5669 38 : if ( bLocalUseExceptions ) {
5670 27 : pushErrorHandler();
5671 : }
5672 38 : result = (char *)OSRSpatialReferenceShadow_GetName(arg1);
5673 38 : if ( bLocalUseExceptions ) {
5674 27 : popErrorHandler();
5675 : }
5676 : #ifndef SED_HACKS
5677 : if ( bLocalUseExceptions ) {
5678 : CPLErr eclass = CPLGetLastErrorType();
5679 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5680 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5681 : }
5682 : }
5683 : #endif
5684 : }
5685 38 : resultobj = SWIG_FromCharPtr((const char *)result);
5686 38 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5687 : return resultobj;
5688 : fail:
5689 : return NULL;
5690 : }
5691 :
5692 :
5693 592 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5694 592 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5695 592 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5696 592 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5697 592 : char **arg3 = (char **) NULL ;
5698 592 : void *argp1 = 0 ;
5699 592 : int res1 = 0 ;
5700 592 : void *argp2 = 0 ;
5701 592 : int res2 = 0 ;
5702 592 : PyObject * obj0 = 0 ;
5703 592 : PyObject * obj1 = 0 ;
5704 592 : PyObject * obj2 = 0 ;
5705 592 : char * kwnames[] = {
5706 : (char *)"self", (char *)"rhs", (char *)"options", NULL
5707 : };
5708 592 : int result;
5709 :
5710 592 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_IsSame", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
5711 592 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5712 592 : if (!SWIG_IsOK(res1)) {
5713 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSame" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5714 : }
5715 592 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5716 592 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5717 592 : if (!SWIG_IsOK(res2)) {
5718 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSame" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5719 : }
5720 592 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5721 592 : if (obj2) {
5722 82 : {
5723 : /* %typemap(in) char **dict */
5724 82 : arg3 = NULL;
5725 82 : if ( PySequence_Check( obj2 ) ) {
5726 82 : int bErr = FALSE;
5727 82 : arg3 = CSLFromPySequence(obj2, &bErr);
5728 82 : if ( bErr )
5729 : {
5730 0 : SWIG_fail;
5731 : }
5732 : }
5733 0 : else if ( PyMapping_Check( obj2 ) ) {
5734 0 : int bErr = FALSE;
5735 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
5736 0 : if ( bErr )
5737 : {
5738 0 : SWIG_fail;
5739 : }
5740 : }
5741 : else {
5742 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
5743 0 : SWIG_fail;
5744 : }
5745 : }
5746 : }
5747 592 : {
5748 592 : if (!arg2) {
5749 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5750 : }
5751 : }
5752 592 : {
5753 592 : const int bLocalUseExceptions = GetUseExceptions();
5754 592 : if ( bLocalUseExceptions ) {
5755 320 : pushErrorHandler();
5756 : }
5757 592 : result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2,arg3);
5758 592 : if ( bLocalUseExceptions ) {
5759 320 : popErrorHandler();
5760 : }
5761 : #ifndef SED_HACKS
5762 : if ( bLocalUseExceptions ) {
5763 : CPLErr eclass = CPLGetLastErrorType();
5764 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5765 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5766 : }
5767 : }
5768 : #endif
5769 : }
5770 592 : resultobj = SWIG_From_int(static_cast< int >(result));
5771 592 : {
5772 : /* %typemap(freearg) char **dict */
5773 592 : CSLDestroy( arg3 );
5774 : }
5775 592 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5776 : return resultobj;
5777 0 : fail:
5778 0 : {
5779 : /* %typemap(freearg) char **dict */
5780 0 : CSLDestroy( arg3 );
5781 : }
5782 : return NULL;
5783 : }
5784 :
5785 :
5786 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5787 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5788 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5789 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5790 0 : void *argp1 = 0 ;
5791 0 : int res1 = 0 ;
5792 0 : void *argp2 = 0 ;
5793 0 : int res2 = 0 ;
5794 0 : PyObject *swig_obj[2] ;
5795 0 : int result;
5796 :
5797 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameGeogCS", 2, 2, swig_obj)) SWIG_fail;
5798 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5799 0 : if (!SWIG_IsOK(res1)) {
5800 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5801 : }
5802 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5803 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5804 0 : if (!SWIG_IsOK(res2)) {
5805 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5806 : }
5807 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5808 0 : {
5809 0 : if (!arg2) {
5810 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5811 : }
5812 : }
5813 0 : {
5814 0 : const int bLocalUseExceptions = GetUseExceptions();
5815 0 : if ( bLocalUseExceptions ) {
5816 0 : pushErrorHandler();
5817 : }
5818 0 : result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
5819 0 : if ( bLocalUseExceptions ) {
5820 0 : popErrorHandler();
5821 : }
5822 : #ifndef SED_HACKS
5823 : if ( bLocalUseExceptions ) {
5824 : CPLErr eclass = CPLGetLastErrorType();
5825 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5826 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5827 : }
5828 : }
5829 : #endif
5830 : }
5831 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5832 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5833 : return resultobj;
5834 : fail:
5835 : return NULL;
5836 : }
5837 :
5838 :
5839 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5840 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5841 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5842 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5843 0 : void *argp1 = 0 ;
5844 0 : int res1 = 0 ;
5845 0 : void *argp2 = 0 ;
5846 0 : int res2 = 0 ;
5847 0 : PyObject *swig_obj[2] ;
5848 0 : int result;
5849 :
5850 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameVertCS", 2, 2, swig_obj)) SWIG_fail;
5851 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5852 0 : if (!SWIG_IsOK(res1)) {
5853 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5854 : }
5855 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5856 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5857 0 : if (!SWIG_IsOK(res2)) {
5858 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5859 : }
5860 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5861 0 : {
5862 0 : if (!arg2) {
5863 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5864 : }
5865 : }
5866 0 : {
5867 0 : const int bLocalUseExceptions = GetUseExceptions();
5868 0 : if ( bLocalUseExceptions ) {
5869 0 : pushErrorHandler();
5870 : }
5871 0 : result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
5872 0 : if ( bLocalUseExceptions ) {
5873 0 : popErrorHandler();
5874 : }
5875 : #ifndef SED_HACKS
5876 : if ( bLocalUseExceptions ) {
5877 : CPLErr eclass = CPLGetLastErrorType();
5878 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5879 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5880 : }
5881 : }
5882 : #endif
5883 : }
5884 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5885 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5886 : return resultobj;
5887 : fail:
5888 : return NULL;
5889 : }
5890 :
5891 :
5892 42 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5893 42 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5894 42 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5895 42 : void *argp1 = 0 ;
5896 42 : int res1 = 0 ;
5897 42 : PyObject *swig_obj[1] ;
5898 42 : int result;
5899 :
5900 42 : if (!args) SWIG_fail;
5901 42 : swig_obj[0] = args;
5902 42 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5903 42 : if (!SWIG_IsOK(res1)) {
5904 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5905 : }
5906 42 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5907 42 : {
5908 42 : const int bLocalUseExceptions = GetUseExceptions();
5909 42 : if ( bLocalUseExceptions ) {
5910 38 : pushErrorHandler();
5911 : }
5912 42 : result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
5913 42 : if ( bLocalUseExceptions ) {
5914 38 : popErrorHandler();
5915 : }
5916 : #ifndef SED_HACKS
5917 : if ( bLocalUseExceptions ) {
5918 : CPLErr eclass = CPLGetLastErrorType();
5919 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5920 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5921 : }
5922 : }
5923 : #endif
5924 : }
5925 42 : resultobj = SWIG_From_int(static_cast< int >(result));
5926 42 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5927 : return resultobj;
5928 : fail:
5929 : return NULL;
5930 : }
5931 :
5932 :
5933 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5934 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5935 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5936 1 : void *argp1 = 0 ;
5937 1 : int res1 = 0 ;
5938 1 : PyObject *swig_obj[1] ;
5939 1 : int result;
5940 :
5941 1 : if (!args) SWIG_fail;
5942 1 : swig_obj[0] = args;
5943 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5944 1 : if (!SWIG_IsOK(res1)) {
5945 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5946 : }
5947 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5948 1 : {
5949 1 : const int bLocalUseExceptions = GetUseExceptions();
5950 1 : if ( bLocalUseExceptions ) {
5951 0 : pushErrorHandler();
5952 : }
5953 1 : result = (int)OSRSpatialReferenceShadow_IsDerivedGeographic(arg1);
5954 1 : if ( bLocalUseExceptions ) {
5955 0 : popErrorHandler();
5956 : }
5957 : #ifndef SED_HACKS
5958 : if ( bLocalUseExceptions ) {
5959 : CPLErr eclass = CPLGetLastErrorType();
5960 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5961 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5962 : }
5963 : }
5964 : #endif
5965 : }
5966 1 : resultobj = SWIG_From_int(static_cast< int >(result));
5967 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
5968 : return resultobj;
5969 : fail:
5970 : return NULL;
5971 : }
5972 :
5973 :
5974 185 : SWIGINTERN PyObject *_wrap_SpatialReference_IsProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5975 185 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5976 185 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5977 185 : void *argp1 = 0 ;
5978 185 : int res1 = 0 ;
5979 185 : PyObject *swig_obj[1] ;
5980 185 : int result;
5981 :
5982 185 : if (!args) SWIG_fail;
5983 185 : swig_obj[0] = args;
5984 185 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5985 185 : if (!SWIG_IsOK(res1)) {
5986 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5987 : }
5988 185 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5989 185 : {
5990 185 : const int bLocalUseExceptions = GetUseExceptions();
5991 185 : if ( bLocalUseExceptions ) {
5992 183 : pushErrorHandler();
5993 : }
5994 185 : result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
5995 185 : if ( bLocalUseExceptions ) {
5996 183 : popErrorHandler();
5997 : }
5998 : #ifndef SED_HACKS
5999 : if ( bLocalUseExceptions ) {
6000 : CPLErr eclass = CPLGetLastErrorType();
6001 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6002 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6003 : }
6004 : }
6005 : #endif
6006 : }
6007 185 : resultobj = SWIG_From_int(static_cast< int >(result));
6008 185 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6009 : return resultobj;
6010 : fail:
6011 : return NULL;
6012 : }
6013 :
6014 :
6015 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6016 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6017 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6018 0 : void *argp1 = 0 ;
6019 0 : int res1 = 0 ;
6020 0 : PyObject *swig_obj[1] ;
6021 0 : int result;
6022 :
6023 0 : if (!args) SWIG_fail;
6024 0 : swig_obj[0] = args;
6025 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6026 0 : if (!SWIG_IsOK(res1)) {
6027 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6028 : }
6029 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6030 0 : {
6031 0 : const int bLocalUseExceptions = GetUseExceptions();
6032 0 : if ( bLocalUseExceptions ) {
6033 0 : pushErrorHandler();
6034 : }
6035 0 : result = (int)OSRSpatialReferenceShadow_IsDerivedProjected(arg1);
6036 0 : if ( bLocalUseExceptions ) {
6037 0 : popErrorHandler();
6038 : }
6039 : #ifndef SED_HACKS
6040 : if ( bLocalUseExceptions ) {
6041 : CPLErr eclass = CPLGetLastErrorType();
6042 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6043 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6044 : }
6045 : }
6046 : #endif
6047 : }
6048 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6049 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6050 : return resultobj;
6051 : fail:
6052 : return NULL;
6053 : }
6054 :
6055 :
6056 5 : SWIGINTERN PyObject *_wrap_SpatialReference_IsCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6057 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6058 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6059 5 : void *argp1 = 0 ;
6060 5 : int res1 = 0 ;
6061 5 : PyObject *swig_obj[1] ;
6062 5 : int result;
6063 :
6064 5 : if (!args) SWIG_fail;
6065 5 : swig_obj[0] = args;
6066 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6067 5 : if (!SWIG_IsOK(res1)) {
6068 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6069 : }
6070 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6071 5 : {
6072 5 : const int bLocalUseExceptions = GetUseExceptions();
6073 5 : if ( bLocalUseExceptions ) {
6074 3 : pushErrorHandler();
6075 : }
6076 5 : result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
6077 5 : if ( bLocalUseExceptions ) {
6078 3 : popErrorHandler();
6079 : }
6080 : #ifndef SED_HACKS
6081 : if ( bLocalUseExceptions ) {
6082 : CPLErr eclass = CPLGetLastErrorType();
6083 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6084 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6085 : }
6086 : }
6087 : #endif
6088 : }
6089 5 : resultobj = SWIG_From_int(static_cast< int >(result));
6090 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6091 : return resultobj;
6092 : fail:
6093 : return NULL;
6094 : }
6095 :
6096 :
6097 2 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeocentric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6098 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6099 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6100 2 : void *argp1 = 0 ;
6101 2 : int res1 = 0 ;
6102 2 : PyObject *swig_obj[1] ;
6103 2 : int result;
6104 :
6105 2 : if (!args) SWIG_fail;
6106 2 : swig_obj[0] = args;
6107 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6108 2 : if (!SWIG_IsOK(res1)) {
6109 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6110 : }
6111 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6112 2 : {
6113 2 : const int bLocalUseExceptions = GetUseExceptions();
6114 2 : if ( bLocalUseExceptions ) {
6115 2 : pushErrorHandler();
6116 : }
6117 2 : result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
6118 2 : if ( bLocalUseExceptions ) {
6119 2 : popErrorHandler();
6120 : }
6121 : #ifndef SED_HACKS
6122 : if ( bLocalUseExceptions ) {
6123 : CPLErr eclass = CPLGetLastErrorType();
6124 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6125 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6126 : }
6127 : }
6128 : #endif
6129 : }
6130 2 : resultobj = SWIG_From_int(static_cast< int >(result));
6131 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6132 : return resultobj;
6133 : fail:
6134 : return NULL;
6135 : }
6136 :
6137 :
6138 4 : SWIGINTERN PyObject *_wrap_SpatialReference_IsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6139 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6140 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6141 4 : void *argp1 = 0 ;
6142 4 : int res1 = 0 ;
6143 4 : PyObject *swig_obj[1] ;
6144 4 : int result;
6145 :
6146 4 : if (!args) SWIG_fail;
6147 4 : swig_obj[0] = args;
6148 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6149 4 : if (!SWIG_IsOK(res1)) {
6150 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsLocal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6151 : }
6152 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6153 4 : {
6154 4 : const int bLocalUseExceptions = GetUseExceptions();
6155 4 : if ( bLocalUseExceptions ) {
6156 1 : pushErrorHandler();
6157 : }
6158 4 : result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
6159 4 : if ( bLocalUseExceptions ) {
6160 1 : popErrorHandler();
6161 : }
6162 : #ifndef SED_HACKS
6163 : if ( bLocalUseExceptions ) {
6164 : CPLErr eclass = CPLGetLastErrorType();
6165 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6166 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6167 : }
6168 : }
6169 : #endif
6170 : }
6171 4 : resultobj = SWIG_From_int(static_cast< int >(result));
6172 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6173 : return resultobj;
6174 : fail:
6175 : return NULL;
6176 : }
6177 :
6178 :
6179 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6180 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6181 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6182 0 : void *argp1 = 0 ;
6183 0 : int res1 = 0 ;
6184 0 : PyObject *swig_obj[1] ;
6185 0 : int result;
6186 :
6187 0 : if (!args) SWIG_fail;
6188 0 : swig_obj[0] = args;
6189 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6190 0 : if (!SWIG_IsOK(res1)) {
6191 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6192 : }
6193 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6194 0 : {
6195 0 : const int bLocalUseExceptions = GetUseExceptions();
6196 0 : if ( bLocalUseExceptions ) {
6197 0 : pushErrorHandler();
6198 : }
6199 0 : result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
6200 0 : if ( bLocalUseExceptions ) {
6201 0 : popErrorHandler();
6202 : }
6203 : #ifndef SED_HACKS
6204 : if ( bLocalUseExceptions ) {
6205 : CPLErr eclass = CPLGetLastErrorType();
6206 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6207 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6208 : }
6209 : }
6210 : #endif
6211 : }
6212 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6213 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6214 : return resultobj;
6215 : fail:
6216 : return NULL;
6217 : }
6218 :
6219 :
6220 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDynamic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6221 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6222 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6223 0 : void *argp1 = 0 ;
6224 0 : int res1 = 0 ;
6225 0 : PyObject *swig_obj[1] ;
6226 0 : bool result;
6227 :
6228 0 : if (!args) SWIG_fail;
6229 0 : swig_obj[0] = args;
6230 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6231 0 : if (!SWIG_IsOK(res1)) {
6232 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDynamic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6233 : }
6234 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6235 0 : {
6236 0 : const int bLocalUseExceptions = GetUseExceptions();
6237 0 : if ( bLocalUseExceptions ) {
6238 0 : pushErrorHandler();
6239 : }
6240 0 : result = (bool)OSRSpatialReferenceShadow_IsDynamic(arg1);
6241 0 : if ( bLocalUseExceptions ) {
6242 0 : popErrorHandler();
6243 : }
6244 : #ifndef SED_HACKS
6245 : if ( bLocalUseExceptions ) {
6246 : CPLErr eclass = CPLGetLastErrorType();
6247 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6248 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6249 : }
6250 : }
6251 : #endif
6252 : }
6253 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6254 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6255 : return resultobj;
6256 : fail:
6257 : return NULL;
6258 : }
6259 :
6260 :
6261 0 : SWIGINTERN PyObject *_wrap_SpatialReference_HasPointMotionOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6262 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6263 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6264 0 : void *argp1 = 0 ;
6265 0 : int res1 = 0 ;
6266 0 : PyObject *swig_obj[1] ;
6267 0 : bool result;
6268 :
6269 0 : if (!args) SWIG_fail;
6270 0 : swig_obj[0] = args;
6271 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6272 0 : if (!SWIG_IsOK(res1)) {
6273 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasPointMotionOperation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6274 : }
6275 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6276 0 : {
6277 0 : const int bLocalUseExceptions = GetUseExceptions();
6278 0 : if ( bLocalUseExceptions ) {
6279 0 : pushErrorHandler();
6280 : }
6281 0 : result = (bool)OSRSpatialReferenceShadow_HasPointMotionOperation(arg1);
6282 0 : if ( bLocalUseExceptions ) {
6283 0 : popErrorHandler();
6284 : }
6285 : #ifndef SED_HACKS
6286 : if ( bLocalUseExceptions ) {
6287 : CPLErr eclass = CPLGetLastErrorType();
6288 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6289 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6290 : }
6291 : }
6292 : #endif
6293 : }
6294 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6295 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6296 : return resultobj;
6297 : fail:
6298 : return NULL;
6299 : }
6300 :
6301 :
6302 29 : SWIGINTERN PyObject *_wrap_SpatialReference_GetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6303 29 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6304 29 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6305 29 : void *argp1 = 0 ;
6306 29 : int res1 = 0 ;
6307 29 : PyObject *swig_obj[1] ;
6308 29 : double result;
6309 :
6310 29 : if (!args) SWIG_fail;
6311 29 : swig_obj[0] = args;
6312 29 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6313 29 : if (!SWIG_IsOK(res1)) {
6314 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6315 : }
6316 29 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6317 29 : {
6318 29 : const int bLocalUseExceptions = GetUseExceptions();
6319 29 : if ( bLocalUseExceptions ) {
6320 13 : pushErrorHandler();
6321 : }
6322 29 : result = (double)OSRSpatialReferenceShadow_GetCoordinateEpoch(arg1);
6323 29 : if ( bLocalUseExceptions ) {
6324 13 : popErrorHandler();
6325 : }
6326 : #ifndef SED_HACKS
6327 : if ( bLocalUseExceptions ) {
6328 : CPLErr eclass = CPLGetLastErrorType();
6329 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6330 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6331 : }
6332 : }
6333 : #endif
6334 : }
6335 29 : resultobj = SWIG_From_double(static_cast< double >(result));
6336 29 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6337 : return resultobj;
6338 : fail:
6339 : return NULL;
6340 : }
6341 :
6342 :
6343 29 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6344 29 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6345 29 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6346 29 : double arg2 ;
6347 29 : void *argp1 = 0 ;
6348 29 : int res1 = 0 ;
6349 29 : double val2 ;
6350 29 : int ecode2 = 0 ;
6351 29 : PyObject *swig_obj[2] ;
6352 :
6353 29 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCoordinateEpoch", 2, 2, swig_obj)) SWIG_fail;
6354 29 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6355 29 : if (!SWIG_IsOK(res1)) {
6356 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6357 : }
6358 29 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6359 29 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6360 29 : if (!SWIG_IsOK(ecode2)) {
6361 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "2"" of type '" "double""'");
6362 : }
6363 29 : arg2 = static_cast< double >(val2);
6364 29 : {
6365 29 : const int bLocalUseExceptions = GetUseExceptions();
6366 29 : if ( bLocalUseExceptions ) {
6367 13 : pushErrorHandler();
6368 : }
6369 29 : OSRSpatialReferenceShadow_SetCoordinateEpoch(arg1,arg2);
6370 29 : if ( bLocalUseExceptions ) {
6371 13 : popErrorHandler();
6372 : }
6373 : #ifndef SED_HACKS
6374 : if ( bLocalUseExceptions ) {
6375 : CPLErr eclass = CPLGetLastErrorType();
6376 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6377 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6378 : }
6379 : }
6380 : #endif
6381 : }
6382 29 : resultobj = SWIG_Py_Void();
6383 29 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6384 : return resultobj;
6385 : fail:
6386 : return NULL;
6387 : }
6388 :
6389 :
6390 155 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsLatLong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6391 155 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6392 155 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6393 155 : void *argp1 = 0 ;
6394 155 : int res1 = 0 ;
6395 155 : PyObject *swig_obj[1] ;
6396 155 : int result;
6397 :
6398 155 : if (!args) SWIG_fail;
6399 155 : swig_obj[0] = args;
6400 155 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6401 155 : if (!SWIG_IsOK(res1)) {
6402 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsLatLong" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6403 : }
6404 155 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6405 155 : {
6406 155 : const int bLocalUseExceptions = GetUseExceptions();
6407 155 : if ( bLocalUseExceptions ) {
6408 155 : pushErrorHandler();
6409 : }
6410 155 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
6411 155 : if ( bLocalUseExceptions ) {
6412 155 : popErrorHandler();
6413 : }
6414 : #ifndef SED_HACKS
6415 : if ( bLocalUseExceptions ) {
6416 : CPLErr eclass = CPLGetLastErrorType();
6417 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6418 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6419 : }
6420 : }
6421 : #endif
6422 : }
6423 155 : resultobj = SWIG_From_int(static_cast< int >(result));
6424 155 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6425 : return resultobj;
6426 : fail:
6427 : return NULL;
6428 : }
6429 :
6430 :
6431 160 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsNorthingEasting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6432 160 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6433 160 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6434 160 : void *argp1 = 0 ;
6435 160 : int res1 = 0 ;
6436 160 : PyObject *swig_obj[1] ;
6437 160 : int result;
6438 :
6439 160 : if (!args) SWIG_fail;
6440 160 : swig_obj[0] = args;
6441 160 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6442 160 : if (!SWIG_IsOK(res1)) {
6443 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsNorthingEasting" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6444 : }
6445 160 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6446 160 : {
6447 160 : const int bLocalUseExceptions = GetUseExceptions();
6448 160 : if ( bLocalUseExceptions ) {
6449 160 : pushErrorHandler();
6450 : }
6451 160 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(arg1);
6452 160 : if ( bLocalUseExceptions ) {
6453 160 : popErrorHandler();
6454 : }
6455 : #ifndef SED_HACKS
6456 : if ( bLocalUseExceptions ) {
6457 : CPLErr eclass = CPLGetLastErrorType();
6458 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6459 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6460 : }
6461 : }
6462 : #endif
6463 : }
6464 160 : resultobj = SWIG_From_int(static_cast< int >(result));
6465 160 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6466 : return resultobj;
6467 : fail:
6468 : return NULL;
6469 : }
6470 :
6471 :
6472 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAuthority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6473 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6474 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6475 0 : char *arg2 = (char *) 0 ;
6476 0 : char *arg3 = (char *) 0 ;
6477 0 : int arg4 ;
6478 0 : void *argp1 = 0 ;
6479 0 : int res1 = 0 ;
6480 0 : int res2 ;
6481 0 : char *buf2 = 0 ;
6482 0 : int alloc2 = 0 ;
6483 0 : int res3 ;
6484 0 : char *buf3 = 0 ;
6485 0 : int alloc3 = 0 ;
6486 0 : int val4 ;
6487 0 : int ecode4 = 0 ;
6488 0 : PyObject *swig_obj[4] ;
6489 0 : OGRErr result;
6490 :
6491 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAuthority", 4, 4, swig_obj)) SWIG_fail;
6492 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6493 0 : if (!SWIG_IsOK(res1)) {
6494 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAuthority" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6495 : }
6496 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6497 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6498 0 : if (!SWIG_IsOK(res2)) {
6499 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAuthority" "', argument " "2"" of type '" "char const *""'");
6500 : }
6501 0 : arg2 = reinterpret_cast< char * >(buf2);
6502 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6503 0 : if (!SWIG_IsOK(res3)) {
6504 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAuthority" "', argument " "3"" of type '" "char const *""'");
6505 : }
6506 0 : arg3 = reinterpret_cast< char * >(buf3);
6507 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
6508 0 : if (!SWIG_IsOK(ecode4)) {
6509 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAuthority" "', argument " "4"" of type '" "int""'");
6510 : }
6511 0 : arg4 = static_cast< int >(val4);
6512 0 : {
6513 0 : const int bLocalUseExceptions = GetUseExceptions();
6514 0 : if ( bLocalUseExceptions ) {
6515 0 : pushErrorHandler();
6516 : }
6517 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
6518 0 : if ( bLocalUseExceptions ) {
6519 0 : popErrorHandler();
6520 : }
6521 : #ifndef SED_HACKS
6522 : if ( bLocalUseExceptions ) {
6523 : CPLErr eclass = CPLGetLastErrorType();
6524 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6525 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6526 : }
6527 : }
6528 : #endif
6529 : }
6530 0 : {
6531 : /* %typemap(out) OGRErr */
6532 0 : if ( result != 0 && GetUseExceptions()) {
6533 0 : const char* pszMessage = CPLGetLastErrorMsg();
6534 0 : if( pszMessage[0] != '\0' )
6535 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6536 : else
6537 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6538 0 : SWIG_fail;
6539 : }
6540 : }
6541 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6542 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6543 0 : {
6544 : /* %typemap(ret) OGRErr */
6545 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6546 0 : resultobj = PyInt_FromLong( result );
6547 : }
6548 : }
6549 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6550 : return resultobj;
6551 0 : fail:
6552 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6553 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6554 : return NULL;
6555 : }
6556 :
6557 :
6558 34 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6559 34 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6560 34 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6561 34 : char *arg2 = (char *) 0 ;
6562 34 : int arg3 = (int) 0 ;
6563 34 : void *argp1 = 0 ;
6564 34 : int res1 = 0 ;
6565 34 : int res2 ;
6566 34 : char *buf2 = 0 ;
6567 34 : int alloc2 = 0 ;
6568 34 : int val3 ;
6569 34 : int ecode3 = 0 ;
6570 34 : PyObject *swig_obj[3] ;
6571 34 : char *result = 0 ;
6572 :
6573 34 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAttrValue", 2, 3, swig_obj)) SWIG_fail;
6574 34 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6575 34 : if (!SWIG_IsOK(res1)) {
6576 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6577 : }
6578 34 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6579 34 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6580 34 : if (!SWIG_IsOK(res2)) {
6581 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAttrValue" "', argument " "2"" of type '" "char const *""'");
6582 : }
6583 34 : arg2 = reinterpret_cast< char * >(buf2);
6584 34 : if (swig_obj[2]) {
6585 6 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
6586 6 : if (!SWIG_IsOK(ecode3)) {
6587 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAttrValue" "', argument " "3"" of type '" "int""'");
6588 : }
6589 : arg3 = static_cast< int >(val3);
6590 : }
6591 34 : {
6592 34 : if (!arg2) {
6593 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6594 : }
6595 : }
6596 34 : {
6597 34 : const int bLocalUseExceptions = GetUseExceptions();
6598 34 : if ( bLocalUseExceptions ) {
6599 21 : pushErrorHandler();
6600 : }
6601 34 : result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
6602 34 : if ( bLocalUseExceptions ) {
6603 21 : popErrorHandler();
6604 : }
6605 : #ifndef SED_HACKS
6606 : if ( bLocalUseExceptions ) {
6607 : CPLErr eclass = CPLGetLastErrorType();
6608 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6609 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6610 : }
6611 : }
6612 : #endif
6613 : }
6614 34 : resultobj = SWIG_FromCharPtr((const char *)result);
6615 34 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6616 34 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6617 : return resultobj;
6618 0 : fail:
6619 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6620 : return NULL;
6621 : }
6622 :
6623 :
6624 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6625 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6626 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6627 1 : char *arg2 = (char *) 0 ;
6628 1 : char *arg3 = (char *) 0 ;
6629 1 : void *argp1 = 0 ;
6630 1 : int res1 = 0 ;
6631 1 : int res2 ;
6632 1 : char *buf2 = 0 ;
6633 1 : int alloc2 = 0 ;
6634 1 : int res3 ;
6635 1 : char *buf3 = 0 ;
6636 1 : int alloc3 = 0 ;
6637 1 : PyObject *swig_obj[3] ;
6638 1 : OGRErr result;
6639 :
6640 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAttrValue", 3, 3, swig_obj)) SWIG_fail;
6641 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6642 1 : if (!SWIG_IsOK(res1)) {
6643 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6644 : }
6645 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6646 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6647 1 : if (!SWIG_IsOK(res2)) {
6648 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAttrValue" "', argument " "2"" of type '" "char const *""'");
6649 : }
6650 1 : arg2 = reinterpret_cast< char * >(buf2);
6651 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6652 1 : if (!SWIG_IsOK(res3)) {
6653 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAttrValue" "', argument " "3"" of type '" "char const *""'");
6654 : }
6655 1 : arg3 = reinterpret_cast< char * >(buf3);
6656 1 : {
6657 1 : if (!arg2) {
6658 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6659 : }
6660 : }
6661 1 : {
6662 1 : const int bLocalUseExceptions = GetUseExceptions();
6663 1 : if ( bLocalUseExceptions ) {
6664 1 : pushErrorHandler();
6665 : }
6666 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
6667 1 : if ( bLocalUseExceptions ) {
6668 1 : popErrorHandler();
6669 : }
6670 : #ifndef SED_HACKS
6671 : if ( bLocalUseExceptions ) {
6672 : CPLErr eclass = CPLGetLastErrorType();
6673 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6674 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6675 : }
6676 : }
6677 : #endif
6678 : }
6679 1 : {
6680 : /* %typemap(out) OGRErr */
6681 1 : if ( result != 0 && GetUseExceptions()) {
6682 0 : const char* pszMessage = CPLGetLastErrorMsg();
6683 0 : if( pszMessage[0] != '\0' )
6684 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6685 : else
6686 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6687 0 : SWIG_fail;
6688 : }
6689 : }
6690 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6691 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6692 1 : {
6693 : /* %typemap(ret) OGRErr */
6694 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6695 1 : resultobj = PyInt_FromLong( result );
6696 : }
6697 : }
6698 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6699 : return resultobj;
6700 0 : fail:
6701 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6702 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6703 : return NULL;
6704 : }
6705 :
6706 :
6707 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6708 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6709 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6710 0 : char *arg2 = (char *) 0 ;
6711 0 : double arg3 ;
6712 0 : void *argp1 = 0 ;
6713 0 : int res1 = 0 ;
6714 0 : int res2 ;
6715 0 : char *buf2 = 0 ;
6716 0 : int alloc2 = 0 ;
6717 0 : double val3 ;
6718 0 : int ecode3 = 0 ;
6719 0 : PyObject *swig_obj[3] ;
6720 0 : OGRErr result;
6721 :
6722 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAngularUnits", 3, 3, swig_obj)) SWIG_fail;
6723 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6724 0 : if (!SWIG_IsOK(res1)) {
6725 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6726 : }
6727 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6728 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6729 0 : if (!SWIG_IsOK(res2)) {
6730 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAngularUnits" "', argument " "2"" of type '" "char const *""'");
6731 : }
6732 0 : arg2 = reinterpret_cast< char * >(buf2);
6733 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6734 0 : if (!SWIG_IsOK(ecode3)) {
6735 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAngularUnits" "', argument " "3"" of type '" "double""'");
6736 : }
6737 0 : arg3 = static_cast< double >(val3);
6738 0 : {
6739 0 : if (!arg2) {
6740 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6741 : }
6742 : }
6743 0 : {
6744 0 : const int bLocalUseExceptions = GetUseExceptions();
6745 0 : if ( bLocalUseExceptions ) {
6746 0 : pushErrorHandler();
6747 : }
6748 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
6749 0 : if ( bLocalUseExceptions ) {
6750 0 : popErrorHandler();
6751 : }
6752 : #ifndef SED_HACKS
6753 : if ( bLocalUseExceptions ) {
6754 : CPLErr eclass = CPLGetLastErrorType();
6755 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6756 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6757 : }
6758 : }
6759 : #endif
6760 : }
6761 0 : {
6762 : /* %typemap(out) OGRErr */
6763 0 : if ( result != 0 && GetUseExceptions()) {
6764 0 : const char* pszMessage = CPLGetLastErrorMsg();
6765 0 : if( pszMessage[0] != '\0' )
6766 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6767 : else
6768 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6769 0 : SWIG_fail;
6770 : }
6771 : }
6772 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6773 0 : {
6774 : /* %typemap(ret) OGRErr */
6775 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6776 0 : resultobj = PyInt_FromLong( result );
6777 : }
6778 : }
6779 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6780 : return resultobj;
6781 0 : fail:
6782 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6783 : return NULL;
6784 : }
6785 :
6786 :
6787 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6788 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6789 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6790 0 : void *argp1 = 0 ;
6791 0 : int res1 = 0 ;
6792 0 : PyObject *swig_obj[1] ;
6793 0 : double result;
6794 :
6795 0 : if (!args) SWIG_fail;
6796 0 : swig_obj[0] = args;
6797 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6798 0 : if (!SWIG_IsOK(res1)) {
6799 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6800 : }
6801 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6802 0 : {
6803 0 : const int bLocalUseExceptions = GetUseExceptions();
6804 0 : if ( bLocalUseExceptions ) {
6805 0 : pushErrorHandler();
6806 : }
6807 0 : result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
6808 0 : if ( bLocalUseExceptions ) {
6809 0 : popErrorHandler();
6810 : }
6811 : #ifndef SED_HACKS
6812 : if ( bLocalUseExceptions ) {
6813 : CPLErr eclass = CPLGetLastErrorType();
6814 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6815 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6816 : }
6817 : }
6818 : #endif
6819 : }
6820 0 : resultobj = SWIG_From_double(static_cast< double >(result));
6821 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6822 : return resultobj;
6823 : fail:
6824 : return NULL;
6825 : }
6826 :
6827 :
6828 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6829 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6830 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6831 1 : void *argp1 = 0 ;
6832 1 : int res1 = 0 ;
6833 1 : PyObject *swig_obj[1] ;
6834 1 : char *result = 0 ;
6835 :
6836 1 : if (!args) SWIG_fail;
6837 1 : swig_obj[0] = args;
6838 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6839 1 : if (!SWIG_IsOK(res1)) {
6840 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6841 : }
6842 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6843 1 : {
6844 1 : const int bLocalUseExceptions = GetUseExceptions();
6845 1 : if ( bLocalUseExceptions ) {
6846 1 : pushErrorHandler();
6847 : }
6848 1 : result = (char *)OSRSpatialReferenceShadow_GetAngularUnitsName(arg1);
6849 1 : if ( bLocalUseExceptions ) {
6850 1 : popErrorHandler();
6851 : }
6852 : #ifndef SED_HACKS
6853 : if ( bLocalUseExceptions ) {
6854 : CPLErr eclass = CPLGetLastErrorType();
6855 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6856 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6857 : }
6858 : }
6859 : #endif
6860 : }
6861 1 : resultobj = SWIG_FromCharPtr((const char *)result);
6862 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6863 : return resultobj;
6864 : fail:
6865 : return NULL;
6866 : }
6867 :
6868 :
6869 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6870 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6871 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6872 1 : char *arg2 = (char *) 0 ;
6873 1 : char *arg3 = (char *) 0 ;
6874 1 : double arg4 ;
6875 1 : void *argp1 = 0 ;
6876 1 : int res1 = 0 ;
6877 1 : int res2 ;
6878 1 : char *buf2 = 0 ;
6879 1 : int alloc2 = 0 ;
6880 1 : int res3 ;
6881 1 : char *buf3 = 0 ;
6882 1 : int alloc3 = 0 ;
6883 1 : double val4 ;
6884 1 : int ecode4 = 0 ;
6885 1 : PyObject *swig_obj[4] ;
6886 1 : OGRErr result;
6887 :
6888 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTargetLinearUnits", 4, 4, swig_obj)) SWIG_fail;
6889 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6890 1 : if (!SWIG_IsOK(res1)) {
6891 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6892 : }
6893 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6894 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6895 1 : if (!SWIG_IsOK(res2)) {
6896 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
6897 : }
6898 1 : arg2 = reinterpret_cast< char * >(buf2);
6899 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6900 1 : if (!SWIG_IsOK(res3)) {
6901 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "3"" of type '" "char const *""'");
6902 : }
6903 1 : arg3 = reinterpret_cast< char * >(buf3);
6904 1 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
6905 1 : if (!SWIG_IsOK(ecode4)) {
6906 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
6907 : }
6908 1 : arg4 = static_cast< double >(val4);
6909 1 : {
6910 1 : if (!arg3) {
6911 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6912 : }
6913 : }
6914 1 : {
6915 1 : const int bLocalUseExceptions = GetUseExceptions();
6916 1 : if ( bLocalUseExceptions ) {
6917 1 : pushErrorHandler();
6918 : }
6919 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
6920 1 : if ( bLocalUseExceptions ) {
6921 1 : popErrorHandler();
6922 : }
6923 : #ifndef SED_HACKS
6924 : if ( bLocalUseExceptions ) {
6925 : CPLErr eclass = CPLGetLastErrorType();
6926 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6927 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6928 : }
6929 : }
6930 : #endif
6931 : }
6932 1 : {
6933 : /* %typemap(out) OGRErr */
6934 1 : if ( result != 0 && GetUseExceptions()) {
6935 0 : const char* pszMessage = CPLGetLastErrorMsg();
6936 0 : if( pszMessage[0] != '\0' )
6937 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6938 : else
6939 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6940 0 : SWIG_fail;
6941 : }
6942 : }
6943 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6944 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6945 1 : {
6946 : /* %typemap(ret) OGRErr */
6947 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6948 1 : resultobj = PyInt_FromLong( result );
6949 : }
6950 : }
6951 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6952 : return resultobj;
6953 0 : fail:
6954 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6955 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6956 : return NULL;
6957 : }
6958 :
6959 :
6960 6 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6961 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6962 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6963 6 : char *arg2 = (char *) 0 ;
6964 6 : double arg3 ;
6965 6 : void *argp1 = 0 ;
6966 6 : int res1 = 0 ;
6967 6 : int res2 ;
6968 6 : char *buf2 = 0 ;
6969 6 : int alloc2 = 0 ;
6970 6 : double val3 ;
6971 6 : int ecode3 = 0 ;
6972 6 : PyObject *swig_obj[3] ;
6973 6 : OGRErr result;
6974 :
6975 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnits", 3, 3, swig_obj)) SWIG_fail;
6976 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6977 6 : if (!SWIG_IsOK(res1)) {
6978 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6979 : }
6980 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6981 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6982 6 : if (!SWIG_IsOK(res2)) {
6983 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnits" "', argument " "2"" of type '" "char const *""'");
6984 : }
6985 6 : arg2 = reinterpret_cast< char * >(buf2);
6986 6 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6987 6 : if (!SWIG_IsOK(ecode3)) {
6988 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnits" "', argument " "3"" of type '" "double""'");
6989 : }
6990 6 : arg3 = static_cast< double >(val3);
6991 6 : {
6992 6 : if (!arg2) {
6993 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6994 : }
6995 : }
6996 6 : {
6997 6 : const int bLocalUseExceptions = GetUseExceptions();
6998 6 : if ( bLocalUseExceptions ) {
6999 6 : pushErrorHandler();
7000 : }
7001 6 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
7002 6 : if ( bLocalUseExceptions ) {
7003 6 : popErrorHandler();
7004 : }
7005 : #ifndef SED_HACKS
7006 : if ( bLocalUseExceptions ) {
7007 : CPLErr eclass = CPLGetLastErrorType();
7008 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7009 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7010 : }
7011 : }
7012 : #endif
7013 : }
7014 6 : {
7015 : /* %typemap(out) OGRErr */
7016 6 : if ( result != 0 && GetUseExceptions()) {
7017 0 : const char* pszMessage = CPLGetLastErrorMsg();
7018 0 : if( pszMessage[0] != '\0' )
7019 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7020 : else
7021 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7022 0 : SWIG_fail;
7023 : }
7024 : }
7025 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7026 6 : {
7027 : /* %typemap(ret) OGRErr */
7028 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7029 6 : resultobj = PyInt_FromLong( result );
7030 : }
7031 : }
7032 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7033 : return resultobj;
7034 0 : fail:
7035 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7036 : return NULL;
7037 : }
7038 :
7039 :
7040 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7041 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7042 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7043 1 : char *arg2 = (char *) 0 ;
7044 1 : double arg3 ;
7045 1 : void *argp1 = 0 ;
7046 1 : int res1 = 0 ;
7047 1 : int res2 ;
7048 1 : char *buf2 = 0 ;
7049 1 : int alloc2 = 0 ;
7050 1 : double val3 ;
7051 1 : int ecode3 = 0 ;
7052 1 : PyObject *swig_obj[3] ;
7053 1 : OGRErr result;
7054 :
7055 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnitsAndUpdateParameters", 3, 3, swig_obj)) SWIG_fail;
7056 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7057 1 : if (!SWIG_IsOK(res1)) {
7058 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7059 : }
7060 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7061 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7062 1 : if (!SWIG_IsOK(res2)) {
7063 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "2"" of type '" "char const *""'");
7064 : }
7065 1 : arg2 = reinterpret_cast< char * >(buf2);
7066 1 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7067 1 : if (!SWIG_IsOK(ecode3)) {
7068 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "3"" of type '" "double""'");
7069 : }
7070 1 : arg3 = static_cast< double >(val3);
7071 1 : {
7072 1 : if (!arg2) {
7073 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7074 : }
7075 : }
7076 1 : {
7077 1 : const int bLocalUseExceptions = GetUseExceptions();
7078 1 : if ( bLocalUseExceptions ) {
7079 1 : pushErrorHandler();
7080 : }
7081 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
7082 1 : if ( bLocalUseExceptions ) {
7083 1 : popErrorHandler();
7084 : }
7085 : #ifndef SED_HACKS
7086 : if ( bLocalUseExceptions ) {
7087 : CPLErr eclass = CPLGetLastErrorType();
7088 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7089 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7090 : }
7091 : }
7092 : #endif
7093 : }
7094 1 : {
7095 : /* %typemap(out) OGRErr */
7096 1 : if ( result != 0 && GetUseExceptions()) {
7097 0 : const char* pszMessage = CPLGetLastErrorMsg();
7098 0 : if( pszMessage[0] != '\0' )
7099 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7100 : else
7101 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7102 0 : SWIG_fail;
7103 : }
7104 : }
7105 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7106 1 : {
7107 : /* %typemap(ret) OGRErr */
7108 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7109 1 : resultobj = PyInt_FromLong( result );
7110 : }
7111 : }
7112 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7113 : return resultobj;
7114 0 : fail:
7115 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7116 : return NULL;
7117 : }
7118 :
7119 :
7120 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7121 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7122 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7123 4 : char *arg2 = (char *) 0 ;
7124 4 : void *argp1 = 0 ;
7125 4 : int res1 = 0 ;
7126 4 : int res2 ;
7127 4 : char *buf2 = 0 ;
7128 4 : int alloc2 = 0 ;
7129 4 : PyObject *swig_obj[2] ;
7130 4 : double result;
7131 :
7132 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetTargetLinearUnits", 2, 2, swig_obj)) SWIG_fail;
7133 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7134 4 : if (!SWIG_IsOK(res1)) {
7135 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7136 : }
7137 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7138 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7139 4 : if (!SWIG_IsOK(res2)) {
7140 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7141 : }
7142 4 : arg2 = reinterpret_cast< char * >(buf2);
7143 4 : {
7144 4 : const int bLocalUseExceptions = GetUseExceptions();
7145 4 : if ( bLocalUseExceptions ) {
7146 4 : pushErrorHandler();
7147 : }
7148 4 : result = (double)OSRSpatialReferenceShadow_GetTargetLinearUnits(arg1,(char const *)arg2);
7149 4 : if ( bLocalUseExceptions ) {
7150 4 : popErrorHandler();
7151 : }
7152 : #ifndef SED_HACKS
7153 : if ( bLocalUseExceptions ) {
7154 : CPLErr eclass = CPLGetLastErrorType();
7155 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7156 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7157 : }
7158 : }
7159 : #endif
7160 : }
7161 4 : resultobj = SWIG_From_double(static_cast< double >(result));
7162 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7163 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7164 : return resultobj;
7165 0 : fail:
7166 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7167 : return NULL;
7168 : }
7169 :
7170 :
7171 178 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7172 178 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7173 178 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7174 178 : void *argp1 = 0 ;
7175 178 : int res1 = 0 ;
7176 178 : PyObject *swig_obj[1] ;
7177 178 : double result;
7178 :
7179 178 : if (!args) SWIG_fail;
7180 178 : swig_obj[0] = args;
7181 178 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7182 178 : if (!SWIG_IsOK(res1)) {
7183 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7184 : }
7185 178 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7186 178 : {
7187 178 : const int bLocalUseExceptions = GetUseExceptions();
7188 178 : if ( bLocalUseExceptions ) {
7189 176 : pushErrorHandler();
7190 : }
7191 178 : result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
7192 178 : if ( bLocalUseExceptions ) {
7193 176 : popErrorHandler();
7194 : }
7195 : #ifndef SED_HACKS
7196 : if ( bLocalUseExceptions ) {
7197 : CPLErr eclass = CPLGetLastErrorType();
7198 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7199 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7200 : }
7201 : }
7202 : #endif
7203 : }
7204 178 : resultobj = SWIG_From_double(static_cast< double >(result));
7205 178 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7206 : return resultobj;
7207 : fail:
7208 : return NULL;
7209 : }
7210 :
7211 :
7212 24 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7213 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7214 24 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7215 24 : void *argp1 = 0 ;
7216 24 : int res1 = 0 ;
7217 24 : PyObject *swig_obj[1] ;
7218 24 : char *result = 0 ;
7219 :
7220 24 : if (!args) SWIG_fail;
7221 24 : swig_obj[0] = args;
7222 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7223 24 : if (!SWIG_IsOK(res1)) {
7224 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7225 : }
7226 24 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7227 24 : {
7228 24 : const int bLocalUseExceptions = GetUseExceptions();
7229 24 : if ( bLocalUseExceptions ) {
7230 24 : pushErrorHandler();
7231 : }
7232 24 : result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
7233 24 : if ( bLocalUseExceptions ) {
7234 24 : popErrorHandler();
7235 : }
7236 : #ifndef SED_HACKS
7237 : if ( bLocalUseExceptions ) {
7238 : CPLErr eclass = CPLGetLastErrorType();
7239 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7240 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7241 : }
7242 : }
7243 : #endif
7244 : }
7245 24 : resultobj = SWIG_FromCharPtr((const char *)result);
7246 24 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7247 : return resultobj;
7248 : fail:
7249 : return NULL;
7250 : }
7251 :
7252 :
7253 466 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7254 466 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7255 466 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7256 466 : char *arg2 = (char *) 0 ;
7257 466 : void *argp1 = 0 ;
7258 466 : int res1 = 0 ;
7259 466 : int res2 ;
7260 466 : char *buf2 = 0 ;
7261 466 : int alloc2 = 0 ;
7262 466 : PyObject *swig_obj[2] ;
7263 466 : char *result = 0 ;
7264 :
7265 466 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityCode", 2, 2, swig_obj)) SWIG_fail;
7266 466 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7267 466 : if (!SWIG_IsOK(res1)) {
7268 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7269 : }
7270 466 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7271 466 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7272 466 : if (!SWIG_IsOK(res2)) {
7273 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "2"" of type '" "char const *""'");
7274 : }
7275 466 : arg2 = reinterpret_cast< char * >(buf2);
7276 466 : {
7277 466 : const int bLocalUseExceptions = GetUseExceptions();
7278 466 : if ( bLocalUseExceptions ) {
7279 190 : pushErrorHandler();
7280 : }
7281 466 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
7282 466 : if ( bLocalUseExceptions ) {
7283 190 : popErrorHandler();
7284 : }
7285 : #ifndef SED_HACKS
7286 : if ( bLocalUseExceptions ) {
7287 : CPLErr eclass = CPLGetLastErrorType();
7288 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7289 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7290 : }
7291 : }
7292 : #endif
7293 : }
7294 466 : resultobj = SWIG_FromCharPtr((const char *)result);
7295 466 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7296 466 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7297 : return resultobj;
7298 0 : fail:
7299 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7300 : return NULL;
7301 : }
7302 :
7303 :
7304 44 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7305 44 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7306 44 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7307 44 : char *arg2 = (char *) 0 ;
7308 44 : void *argp1 = 0 ;
7309 44 : int res1 = 0 ;
7310 44 : int res2 ;
7311 44 : char *buf2 = 0 ;
7312 44 : int alloc2 = 0 ;
7313 44 : PyObject *swig_obj[2] ;
7314 44 : char *result = 0 ;
7315 :
7316 44 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityName", 2, 2, swig_obj)) SWIG_fail;
7317 44 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7318 44 : if (!SWIG_IsOK(res1)) {
7319 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7320 : }
7321 44 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7322 44 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7323 44 : if (!SWIG_IsOK(res2)) {
7324 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityName" "', argument " "2"" of type '" "char const *""'");
7325 : }
7326 44 : arg2 = reinterpret_cast< char * >(buf2);
7327 44 : {
7328 44 : const int bLocalUseExceptions = GetUseExceptions();
7329 44 : if ( bLocalUseExceptions ) {
7330 39 : pushErrorHandler();
7331 : }
7332 44 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
7333 44 : if ( bLocalUseExceptions ) {
7334 39 : popErrorHandler();
7335 : }
7336 : #ifndef SED_HACKS
7337 : if ( bLocalUseExceptions ) {
7338 : CPLErr eclass = CPLGetLastErrorType();
7339 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7340 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7341 : }
7342 : }
7343 : #endif
7344 : }
7345 44 : resultobj = SWIG_FromCharPtr((const char *)result);
7346 44 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7347 44 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7348 : return resultobj;
7349 0 : fail:
7350 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7351 : return NULL;
7352 : }
7353 :
7354 :
7355 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7356 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7357 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7358 1 : void *argp1 = 0 ;
7359 1 : int res1 = 0 ;
7360 1 : PyObject *swig_obj[1] ;
7361 1 : OSRAreaOfUse *result = 0 ;
7362 :
7363 1 : if (!args) SWIG_fail;
7364 1 : swig_obj[0] = args;
7365 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7366 1 : if (!SWIG_IsOK(res1)) {
7367 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAreaOfUse" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7368 : }
7369 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7370 1 : {
7371 1 : const int bLocalUseExceptions = GetUseExceptions();
7372 1 : if ( bLocalUseExceptions ) {
7373 1 : pushErrorHandler();
7374 : }
7375 1 : result = (OSRAreaOfUse *)OSRSpatialReferenceShadow_GetAreaOfUse(arg1);
7376 1 : if ( bLocalUseExceptions ) {
7377 1 : popErrorHandler();
7378 : }
7379 : #ifndef SED_HACKS
7380 : if ( bLocalUseExceptions ) {
7381 : CPLErr eclass = CPLGetLastErrorType();
7382 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7383 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7384 : }
7385 : }
7386 : #endif
7387 : }
7388 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_OWN | 0 );
7389 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7390 : return resultobj;
7391 : fail:
7392 : return NULL;
7393 : }
7394 :
7395 :
7396 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7397 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7398 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7399 6 : char *arg2 = (char *) 0 ;
7400 6 : int arg3 ;
7401 6 : void *argp1 = 0 ;
7402 6 : int res1 = 0 ;
7403 6 : int res2 ;
7404 6 : char *buf2 = 0 ;
7405 6 : int alloc2 = 0 ;
7406 6 : int val3 ;
7407 6 : int ecode3 = 0 ;
7408 6 : PyObject *swig_obj[3] ;
7409 6 : char *result = 0 ;
7410 :
7411 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisName", 3, 3, swig_obj)) SWIG_fail;
7412 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7413 6 : if (!SWIG_IsOK(res1)) {
7414 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7415 : }
7416 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7417 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7418 6 : if (!SWIG_IsOK(res2)) {
7419 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisName" "', argument " "2"" of type '" "char const *""'");
7420 : }
7421 6 : arg2 = reinterpret_cast< char * >(buf2);
7422 6 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7423 6 : if (!SWIG_IsOK(ecode3)) {
7424 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisName" "', argument " "3"" of type '" "int""'");
7425 : }
7426 6 : arg3 = static_cast< int >(val3);
7427 6 : {
7428 6 : const int bLocalUseExceptions = GetUseExceptions();
7429 6 : if ( bLocalUseExceptions ) {
7430 5 : pushErrorHandler();
7431 : }
7432 6 : result = (char *)OSRSpatialReferenceShadow_GetAxisName(arg1,(char const *)arg2,arg3);
7433 6 : if ( bLocalUseExceptions ) {
7434 5 : popErrorHandler();
7435 : }
7436 : #ifndef SED_HACKS
7437 : if ( bLocalUseExceptions ) {
7438 : CPLErr eclass = CPLGetLastErrorType();
7439 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7440 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7441 : }
7442 : }
7443 : #endif
7444 : }
7445 6 : resultobj = SWIG_FromCharPtr((const char *)result);
7446 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7447 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7448 : return resultobj;
7449 0 : fail:
7450 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7451 : return NULL;
7452 : }
7453 :
7454 :
7455 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxesCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7456 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7457 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7458 6 : void *argp1 = 0 ;
7459 6 : int res1 = 0 ;
7460 6 : PyObject *swig_obj[1] ;
7461 6 : int result;
7462 :
7463 6 : if (!args) SWIG_fail;
7464 6 : swig_obj[0] = args;
7465 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7466 6 : if (!SWIG_IsOK(res1)) {
7467 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxesCount" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7468 : }
7469 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7470 6 : {
7471 6 : const int bLocalUseExceptions = GetUseExceptions();
7472 6 : if ( bLocalUseExceptions ) {
7473 5 : pushErrorHandler();
7474 : }
7475 6 : result = (int)OSRSpatialReferenceShadow_GetAxesCount(arg1);
7476 6 : if ( bLocalUseExceptions ) {
7477 5 : popErrorHandler();
7478 : }
7479 : #ifndef SED_HACKS
7480 : if ( bLocalUseExceptions ) {
7481 : CPLErr eclass = CPLGetLastErrorType();
7482 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7483 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7484 : }
7485 : }
7486 : #endif
7487 : }
7488 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7489 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7490 : return resultobj;
7491 : fail:
7492 : return NULL;
7493 : }
7494 :
7495 :
7496 5 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7497 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7498 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7499 5 : char *arg2 = (char *) 0 ;
7500 5 : int arg3 ;
7501 5 : void *argp1 = 0 ;
7502 5 : int res1 = 0 ;
7503 5 : int res2 ;
7504 5 : char *buf2 = 0 ;
7505 5 : int alloc2 = 0 ;
7506 5 : int val3 ;
7507 5 : int ecode3 = 0 ;
7508 5 : PyObject *swig_obj[3] ;
7509 5 : OGRAxisOrientation result;
7510 :
7511 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisOrientation", 3, 3, swig_obj)) SWIG_fail;
7512 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7513 5 : if (!SWIG_IsOK(res1)) {
7514 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7515 : }
7516 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7517 5 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7518 5 : if (!SWIG_IsOK(res2)) {
7519 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "2"" of type '" "char const *""'");
7520 : }
7521 5 : arg2 = reinterpret_cast< char * >(buf2);
7522 5 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7523 5 : if (!SWIG_IsOK(ecode3)) {
7524 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "3"" of type '" "int""'");
7525 : }
7526 5 : arg3 = static_cast< int >(val3);
7527 5 : {
7528 5 : const int bLocalUseExceptions = GetUseExceptions();
7529 5 : if ( bLocalUseExceptions ) {
7530 5 : pushErrorHandler();
7531 : }
7532 5 : result = (OGRAxisOrientation)OSRSpatialReferenceShadow_GetAxisOrientation(arg1,(char const *)arg2,arg3);
7533 5 : if ( bLocalUseExceptions ) {
7534 5 : popErrorHandler();
7535 : }
7536 : #ifndef SED_HACKS
7537 : if ( bLocalUseExceptions ) {
7538 : CPLErr eclass = CPLGetLastErrorType();
7539 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7540 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7541 : }
7542 : }
7543 : #endif
7544 : }
7545 5 : resultobj = SWIG_From_int(static_cast< int >(result));
7546 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7547 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7548 : return resultobj;
7549 0 : fail:
7550 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7551 : return NULL;
7552 : }
7553 :
7554 :
7555 37 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7556 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7557 37 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7558 37 : void *argp1 = 0 ;
7559 37 : int res1 = 0 ;
7560 37 : PyObject *swig_obj[1] ;
7561 37 : OSRAxisMappingStrategy result;
7562 :
7563 37 : if (!args) SWIG_fail;
7564 37 : swig_obj[0] = args;
7565 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7566 37 : if (!SWIG_IsOK(res1)) {
7567 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7568 : }
7569 37 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7570 37 : {
7571 37 : const int bLocalUseExceptions = GetUseExceptions();
7572 37 : if ( bLocalUseExceptions ) {
7573 36 : pushErrorHandler();
7574 : }
7575 37 : result = (OSRAxisMappingStrategy)OSRSpatialReferenceShadow_GetAxisMappingStrategy(arg1);
7576 37 : if ( bLocalUseExceptions ) {
7577 36 : popErrorHandler();
7578 : }
7579 : #ifndef SED_HACKS
7580 : if ( bLocalUseExceptions ) {
7581 : CPLErr eclass = CPLGetLastErrorType();
7582 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7583 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7584 : }
7585 : }
7586 : #endif
7587 : }
7588 37 : resultobj = SWIG_From_int(static_cast< int >(result));
7589 37 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7590 : return resultobj;
7591 : fail:
7592 : return NULL;
7593 : }
7594 :
7595 :
7596 496 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7597 496 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7598 496 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7599 496 : OSRAxisMappingStrategy arg2 ;
7600 496 : void *argp1 = 0 ;
7601 496 : int res1 = 0 ;
7602 496 : int val2 ;
7603 496 : int ecode2 = 0 ;
7604 496 : PyObject *swig_obj[2] ;
7605 :
7606 496 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAxisMappingStrategy", 2, 2, swig_obj)) SWIG_fail;
7607 496 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7608 496 : if (!SWIG_IsOK(res1)) {
7609 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7610 : }
7611 496 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7612 496 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7613 496 : if (!SWIG_IsOK(ecode2)) {
7614 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "2"" of type '" "OSRAxisMappingStrategy""'");
7615 : }
7616 496 : arg2 = static_cast< OSRAxisMappingStrategy >(val2);
7617 496 : {
7618 496 : const int bLocalUseExceptions = GetUseExceptions();
7619 496 : if ( bLocalUseExceptions ) {
7620 406 : pushErrorHandler();
7621 : }
7622 496 : OSRSpatialReferenceShadow_SetAxisMappingStrategy(arg1,arg2);
7623 496 : if ( bLocalUseExceptions ) {
7624 406 : popErrorHandler();
7625 : }
7626 : #ifndef SED_HACKS
7627 : if ( bLocalUseExceptions ) {
7628 : CPLErr eclass = CPLGetLastErrorType();
7629 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7630 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7631 : }
7632 : }
7633 : #endif
7634 : }
7635 496 : resultobj = SWIG_Py_Void();
7636 496 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7637 : return resultobj;
7638 : fail:
7639 : return NULL;
7640 : }
7641 :
7642 :
7643 87 : SWIGINTERN PyObject *_wrap_SpatialReference_GetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7644 87 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7645 87 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7646 87 : int *arg2 = (int *) 0 ;
7647 87 : int **arg3 = (int **) 0 ;
7648 87 : void *argp1 = 0 ;
7649 87 : int res1 = 0 ;
7650 87 : int nLen2 = 0 ;
7651 87 : int *pList2 = NULL ;
7652 87 : PyObject *swig_obj[1] ;
7653 :
7654 87 : {
7655 : /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
7656 87 : arg2 = &nLen2;
7657 87 : arg3 = &pList2;
7658 : }
7659 87 : if (!args) SWIG_fail;
7660 87 : swig_obj[0] = args;
7661 87 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7662 87 : if (!SWIG_IsOK(res1)) {
7663 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7664 : }
7665 87 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7666 87 : {
7667 87 : const int bLocalUseExceptions = GetUseExceptions();
7668 87 : if ( bLocalUseExceptions ) {
7669 45 : pushErrorHandler();
7670 : }
7671 87 : OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(arg1,arg2,(int const **)arg3);
7672 87 : if ( bLocalUseExceptions ) {
7673 45 : popErrorHandler();
7674 : }
7675 : #ifndef SED_HACKS
7676 : if ( bLocalUseExceptions ) {
7677 : CPLErr eclass = CPLGetLastErrorType();
7678 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7679 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7680 : }
7681 : }
7682 : #endif
7683 : }
7684 87 : resultobj = SWIG_Py_Void();
7685 87 : {
7686 : /* %typemap(argout) (int *nLen, const int **pList ) */
7687 87 : Py_DECREF(resultobj);
7688 87 : PyObject *out = PyList_New( *arg2 );
7689 87 : if( !out ) {
7690 0 : SWIG_fail;
7691 : }
7692 263 : for( int i=0; i<*arg2; i++ ) {
7693 176 : PyObject *val = PyInt_FromLong( (*arg3)[i] );
7694 176 : PyList_SetItem( out, i, val );
7695 : }
7696 87 : resultobj = out;
7697 : }
7698 87 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7699 : return resultobj;
7700 : fail:
7701 : return NULL;
7702 : }
7703 :
7704 :
7705 12 : SWIGINTERN PyObject *_wrap_SpatialReference_SetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7706 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7707 12 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7708 12 : int arg2 ;
7709 12 : int *arg3 = (int *) 0 ;
7710 12 : void *argp1 = 0 ;
7711 12 : int res1 = 0 ;
7712 12 : PyObject *swig_obj[2] ;
7713 12 : OGRErr result;
7714 :
7715 12 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetDataAxisToSRSAxisMapping", 2, 2, swig_obj)) SWIG_fail;
7716 12 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7717 12 : if (!SWIG_IsOK(res1)) {
7718 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7719 : }
7720 12 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7721 12 : {
7722 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
7723 12 : arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
7724 12 : if( arg2 < 0 ) {
7725 0 : SWIG_fail;
7726 : }
7727 : }
7728 12 : {
7729 12 : const int bLocalUseExceptions = GetUseExceptions();
7730 12 : if ( bLocalUseExceptions ) {
7731 7 : pushErrorHandler();
7732 : }
7733 12 : result = (OGRErr)OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(arg1,arg2,arg3);
7734 12 : if ( bLocalUseExceptions ) {
7735 7 : popErrorHandler();
7736 : }
7737 : #ifndef SED_HACKS
7738 : if ( bLocalUseExceptions ) {
7739 : CPLErr eclass = CPLGetLastErrorType();
7740 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7741 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7742 : }
7743 : }
7744 : #endif
7745 : }
7746 12 : {
7747 : /* %typemap(out) OGRErr */
7748 12 : if ( result != 0 && GetUseExceptions()) {
7749 0 : const char* pszMessage = CPLGetLastErrorMsg();
7750 0 : if( pszMessage[0] != '\0' )
7751 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7752 : else
7753 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7754 0 : SWIG_fail;
7755 : }
7756 : }
7757 12 : {
7758 : /* %typemap(freearg) (int nList, int* pList) */
7759 12 : free(arg3);
7760 : }
7761 12 : {
7762 : /* %typemap(ret) OGRErr */
7763 12 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7764 12 : resultobj = PyInt_FromLong( result );
7765 : }
7766 : }
7767 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7768 : return resultobj;
7769 0 : fail:
7770 0 : {
7771 : /* %typemap(freearg) (int nList, int* pList) */
7772 0 : free(arg3);
7773 : }
7774 0 : return NULL;
7775 : }
7776 :
7777 :
7778 16 : SWIGINTERN PyObject *_wrap_SpatialReference_SetUTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7779 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7780 16 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7781 16 : int arg2 ;
7782 16 : int arg3 = (int) 1 ;
7783 16 : void *argp1 = 0 ;
7784 16 : int res1 = 0 ;
7785 16 : int val2 ;
7786 16 : int ecode2 = 0 ;
7787 16 : int val3 ;
7788 16 : int ecode3 = 0 ;
7789 16 : PyObject *swig_obj[3] ;
7790 16 : OGRErr result;
7791 :
7792 16 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetUTM", 2, 3, swig_obj)) SWIG_fail;
7793 16 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7794 16 : if (!SWIG_IsOK(res1)) {
7795 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetUTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7796 : }
7797 16 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7798 16 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7799 16 : if (!SWIG_IsOK(ecode2)) {
7800 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetUTM" "', argument " "2"" of type '" "int""'");
7801 : }
7802 16 : arg2 = static_cast< int >(val2);
7803 16 : if (swig_obj[2]) {
7804 3 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7805 3 : if (!SWIG_IsOK(ecode3)) {
7806 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetUTM" "', argument " "3"" of type '" "int""'");
7807 : }
7808 : arg3 = static_cast< int >(val3);
7809 : }
7810 16 : {
7811 16 : const int bLocalUseExceptions = GetUseExceptions();
7812 16 : if ( bLocalUseExceptions ) {
7813 15 : pushErrorHandler();
7814 : }
7815 16 : result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
7816 16 : if ( bLocalUseExceptions ) {
7817 15 : popErrorHandler();
7818 : }
7819 : #ifndef SED_HACKS
7820 : if ( bLocalUseExceptions ) {
7821 : CPLErr eclass = CPLGetLastErrorType();
7822 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7823 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7824 : }
7825 : }
7826 : #endif
7827 : }
7828 16 : {
7829 : /* %typemap(out) OGRErr */
7830 16 : if ( result != 0 && GetUseExceptions()) {
7831 0 : const char* pszMessage = CPLGetLastErrorMsg();
7832 0 : if( pszMessage[0] != '\0' )
7833 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7834 : else
7835 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7836 0 : SWIG_fail;
7837 : }
7838 : }
7839 16 : {
7840 : /* %typemap(ret) OGRErr */
7841 16 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7842 16 : resultobj = PyInt_FromLong( result );
7843 : }
7844 : }
7845 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7846 : return resultobj;
7847 : fail:
7848 : return NULL;
7849 : }
7850 :
7851 :
7852 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetUTMZone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7853 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7854 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7855 6 : void *argp1 = 0 ;
7856 6 : int res1 = 0 ;
7857 6 : PyObject *swig_obj[1] ;
7858 6 : int result;
7859 :
7860 6 : if (!args) SWIG_fail;
7861 6 : swig_obj[0] = args;
7862 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7863 6 : if (!SWIG_IsOK(res1)) {
7864 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7865 : }
7866 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7867 6 : {
7868 6 : const int bLocalUseExceptions = GetUseExceptions();
7869 6 : if ( bLocalUseExceptions ) {
7870 6 : pushErrorHandler();
7871 : }
7872 6 : result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
7873 6 : if ( bLocalUseExceptions ) {
7874 6 : popErrorHandler();
7875 : }
7876 : #ifndef SED_HACKS
7877 : if ( bLocalUseExceptions ) {
7878 : CPLErr eclass = CPLGetLastErrorType();
7879 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7880 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7881 : }
7882 : }
7883 : #endif
7884 : }
7885 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7886 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7887 : return resultobj;
7888 : fail:
7889 : return NULL;
7890 : }
7891 :
7892 :
7893 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStatePlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7894 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7895 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7896 2 : int arg2 ;
7897 2 : int arg3 = (int) 1 ;
7898 2 : char *arg4 = (char *) "" ;
7899 2 : double arg5 = (double) 0.0 ;
7900 2 : void *argp1 = 0 ;
7901 2 : int res1 = 0 ;
7902 2 : int val2 ;
7903 2 : int ecode2 = 0 ;
7904 2 : int val3 ;
7905 2 : int ecode3 = 0 ;
7906 2 : int res4 ;
7907 2 : char *buf4 = 0 ;
7908 2 : int alloc4 = 0 ;
7909 2 : double val5 ;
7910 2 : int ecode5 = 0 ;
7911 2 : PyObject *swig_obj[5] ;
7912 2 : OGRErr result;
7913 :
7914 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetStatePlane", 2, 5, swig_obj)) SWIG_fail;
7915 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7916 2 : if (!SWIG_IsOK(res1)) {
7917 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStatePlane" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7918 : }
7919 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7920 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7921 2 : if (!SWIG_IsOK(ecode2)) {
7922 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStatePlane" "', argument " "2"" of type '" "int""'");
7923 : }
7924 2 : arg2 = static_cast< int >(val2);
7925 2 : if (swig_obj[2]) {
7926 2 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7927 2 : if (!SWIG_IsOK(ecode3)) {
7928 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStatePlane" "', argument " "3"" of type '" "int""'");
7929 : }
7930 : arg3 = static_cast< int >(val3);
7931 : }
7932 2 : if (swig_obj[3]) {
7933 1 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
7934 1 : if (!SWIG_IsOK(res4)) {
7935 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetStatePlane" "', argument " "4"" of type '" "char const *""'");
7936 : }
7937 1 : arg4 = reinterpret_cast< char * >(buf4);
7938 : }
7939 2 : if (swig_obj[4]) {
7940 1 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
7941 1 : if (!SWIG_IsOK(ecode5)) {
7942 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStatePlane" "', argument " "5"" of type '" "double""'");
7943 : }
7944 1 : arg5 = static_cast< double >(val5);
7945 : }
7946 2 : {
7947 2 : const int bLocalUseExceptions = GetUseExceptions();
7948 2 : if ( bLocalUseExceptions ) {
7949 2 : pushErrorHandler();
7950 : }
7951 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
7952 2 : if ( bLocalUseExceptions ) {
7953 2 : popErrorHandler();
7954 : }
7955 : #ifndef SED_HACKS
7956 : if ( bLocalUseExceptions ) {
7957 : CPLErr eclass = CPLGetLastErrorType();
7958 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7959 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7960 : }
7961 : }
7962 : #endif
7963 : }
7964 2 : {
7965 : /* %typemap(out) OGRErr */
7966 2 : if ( result != 0 && GetUseExceptions()) {
7967 0 : const char* pszMessage = CPLGetLastErrorMsg();
7968 0 : if( pszMessage[0] != '\0' )
7969 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7970 : else
7971 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7972 0 : SWIG_fail;
7973 : }
7974 : }
7975 2 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
7976 2 : {
7977 : /* %typemap(ret) OGRErr */
7978 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7979 2 : resultobj = PyInt_FromLong( result );
7980 : }
7981 : }
7982 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7983 : return resultobj;
7984 0 : fail:
7985 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
7986 : return NULL;
7987 : }
7988 :
7989 :
7990 5 : SWIGINTERN PyObject *_wrap_SpatialReference_AutoIdentifyEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7991 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7992 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7993 5 : void *argp1 = 0 ;
7994 5 : int res1 = 0 ;
7995 5 : PyObject *swig_obj[1] ;
7996 5 : OGRErr result;
7997 :
7998 5 : if (!args) SWIG_fail;
7999 5 : swig_obj[0] = args;
8000 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8001 5 : if (!SWIG_IsOK(res1)) {
8002 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AutoIdentifyEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8003 : }
8004 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8005 5 : {
8006 5 : const int bLocalUseExceptions = GetUseExceptions();
8007 5 : if ( bLocalUseExceptions ) {
8008 5 : pushErrorHandler();
8009 : }
8010 5 : result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
8011 5 : if ( bLocalUseExceptions ) {
8012 5 : popErrorHandler();
8013 : }
8014 : #ifndef SED_HACKS
8015 : if ( bLocalUseExceptions ) {
8016 : CPLErr eclass = CPLGetLastErrorType();
8017 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8018 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8019 : }
8020 : }
8021 : #endif
8022 : }
8023 5 : {
8024 : /* %typemap(out) OGRErr */
8025 6 : if ( result != 0 && GetUseExceptions()) {
8026 1 : const char* pszMessage = CPLGetLastErrorMsg();
8027 1 : if( pszMessage[0] != '\0' )
8028 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8029 : else
8030 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8031 1 : SWIG_fail;
8032 : }
8033 : }
8034 4 : {
8035 : /* %typemap(ret) OGRErr */
8036 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8037 4 : resultobj = PyInt_FromLong( result );
8038 : }
8039 : }
8040 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8041 : return resultobj;
8042 : fail:
8043 : return NULL;
8044 : }
8045 :
8046 :
8047 5 : SWIGINTERN PyObject *_wrap_SpatialReference_FindMatches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8048 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8049 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8050 5 : char **arg2 = (char **) NULL ;
8051 5 : OSRSpatialReferenceShadow ***arg3 = (OSRSpatialReferenceShadow ***) NULL ;
8052 5 : int *arg4 = (int *) NULL ;
8053 5 : int **arg5 = (int **) NULL ;
8054 5 : void *argp1 = 0 ;
8055 5 : int res1 = 0 ;
8056 5 : OGRSpatialReferenceH *pahSRS3 = NULL ;
8057 5 : int nvalues3 = 0 ;
8058 5 : int *confidence_values3 = NULL ;
8059 5 : PyObject *swig_obj[2] ;
8060 :
8061 5 : {
8062 : /* %typemap(in) (OSRSpatialReferenceShadow***, int* nvalues3, int** confidence_values3) */
8063 5 : arg3 = &pahSRS3;
8064 5 : arg4 = &nvalues3;
8065 5 : arg5 = &confidence_values3;
8066 : }
8067 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_FindMatches", 1, 2, swig_obj)) SWIG_fail;
8068 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8069 5 : if (!SWIG_IsOK(res1)) {
8070 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_FindMatches" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8071 : }
8072 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8073 5 : if (swig_obj[1]) {
8074 0 : {
8075 : /* %typemap(in) char **dict */
8076 0 : arg2 = NULL;
8077 0 : if ( PySequence_Check( swig_obj[1] ) ) {
8078 0 : int bErr = FALSE;
8079 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
8080 0 : if ( bErr )
8081 : {
8082 0 : SWIG_fail;
8083 : }
8084 : }
8085 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
8086 0 : int bErr = FALSE;
8087 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
8088 0 : if ( bErr )
8089 : {
8090 0 : SWIG_fail;
8091 : }
8092 : }
8093 : else {
8094 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
8095 0 : SWIG_fail;
8096 : }
8097 : }
8098 : }
8099 5 : {
8100 5 : const int bLocalUseExceptions = GetUseExceptions();
8101 5 : if ( bLocalUseExceptions ) {
8102 5 : pushErrorHandler();
8103 : }
8104 5 : OSRSpatialReferenceShadow_FindMatches(arg1,arg2,arg3,arg4,arg5);
8105 5 : if ( bLocalUseExceptions ) {
8106 5 : popErrorHandler();
8107 : }
8108 : #ifndef SED_HACKS
8109 : if ( bLocalUseExceptions ) {
8110 : CPLErr eclass = CPLGetLastErrorType();
8111 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8112 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8113 : }
8114 : }
8115 : #endif
8116 : }
8117 5 : resultobj = SWIG_Py_Void();
8118 5 : {
8119 : /* %typemap(argout) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8120 :
8121 5 : Py_DECREF(resultobj);
8122 :
8123 5 : resultobj = PyList_New( *(arg4));
8124 5 : if( !resultobj ) {
8125 0 : SWIG_fail;
8126 : }
8127 14 : for( int i = 0; i < *(arg4); i++ )
8128 : {
8129 9 : PyObject *tuple = PyTuple_New( 2 );
8130 9 : OSRReference((*(arg3))[i]);
8131 9 : PyTuple_SetItem( tuple, 0,
8132 : SWIG_NewPointerObj(SWIG_as_voidptr((*(arg3))[i]), SWIGTYPE_p_OSRSpatialReferenceShadow, 1 ) );
8133 9 : PyTuple_SetItem( tuple, 1, PyInt_FromLong((*(arg5))[i]) );
8134 9 : PyList_SetItem( resultobj, i, tuple );
8135 : }
8136 : }
8137 5 : {
8138 : /* %typemap(freearg) char **dict */
8139 5 : CSLDestroy( arg2 );
8140 : }
8141 5 : {
8142 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8143 5 : OSRFreeSRSArray( *(arg3) );
8144 5 : CPLFree( *(arg5) );
8145 : }
8146 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8147 : return resultobj;
8148 0 : fail:
8149 0 : {
8150 : /* %typemap(freearg) char **dict */
8151 0 : CSLDestroy( arg2 );
8152 : }
8153 0 : {
8154 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8155 0 : OSRFreeSRSArray( *(arg3) );
8156 0 : CPLFree( *(arg5) );
8157 : }
8158 : return NULL;
8159 : }
8160 :
8161 :
8162 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8163 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8164 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8165 0 : char *arg2 = (char *) 0 ;
8166 0 : void *argp1 = 0 ;
8167 0 : int res1 = 0 ;
8168 0 : int res2 ;
8169 0 : char *buf2 = 0 ;
8170 0 : int alloc2 = 0 ;
8171 0 : PyObject *swig_obj[2] ;
8172 0 : OGRErr result;
8173 :
8174 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjection", 2, 2, swig_obj)) SWIG_fail;
8175 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8176 0 : if (!SWIG_IsOK(res1)) {
8177 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8178 : }
8179 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8180 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8181 0 : if (!SWIG_IsOK(res2)) {
8182 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjection" "', argument " "2"" of type '" "char const *""'");
8183 : }
8184 0 : arg2 = reinterpret_cast< char * >(buf2);
8185 0 : {
8186 0 : const int bLocalUseExceptions = GetUseExceptions();
8187 0 : if ( bLocalUseExceptions ) {
8188 0 : pushErrorHandler();
8189 : }
8190 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
8191 0 : if ( bLocalUseExceptions ) {
8192 0 : popErrorHandler();
8193 : }
8194 : #ifndef SED_HACKS
8195 : if ( bLocalUseExceptions ) {
8196 : CPLErr eclass = CPLGetLastErrorType();
8197 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8198 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8199 : }
8200 : }
8201 : #endif
8202 : }
8203 0 : {
8204 : /* %typemap(out) OGRErr */
8205 0 : if ( result != 0 && GetUseExceptions()) {
8206 0 : const char* pszMessage = CPLGetLastErrorMsg();
8207 0 : if( pszMessage[0] != '\0' )
8208 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8209 : else
8210 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8211 0 : SWIG_fail;
8212 : }
8213 : }
8214 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8215 0 : {
8216 : /* %typemap(ret) OGRErr */
8217 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8218 0 : resultobj = PyInt_FromLong( result );
8219 : }
8220 : }
8221 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8222 : return resultobj;
8223 0 : fail:
8224 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8225 : return NULL;
8226 : }
8227 :
8228 :
8229 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8230 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8231 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8232 0 : char *arg2 = (char *) 0 ;
8233 0 : double arg3 ;
8234 0 : void *argp1 = 0 ;
8235 0 : int res1 = 0 ;
8236 0 : int res2 ;
8237 0 : char *buf2 = 0 ;
8238 0 : int alloc2 = 0 ;
8239 0 : double val3 ;
8240 0 : int ecode3 = 0 ;
8241 0 : PyObject *swig_obj[3] ;
8242 0 : OGRErr result;
8243 :
8244 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjParm", 3, 3, swig_obj)) SWIG_fail;
8245 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8246 0 : if (!SWIG_IsOK(res1)) {
8247 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8248 : }
8249 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8250 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8251 0 : if (!SWIG_IsOK(res2)) {
8252 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjParm" "', argument " "2"" of type '" "char const *""'");
8253 : }
8254 0 : arg2 = reinterpret_cast< char * >(buf2);
8255 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8256 0 : if (!SWIG_IsOK(ecode3)) {
8257 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetProjParm" "', argument " "3"" of type '" "double""'");
8258 : }
8259 0 : arg3 = static_cast< double >(val3);
8260 0 : {
8261 0 : if (!arg2) {
8262 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8263 : }
8264 : }
8265 0 : {
8266 0 : const int bLocalUseExceptions = GetUseExceptions();
8267 0 : if ( bLocalUseExceptions ) {
8268 0 : pushErrorHandler();
8269 : }
8270 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
8271 0 : if ( bLocalUseExceptions ) {
8272 0 : popErrorHandler();
8273 : }
8274 : #ifndef SED_HACKS
8275 : if ( bLocalUseExceptions ) {
8276 : CPLErr eclass = CPLGetLastErrorType();
8277 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8278 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8279 : }
8280 : }
8281 : #endif
8282 : }
8283 0 : {
8284 : /* %typemap(out) OGRErr */
8285 0 : if ( result != 0 && GetUseExceptions()) {
8286 0 : const char* pszMessage = CPLGetLastErrorMsg();
8287 0 : if( pszMessage[0] != '\0' )
8288 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8289 : else
8290 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8291 0 : SWIG_fail;
8292 : }
8293 : }
8294 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8295 0 : {
8296 : /* %typemap(ret) OGRErr */
8297 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8298 0 : resultobj = PyInt_FromLong( result );
8299 : }
8300 : }
8301 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8302 : return resultobj;
8303 0 : fail:
8304 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8305 : return NULL;
8306 : }
8307 :
8308 :
8309 65 : SWIGINTERN PyObject *_wrap_SpatialReference_GetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8310 65 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8311 65 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8312 65 : char *arg2 = (char *) 0 ;
8313 65 : double arg3 = (double) 0.0 ;
8314 65 : void *argp1 = 0 ;
8315 65 : int res1 = 0 ;
8316 65 : int res2 ;
8317 65 : char *buf2 = 0 ;
8318 65 : int alloc2 = 0 ;
8319 65 : double val3 ;
8320 65 : int ecode3 = 0 ;
8321 65 : PyObject *swig_obj[3] ;
8322 65 : double result;
8323 :
8324 65 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetProjParm", 2, 3, swig_obj)) SWIG_fail;
8325 65 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8326 65 : if (!SWIG_IsOK(res1)) {
8327 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8328 : }
8329 65 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8330 65 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8331 65 : if (!SWIG_IsOK(res2)) {
8332 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetProjParm" "', argument " "2"" of type '" "char const *""'");
8333 : }
8334 65 : arg2 = reinterpret_cast< char * >(buf2);
8335 65 : if (swig_obj[2]) {
8336 24 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8337 24 : if (!SWIG_IsOK(ecode3)) {
8338 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetProjParm" "', argument " "3"" of type '" "double""'");
8339 : }
8340 24 : arg3 = static_cast< double >(val3);
8341 : }
8342 65 : {
8343 65 : if (!arg2) {
8344 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8345 : }
8346 : }
8347 65 : {
8348 65 : const int bLocalUseExceptions = GetUseExceptions();
8349 65 : if ( bLocalUseExceptions ) {
8350 58 : pushErrorHandler();
8351 : }
8352 65 : result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
8353 65 : if ( bLocalUseExceptions ) {
8354 58 : popErrorHandler();
8355 : }
8356 : #ifndef SED_HACKS
8357 : if ( bLocalUseExceptions ) {
8358 : CPLErr eclass = CPLGetLastErrorType();
8359 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8360 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8361 : }
8362 : }
8363 : #endif
8364 : }
8365 65 : resultobj = SWIG_From_double(static_cast< double >(result));
8366 65 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8367 65 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8368 : return resultobj;
8369 0 : fail:
8370 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8371 : return NULL;
8372 : }
8373 :
8374 :
8375 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8376 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8377 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8378 0 : char *arg2 = (char *) 0 ;
8379 0 : double arg3 ;
8380 0 : void *argp1 = 0 ;
8381 0 : int res1 = 0 ;
8382 0 : int res2 ;
8383 0 : char *buf2 = 0 ;
8384 0 : int alloc2 = 0 ;
8385 0 : double val3 ;
8386 0 : int ecode3 = 0 ;
8387 0 : PyObject *swig_obj[3] ;
8388 0 : OGRErr result;
8389 :
8390 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetNormProjParm", 3, 3, swig_obj)) SWIG_fail;
8391 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8392 0 : if (!SWIG_IsOK(res1)) {
8393 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8394 : }
8395 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8396 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8397 0 : if (!SWIG_IsOK(res2)) {
8398 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8399 : }
8400 0 : arg2 = reinterpret_cast< char * >(buf2);
8401 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8402 0 : if (!SWIG_IsOK(ecode3)) {
8403 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNormProjParm" "', argument " "3"" of type '" "double""'");
8404 : }
8405 0 : arg3 = static_cast< double >(val3);
8406 0 : {
8407 0 : if (!arg2) {
8408 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8409 : }
8410 : }
8411 0 : {
8412 0 : const int bLocalUseExceptions = GetUseExceptions();
8413 0 : if ( bLocalUseExceptions ) {
8414 0 : pushErrorHandler();
8415 : }
8416 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
8417 0 : if ( bLocalUseExceptions ) {
8418 0 : popErrorHandler();
8419 : }
8420 : #ifndef SED_HACKS
8421 : if ( bLocalUseExceptions ) {
8422 : CPLErr eclass = CPLGetLastErrorType();
8423 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8424 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8425 : }
8426 : }
8427 : #endif
8428 : }
8429 0 : {
8430 : /* %typemap(out) OGRErr */
8431 0 : if ( result != 0 && GetUseExceptions()) {
8432 0 : const char* pszMessage = CPLGetLastErrorMsg();
8433 0 : if( pszMessage[0] != '\0' )
8434 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8435 : else
8436 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8437 0 : SWIG_fail;
8438 : }
8439 : }
8440 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8441 0 : {
8442 : /* %typemap(ret) OGRErr */
8443 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8444 0 : resultobj = PyInt_FromLong( result );
8445 : }
8446 : }
8447 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8448 : return resultobj;
8449 0 : fail:
8450 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8451 : return NULL;
8452 : }
8453 :
8454 :
8455 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8456 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8457 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8458 1 : char *arg2 = (char *) 0 ;
8459 1 : double arg3 = (double) 0.0 ;
8460 1 : void *argp1 = 0 ;
8461 1 : int res1 = 0 ;
8462 1 : int res2 ;
8463 1 : char *buf2 = 0 ;
8464 1 : int alloc2 = 0 ;
8465 1 : double val3 ;
8466 1 : int ecode3 = 0 ;
8467 1 : PyObject *swig_obj[3] ;
8468 1 : double result;
8469 :
8470 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetNormProjParm", 2, 3, swig_obj)) SWIG_fail;
8471 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8472 1 : if (!SWIG_IsOK(res1)) {
8473 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8474 : }
8475 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8476 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8477 1 : if (!SWIG_IsOK(res2)) {
8478 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8479 : }
8480 1 : arg2 = reinterpret_cast< char * >(buf2);
8481 1 : if (swig_obj[2]) {
8482 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8483 0 : if (!SWIG_IsOK(ecode3)) {
8484 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetNormProjParm" "', argument " "3"" of type '" "double""'");
8485 : }
8486 0 : arg3 = static_cast< double >(val3);
8487 : }
8488 1 : {
8489 1 : if (!arg2) {
8490 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8491 : }
8492 : }
8493 1 : {
8494 1 : const int bLocalUseExceptions = GetUseExceptions();
8495 1 : if ( bLocalUseExceptions ) {
8496 1 : pushErrorHandler();
8497 : }
8498 1 : result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
8499 1 : if ( bLocalUseExceptions ) {
8500 1 : popErrorHandler();
8501 : }
8502 : #ifndef SED_HACKS
8503 : if ( bLocalUseExceptions ) {
8504 : CPLErr eclass = CPLGetLastErrorType();
8505 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8506 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8507 : }
8508 : }
8509 : #endif
8510 : }
8511 1 : resultobj = SWIG_From_double(static_cast< double >(result));
8512 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8513 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8514 : return resultobj;
8515 0 : fail:
8516 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8517 : return NULL;
8518 : }
8519 :
8520 :
8521 8 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8522 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8523 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8524 8 : void *argp1 = 0 ;
8525 8 : int res1 = 0 ;
8526 8 : PyObject *swig_obj[1] ;
8527 8 : double result;
8528 :
8529 8 : if (!args) SWIG_fail;
8530 8 : swig_obj[0] = args;
8531 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8532 8 : if (!SWIG_IsOK(res1)) {
8533 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8534 : }
8535 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8536 8 : {
8537 8 : const int bLocalUseExceptions = GetUseExceptions();
8538 8 : if ( bLocalUseExceptions ) {
8539 7 : pushErrorHandler();
8540 : }
8541 8 : result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
8542 8 : if ( bLocalUseExceptions ) {
8543 7 : popErrorHandler();
8544 : }
8545 : #ifndef SED_HACKS
8546 : if ( bLocalUseExceptions ) {
8547 : CPLErr eclass = CPLGetLastErrorType();
8548 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8549 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8550 : }
8551 : }
8552 : #endif
8553 : }
8554 8 : resultobj = SWIG_From_double(static_cast< double >(result));
8555 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8556 : return resultobj;
8557 : fail:
8558 : return NULL;
8559 : }
8560 :
8561 :
8562 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8563 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8564 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8565 4 : void *argp1 = 0 ;
8566 4 : int res1 = 0 ;
8567 4 : PyObject *swig_obj[1] ;
8568 4 : double result;
8569 :
8570 4 : if (!args) SWIG_fail;
8571 4 : swig_obj[0] = args;
8572 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8573 4 : if (!SWIG_IsOK(res1)) {
8574 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8575 : }
8576 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8577 4 : {
8578 4 : const int bLocalUseExceptions = GetUseExceptions();
8579 4 : if ( bLocalUseExceptions ) {
8580 3 : pushErrorHandler();
8581 : }
8582 4 : result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
8583 4 : if ( bLocalUseExceptions ) {
8584 3 : popErrorHandler();
8585 : }
8586 : #ifndef SED_HACKS
8587 : if ( bLocalUseExceptions ) {
8588 : CPLErr eclass = CPLGetLastErrorType();
8589 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8590 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8591 : }
8592 : }
8593 : #endif
8594 : }
8595 4 : resultobj = SWIG_From_double(static_cast< double >(result));
8596 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8597 : return resultobj;
8598 : fail:
8599 : return NULL;
8600 : }
8601 :
8602 :
8603 10 : SWIGINTERN PyObject *_wrap_SpatialReference_GetInvFlattening(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8604 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8605 10 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8606 10 : void *argp1 = 0 ;
8607 10 : int res1 = 0 ;
8608 10 : PyObject *swig_obj[1] ;
8609 10 : double result;
8610 :
8611 10 : if (!args) SWIG_fail;
8612 10 : swig_obj[0] = args;
8613 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8614 10 : if (!SWIG_IsOK(res1)) {
8615 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8616 : }
8617 10 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8618 10 : {
8619 10 : const int bLocalUseExceptions = GetUseExceptions();
8620 10 : if ( bLocalUseExceptions ) {
8621 7 : pushErrorHandler();
8622 : }
8623 10 : result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
8624 10 : if ( bLocalUseExceptions ) {
8625 7 : popErrorHandler();
8626 : }
8627 : #ifndef SED_HACKS
8628 : if ( bLocalUseExceptions ) {
8629 : CPLErr eclass = CPLGetLastErrorType();
8630 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8631 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8632 : }
8633 : }
8634 : #endif
8635 : }
8636 10 : resultobj = SWIG_From_double(static_cast< double >(result));
8637 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8638 : return resultobj;
8639 : fail:
8640 : return NULL;
8641 : }
8642 :
8643 :
8644 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetACEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8645 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8646 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8647 0 : double arg2 ;
8648 0 : double arg3 ;
8649 0 : double arg4 ;
8650 0 : double arg5 ;
8651 0 : double arg6 ;
8652 0 : double arg7 ;
8653 0 : void *argp1 = 0 ;
8654 0 : int res1 = 0 ;
8655 0 : double val2 ;
8656 0 : int ecode2 = 0 ;
8657 0 : double val3 ;
8658 0 : int ecode3 = 0 ;
8659 0 : double val4 ;
8660 0 : int ecode4 = 0 ;
8661 0 : double val5 ;
8662 0 : int ecode5 = 0 ;
8663 0 : double val6 ;
8664 0 : int ecode6 = 0 ;
8665 0 : double val7 ;
8666 0 : int ecode7 = 0 ;
8667 0 : PyObject * obj0 = 0 ;
8668 0 : PyObject * obj1 = 0 ;
8669 0 : PyObject * obj2 = 0 ;
8670 0 : PyObject * obj3 = 0 ;
8671 0 : PyObject * obj4 = 0 ;
8672 0 : PyObject * obj5 = 0 ;
8673 0 : PyObject * obj6 = 0 ;
8674 0 : char * kwnames[] = {
8675 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8676 : };
8677 0 : OGRErr result;
8678 :
8679 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetACEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
8680 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8681 0 : if (!SWIG_IsOK(res1)) {
8682 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetACEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8683 : }
8684 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8685 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8686 0 : if (!SWIG_IsOK(ecode2)) {
8687 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetACEA" "', argument " "2"" of type '" "double""'");
8688 : }
8689 0 : arg2 = static_cast< double >(val2);
8690 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8691 0 : if (!SWIG_IsOK(ecode3)) {
8692 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetACEA" "', argument " "3"" of type '" "double""'");
8693 : }
8694 0 : arg3 = static_cast< double >(val3);
8695 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8696 0 : if (!SWIG_IsOK(ecode4)) {
8697 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetACEA" "', argument " "4"" of type '" "double""'");
8698 : }
8699 0 : arg4 = static_cast< double >(val4);
8700 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8701 0 : if (!SWIG_IsOK(ecode5)) {
8702 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetACEA" "', argument " "5"" of type '" "double""'");
8703 : }
8704 0 : arg5 = static_cast< double >(val5);
8705 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8706 0 : if (!SWIG_IsOK(ecode6)) {
8707 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetACEA" "', argument " "6"" of type '" "double""'");
8708 : }
8709 0 : arg6 = static_cast< double >(val6);
8710 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
8711 0 : if (!SWIG_IsOK(ecode7)) {
8712 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetACEA" "', argument " "7"" of type '" "double""'");
8713 : }
8714 0 : arg7 = static_cast< double >(val7);
8715 0 : {
8716 0 : const int bLocalUseExceptions = GetUseExceptions();
8717 0 : if ( bLocalUseExceptions ) {
8718 0 : pushErrorHandler();
8719 : }
8720 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
8721 0 : if ( bLocalUseExceptions ) {
8722 0 : popErrorHandler();
8723 : }
8724 : #ifndef SED_HACKS
8725 : if ( bLocalUseExceptions ) {
8726 : CPLErr eclass = CPLGetLastErrorType();
8727 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8728 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8729 : }
8730 : }
8731 : #endif
8732 : }
8733 0 : {
8734 : /* %typemap(out) OGRErr */
8735 0 : if ( result != 0 && GetUseExceptions()) {
8736 0 : const char* pszMessage = CPLGetLastErrorMsg();
8737 0 : if( pszMessage[0] != '\0' )
8738 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8739 : else
8740 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8741 0 : SWIG_fail;
8742 : }
8743 : }
8744 0 : {
8745 : /* %typemap(ret) OGRErr */
8746 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8747 0 : resultobj = PyInt_FromLong( result );
8748 : }
8749 : }
8750 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8751 : return resultobj;
8752 : fail:
8753 : return NULL;
8754 : }
8755 :
8756 :
8757 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAE(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8758 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8759 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8760 0 : double arg2 ;
8761 0 : double arg3 ;
8762 0 : double arg4 ;
8763 0 : double arg5 ;
8764 0 : void *argp1 = 0 ;
8765 0 : int res1 = 0 ;
8766 0 : double val2 ;
8767 0 : int ecode2 = 0 ;
8768 0 : double val3 ;
8769 0 : int ecode3 = 0 ;
8770 0 : double val4 ;
8771 0 : int ecode4 = 0 ;
8772 0 : double val5 ;
8773 0 : int ecode5 = 0 ;
8774 0 : PyObject * obj0 = 0 ;
8775 0 : PyObject * obj1 = 0 ;
8776 0 : PyObject * obj2 = 0 ;
8777 0 : PyObject * obj3 = 0 ;
8778 0 : PyObject * obj4 = 0 ;
8779 0 : char * kwnames[] = {
8780 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8781 : };
8782 0 : OGRErr result;
8783 :
8784 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetAE", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8785 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8786 0 : if (!SWIG_IsOK(res1)) {
8787 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAE" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8788 : }
8789 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8790 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8791 0 : if (!SWIG_IsOK(ecode2)) {
8792 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAE" "', argument " "2"" of type '" "double""'");
8793 : }
8794 0 : arg2 = static_cast< double >(val2);
8795 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8796 0 : if (!SWIG_IsOK(ecode3)) {
8797 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAE" "', argument " "3"" of type '" "double""'");
8798 : }
8799 0 : arg3 = static_cast< double >(val3);
8800 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8801 0 : if (!SWIG_IsOK(ecode4)) {
8802 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAE" "', argument " "4"" of type '" "double""'");
8803 : }
8804 0 : arg4 = static_cast< double >(val4);
8805 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8806 0 : if (!SWIG_IsOK(ecode5)) {
8807 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetAE" "', argument " "5"" of type '" "double""'");
8808 : }
8809 0 : arg5 = static_cast< double >(val5);
8810 0 : {
8811 0 : const int bLocalUseExceptions = GetUseExceptions();
8812 0 : if ( bLocalUseExceptions ) {
8813 0 : pushErrorHandler();
8814 : }
8815 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
8816 0 : if ( bLocalUseExceptions ) {
8817 0 : popErrorHandler();
8818 : }
8819 : #ifndef SED_HACKS
8820 : if ( bLocalUseExceptions ) {
8821 : CPLErr eclass = CPLGetLastErrorType();
8822 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8823 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8824 : }
8825 : }
8826 : #endif
8827 : }
8828 0 : {
8829 : /* %typemap(out) OGRErr */
8830 0 : if ( result != 0 && GetUseExceptions()) {
8831 0 : const char* pszMessage = CPLGetLastErrorMsg();
8832 0 : if( pszMessage[0] != '\0' )
8833 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8834 : else
8835 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8836 0 : SWIG_fail;
8837 : }
8838 : }
8839 0 : {
8840 : /* %typemap(ret) OGRErr */
8841 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8842 0 : resultobj = PyInt_FromLong( result );
8843 : }
8844 : }
8845 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8846 : return resultobj;
8847 : fail:
8848 : return NULL;
8849 : }
8850 :
8851 :
8852 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetBonne(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8853 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8854 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8855 0 : double arg2 ;
8856 0 : double arg3 ;
8857 0 : double arg4 ;
8858 0 : double arg5 ;
8859 0 : void *argp1 = 0 ;
8860 0 : int res1 = 0 ;
8861 0 : double val2 ;
8862 0 : int ecode2 = 0 ;
8863 0 : double val3 ;
8864 0 : int ecode3 = 0 ;
8865 0 : double val4 ;
8866 0 : int ecode4 = 0 ;
8867 0 : double val5 ;
8868 0 : int ecode5 = 0 ;
8869 0 : PyObject * obj0 = 0 ;
8870 0 : PyObject * obj1 = 0 ;
8871 0 : PyObject * obj2 = 0 ;
8872 0 : PyObject * obj3 = 0 ;
8873 0 : PyObject * obj4 = 0 ;
8874 0 : char * kwnames[] = {
8875 : (char *)"self", (char *)"stdp", (char *)"cm", (char *)"fe", (char *)"fn", NULL
8876 : };
8877 0 : OGRErr result;
8878 :
8879 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetBonne", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8880 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8881 0 : if (!SWIG_IsOK(res1)) {
8882 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetBonne" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8883 : }
8884 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8885 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8886 0 : if (!SWIG_IsOK(ecode2)) {
8887 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetBonne" "', argument " "2"" of type '" "double""'");
8888 : }
8889 0 : arg2 = static_cast< double >(val2);
8890 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8891 0 : if (!SWIG_IsOK(ecode3)) {
8892 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetBonne" "', argument " "3"" of type '" "double""'");
8893 : }
8894 0 : arg3 = static_cast< double >(val3);
8895 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8896 0 : if (!SWIG_IsOK(ecode4)) {
8897 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetBonne" "', argument " "4"" of type '" "double""'");
8898 : }
8899 0 : arg4 = static_cast< double >(val4);
8900 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8901 0 : if (!SWIG_IsOK(ecode5)) {
8902 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetBonne" "', argument " "5"" of type '" "double""'");
8903 : }
8904 0 : arg5 = static_cast< double >(val5);
8905 0 : {
8906 0 : const int bLocalUseExceptions = GetUseExceptions();
8907 0 : if ( bLocalUseExceptions ) {
8908 0 : pushErrorHandler();
8909 : }
8910 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
8911 0 : if ( bLocalUseExceptions ) {
8912 0 : popErrorHandler();
8913 : }
8914 : #ifndef SED_HACKS
8915 : if ( bLocalUseExceptions ) {
8916 : CPLErr eclass = CPLGetLastErrorType();
8917 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8918 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8919 : }
8920 : }
8921 : #endif
8922 : }
8923 0 : {
8924 : /* %typemap(out) OGRErr */
8925 0 : if ( result != 0 && GetUseExceptions()) {
8926 0 : const char* pszMessage = CPLGetLastErrorMsg();
8927 0 : if( pszMessage[0] != '\0' )
8928 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8929 : else
8930 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8931 0 : SWIG_fail;
8932 : }
8933 : }
8934 0 : {
8935 : /* %typemap(ret) OGRErr */
8936 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8937 0 : resultobj = PyInt_FromLong( result );
8938 : }
8939 : }
8940 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8941 : return resultobj;
8942 : fail:
8943 : return NULL;
8944 : }
8945 :
8946 :
8947 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8948 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8949 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8950 0 : double arg2 ;
8951 0 : double arg3 ;
8952 0 : double arg4 ;
8953 0 : double arg5 ;
8954 0 : void *argp1 = 0 ;
8955 0 : int res1 = 0 ;
8956 0 : double val2 ;
8957 0 : int ecode2 = 0 ;
8958 0 : double val3 ;
8959 0 : int ecode3 = 0 ;
8960 0 : double val4 ;
8961 0 : int ecode4 = 0 ;
8962 0 : double val5 ;
8963 0 : int ecode5 = 0 ;
8964 0 : PyObject * obj0 = 0 ;
8965 0 : PyObject * obj1 = 0 ;
8966 0 : PyObject * obj2 = 0 ;
8967 0 : PyObject * obj3 = 0 ;
8968 0 : PyObject * obj4 = 0 ;
8969 0 : char * kwnames[] = {
8970 : (char *)"self", (char *)"stdp1", (char *)"cm", (char *)"fe", (char *)"fn", NULL
8971 : };
8972 0 : OGRErr result;
8973 :
8974 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8975 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8976 0 : if (!SWIG_IsOK(res1)) {
8977 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8978 : }
8979 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8980 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8981 0 : if (!SWIG_IsOK(ecode2)) {
8982 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCEA" "', argument " "2"" of type '" "double""'");
8983 : }
8984 0 : arg2 = static_cast< double >(val2);
8985 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8986 0 : if (!SWIG_IsOK(ecode3)) {
8987 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCEA" "', argument " "3"" of type '" "double""'");
8988 : }
8989 0 : arg3 = static_cast< double >(val3);
8990 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8991 0 : if (!SWIG_IsOK(ecode4)) {
8992 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCEA" "', argument " "4"" of type '" "double""'");
8993 : }
8994 0 : arg4 = static_cast< double >(val4);
8995 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8996 0 : if (!SWIG_IsOK(ecode5)) {
8997 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCEA" "', argument " "5"" of type '" "double""'");
8998 : }
8999 0 : arg5 = static_cast< double >(val5);
9000 0 : {
9001 0 : const int bLocalUseExceptions = GetUseExceptions();
9002 0 : if ( bLocalUseExceptions ) {
9003 0 : pushErrorHandler();
9004 : }
9005 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
9006 0 : if ( bLocalUseExceptions ) {
9007 0 : popErrorHandler();
9008 : }
9009 : #ifndef SED_HACKS
9010 : if ( bLocalUseExceptions ) {
9011 : CPLErr eclass = CPLGetLastErrorType();
9012 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9013 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9014 : }
9015 : }
9016 : #endif
9017 : }
9018 0 : {
9019 : /* %typemap(out) OGRErr */
9020 0 : if ( result != 0 && GetUseExceptions()) {
9021 0 : const char* pszMessage = CPLGetLastErrorMsg();
9022 0 : if( pszMessage[0] != '\0' )
9023 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9024 : else
9025 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9026 0 : SWIG_fail;
9027 : }
9028 : }
9029 0 : {
9030 : /* %typemap(ret) OGRErr */
9031 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9032 0 : resultobj = PyInt_FromLong( result );
9033 : }
9034 : }
9035 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9036 : return resultobj;
9037 : fail:
9038 : return NULL;
9039 : }
9040 :
9041 :
9042 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9043 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9044 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9045 0 : double arg2 ;
9046 0 : double arg3 ;
9047 0 : double arg4 ;
9048 0 : double arg5 ;
9049 0 : void *argp1 = 0 ;
9050 0 : int res1 = 0 ;
9051 0 : double val2 ;
9052 0 : int ecode2 = 0 ;
9053 0 : double val3 ;
9054 0 : int ecode3 = 0 ;
9055 0 : double val4 ;
9056 0 : int ecode4 = 0 ;
9057 0 : double val5 ;
9058 0 : int ecode5 = 0 ;
9059 0 : PyObject * obj0 = 0 ;
9060 0 : PyObject * obj1 = 0 ;
9061 0 : PyObject * obj2 = 0 ;
9062 0 : PyObject * obj3 = 0 ;
9063 0 : PyObject * obj4 = 0 ;
9064 0 : char * kwnames[] = {
9065 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9066 : };
9067 0 : OGRErr result;
9068 :
9069 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9070 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9071 0 : if (!SWIG_IsOK(res1)) {
9072 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9073 : }
9074 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9075 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9076 0 : if (!SWIG_IsOK(ecode2)) {
9077 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCS" "', argument " "2"" of type '" "double""'");
9078 : }
9079 0 : arg2 = static_cast< double >(val2);
9080 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9081 0 : if (!SWIG_IsOK(ecode3)) {
9082 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCS" "', argument " "3"" of type '" "double""'");
9083 : }
9084 0 : arg3 = static_cast< double >(val3);
9085 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9086 0 : if (!SWIG_IsOK(ecode4)) {
9087 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCS" "', argument " "4"" of type '" "double""'");
9088 : }
9089 0 : arg4 = static_cast< double >(val4);
9090 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9091 0 : if (!SWIG_IsOK(ecode5)) {
9092 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCS" "', argument " "5"" of type '" "double""'");
9093 : }
9094 0 : arg5 = static_cast< double >(val5);
9095 0 : {
9096 0 : const int bLocalUseExceptions = GetUseExceptions();
9097 0 : if ( bLocalUseExceptions ) {
9098 0 : pushErrorHandler();
9099 : }
9100 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
9101 0 : if ( bLocalUseExceptions ) {
9102 0 : popErrorHandler();
9103 : }
9104 : #ifndef SED_HACKS
9105 : if ( bLocalUseExceptions ) {
9106 : CPLErr eclass = CPLGetLastErrorType();
9107 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9108 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9109 : }
9110 : }
9111 : #endif
9112 : }
9113 0 : {
9114 : /* %typemap(out) OGRErr */
9115 0 : if ( result != 0 && GetUseExceptions()) {
9116 0 : const char* pszMessage = CPLGetLastErrorMsg();
9117 0 : if( pszMessage[0] != '\0' )
9118 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9119 : else
9120 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9121 0 : SWIG_fail;
9122 : }
9123 : }
9124 0 : {
9125 : /* %typemap(ret) OGRErr */
9126 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9127 0 : resultobj = PyInt_FromLong( result );
9128 : }
9129 : }
9130 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9131 : return resultobj;
9132 : fail:
9133 : return NULL;
9134 : }
9135 :
9136 :
9137 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9138 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9139 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9140 0 : double arg2 ;
9141 0 : double arg3 ;
9142 0 : double arg4 ;
9143 0 : double arg5 ;
9144 0 : double arg6 ;
9145 0 : double arg7 ;
9146 0 : void *argp1 = 0 ;
9147 0 : int res1 = 0 ;
9148 0 : double val2 ;
9149 0 : int ecode2 = 0 ;
9150 0 : double val3 ;
9151 0 : int ecode3 = 0 ;
9152 0 : double val4 ;
9153 0 : int ecode4 = 0 ;
9154 0 : double val5 ;
9155 0 : int ecode5 = 0 ;
9156 0 : double val6 ;
9157 0 : int ecode6 = 0 ;
9158 0 : double val7 ;
9159 0 : int ecode7 = 0 ;
9160 0 : PyObject * obj0 = 0 ;
9161 0 : PyObject * obj1 = 0 ;
9162 0 : PyObject * obj2 = 0 ;
9163 0 : PyObject * obj3 = 0 ;
9164 0 : PyObject * obj4 = 0 ;
9165 0 : PyObject * obj5 = 0 ;
9166 0 : PyObject * obj6 = 0 ;
9167 0 : char * kwnames[] = {
9168 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9169 : };
9170 0 : OGRErr result;
9171 :
9172 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetEC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
9173 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9174 0 : if (!SWIG_IsOK(res1)) {
9175 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9176 : }
9177 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9178 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9179 0 : if (!SWIG_IsOK(ecode2)) {
9180 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEC" "', argument " "2"" of type '" "double""'");
9181 : }
9182 0 : arg2 = static_cast< double >(val2);
9183 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9184 0 : if (!SWIG_IsOK(ecode3)) {
9185 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEC" "', argument " "3"" of type '" "double""'");
9186 : }
9187 0 : arg3 = static_cast< double >(val3);
9188 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9189 0 : if (!SWIG_IsOK(ecode4)) {
9190 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEC" "', argument " "4"" of type '" "double""'");
9191 : }
9192 0 : arg4 = static_cast< double >(val4);
9193 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9194 0 : if (!SWIG_IsOK(ecode5)) {
9195 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEC" "', argument " "5"" of type '" "double""'");
9196 : }
9197 0 : arg5 = static_cast< double >(val5);
9198 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9199 0 : if (!SWIG_IsOK(ecode6)) {
9200 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEC" "', argument " "6"" of type '" "double""'");
9201 : }
9202 0 : arg6 = static_cast< double >(val6);
9203 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9204 0 : if (!SWIG_IsOK(ecode7)) {
9205 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetEC" "', argument " "7"" of type '" "double""'");
9206 : }
9207 0 : arg7 = static_cast< double >(val7);
9208 0 : {
9209 0 : const int bLocalUseExceptions = GetUseExceptions();
9210 0 : if ( bLocalUseExceptions ) {
9211 0 : pushErrorHandler();
9212 : }
9213 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
9214 0 : if ( bLocalUseExceptions ) {
9215 0 : popErrorHandler();
9216 : }
9217 : #ifndef SED_HACKS
9218 : if ( bLocalUseExceptions ) {
9219 : CPLErr eclass = CPLGetLastErrorType();
9220 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9221 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9222 : }
9223 : }
9224 : #endif
9225 : }
9226 0 : {
9227 : /* %typemap(out) OGRErr */
9228 0 : if ( result != 0 && GetUseExceptions()) {
9229 0 : const char* pszMessage = CPLGetLastErrorMsg();
9230 0 : if( pszMessage[0] != '\0' )
9231 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9232 : else
9233 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9234 0 : SWIG_fail;
9235 : }
9236 : }
9237 0 : {
9238 : /* %typemap(ret) OGRErr */
9239 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9240 0 : resultobj = PyInt_FromLong( result );
9241 : }
9242 : }
9243 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9244 : return resultobj;
9245 : fail:
9246 : return NULL;
9247 : }
9248 :
9249 :
9250 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9251 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9252 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9253 0 : double arg2 ;
9254 0 : double arg3 ;
9255 0 : double arg4 ;
9256 0 : void *argp1 = 0 ;
9257 0 : int res1 = 0 ;
9258 0 : double val2 ;
9259 0 : int ecode2 = 0 ;
9260 0 : double val3 ;
9261 0 : int ecode3 = 0 ;
9262 0 : double val4 ;
9263 0 : int ecode4 = 0 ;
9264 0 : PyObject * obj0 = 0 ;
9265 0 : PyObject * obj1 = 0 ;
9266 0 : PyObject * obj2 = 0 ;
9267 0 : PyObject * obj3 = 0 ;
9268 0 : char * kwnames[] = {
9269 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9270 : };
9271 0 : OGRErr result;
9272 :
9273 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertIV", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9274 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9275 0 : if (!SWIG_IsOK(res1)) {
9276 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertIV" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9277 : }
9278 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9279 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9280 0 : if (!SWIG_IsOK(ecode2)) {
9281 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertIV" "', argument " "2"" of type '" "double""'");
9282 : }
9283 0 : arg2 = static_cast< double >(val2);
9284 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9285 0 : if (!SWIG_IsOK(ecode3)) {
9286 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertIV" "', argument " "3"" of type '" "double""'");
9287 : }
9288 0 : arg3 = static_cast< double >(val3);
9289 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9290 0 : if (!SWIG_IsOK(ecode4)) {
9291 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertIV" "', argument " "4"" of type '" "double""'");
9292 : }
9293 0 : arg4 = static_cast< double >(val4);
9294 0 : {
9295 0 : const int bLocalUseExceptions = GetUseExceptions();
9296 0 : if ( bLocalUseExceptions ) {
9297 0 : pushErrorHandler();
9298 : }
9299 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
9300 0 : if ( bLocalUseExceptions ) {
9301 0 : popErrorHandler();
9302 : }
9303 : #ifndef SED_HACKS
9304 : if ( bLocalUseExceptions ) {
9305 : CPLErr eclass = CPLGetLastErrorType();
9306 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9307 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9308 : }
9309 : }
9310 : #endif
9311 : }
9312 0 : {
9313 : /* %typemap(out) OGRErr */
9314 0 : if ( result != 0 && GetUseExceptions()) {
9315 0 : const char* pszMessage = CPLGetLastErrorMsg();
9316 0 : if( pszMessage[0] != '\0' )
9317 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9318 : else
9319 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9320 0 : SWIG_fail;
9321 : }
9322 : }
9323 0 : {
9324 : /* %typemap(ret) OGRErr */
9325 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9326 0 : resultobj = PyInt_FromLong( result );
9327 : }
9328 : }
9329 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9330 : return resultobj;
9331 : fail:
9332 : return NULL;
9333 : }
9334 :
9335 :
9336 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertVI(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9337 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9338 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9339 0 : double arg2 ;
9340 0 : double arg3 ;
9341 0 : double arg4 ;
9342 0 : void *argp1 = 0 ;
9343 0 : int res1 = 0 ;
9344 0 : double val2 ;
9345 0 : int ecode2 = 0 ;
9346 0 : double val3 ;
9347 0 : int ecode3 = 0 ;
9348 0 : double val4 ;
9349 0 : int ecode4 = 0 ;
9350 0 : PyObject * obj0 = 0 ;
9351 0 : PyObject * obj1 = 0 ;
9352 0 : PyObject * obj2 = 0 ;
9353 0 : PyObject * obj3 = 0 ;
9354 0 : char * kwnames[] = {
9355 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9356 : };
9357 0 : OGRErr result;
9358 :
9359 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertVI", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9360 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9361 0 : if (!SWIG_IsOK(res1)) {
9362 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertVI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9363 : }
9364 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9365 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9366 0 : if (!SWIG_IsOK(ecode2)) {
9367 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertVI" "', argument " "2"" of type '" "double""'");
9368 : }
9369 0 : arg2 = static_cast< double >(val2);
9370 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9371 0 : if (!SWIG_IsOK(ecode3)) {
9372 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertVI" "', argument " "3"" of type '" "double""'");
9373 : }
9374 0 : arg3 = static_cast< double >(val3);
9375 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9376 0 : if (!SWIG_IsOK(ecode4)) {
9377 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertVI" "', argument " "4"" of type '" "double""'");
9378 : }
9379 0 : arg4 = static_cast< double >(val4);
9380 0 : {
9381 0 : const int bLocalUseExceptions = GetUseExceptions();
9382 0 : if ( bLocalUseExceptions ) {
9383 0 : pushErrorHandler();
9384 : }
9385 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
9386 0 : if ( bLocalUseExceptions ) {
9387 0 : popErrorHandler();
9388 : }
9389 : #ifndef SED_HACKS
9390 : if ( bLocalUseExceptions ) {
9391 : CPLErr eclass = CPLGetLastErrorType();
9392 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9393 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9394 : }
9395 : }
9396 : #endif
9397 : }
9398 0 : {
9399 : /* %typemap(out) OGRErr */
9400 0 : if ( result != 0 && GetUseExceptions()) {
9401 0 : const char* pszMessage = CPLGetLastErrorMsg();
9402 0 : if( pszMessage[0] != '\0' )
9403 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9404 : else
9405 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9406 0 : SWIG_fail;
9407 : }
9408 : }
9409 0 : {
9410 : /* %typemap(ret) OGRErr */
9411 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9412 0 : resultobj = PyInt_FromLong( result );
9413 : }
9414 : }
9415 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9416 : return resultobj;
9417 : fail:
9418 : return NULL;
9419 : }
9420 :
9421 :
9422 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9423 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9424 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9425 0 : double arg2 ;
9426 0 : double arg3 ;
9427 0 : double arg4 ;
9428 0 : double arg5 ;
9429 0 : void *argp1 = 0 ;
9430 0 : int res1 = 0 ;
9431 0 : double val2 ;
9432 0 : int ecode2 = 0 ;
9433 0 : double val3 ;
9434 0 : int ecode3 = 0 ;
9435 0 : double val4 ;
9436 0 : int ecode4 = 0 ;
9437 0 : double val5 ;
9438 0 : int ecode5 = 0 ;
9439 0 : PyObject * obj0 = 0 ;
9440 0 : PyObject * obj1 = 0 ;
9441 0 : PyObject * obj2 = 0 ;
9442 0 : PyObject * obj3 = 0 ;
9443 0 : PyObject * obj4 = 0 ;
9444 0 : char * kwnames[] = {
9445 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9446 : };
9447 0 : OGRErr result;
9448 :
9449 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetEquirectangular", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9450 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9451 0 : if (!SWIG_IsOK(res1)) {
9452 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9453 : }
9454 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9455 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9456 0 : if (!SWIG_IsOK(ecode2)) {
9457 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular" "', argument " "2"" of type '" "double""'");
9458 : }
9459 0 : arg2 = static_cast< double >(val2);
9460 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9461 0 : if (!SWIG_IsOK(ecode3)) {
9462 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular" "', argument " "3"" of type '" "double""'");
9463 : }
9464 0 : arg3 = static_cast< double >(val3);
9465 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9466 0 : if (!SWIG_IsOK(ecode4)) {
9467 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular" "', argument " "4"" of type '" "double""'");
9468 : }
9469 0 : arg4 = static_cast< double >(val4);
9470 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9471 0 : if (!SWIG_IsOK(ecode5)) {
9472 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular" "', argument " "5"" of type '" "double""'");
9473 : }
9474 0 : arg5 = static_cast< double >(val5);
9475 0 : {
9476 0 : const int bLocalUseExceptions = GetUseExceptions();
9477 0 : if ( bLocalUseExceptions ) {
9478 0 : pushErrorHandler();
9479 : }
9480 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
9481 0 : if ( bLocalUseExceptions ) {
9482 0 : popErrorHandler();
9483 : }
9484 : #ifndef SED_HACKS
9485 : if ( bLocalUseExceptions ) {
9486 : CPLErr eclass = CPLGetLastErrorType();
9487 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9488 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9489 : }
9490 : }
9491 : #endif
9492 : }
9493 0 : {
9494 : /* %typemap(out) OGRErr */
9495 0 : if ( result != 0 && GetUseExceptions()) {
9496 0 : const char* pszMessage = CPLGetLastErrorMsg();
9497 0 : if( pszMessage[0] != '\0' )
9498 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9499 : else
9500 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9501 0 : SWIG_fail;
9502 : }
9503 : }
9504 0 : {
9505 : /* %typemap(ret) OGRErr */
9506 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9507 0 : resultobj = PyInt_FromLong( result );
9508 : }
9509 : }
9510 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9511 : return resultobj;
9512 : fail:
9513 : return NULL;
9514 : }
9515 :
9516 :
9517 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular2(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9518 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9519 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9520 3 : double arg2 ;
9521 3 : double arg3 ;
9522 3 : double arg4 ;
9523 3 : double arg5 ;
9524 3 : double arg6 ;
9525 3 : void *argp1 = 0 ;
9526 3 : int res1 = 0 ;
9527 3 : double val2 ;
9528 3 : int ecode2 = 0 ;
9529 3 : double val3 ;
9530 3 : int ecode3 = 0 ;
9531 3 : double val4 ;
9532 3 : int ecode4 = 0 ;
9533 3 : double val5 ;
9534 3 : int ecode5 = 0 ;
9535 3 : double val6 ;
9536 3 : int ecode6 = 0 ;
9537 3 : PyObject * obj0 = 0 ;
9538 3 : PyObject * obj1 = 0 ;
9539 3 : PyObject * obj2 = 0 ;
9540 3 : PyObject * obj3 = 0 ;
9541 3 : PyObject * obj4 = 0 ;
9542 3 : PyObject * obj5 = 0 ;
9543 3 : char * kwnames[] = {
9544 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"pseudostdparallellat", (char *)"fe", (char *)"fn", NULL
9545 : };
9546 3 : OGRErr result;
9547 :
9548 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetEquirectangular2", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9549 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9550 3 : if (!SWIG_IsOK(res1)) {
9551 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9552 : }
9553 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9554 3 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9555 3 : if (!SWIG_IsOK(ecode2)) {
9556 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "2"" of type '" "double""'");
9557 : }
9558 3 : arg2 = static_cast< double >(val2);
9559 3 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9560 3 : if (!SWIG_IsOK(ecode3)) {
9561 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "3"" of type '" "double""'");
9562 : }
9563 3 : arg3 = static_cast< double >(val3);
9564 3 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9565 3 : if (!SWIG_IsOK(ecode4)) {
9566 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "4"" of type '" "double""'");
9567 : }
9568 3 : arg4 = static_cast< double >(val4);
9569 3 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9570 3 : if (!SWIG_IsOK(ecode5)) {
9571 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "5"" of type '" "double""'");
9572 : }
9573 3 : arg5 = static_cast< double >(val5);
9574 3 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9575 3 : if (!SWIG_IsOK(ecode6)) {
9576 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "6"" of type '" "double""'");
9577 : }
9578 3 : arg6 = static_cast< double >(val6);
9579 3 : {
9580 3 : const int bLocalUseExceptions = GetUseExceptions();
9581 3 : if ( bLocalUseExceptions ) {
9582 3 : pushErrorHandler();
9583 : }
9584 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
9585 3 : if ( bLocalUseExceptions ) {
9586 3 : popErrorHandler();
9587 : }
9588 : #ifndef SED_HACKS
9589 : if ( bLocalUseExceptions ) {
9590 : CPLErr eclass = CPLGetLastErrorType();
9591 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9592 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9593 : }
9594 : }
9595 : #endif
9596 : }
9597 3 : {
9598 : /* %typemap(out) OGRErr */
9599 3 : if ( result != 0 && GetUseExceptions()) {
9600 0 : const char* pszMessage = CPLGetLastErrorMsg();
9601 0 : if( pszMessage[0] != '\0' )
9602 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9603 : else
9604 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9605 0 : SWIG_fail;
9606 : }
9607 : }
9608 3 : {
9609 : /* %typemap(ret) OGRErr */
9610 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9611 3 : resultobj = PyInt_FromLong( result );
9612 : }
9613 : }
9614 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9615 : return resultobj;
9616 : fail:
9617 : return NULL;
9618 : }
9619 :
9620 :
9621 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGaussSchreiberTMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9622 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9623 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9624 0 : double arg2 ;
9625 0 : double arg3 ;
9626 0 : double arg4 ;
9627 0 : double arg5 ;
9628 0 : double arg6 ;
9629 0 : void *argp1 = 0 ;
9630 0 : int res1 = 0 ;
9631 0 : double val2 ;
9632 0 : int ecode2 = 0 ;
9633 0 : double val3 ;
9634 0 : int ecode3 = 0 ;
9635 0 : double val4 ;
9636 0 : int ecode4 = 0 ;
9637 0 : double val5 ;
9638 0 : int ecode5 = 0 ;
9639 0 : double val6 ;
9640 0 : int ecode6 = 0 ;
9641 0 : PyObject * obj0 = 0 ;
9642 0 : PyObject * obj1 = 0 ;
9643 0 : PyObject * obj2 = 0 ;
9644 0 : PyObject * obj3 = 0 ;
9645 0 : PyObject * obj4 = 0 ;
9646 0 : PyObject * obj5 = 0 ;
9647 0 : char * kwnames[] = {
9648 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"sc", (char *)"fe", (char *)"fn", NULL
9649 : };
9650 0 : OGRErr result;
9651 :
9652 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetGaussSchreiberTMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9653 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9654 0 : if (!SWIG_IsOK(res1)) {
9655 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9656 : }
9657 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9658 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9659 0 : if (!SWIG_IsOK(ecode2)) {
9660 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "2"" of type '" "double""'");
9661 : }
9662 0 : arg2 = static_cast< double >(val2);
9663 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9664 0 : if (!SWIG_IsOK(ecode3)) {
9665 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "3"" of type '" "double""'");
9666 : }
9667 0 : arg3 = static_cast< double >(val3);
9668 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9669 0 : if (!SWIG_IsOK(ecode4)) {
9670 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "4"" of type '" "double""'");
9671 : }
9672 0 : arg4 = static_cast< double >(val4);
9673 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9674 0 : if (!SWIG_IsOK(ecode5)) {
9675 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "5"" of type '" "double""'");
9676 : }
9677 0 : arg5 = static_cast< double >(val5);
9678 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9679 0 : if (!SWIG_IsOK(ecode6)) {
9680 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "6"" of type '" "double""'");
9681 : }
9682 0 : arg6 = static_cast< double >(val6);
9683 0 : {
9684 0 : const int bLocalUseExceptions = GetUseExceptions();
9685 0 : if ( bLocalUseExceptions ) {
9686 0 : pushErrorHandler();
9687 : }
9688 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
9689 0 : if ( bLocalUseExceptions ) {
9690 0 : popErrorHandler();
9691 : }
9692 : #ifndef SED_HACKS
9693 : if ( bLocalUseExceptions ) {
9694 : CPLErr eclass = CPLGetLastErrorType();
9695 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9696 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9697 : }
9698 : }
9699 : #endif
9700 : }
9701 0 : {
9702 : /* %typemap(out) OGRErr */
9703 0 : if ( result != 0 && GetUseExceptions()) {
9704 0 : const char* pszMessage = CPLGetLastErrorMsg();
9705 0 : if( pszMessage[0] != '\0' )
9706 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9707 : else
9708 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9709 0 : SWIG_fail;
9710 : }
9711 : }
9712 0 : {
9713 : /* %typemap(ret) OGRErr */
9714 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9715 0 : resultobj = PyInt_FromLong( result );
9716 : }
9717 : }
9718 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9719 : return resultobj;
9720 : fail:
9721 : return NULL;
9722 : }
9723 :
9724 :
9725 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9726 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9727 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9728 1 : double arg2 ;
9729 1 : double arg3 ;
9730 1 : double arg4 ;
9731 1 : void *argp1 = 0 ;
9732 1 : int res1 = 0 ;
9733 1 : double val2 ;
9734 1 : int ecode2 = 0 ;
9735 1 : double val3 ;
9736 1 : int ecode3 = 0 ;
9737 1 : double val4 ;
9738 1 : int ecode4 = 0 ;
9739 1 : PyObject * obj0 = 0 ;
9740 1 : PyObject * obj1 = 0 ;
9741 1 : PyObject * obj2 = 0 ;
9742 1 : PyObject * obj3 = 0 ;
9743 1 : char * kwnames[] = {
9744 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9745 : };
9746 1 : OGRErr result;
9747 :
9748 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGS", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9749 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9750 1 : if (!SWIG_IsOK(res1)) {
9751 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9752 : }
9753 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9754 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9755 1 : if (!SWIG_IsOK(ecode2)) {
9756 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGS" "', argument " "2"" of type '" "double""'");
9757 : }
9758 1 : arg2 = static_cast< double >(val2);
9759 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9760 1 : if (!SWIG_IsOK(ecode3)) {
9761 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGS" "', argument " "3"" of type '" "double""'");
9762 : }
9763 1 : arg3 = static_cast< double >(val3);
9764 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9765 1 : if (!SWIG_IsOK(ecode4)) {
9766 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGS" "', argument " "4"" of type '" "double""'");
9767 : }
9768 1 : arg4 = static_cast< double >(val4);
9769 1 : {
9770 1 : const int bLocalUseExceptions = GetUseExceptions();
9771 1 : if ( bLocalUseExceptions ) {
9772 1 : pushErrorHandler();
9773 : }
9774 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
9775 1 : if ( bLocalUseExceptions ) {
9776 1 : popErrorHandler();
9777 : }
9778 : #ifndef SED_HACKS
9779 : if ( bLocalUseExceptions ) {
9780 : CPLErr eclass = CPLGetLastErrorType();
9781 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9782 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9783 : }
9784 : }
9785 : #endif
9786 : }
9787 1 : {
9788 : /* %typemap(out) OGRErr */
9789 1 : if ( result != 0 && GetUseExceptions()) {
9790 0 : const char* pszMessage = CPLGetLastErrorMsg();
9791 0 : if( pszMessage[0] != '\0' )
9792 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9793 : else
9794 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9795 0 : SWIG_fail;
9796 : }
9797 : }
9798 1 : {
9799 : /* %typemap(ret) OGRErr */
9800 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9801 1 : resultobj = PyInt_FromLong( result );
9802 : }
9803 : }
9804 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9805 : return resultobj;
9806 : fail:
9807 : return NULL;
9808 : }
9809 :
9810 :
9811 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9812 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9813 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9814 0 : double arg2 ;
9815 0 : double arg3 ;
9816 0 : double arg4 ;
9817 0 : void *argp1 = 0 ;
9818 0 : int res1 = 0 ;
9819 0 : double val2 ;
9820 0 : int ecode2 = 0 ;
9821 0 : double val3 ;
9822 0 : int ecode3 = 0 ;
9823 0 : double val4 ;
9824 0 : int ecode4 = 0 ;
9825 0 : PyObject * obj0 = 0 ;
9826 0 : PyObject * obj1 = 0 ;
9827 0 : PyObject * obj2 = 0 ;
9828 0 : PyObject * obj3 = 0 ;
9829 0 : char * kwnames[] = {
9830 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9831 : };
9832 0 : OGRErr result;
9833 :
9834 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGH", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9835 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9836 0 : if (!SWIG_IsOK(res1)) {
9837 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9838 : }
9839 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9840 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9841 0 : if (!SWIG_IsOK(ecode2)) {
9842 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGH" "', argument " "2"" of type '" "double""'");
9843 : }
9844 0 : arg2 = static_cast< double >(val2);
9845 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9846 0 : if (!SWIG_IsOK(ecode3)) {
9847 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGH" "', argument " "3"" of type '" "double""'");
9848 : }
9849 0 : arg3 = static_cast< double >(val3);
9850 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9851 0 : if (!SWIG_IsOK(ecode4)) {
9852 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGH" "', argument " "4"" of type '" "double""'");
9853 : }
9854 0 : arg4 = static_cast< double >(val4);
9855 0 : {
9856 0 : const int bLocalUseExceptions = GetUseExceptions();
9857 0 : if ( bLocalUseExceptions ) {
9858 0 : pushErrorHandler();
9859 : }
9860 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
9861 0 : if ( bLocalUseExceptions ) {
9862 0 : popErrorHandler();
9863 : }
9864 : #ifndef SED_HACKS
9865 : if ( bLocalUseExceptions ) {
9866 : CPLErr eclass = CPLGetLastErrorType();
9867 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9868 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9869 : }
9870 : }
9871 : #endif
9872 : }
9873 0 : {
9874 : /* %typemap(out) OGRErr */
9875 0 : if ( result != 0 && GetUseExceptions()) {
9876 0 : const char* pszMessage = CPLGetLastErrorMsg();
9877 0 : if( pszMessage[0] != '\0' )
9878 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9879 : else
9880 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9881 0 : SWIG_fail;
9882 : }
9883 : }
9884 0 : {
9885 : /* %typemap(ret) OGRErr */
9886 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9887 0 : resultobj = PyInt_FromLong( result );
9888 : }
9889 : }
9890 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9891 : return resultobj;
9892 : fail:
9893 : return NULL;
9894 : }
9895 :
9896 :
9897 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetIGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9898 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9899 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9900 0 : void *argp1 = 0 ;
9901 0 : int res1 = 0 ;
9902 0 : PyObject *swig_obj[1] ;
9903 0 : OGRErr result;
9904 :
9905 0 : if (!args) SWIG_fail;
9906 0 : swig_obj[0] = args;
9907 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9908 0 : if (!SWIG_IsOK(res1)) {
9909 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9910 : }
9911 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9912 0 : {
9913 0 : const int bLocalUseExceptions = GetUseExceptions();
9914 0 : if ( bLocalUseExceptions ) {
9915 0 : pushErrorHandler();
9916 : }
9917 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
9918 0 : if ( bLocalUseExceptions ) {
9919 0 : popErrorHandler();
9920 : }
9921 : #ifndef SED_HACKS
9922 : if ( bLocalUseExceptions ) {
9923 : CPLErr eclass = CPLGetLastErrorType();
9924 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9925 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9926 : }
9927 : }
9928 : #endif
9929 : }
9930 0 : {
9931 : /* %typemap(out) OGRErr */
9932 0 : if ( result != 0 && GetUseExceptions()) {
9933 0 : const char* pszMessage = CPLGetLastErrorMsg();
9934 0 : if( pszMessage[0] != '\0' )
9935 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9936 : else
9937 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9938 0 : SWIG_fail;
9939 : }
9940 : }
9941 0 : {
9942 : /* %typemap(ret) OGRErr */
9943 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9944 0 : resultobj = PyInt_FromLong( result );
9945 : }
9946 : }
9947 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9948 : return resultobj;
9949 : fail:
9950 : return NULL;
9951 : }
9952 :
9953 :
9954 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGEOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9955 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9956 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9957 0 : double arg2 ;
9958 0 : double arg3 ;
9959 0 : double arg4 ;
9960 0 : double arg5 ;
9961 0 : void *argp1 = 0 ;
9962 0 : int res1 = 0 ;
9963 0 : double val2 ;
9964 0 : int ecode2 = 0 ;
9965 0 : double val3 ;
9966 0 : int ecode3 = 0 ;
9967 0 : double val4 ;
9968 0 : int ecode4 = 0 ;
9969 0 : double val5 ;
9970 0 : int ecode5 = 0 ;
9971 0 : PyObject * obj0 = 0 ;
9972 0 : PyObject * obj1 = 0 ;
9973 0 : PyObject * obj2 = 0 ;
9974 0 : PyObject * obj3 = 0 ;
9975 0 : PyObject * obj4 = 0 ;
9976 0 : char * kwnames[] = {
9977 : (char *)"self", (char *)"cm", (char *)"satelliteheight", (char *)"fe", (char *)"fn", NULL
9978 : };
9979 0 : OGRErr result;
9980 :
9981 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGEOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9982 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9983 0 : if (!SWIG_IsOK(res1)) {
9984 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGEOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9985 : }
9986 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9987 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9988 0 : if (!SWIG_IsOK(ecode2)) {
9989 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGEOS" "', argument " "2"" of type '" "double""'");
9990 : }
9991 0 : arg2 = static_cast< double >(val2);
9992 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9993 0 : if (!SWIG_IsOK(ecode3)) {
9994 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGEOS" "', argument " "3"" of type '" "double""'");
9995 : }
9996 0 : arg3 = static_cast< double >(val3);
9997 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9998 0 : if (!SWIG_IsOK(ecode4)) {
9999 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGEOS" "', argument " "4"" of type '" "double""'");
10000 : }
10001 0 : arg4 = static_cast< double >(val4);
10002 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10003 0 : if (!SWIG_IsOK(ecode5)) {
10004 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGEOS" "', argument " "5"" of type '" "double""'");
10005 : }
10006 0 : arg5 = static_cast< double >(val5);
10007 0 : {
10008 0 : const int bLocalUseExceptions = GetUseExceptions();
10009 0 : if ( bLocalUseExceptions ) {
10010 0 : pushErrorHandler();
10011 : }
10012 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
10013 0 : if ( bLocalUseExceptions ) {
10014 0 : popErrorHandler();
10015 : }
10016 : #ifndef SED_HACKS
10017 : if ( bLocalUseExceptions ) {
10018 : CPLErr eclass = CPLGetLastErrorType();
10019 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10020 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10021 : }
10022 : }
10023 : #endif
10024 : }
10025 0 : {
10026 : /* %typemap(out) OGRErr */
10027 0 : if ( result != 0 && GetUseExceptions()) {
10028 0 : const char* pszMessage = CPLGetLastErrorMsg();
10029 0 : if( pszMessage[0] != '\0' )
10030 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10031 : else
10032 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10033 0 : SWIG_fail;
10034 : }
10035 : }
10036 0 : {
10037 : /* %typemap(ret) OGRErr */
10038 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10039 0 : resultobj = PyInt_FromLong( result );
10040 : }
10041 : }
10042 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10043 : return resultobj;
10044 : fail:
10045 : return NULL;
10046 : }
10047 :
10048 :
10049 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGnomonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10050 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10051 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10052 0 : double arg2 ;
10053 0 : double arg3 ;
10054 0 : double arg4 ;
10055 0 : double arg5 ;
10056 0 : void *argp1 = 0 ;
10057 0 : int res1 = 0 ;
10058 0 : double val2 ;
10059 0 : int ecode2 = 0 ;
10060 0 : double val3 ;
10061 0 : int ecode3 = 0 ;
10062 0 : double val4 ;
10063 0 : int ecode4 = 0 ;
10064 0 : double val5 ;
10065 0 : int ecode5 = 0 ;
10066 0 : PyObject * obj0 = 0 ;
10067 0 : PyObject * obj1 = 0 ;
10068 0 : PyObject * obj2 = 0 ;
10069 0 : PyObject * obj3 = 0 ;
10070 0 : PyObject * obj4 = 0 ;
10071 0 : char * kwnames[] = {
10072 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10073 : };
10074 0 : OGRErr result;
10075 :
10076 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGnomonic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10077 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10078 0 : if (!SWIG_IsOK(res1)) {
10079 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGnomonic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10080 : }
10081 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10082 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10083 0 : if (!SWIG_IsOK(ecode2)) {
10084 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGnomonic" "', argument " "2"" of type '" "double""'");
10085 : }
10086 0 : arg2 = static_cast< double >(val2);
10087 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10088 0 : if (!SWIG_IsOK(ecode3)) {
10089 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGnomonic" "', argument " "3"" of type '" "double""'");
10090 : }
10091 0 : arg3 = static_cast< double >(val3);
10092 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10093 0 : if (!SWIG_IsOK(ecode4)) {
10094 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGnomonic" "', argument " "4"" of type '" "double""'");
10095 : }
10096 0 : arg4 = static_cast< double >(val4);
10097 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10098 0 : if (!SWIG_IsOK(ecode5)) {
10099 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGnomonic" "', argument " "5"" of type '" "double""'");
10100 : }
10101 0 : arg5 = static_cast< double >(val5);
10102 0 : {
10103 0 : const int bLocalUseExceptions = GetUseExceptions();
10104 0 : if ( bLocalUseExceptions ) {
10105 0 : pushErrorHandler();
10106 : }
10107 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
10108 0 : if ( bLocalUseExceptions ) {
10109 0 : popErrorHandler();
10110 : }
10111 : #ifndef SED_HACKS
10112 : if ( bLocalUseExceptions ) {
10113 : CPLErr eclass = CPLGetLastErrorType();
10114 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10115 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10116 : }
10117 : }
10118 : #endif
10119 : }
10120 0 : {
10121 : /* %typemap(out) OGRErr */
10122 0 : if ( result != 0 && GetUseExceptions()) {
10123 0 : const char* pszMessage = CPLGetLastErrorMsg();
10124 0 : if( pszMessage[0] != '\0' )
10125 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10126 : else
10127 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10128 0 : SWIG_fail;
10129 : }
10130 : }
10131 0 : {
10132 : /* %typemap(ret) OGRErr */
10133 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10134 0 : resultobj = PyInt_FromLong( result );
10135 : }
10136 : }
10137 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10138 : return resultobj;
10139 : fail:
10140 : return NULL;
10141 : }
10142 :
10143 :
10144 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10145 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10146 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10147 0 : double arg2 ;
10148 0 : double arg3 ;
10149 0 : double arg4 ;
10150 0 : double arg5 ;
10151 0 : double arg6 ;
10152 0 : double arg7 ;
10153 0 : double arg8 ;
10154 0 : void *argp1 = 0 ;
10155 0 : int res1 = 0 ;
10156 0 : double val2 ;
10157 0 : int ecode2 = 0 ;
10158 0 : double val3 ;
10159 0 : int ecode3 = 0 ;
10160 0 : double val4 ;
10161 0 : int ecode4 = 0 ;
10162 0 : double val5 ;
10163 0 : int ecode5 = 0 ;
10164 0 : double val6 ;
10165 0 : int ecode6 = 0 ;
10166 0 : double val7 ;
10167 0 : int ecode7 = 0 ;
10168 0 : double val8 ;
10169 0 : int ecode8 = 0 ;
10170 0 : PyObject * obj0 = 0 ;
10171 0 : PyObject * obj1 = 0 ;
10172 0 : PyObject * obj2 = 0 ;
10173 0 : PyObject * obj3 = 0 ;
10174 0 : PyObject * obj4 = 0 ;
10175 0 : PyObject * obj5 = 0 ;
10176 0 : PyObject * obj6 = 0 ;
10177 0 : PyObject * obj7 = 0 ;
10178 0 : char * kwnames[] = {
10179 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"recttoskew", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10180 : };
10181 0 : OGRErr result;
10182 :
10183 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetHOM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10184 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10185 0 : if (!SWIG_IsOK(res1)) {
10186 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10187 : }
10188 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10189 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10190 0 : if (!SWIG_IsOK(ecode2)) {
10191 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM" "', argument " "2"" of type '" "double""'");
10192 : }
10193 0 : arg2 = static_cast< double >(val2);
10194 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10195 0 : if (!SWIG_IsOK(ecode3)) {
10196 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM" "', argument " "3"" of type '" "double""'");
10197 : }
10198 0 : arg3 = static_cast< double >(val3);
10199 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10200 0 : if (!SWIG_IsOK(ecode4)) {
10201 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM" "', argument " "4"" of type '" "double""'");
10202 : }
10203 0 : arg4 = static_cast< double >(val4);
10204 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10205 0 : if (!SWIG_IsOK(ecode5)) {
10206 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM" "', argument " "5"" of type '" "double""'");
10207 : }
10208 0 : arg5 = static_cast< double >(val5);
10209 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10210 0 : if (!SWIG_IsOK(ecode6)) {
10211 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM" "', argument " "6"" of type '" "double""'");
10212 : }
10213 0 : arg6 = static_cast< double >(val6);
10214 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10215 0 : if (!SWIG_IsOK(ecode7)) {
10216 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM" "', argument " "7"" of type '" "double""'");
10217 : }
10218 0 : arg7 = static_cast< double >(val7);
10219 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10220 0 : if (!SWIG_IsOK(ecode8)) {
10221 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM" "', argument " "8"" of type '" "double""'");
10222 : }
10223 0 : arg8 = static_cast< double >(val8);
10224 0 : {
10225 0 : const int bLocalUseExceptions = GetUseExceptions();
10226 0 : if ( bLocalUseExceptions ) {
10227 0 : pushErrorHandler();
10228 : }
10229 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10230 0 : if ( bLocalUseExceptions ) {
10231 0 : popErrorHandler();
10232 : }
10233 : #ifndef SED_HACKS
10234 : if ( bLocalUseExceptions ) {
10235 : CPLErr eclass = CPLGetLastErrorType();
10236 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10237 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10238 : }
10239 : }
10240 : #endif
10241 : }
10242 0 : {
10243 : /* %typemap(out) OGRErr */
10244 0 : if ( result != 0 && GetUseExceptions()) {
10245 0 : const char* pszMessage = CPLGetLastErrorMsg();
10246 0 : if( pszMessage[0] != '\0' )
10247 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10248 : else
10249 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10250 0 : SWIG_fail;
10251 : }
10252 : }
10253 0 : {
10254 : /* %typemap(ret) OGRErr */
10255 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10256 0 : resultobj = PyInt_FromLong( result );
10257 : }
10258 : }
10259 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10260 : return resultobj;
10261 : fail:
10262 : return NULL;
10263 : }
10264 :
10265 :
10266 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM2PNO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10267 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10268 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10269 0 : double arg2 ;
10270 0 : double arg3 ;
10271 0 : double arg4 ;
10272 0 : double arg5 ;
10273 0 : double arg6 ;
10274 0 : double arg7 ;
10275 0 : double arg8 ;
10276 0 : double arg9 ;
10277 0 : void *argp1 = 0 ;
10278 0 : int res1 = 0 ;
10279 0 : double val2 ;
10280 0 : int ecode2 = 0 ;
10281 0 : double val3 ;
10282 0 : int ecode3 = 0 ;
10283 0 : double val4 ;
10284 0 : int ecode4 = 0 ;
10285 0 : double val5 ;
10286 0 : int ecode5 = 0 ;
10287 0 : double val6 ;
10288 0 : int ecode6 = 0 ;
10289 0 : double val7 ;
10290 0 : int ecode7 = 0 ;
10291 0 : double val8 ;
10292 0 : int ecode8 = 0 ;
10293 0 : double val9 ;
10294 0 : int ecode9 = 0 ;
10295 0 : PyObject * obj0 = 0 ;
10296 0 : PyObject * obj1 = 0 ;
10297 0 : PyObject * obj2 = 0 ;
10298 0 : PyObject * obj3 = 0 ;
10299 0 : PyObject * obj4 = 0 ;
10300 0 : PyObject * obj5 = 0 ;
10301 0 : PyObject * obj6 = 0 ;
10302 0 : PyObject * obj7 = 0 ;
10303 0 : PyObject * obj8 = 0 ;
10304 0 : char * kwnames[] = {
10305 : (char *)"self", (char *)"clat", (char *)"dfLat1", (char *)"dfLong1", (char *)"dfLat2", (char *)"dfLong2", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10306 : };
10307 0 : OGRErr result;
10308 :
10309 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:SpatialReference_SetHOM2PNO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
10310 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10311 0 : if (!SWIG_IsOK(res1)) {
10312 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10313 : }
10314 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10315 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10316 0 : if (!SWIG_IsOK(ecode2)) {
10317 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "2"" of type '" "double""'");
10318 : }
10319 0 : arg2 = static_cast< double >(val2);
10320 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10321 0 : if (!SWIG_IsOK(ecode3)) {
10322 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "3"" of type '" "double""'");
10323 : }
10324 0 : arg3 = static_cast< double >(val3);
10325 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10326 0 : if (!SWIG_IsOK(ecode4)) {
10327 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "4"" of type '" "double""'");
10328 : }
10329 0 : arg4 = static_cast< double >(val4);
10330 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10331 0 : if (!SWIG_IsOK(ecode5)) {
10332 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "5"" of type '" "double""'");
10333 : }
10334 0 : arg5 = static_cast< double >(val5);
10335 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10336 0 : if (!SWIG_IsOK(ecode6)) {
10337 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "6"" of type '" "double""'");
10338 : }
10339 0 : arg6 = static_cast< double >(val6);
10340 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10341 0 : if (!SWIG_IsOK(ecode7)) {
10342 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "7"" of type '" "double""'");
10343 : }
10344 0 : arg7 = static_cast< double >(val7);
10345 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10346 0 : if (!SWIG_IsOK(ecode8)) {
10347 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "8"" of type '" "double""'");
10348 : }
10349 0 : arg8 = static_cast< double >(val8);
10350 0 : ecode9 = SWIG_AsVal_double(obj8, &val9);
10351 0 : if (!SWIG_IsOK(ecode9)) {
10352 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "9"" of type '" "double""'");
10353 : }
10354 0 : arg9 = static_cast< double >(val9);
10355 0 : {
10356 0 : const int bLocalUseExceptions = GetUseExceptions();
10357 0 : if ( bLocalUseExceptions ) {
10358 0 : pushErrorHandler();
10359 : }
10360 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
10361 0 : if ( bLocalUseExceptions ) {
10362 0 : popErrorHandler();
10363 : }
10364 : #ifndef SED_HACKS
10365 : if ( bLocalUseExceptions ) {
10366 : CPLErr eclass = CPLGetLastErrorType();
10367 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10368 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10369 : }
10370 : }
10371 : #endif
10372 : }
10373 0 : {
10374 : /* %typemap(out) OGRErr */
10375 0 : if ( result != 0 && GetUseExceptions()) {
10376 0 : const char* pszMessage = CPLGetLastErrorMsg();
10377 0 : if( pszMessage[0] != '\0' )
10378 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10379 : else
10380 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10381 0 : SWIG_fail;
10382 : }
10383 : }
10384 0 : {
10385 : /* %typemap(ret) OGRErr */
10386 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10387 0 : resultobj = PyInt_FromLong( result );
10388 : }
10389 : }
10390 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10391 : return resultobj;
10392 : fail:
10393 : return NULL;
10394 : }
10395 :
10396 :
10397 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetKrovak(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10398 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10399 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10400 0 : double arg2 ;
10401 0 : double arg3 ;
10402 0 : double arg4 ;
10403 0 : double arg5 ;
10404 0 : double arg6 ;
10405 0 : double arg7 ;
10406 0 : double arg8 ;
10407 0 : void *argp1 = 0 ;
10408 0 : int res1 = 0 ;
10409 0 : double val2 ;
10410 0 : int ecode2 = 0 ;
10411 0 : double val3 ;
10412 0 : int ecode3 = 0 ;
10413 0 : double val4 ;
10414 0 : int ecode4 = 0 ;
10415 0 : double val5 ;
10416 0 : int ecode5 = 0 ;
10417 0 : double val6 ;
10418 0 : int ecode6 = 0 ;
10419 0 : double val7 ;
10420 0 : int ecode7 = 0 ;
10421 0 : double val8 ;
10422 0 : int ecode8 = 0 ;
10423 0 : PyObject * obj0 = 0 ;
10424 0 : PyObject * obj1 = 0 ;
10425 0 : PyObject * obj2 = 0 ;
10426 0 : PyObject * obj3 = 0 ;
10427 0 : PyObject * obj4 = 0 ;
10428 0 : PyObject * obj5 = 0 ;
10429 0 : PyObject * obj6 = 0 ;
10430 0 : PyObject * obj7 = 0 ;
10431 0 : char * kwnames[] = {
10432 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"pseudostdparallellat", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10433 : };
10434 0 : OGRErr result;
10435 :
10436 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetKrovak", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10437 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10438 0 : if (!SWIG_IsOK(res1)) {
10439 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetKrovak" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10440 : }
10441 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10442 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10443 0 : if (!SWIG_IsOK(ecode2)) {
10444 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetKrovak" "', argument " "2"" of type '" "double""'");
10445 : }
10446 0 : arg2 = static_cast< double >(val2);
10447 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10448 0 : if (!SWIG_IsOK(ecode3)) {
10449 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetKrovak" "', argument " "3"" of type '" "double""'");
10450 : }
10451 0 : arg3 = static_cast< double >(val3);
10452 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10453 0 : if (!SWIG_IsOK(ecode4)) {
10454 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetKrovak" "', argument " "4"" of type '" "double""'");
10455 : }
10456 0 : arg4 = static_cast< double >(val4);
10457 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10458 0 : if (!SWIG_IsOK(ecode5)) {
10459 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetKrovak" "', argument " "5"" of type '" "double""'");
10460 : }
10461 0 : arg5 = static_cast< double >(val5);
10462 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10463 0 : if (!SWIG_IsOK(ecode6)) {
10464 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetKrovak" "', argument " "6"" of type '" "double""'");
10465 : }
10466 0 : arg6 = static_cast< double >(val6);
10467 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10468 0 : if (!SWIG_IsOK(ecode7)) {
10469 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetKrovak" "', argument " "7"" of type '" "double""'");
10470 : }
10471 0 : arg7 = static_cast< double >(val7);
10472 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10473 0 : if (!SWIG_IsOK(ecode8)) {
10474 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetKrovak" "', argument " "8"" of type '" "double""'");
10475 : }
10476 0 : arg8 = static_cast< double >(val8);
10477 0 : {
10478 0 : const int bLocalUseExceptions = GetUseExceptions();
10479 0 : if ( bLocalUseExceptions ) {
10480 0 : pushErrorHandler();
10481 : }
10482 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10483 0 : if ( bLocalUseExceptions ) {
10484 0 : popErrorHandler();
10485 : }
10486 : #ifndef SED_HACKS
10487 : if ( bLocalUseExceptions ) {
10488 : CPLErr eclass = CPLGetLastErrorType();
10489 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10490 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10491 : }
10492 : }
10493 : #endif
10494 : }
10495 0 : {
10496 : /* %typemap(out) OGRErr */
10497 0 : if ( result != 0 && GetUseExceptions()) {
10498 0 : const char* pszMessage = CPLGetLastErrorMsg();
10499 0 : if( pszMessage[0] != '\0' )
10500 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10501 : else
10502 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10503 0 : SWIG_fail;
10504 : }
10505 : }
10506 0 : {
10507 : /* %typemap(ret) OGRErr */
10508 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10509 0 : resultobj = PyInt_FromLong( result );
10510 : }
10511 : }
10512 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10513 : return resultobj;
10514 : fail:
10515 : return NULL;
10516 : }
10517 :
10518 :
10519 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLAEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10520 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10521 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10522 0 : double arg2 ;
10523 0 : double arg3 ;
10524 0 : double arg4 ;
10525 0 : double arg5 ;
10526 0 : void *argp1 = 0 ;
10527 0 : int res1 = 0 ;
10528 0 : double val2 ;
10529 0 : int ecode2 = 0 ;
10530 0 : double val3 ;
10531 0 : int ecode3 = 0 ;
10532 0 : double val4 ;
10533 0 : int ecode4 = 0 ;
10534 0 : double val5 ;
10535 0 : int ecode5 = 0 ;
10536 0 : PyObject * obj0 = 0 ;
10537 0 : PyObject * obj1 = 0 ;
10538 0 : PyObject * obj2 = 0 ;
10539 0 : PyObject * obj3 = 0 ;
10540 0 : PyObject * obj4 = 0 ;
10541 0 : char * kwnames[] = {
10542 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10543 : };
10544 0 : OGRErr result;
10545 :
10546 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetLAEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10547 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10548 0 : if (!SWIG_IsOK(res1)) {
10549 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLAEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10550 : }
10551 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10552 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10553 0 : if (!SWIG_IsOK(ecode2)) {
10554 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLAEA" "', argument " "2"" of type '" "double""'");
10555 : }
10556 0 : arg2 = static_cast< double >(val2);
10557 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10558 0 : if (!SWIG_IsOK(ecode3)) {
10559 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLAEA" "', argument " "3"" of type '" "double""'");
10560 : }
10561 0 : arg3 = static_cast< double >(val3);
10562 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10563 0 : if (!SWIG_IsOK(ecode4)) {
10564 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLAEA" "', argument " "4"" of type '" "double""'");
10565 : }
10566 0 : arg4 = static_cast< double >(val4);
10567 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10568 0 : if (!SWIG_IsOK(ecode5)) {
10569 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLAEA" "', argument " "5"" of type '" "double""'");
10570 : }
10571 0 : arg5 = static_cast< double >(val5);
10572 0 : {
10573 0 : const int bLocalUseExceptions = GetUseExceptions();
10574 0 : if ( bLocalUseExceptions ) {
10575 0 : pushErrorHandler();
10576 : }
10577 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
10578 0 : if ( bLocalUseExceptions ) {
10579 0 : popErrorHandler();
10580 : }
10581 : #ifndef SED_HACKS
10582 : if ( bLocalUseExceptions ) {
10583 : CPLErr eclass = CPLGetLastErrorType();
10584 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10585 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10586 : }
10587 : }
10588 : #endif
10589 : }
10590 0 : {
10591 : /* %typemap(out) OGRErr */
10592 0 : if ( result != 0 && GetUseExceptions()) {
10593 0 : const char* pszMessage = CPLGetLastErrorMsg();
10594 0 : if( pszMessage[0] != '\0' )
10595 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10596 : else
10597 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10598 0 : SWIG_fail;
10599 : }
10600 : }
10601 0 : {
10602 : /* %typemap(ret) OGRErr */
10603 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10604 0 : resultobj = PyInt_FromLong( result );
10605 : }
10606 : }
10607 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10608 : return resultobj;
10609 : fail:
10610 : return NULL;
10611 : }
10612 :
10613 :
10614 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10615 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10616 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10617 1 : double arg2 ;
10618 1 : double arg3 ;
10619 1 : double arg4 ;
10620 1 : double arg5 ;
10621 1 : double arg6 ;
10622 1 : double arg7 ;
10623 1 : void *argp1 = 0 ;
10624 1 : int res1 = 0 ;
10625 1 : double val2 ;
10626 1 : int ecode2 = 0 ;
10627 1 : double val3 ;
10628 1 : int ecode3 = 0 ;
10629 1 : double val4 ;
10630 1 : int ecode4 = 0 ;
10631 1 : double val5 ;
10632 1 : int ecode5 = 0 ;
10633 1 : double val6 ;
10634 1 : int ecode6 = 0 ;
10635 1 : double val7 ;
10636 1 : int ecode7 = 0 ;
10637 1 : PyObject * obj0 = 0 ;
10638 1 : PyObject * obj1 = 0 ;
10639 1 : PyObject * obj2 = 0 ;
10640 1 : PyObject * obj3 = 0 ;
10641 1 : PyObject * obj4 = 0 ;
10642 1 : PyObject * obj5 = 0 ;
10643 1 : PyObject * obj6 = 0 ;
10644 1 : char * kwnames[] = {
10645 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10646 : };
10647 1 : OGRErr result;
10648 :
10649 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10650 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10651 1 : if (!SWIG_IsOK(res1)) {
10652 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10653 : }
10654 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10655 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10656 1 : if (!SWIG_IsOK(ecode2)) {
10657 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC" "', argument " "2"" of type '" "double""'");
10658 : }
10659 1 : arg2 = static_cast< double >(val2);
10660 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10661 1 : if (!SWIG_IsOK(ecode3)) {
10662 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC" "', argument " "3"" of type '" "double""'");
10663 : }
10664 1 : arg3 = static_cast< double >(val3);
10665 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10666 1 : if (!SWIG_IsOK(ecode4)) {
10667 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC" "', argument " "4"" of type '" "double""'");
10668 : }
10669 1 : arg4 = static_cast< double >(val4);
10670 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10671 1 : if (!SWIG_IsOK(ecode5)) {
10672 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC" "', argument " "5"" of type '" "double""'");
10673 : }
10674 1 : arg5 = static_cast< double >(val5);
10675 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10676 1 : if (!SWIG_IsOK(ecode6)) {
10677 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC" "', argument " "6"" of type '" "double""'");
10678 : }
10679 1 : arg6 = static_cast< double >(val6);
10680 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10681 1 : if (!SWIG_IsOK(ecode7)) {
10682 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCC" "', argument " "7"" of type '" "double""'");
10683 : }
10684 1 : arg7 = static_cast< double >(val7);
10685 1 : {
10686 1 : const int bLocalUseExceptions = GetUseExceptions();
10687 1 : if ( bLocalUseExceptions ) {
10688 1 : pushErrorHandler();
10689 : }
10690 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10691 1 : if ( bLocalUseExceptions ) {
10692 1 : popErrorHandler();
10693 : }
10694 : #ifndef SED_HACKS
10695 : if ( bLocalUseExceptions ) {
10696 : CPLErr eclass = CPLGetLastErrorType();
10697 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10698 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10699 : }
10700 : }
10701 : #endif
10702 : }
10703 1 : {
10704 : /* %typemap(out) OGRErr */
10705 1 : if ( result != 0 && GetUseExceptions()) {
10706 0 : const char* pszMessage = CPLGetLastErrorMsg();
10707 0 : if( pszMessage[0] != '\0' )
10708 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10709 : else
10710 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10711 0 : SWIG_fail;
10712 : }
10713 : }
10714 1 : {
10715 : /* %typemap(ret) OGRErr */
10716 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10717 1 : resultobj = PyInt_FromLong( result );
10718 : }
10719 : }
10720 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10721 : return resultobj;
10722 : fail:
10723 : return NULL;
10724 : }
10725 :
10726 :
10727 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC1SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10728 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10729 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10730 0 : double arg2 ;
10731 0 : double arg3 ;
10732 0 : double arg4 ;
10733 0 : double arg5 ;
10734 0 : double arg6 ;
10735 0 : void *argp1 = 0 ;
10736 0 : int res1 = 0 ;
10737 0 : double val2 ;
10738 0 : int ecode2 = 0 ;
10739 0 : double val3 ;
10740 0 : int ecode3 = 0 ;
10741 0 : double val4 ;
10742 0 : int ecode4 = 0 ;
10743 0 : double val5 ;
10744 0 : int ecode5 = 0 ;
10745 0 : double val6 ;
10746 0 : int ecode6 = 0 ;
10747 0 : PyObject * obj0 = 0 ;
10748 0 : PyObject * obj1 = 0 ;
10749 0 : PyObject * obj2 = 0 ;
10750 0 : PyObject * obj3 = 0 ;
10751 0 : PyObject * obj4 = 0 ;
10752 0 : PyObject * obj5 = 0 ;
10753 0 : char * kwnames[] = {
10754 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10755 : };
10756 0 : OGRErr result;
10757 :
10758 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetLCC1SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
10759 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10760 0 : if (!SWIG_IsOK(res1)) {
10761 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC1SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10762 : }
10763 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10764 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10765 0 : if (!SWIG_IsOK(ecode2)) {
10766 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC1SP" "', argument " "2"" of type '" "double""'");
10767 : }
10768 0 : arg2 = static_cast< double >(val2);
10769 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10770 0 : if (!SWIG_IsOK(ecode3)) {
10771 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC1SP" "', argument " "3"" of type '" "double""'");
10772 : }
10773 0 : arg3 = static_cast< double >(val3);
10774 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10775 0 : if (!SWIG_IsOK(ecode4)) {
10776 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC1SP" "', argument " "4"" of type '" "double""'");
10777 : }
10778 0 : arg4 = static_cast< double >(val4);
10779 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10780 0 : if (!SWIG_IsOK(ecode5)) {
10781 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC1SP" "', argument " "5"" of type '" "double""'");
10782 : }
10783 0 : arg5 = static_cast< double >(val5);
10784 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10785 0 : if (!SWIG_IsOK(ecode6)) {
10786 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC1SP" "', argument " "6"" of type '" "double""'");
10787 : }
10788 0 : arg6 = static_cast< double >(val6);
10789 0 : {
10790 0 : const int bLocalUseExceptions = GetUseExceptions();
10791 0 : if ( bLocalUseExceptions ) {
10792 0 : pushErrorHandler();
10793 : }
10794 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
10795 0 : if ( bLocalUseExceptions ) {
10796 0 : popErrorHandler();
10797 : }
10798 : #ifndef SED_HACKS
10799 : if ( bLocalUseExceptions ) {
10800 : CPLErr eclass = CPLGetLastErrorType();
10801 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10802 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10803 : }
10804 : }
10805 : #endif
10806 : }
10807 0 : {
10808 : /* %typemap(out) OGRErr */
10809 0 : if ( result != 0 && GetUseExceptions()) {
10810 0 : const char* pszMessage = CPLGetLastErrorMsg();
10811 0 : if( pszMessage[0] != '\0' )
10812 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10813 : else
10814 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10815 0 : SWIG_fail;
10816 : }
10817 : }
10818 0 : {
10819 : /* %typemap(ret) OGRErr */
10820 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10821 0 : resultobj = PyInt_FromLong( result );
10822 : }
10823 : }
10824 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10825 : return resultobj;
10826 : fail:
10827 : return NULL;
10828 : }
10829 :
10830 :
10831 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCCB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10832 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10833 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10834 0 : double arg2 ;
10835 0 : double arg3 ;
10836 0 : double arg4 ;
10837 0 : double arg5 ;
10838 0 : double arg6 ;
10839 0 : double arg7 ;
10840 0 : void *argp1 = 0 ;
10841 0 : int res1 = 0 ;
10842 0 : double val2 ;
10843 0 : int ecode2 = 0 ;
10844 0 : double val3 ;
10845 0 : int ecode3 = 0 ;
10846 0 : double val4 ;
10847 0 : int ecode4 = 0 ;
10848 0 : double val5 ;
10849 0 : int ecode5 = 0 ;
10850 0 : double val6 ;
10851 0 : int ecode6 = 0 ;
10852 0 : double val7 ;
10853 0 : int ecode7 = 0 ;
10854 0 : PyObject * obj0 = 0 ;
10855 0 : PyObject * obj1 = 0 ;
10856 0 : PyObject * obj2 = 0 ;
10857 0 : PyObject * obj3 = 0 ;
10858 0 : PyObject * obj4 = 0 ;
10859 0 : PyObject * obj5 = 0 ;
10860 0 : PyObject * obj6 = 0 ;
10861 0 : char * kwnames[] = {
10862 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10863 : };
10864 0 : OGRErr result;
10865 :
10866 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCCB", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10867 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10868 0 : if (!SWIG_IsOK(res1)) {
10869 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCCB" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10870 : }
10871 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10872 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10873 0 : if (!SWIG_IsOK(ecode2)) {
10874 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCCB" "', argument " "2"" of type '" "double""'");
10875 : }
10876 0 : arg2 = static_cast< double >(val2);
10877 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10878 0 : if (!SWIG_IsOK(ecode3)) {
10879 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCCB" "', argument " "3"" of type '" "double""'");
10880 : }
10881 0 : arg3 = static_cast< double >(val3);
10882 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10883 0 : if (!SWIG_IsOK(ecode4)) {
10884 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCCB" "', argument " "4"" of type '" "double""'");
10885 : }
10886 0 : arg4 = static_cast< double >(val4);
10887 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10888 0 : if (!SWIG_IsOK(ecode5)) {
10889 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCCB" "', argument " "5"" of type '" "double""'");
10890 : }
10891 0 : arg5 = static_cast< double >(val5);
10892 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10893 0 : if (!SWIG_IsOK(ecode6)) {
10894 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCCB" "', argument " "6"" of type '" "double""'");
10895 : }
10896 0 : arg6 = static_cast< double >(val6);
10897 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10898 0 : if (!SWIG_IsOK(ecode7)) {
10899 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCCB" "', argument " "7"" of type '" "double""'");
10900 : }
10901 0 : arg7 = static_cast< double >(val7);
10902 0 : {
10903 0 : const int bLocalUseExceptions = GetUseExceptions();
10904 0 : if ( bLocalUseExceptions ) {
10905 0 : pushErrorHandler();
10906 : }
10907 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10908 0 : if ( bLocalUseExceptions ) {
10909 0 : popErrorHandler();
10910 : }
10911 : #ifndef SED_HACKS
10912 : if ( bLocalUseExceptions ) {
10913 : CPLErr eclass = CPLGetLastErrorType();
10914 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10915 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10916 : }
10917 : }
10918 : #endif
10919 : }
10920 0 : {
10921 : /* %typemap(out) OGRErr */
10922 0 : if ( result != 0 && GetUseExceptions()) {
10923 0 : const char* pszMessage = CPLGetLastErrorMsg();
10924 0 : if( pszMessage[0] != '\0' )
10925 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10926 : else
10927 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10928 0 : SWIG_fail;
10929 : }
10930 : }
10931 0 : {
10932 : /* %typemap(ret) OGRErr */
10933 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10934 0 : resultobj = PyInt_FromLong( result );
10935 : }
10936 : }
10937 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10938 : return resultobj;
10939 : fail:
10940 : return NULL;
10941 : }
10942 :
10943 :
10944 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10945 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10946 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10947 0 : double arg2 ;
10948 0 : double arg3 ;
10949 0 : double arg4 ;
10950 0 : double arg5 ;
10951 0 : void *argp1 = 0 ;
10952 0 : int res1 = 0 ;
10953 0 : double val2 ;
10954 0 : int ecode2 = 0 ;
10955 0 : double val3 ;
10956 0 : int ecode3 = 0 ;
10957 0 : double val4 ;
10958 0 : int ecode4 = 0 ;
10959 0 : double val5 ;
10960 0 : int ecode5 = 0 ;
10961 0 : PyObject * obj0 = 0 ;
10962 0 : PyObject * obj1 = 0 ;
10963 0 : PyObject * obj2 = 0 ;
10964 0 : PyObject * obj3 = 0 ;
10965 0 : PyObject * obj4 = 0 ;
10966 0 : char * kwnames[] = {
10967 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10968 : };
10969 0 : OGRErr result;
10970 :
10971 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetMC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10972 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10973 0 : if (!SWIG_IsOK(res1)) {
10974 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10975 : }
10976 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10977 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10978 0 : if (!SWIG_IsOK(ecode2)) {
10979 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMC" "', argument " "2"" of type '" "double""'");
10980 : }
10981 0 : arg2 = static_cast< double >(val2);
10982 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10983 0 : if (!SWIG_IsOK(ecode3)) {
10984 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMC" "', argument " "3"" of type '" "double""'");
10985 : }
10986 0 : arg3 = static_cast< double >(val3);
10987 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10988 0 : if (!SWIG_IsOK(ecode4)) {
10989 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMC" "', argument " "4"" of type '" "double""'");
10990 : }
10991 0 : arg4 = static_cast< double >(val4);
10992 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10993 0 : if (!SWIG_IsOK(ecode5)) {
10994 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMC" "', argument " "5"" of type '" "double""'");
10995 : }
10996 0 : arg5 = static_cast< double >(val5);
10997 0 : {
10998 0 : const int bLocalUseExceptions = GetUseExceptions();
10999 0 : if ( bLocalUseExceptions ) {
11000 0 : pushErrorHandler();
11001 : }
11002 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
11003 0 : if ( bLocalUseExceptions ) {
11004 0 : popErrorHandler();
11005 : }
11006 : #ifndef SED_HACKS
11007 : if ( bLocalUseExceptions ) {
11008 : CPLErr eclass = CPLGetLastErrorType();
11009 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11010 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11011 : }
11012 : }
11013 : #endif
11014 : }
11015 0 : {
11016 : /* %typemap(out) OGRErr */
11017 0 : if ( result != 0 && GetUseExceptions()) {
11018 0 : const char* pszMessage = CPLGetLastErrorMsg();
11019 0 : if( pszMessage[0] != '\0' )
11020 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11021 : else
11022 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11023 0 : SWIG_fail;
11024 : }
11025 : }
11026 0 : {
11027 : /* %typemap(ret) OGRErr */
11028 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11029 0 : resultobj = PyInt_FromLong( result );
11030 : }
11031 : }
11032 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11033 : return resultobj;
11034 : fail:
11035 : return NULL;
11036 : }
11037 :
11038 :
11039 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11040 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11041 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11042 2 : double arg2 ;
11043 2 : double arg3 ;
11044 2 : double arg4 ;
11045 2 : double arg5 ;
11046 2 : double arg6 ;
11047 2 : void *argp1 = 0 ;
11048 2 : int res1 = 0 ;
11049 2 : double val2 ;
11050 2 : int ecode2 = 0 ;
11051 2 : double val3 ;
11052 2 : int ecode3 = 0 ;
11053 2 : double val4 ;
11054 2 : int ecode4 = 0 ;
11055 2 : double val5 ;
11056 2 : int ecode5 = 0 ;
11057 2 : double val6 ;
11058 2 : int ecode6 = 0 ;
11059 2 : PyObject * obj0 = 0 ;
11060 2 : PyObject * obj1 = 0 ;
11061 2 : PyObject * obj2 = 0 ;
11062 2 : PyObject * obj3 = 0 ;
11063 2 : PyObject * obj4 = 0 ;
11064 2 : PyObject * obj5 = 0 ;
11065 2 : char * kwnames[] = {
11066 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11067 : };
11068 2 : OGRErr result;
11069 :
11070 2 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11071 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11072 2 : if (!SWIG_IsOK(res1)) {
11073 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11074 : }
11075 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11076 2 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11077 2 : if (!SWIG_IsOK(ecode2)) {
11078 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator" "', argument " "2"" of type '" "double""'");
11079 : }
11080 2 : arg2 = static_cast< double >(val2);
11081 2 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11082 2 : if (!SWIG_IsOK(ecode3)) {
11083 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator" "', argument " "3"" of type '" "double""'");
11084 : }
11085 2 : arg3 = static_cast< double >(val3);
11086 2 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11087 2 : if (!SWIG_IsOK(ecode4)) {
11088 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator" "', argument " "4"" of type '" "double""'");
11089 : }
11090 2 : arg4 = static_cast< double >(val4);
11091 2 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11092 2 : if (!SWIG_IsOK(ecode5)) {
11093 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator" "', argument " "5"" of type '" "double""'");
11094 : }
11095 2 : arg5 = static_cast< double >(val5);
11096 2 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11097 2 : if (!SWIG_IsOK(ecode6)) {
11098 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator" "', argument " "6"" of type '" "double""'");
11099 : }
11100 2 : arg6 = static_cast< double >(val6);
11101 2 : {
11102 2 : const int bLocalUseExceptions = GetUseExceptions();
11103 2 : if ( bLocalUseExceptions ) {
11104 2 : pushErrorHandler();
11105 : }
11106 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
11107 2 : if ( bLocalUseExceptions ) {
11108 2 : popErrorHandler();
11109 : }
11110 : #ifndef SED_HACKS
11111 : if ( bLocalUseExceptions ) {
11112 : CPLErr eclass = CPLGetLastErrorType();
11113 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11114 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11115 : }
11116 : }
11117 : #endif
11118 : }
11119 2 : {
11120 : /* %typemap(out) OGRErr */
11121 2 : if ( result != 0 && GetUseExceptions()) {
11122 0 : const char* pszMessage = CPLGetLastErrorMsg();
11123 0 : if( pszMessage[0] != '\0' )
11124 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11125 : else
11126 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11127 0 : SWIG_fail;
11128 : }
11129 : }
11130 2 : {
11131 : /* %typemap(ret) OGRErr */
11132 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11133 2 : resultobj = PyInt_FromLong( result );
11134 : }
11135 : }
11136 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11137 : return resultobj;
11138 : fail:
11139 : return NULL;
11140 : }
11141 :
11142 :
11143 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator2SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11144 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11145 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11146 1 : double arg2 ;
11147 1 : double arg3 ;
11148 1 : double arg4 ;
11149 1 : double arg5 ;
11150 1 : double arg6 ;
11151 1 : void *argp1 = 0 ;
11152 1 : int res1 = 0 ;
11153 1 : double val2 ;
11154 1 : int ecode2 = 0 ;
11155 1 : double val3 ;
11156 1 : int ecode3 = 0 ;
11157 1 : double val4 ;
11158 1 : int ecode4 = 0 ;
11159 1 : double val5 ;
11160 1 : int ecode5 = 0 ;
11161 1 : double val6 ;
11162 1 : int ecode6 = 0 ;
11163 1 : PyObject * obj0 = 0 ;
11164 1 : PyObject * obj1 = 0 ;
11165 1 : PyObject * obj2 = 0 ;
11166 1 : PyObject * obj3 = 0 ;
11167 1 : PyObject * obj4 = 0 ;
11168 1 : PyObject * obj5 = 0 ;
11169 1 : char * kwnames[] = {
11170 : (char *)"self", (char *)"stdp1", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11171 : };
11172 1 : OGRErr result;
11173 :
11174 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator2SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11175 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11176 1 : if (!SWIG_IsOK(res1)) {
11177 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator2SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11178 : }
11179 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11180 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11181 1 : if (!SWIG_IsOK(ecode2)) {
11182 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator2SP" "', argument " "2"" of type '" "double""'");
11183 : }
11184 1 : arg2 = static_cast< double >(val2);
11185 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11186 1 : if (!SWIG_IsOK(ecode3)) {
11187 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator2SP" "', argument " "3"" of type '" "double""'");
11188 : }
11189 1 : arg3 = static_cast< double >(val3);
11190 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11191 1 : if (!SWIG_IsOK(ecode4)) {
11192 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator2SP" "', argument " "4"" of type '" "double""'");
11193 : }
11194 1 : arg4 = static_cast< double >(val4);
11195 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11196 1 : if (!SWIG_IsOK(ecode5)) {
11197 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator2SP" "', argument " "5"" of type '" "double""'");
11198 : }
11199 1 : arg5 = static_cast< double >(val5);
11200 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11201 1 : if (!SWIG_IsOK(ecode6)) {
11202 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator2SP" "', argument " "6"" of type '" "double""'");
11203 : }
11204 1 : arg6 = static_cast< double >(val6);
11205 1 : {
11206 1 : const int bLocalUseExceptions = GetUseExceptions();
11207 1 : if ( bLocalUseExceptions ) {
11208 1 : pushErrorHandler();
11209 : }
11210 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator2SP(arg1,arg2,arg3,arg4,arg5,arg6);
11211 1 : if ( bLocalUseExceptions ) {
11212 1 : popErrorHandler();
11213 : }
11214 : #ifndef SED_HACKS
11215 : if ( bLocalUseExceptions ) {
11216 : CPLErr eclass = CPLGetLastErrorType();
11217 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11218 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11219 : }
11220 : }
11221 : #endif
11222 : }
11223 1 : {
11224 : /* %typemap(out) OGRErr */
11225 1 : if ( result != 0 && GetUseExceptions()) {
11226 0 : const char* pszMessage = CPLGetLastErrorMsg();
11227 0 : if( pszMessage[0] != '\0' )
11228 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11229 : else
11230 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11231 0 : SWIG_fail;
11232 : }
11233 : }
11234 1 : {
11235 : /* %typemap(ret) OGRErr */
11236 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11237 1 : resultobj = PyInt_FromLong( result );
11238 : }
11239 : }
11240 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11241 : return resultobj;
11242 : fail:
11243 : return NULL;
11244 : }
11245 :
11246 :
11247 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMollweide(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11248 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11249 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11250 0 : double arg2 ;
11251 0 : double arg3 ;
11252 0 : double arg4 ;
11253 0 : void *argp1 = 0 ;
11254 0 : int res1 = 0 ;
11255 0 : double val2 ;
11256 0 : int ecode2 = 0 ;
11257 0 : double val3 ;
11258 0 : int ecode3 = 0 ;
11259 0 : double val4 ;
11260 0 : int ecode4 = 0 ;
11261 0 : PyObject * obj0 = 0 ;
11262 0 : PyObject * obj1 = 0 ;
11263 0 : PyObject * obj2 = 0 ;
11264 0 : PyObject * obj3 = 0 ;
11265 0 : char * kwnames[] = {
11266 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
11267 : };
11268 0 : OGRErr result;
11269 :
11270 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetMollweide", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11271 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11272 0 : if (!SWIG_IsOK(res1)) {
11273 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMollweide" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11274 : }
11275 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11276 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11277 0 : if (!SWIG_IsOK(ecode2)) {
11278 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMollweide" "', argument " "2"" of type '" "double""'");
11279 : }
11280 0 : arg2 = static_cast< double >(val2);
11281 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11282 0 : if (!SWIG_IsOK(ecode3)) {
11283 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMollweide" "', argument " "3"" of type '" "double""'");
11284 : }
11285 0 : arg3 = static_cast< double >(val3);
11286 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11287 0 : if (!SWIG_IsOK(ecode4)) {
11288 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMollweide" "', argument " "4"" of type '" "double""'");
11289 : }
11290 0 : arg4 = static_cast< double >(val4);
11291 0 : {
11292 0 : const int bLocalUseExceptions = GetUseExceptions();
11293 0 : if ( bLocalUseExceptions ) {
11294 0 : pushErrorHandler();
11295 : }
11296 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
11297 0 : if ( bLocalUseExceptions ) {
11298 0 : popErrorHandler();
11299 : }
11300 : #ifndef SED_HACKS
11301 : if ( bLocalUseExceptions ) {
11302 : CPLErr eclass = CPLGetLastErrorType();
11303 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11304 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11305 : }
11306 : }
11307 : #endif
11308 : }
11309 0 : {
11310 : /* %typemap(out) OGRErr */
11311 0 : if ( result != 0 && GetUseExceptions()) {
11312 0 : const char* pszMessage = CPLGetLastErrorMsg();
11313 0 : if( pszMessage[0] != '\0' )
11314 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11315 : else
11316 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11317 0 : SWIG_fail;
11318 : }
11319 : }
11320 0 : {
11321 : /* %typemap(ret) OGRErr */
11322 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11323 0 : resultobj = PyInt_FromLong( result );
11324 : }
11325 : }
11326 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11327 : return resultobj;
11328 : fail:
11329 : return NULL;
11330 : }
11331 :
11332 :
11333 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNZMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11334 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11335 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11336 0 : double arg2 ;
11337 0 : double arg3 ;
11338 0 : double arg4 ;
11339 0 : double arg5 ;
11340 0 : void *argp1 = 0 ;
11341 0 : int res1 = 0 ;
11342 0 : double val2 ;
11343 0 : int ecode2 = 0 ;
11344 0 : double val3 ;
11345 0 : int ecode3 = 0 ;
11346 0 : double val4 ;
11347 0 : int ecode4 = 0 ;
11348 0 : double val5 ;
11349 0 : int ecode5 = 0 ;
11350 0 : PyObject * obj0 = 0 ;
11351 0 : PyObject * obj1 = 0 ;
11352 0 : PyObject * obj2 = 0 ;
11353 0 : PyObject * obj3 = 0 ;
11354 0 : PyObject * obj4 = 0 ;
11355 0 : char * kwnames[] = {
11356 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11357 : };
11358 0 : OGRErr result;
11359 :
11360 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetNZMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11361 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11362 0 : if (!SWIG_IsOK(res1)) {
11363 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNZMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11364 : }
11365 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11366 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11367 0 : if (!SWIG_IsOK(ecode2)) {
11368 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetNZMG" "', argument " "2"" of type '" "double""'");
11369 : }
11370 0 : arg2 = static_cast< double >(val2);
11371 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11372 0 : if (!SWIG_IsOK(ecode3)) {
11373 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNZMG" "', argument " "3"" of type '" "double""'");
11374 : }
11375 0 : arg3 = static_cast< double >(val3);
11376 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11377 0 : if (!SWIG_IsOK(ecode4)) {
11378 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetNZMG" "', argument " "4"" of type '" "double""'");
11379 : }
11380 0 : arg4 = static_cast< double >(val4);
11381 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11382 0 : if (!SWIG_IsOK(ecode5)) {
11383 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetNZMG" "', argument " "5"" of type '" "double""'");
11384 : }
11385 0 : arg5 = static_cast< double >(val5);
11386 0 : {
11387 0 : const int bLocalUseExceptions = GetUseExceptions();
11388 0 : if ( bLocalUseExceptions ) {
11389 0 : pushErrorHandler();
11390 : }
11391 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
11392 0 : if ( bLocalUseExceptions ) {
11393 0 : popErrorHandler();
11394 : }
11395 : #ifndef SED_HACKS
11396 : if ( bLocalUseExceptions ) {
11397 : CPLErr eclass = CPLGetLastErrorType();
11398 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11399 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11400 : }
11401 : }
11402 : #endif
11403 : }
11404 0 : {
11405 : /* %typemap(out) OGRErr */
11406 0 : if ( result != 0 && GetUseExceptions()) {
11407 0 : const char* pszMessage = CPLGetLastErrorMsg();
11408 0 : if( pszMessage[0] != '\0' )
11409 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11410 : else
11411 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11412 0 : SWIG_fail;
11413 : }
11414 : }
11415 0 : {
11416 : /* %typemap(ret) OGRErr */
11417 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11418 0 : resultobj = PyInt_FromLong( result );
11419 : }
11420 : }
11421 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11422 : return resultobj;
11423 : fail:
11424 : return NULL;
11425 : }
11426 :
11427 :
11428 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11429 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11430 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11431 0 : double arg2 ;
11432 0 : double arg3 ;
11433 0 : double arg4 ;
11434 0 : double arg5 ;
11435 0 : double arg6 ;
11436 0 : void *argp1 = 0 ;
11437 0 : int res1 = 0 ;
11438 0 : double val2 ;
11439 0 : int ecode2 = 0 ;
11440 0 : double val3 ;
11441 0 : int ecode3 = 0 ;
11442 0 : double val4 ;
11443 0 : int ecode4 = 0 ;
11444 0 : double val5 ;
11445 0 : int ecode5 = 0 ;
11446 0 : double val6 ;
11447 0 : int ecode6 = 0 ;
11448 0 : PyObject * obj0 = 0 ;
11449 0 : PyObject * obj1 = 0 ;
11450 0 : PyObject * obj2 = 0 ;
11451 0 : PyObject * obj3 = 0 ;
11452 0 : PyObject * obj4 = 0 ;
11453 0 : PyObject * obj5 = 0 ;
11454 0 : char * kwnames[] = {
11455 : (char *)"self", (char *)"dfOriginLat", (char *)"dfCMeridian", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11456 : };
11457 0 : OGRErr result;
11458 :
11459 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11460 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11461 0 : if (!SWIG_IsOK(res1)) {
11462 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11463 : }
11464 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11465 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11466 0 : if (!SWIG_IsOK(ecode2)) {
11467 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOS" "', argument " "2"" of type '" "double""'");
11468 : }
11469 0 : arg2 = static_cast< double >(val2);
11470 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11471 0 : if (!SWIG_IsOK(ecode3)) {
11472 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOS" "', argument " "3"" of type '" "double""'");
11473 : }
11474 0 : arg3 = static_cast< double >(val3);
11475 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11476 0 : if (!SWIG_IsOK(ecode4)) {
11477 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOS" "', argument " "4"" of type '" "double""'");
11478 : }
11479 0 : arg4 = static_cast< double >(val4);
11480 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11481 0 : if (!SWIG_IsOK(ecode5)) {
11482 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOS" "', argument " "5"" of type '" "double""'");
11483 : }
11484 0 : arg5 = static_cast< double >(val5);
11485 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11486 0 : if (!SWIG_IsOK(ecode6)) {
11487 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetOS" "', argument " "6"" of type '" "double""'");
11488 : }
11489 0 : arg6 = static_cast< double >(val6);
11490 0 : {
11491 0 : const int bLocalUseExceptions = GetUseExceptions();
11492 0 : if ( bLocalUseExceptions ) {
11493 0 : pushErrorHandler();
11494 : }
11495 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
11496 0 : if ( bLocalUseExceptions ) {
11497 0 : popErrorHandler();
11498 : }
11499 : #ifndef SED_HACKS
11500 : if ( bLocalUseExceptions ) {
11501 : CPLErr eclass = CPLGetLastErrorType();
11502 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11503 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11504 : }
11505 : }
11506 : #endif
11507 : }
11508 0 : {
11509 : /* %typemap(out) OGRErr */
11510 0 : if ( result != 0 && GetUseExceptions()) {
11511 0 : const char* pszMessage = CPLGetLastErrorMsg();
11512 0 : if( pszMessage[0] != '\0' )
11513 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11514 : else
11515 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11516 0 : SWIG_fail;
11517 : }
11518 : }
11519 0 : {
11520 : /* %typemap(ret) OGRErr */
11521 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11522 0 : resultobj = PyInt_FromLong( result );
11523 : }
11524 : }
11525 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11526 : return resultobj;
11527 : fail:
11528 : return NULL;
11529 : }
11530 :
11531 :
11532 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOrthographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11533 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11534 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11535 1 : double arg2 ;
11536 1 : double arg3 ;
11537 1 : double arg4 ;
11538 1 : double arg5 ;
11539 1 : void *argp1 = 0 ;
11540 1 : int res1 = 0 ;
11541 1 : double val2 ;
11542 1 : int ecode2 = 0 ;
11543 1 : double val3 ;
11544 1 : int ecode3 = 0 ;
11545 1 : double val4 ;
11546 1 : int ecode4 = 0 ;
11547 1 : double val5 ;
11548 1 : int ecode5 = 0 ;
11549 1 : PyObject * obj0 = 0 ;
11550 1 : PyObject * obj1 = 0 ;
11551 1 : PyObject * obj2 = 0 ;
11552 1 : PyObject * obj3 = 0 ;
11553 1 : PyObject * obj4 = 0 ;
11554 1 : char * kwnames[] = {
11555 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11556 : };
11557 1 : OGRErr result;
11558 :
11559 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetOrthographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11560 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11561 1 : if (!SWIG_IsOK(res1)) {
11562 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOrthographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11563 : }
11564 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11565 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11566 1 : if (!SWIG_IsOK(ecode2)) {
11567 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOrthographic" "', argument " "2"" of type '" "double""'");
11568 : }
11569 1 : arg2 = static_cast< double >(val2);
11570 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11571 1 : if (!SWIG_IsOK(ecode3)) {
11572 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOrthographic" "', argument " "3"" of type '" "double""'");
11573 : }
11574 1 : arg3 = static_cast< double >(val3);
11575 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11576 1 : if (!SWIG_IsOK(ecode4)) {
11577 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOrthographic" "', argument " "4"" of type '" "double""'");
11578 : }
11579 1 : arg4 = static_cast< double >(val4);
11580 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11581 1 : if (!SWIG_IsOK(ecode5)) {
11582 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOrthographic" "', argument " "5"" of type '" "double""'");
11583 : }
11584 1 : arg5 = static_cast< double >(val5);
11585 1 : {
11586 1 : const int bLocalUseExceptions = GetUseExceptions();
11587 1 : if ( bLocalUseExceptions ) {
11588 1 : pushErrorHandler();
11589 : }
11590 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
11591 1 : if ( bLocalUseExceptions ) {
11592 1 : popErrorHandler();
11593 : }
11594 : #ifndef SED_HACKS
11595 : if ( bLocalUseExceptions ) {
11596 : CPLErr eclass = CPLGetLastErrorType();
11597 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11598 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11599 : }
11600 : }
11601 : #endif
11602 : }
11603 1 : {
11604 : /* %typemap(out) OGRErr */
11605 1 : if ( result != 0 && GetUseExceptions()) {
11606 0 : const char* pszMessage = CPLGetLastErrorMsg();
11607 0 : if( pszMessage[0] != '\0' )
11608 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11609 : else
11610 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11611 0 : SWIG_fail;
11612 : }
11613 : }
11614 1 : {
11615 : /* %typemap(ret) OGRErr */
11616 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11617 1 : resultobj = PyInt_FromLong( result );
11618 : }
11619 : }
11620 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11621 : return resultobj;
11622 : fail:
11623 : return NULL;
11624 : }
11625 :
11626 :
11627 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPolyconic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11628 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11629 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11630 0 : double arg2 ;
11631 0 : double arg3 ;
11632 0 : double arg4 ;
11633 0 : double arg5 ;
11634 0 : void *argp1 = 0 ;
11635 0 : int res1 = 0 ;
11636 0 : double val2 ;
11637 0 : int ecode2 = 0 ;
11638 0 : double val3 ;
11639 0 : int ecode3 = 0 ;
11640 0 : double val4 ;
11641 0 : int ecode4 = 0 ;
11642 0 : double val5 ;
11643 0 : int ecode5 = 0 ;
11644 0 : PyObject * obj0 = 0 ;
11645 0 : PyObject * obj1 = 0 ;
11646 0 : PyObject * obj2 = 0 ;
11647 0 : PyObject * obj3 = 0 ;
11648 0 : PyObject * obj4 = 0 ;
11649 0 : char * kwnames[] = {
11650 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11651 : };
11652 0 : OGRErr result;
11653 :
11654 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetPolyconic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11655 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11656 0 : if (!SWIG_IsOK(res1)) {
11657 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPolyconic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11658 : }
11659 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11660 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11661 0 : if (!SWIG_IsOK(ecode2)) {
11662 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPolyconic" "', argument " "2"" of type '" "double""'");
11663 : }
11664 0 : arg2 = static_cast< double >(val2);
11665 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11666 0 : if (!SWIG_IsOK(ecode3)) {
11667 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPolyconic" "', argument " "3"" of type '" "double""'");
11668 : }
11669 0 : arg3 = static_cast< double >(val3);
11670 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11671 0 : if (!SWIG_IsOK(ecode4)) {
11672 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPolyconic" "', argument " "4"" of type '" "double""'");
11673 : }
11674 0 : arg4 = static_cast< double >(val4);
11675 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11676 0 : if (!SWIG_IsOK(ecode5)) {
11677 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPolyconic" "', argument " "5"" of type '" "double""'");
11678 : }
11679 0 : arg5 = static_cast< double >(val5);
11680 0 : {
11681 0 : const int bLocalUseExceptions = GetUseExceptions();
11682 0 : if ( bLocalUseExceptions ) {
11683 0 : pushErrorHandler();
11684 : }
11685 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
11686 0 : if ( bLocalUseExceptions ) {
11687 0 : popErrorHandler();
11688 : }
11689 : #ifndef SED_HACKS
11690 : if ( bLocalUseExceptions ) {
11691 : CPLErr eclass = CPLGetLastErrorType();
11692 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11693 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11694 : }
11695 : }
11696 : #endif
11697 : }
11698 0 : {
11699 : /* %typemap(out) OGRErr */
11700 0 : if ( result != 0 && GetUseExceptions()) {
11701 0 : const char* pszMessage = CPLGetLastErrorMsg();
11702 0 : if( pszMessage[0] != '\0' )
11703 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11704 : else
11705 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11706 0 : SWIG_fail;
11707 : }
11708 : }
11709 0 : {
11710 : /* %typemap(ret) OGRErr */
11711 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11712 0 : resultobj = PyInt_FromLong( result );
11713 : }
11714 : }
11715 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11716 : return resultobj;
11717 : fail:
11718 : return NULL;
11719 : }
11720 :
11721 :
11722 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11723 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11724 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11725 1 : double arg2 ;
11726 1 : double arg3 ;
11727 1 : double arg4 ;
11728 1 : double arg5 ;
11729 1 : double arg6 ;
11730 1 : void *argp1 = 0 ;
11731 1 : int res1 = 0 ;
11732 1 : double val2 ;
11733 1 : int ecode2 = 0 ;
11734 1 : double val3 ;
11735 1 : int ecode3 = 0 ;
11736 1 : double val4 ;
11737 1 : int ecode4 = 0 ;
11738 1 : double val5 ;
11739 1 : int ecode5 = 0 ;
11740 1 : double val6 ;
11741 1 : int ecode6 = 0 ;
11742 1 : PyObject * obj0 = 0 ;
11743 1 : PyObject * obj1 = 0 ;
11744 1 : PyObject * obj2 = 0 ;
11745 1 : PyObject * obj3 = 0 ;
11746 1 : PyObject * obj4 = 0 ;
11747 1 : PyObject * obj5 = 0 ;
11748 1 : char * kwnames[] = {
11749 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11750 : };
11751 1 : OGRErr result;
11752 :
11753 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetPS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11754 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11755 1 : if (!SWIG_IsOK(res1)) {
11756 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11757 : }
11758 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11759 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11760 1 : if (!SWIG_IsOK(ecode2)) {
11761 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPS" "', argument " "2"" of type '" "double""'");
11762 : }
11763 1 : arg2 = static_cast< double >(val2);
11764 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11765 1 : if (!SWIG_IsOK(ecode3)) {
11766 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPS" "', argument " "3"" of type '" "double""'");
11767 : }
11768 1 : arg3 = static_cast< double >(val3);
11769 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11770 1 : if (!SWIG_IsOK(ecode4)) {
11771 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPS" "', argument " "4"" of type '" "double""'");
11772 : }
11773 1 : arg4 = static_cast< double >(val4);
11774 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11775 1 : if (!SWIG_IsOK(ecode5)) {
11776 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPS" "', argument " "5"" of type '" "double""'");
11777 : }
11778 1 : arg5 = static_cast< double >(val5);
11779 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11780 1 : if (!SWIG_IsOK(ecode6)) {
11781 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetPS" "', argument " "6"" of type '" "double""'");
11782 : }
11783 1 : arg6 = static_cast< double >(val6);
11784 1 : {
11785 1 : const int bLocalUseExceptions = GetUseExceptions();
11786 1 : if ( bLocalUseExceptions ) {
11787 1 : pushErrorHandler();
11788 : }
11789 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
11790 1 : if ( bLocalUseExceptions ) {
11791 1 : popErrorHandler();
11792 : }
11793 : #ifndef SED_HACKS
11794 : if ( bLocalUseExceptions ) {
11795 : CPLErr eclass = CPLGetLastErrorType();
11796 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11797 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11798 : }
11799 : }
11800 : #endif
11801 : }
11802 1 : {
11803 : /* %typemap(out) OGRErr */
11804 1 : if ( result != 0 && GetUseExceptions()) {
11805 0 : const char* pszMessage = CPLGetLastErrorMsg();
11806 0 : if( pszMessage[0] != '\0' )
11807 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11808 : else
11809 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11810 0 : SWIG_fail;
11811 : }
11812 : }
11813 1 : {
11814 : /* %typemap(ret) OGRErr */
11815 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11816 1 : resultobj = PyInt_FromLong( result );
11817 : }
11818 : }
11819 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11820 : return resultobj;
11821 : fail:
11822 : return NULL;
11823 : }
11824 :
11825 :
11826 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetRobinson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11827 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11828 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11829 0 : double arg2 ;
11830 0 : double arg3 ;
11831 0 : double arg4 ;
11832 0 : void *argp1 = 0 ;
11833 0 : int res1 = 0 ;
11834 0 : double val2 ;
11835 0 : int ecode2 = 0 ;
11836 0 : double val3 ;
11837 0 : int ecode3 = 0 ;
11838 0 : double val4 ;
11839 0 : int ecode4 = 0 ;
11840 0 : PyObject * obj0 = 0 ;
11841 0 : PyObject * obj1 = 0 ;
11842 0 : PyObject * obj2 = 0 ;
11843 0 : PyObject * obj3 = 0 ;
11844 0 : char * kwnames[] = {
11845 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11846 : };
11847 0 : OGRErr result;
11848 :
11849 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetRobinson", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11850 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11851 0 : if (!SWIG_IsOK(res1)) {
11852 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetRobinson" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11853 : }
11854 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11855 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11856 0 : if (!SWIG_IsOK(ecode2)) {
11857 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetRobinson" "', argument " "2"" of type '" "double""'");
11858 : }
11859 0 : arg2 = static_cast< double >(val2);
11860 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11861 0 : if (!SWIG_IsOK(ecode3)) {
11862 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetRobinson" "', argument " "3"" of type '" "double""'");
11863 : }
11864 0 : arg3 = static_cast< double >(val3);
11865 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11866 0 : if (!SWIG_IsOK(ecode4)) {
11867 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetRobinson" "', argument " "4"" of type '" "double""'");
11868 : }
11869 0 : arg4 = static_cast< double >(val4);
11870 0 : {
11871 0 : const int bLocalUseExceptions = GetUseExceptions();
11872 0 : if ( bLocalUseExceptions ) {
11873 0 : pushErrorHandler();
11874 : }
11875 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
11876 0 : if ( bLocalUseExceptions ) {
11877 0 : popErrorHandler();
11878 : }
11879 : #ifndef SED_HACKS
11880 : if ( bLocalUseExceptions ) {
11881 : CPLErr eclass = CPLGetLastErrorType();
11882 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11883 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11884 : }
11885 : }
11886 : #endif
11887 : }
11888 0 : {
11889 : /* %typemap(out) OGRErr */
11890 0 : if ( result != 0 && GetUseExceptions()) {
11891 0 : const char* pszMessage = CPLGetLastErrorMsg();
11892 0 : if( pszMessage[0] != '\0' )
11893 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11894 : else
11895 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11896 0 : SWIG_fail;
11897 : }
11898 : }
11899 0 : {
11900 : /* %typemap(ret) OGRErr */
11901 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11902 0 : resultobj = PyInt_FromLong( result );
11903 : }
11904 : }
11905 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11906 : return resultobj;
11907 : fail:
11908 : return NULL;
11909 : }
11910 :
11911 :
11912 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSinusoidal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11913 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11914 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11915 1 : double arg2 ;
11916 1 : double arg3 ;
11917 1 : double arg4 ;
11918 1 : void *argp1 = 0 ;
11919 1 : int res1 = 0 ;
11920 1 : double val2 ;
11921 1 : int ecode2 = 0 ;
11922 1 : double val3 ;
11923 1 : int ecode3 = 0 ;
11924 1 : double val4 ;
11925 1 : int ecode4 = 0 ;
11926 1 : PyObject * obj0 = 0 ;
11927 1 : PyObject * obj1 = 0 ;
11928 1 : PyObject * obj2 = 0 ;
11929 1 : PyObject * obj3 = 0 ;
11930 1 : char * kwnames[] = {
11931 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11932 : };
11933 1 : OGRErr result;
11934 :
11935 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetSinusoidal", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11936 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11937 1 : if (!SWIG_IsOK(res1)) {
11938 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSinusoidal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11939 : }
11940 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11941 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11942 1 : if (!SWIG_IsOK(ecode2)) {
11943 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSinusoidal" "', argument " "2"" of type '" "double""'");
11944 : }
11945 1 : arg2 = static_cast< double >(val2);
11946 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11947 1 : if (!SWIG_IsOK(ecode3)) {
11948 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSinusoidal" "', argument " "3"" of type '" "double""'");
11949 : }
11950 1 : arg3 = static_cast< double >(val3);
11951 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11952 1 : if (!SWIG_IsOK(ecode4)) {
11953 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSinusoidal" "', argument " "4"" of type '" "double""'");
11954 : }
11955 1 : arg4 = static_cast< double >(val4);
11956 1 : {
11957 1 : const int bLocalUseExceptions = GetUseExceptions();
11958 1 : if ( bLocalUseExceptions ) {
11959 1 : pushErrorHandler();
11960 : }
11961 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
11962 1 : if ( bLocalUseExceptions ) {
11963 1 : popErrorHandler();
11964 : }
11965 : #ifndef SED_HACKS
11966 : if ( bLocalUseExceptions ) {
11967 : CPLErr eclass = CPLGetLastErrorType();
11968 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11969 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11970 : }
11971 : }
11972 : #endif
11973 : }
11974 1 : {
11975 : /* %typemap(out) OGRErr */
11976 1 : if ( result != 0 && GetUseExceptions()) {
11977 0 : const char* pszMessage = CPLGetLastErrorMsg();
11978 0 : if( pszMessage[0] != '\0' )
11979 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11980 : else
11981 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11982 0 : SWIG_fail;
11983 : }
11984 : }
11985 1 : {
11986 : /* %typemap(ret) OGRErr */
11987 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11988 1 : resultobj = PyInt_FromLong( result );
11989 : }
11990 : }
11991 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11992 : return resultobj;
11993 : fail:
11994 : return NULL;
11995 : }
11996 :
11997 :
11998 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStereographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11999 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12000 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12001 0 : double arg2 ;
12002 0 : double arg3 ;
12003 0 : double arg4 ;
12004 0 : double arg5 ;
12005 0 : double arg6 ;
12006 0 : void *argp1 = 0 ;
12007 0 : int res1 = 0 ;
12008 0 : double val2 ;
12009 0 : int ecode2 = 0 ;
12010 0 : double val3 ;
12011 0 : int ecode3 = 0 ;
12012 0 : double val4 ;
12013 0 : int ecode4 = 0 ;
12014 0 : double val5 ;
12015 0 : int ecode5 = 0 ;
12016 0 : double val6 ;
12017 0 : int ecode6 = 0 ;
12018 0 : PyObject * obj0 = 0 ;
12019 0 : PyObject * obj1 = 0 ;
12020 0 : PyObject * obj2 = 0 ;
12021 0 : PyObject * obj3 = 0 ;
12022 0 : PyObject * obj4 = 0 ;
12023 0 : PyObject * obj5 = 0 ;
12024 0 : char * kwnames[] = {
12025 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12026 : };
12027 0 : OGRErr result;
12028 :
12029 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetStereographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12030 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12031 0 : if (!SWIG_IsOK(res1)) {
12032 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStereographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12033 : }
12034 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12035 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12036 0 : if (!SWIG_IsOK(ecode2)) {
12037 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStereographic" "', argument " "2"" of type '" "double""'");
12038 : }
12039 0 : arg2 = static_cast< double >(val2);
12040 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12041 0 : if (!SWIG_IsOK(ecode3)) {
12042 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStereographic" "', argument " "3"" of type '" "double""'");
12043 : }
12044 0 : arg3 = static_cast< double >(val3);
12045 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12046 0 : if (!SWIG_IsOK(ecode4)) {
12047 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetStereographic" "', argument " "4"" of type '" "double""'");
12048 : }
12049 0 : arg4 = static_cast< double >(val4);
12050 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12051 0 : if (!SWIG_IsOK(ecode5)) {
12052 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStereographic" "', argument " "5"" of type '" "double""'");
12053 : }
12054 0 : arg5 = static_cast< double >(val5);
12055 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12056 0 : if (!SWIG_IsOK(ecode6)) {
12057 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetStereographic" "', argument " "6"" of type '" "double""'");
12058 : }
12059 0 : arg6 = static_cast< double >(val6);
12060 0 : {
12061 0 : const int bLocalUseExceptions = GetUseExceptions();
12062 0 : if ( bLocalUseExceptions ) {
12063 0 : pushErrorHandler();
12064 : }
12065 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
12066 0 : if ( bLocalUseExceptions ) {
12067 0 : popErrorHandler();
12068 : }
12069 : #ifndef SED_HACKS
12070 : if ( bLocalUseExceptions ) {
12071 : CPLErr eclass = CPLGetLastErrorType();
12072 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12073 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12074 : }
12075 : }
12076 : #endif
12077 : }
12078 0 : {
12079 : /* %typemap(out) OGRErr */
12080 0 : if ( result != 0 && GetUseExceptions()) {
12081 0 : const char* pszMessage = CPLGetLastErrorMsg();
12082 0 : if( pszMessage[0] != '\0' )
12083 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12084 : else
12085 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12086 0 : SWIG_fail;
12087 : }
12088 : }
12089 0 : {
12090 : /* %typemap(ret) OGRErr */
12091 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12092 0 : resultobj = PyInt_FromLong( result );
12093 : }
12094 : }
12095 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12096 : return resultobj;
12097 : fail:
12098 : return NULL;
12099 : }
12100 :
12101 :
12102 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSOC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12103 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12104 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12105 0 : double arg2 ;
12106 0 : double arg3 ;
12107 0 : double arg4 ;
12108 0 : double arg5 ;
12109 0 : void *argp1 = 0 ;
12110 0 : int res1 = 0 ;
12111 0 : double val2 ;
12112 0 : int ecode2 = 0 ;
12113 0 : double val3 ;
12114 0 : int ecode3 = 0 ;
12115 0 : double val4 ;
12116 0 : int ecode4 = 0 ;
12117 0 : double val5 ;
12118 0 : int ecode5 = 0 ;
12119 0 : PyObject * obj0 = 0 ;
12120 0 : PyObject * obj1 = 0 ;
12121 0 : PyObject * obj2 = 0 ;
12122 0 : PyObject * obj3 = 0 ;
12123 0 : PyObject * obj4 = 0 ;
12124 0 : char * kwnames[] = {
12125 : (char *)"self", (char *)"latitudeoforigin", (char *)"cm", (char *)"fe", (char *)"fn", NULL
12126 : };
12127 0 : OGRErr result;
12128 :
12129 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetSOC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12130 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12131 0 : if (!SWIG_IsOK(res1)) {
12132 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSOC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12133 : }
12134 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12135 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12136 0 : if (!SWIG_IsOK(ecode2)) {
12137 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSOC" "', argument " "2"" of type '" "double""'");
12138 : }
12139 0 : arg2 = static_cast< double >(val2);
12140 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12141 0 : if (!SWIG_IsOK(ecode3)) {
12142 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSOC" "', argument " "3"" of type '" "double""'");
12143 : }
12144 0 : arg3 = static_cast< double >(val3);
12145 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12146 0 : if (!SWIG_IsOK(ecode4)) {
12147 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSOC" "', argument " "4"" of type '" "double""'");
12148 : }
12149 0 : arg4 = static_cast< double >(val4);
12150 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12151 0 : if (!SWIG_IsOK(ecode5)) {
12152 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetSOC" "', argument " "5"" of type '" "double""'");
12153 : }
12154 0 : arg5 = static_cast< double >(val5);
12155 0 : {
12156 0 : const int bLocalUseExceptions = GetUseExceptions();
12157 0 : if ( bLocalUseExceptions ) {
12158 0 : pushErrorHandler();
12159 : }
12160 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
12161 0 : if ( bLocalUseExceptions ) {
12162 0 : popErrorHandler();
12163 : }
12164 : #ifndef SED_HACKS
12165 : if ( bLocalUseExceptions ) {
12166 : CPLErr eclass = CPLGetLastErrorType();
12167 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12168 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12169 : }
12170 : }
12171 : #endif
12172 : }
12173 0 : {
12174 : /* %typemap(out) OGRErr */
12175 0 : if ( result != 0 && GetUseExceptions()) {
12176 0 : const char* pszMessage = CPLGetLastErrorMsg();
12177 0 : if( pszMessage[0] != '\0' )
12178 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12179 : else
12180 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12181 0 : SWIG_fail;
12182 : }
12183 : }
12184 0 : {
12185 : /* %typemap(ret) OGRErr */
12186 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12187 0 : resultobj = PyInt_FromLong( result );
12188 : }
12189 : }
12190 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12191 : return resultobj;
12192 : fail:
12193 : return NULL;
12194 : }
12195 :
12196 :
12197 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12198 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12199 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12200 1 : double arg2 ;
12201 1 : double arg3 ;
12202 1 : double arg4 ;
12203 1 : double arg5 ;
12204 1 : double arg6 ;
12205 1 : void *argp1 = 0 ;
12206 1 : int res1 = 0 ;
12207 1 : double val2 ;
12208 1 : int ecode2 = 0 ;
12209 1 : double val3 ;
12210 1 : int ecode3 = 0 ;
12211 1 : double val4 ;
12212 1 : int ecode4 = 0 ;
12213 1 : double val5 ;
12214 1 : int ecode5 = 0 ;
12215 1 : double val6 ;
12216 1 : int ecode6 = 0 ;
12217 1 : PyObject * obj0 = 0 ;
12218 1 : PyObject * obj1 = 0 ;
12219 1 : PyObject * obj2 = 0 ;
12220 1 : PyObject * obj3 = 0 ;
12221 1 : PyObject * obj4 = 0 ;
12222 1 : PyObject * obj5 = 0 ;
12223 1 : char * kwnames[] = {
12224 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12225 : };
12226 1 : OGRErr result;
12227 :
12228 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12229 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12230 1 : if (!SWIG_IsOK(res1)) {
12231 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12232 : }
12233 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12234 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12235 1 : if (!SWIG_IsOK(ecode2)) {
12236 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTM" "', argument " "2"" of type '" "double""'");
12237 : }
12238 1 : arg2 = static_cast< double >(val2);
12239 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12240 1 : if (!SWIG_IsOK(ecode3)) {
12241 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTM" "', argument " "3"" of type '" "double""'");
12242 : }
12243 1 : arg3 = static_cast< double >(val3);
12244 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12245 1 : if (!SWIG_IsOK(ecode4)) {
12246 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTM" "', argument " "4"" of type '" "double""'");
12247 : }
12248 1 : arg4 = static_cast< double >(val4);
12249 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12250 1 : if (!SWIG_IsOK(ecode5)) {
12251 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTM" "', argument " "5"" of type '" "double""'");
12252 : }
12253 1 : arg5 = static_cast< double >(val5);
12254 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12255 1 : if (!SWIG_IsOK(ecode6)) {
12256 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTM" "', argument " "6"" of type '" "double""'");
12257 : }
12258 1 : arg6 = static_cast< double >(val6);
12259 1 : {
12260 1 : const int bLocalUseExceptions = GetUseExceptions();
12261 1 : if ( bLocalUseExceptions ) {
12262 1 : pushErrorHandler();
12263 : }
12264 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
12265 1 : if ( bLocalUseExceptions ) {
12266 1 : popErrorHandler();
12267 : }
12268 : #ifndef SED_HACKS
12269 : if ( bLocalUseExceptions ) {
12270 : CPLErr eclass = CPLGetLastErrorType();
12271 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12272 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12273 : }
12274 : }
12275 : #endif
12276 : }
12277 1 : {
12278 : /* %typemap(out) OGRErr */
12279 1 : if ( result != 0 && GetUseExceptions()) {
12280 0 : const char* pszMessage = CPLGetLastErrorMsg();
12281 0 : if( pszMessage[0] != '\0' )
12282 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12283 : else
12284 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12285 0 : SWIG_fail;
12286 : }
12287 : }
12288 1 : {
12289 : /* %typemap(ret) OGRErr */
12290 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12291 1 : resultobj = PyInt_FromLong( result );
12292 : }
12293 : }
12294 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12295 : return resultobj;
12296 : fail:
12297 : return NULL;
12298 : }
12299 :
12300 :
12301 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMVariant(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12302 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12303 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12304 0 : char *arg2 = (char *) 0 ;
12305 0 : double arg3 ;
12306 0 : double arg4 ;
12307 0 : double arg5 ;
12308 0 : double arg6 ;
12309 0 : double arg7 ;
12310 0 : void *argp1 = 0 ;
12311 0 : int res1 = 0 ;
12312 0 : int res2 ;
12313 0 : char *buf2 = 0 ;
12314 0 : int alloc2 = 0 ;
12315 0 : double val3 ;
12316 0 : int ecode3 = 0 ;
12317 0 : double val4 ;
12318 0 : int ecode4 = 0 ;
12319 0 : double val5 ;
12320 0 : int ecode5 = 0 ;
12321 0 : double val6 ;
12322 0 : int ecode6 = 0 ;
12323 0 : double val7 ;
12324 0 : int ecode7 = 0 ;
12325 0 : PyObject * obj0 = 0 ;
12326 0 : PyObject * obj1 = 0 ;
12327 0 : PyObject * obj2 = 0 ;
12328 0 : PyObject * obj3 = 0 ;
12329 0 : PyObject * obj4 = 0 ;
12330 0 : PyObject * obj5 = 0 ;
12331 0 : PyObject * obj6 = 0 ;
12332 0 : char * kwnames[] = {
12333 : (char *)"self", (char *)"pszVariantName", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12334 : };
12335 0 : OGRErr result;
12336 :
12337 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetTMVariant", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12338 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12339 0 : if (!SWIG_IsOK(res1)) {
12340 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMVariant" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12341 : }
12342 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12343 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12344 0 : if (!SWIG_IsOK(res2)) {
12345 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTMVariant" "', argument " "2"" of type '" "char const *""'");
12346 : }
12347 0 : arg2 = reinterpret_cast< char * >(buf2);
12348 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12349 0 : if (!SWIG_IsOK(ecode3)) {
12350 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMVariant" "', argument " "3"" of type '" "double""'");
12351 : }
12352 0 : arg3 = static_cast< double >(val3);
12353 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12354 0 : if (!SWIG_IsOK(ecode4)) {
12355 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMVariant" "', argument " "4"" of type '" "double""'");
12356 : }
12357 0 : arg4 = static_cast< double >(val4);
12358 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12359 0 : if (!SWIG_IsOK(ecode5)) {
12360 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMVariant" "', argument " "5"" of type '" "double""'");
12361 : }
12362 0 : arg5 = static_cast< double >(val5);
12363 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12364 0 : if (!SWIG_IsOK(ecode6)) {
12365 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMVariant" "', argument " "6"" of type '" "double""'");
12366 : }
12367 0 : arg6 = static_cast< double >(val6);
12368 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12369 0 : if (!SWIG_IsOK(ecode7)) {
12370 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTMVariant" "', argument " "7"" of type '" "double""'");
12371 : }
12372 0 : arg7 = static_cast< double >(val7);
12373 0 : {
12374 0 : const int bLocalUseExceptions = GetUseExceptions();
12375 0 : if ( bLocalUseExceptions ) {
12376 0 : pushErrorHandler();
12377 : }
12378 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
12379 0 : if ( bLocalUseExceptions ) {
12380 0 : popErrorHandler();
12381 : }
12382 : #ifndef SED_HACKS
12383 : if ( bLocalUseExceptions ) {
12384 : CPLErr eclass = CPLGetLastErrorType();
12385 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12386 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12387 : }
12388 : }
12389 : #endif
12390 : }
12391 0 : {
12392 : /* %typemap(out) OGRErr */
12393 0 : if ( result != 0 && GetUseExceptions()) {
12394 0 : const char* pszMessage = CPLGetLastErrorMsg();
12395 0 : if( pszMessage[0] != '\0' )
12396 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12397 : else
12398 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12399 0 : SWIG_fail;
12400 : }
12401 : }
12402 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12403 0 : {
12404 : /* %typemap(ret) OGRErr */
12405 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12406 0 : resultobj = PyInt_FromLong( result );
12407 : }
12408 : }
12409 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12410 : return resultobj;
12411 0 : fail:
12412 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12413 : return NULL;
12414 : }
12415 :
12416 :
12417 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12418 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12419 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12420 0 : double arg2 ;
12421 0 : double arg3 ;
12422 0 : double arg4 ;
12423 0 : double arg5 ;
12424 0 : void *argp1 = 0 ;
12425 0 : int res1 = 0 ;
12426 0 : double val2 ;
12427 0 : int ecode2 = 0 ;
12428 0 : double val3 ;
12429 0 : int ecode3 = 0 ;
12430 0 : double val4 ;
12431 0 : int ecode4 = 0 ;
12432 0 : double val5 ;
12433 0 : int ecode5 = 0 ;
12434 0 : PyObject * obj0 = 0 ;
12435 0 : PyObject * obj1 = 0 ;
12436 0 : PyObject * obj2 = 0 ;
12437 0 : PyObject * obj3 = 0 ;
12438 0 : PyObject * obj4 = 0 ;
12439 0 : char * kwnames[] = {
12440 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12441 : };
12442 0 : OGRErr result;
12443 :
12444 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetTMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12445 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12446 0 : if (!SWIG_IsOK(res1)) {
12447 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12448 : }
12449 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12450 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12451 0 : if (!SWIG_IsOK(ecode2)) {
12452 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMG" "', argument " "2"" of type '" "double""'");
12453 : }
12454 0 : arg2 = static_cast< double >(val2);
12455 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12456 0 : if (!SWIG_IsOK(ecode3)) {
12457 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMG" "', argument " "3"" of type '" "double""'");
12458 : }
12459 0 : arg3 = static_cast< double >(val3);
12460 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12461 0 : if (!SWIG_IsOK(ecode4)) {
12462 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMG" "', argument " "4"" of type '" "double""'");
12463 : }
12464 0 : arg4 = static_cast< double >(val4);
12465 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12466 0 : if (!SWIG_IsOK(ecode5)) {
12467 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMG" "', argument " "5"" of type '" "double""'");
12468 : }
12469 0 : arg5 = static_cast< double >(val5);
12470 0 : {
12471 0 : const int bLocalUseExceptions = GetUseExceptions();
12472 0 : if ( bLocalUseExceptions ) {
12473 0 : pushErrorHandler();
12474 : }
12475 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
12476 0 : if ( bLocalUseExceptions ) {
12477 0 : popErrorHandler();
12478 : }
12479 : #ifndef SED_HACKS
12480 : if ( bLocalUseExceptions ) {
12481 : CPLErr eclass = CPLGetLastErrorType();
12482 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12483 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12484 : }
12485 : }
12486 : #endif
12487 : }
12488 0 : {
12489 : /* %typemap(out) OGRErr */
12490 0 : if ( result != 0 && GetUseExceptions()) {
12491 0 : const char* pszMessage = CPLGetLastErrorMsg();
12492 0 : if( pszMessage[0] != '\0' )
12493 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12494 : else
12495 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12496 0 : SWIG_fail;
12497 : }
12498 : }
12499 0 : {
12500 : /* %typemap(ret) OGRErr */
12501 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12502 0 : resultobj = PyInt_FromLong( result );
12503 : }
12504 : }
12505 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12506 : return resultobj;
12507 : fail:
12508 : return NULL;
12509 : }
12510 :
12511 :
12512 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMSO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12513 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12514 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12515 0 : double arg2 ;
12516 0 : double arg3 ;
12517 0 : double arg4 ;
12518 0 : double arg5 ;
12519 0 : double arg6 ;
12520 0 : void *argp1 = 0 ;
12521 0 : int res1 = 0 ;
12522 0 : double val2 ;
12523 0 : int ecode2 = 0 ;
12524 0 : double val3 ;
12525 0 : int ecode3 = 0 ;
12526 0 : double val4 ;
12527 0 : int ecode4 = 0 ;
12528 0 : double val5 ;
12529 0 : int ecode5 = 0 ;
12530 0 : double val6 ;
12531 0 : int ecode6 = 0 ;
12532 0 : PyObject * obj0 = 0 ;
12533 0 : PyObject * obj1 = 0 ;
12534 0 : PyObject * obj2 = 0 ;
12535 0 : PyObject * obj3 = 0 ;
12536 0 : PyObject * obj4 = 0 ;
12537 0 : PyObject * obj5 = 0 ;
12538 0 : char * kwnames[] = {
12539 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12540 : };
12541 0 : OGRErr result;
12542 :
12543 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTMSO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12544 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12545 0 : if (!SWIG_IsOK(res1)) {
12546 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMSO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12547 : }
12548 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12549 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12550 0 : if (!SWIG_IsOK(ecode2)) {
12551 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMSO" "', argument " "2"" of type '" "double""'");
12552 : }
12553 0 : arg2 = static_cast< double >(val2);
12554 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12555 0 : if (!SWIG_IsOK(ecode3)) {
12556 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMSO" "', argument " "3"" of type '" "double""'");
12557 : }
12558 0 : arg3 = static_cast< double >(val3);
12559 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12560 0 : if (!SWIG_IsOK(ecode4)) {
12561 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMSO" "', argument " "4"" of type '" "double""'");
12562 : }
12563 0 : arg4 = static_cast< double >(val4);
12564 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12565 0 : if (!SWIG_IsOK(ecode5)) {
12566 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMSO" "', argument " "5"" of type '" "double""'");
12567 : }
12568 0 : arg5 = static_cast< double >(val5);
12569 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12570 0 : if (!SWIG_IsOK(ecode6)) {
12571 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMSO" "', argument " "6"" of type '" "double""'");
12572 : }
12573 0 : arg6 = static_cast< double >(val6);
12574 0 : {
12575 0 : const int bLocalUseExceptions = GetUseExceptions();
12576 0 : if ( bLocalUseExceptions ) {
12577 0 : pushErrorHandler();
12578 : }
12579 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
12580 0 : if ( bLocalUseExceptions ) {
12581 0 : popErrorHandler();
12582 : }
12583 : #ifndef SED_HACKS
12584 : if ( bLocalUseExceptions ) {
12585 : CPLErr eclass = CPLGetLastErrorType();
12586 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12587 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12588 : }
12589 : }
12590 : #endif
12591 : }
12592 0 : {
12593 : /* %typemap(out) OGRErr */
12594 0 : if ( result != 0 && GetUseExceptions()) {
12595 0 : const char* pszMessage = CPLGetLastErrorMsg();
12596 0 : if( pszMessage[0] != '\0' )
12597 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12598 : else
12599 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12600 0 : SWIG_fail;
12601 : }
12602 : }
12603 0 : {
12604 : /* %typemap(ret) OGRErr */
12605 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12606 0 : resultobj = PyInt_FromLong( result );
12607 : }
12608 : }
12609 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12610 : return resultobj;
12611 : fail:
12612 : return NULL;
12613 : }
12614 :
12615 :
12616 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVDG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12617 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12618 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12619 0 : double arg2 ;
12620 0 : double arg3 ;
12621 0 : double arg4 ;
12622 0 : void *argp1 = 0 ;
12623 0 : int res1 = 0 ;
12624 0 : double val2 ;
12625 0 : int ecode2 = 0 ;
12626 0 : double val3 ;
12627 0 : int ecode3 = 0 ;
12628 0 : double val4 ;
12629 0 : int ecode4 = 0 ;
12630 0 : PyObject * obj0 = 0 ;
12631 0 : PyObject * obj1 = 0 ;
12632 0 : PyObject * obj2 = 0 ;
12633 0 : PyObject * obj3 = 0 ;
12634 0 : char * kwnames[] = {
12635 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12636 : };
12637 0 : OGRErr result;
12638 :
12639 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetVDG", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
12640 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12641 0 : if (!SWIG_IsOK(res1)) {
12642 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVDG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12643 : }
12644 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12645 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12646 0 : if (!SWIG_IsOK(ecode2)) {
12647 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVDG" "', argument " "2"" of type '" "double""'");
12648 : }
12649 0 : arg2 = static_cast< double >(val2);
12650 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12651 0 : if (!SWIG_IsOK(ecode3)) {
12652 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVDG" "', argument " "3"" of type '" "double""'");
12653 : }
12654 0 : arg3 = static_cast< double >(val3);
12655 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12656 0 : if (!SWIG_IsOK(ecode4)) {
12657 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVDG" "', argument " "4"" of type '" "double""'");
12658 : }
12659 0 : arg4 = static_cast< double >(val4);
12660 0 : {
12661 0 : const int bLocalUseExceptions = GetUseExceptions();
12662 0 : if ( bLocalUseExceptions ) {
12663 0 : pushErrorHandler();
12664 : }
12665 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
12666 0 : if ( bLocalUseExceptions ) {
12667 0 : popErrorHandler();
12668 : }
12669 : #ifndef SED_HACKS
12670 : if ( bLocalUseExceptions ) {
12671 : CPLErr eclass = CPLGetLastErrorType();
12672 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12673 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12674 : }
12675 : }
12676 : #endif
12677 : }
12678 0 : {
12679 : /* %typemap(out) OGRErr */
12680 0 : if ( result != 0 && GetUseExceptions()) {
12681 0 : const char* pszMessage = CPLGetLastErrorMsg();
12682 0 : if( pszMessage[0] != '\0' )
12683 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12684 : else
12685 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12686 0 : SWIG_fail;
12687 : }
12688 : }
12689 0 : {
12690 : /* %typemap(ret) OGRErr */
12691 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12692 0 : resultobj = PyInt_FromLong( result );
12693 : }
12694 : }
12695 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12696 : return resultobj;
12697 : fail:
12698 : return NULL;
12699 : }
12700 :
12701 :
12702 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVerticalPerspective(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12703 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12704 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12705 1 : double arg2 ;
12706 1 : double arg3 ;
12707 1 : double arg4 ;
12708 1 : double arg5 ;
12709 1 : double arg6 ;
12710 1 : double arg7 ;
12711 1 : void *argp1 = 0 ;
12712 1 : int res1 = 0 ;
12713 1 : double val2 ;
12714 1 : int ecode2 = 0 ;
12715 1 : double val3 ;
12716 1 : int ecode3 = 0 ;
12717 1 : double val4 ;
12718 1 : int ecode4 = 0 ;
12719 1 : double val5 ;
12720 1 : int ecode5 = 0 ;
12721 1 : double val6 ;
12722 1 : int ecode6 = 0 ;
12723 1 : double val7 ;
12724 1 : int ecode7 = 0 ;
12725 1 : PyObject * obj0 = 0 ;
12726 1 : PyObject * obj1 = 0 ;
12727 1 : PyObject * obj2 = 0 ;
12728 1 : PyObject * obj3 = 0 ;
12729 1 : PyObject * obj4 = 0 ;
12730 1 : PyObject * obj5 = 0 ;
12731 1 : PyObject * obj6 = 0 ;
12732 1 : char * kwnames[] = {
12733 : (char *)"self", (char *)"topoOriginLat", (char *)"topoOriginLon", (char *)"topoOriginHeight", (char *)"viewPointHeight", (char *)"fe", (char *)"fn", NULL
12734 : };
12735 1 : OGRErr result;
12736 :
12737 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetVerticalPerspective", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12738 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12739 1 : if (!SWIG_IsOK(res1)) {
12740 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12741 : }
12742 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12743 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12744 1 : if (!SWIG_IsOK(ecode2)) {
12745 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "2"" of type '" "double""'");
12746 : }
12747 1 : arg2 = static_cast< double >(val2);
12748 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12749 1 : if (!SWIG_IsOK(ecode3)) {
12750 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "3"" of type '" "double""'");
12751 : }
12752 1 : arg3 = static_cast< double >(val3);
12753 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12754 1 : if (!SWIG_IsOK(ecode4)) {
12755 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "4"" of type '" "double""'");
12756 : }
12757 1 : arg4 = static_cast< double >(val4);
12758 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12759 1 : if (!SWIG_IsOK(ecode5)) {
12760 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "5"" of type '" "double""'");
12761 : }
12762 1 : arg5 = static_cast< double >(val5);
12763 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12764 1 : if (!SWIG_IsOK(ecode6)) {
12765 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "6"" of type '" "double""'");
12766 : }
12767 1 : arg6 = static_cast< double >(val6);
12768 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12769 1 : if (!SWIG_IsOK(ecode7)) {
12770 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "7"" of type '" "double""'");
12771 : }
12772 1 : arg7 = static_cast< double >(val7);
12773 1 : {
12774 1 : const int bLocalUseExceptions = GetUseExceptions();
12775 1 : if ( bLocalUseExceptions ) {
12776 1 : pushErrorHandler();
12777 : }
12778 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetVerticalPerspective(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
12779 1 : if ( bLocalUseExceptions ) {
12780 1 : popErrorHandler();
12781 : }
12782 : #ifndef SED_HACKS
12783 : if ( bLocalUseExceptions ) {
12784 : CPLErr eclass = CPLGetLastErrorType();
12785 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12786 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12787 : }
12788 : }
12789 : #endif
12790 : }
12791 1 : {
12792 : /* %typemap(out) OGRErr */
12793 1 : if ( result != 0 && GetUseExceptions()) {
12794 0 : const char* pszMessage = CPLGetLastErrorMsg();
12795 0 : if( pszMessage[0] != '\0' )
12796 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12797 : else
12798 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12799 0 : SWIG_fail;
12800 : }
12801 : }
12802 1 : {
12803 : /* %typemap(ret) OGRErr */
12804 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12805 1 : resultobj = PyInt_FromLong( result );
12806 : }
12807 : }
12808 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12809 : return resultobj;
12810 : fail:
12811 : return NULL;
12812 : }
12813 :
12814 :
12815 61 : SWIGINTERN PyObject *_wrap_SpatialReference_SetWellKnownGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12816 61 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12817 61 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12818 61 : char *arg2 = (char *) 0 ;
12819 61 : void *argp1 = 0 ;
12820 61 : int res1 = 0 ;
12821 61 : int res2 ;
12822 61 : char *buf2 = 0 ;
12823 61 : int alloc2 = 0 ;
12824 61 : PyObject *swig_obj[2] ;
12825 61 : OGRErr result;
12826 :
12827 61 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetWellKnownGeogCS", 2, 2, swig_obj)) SWIG_fail;
12828 61 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12829 61 : if (!SWIG_IsOK(res1)) {
12830 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12831 : }
12832 61 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12833 61 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
12834 61 : if (!SWIG_IsOK(res2)) {
12835 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "2"" of type '" "char const *""'");
12836 : }
12837 61 : arg2 = reinterpret_cast< char * >(buf2);
12838 61 : {
12839 61 : if (!arg2) {
12840 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12841 : }
12842 : }
12843 61 : {
12844 61 : const int bLocalUseExceptions = GetUseExceptions();
12845 61 : if ( bLocalUseExceptions ) {
12846 60 : pushErrorHandler();
12847 : }
12848 61 : result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
12849 61 : if ( bLocalUseExceptions ) {
12850 60 : popErrorHandler();
12851 : }
12852 : #ifndef SED_HACKS
12853 : if ( bLocalUseExceptions ) {
12854 : CPLErr eclass = CPLGetLastErrorType();
12855 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12856 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12857 : }
12858 : }
12859 : #endif
12860 : }
12861 61 : {
12862 : /* %typemap(out) OGRErr */
12863 61 : if ( result != 0 && GetUseExceptions()) {
12864 0 : const char* pszMessage = CPLGetLastErrorMsg();
12865 0 : if( pszMessage[0] != '\0' )
12866 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12867 : else
12868 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12869 0 : SWIG_fail;
12870 : }
12871 : }
12872 61 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12873 61 : {
12874 : /* %typemap(ret) OGRErr */
12875 61 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12876 61 : resultobj = PyInt_FromLong( result );
12877 : }
12878 : }
12879 61 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12880 : return resultobj;
12881 0 : fail:
12882 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12883 : return NULL;
12884 : }
12885 :
12886 :
12887 672 : SWIGINTERN PyObject *_wrap_SpatialReference_SetFromUserInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12888 672 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12889 672 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12890 672 : char *arg2 = (char *) 0 ;
12891 672 : char **arg3 = (char **) NULL ;
12892 672 : void *argp1 = 0 ;
12893 672 : int res1 = 0 ;
12894 672 : int res2 ;
12895 672 : char *buf2 = 0 ;
12896 672 : int alloc2 = 0 ;
12897 672 : PyObject * obj0 = 0 ;
12898 672 : PyObject * obj1 = 0 ;
12899 672 : PyObject * obj2 = 0 ;
12900 672 : char * kwnames[] = {
12901 : (char *)"self", (char *)"name", (char *)"options", NULL
12902 : };
12903 672 : OGRErr result;
12904 :
12905 672 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_SetFromUserInput", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
12906 672 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12907 672 : if (!SWIG_IsOK(res1)) {
12908 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetFromUserInput" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12909 : }
12910 672 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12911 672 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12912 672 : if (!SWIG_IsOK(res2)) {
12913 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetFromUserInput" "', argument " "2"" of type '" "char const *""'");
12914 : }
12915 672 : arg2 = reinterpret_cast< char * >(buf2);
12916 672 : if (obj2) {
12917 1 : {
12918 : /* %typemap(in) char **dict */
12919 1 : arg3 = NULL;
12920 1 : if ( PySequence_Check( obj2 ) ) {
12921 1 : int bErr = FALSE;
12922 1 : arg3 = CSLFromPySequence(obj2, &bErr);
12923 1 : if ( bErr )
12924 : {
12925 0 : SWIG_fail;
12926 : }
12927 : }
12928 0 : else if ( PyMapping_Check( obj2 ) ) {
12929 0 : int bErr = FALSE;
12930 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
12931 0 : if ( bErr )
12932 : {
12933 0 : SWIG_fail;
12934 : }
12935 : }
12936 : else {
12937 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12938 0 : SWIG_fail;
12939 : }
12940 : }
12941 : }
12942 672 : {
12943 672 : if (!arg2) {
12944 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12945 : }
12946 : }
12947 672 : {
12948 672 : const int bLocalUseExceptions = GetUseExceptions();
12949 672 : if ( bLocalUseExceptions ) {
12950 494 : pushErrorHandler();
12951 : }
12952 672 : result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2,arg3);
12953 672 : if ( bLocalUseExceptions ) {
12954 494 : popErrorHandler();
12955 : }
12956 : #ifndef SED_HACKS
12957 : if ( bLocalUseExceptions ) {
12958 : CPLErr eclass = CPLGetLastErrorType();
12959 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12960 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12961 : }
12962 : }
12963 : #endif
12964 : }
12965 672 : {
12966 : /* %typemap(out) OGRErr */
12967 682 : if ( result != 0 && GetUseExceptions()) {
12968 9 : const char* pszMessage = CPLGetLastErrorMsg();
12969 9 : if( pszMessage[0] != '\0' )
12970 8 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12971 : else
12972 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12973 9 : SWIG_fail;
12974 : }
12975 : }
12976 663 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12977 663 : {
12978 : /* %typemap(freearg) char **dict */
12979 663 : CSLDestroy( arg3 );
12980 : }
12981 663 : {
12982 : /* %typemap(ret) OGRErr */
12983 663 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12984 663 : resultobj = PyInt_FromLong( result );
12985 : }
12986 : }
12987 663 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12988 : return resultobj;
12989 9 : fail:
12990 9 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12991 9 : {
12992 : /* %typemap(freearg) char **dict */
12993 9 : CSLDestroy( arg3 );
12994 : }
12995 : return NULL;
12996 : }
12997 :
12998 :
12999 1 : SWIGINTERN PyObject *_wrap_SpatialReference_CopyGeogCSFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13000 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13001 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13002 1 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
13003 1 : void *argp1 = 0 ;
13004 1 : int res1 = 0 ;
13005 1 : void *argp2 = 0 ;
13006 1 : int res2 = 0 ;
13007 1 : PyObject *swig_obj[2] ;
13008 1 : OGRErr result;
13009 :
13010 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_CopyGeogCSFrom", 2, 2, swig_obj)) SWIG_fail;
13011 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13012 1 : if (!SWIG_IsOK(res1)) {
13013 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13014 : }
13015 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13016 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13017 1 : if (!SWIG_IsOK(res2)) {
13018 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
13019 : }
13020 1 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
13021 1 : {
13022 1 : if (!arg2) {
13023 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13024 : }
13025 : }
13026 1 : {
13027 1 : const int bLocalUseExceptions = GetUseExceptions();
13028 1 : if ( bLocalUseExceptions ) {
13029 0 : pushErrorHandler();
13030 : }
13031 1 : result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
13032 1 : if ( bLocalUseExceptions ) {
13033 0 : popErrorHandler();
13034 : }
13035 : #ifndef SED_HACKS
13036 : if ( bLocalUseExceptions ) {
13037 : CPLErr eclass = CPLGetLastErrorType();
13038 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13039 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13040 : }
13041 : }
13042 : #endif
13043 : }
13044 1 : {
13045 : /* %typemap(out) OGRErr */
13046 1 : if ( result != 0 && GetUseExceptions()) {
13047 0 : const char* pszMessage = CPLGetLastErrorMsg();
13048 0 : if( pszMessage[0] != '\0' )
13049 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13050 : else
13051 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13052 0 : SWIG_fail;
13053 : }
13054 : }
13055 1 : {
13056 : /* %typemap(ret) OGRErr */
13057 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13058 1 : resultobj = PyInt_FromLong( result );
13059 : }
13060 : }
13061 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13062 : return resultobj;
13063 : fail:
13064 : return NULL;
13065 : }
13066 :
13067 :
13068 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13069 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13070 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13071 3 : double arg2 ;
13072 3 : double arg3 ;
13073 3 : double arg4 ;
13074 3 : double arg5 = (double) 0.0 ;
13075 3 : double arg6 = (double) 0.0 ;
13076 3 : double arg7 = (double) 0.0 ;
13077 3 : double arg8 = (double) 0.0 ;
13078 3 : void *argp1 = 0 ;
13079 3 : int res1 = 0 ;
13080 3 : double val2 ;
13081 3 : int ecode2 = 0 ;
13082 3 : double val3 ;
13083 3 : int ecode3 = 0 ;
13084 3 : double val4 ;
13085 3 : int ecode4 = 0 ;
13086 3 : double val5 ;
13087 3 : int ecode5 = 0 ;
13088 3 : double val6 ;
13089 3 : int ecode6 = 0 ;
13090 3 : double val7 ;
13091 3 : int ecode7 = 0 ;
13092 3 : double val8 ;
13093 3 : int ecode8 = 0 ;
13094 3 : PyObject *swig_obj[8] ;
13095 3 : OGRErr result;
13096 :
13097 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTOWGS84", 4, 8, swig_obj)) SWIG_fail;
13098 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13099 3 : if (!SWIG_IsOK(res1)) {
13100 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13101 : }
13102 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13103 3 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
13104 3 : if (!SWIG_IsOK(ecode2)) {
13105 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTOWGS84" "', argument " "2"" of type '" "double""'");
13106 : }
13107 3 : arg2 = static_cast< double >(val2);
13108 3 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
13109 3 : if (!SWIG_IsOK(ecode3)) {
13110 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTOWGS84" "', argument " "3"" of type '" "double""'");
13111 : }
13112 3 : arg3 = static_cast< double >(val3);
13113 3 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
13114 3 : if (!SWIG_IsOK(ecode4)) {
13115 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTOWGS84" "', argument " "4"" of type '" "double""'");
13116 : }
13117 3 : arg4 = static_cast< double >(val4);
13118 3 : if (swig_obj[4]) {
13119 2 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13120 2 : if (!SWIG_IsOK(ecode5)) {
13121 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTOWGS84" "', argument " "5"" of type '" "double""'");
13122 : }
13123 2 : arg5 = static_cast< double >(val5);
13124 : }
13125 3 : if (swig_obj[5]) {
13126 2 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13127 2 : if (!SWIG_IsOK(ecode6)) {
13128 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTOWGS84" "', argument " "6"" of type '" "double""'");
13129 : }
13130 2 : arg6 = static_cast< double >(val6);
13131 : }
13132 3 : if (swig_obj[6]) {
13133 2 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
13134 2 : if (!SWIG_IsOK(ecode7)) {
13135 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTOWGS84" "', argument " "7"" of type '" "double""'");
13136 : }
13137 2 : arg7 = static_cast< double >(val7);
13138 : }
13139 3 : if (swig_obj[7]) {
13140 2 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13141 2 : if (!SWIG_IsOK(ecode8)) {
13142 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetTOWGS84" "', argument " "8"" of type '" "double""'");
13143 : }
13144 2 : arg8 = static_cast< double >(val8);
13145 : }
13146 3 : {
13147 3 : const int bLocalUseExceptions = GetUseExceptions();
13148 3 : if ( bLocalUseExceptions ) {
13149 1 : pushErrorHandler();
13150 : }
13151 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
13152 3 : if ( bLocalUseExceptions ) {
13153 1 : popErrorHandler();
13154 : }
13155 : #ifndef SED_HACKS
13156 : if ( bLocalUseExceptions ) {
13157 : CPLErr eclass = CPLGetLastErrorType();
13158 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13159 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13160 : }
13161 : }
13162 : #endif
13163 : }
13164 3 : {
13165 : /* %typemap(out) OGRErr */
13166 3 : if ( result != 0 && GetUseExceptions()) {
13167 0 : const char* pszMessage = CPLGetLastErrorMsg();
13168 0 : if( pszMessage[0] != '\0' )
13169 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13170 : else
13171 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13172 0 : SWIG_fail;
13173 : }
13174 : }
13175 3 : {
13176 : /* %typemap(ret) OGRErr */
13177 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13178 3 : resultobj = PyInt_FromLong( result );
13179 : }
13180 : }
13181 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13182 : return resultobj;
13183 : fail:
13184 : return NULL;
13185 : }
13186 :
13187 :
13188 4 : SWIGINTERN PyObject *_wrap_SpatialReference_HasTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13189 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13190 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13191 4 : void *argp1 = 0 ;
13192 4 : int res1 = 0 ;
13193 4 : PyObject *swig_obj[1] ;
13194 4 : bool result;
13195 :
13196 4 : if (!args) SWIG_fail;
13197 4 : swig_obj[0] = args;
13198 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13199 4 : if (!SWIG_IsOK(res1)) {
13200 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13201 : }
13202 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13203 4 : {
13204 4 : const int bLocalUseExceptions = GetUseExceptions();
13205 4 : if ( bLocalUseExceptions ) {
13206 0 : pushErrorHandler();
13207 : }
13208 4 : result = (bool)OSRSpatialReferenceShadow_HasTOWGS84(arg1);
13209 4 : if ( bLocalUseExceptions ) {
13210 0 : popErrorHandler();
13211 : }
13212 : #ifndef SED_HACKS
13213 : if ( bLocalUseExceptions ) {
13214 : CPLErr eclass = CPLGetLastErrorType();
13215 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13216 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13217 : }
13218 : }
13219 : #endif
13220 : }
13221 4 : resultobj = SWIG_From_bool(static_cast< bool >(result));
13222 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13223 : return resultobj;
13224 : fail:
13225 : return NULL;
13226 : }
13227 :
13228 :
13229 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13230 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13231 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13232 4 : double *arg2 ;
13233 4 : void *argp1 = 0 ;
13234 4 : int res1 = 0 ;
13235 4 : double argout2[7] ;
13236 4 : PyObject *swig_obj[1] ;
13237 4 : OGRErr result;
13238 :
13239 4 : {
13240 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
13241 4 : memset(argout2, 0, sizeof(argout2));
13242 4 : arg2 = argout2;
13243 : }
13244 4 : if (!args) SWIG_fail;
13245 4 : swig_obj[0] = args;
13246 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13247 4 : if (!SWIG_IsOK(res1)) {
13248 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13249 : }
13250 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13251 4 : {
13252 4 : const int bLocalUseExceptions = GetUseExceptions();
13253 4 : if ( bLocalUseExceptions ) {
13254 2 : pushErrorHandler();
13255 : }
13256 4 : result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
13257 4 : if ( bLocalUseExceptions ) {
13258 2 : popErrorHandler();
13259 : }
13260 : #ifndef SED_HACKS
13261 : if ( bLocalUseExceptions ) {
13262 : CPLErr eclass = CPLGetLastErrorType();
13263 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13264 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13265 : }
13266 : }
13267 : #endif
13268 : }
13269 4 : {
13270 : /* %typemap(out) OGRErr */
13271 4 : if ( result != 0 && GetUseExceptions()) {
13272 0 : const char* pszMessage = CPLGetLastErrorMsg();
13273 0 : if( pszMessage[0] != '\0' )
13274 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13275 : else
13276 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13277 0 : SWIG_fail;
13278 : }
13279 : }
13280 4 : {
13281 : /* %typemap(argout) (double argout[ANY]) */
13282 4 : PyObject *out = CreateTupleFromDoubleArray( arg2, 7 );
13283 4 : resultobj = t_output_helper(resultobj,out);
13284 : }
13285 4 : {
13286 : /* %typemap(ret) OGRErr */
13287 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13288 0 : resultobj = PyInt_FromLong( result );
13289 : }
13290 : }
13291 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13292 : return resultobj;
13293 : fail:
13294 : return NULL;
13295 : }
13296 :
13297 :
13298 2 : SWIGINTERN PyObject *_wrap_SpatialReference_AddGuessedTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13299 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13300 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13301 2 : void *argp1 = 0 ;
13302 2 : int res1 = 0 ;
13303 2 : PyObject *swig_obj[1] ;
13304 2 : OGRErr result;
13305 :
13306 2 : if (!args) SWIG_fail;
13307 2 : swig_obj[0] = args;
13308 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13309 2 : if (!SWIG_IsOK(res1)) {
13310 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AddGuessedTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13311 : }
13312 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13313 2 : {
13314 2 : const int bLocalUseExceptions = GetUseExceptions();
13315 2 : if ( bLocalUseExceptions ) {
13316 0 : pushErrorHandler();
13317 : }
13318 2 : result = (OGRErr)OSRSpatialReferenceShadow_AddGuessedTOWGS84(arg1);
13319 2 : if ( bLocalUseExceptions ) {
13320 0 : popErrorHandler();
13321 : }
13322 : #ifndef SED_HACKS
13323 : if ( bLocalUseExceptions ) {
13324 : CPLErr eclass = CPLGetLastErrorType();
13325 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13326 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13327 : }
13328 : }
13329 : #endif
13330 : }
13331 2 : {
13332 : /* %typemap(out) OGRErr */
13333 2 : if ( result != 0 && GetUseExceptions()) {
13334 0 : const char* pszMessage = CPLGetLastErrorMsg();
13335 0 : if( pszMessage[0] != '\0' )
13336 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13337 : else
13338 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13339 0 : SWIG_fail;
13340 : }
13341 : }
13342 2 : {
13343 : /* %typemap(ret) OGRErr */
13344 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13345 2 : resultobj = PyInt_FromLong( result );
13346 : }
13347 : }
13348 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13349 : return resultobj;
13350 : fail:
13351 : return NULL;
13352 : }
13353 :
13354 :
13355 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLocalCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13356 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13357 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13358 1 : char *arg2 = (char *) 0 ;
13359 1 : void *argp1 = 0 ;
13360 1 : int res1 = 0 ;
13361 1 : int res2 ;
13362 1 : char *buf2 = 0 ;
13363 1 : int alloc2 = 0 ;
13364 1 : PyObject *swig_obj[2] ;
13365 1 : OGRErr result;
13366 :
13367 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLocalCS", 2, 2, swig_obj)) SWIG_fail;
13368 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13369 1 : if (!SWIG_IsOK(res1)) {
13370 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLocalCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13371 : }
13372 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13373 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13374 1 : if (!SWIG_IsOK(res2)) {
13375 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLocalCS" "', argument " "2"" of type '" "char const *""'");
13376 : }
13377 1 : arg2 = reinterpret_cast< char * >(buf2);
13378 1 : {
13379 1 : const int bLocalUseExceptions = GetUseExceptions();
13380 1 : if ( bLocalUseExceptions ) {
13381 1 : pushErrorHandler();
13382 : }
13383 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
13384 1 : if ( bLocalUseExceptions ) {
13385 1 : popErrorHandler();
13386 : }
13387 : #ifndef SED_HACKS
13388 : if ( bLocalUseExceptions ) {
13389 : CPLErr eclass = CPLGetLastErrorType();
13390 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13391 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13392 : }
13393 : }
13394 : #endif
13395 : }
13396 1 : {
13397 : /* %typemap(out) OGRErr */
13398 1 : if ( result != 0 && GetUseExceptions()) {
13399 0 : const char* pszMessage = CPLGetLastErrorMsg();
13400 0 : if( pszMessage[0] != '\0' )
13401 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13402 : else
13403 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13404 0 : SWIG_fail;
13405 : }
13406 : }
13407 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13408 1 : {
13409 : /* %typemap(ret) OGRErr */
13410 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13411 1 : resultobj = PyInt_FromLong( result );
13412 : }
13413 : }
13414 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13415 : return resultobj;
13416 0 : fail:
13417 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13418 : return NULL;
13419 : }
13420 :
13421 :
13422 17 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13423 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13424 17 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13425 17 : char *arg2 = (char *) 0 ;
13426 17 : char *arg3 = (char *) 0 ;
13427 17 : char *arg4 = (char *) 0 ;
13428 17 : double arg5 ;
13429 17 : double arg6 ;
13430 17 : char *arg7 = (char *) "Greenwich" ;
13431 17 : double arg8 = (double) 0.0 ;
13432 17 : char *arg9 = (char *) "degree" ;
13433 17 : double arg10 = (double) 0.0174532925199433 ;
13434 17 : void *argp1 = 0 ;
13435 17 : int res1 = 0 ;
13436 17 : int res2 ;
13437 17 : char *buf2 = 0 ;
13438 17 : int alloc2 = 0 ;
13439 17 : int res3 ;
13440 17 : char *buf3 = 0 ;
13441 17 : int alloc3 = 0 ;
13442 17 : int res4 ;
13443 17 : char *buf4 = 0 ;
13444 17 : int alloc4 = 0 ;
13445 17 : double val5 ;
13446 17 : int ecode5 = 0 ;
13447 17 : double val6 ;
13448 17 : int ecode6 = 0 ;
13449 17 : int res7 ;
13450 17 : char *buf7 = 0 ;
13451 17 : int alloc7 = 0 ;
13452 17 : double val8 ;
13453 17 : int ecode8 = 0 ;
13454 17 : int res9 ;
13455 17 : char *buf9 = 0 ;
13456 17 : int alloc9 = 0 ;
13457 17 : double val10 ;
13458 17 : int ecode10 = 0 ;
13459 17 : PyObject *swig_obj[10] ;
13460 17 : OGRErr result;
13461 :
13462 17 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeogCS", 6, 10, swig_obj)) SWIG_fail;
13463 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13464 17 : if (!SWIG_IsOK(res1)) {
13465 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13466 : }
13467 17 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13468 17 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13469 17 : if (!SWIG_IsOK(res2)) {
13470 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeogCS" "', argument " "2"" of type '" "char const *""'");
13471 : }
13472 17 : arg2 = reinterpret_cast< char * >(buf2);
13473 17 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13474 17 : if (!SWIG_IsOK(res3)) {
13475 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetGeogCS" "', argument " "3"" of type '" "char const *""'");
13476 : }
13477 17 : arg3 = reinterpret_cast< char * >(buf3);
13478 17 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
13479 17 : if (!SWIG_IsOK(res4)) {
13480 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetGeogCS" "', argument " "4"" of type '" "char const *""'");
13481 : }
13482 17 : arg4 = reinterpret_cast< char * >(buf4);
13483 17 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13484 17 : if (!SWIG_IsOK(ecode5)) {
13485 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGeogCS" "', argument " "5"" of type '" "double""'");
13486 : }
13487 17 : arg5 = static_cast< double >(val5);
13488 17 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13489 17 : if (!SWIG_IsOK(ecode6)) {
13490 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGeogCS" "', argument " "6"" of type '" "double""'");
13491 : }
13492 17 : arg6 = static_cast< double >(val6);
13493 17 : if (swig_obj[6]) {
13494 3 : res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
13495 3 : if (!SWIG_IsOK(res7)) {
13496 0 : SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "SpatialReference_SetGeogCS" "', argument " "7"" of type '" "char const *""'");
13497 : }
13498 3 : arg7 = reinterpret_cast< char * >(buf7);
13499 : }
13500 17 : if (swig_obj[7]) {
13501 3 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13502 3 : if (!SWIG_IsOK(ecode8)) {
13503 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetGeogCS" "', argument " "8"" of type '" "double""'");
13504 : }
13505 3 : arg8 = static_cast< double >(val8);
13506 : }
13507 17 : if (swig_obj[8]) {
13508 3 : res9 = SWIG_AsCharPtrAndSize(swig_obj[8], &buf9, NULL, &alloc9);
13509 3 : if (!SWIG_IsOK(res9)) {
13510 0 : SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "SpatialReference_SetGeogCS" "', argument " "9"" of type '" "char const *""'");
13511 : }
13512 3 : arg9 = reinterpret_cast< char * >(buf9);
13513 : }
13514 17 : if (swig_obj[9]) {
13515 3 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
13516 3 : if (!SWIG_IsOK(ecode10)) {
13517 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "SpatialReference_SetGeogCS" "', argument " "10"" of type '" "double""'");
13518 : }
13519 3 : arg10 = static_cast< double >(val10);
13520 : }
13521 17 : {
13522 17 : const int bLocalUseExceptions = GetUseExceptions();
13523 17 : if ( bLocalUseExceptions ) {
13524 15 : pushErrorHandler();
13525 : }
13526 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);
13527 17 : if ( bLocalUseExceptions ) {
13528 15 : popErrorHandler();
13529 : }
13530 : #ifndef SED_HACKS
13531 : if ( bLocalUseExceptions ) {
13532 : CPLErr eclass = CPLGetLastErrorType();
13533 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13534 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13535 : }
13536 : }
13537 : #endif
13538 : }
13539 17 : {
13540 : /* %typemap(out) OGRErr */
13541 17 : if ( result != 0 && GetUseExceptions()) {
13542 0 : const char* pszMessage = CPLGetLastErrorMsg();
13543 0 : if( pszMessage[0] != '\0' )
13544 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13545 : else
13546 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13547 0 : SWIG_fail;
13548 : }
13549 : }
13550 17 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13551 17 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13552 17 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13553 17 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13554 17 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13555 17 : {
13556 : /* %typemap(ret) OGRErr */
13557 17 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13558 17 : resultobj = PyInt_FromLong( result );
13559 : }
13560 : }
13561 17 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13562 : return resultobj;
13563 0 : fail:
13564 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13565 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13566 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13567 0 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13568 0 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13569 : return NULL;
13570 : }
13571 :
13572 :
13573 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13574 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13575 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13576 1 : char *arg2 = (char *) "unnamed" ;
13577 1 : void *argp1 = 0 ;
13578 1 : int res1 = 0 ;
13579 1 : int res2 ;
13580 1 : char *buf2 = 0 ;
13581 1 : int alloc2 = 0 ;
13582 1 : PyObject *swig_obj[2] ;
13583 1 : OGRErr result;
13584 :
13585 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjCS", 1, 2, swig_obj)) SWIG_fail;
13586 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13587 1 : if (!SWIG_IsOK(res1)) {
13588 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13589 : }
13590 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13591 1 : if (swig_obj[1]) {
13592 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13593 1 : if (!SWIG_IsOK(res2)) {
13594 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjCS" "', argument " "2"" of type '" "char const *""'");
13595 : }
13596 1 : arg2 = reinterpret_cast< char * >(buf2);
13597 : }
13598 1 : {
13599 1 : if (!arg2) {
13600 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13601 : }
13602 : }
13603 1 : {
13604 1 : const int bLocalUseExceptions = GetUseExceptions();
13605 1 : if ( bLocalUseExceptions ) {
13606 1 : pushErrorHandler();
13607 : }
13608 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
13609 1 : if ( bLocalUseExceptions ) {
13610 1 : popErrorHandler();
13611 : }
13612 : #ifndef SED_HACKS
13613 : if ( bLocalUseExceptions ) {
13614 : CPLErr eclass = CPLGetLastErrorType();
13615 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13616 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13617 : }
13618 : }
13619 : #endif
13620 : }
13621 1 : {
13622 : /* %typemap(out) OGRErr */
13623 1 : if ( result != 0 && GetUseExceptions()) {
13624 0 : const char* pszMessage = CPLGetLastErrorMsg();
13625 0 : if( pszMessage[0] != '\0' )
13626 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13627 : else
13628 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13629 0 : SWIG_fail;
13630 : }
13631 : }
13632 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13633 1 : {
13634 : /* %typemap(ret) OGRErr */
13635 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13636 1 : resultobj = PyInt_FromLong( result );
13637 : }
13638 : }
13639 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13640 : return resultobj;
13641 0 : fail:
13642 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13643 : return NULL;
13644 : }
13645 :
13646 :
13647 4 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeocCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13648 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13649 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13650 4 : char *arg2 = (char *) "unnamed" ;
13651 4 : void *argp1 = 0 ;
13652 4 : int res1 = 0 ;
13653 4 : int res2 ;
13654 4 : char *buf2 = 0 ;
13655 4 : int alloc2 = 0 ;
13656 4 : PyObject *swig_obj[2] ;
13657 4 : OGRErr result;
13658 :
13659 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeocCS", 1, 2, swig_obj)) SWIG_fail;
13660 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13661 4 : if (!SWIG_IsOK(res1)) {
13662 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13663 : }
13664 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13665 4 : if (swig_obj[1]) {
13666 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13667 4 : if (!SWIG_IsOK(res2)) {
13668 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeocCS" "', argument " "2"" of type '" "char const *""'");
13669 : }
13670 4 : arg2 = reinterpret_cast< char * >(buf2);
13671 : }
13672 4 : {
13673 4 : if (!arg2) {
13674 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13675 : }
13676 : }
13677 4 : {
13678 4 : const int bLocalUseExceptions = GetUseExceptions();
13679 4 : if ( bLocalUseExceptions ) {
13680 4 : pushErrorHandler();
13681 : }
13682 4 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
13683 4 : if ( bLocalUseExceptions ) {
13684 4 : popErrorHandler();
13685 : }
13686 : #ifndef SED_HACKS
13687 : if ( bLocalUseExceptions ) {
13688 : CPLErr eclass = CPLGetLastErrorType();
13689 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13690 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13691 : }
13692 : }
13693 : #endif
13694 : }
13695 4 : {
13696 : /* %typemap(out) OGRErr */
13697 5 : if ( result != 0 && GetUseExceptions()) {
13698 1 : const char* pszMessage = CPLGetLastErrorMsg();
13699 1 : if( pszMessage[0] != '\0' )
13700 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13701 : else
13702 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13703 1 : SWIG_fail;
13704 : }
13705 : }
13706 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13707 3 : {
13708 : /* %typemap(ret) OGRErr */
13709 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13710 3 : resultobj = PyInt_FromLong( result );
13711 : }
13712 : }
13713 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13714 : return resultobj;
13715 1 : fail:
13716 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13717 : return NULL;
13718 : }
13719 :
13720 :
13721 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13722 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13723 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13724 0 : char *arg2 = (char *) "unnamed" ;
13725 0 : char *arg3 = (char *) "unnamed" ;
13726 0 : int arg4 = (int) 0 ;
13727 0 : void *argp1 = 0 ;
13728 0 : int res1 = 0 ;
13729 0 : int res2 ;
13730 0 : char *buf2 = 0 ;
13731 0 : int alloc2 = 0 ;
13732 0 : int res3 ;
13733 0 : char *buf3 = 0 ;
13734 0 : int alloc3 = 0 ;
13735 0 : int val4 ;
13736 0 : int ecode4 = 0 ;
13737 0 : PyObject *swig_obj[4] ;
13738 0 : OGRErr result;
13739 :
13740 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetVertCS", 1, 4, swig_obj)) SWIG_fail;
13741 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13742 0 : if (!SWIG_IsOK(res1)) {
13743 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13744 : }
13745 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13746 0 : if (swig_obj[1]) {
13747 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13748 0 : if (!SWIG_IsOK(res2)) {
13749 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
13750 : }
13751 0 : arg2 = reinterpret_cast< char * >(buf2);
13752 : }
13753 0 : if (swig_obj[2]) {
13754 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13755 0 : if (!SWIG_IsOK(res3)) {
13756 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
13757 : }
13758 0 : arg3 = reinterpret_cast< char * >(buf3);
13759 : }
13760 0 : if (swig_obj[3]) {
13761 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
13762 0 : if (!SWIG_IsOK(ecode4)) {
13763 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
13764 : }
13765 : arg4 = static_cast< int >(val4);
13766 : }
13767 0 : {
13768 0 : const int bLocalUseExceptions = GetUseExceptions();
13769 0 : if ( bLocalUseExceptions ) {
13770 0 : pushErrorHandler();
13771 : }
13772 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
13773 0 : if ( bLocalUseExceptions ) {
13774 0 : popErrorHandler();
13775 : }
13776 : #ifndef SED_HACKS
13777 : if ( bLocalUseExceptions ) {
13778 : CPLErr eclass = CPLGetLastErrorType();
13779 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13780 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13781 : }
13782 : }
13783 : #endif
13784 : }
13785 0 : {
13786 : /* %typemap(out) OGRErr */
13787 0 : if ( result != 0 && GetUseExceptions()) {
13788 0 : const char* pszMessage = CPLGetLastErrorMsg();
13789 0 : if( pszMessage[0] != '\0' )
13790 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13791 : else
13792 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13793 0 : SWIG_fail;
13794 : }
13795 : }
13796 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13797 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13798 0 : {
13799 : /* %typemap(ret) OGRErr */
13800 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13801 0 : resultobj = PyInt_FromLong( result );
13802 : }
13803 : }
13804 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13805 : return resultobj;
13806 0 : fail:
13807 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13808 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13809 : return NULL;
13810 : }
13811 :
13812 :
13813 8 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCompoundCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13814 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13815 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13816 8 : char *arg2 = (char *) 0 ;
13817 8 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
13818 8 : OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
13819 8 : void *argp1 = 0 ;
13820 8 : int res1 = 0 ;
13821 8 : int res2 ;
13822 8 : char *buf2 = 0 ;
13823 8 : int alloc2 = 0 ;
13824 8 : void *argp3 = 0 ;
13825 8 : int res3 = 0 ;
13826 8 : void *argp4 = 0 ;
13827 8 : int res4 = 0 ;
13828 8 : PyObject *swig_obj[4] ;
13829 8 : OGRErr result;
13830 :
13831 8 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCompoundCS", 4, 4, swig_obj)) SWIG_fail;
13832 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13833 8 : if (!SWIG_IsOK(res1)) {
13834 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13835 : }
13836 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13837 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13838 8 : if (!SWIG_IsOK(res2)) {
13839 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetCompoundCS" "', argument " "2"" of type '" "char const *""'");
13840 : }
13841 8 : arg2 = reinterpret_cast< char * >(buf2);
13842 8 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13843 8 : if (!SWIG_IsOK(res3)) {
13844 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
13845 : }
13846 8 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
13847 8 : res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13848 8 : if (!SWIG_IsOK(res4)) {
13849 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'");
13850 : }
13851 8 : arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
13852 8 : {
13853 8 : if (!arg2) {
13854 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13855 : }
13856 : }
13857 8 : {
13858 8 : if (!arg3) {
13859 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13860 : }
13861 : }
13862 8 : {
13863 8 : if (!arg4) {
13864 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13865 : }
13866 : }
13867 8 : {
13868 8 : const int bLocalUseExceptions = GetUseExceptions();
13869 8 : if ( bLocalUseExceptions ) {
13870 8 : pushErrorHandler();
13871 : }
13872 8 : result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
13873 8 : if ( bLocalUseExceptions ) {
13874 8 : popErrorHandler();
13875 : }
13876 : #ifndef SED_HACKS
13877 : if ( bLocalUseExceptions ) {
13878 : CPLErr eclass = CPLGetLastErrorType();
13879 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13880 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13881 : }
13882 : }
13883 : #endif
13884 : }
13885 8 : {
13886 : /* %typemap(out) OGRErr */
13887 8 : if ( result != 0 && GetUseExceptions()) {
13888 0 : const char* pszMessage = CPLGetLastErrorMsg();
13889 0 : if( pszMessage[0] != '\0' )
13890 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13891 : else
13892 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13893 0 : SWIG_fail;
13894 : }
13895 : }
13896 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13897 8 : {
13898 : /* %typemap(ret) OGRErr */
13899 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13900 8 : resultobj = PyInt_FromLong( result );
13901 : }
13902 : }
13903 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13904 : return resultobj;
13905 0 : fail:
13906 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13907 : return NULL;
13908 : }
13909 :
13910 :
13911 290 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13912 290 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13913 290 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13914 290 : char **arg2 = (char **) 0 ;
13915 290 : void *argp1 = 0 ;
13916 290 : int res1 = 0 ;
13917 290 : char *val2 ;
13918 290 : PyObject *swig_obj[2] ;
13919 290 : OGRErr result;
13920 :
13921 290 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromWkt", 2, 2, swig_obj)) SWIG_fail;
13922 290 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13923 290 : if (!SWIG_IsOK(res1)) {
13924 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13925 : }
13926 290 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13927 290 : {
13928 : /* %typemap(in) (char **ignorechange) */
13929 290 : if( !PyArg_Parse( swig_obj[1], "s", &val2 ) ) {
13930 0 : PyErr_SetString( PyExc_TypeError, "not a string" );
13931 0 : SWIG_fail;
13932 : }
13933 290 : arg2 = &val2;
13934 : }
13935 290 : {
13936 290 : const int bLocalUseExceptions = GetUseExceptions();
13937 290 : if ( bLocalUseExceptions ) {
13938 182 : pushErrorHandler();
13939 : }
13940 290 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
13941 290 : if ( bLocalUseExceptions ) {
13942 182 : popErrorHandler();
13943 : }
13944 : #ifndef SED_HACKS
13945 : if ( bLocalUseExceptions ) {
13946 : CPLErr eclass = CPLGetLastErrorType();
13947 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13948 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13949 : }
13950 : }
13951 : #endif
13952 : }
13953 290 : {
13954 : /* %typemap(out) OGRErr */
13955 325 : if ( result != 0 && GetUseExceptions()) {
13956 0 : const char* pszMessage = CPLGetLastErrorMsg();
13957 0 : if( pszMessage[0] != '\0' )
13958 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13959 : else
13960 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13961 0 : SWIG_fail;
13962 : }
13963 : }
13964 290 : {
13965 : /* %typemap(ret) OGRErr */
13966 290 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13967 290 : resultobj = PyInt_FromLong( result );
13968 : }
13969 : }
13970 290 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13971 : return resultobj;
13972 : fail:
13973 : return NULL;
13974 : }
13975 :
13976 :
13977 179 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13978 179 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13979 179 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13980 179 : char *arg2 = (char *) 0 ;
13981 179 : void *argp1 = 0 ;
13982 179 : int res1 = 0 ;
13983 179 : int res2 ;
13984 179 : char *buf2 = 0 ;
13985 179 : int alloc2 = 0 ;
13986 179 : PyObject *swig_obj[2] ;
13987 179 : OGRErr result;
13988 :
13989 179 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromProj4", 2, 2, swig_obj)) SWIG_fail;
13990 179 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13991 179 : if (!SWIG_IsOK(res1)) {
13992 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13993 : }
13994 179 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13995 179 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13996 179 : if (!SWIG_IsOK(res2)) {
13997 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromProj4" "', argument " "2"" of type '" "char *""'");
13998 : }
13999 179 : arg2 = reinterpret_cast< char * >(buf2);
14000 179 : {
14001 179 : const int bLocalUseExceptions = GetUseExceptions();
14002 179 : if ( bLocalUseExceptions ) {
14003 150 : pushErrorHandler();
14004 : }
14005 179 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
14006 179 : if ( bLocalUseExceptions ) {
14007 150 : popErrorHandler();
14008 : }
14009 : #ifndef SED_HACKS
14010 : if ( bLocalUseExceptions ) {
14011 : CPLErr eclass = CPLGetLastErrorType();
14012 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14013 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14014 : }
14015 : }
14016 : #endif
14017 : }
14018 179 : {
14019 : /* %typemap(out) OGRErr */
14020 184 : if ( result != 0 && GetUseExceptions()) {
14021 5 : const char* pszMessage = CPLGetLastErrorMsg();
14022 5 : if( pszMessage[0] != '\0' )
14023 5 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14024 : else
14025 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14026 5 : SWIG_fail;
14027 : }
14028 : }
14029 174 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14030 174 : {
14031 : /* %typemap(ret) OGRErr */
14032 174 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14033 174 : resultobj = PyInt_FromLong( result );
14034 : }
14035 : }
14036 174 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14037 : return resultobj;
14038 5 : fail:
14039 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14040 : return NULL;
14041 : }
14042 :
14043 :
14044 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14045 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14046 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14047 3 : char *arg2 = (char *) 0 ;
14048 3 : void *argp1 = 0 ;
14049 3 : int res1 = 0 ;
14050 3 : int res2 ;
14051 3 : char *buf2 = 0 ;
14052 3 : int alloc2 = 0 ;
14053 3 : PyObject *swig_obj[2] ;
14054 3 : OGRErr result;
14055 :
14056 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUrl", 2, 2, swig_obj)) SWIG_fail;
14057 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14058 3 : if (!SWIG_IsOK(res1)) {
14059 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUrl" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14060 : }
14061 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14062 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14063 3 : if (!SWIG_IsOK(res2)) {
14064 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromUrl" "', argument " "2"" of type '" "char *""'");
14065 : }
14066 3 : arg2 = reinterpret_cast< char * >(buf2);
14067 3 : {
14068 3 : if (!arg2) {
14069 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14070 : }
14071 : }
14072 3 : {
14073 3 : const int bLocalUseExceptions = GetUseExceptions();
14074 3 : if ( bLocalUseExceptions ) {
14075 3 : pushErrorHandler();
14076 : }
14077 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
14078 3 : if ( bLocalUseExceptions ) {
14079 3 : popErrorHandler();
14080 : }
14081 : #ifndef SED_HACKS
14082 : if ( bLocalUseExceptions ) {
14083 : CPLErr eclass = CPLGetLastErrorType();
14084 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14085 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14086 : }
14087 : }
14088 : #endif
14089 : }
14090 3 : {
14091 : /* %typemap(out) OGRErr */
14092 3 : if ( result != 0 && GetUseExceptions()) {
14093 0 : const char* pszMessage = CPLGetLastErrorMsg();
14094 0 : if( pszMessage[0] != '\0' )
14095 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14096 : else
14097 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14098 0 : SWIG_fail;
14099 : }
14100 : }
14101 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14102 3 : {
14103 : /* %typemap(ret) OGRErr */
14104 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14105 3 : resultobj = PyInt_FromLong( result );
14106 : }
14107 : }
14108 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14109 : return resultobj;
14110 0 : fail:
14111 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14112 : return NULL;
14113 : }
14114 :
14115 :
14116 11 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14117 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14118 11 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14119 11 : char **arg2 = (char **) 0 ;
14120 11 : void *argp1 = 0 ;
14121 11 : int res1 = 0 ;
14122 11 : PyObject *swig_obj[2] ;
14123 11 : OGRErr result;
14124 :
14125 11 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromESRI", 2, 2, swig_obj)) SWIG_fail;
14126 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14127 11 : if (!SWIG_IsOK(res1)) {
14128 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14129 : }
14130 11 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14131 11 : {
14132 : /* %typemap(in) char **dict */
14133 11 : arg2 = NULL;
14134 11 : if ( PySequence_Check( swig_obj[1] ) ) {
14135 11 : int bErr = FALSE;
14136 11 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14137 11 : if ( bErr )
14138 : {
14139 0 : SWIG_fail;
14140 : }
14141 : }
14142 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14143 0 : int bErr = FALSE;
14144 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14145 0 : if ( bErr )
14146 : {
14147 0 : SWIG_fail;
14148 : }
14149 : }
14150 : else {
14151 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14152 0 : SWIG_fail;
14153 : }
14154 : }
14155 11 : {
14156 11 : const int bLocalUseExceptions = GetUseExceptions();
14157 11 : if ( bLocalUseExceptions ) {
14158 11 : pushErrorHandler();
14159 : }
14160 11 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
14161 11 : if ( bLocalUseExceptions ) {
14162 11 : popErrorHandler();
14163 : }
14164 : #ifndef SED_HACKS
14165 : if ( bLocalUseExceptions ) {
14166 : CPLErr eclass = CPLGetLastErrorType();
14167 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14168 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14169 : }
14170 : }
14171 : #endif
14172 : }
14173 11 : {
14174 : /* %typemap(out) OGRErr */
14175 12 : if ( result != 0 && GetUseExceptions()) {
14176 1 : const char* pszMessage = CPLGetLastErrorMsg();
14177 1 : if( pszMessage[0] != '\0' )
14178 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14179 : else
14180 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14181 1 : SWIG_fail;
14182 : }
14183 : }
14184 10 : {
14185 : /* %typemap(freearg) char **dict */
14186 10 : CSLDestroy( arg2 );
14187 : }
14188 10 : {
14189 : /* %typemap(ret) OGRErr */
14190 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14191 10 : resultobj = PyInt_FromLong( result );
14192 : }
14193 : }
14194 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14195 : return resultobj;
14196 1 : fail:
14197 1 : {
14198 : /* %typemap(freearg) char **dict */
14199 1 : CSLDestroy( arg2 );
14200 : }
14201 : return NULL;
14202 : }
14203 :
14204 :
14205 827 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14206 827 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14207 827 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14208 827 : int arg2 ;
14209 827 : void *argp1 = 0 ;
14210 827 : int res1 = 0 ;
14211 827 : int val2 ;
14212 827 : int ecode2 = 0 ;
14213 827 : PyObject *swig_obj[2] ;
14214 827 : OGRErr result;
14215 :
14216 827 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSG", 2, 2, swig_obj)) SWIG_fail;
14217 827 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14218 827 : if (!SWIG_IsOK(res1)) {
14219 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14220 : }
14221 827 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14222 827 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14223 827 : if (!SWIG_IsOK(ecode2)) {
14224 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "2"" of type '" "int""'");
14225 : }
14226 827 : arg2 = static_cast< int >(val2);
14227 827 : {
14228 827 : const int bLocalUseExceptions = GetUseExceptions();
14229 827 : if ( bLocalUseExceptions ) {
14230 518 : pushErrorHandler();
14231 : }
14232 827 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
14233 827 : if ( bLocalUseExceptions ) {
14234 518 : popErrorHandler();
14235 : }
14236 : #ifndef SED_HACKS
14237 : if ( bLocalUseExceptions ) {
14238 : CPLErr eclass = CPLGetLastErrorType();
14239 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14240 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14241 : }
14242 : }
14243 : #endif
14244 : }
14245 827 : {
14246 : /* %typemap(out) OGRErr */
14247 831 : if ( result != 0 && GetUseExceptions()) {
14248 4 : const char* pszMessage = CPLGetLastErrorMsg();
14249 4 : if( pszMessage[0] != '\0' )
14250 4 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14251 : else
14252 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14253 4 : SWIG_fail;
14254 : }
14255 : }
14256 823 : {
14257 : /* %typemap(ret) OGRErr */
14258 823 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14259 823 : resultobj = PyInt_FromLong( result );
14260 : }
14261 : }
14262 823 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14263 : return resultobj;
14264 : fail:
14265 : return NULL;
14266 : }
14267 :
14268 :
14269 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSGA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14270 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14271 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14272 2 : int arg2 ;
14273 2 : void *argp1 = 0 ;
14274 2 : int res1 = 0 ;
14275 2 : int val2 ;
14276 2 : int ecode2 = 0 ;
14277 2 : PyObject *swig_obj[2] ;
14278 2 : OGRErr result;
14279 :
14280 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSGA", 2, 2, swig_obj)) SWIG_fail;
14281 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14282 2 : if (!SWIG_IsOK(res1)) {
14283 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14284 : }
14285 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14286 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14287 2 : if (!SWIG_IsOK(ecode2)) {
14288 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "2"" of type '" "int""'");
14289 : }
14290 2 : arg2 = static_cast< int >(val2);
14291 2 : {
14292 2 : const int bLocalUseExceptions = GetUseExceptions();
14293 2 : if ( bLocalUseExceptions ) {
14294 2 : pushErrorHandler();
14295 : }
14296 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
14297 2 : if ( bLocalUseExceptions ) {
14298 2 : popErrorHandler();
14299 : }
14300 : #ifndef SED_HACKS
14301 : if ( bLocalUseExceptions ) {
14302 : CPLErr eclass = CPLGetLastErrorType();
14303 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14304 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14305 : }
14306 : }
14307 : #endif
14308 : }
14309 2 : {
14310 : /* %typemap(out) OGRErr */
14311 2 : if ( result != 0 && GetUseExceptions()) {
14312 0 : const char* pszMessage = CPLGetLastErrorMsg();
14313 0 : if( pszMessage[0] != '\0' )
14314 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14315 : else
14316 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14317 0 : SWIG_fail;
14318 : }
14319 : }
14320 2 : {
14321 : /* %typemap(ret) OGRErr */
14322 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14323 2 : resultobj = PyInt_FromLong( result );
14324 : }
14325 : }
14326 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14327 : return resultobj;
14328 : fail:
14329 : return NULL;
14330 : }
14331 :
14332 :
14333 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14334 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14335 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14336 7 : char *arg2 = (char *) 0 ;
14337 7 : char *arg3 = (char *) "METRE" ;
14338 7 : double *arg4 = (double *) (double *)0 ;
14339 7 : void *argp1 = 0 ;
14340 7 : int res1 = 0 ;
14341 7 : int res2 ;
14342 7 : char *buf2 = 0 ;
14343 7 : int alloc2 = 0 ;
14344 7 : int res3 ;
14345 7 : char *buf3 = 0 ;
14346 7 : int alloc3 = 0 ;
14347 7 : double argin4[17] ;
14348 7 : PyObject *swig_obj[4] ;
14349 7 : OGRErr result;
14350 :
14351 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromPCI", 2, 4, swig_obj)) SWIG_fail;
14352 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14353 7 : if (!SWIG_IsOK(res1)) {
14354 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14355 : }
14356 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14357 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14358 7 : if (!SWIG_IsOK(res2)) {
14359 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromPCI" "', argument " "2"" of type '" "char const *""'");
14360 : }
14361 7 : arg2 = reinterpret_cast< char * >(buf2);
14362 7 : if (swig_obj[2]) {
14363 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14364 7 : if (!SWIG_IsOK(res3)) {
14365 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromPCI" "', argument " "3"" of type '" "char const *""'");
14366 : }
14367 7 : arg3 = reinterpret_cast< char * >(buf3);
14368 : }
14369 7 : if (swig_obj[3]) {
14370 7 : {
14371 : /* %typemap(in) (double argin4[ANY]) */
14372 7 : arg4 = argin4;
14373 7 : if (! PySequence_Check(swig_obj[3]) ) {
14374 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14375 0 : SWIG_fail;
14376 : }
14377 7 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14378 7 : if ( seq_size != 17 ) {
14379 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14380 0 : SWIG_fail;
14381 : }
14382 126 : for (unsigned int i=0; i<17; i++) {
14383 119 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14384 119 : double val;
14385 119 : if ( !PyArg_Parse(o, "d", &val ) ) {
14386 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14387 0 : Py_DECREF(o);
14388 0 : SWIG_fail;
14389 : }
14390 119 : arg4[i] = val;
14391 119 : Py_DECREF(o);
14392 : }
14393 : }
14394 : }
14395 7 : {
14396 7 : const int bLocalUseExceptions = GetUseExceptions();
14397 7 : if ( bLocalUseExceptions ) {
14398 7 : pushErrorHandler();
14399 : }
14400 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
14401 7 : if ( bLocalUseExceptions ) {
14402 7 : popErrorHandler();
14403 : }
14404 : #ifndef SED_HACKS
14405 : if ( bLocalUseExceptions ) {
14406 : CPLErr eclass = CPLGetLastErrorType();
14407 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14408 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14409 : }
14410 : }
14411 : #endif
14412 : }
14413 7 : {
14414 : /* %typemap(out) OGRErr */
14415 7 : if ( result != 0 && GetUseExceptions()) {
14416 0 : const char* pszMessage = CPLGetLastErrorMsg();
14417 0 : if( pszMessage[0] != '\0' )
14418 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14419 : else
14420 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14421 0 : SWIG_fail;
14422 : }
14423 : }
14424 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14425 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14426 7 : {
14427 : /* %typemap(ret) OGRErr */
14428 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14429 7 : resultobj = PyInt_FromLong( result );
14430 : }
14431 : }
14432 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14433 : return resultobj;
14434 0 : fail:
14435 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14436 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14437 : return NULL;
14438 : }
14439 :
14440 :
14441 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14442 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14443 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14444 1 : long arg2 ;
14445 1 : long arg3 = (long) 0 ;
14446 1 : double *arg4 = (double *) (double *)0 ;
14447 1 : long arg5 = (long) 0 ;
14448 1 : void *argp1 = 0 ;
14449 1 : int res1 = 0 ;
14450 1 : long val2 ;
14451 1 : int ecode2 = 0 ;
14452 1 : long val3 ;
14453 1 : int ecode3 = 0 ;
14454 1 : double argin4[15] ;
14455 1 : long val5 ;
14456 1 : int ecode5 = 0 ;
14457 1 : PyObject *swig_obj[5] ;
14458 1 : OGRErr result;
14459 :
14460 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUSGS", 2, 5, swig_obj)) SWIG_fail;
14461 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14462 1 : if (!SWIG_IsOK(res1)) {
14463 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14464 : }
14465 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14466 1 : ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
14467 1 : if (!SWIG_IsOK(ecode2)) {
14468 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "2"" of type '" "long""'");
14469 : }
14470 1 : arg2 = static_cast< long >(val2);
14471 1 : if (swig_obj[2]) {
14472 1 : ecode3 = SWIG_AsVal_long(swig_obj[2], &val3);
14473 1 : if (!SWIG_IsOK(ecode3)) {
14474 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "3"" of type '" "long""'");
14475 : }
14476 1 : arg3 = static_cast< long >(val3);
14477 : }
14478 1 : if (swig_obj[3]) {
14479 1 : {
14480 : /* %typemap(in) (double argin4[ANY]) */
14481 1 : arg4 = argin4;
14482 1 : if (! PySequence_Check(swig_obj[3]) ) {
14483 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14484 0 : SWIG_fail;
14485 : }
14486 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14487 1 : if ( seq_size != 15 ) {
14488 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14489 0 : SWIG_fail;
14490 : }
14491 16 : for (unsigned int i=0; i<15; i++) {
14492 15 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14493 15 : double val;
14494 15 : if ( !PyArg_Parse(o, "d", &val ) ) {
14495 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14496 0 : Py_DECREF(o);
14497 0 : SWIG_fail;
14498 : }
14499 15 : arg4[i] = val;
14500 15 : Py_DECREF(o);
14501 : }
14502 : }
14503 : }
14504 1 : if (swig_obj[4]) {
14505 1 : ecode5 = SWIG_AsVal_long(swig_obj[4], &val5);
14506 1 : if (!SWIG_IsOK(ecode5)) {
14507 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "5"" of type '" "long""'");
14508 : }
14509 1 : arg5 = static_cast< long >(val5);
14510 : }
14511 1 : {
14512 1 : const int bLocalUseExceptions = GetUseExceptions();
14513 1 : if ( bLocalUseExceptions ) {
14514 1 : pushErrorHandler();
14515 : }
14516 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
14517 1 : if ( bLocalUseExceptions ) {
14518 1 : popErrorHandler();
14519 : }
14520 : #ifndef SED_HACKS
14521 : if ( bLocalUseExceptions ) {
14522 : CPLErr eclass = CPLGetLastErrorType();
14523 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14524 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14525 : }
14526 : }
14527 : #endif
14528 : }
14529 1 : {
14530 : /* %typemap(out) OGRErr */
14531 1 : if ( result != 0 && GetUseExceptions()) {
14532 0 : const char* pszMessage = CPLGetLastErrorMsg();
14533 0 : if( pszMessage[0] != '\0' )
14534 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14535 : else
14536 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14537 0 : SWIG_fail;
14538 : }
14539 : }
14540 1 : {
14541 : /* %typemap(ret) OGRErr */
14542 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14543 1 : resultobj = PyInt_FromLong( result );
14544 : }
14545 : }
14546 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14547 : return resultobj;
14548 : fail:
14549 : return NULL;
14550 : }
14551 :
14552 :
14553 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14554 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14555 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14556 1 : char *arg2 = (char *) 0 ;
14557 1 : void *argp1 = 0 ;
14558 1 : int res1 = 0 ;
14559 1 : int res2 ;
14560 1 : char *buf2 = 0 ;
14561 1 : int alloc2 = 0 ;
14562 1 : PyObject *swig_obj[2] ;
14563 1 : OGRErr result;
14564 :
14565 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromXML", 2, 2, swig_obj)) SWIG_fail;
14566 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14567 1 : if (!SWIG_IsOK(res1)) {
14568 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14569 : }
14570 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14571 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14572 1 : if (!SWIG_IsOK(res2)) {
14573 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromXML" "', argument " "2"" of type '" "char const *""'");
14574 : }
14575 1 : arg2 = reinterpret_cast< char * >(buf2);
14576 1 : {
14577 1 : const int bLocalUseExceptions = GetUseExceptions();
14578 1 : if ( bLocalUseExceptions ) {
14579 1 : pushErrorHandler();
14580 : }
14581 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
14582 1 : if ( bLocalUseExceptions ) {
14583 1 : popErrorHandler();
14584 : }
14585 : #ifndef SED_HACKS
14586 : if ( bLocalUseExceptions ) {
14587 : CPLErr eclass = CPLGetLastErrorType();
14588 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14589 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14590 : }
14591 : }
14592 : #endif
14593 : }
14594 1 : {
14595 : /* %typemap(out) OGRErr */
14596 1 : if ( result != 0 && GetUseExceptions()) {
14597 0 : const char* pszMessage = CPLGetLastErrorMsg();
14598 0 : if( pszMessage[0] != '\0' )
14599 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14600 : else
14601 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14602 0 : SWIG_fail;
14603 : }
14604 : }
14605 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14606 1 : {
14607 : /* %typemap(ret) OGRErr */
14608 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14609 1 : resultobj = PyInt_FromLong( result );
14610 : }
14611 : }
14612 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14613 : return resultobj;
14614 0 : fail:
14615 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14616 : return NULL;
14617 : }
14618 :
14619 :
14620 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14621 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14622 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14623 7 : char *arg2 = (char *) 0 ;
14624 7 : char *arg3 = (char *) 0 ;
14625 7 : char *arg4 = (char *) 0 ;
14626 7 : void *argp1 = 0 ;
14627 7 : int res1 = 0 ;
14628 7 : int res2 ;
14629 7 : char *buf2 = 0 ;
14630 7 : int alloc2 = 0 ;
14631 7 : int res3 ;
14632 7 : char *buf3 = 0 ;
14633 7 : int alloc3 = 0 ;
14634 7 : int res4 ;
14635 7 : char *buf4 = 0 ;
14636 7 : int alloc4 = 0 ;
14637 7 : PyObject *swig_obj[4] ;
14638 7 : OGRErr result;
14639 :
14640 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromERM", 4, 4, swig_obj)) SWIG_fail;
14641 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14642 7 : if (!SWIG_IsOK(res1)) {
14643 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14644 : }
14645 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14646 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14647 7 : if (!SWIG_IsOK(res2)) {
14648 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
14649 : }
14650 7 : arg2 = reinterpret_cast< char * >(buf2);
14651 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14652 7 : if (!SWIG_IsOK(res3)) {
14653 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
14654 : }
14655 7 : arg3 = reinterpret_cast< char * >(buf3);
14656 7 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
14657 7 : if (!SWIG_IsOK(res4)) {
14658 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
14659 : }
14660 7 : arg4 = reinterpret_cast< char * >(buf4);
14661 7 : {
14662 7 : if (!arg2) {
14663 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14664 : }
14665 : }
14666 7 : {
14667 7 : if (!arg3) {
14668 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14669 : }
14670 : }
14671 7 : {
14672 7 : const int bLocalUseExceptions = GetUseExceptions();
14673 7 : if ( bLocalUseExceptions ) {
14674 7 : pushErrorHandler();
14675 : }
14676 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
14677 7 : if ( bLocalUseExceptions ) {
14678 7 : popErrorHandler();
14679 : }
14680 : #ifndef SED_HACKS
14681 : if ( bLocalUseExceptions ) {
14682 : CPLErr eclass = CPLGetLastErrorType();
14683 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14684 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14685 : }
14686 : }
14687 : #endif
14688 : }
14689 7 : {
14690 : /* %typemap(out) OGRErr */
14691 7 : if ( result != 0 && GetUseExceptions()) {
14692 0 : const char* pszMessage = CPLGetLastErrorMsg();
14693 0 : if( pszMessage[0] != '\0' )
14694 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14695 : else
14696 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14697 0 : SWIG_fail;
14698 : }
14699 : }
14700 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14701 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14702 7 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14703 7 : {
14704 : /* %typemap(ret) OGRErr */
14705 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14706 7 : resultobj = PyInt_FromLong( result );
14707 : }
14708 : }
14709 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14710 : return resultobj;
14711 0 : fail:
14712 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14713 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14714 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14715 : return NULL;
14716 : }
14717 :
14718 :
14719 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14720 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14721 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14722 3 : char *arg2 = (char *) 0 ;
14723 3 : void *argp1 = 0 ;
14724 3 : int res1 = 0 ;
14725 3 : int res2 ;
14726 3 : char *buf2 = 0 ;
14727 3 : int alloc2 = 0 ;
14728 3 : PyObject *swig_obj[2] ;
14729 3 : OGRErr result;
14730 :
14731 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromMICoordSys", 2, 2, swig_obj)) SWIG_fail;
14732 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14733 3 : if (!SWIG_IsOK(res1)) {
14734 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14735 : }
14736 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14737 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14738 3 : if (!SWIG_IsOK(res2)) {
14739 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "2"" of type '" "char const *""'");
14740 : }
14741 3 : arg2 = reinterpret_cast< char * >(buf2);
14742 3 : {
14743 3 : const int bLocalUseExceptions = GetUseExceptions();
14744 3 : if ( bLocalUseExceptions ) {
14745 2 : pushErrorHandler();
14746 : }
14747 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
14748 3 : if ( bLocalUseExceptions ) {
14749 2 : popErrorHandler();
14750 : }
14751 : #ifndef SED_HACKS
14752 : if ( bLocalUseExceptions ) {
14753 : CPLErr eclass = CPLGetLastErrorType();
14754 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14755 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14756 : }
14757 : }
14758 : #endif
14759 : }
14760 3 : {
14761 : /* %typemap(out) OGRErr */
14762 3 : if ( result != 0 && GetUseExceptions()) {
14763 0 : const char* pszMessage = CPLGetLastErrorMsg();
14764 0 : if( pszMessage[0] != '\0' )
14765 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14766 : else
14767 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14768 0 : SWIG_fail;
14769 : }
14770 : }
14771 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14772 3 : {
14773 : /* %typemap(ret) OGRErr */
14774 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14775 3 : resultobj = PyInt_FromLong( result );
14776 : }
14777 : }
14778 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14779 : return resultobj;
14780 0 : fail:
14781 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14782 : return NULL;
14783 : }
14784 :
14785 :
14786 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromOzi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14787 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14788 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14789 3 : char **arg2 = (char **) 0 ;
14790 3 : void *argp1 = 0 ;
14791 3 : int res1 = 0 ;
14792 3 : PyObject *swig_obj[2] ;
14793 3 : OGRErr result;
14794 :
14795 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromOzi", 2, 2, swig_obj)) SWIG_fail;
14796 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14797 3 : if (!SWIG_IsOK(res1)) {
14798 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromOzi" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14799 : }
14800 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14801 3 : {
14802 : /* %typemap(in) char **dict */
14803 3 : arg2 = NULL;
14804 3 : if ( PySequence_Check( swig_obj[1] ) ) {
14805 3 : int bErr = FALSE;
14806 3 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14807 3 : if ( bErr )
14808 : {
14809 0 : SWIG_fail;
14810 : }
14811 : }
14812 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14813 0 : int bErr = FALSE;
14814 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14815 0 : if ( bErr )
14816 : {
14817 0 : SWIG_fail;
14818 : }
14819 : }
14820 : else {
14821 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14822 0 : SWIG_fail;
14823 : }
14824 : }
14825 3 : {
14826 3 : if (!arg2) {
14827 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14828 : }
14829 : }
14830 3 : {
14831 3 : const int bLocalUseExceptions = GetUseExceptions();
14832 3 : if ( bLocalUseExceptions ) {
14833 3 : pushErrorHandler();
14834 : }
14835 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *const *)arg2);
14836 3 : if ( bLocalUseExceptions ) {
14837 3 : popErrorHandler();
14838 : }
14839 : #ifndef SED_HACKS
14840 : if ( bLocalUseExceptions ) {
14841 : CPLErr eclass = CPLGetLastErrorType();
14842 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14843 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14844 : }
14845 : }
14846 : #endif
14847 : }
14848 3 : {
14849 : /* %typemap(out) OGRErr */
14850 3 : if ( result != 0 && GetUseExceptions()) {
14851 0 : const char* pszMessage = CPLGetLastErrorMsg();
14852 0 : if( pszMessage[0] != '\0' )
14853 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14854 : else
14855 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14856 0 : SWIG_fail;
14857 : }
14858 : }
14859 3 : {
14860 : /* %typemap(freearg) char **dict */
14861 3 : CSLDestroy( arg2 );
14862 : }
14863 3 : {
14864 : /* %typemap(ret) OGRErr */
14865 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14866 3 : resultobj = PyInt_FromLong( result );
14867 : }
14868 : }
14869 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14870 : return resultobj;
14871 0 : fail:
14872 0 : {
14873 : /* %typemap(freearg) char **dict */
14874 0 : CSLDestroy( arg2 );
14875 : }
14876 : return NULL;
14877 : }
14878 :
14879 :
14880 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14881 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14882 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14883 4 : char **arg2 = (char **) 0 ;
14884 4 : char *arg3 = (char *) NULL ;
14885 4 : void *argp1 = 0 ;
14886 4 : int res1 = 0 ;
14887 4 : int res3 ;
14888 4 : char *buf3 = 0 ;
14889 4 : int alloc3 = 0 ;
14890 4 : PyObject *swig_obj[3] ;
14891 4 : OGRErr result;
14892 :
14893 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromCF1", 2, 3, swig_obj)) SWIG_fail;
14894 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14895 4 : if (!SWIG_IsOK(res1)) {
14896 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14897 : }
14898 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14899 4 : {
14900 : /* %typemap(in) char **dict */
14901 4 : arg2 = NULL;
14902 4 : if ( PySequence_Check( swig_obj[1] ) ) {
14903 0 : int bErr = FALSE;
14904 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14905 0 : if ( bErr )
14906 : {
14907 0 : SWIG_fail;
14908 : }
14909 : }
14910 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14911 4 : int bErr = FALSE;
14912 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14913 4 : if ( bErr )
14914 : {
14915 0 : SWIG_fail;
14916 : }
14917 : }
14918 : else {
14919 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14920 0 : SWIG_fail;
14921 : }
14922 : }
14923 4 : if (swig_obj[2]) {
14924 4 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14925 4 : if (!SWIG_IsOK(res3)) {
14926 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromCF1" "', argument " "3"" of type '" "char const *""'");
14927 : }
14928 4 : arg3 = reinterpret_cast< char * >(buf3);
14929 : }
14930 4 : {
14931 4 : const int bLocalUseExceptions = GetUseExceptions();
14932 4 : if ( bLocalUseExceptions ) {
14933 4 : pushErrorHandler();
14934 : }
14935 4 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromCF1(arg1,arg2,(char const *)arg3);
14936 4 : if ( bLocalUseExceptions ) {
14937 4 : popErrorHandler();
14938 : }
14939 : #ifndef SED_HACKS
14940 : if ( bLocalUseExceptions ) {
14941 : CPLErr eclass = CPLGetLastErrorType();
14942 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14943 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14944 : }
14945 : }
14946 : #endif
14947 : }
14948 4 : {
14949 : /* %typemap(out) OGRErr */
14950 4 : if ( result != 0 && GetUseExceptions()) {
14951 0 : const char* pszMessage = CPLGetLastErrorMsg();
14952 0 : if( pszMessage[0] != '\0' )
14953 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14954 : else
14955 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14956 0 : SWIG_fail;
14957 : }
14958 : }
14959 4 : {
14960 : /* %typemap(freearg) char **dict */
14961 4 : CSLDestroy( arg2 );
14962 : }
14963 4 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14964 4 : {
14965 : /* %typemap(ret) OGRErr */
14966 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14967 4 : resultobj = PyInt_FromLong( result );
14968 : }
14969 : }
14970 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14971 : return resultobj;
14972 0 : fail:
14973 0 : {
14974 : /* %typemap(freearg) char **dict */
14975 0 : CSLDestroy( arg2 );
14976 : }
14977 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14978 : return NULL;
14979 : }
14980 :
14981 :
14982 782 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14983 782 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14984 782 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14985 782 : char **arg2 = (char **) 0 ;
14986 782 : char **arg3 = (char **) NULL ;
14987 782 : void *argp1 = 0 ;
14988 782 : int res1 = 0 ;
14989 782 : char *argout2 = 0 ;
14990 782 : PyObject *swig_obj[2] ;
14991 782 : OGRErr result;
14992 :
14993 782 : {
14994 : /* %typemap(in,numinputs=0) (char **argout2) */
14995 782 : arg2 = &argout2;
14996 : }
14997 782 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToWkt", 1, 2, swig_obj)) SWIG_fail;
14998 782 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14999 782 : if (!SWIG_IsOK(res1)) {
15000 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15001 : }
15002 782 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15003 782 : if (swig_obj[1]) {
15004 19 : {
15005 : /* %typemap(in) char **dict */
15006 19 : arg3 = NULL;
15007 19 : if ( PySequence_Check( swig_obj[1] ) ) {
15008 19 : int bErr = FALSE;
15009 19 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15010 19 : if ( bErr )
15011 : {
15012 0 : SWIG_fail;
15013 : }
15014 : }
15015 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15016 0 : int bErr = FALSE;
15017 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15018 0 : if ( bErr )
15019 : {
15020 0 : SWIG_fail;
15021 : }
15022 : }
15023 : else {
15024 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15025 0 : SWIG_fail;
15026 : }
15027 : }
15028 : }
15029 782 : {
15030 782 : const int bLocalUseExceptions = GetUseExceptions();
15031 782 : if ( bLocalUseExceptions ) {
15032 465 : pushErrorHandler();
15033 : }
15034 782 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2,arg3);
15035 782 : if ( bLocalUseExceptions ) {
15036 465 : popErrorHandler();
15037 : }
15038 : #ifndef SED_HACKS
15039 : if ( bLocalUseExceptions ) {
15040 : CPLErr eclass = CPLGetLastErrorType();
15041 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15042 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15043 : }
15044 : }
15045 : #endif
15046 : }
15047 782 : {
15048 : /* %typemap(out) OGRErr */
15049 782 : if ( result != 0 && GetUseExceptions()) {
15050 0 : const char* pszMessage = CPLGetLastErrorMsg();
15051 0 : if( pszMessage[0] != '\0' )
15052 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15053 : else
15054 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15055 0 : SWIG_fail;
15056 : }
15057 : }
15058 782 : {
15059 : /* %typemap(argout) (char **argout) */
15060 782 : PyObject *o;
15061 782 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15062 782 : o = GDALPythonObjectFromCStr( *arg2 );
15063 : }
15064 : else {
15065 0 : o = Py_None;
15066 0 : Py_INCREF( o );
15067 : }
15068 782 : resultobj = t_output_helper(resultobj, o);
15069 : }
15070 782 : {
15071 : /* %typemap(freearg) (char **argout) */
15072 782 : if ( *arg2 )
15073 782 : CPLFree( *arg2 );
15074 : }
15075 782 : {
15076 : /* %typemap(freearg) char **dict */
15077 782 : CSLDestroy( arg3 );
15078 : }
15079 782 : {
15080 : /* %typemap(ret) OGRErr */
15081 1564 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15082 0 : resultobj = PyInt_FromLong( result );
15083 : }
15084 : }
15085 782 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15086 : return resultobj;
15087 0 : fail:
15088 0 : {
15089 : /* %typemap(freearg) (char **argout) */
15090 0 : if ( *arg2 )
15091 0 : CPLFree( *arg2 );
15092 : }
15093 0 : {
15094 : /* %typemap(freearg) char **dict */
15095 0 : CSLDestroy( arg3 );
15096 : }
15097 : return NULL;
15098 : }
15099 :
15100 :
15101 50 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPrettyWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15102 50 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15103 50 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15104 50 : char **arg2 = (char **) 0 ;
15105 50 : int arg3 = (int) 0 ;
15106 50 : void *argp1 = 0 ;
15107 50 : int res1 = 0 ;
15108 50 : char *argout2 = 0 ;
15109 50 : int val3 ;
15110 50 : int ecode3 = 0 ;
15111 50 : PyObject *swig_obj[2] ;
15112 50 : OGRErr result;
15113 :
15114 50 : {
15115 : /* %typemap(in,numinputs=0) (char **argout2) */
15116 50 : arg2 = &argout2;
15117 : }
15118 50 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPrettyWkt", 1, 2, swig_obj)) SWIG_fail;
15119 50 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15120 50 : if (!SWIG_IsOK(res1)) {
15121 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15122 : }
15123 50 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15124 50 : if (swig_obj[1]) {
15125 14 : ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
15126 14 : if (!SWIG_IsOK(ecode3)) {
15127 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "3"" of type '" "int""'");
15128 : }
15129 : arg3 = static_cast< int >(val3);
15130 : }
15131 50 : {
15132 50 : const int bLocalUseExceptions = GetUseExceptions();
15133 50 : if ( bLocalUseExceptions ) {
15134 21 : pushErrorHandler();
15135 : }
15136 50 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
15137 50 : if ( bLocalUseExceptions ) {
15138 21 : popErrorHandler();
15139 : }
15140 : #ifndef SED_HACKS
15141 : if ( bLocalUseExceptions ) {
15142 : CPLErr eclass = CPLGetLastErrorType();
15143 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15144 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15145 : }
15146 : }
15147 : #endif
15148 : }
15149 50 : {
15150 : /* %typemap(out) OGRErr */
15151 50 : if ( result != 0 && GetUseExceptions()) {
15152 0 : const char* pszMessage = CPLGetLastErrorMsg();
15153 0 : if( pszMessage[0] != '\0' )
15154 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15155 : else
15156 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15157 0 : SWIG_fail;
15158 : }
15159 : }
15160 50 : {
15161 : /* %typemap(argout) (char **argout) */
15162 50 : PyObject *o;
15163 50 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15164 50 : o = GDALPythonObjectFromCStr( *arg2 );
15165 : }
15166 : else {
15167 0 : o = Py_None;
15168 0 : Py_INCREF( o );
15169 : }
15170 50 : resultobj = t_output_helper(resultobj, o);
15171 : }
15172 50 : {
15173 : /* %typemap(freearg) (char **argout) */
15174 50 : if ( *arg2 )
15175 50 : CPLFree( *arg2 );
15176 : }
15177 50 : {
15178 : /* %typemap(ret) OGRErr */
15179 100 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15180 0 : resultobj = PyInt_FromLong( result );
15181 : }
15182 : }
15183 50 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15184 : return resultobj;
15185 0 : fail:
15186 0 : {
15187 : /* %typemap(freearg) (char **argout) */
15188 0 : if ( *arg2 )
15189 0 : CPLFree( *arg2 );
15190 : }
15191 : return NULL;
15192 : }
15193 :
15194 :
15195 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPROJJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15196 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15197 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15198 1 : char **arg2 = (char **) 0 ;
15199 1 : char **arg3 = (char **) NULL ;
15200 1 : void *argp1 = 0 ;
15201 1 : int res1 = 0 ;
15202 1 : char *argout2 = 0 ;
15203 1 : PyObject *swig_obj[2] ;
15204 1 : OGRErr result;
15205 :
15206 1 : {
15207 : /* %typemap(in,numinputs=0) (char **argout2) */
15208 1 : arg2 = &argout2;
15209 : }
15210 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPROJJSON", 1, 2, swig_obj)) SWIG_fail;
15211 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15212 1 : if (!SWIG_IsOK(res1)) {
15213 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPROJJSON" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15214 : }
15215 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15216 1 : if (swig_obj[1]) {
15217 0 : {
15218 : /* %typemap(in) char **dict */
15219 0 : arg3 = NULL;
15220 0 : if ( PySequence_Check( swig_obj[1] ) ) {
15221 0 : int bErr = FALSE;
15222 0 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15223 0 : if ( bErr )
15224 : {
15225 0 : SWIG_fail;
15226 : }
15227 : }
15228 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15229 0 : int bErr = FALSE;
15230 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15231 0 : if ( bErr )
15232 : {
15233 0 : SWIG_fail;
15234 : }
15235 : }
15236 : else {
15237 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15238 0 : SWIG_fail;
15239 : }
15240 : }
15241 : }
15242 1 : {
15243 1 : const int bLocalUseExceptions = GetUseExceptions();
15244 1 : if ( bLocalUseExceptions ) {
15245 1 : pushErrorHandler();
15246 : }
15247 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPROJJSON(arg1,arg2,arg3);
15248 1 : if ( bLocalUseExceptions ) {
15249 1 : popErrorHandler();
15250 : }
15251 : #ifndef SED_HACKS
15252 : if ( bLocalUseExceptions ) {
15253 : CPLErr eclass = CPLGetLastErrorType();
15254 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15255 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15256 : }
15257 : }
15258 : #endif
15259 : }
15260 1 : {
15261 : /* %typemap(out) OGRErr */
15262 1 : if ( result != 0 && GetUseExceptions()) {
15263 0 : const char* pszMessage = CPLGetLastErrorMsg();
15264 0 : if( pszMessage[0] != '\0' )
15265 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15266 : else
15267 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15268 0 : SWIG_fail;
15269 : }
15270 : }
15271 1 : {
15272 : /* %typemap(argout) (char **argout) */
15273 1 : PyObject *o;
15274 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15275 1 : o = GDALPythonObjectFromCStr( *arg2 );
15276 : }
15277 : else {
15278 0 : o = Py_None;
15279 0 : Py_INCREF( o );
15280 : }
15281 1 : resultobj = t_output_helper(resultobj, o);
15282 : }
15283 1 : {
15284 : /* %typemap(freearg) (char **argout) */
15285 1 : if ( *arg2 )
15286 1 : CPLFree( *arg2 );
15287 : }
15288 1 : {
15289 : /* %typemap(freearg) char **dict */
15290 1 : CSLDestroy( arg3 );
15291 : }
15292 1 : {
15293 : /* %typemap(ret) OGRErr */
15294 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15295 0 : resultobj = PyInt_FromLong( result );
15296 : }
15297 : }
15298 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15299 : return resultobj;
15300 0 : fail:
15301 0 : {
15302 : /* %typemap(freearg) (char **argout) */
15303 0 : if ( *arg2 )
15304 0 : CPLFree( *arg2 );
15305 : }
15306 0 : {
15307 : /* %typemap(freearg) char **dict */
15308 0 : CSLDestroy( arg3 );
15309 : }
15310 : return NULL;
15311 : }
15312 :
15313 :
15314 410 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15315 410 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15316 410 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15317 410 : char **arg2 = (char **) 0 ;
15318 410 : void *argp1 = 0 ;
15319 410 : int res1 = 0 ;
15320 410 : char *argout2 = 0 ;
15321 410 : PyObject *swig_obj[1] ;
15322 410 : OGRErr result;
15323 :
15324 410 : {
15325 : /* %typemap(in,numinputs=0) (char **argout2) */
15326 410 : arg2 = &argout2;
15327 : }
15328 410 : if (!args) SWIG_fail;
15329 410 : swig_obj[0] = args;
15330 410 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15331 410 : if (!SWIG_IsOK(res1)) {
15332 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15333 : }
15334 410 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15335 410 : {
15336 410 : const int bLocalUseExceptions = GetUseExceptions();
15337 410 : if ( bLocalUseExceptions ) {
15338 302 : pushErrorHandler();
15339 : }
15340 410 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
15341 410 : if ( bLocalUseExceptions ) {
15342 302 : popErrorHandler();
15343 : }
15344 : #ifndef SED_HACKS
15345 : if ( bLocalUseExceptions ) {
15346 : CPLErr eclass = CPLGetLastErrorType();
15347 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15348 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15349 : }
15350 : }
15351 : #endif
15352 : }
15353 410 : {
15354 : /* %typemap(out) OGRErr */
15355 414 : if ( result != 0 && GetUseExceptions()) {
15356 3 : const char* pszMessage = CPLGetLastErrorMsg();
15357 3 : if( pszMessage[0] != '\0' )
15358 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15359 : else
15360 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15361 3 : SWIG_fail;
15362 : }
15363 : }
15364 407 : {
15365 : /* %typemap(argout) (char **argout) */
15366 407 : PyObject *o;
15367 407 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15368 407 : o = GDALPythonObjectFromCStr( *arg2 );
15369 : }
15370 : else {
15371 0 : o = Py_None;
15372 0 : Py_INCREF( o );
15373 : }
15374 407 : resultobj = t_output_helper(resultobj, o);
15375 : }
15376 407 : {
15377 : /* %typemap(freearg) (char **argout) */
15378 407 : if ( *arg2 )
15379 407 : CPLFree( *arg2 );
15380 : }
15381 407 : {
15382 : /* %typemap(ret) OGRErr */
15383 814 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15384 0 : resultobj = PyInt_FromLong( result );
15385 : }
15386 : }
15387 407 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15388 : return resultobj;
15389 3 : fail:
15390 3 : {
15391 : /* %typemap(freearg) (char **argout) */
15392 3 : if ( *arg2 )
15393 3 : CPLFree( *arg2 );
15394 : }
15395 : return NULL;
15396 : }
15397 :
15398 :
15399 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15400 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15401 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15402 6 : char **arg2 = (char **) 0 ;
15403 6 : char **arg3 = (char **) 0 ;
15404 6 : double **arg4 ;
15405 6 : void *argp1 = 0 ;
15406 6 : int res1 = 0 ;
15407 6 : char *argout2 = 0 ;
15408 6 : char *argout3 = 0 ;
15409 6 : double *argout4 ;
15410 6 : PyObject *swig_obj[1] ;
15411 6 : OGRErr result;
15412 :
15413 6 : {
15414 : /* %typemap(in,numinputs=0) (char **argout2) */
15415 6 : arg2 = &argout2;
15416 : }
15417 6 : {
15418 : /* %typemap(in,numinputs=0) (char **argout3) */
15419 6 : arg3 = &argout3;
15420 : }
15421 6 : {
15422 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15423 6 : argout4 = NULL;
15424 6 : arg4 = &argout4;
15425 : }
15426 6 : if (!args) SWIG_fail;
15427 6 : swig_obj[0] = args;
15428 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15429 6 : if (!SWIG_IsOK(res1)) {
15430 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15431 : }
15432 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15433 6 : {
15434 6 : const int bLocalUseExceptions = GetUseExceptions();
15435 6 : if ( bLocalUseExceptions ) {
15436 6 : pushErrorHandler();
15437 : }
15438 6 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
15439 6 : if ( bLocalUseExceptions ) {
15440 6 : popErrorHandler();
15441 : }
15442 : #ifndef SED_HACKS
15443 : if ( bLocalUseExceptions ) {
15444 : CPLErr eclass = CPLGetLastErrorType();
15445 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15446 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15447 : }
15448 : }
15449 : #endif
15450 : }
15451 6 : {
15452 : /* %typemap(out) OGRErr */
15453 6 : if ( result != 0 && GetUseExceptions()) {
15454 0 : const char* pszMessage = CPLGetLastErrorMsg();
15455 0 : if( pszMessage[0] != '\0' )
15456 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15457 : else
15458 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15459 0 : SWIG_fail;
15460 : }
15461 : }
15462 6 : {
15463 : /* %typemap(argout) (char **argout) */
15464 6 : PyObject *o;
15465 6 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15466 6 : o = GDALPythonObjectFromCStr( *arg2 );
15467 : }
15468 : else {
15469 0 : o = Py_None;
15470 0 : Py_INCREF( o );
15471 : }
15472 6 : resultobj = t_output_helper(resultobj, o);
15473 : }
15474 6 : {
15475 : /* %typemap(argout) (char **argout) */
15476 6 : PyObject *o;
15477 6 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15478 6 : o = GDALPythonObjectFromCStr( *arg3 );
15479 : }
15480 : else {
15481 0 : o = Py_None;
15482 0 : Py_INCREF( o );
15483 : }
15484 6 : resultobj = t_output_helper(resultobj, o);
15485 : }
15486 6 : {
15487 : /* %typemap(argout) (double *argout[ANY]) */
15488 6 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 17 );
15489 6 : resultobj = t_output_helper(resultobj,out);
15490 : }
15491 6 : {
15492 : /* %typemap(freearg) (char **argout) */
15493 6 : if ( *arg2 )
15494 6 : CPLFree( *arg2 );
15495 : }
15496 6 : {
15497 : /* %typemap(freearg) (char **argout) */
15498 6 : if ( *arg3 )
15499 6 : CPLFree( *arg3 );
15500 : }
15501 6 : {
15502 : /* %typemap(freearg) (double *argout[ANY]) */
15503 6 : CPLFree(*arg4);
15504 : }
15505 6 : {
15506 : /* %typemap(ret) OGRErr */
15507 12 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15508 0 : resultobj = PyInt_FromLong( result );
15509 : }
15510 : }
15511 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15512 : return resultobj;
15513 0 : fail:
15514 0 : {
15515 : /* %typemap(freearg) (char **argout) */
15516 0 : if ( *arg2 )
15517 0 : CPLFree( *arg2 );
15518 : }
15519 0 : {
15520 : /* %typemap(freearg) (char **argout) */
15521 0 : if ( *arg3 )
15522 0 : CPLFree( *arg3 );
15523 : }
15524 0 : {
15525 : /* %typemap(freearg) (double *argout[ANY]) */
15526 0 : CPLFree(*arg4);
15527 : }
15528 : return NULL;
15529 : }
15530 :
15531 :
15532 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15533 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15534 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15535 1 : long *arg2 = (long *) 0 ;
15536 1 : long *arg3 = (long *) 0 ;
15537 1 : double **arg4 ;
15538 1 : long *arg5 = (long *) 0 ;
15539 1 : void *argp1 = 0 ;
15540 1 : int res1 = 0 ;
15541 1 : long temp2 ;
15542 1 : int res2 = SWIG_TMPOBJ ;
15543 1 : long temp3 ;
15544 1 : int res3 = SWIG_TMPOBJ ;
15545 1 : double *argout4 ;
15546 1 : long temp5 ;
15547 1 : int res5 = SWIG_TMPOBJ ;
15548 1 : PyObject *swig_obj[1] ;
15549 1 : OGRErr result;
15550 :
15551 1 : arg2 = &temp2;
15552 1 : arg3 = &temp3;
15553 1 : {
15554 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15555 1 : argout4 = NULL;
15556 1 : arg4 = &argout4;
15557 : }
15558 1 : arg5 = &temp5;
15559 1 : if (!args) SWIG_fail;
15560 1 : swig_obj[0] = args;
15561 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15562 1 : if (!SWIG_IsOK(res1)) {
15563 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15564 : }
15565 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15566 1 : {
15567 1 : const int bLocalUseExceptions = GetUseExceptions();
15568 1 : if ( bLocalUseExceptions ) {
15569 1 : pushErrorHandler();
15570 : }
15571 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
15572 1 : if ( bLocalUseExceptions ) {
15573 1 : popErrorHandler();
15574 : }
15575 : #ifndef SED_HACKS
15576 : if ( bLocalUseExceptions ) {
15577 : CPLErr eclass = CPLGetLastErrorType();
15578 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15579 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15580 : }
15581 : }
15582 : #endif
15583 : }
15584 1 : {
15585 : /* %typemap(out) OGRErr */
15586 1 : if ( result != 0 && GetUseExceptions()) {
15587 0 : const char* pszMessage = CPLGetLastErrorMsg();
15588 0 : if( pszMessage[0] != '\0' )
15589 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15590 : else
15591 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15592 0 : SWIG_fail;
15593 : }
15594 : }
15595 1 : if (ReturnSame(SWIG_IsTmpObj(res2))) {
15596 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg2)));
15597 : } else {
15598 0 : int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15599 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, new_flags));
15600 : }
15601 1 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
15602 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg3)));
15603 : } else {
15604 0 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15605 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags));
15606 : }
15607 1 : {
15608 : /* %typemap(argout) (double *argout[ANY]) */
15609 1 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 15 );
15610 1 : resultobj = t_output_helper(resultobj,out);
15611 : }
15612 1 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
15613 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg5)));
15614 : } else {
15615 0 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15616 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags));
15617 : }
15618 1 : {
15619 : /* %typemap(freearg) (double *argout[ANY]) */
15620 1 : CPLFree(*arg4);
15621 : }
15622 1 : {
15623 : /* %typemap(ret) OGRErr */
15624 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15625 0 : resultobj = PyInt_FromLong( result );
15626 : }
15627 : }
15628 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15629 : return resultobj;
15630 0 : fail:
15631 0 : {
15632 : /* %typemap(freearg) (double *argout[ANY]) */
15633 0 : CPLFree(*arg4);
15634 : }
15635 : return NULL;
15636 : }
15637 :
15638 :
15639 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15640 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15641 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15642 1 : char **arg2 = (char **) 0 ;
15643 1 : char **arg3 = (char **) 0 ;
15644 1 : char **arg4 = (char **) 0 ;
15645 1 : void *argp1 = 0 ;
15646 1 : int res1 = 0 ;
15647 1 : char *argout2 = 0 ;
15648 1 : char *argout3 = 0 ;
15649 1 : char *argout4 = 0 ;
15650 1 : PyObject *swig_obj[1] ;
15651 1 : OGRErr result;
15652 :
15653 1 : {
15654 : /* %typemap(in,numinputs=0) (char **argout2) */
15655 1 : arg2 = &argout2;
15656 : }
15657 1 : {
15658 : /* %typemap(in,numinputs=0) (char **argout3) */
15659 1 : arg3 = &argout3;
15660 : }
15661 1 : {
15662 : /* %typemap(in,numinputs=0) (char **argout4) */
15663 1 : arg4 = &argout4;
15664 : }
15665 1 : if (!args) SWIG_fail;
15666 1 : swig_obj[0] = args;
15667 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15668 1 : if (!SWIG_IsOK(res1)) {
15669 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15670 : }
15671 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15672 1 : {
15673 1 : const int bLocalUseExceptions = GetUseExceptions();
15674 1 : if ( bLocalUseExceptions ) {
15675 1 : pushErrorHandler();
15676 : }
15677 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToERM(arg1,arg2,arg3,arg4);
15678 1 : if ( bLocalUseExceptions ) {
15679 1 : popErrorHandler();
15680 : }
15681 : #ifndef SED_HACKS
15682 : if ( bLocalUseExceptions ) {
15683 : CPLErr eclass = CPLGetLastErrorType();
15684 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15685 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15686 : }
15687 : }
15688 : #endif
15689 : }
15690 1 : {
15691 : /* %typemap(out) OGRErr */
15692 1 : if ( result != 0 && GetUseExceptions()) {
15693 0 : const char* pszMessage = CPLGetLastErrorMsg();
15694 0 : if( pszMessage[0] != '\0' )
15695 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15696 : else
15697 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15698 0 : SWIG_fail;
15699 : }
15700 : }
15701 1 : {
15702 : /* %typemap(argout) (char **argout) */
15703 1 : PyObject *o;
15704 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15705 1 : o = GDALPythonObjectFromCStr( *arg2 );
15706 : }
15707 : else {
15708 0 : o = Py_None;
15709 0 : Py_INCREF( o );
15710 : }
15711 1 : resultobj = t_output_helper(resultobj, o);
15712 : }
15713 1 : {
15714 : /* %typemap(argout) (char **argout) */
15715 1 : PyObject *o;
15716 1 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15717 1 : o = GDALPythonObjectFromCStr( *arg3 );
15718 : }
15719 : else {
15720 0 : o = Py_None;
15721 0 : Py_INCREF( o );
15722 : }
15723 1 : resultobj = t_output_helper(resultobj, o);
15724 : }
15725 1 : {
15726 : /* %typemap(argout) (char **argout) */
15727 1 : PyObject *o;
15728 1 : if ( ReturnSame(arg4) != NULL && *arg4 != NULL ) {
15729 1 : o = GDALPythonObjectFromCStr( *arg4 );
15730 : }
15731 : else {
15732 0 : o = Py_None;
15733 0 : Py_INCREF( o );
15734 : }
15735 1 : resultobj = t_output_helper(resultobj, o);
15736 : }
15737 1 : {
15738 : /* %typemap(freearg) (char **argout) */
15739 1 : if ( *arg2 )
15740 1 : CPLFree( *arg2 );
15741 : }
15742 1 : {
15743 : /* %typemap(freearg) (char **argout) */
15744 1 : if ( *arg3 )
15745 1 : CPLFree( *arg3 );
15746 : }
15747 1 : {
15748 : /* %typemap(freearg) (char **argout) */
15749 1 : if ( *arg4 )
15750 1 : CPLFree( *arg4 );
15751 : }
15752 1 : {
15753 : /* %typemap(ret) OGRErr */
15754 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15755 0 : resultobj = PyInt_FromLong( result );
15756 : }
15757 : }
15758 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15759 : return resultobj;
15760 0 : fail:
15761 0 : {
15762 : /* %typemap(freearg) (char **argout) */
15763 0 : if ( *arg2 )
15764 0 : CPLFree( *arg2 );
15765 : }
15766 0 : {
15767 : /* %typemap(freearg) (char **argout) */
15768 0 : if ( *arg3 )
15769 0 : CPLFree( *arg3 );
15770 : }
15771 0 : {
15772 : /* %typemap(freearg) (char **argout) */
15773 0 : if ( *arg4 )
15774 0 : CPLFree( *arg4 );
15775 : }
15776 : return NULL;
15777 : }
15778 :
15779 :
15780 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15781 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15782 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15783 2 : char **arg2 = (char **) 0 ;
15784 2 : char *arg3 = (char *) "" ;
15785 2 : void *argp1 = 0 ;
15786 2 : int res1 = 0 ;
15787 2 : char *argout2 = 0 ;
15788 2 : int res3 ;
15789 2 : char *buf3 = 0 ;
15790 2 : int alloc3 = 0 ;
15791 2 : PyObject *swig_obj[2] ;
15792 2 : OGRErr result;
15793 :
15794 2 : {
15795 : /* %typemap(in,numinputs=0) (char **argout2) */
15796 2 : arg2 = &argout2;
15797 : }
15798 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToXML", 1, 2, swig_obj)) SWIG_fail;
15799 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15800 2 : if (!SWIG_IsOK(res1)) {
15801 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15802 : }
15803 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15804 2 : if (swig_obj[1]) {
15805 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf3, NULL, &alloc3);
15806 0 : if (!SWIG_IsOK(res3)) {
15807 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ExportToXML" "', argument " "3"" of type '" "char const *""'");
15808 : }
15809 0 : arg3 = reinterpret_cast< char * >(buf3);
15810 : }
15811 2 : {
15812 2 : const int bLocalUseExceptions = GetUseExceptions();
15813 2 : if ( bLocalUseExceptions ) {
15814 2 : pushErrorHandler();
15815 : }
15816 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
15817 2 : if ( bLocalUseExceptions ) {
15818 2 : popErrorHandler();
15819 : }
15820 : #ifndef SED_HACKS
15821 : if ( bLocalUseExceptions ) {
15822 : CPLErr eclass = CPLGetLastErrorType();
15823 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15824 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15825 : }
15826 : }
15827 : #endif
15828 : }
15829 2 : {
15830 : /* %typemap(out) OGRErr */
15831 3 : if ( result != 0 && GetUseExceptions()) {
15832 1 : const char* pszMessage = CPLGetLastErrorMsg();
15833 1 : if( pszMessage[0] != '\0' )
15834 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15835 : else
15836 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15837 1 : SWIG_fail;
15838 : }
15839 : }
15840 1 : {
15841 : /* %typemap(argout) (char **argout) */
15842 1 : PyObject *o;
15843 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15844 1 : o = GDALPythonObjectFromCStr( *arg2 );
15845 : }
15846 : else {
15847 0 : o = Py_None;
15848 0 : Py_INCREF( o );
15849 : }
15850 1 : resultobj = t_output_helper(resultobj, o);
15851 : }
15852 1 : {
15853 : /* %typemap(freearg) (char **argout) */
15854 1 : if ( *arg2 )
15855 1 : CPLFree( *arg2 );
15856 : }
15857 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15858 1 : {
15859 : /* %typemap(ret) OGRErr */
15860 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15861 0 : resultobj = PyInt_FromLong( result );
15862 : }
15863 : }
15864 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15865 : return resultobj;
15866 1 : fail:
15867 1 : {
15868 : /* %typemap(freearg) (char **argout) */
15869 1 : if ( *arg2 )
15870 0 : CPLFree( *arg2 );
15871 : }
15872 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15873 : return NULL;
15874 : }
15875 :
15876 :
15877 5 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15878 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15879 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15880 5 : char **arg2 = (char **) 0 ;
15881 5 : void *argp1 = 0 ;
15882 5 : int res1 = 0 ;
15883 5 : char *argout2 = 0 ;
15884 5 : PyObject *swig_obj[1] ;
15885 5 : OGRErr result;
15886 :
15887 5 : {
15888 : /* %typemap(in,numinputs=0) (char **argout2) */
15889 5 : arg2 = &argout2;
15890 : }
15891 5 : if (!args) SWIG_fail;
15892 5 : swig_obj[0] = args;
15893 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15894 5 : if (!SWIG_IsOK(res1)) {
15895 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15896 : }
15897 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15898 5 : {
15899 5 : const int bLocalUseExceptions = GetUseExceptions();
15900 5 : if ( bLocalUseExceptions ) {
15901 3 : pushErrorHandler();
15902 : }
15903 5 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
15904 5 : if ( bLocalUseExceptions ) {
15905 3 : popErrorHandler();
15906 : }
15907 : #ifndef SED_HACKS
15908 : if ( bLocalUseExceptions ) {
15909 : CPLErr eclass = CPLGetLastErrorType();
15910 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15911 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15912 : }
15913 : }
15914 : #endif
15915 : }
15916 5 : {
15917 : /* %typemap(out) OGRErr */
15918 5 : if ( result != 0 && GetUseExceptions()) {
15919 0 : const char* pszMessage = CPLGetLastErrorMsg();
15920 0 : if( pszMessage[0] != '\0' )
15921 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15922 : else
15923 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15924 0 : SWIG_fail;
15925 : }
15926 : }
15927 5 : {
15928 : /* %typemap(argout) (char **argout) */
15929 5 : PyObject *o;
15930 5 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15931 5 : o = GDALPythonObjectFromCStr( *arg2 );
15932 : }
15933 : else {
15934 0 : o = Py_None;
15935 0 : Py_INCREF( o );
15936 : }
15937 5 : resultobj = t_output_helper(resultobj, o);
15938 : }
15939 5 : {
15940 : /* %typemap(freearg) (char **argout) */
15941 5 : if ( *arg2 )
15942 5 : CPLFree( *arg2 );
15943 : }
15944 5 : {
15945 : /* %typemap(ret) OGRErr */
15946 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15947 0 : resultobj = PyInt_FromLong( result );
15948 : }
15949 : }
15950 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15951 : return resultobj;
15952 0 : fail:
15953 0 : {
15954 : /* %typemap(freearg) (char **argout) */
15955 0 : if ( *arg2 )
15956 0 : CPLFree( *arg2 );
15957 : }
15958 : return NULL;
15959 : }
15960 :
15961 :
15962 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15963 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15964 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15965 4 : char **arg2 = (char **) NULL ;
15966 4 : void *argp1 = 0 ;
15967 4 : int res1 = 0 ;
15968 4 : PyObject *swig_obj[2] ;
15969 4 : char **result = 0 ;
15970 :
15971 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1", 1, 2, swig_obj)) SWIG_fail;
15972 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15973 4 : if (!SWIG_IsOK(res1)) {
15974 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15975 : }
15976 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15977 4 : if (swig_obj[1]) {
15978 4 : {
15979 : /* %typemap(in) char **dict */
15980 4 : arg2 = NULL;
15981 4 : if ( PySequence_Check( swig_obj[1] ) ) {
15982 0 : int bErr = FALSE;
15983 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
15984 0 : if ( bErr )
15985 : {
15986 0 : SWIG_fail;
15987 : }
15988 : }
15989 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15990 4 : int bErr = FALSE;
15991 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
15992 4 : if ( bErr )
15993 : {
15994 0 : SWIG_fail;
15995 : }
15996 : }
15997 : else {
15998 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15999 0 : SWIG_fail;
16000 : }
16001 : }
16002 : }
16003 4 : {
16004 4 : const int bLocalUseExceptions = GetUseExceptions();
16005 4 : if ( bLocalUseExceptions ) {
16006 4 : pushErrorHandler();
16007 : }
16008 4 : result = (char **)OSRSpatialReferenceShadow_ExportToCF1(arg1,arg2);
16009 4 : if ( bLocalUseExceptions ) {
16010 4 : popErrorHandler();
16011 : }
16012 : #ifndef SED_HACKS
16013 : if ( bLocalUseExceptions ) {
16014 : CPLErr eclass = CPLGetLastErrorType();
16015 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16016 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16017 : }
16018 : }
16019 : #endif
16020 : }
16021 4 : {
16022 : /* %typemap(out) char **dict */
16023 4 : resultobj = GetCSLStringAsPyDict(result, true);
16024 : }
16025 4 : {
16026 : /* %typemap(freearg) char **dict */
16027 4 : CSLDestroy( arg2 );
16028 : }
16029 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16030 : return resultobj;
16031 0 : fail:
16032 0 : {
16033 : /* %typemap(freearg) char **dict */
16034 0 : CSLDestroy( arg2 );
16035 : }
16036 : return NULL;
16037 : }
16038 :
16039 :
16040 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1Units(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16041 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16042 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16043 1 : char **arg2 = (char **) NULL ;
16044 1 : void *argp1 = 0 ;
16045 1 : int res1 = 0 ;
16046 1 : PyObject *swig_obj[2] ;
16047 1 : retStringAndCPLFree *result = 0 ;
16048 :
16049 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1Units", 1, 2, swig_obj)) SWIG_fail;
16050 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16051 1 : if (!SWIG_IsOK(res1)) {
16052 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1Units" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16053 : }
16054 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16055 1 : if (swig_obj[1]) {
16056 0 : {
16057 : /* %typemap(in) char **dict */
16058 0 : arg2 = NULL;
16059 0 : if ( PySequence_Check( swig_obj[1] ) ) {
16060 0 : int bErr = FALSE;
16061 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16062 0 : if ( bErr )
16063 : {
16064 0 : SWIG_fail;
16065 : }
16066 : }
16067 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16068 0 : int bErr = FALSE;
16069 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16070 0 : if ( bErr )
16071 : {
16072 0 : SWIG_fail;
16073 : }
16074 : }
16075 : else {
16076 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16077 0 : SWIG_fail;
16078 : }
16079 : }
16080 : }
16081 1 : {
16082 1 : const int bLocalUseExceptions = GetUseExceptions();
16083 1 : if ( bLocalUseExceptions ) {
16084 1 : pushErrorHandler();
16085 : }
16086 1 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow_ExportToCF1Units(arg1,arg2);
16087 1 : if ( bLocalUseExceptions ) {
16088 1 : popErrorHandler();
16089 : }
16090 : #ifndef SED_HACKS
16091 : if ( bLocalUseExceptions ) {
16092 : CPLErr eclass = CPLGetLastErrorType();
16093 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16094 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16095 : }
16096 : }
16097 : #endif
16098 : }
16099 1 : {
16100 : /* %typemap(out) (retStringAndCPLFree*) */
16101 1 : Py_XDECREF(resultobj);
16102 1 : if(result)
16103 : {
16104 1 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
16105 1 : CPLFree(result);
16106 : }
16107 : else
16108 : {
16109 0 : resultobj = Py_None;
16110 0 : Py_INCREF(resultobj);
16111 : }
16112 : }
16113 1 : {
16114 : /* %typemap(freearg) char **dict */
16115 1 : CSLDestroy( arg2 );
16116 : }
16117 1 : 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 16 : SWIGINTERN PyObject *_wrap_SpatialReference_CloneGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16129 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16130 16 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16131 16 : void *argp1 = 0 ;
16132 16 : int res1 = 0 ;
16133 16 : PyObject *swig_obj[1] ;
16134 16 : OSRSpatialReferenceShadow *result = 0 ;
16135 :
16136 16 : if (!args) SWIG_fail;
16137 16 : swig_obj[0] = args;
16138 16 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16139 16 : if (!SWIG_IsOK(res1)) {
16140 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CloneGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16141 : }
16142 16 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16143 16 : {
16144 16 : const int bLocalUseExceptions = GetUseExceptions();
16145 16 : if ( bLocalUseExceptions ) {
16146 3 : pushErrorHandler();
16147 : }
16148 16 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
16149 16 : if ( bLocalUseExceptions ) {
16150 3 : popErrorHandler();
16151 : }
16152 : #ifndef SED_HACKS
16153 : if ( bLocalUseExceptions ) {
16154 : CPLErr eclass = CPLGetLastErrorType();
16155 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16156 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16157 : }
16158 : }
16159 : #endif
16160 : }
16161 16 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16162 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16163 : return resultobj;
16164 : fail:
16165 : return NULL;
16166 : }
16167 :
16168 :
16169 59 : SWIGINTERN PyObject *_wrap_SpatialReference_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16170 59 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16171 59 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16172 59 : void *argp1 = 0 ;
16173 59 : int res1 = 0 ;
16174 59 : PyObject *swig_obj[1] ;
16175 59 : OSRSpatialReferenceShadow *result = 0 ;
16176 :
16177 59 : if (!args) SWIG_fail;
16178 59 : swig_obj[0] = args;
16179 59 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16180 59 : if (!SWIG_IsOK(res1)) {
16181 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Clone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16182 : }
16183 59 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16184 59 : {
16185 59 : const int bLocalUseExceptions = GetUseExceptions();
16186 59 : if ( bLocalUseExceptions ) {
16187 4 : pushErrorHandler();
16188 : }
16189 59 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
16190 59 : if ( bLocalUseExceptions ) {
16191 4 : popErrorHandler();
16192 : }
16193 : #ifndef SED_HACKS
16194 : if ( bLocalUseExceptions ) {
16195 : CPLErr eclass = CPLGetLastErrorType();
16196 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16197 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16198 : }
16199 : }
16200 : #endif
16201 : }
16202 59 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16203 59 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16204 : return resultobj;
16205 : fail:
16206 : return NULL;
16207 : }
16208 :
16209 :
16210 1 : SWIGINTERN PyObject *_wrap_SpatialReference_StripVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16211 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16212 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16213 1 : void *argp1 = 0 ;
16214 1 : int res1 = 0 ;
16215 1 : PyObject *swig_obj[1] ;
16216 1 : OGRErr result;
16217 :
16218 1 : if (!args) SWIG_fail;
16219 1 : swig_obj[0] = args;
16220 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16221 1 : if (!SWIG_IsOK(res1)) {
16222 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_StripVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16223 : }
16224 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16225 1 : {
16226 1 : const int bLocalUseExceptions = GetUseExceptions();
16227 1 : if ( bLocalUseExceptions ) {
16228 1 : pushErrorHandler();
16229 : }
16230 1 : result = (OGRErr)OSRSpatialReferenceShadow_StripVertical(arg1);
16231 1 : if ( bLocalUseExceptions ) {
16232 1 : popErrorHandler();
16233 : }
16234 : #ifndef SED_HACKS
16235 : if ( bLocalUseExceptions ) {
16236 : CPLErr eclass = CPLGetLastErrorType();
16237 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16238 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16239 : }
16240 : }
16241 : #endif
16242 : }
16243 1 : {
16244 : /* %typemap(out) OGRErr */
16245 1 : if ( result != 0 && GetUseExceptions()) {
16246 0 : const char* pszMessage = CPLGetLastErrorMsg();
16247 0 : if( pszMessage[0] != '\0' )
16248 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16249 : else
16250 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16251 0 : SWIG_fail;
16252 : }
16253 : }
16254 1 : {
16255 : /* %typemap(ret) OGRErr */
16256 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16257 1 : resultobj = PyInt_FromLong( result );
16258 : }
16259 : }
16260 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16261 : return resultobj;
16262 : fail:
16263 : return NULL;
16264 : }
16265 :
16266 :
16267 114 : SWIGINTERN PyObject *_wrap_SpatialReference_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16268 114 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16269 114 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16270 114 : void *argp1 = 0 ;
16271 114 : int res1 = 0 ;
16272 114 : PyObject *swig_obj[1] ;
16273 114 : OGRErr result;
16274 :
16275 114 : if (!args) SWIG_fail;
16276 114 : swig_obj[0] = args;
16277 114 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16278 114 : if (!SWIG_IsOK(res1)) {
16279 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Validate" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16280 : }
16281 114 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16282 114 : {
16283 114 : const int bLocalUseExceptions = GetUseExceptions();
16284 114 : if ( bLocalUseExceptions ) {
16285 114 : pushErrorHandler();
16286 : }
16287 114 : result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
16288 114 : if ( bLocalUseExceptions ) {
16289 114 : popErrorHandler();
16290 : }
16291 : #ifndef SED_HACKS
16292 : if ( bLocalUseExceptions ) {
16293 : CPLErr eclass = CPLGetLastErrorType();
16294 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16295 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16296 : }
16297 : }
16298 : #endif
16299 : }
16300 114 : {
16301 : /* %typemap(out) OGRErr */
16302 150 : if ( result != 0 && GetUseExceptions()) {
16303 36 : const char* pszMessage = CPLGetLastErrorMsg();
16304 36 : if( pszMessage[0] != '\0' )
16305 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16306 : else
16307 36 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16308 36 : SWIG_fail;
16309 : }
16310 : }
16311 78 : {
16312 : /* %typemap(ret) OGRErr */
16313 78 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16314 78 : resultobj = PyInt_FromLong( result );
16315 : }
16316 : }
16317 78 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16318 : return resultobj;
16319 : fail:
16320 : return NULL;
16321 : }
16322 :
16323 :
16324 20 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphToESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16325 20 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16326 20 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16327 20 : void *argp1 = 0 ;
16328 20 : int res1 = 0 ;
16329 20 : PyObject *swig_obj[1] ;
16330 20 : OGRErr result;
16331 :
16332 20 : if (!args) SWIG_fail;
16333 20 : swig_obj[0] = args;
16334 20 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16335 20 : if (!SWIG_IsOK(res1)) {
16336 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphToESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16337 : }
16338 20 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16339 20 : {
16340 20 : const int bLocalUseExceptions = GetUseExceptions();
16341 20 : if ( bLocalUseExceptions ) {
16342 17 : pushErrorHandler();
16343 : }
16344 20 : result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
16345 20 : if ( bLocalUseExceptions ) {
16346 17 : popErrorHandler();
16347 : }
16348 : #ifndef SED_HACKS
16349 : if ( bLocalUseExceptions ) {
16350 : CPLErr eclass = CPLGetLastErrorType();
16351 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16352 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16353 : }
16354 : }
16355 : #endif
16356 : }
16357 20 : {
16358 : /* %typemap(out) OGRErr */
16359 20 : if ( result != 0 && GetUseExceptions()) {
16360 0 : const char* pszMessage = CPLGetLastErrorMsg();
16361 0 : if( pszMessage[0] != '\0' )
16362 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16363 : else
16364 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16365 0 : SWIG_fail;
16366 : }
16367 : }
16368 20 : {
16369 : /* %typemap(ret) OGRErr */
16370 20 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16371 20 : resultobj = PyInt_FromLong( result );
16372 : }
16373 : }
16374 20 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16375 : return resultobj;
16376 : fail:
16377 : return NULL;
16378 : }
16379 :
16380 :
16381 19 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16382 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16383 19 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16384 19 : void *argp1 = 0 ;
16385 19 : int res1 = 0 ;
16386 19 : PyObject *swig_obj[1] ;
16387 19 : OGRErr result;
16388 :
16389 19 : if (!args) SWIG_fail;
16390 19 : swig_obj[0] = args;
16391 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16392 19 : if (!SWIG_IsOK(res1)) {
16393 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16394 : }
16395 19 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16396 19 : {
16397 19 : const int bLocalUseExceptions = GetUseExceptions();
16398 19 : if ( bLocalUseExceptions ) {
16399 19 : pushErrorHandler();
16400 : }
16401 19 : result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
16402 19 : if ( bLocalUseExceptions ) {
16403 19 : popErrorHandler();
16404 : }
16405 : #ifndef SED_HACKS
16406 : if ( bLocalUseExceptions ) {
16407 : CPLErr eclass = CPLGetLastErrorType();
16408 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16409 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16410 : }
16411 : }
16412 : #endif
16413 : }
16414 19 : {
16415 : /* %typemap(out) OGRErr */
16416 19 : if ( result != 0 && GetUseExceptions()) {
16417 0 : const char* pszMessage = CPLGetLastErrorMsg();
16418 0 : if( pszMessage[0] != '\0' )
16419 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16420 : else
16421 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16422 0 : SWIG_fail;
16423 : }
16424 : }
16425 19 : {
16426 : /* %typemap(ret) OGRErr */
16427 19 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16428 19 : resultobj = PyInt_FromLong( result );
16429 : }
16430 : }
16431 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16432 : return resultobj;
16433 : fail:
16434 : return NULL;
16435 : }
16436 :
16437 :
16438 28 : SWIGINTERN PyObject *_wrap_SpatialReference_ConvertToOtherProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16439 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16440 28 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16441 28 : char *arg2 = (char *) 0 ;
16442 28 : char **arg3 = (char **) NULL ;
16443 28 : void *argp1 = 0 ;
16444 28 : int res1 = 0 ;
16445 28 : int res2 ;
16446 28 : char *buf2 = 0 ;
16447 28 : int alloc2 = 0 ;
16448 28 : PyObject *swig_obj[3] ;
16449 28 : OSRSpatialReferenceShadow *result = 0 ;
16450 :
16451 28 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ConvertToOtherProjection", 2, 3, swig_obj)) SWIG_fail;
16452 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16453 28 : if (!SWIG_IsOK(res1)) {
16454 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16455 : }
16456 28 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16457 28 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16458 28 : if (!SWIG_IsOK(res2)) {
16459 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "2"" of type '" "char const *""'");
16460 : }
16461 28 : arg2 = reinterpret_cast< char * >(buf2);
16462 28 : if (swig_obj[2]) {
16463 0 : {
16464 : /* %typemap(in) char **dict */
16465 0 : arg3 = NULL;
16466 0 : if ( PySequence_Check( swig_obj[2] ) ) {
16467 0 : int bErr = FALSE;
16468 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
16469 0 : if ( bErr )
16470 : {
16471 0 : SWIG_fail;
16472 : }
16473 : }
16474 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
16475 0 : int bErr = FALSE;
16476 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
16477 0 : if ( bErr )
16478 : {
16479 0 : SWIG_fail;
16480 : }
16481 : }
16482 : else {
16483 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16484 0 : SWIG_fail;
16485 : }
16486 : }
16487 : }
16488 28 : {
16489 28 : const int bLocalUseExceptions = GetUseExceptions();
16490 28 : if ( bLocalUseExceptions ) {
16491 14 : pushErrorHandler();
16492 : }
16493 28 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_ConvertToOtherProjection(arg1,(char const *)arg2,arg3);
16494 28 : if ( bLocalUseExceptions ) {
16495 14 : popErrorHandler();
16496 : }
16497 : #ifndef SED_HACKS
16498 : if ( bLocalUseExceptions ) {
16499 : CPLErr eclass = CPLGetLastErrorType();
16500 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16501 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16502 : }
16503 : }
16504 : #endif
16505 : }
16506 28 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16507 28 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16508 28 : {
16509 : /* %typemap(freearg) char **dict */
16510 28 : CSLDestroy( arg3 );
16511 : }
16512 28 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16513 : return resultobj;
16514 0 : fail:
16515 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16516 0 : {
16517 : /* %typemap(freearg) char **dict */
16518 0 : CSLDestroy( arg3 );
16519 : }
16520 : return NULL;
16521 : }
16522 :
16523 :
16524 3 : SWIGINTERN PyObject *_wrap_SpatialReference_PromoteTo3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16525 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16526 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16527 3 : char *arg2 = (char *) NULL ;
16528 3 : void *argp1 = 0 ;
16529 3 : int res1 = 0 ;
16530 3 : int res2 ;
16531 3 : char *buf2 = 0 ;
16532 3 : int alloc2 = 0 ;
16533 3 : PyObject *swig_obj[2] ;
16534 3 : OGRErr result;
16535 :
16536 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_PromoteTo3D", 1, 2, swig_obj)) SWIG_fail;
16537 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16538 3 : if (!SWIG_IsOK(res1)) {
16539 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_PromoteTo3D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16540 : }
16541 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16542 3 : if (swig_obj[1]) {
16543 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16544 0 : if (!SWIG_IsOK(res2)) {
16545 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_PromoteTo3D" "', argument " "2"" of type '" "char const *""'");
16546 : }
16547 0 : arg2 = reinterpret_cast< char * >(buf2);
16548 : }
16549 3 : {
16550 3 : const int bLocalUseExceptions = GetUseExceptions();
16551 3 : if ( bLocalUseExceptions ) {
16552 3 : pushErrorHandler();
16553 : }
16554 3 : result = (OGRErr)OSRSpatialReferenceShadow_PromoteTo3D(arg1,(char const *)arg2);
16555 3 : if ( bLocalUseExceptions ) {
16556 3 : popErrorHandler();
16557 : }
16558 : #ifndef SED_HACKS
16559 : if ( bLocalUseExceptions ) {
16560 : CPLErr eclass = CPLGetLastErrorType();
16561 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16562 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16563 : }
16564 : }
16565 : #endif
16566 : }
16567 3 : {
16568 : /* %typemap(out) OGRErr */
16569 3 : if ( result != 0 && GetUseExceptions()) {
16570 0 : const char* pszMessage = CPLGetLastErrorMsg();
16571 0 : if( pszMessage[0] != '\0' )
16572 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16573 : else
16574 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16575 0 : SWIG_fail;
16576 : }
16577 : }
16578 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16579 3 : {
16580 : /* %typemap(ret) OGRErr */
16581 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16582 3 : resultobj = PyInt_FromLong( result );
16583 : }
16584 : }
16585 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16586 : return resultobj;
16587 0 : fail:
16588 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16589 : return NULL;
16590 : }
16591 :
16592 :
16593 1 : SWIGINTERN PyObject *_wrap_SpatialReference_DemoteTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16594 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16595 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16596 1 : char *arg2 = (char *) NULL ;
16597 1 : void *argp1 = 0 ;
16598 1 : int res1 = 0 ;
16599 1 : int res2 ;
16600 1 : char *buf2 = 0 ;
16601 1 : int alloc2 = 0 ;
16602 1 : PyObject *swig_obj[2] ;
16603 1 : OGRErr result;
16604 :
16605 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_DemoteTo2D", 1, 2, swig_obj)) SWIG_fail;
16606 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16607 1 : if (!SWIG_IsOK(res1)) {
16608 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_DemoteTo2D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16609 : }
16610 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16611 1 : if (swig_obj[1]) {
16612 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16613 0 : if (!SWIG_IsOK(res2)) {
16614 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_DemoteTo2D" "', argument " "2"" of type '" "char const *""'");
16615 : }
16616 0 : arg2 = reinterpret_cast< char * >(buf2);
16617 : }
16618 1 : {
16619 1 : const int bLocalUseExceptions = GetUseExceptions();
16620 1 : if ( bLocalUseExceptions ) {
16621 1 : pushErrorHandler();
16622 : }
16623 1 : result = (OGRErr)OSRSpatialReferenceShadow_DemoteTo2D(arg1,(char const *)arg2);
16624 1 : if ( bLocalUseExceptions ) {
16625 1 : popErrorHandler();
16626 : }
16627 : #ifndef SED_HACKS
16628 : if ( bLocalUseExceptions ) {
16629 : CPLErr eclass = CPLGetLastErrorType();
16630 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16631 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16632 : }
16633 : }
16634 : #endif
16635 : }
16636 1 : {
16637 : /* %typemap(out) OGRErr */
16638 1 : if ( result != 0 && GetUseExceptions()) {
16639 0 : const char* pszMessage = CPLGetLastErrorMsg();
16640 0 : if( pszMessage[0] != '\0' )
16641 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16642 : else
16643 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16644 0 : SWIG_fail;
16645 : }
16646 : }
16647 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16648 1 : {
16649 : /* %typemap(ret) OGRErr */
16650 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16651 1 : resultobj = PyInt_FromLong( result );
16652 : }
16653 : }
16654 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16655 : return resultobj;
16656 0 : fail:
16657 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16658 : return NULL;
16659 : }
16660 :
16661 :
16662 271 : SWIGINTERN PyObject *SpatialReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16663 271 : PyObject *obj;
16664 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
16665 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_NewClientData(obj));
16666 271 : return SWIG_Py_Void();
16667 : }
16668 :
16669 2215 : SWIGINTERN PyObject *SpatialReference_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16670 2215 : return SWIG_Python_InitShadowInstance(args);
16671 : }
16672 :
16673 11 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16674 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16675 11 : OGRCoordinateTransformationOptions *result = 0 ;
16676 :
16677 11 : if (!SWIG_Python_UnpackTuple(args, "new_CoordinateTransformationOptions", 0, 0, 0)) SWIG_fail;
16678 11 : {
16679 11 : const int bLocalUseExceptions = GetUseExceptions();
16680 11 : if ( bLocalUseExceptions ) {
16681 10 : pushErrorHandler();
16682 : }
16683 11 : result = (OGRCoordinateTransformationOptions *)new_OGRCoordinateTransformationOptions();
16684 11 : if ( bLocalUseExceptions ) {
16685 10 : popErrorHandler();
16686 : }
16687 : #ifndef SED_HACKS
16688 : if ( bLocalUseExceptions ) {
16689 : CPLErr eclass = CPLGetLastErrorType();
16690 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16691 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16692 : }
16693 : }
16694 : #endif
16695 : }
16696 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_NEW | 0 );
16697 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16698 : return resultobj;
16699 0 : fail:
16700 0 : return NULL;
16701 : }
16702 :
16703 :
16704 11 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16705 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16706 11 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16707 11 : void *argp1 = 0 ;
16708 11 : int res1 = 0 ;
16709 11 : PyObject *swig_obj[1] ;
16710 :
16711 11 : if (!args) SWIG_fail;
16712 11 : swig_obj[0] = args;
16713 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_DISOWN | 0 );
16714 11 : if (!SWIG_IsOK(res1)) {
16715 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformationOptions" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16716 : }
16717 11 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16718 11 : {
16719 11 : const int bLocalUseExceptions = GetUseExceptions();
16720 11 : if ( bLocalUseExceptions ) {
16721 10 : pushErrorHandler();
16722 : }
16723 11 : delete_OGRCoordinateTransformationOptions(arg1);
16724 11 : if ( bLocalUseExceptions ) {
16725 10 : popErrorHandler();
16726 : }
16727 : #ifndef SED_HACKS
16728 : if ( bLocalUseExceptions ) {
16729 : CPLErr eclass = CPLGetLastErrorType();
16730 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16731 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16732 : }
16733 : }
16734 : #endif
16735 : }
16736 11 : resultobj = SWIG_Py_Void();
16737 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16738 : return resultobj;
16739 : fail:
16740 : return NULL;
16741 : }
16742 :
16743 :
16744 5 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetAreaOfInterest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16745 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16746 5 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16747 5 : double arg2 ;
16748 5 : double arg3 ;
16749 5 : double arg4 ;
16750 5 : double arg5 ;
16751 5 : void *argp1 = 0 ;
16752 5 : int res1 = 0 ;
16753 5 : double val2 ;
16754 5 : int ecode2 = 0 ;
16755 5 : double val3 ;
16756 5 : int ecode3 = 0 ;
16757 5 : double val4 ;
16758 5 : int ecode4 = 0 ;
16759 5 : double val5 ;
16760 5 : int ecode5 = 0 ;
16761 5 : PyObject *swig_obj[5] ;
16762 5 : bool result;
16763 :
16764 5 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetAreaOfInterest", 5, 5, swig_obj)) SWIG_fail;
16765 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16766 5 : if (!SWIG_IsOK(res1)) {
16767 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16768 : }
16769 5 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16770 5 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
16771 5 : if (!SWIG_IsOK(ecode2)) {
16772 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "2"" of type '" "double""'");
16773 : }
16774 5 : arg2 = static_cast< double >(val2);
16775 5 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
16776 5 : if (!SWIG_IsOK(ecode3)) {
16777 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "3"" of type '" "double""'");
16778 : }
16779 5 : arg3 = static_cast< double >(val3);
16780 5 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
16781 5 : if (!SWIG_IsOK(ecode4)) {
16782 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "4"" of type '" "double""'");
16783 : }
16784 5 : arg4 = static_cast< double >(val4);
16785 5 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
16786 5 : if (!SWIG_IsOK(ecode5)) {
16787 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "5"" of type '" "double""'");
16788 : }
16789 5 : arg5 = static_cast< double >(val5);
16790 5 : {
16791 5 : const int bLocalUseExceptions = GetUseExceptions();
16792 5 : if ( bLocalUseExceptions ) {
16793 5 : pushErrorHandler();
16794 : }
16795 5 : result = (bool)OGRCoordinateTransformationOptions_SetAreaOfInterest(arg1,arg2,arg3,arg4,arg5);
16796 5 : if ( bLocalUseExceptions ) {
16797 5 : popErrorHandler();
16798 : }
16799 : #ifndef SED_HACKS
16800 : if ( bLocalUseExceptions ) {
16801 : CPLErr eclass = CPLGetLastErrorType();
16802 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16803 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16804 : }
16805 : }
16806 : #endif
16807 : }
16808 5 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16809 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16810 : return resultobj;
16811 : fail:
16812 : return NULL;
16813 : }
16814 :
16815 :
16816 8 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16817 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16818 8 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16819 8 : char *arg2 = (char *) 0 ;
16820 8 : bool arg3 = (bool) false ;
16821 8 : void *argp1 = 0 ;
16822 8 : int res1 = 0 ;
16823 8 : int res2 ;
16824 8 : char *buf2 = 0 ;
16825 8 : int alloc2 = 0 ;
16826 8 : bool val3 ;
16827 8 : int ecode3 = 0 ;
16828 8 : PyObject *swig_obj[3] ;
16829 8 : bool result;
16830 :
16831 8 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOperation", 2, 3, swig_obj)) SWIG_fail;
16832 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16833 8 : if (!SWIG_IsOK(res1)) {
16834 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16835 : }
16836 8 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16837 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16838 8 : if (!SWIG_IsOK(res2)) {
16839 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "2"" of type '" "char const *""'");
16840 : }
16841 8 : arg2 = reinterpret_cast< char * >(buf2);
16842 8 : if (swig_obj[2]) {
16843 1 : ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
16844 1 : if (!SWIG_IsOK(ecode3)) {
16845 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "3"" of type '" "bool""'");
16846 : }
16847 : arg3 = static_cast< bool >(val3);
16848 : }
16849 8 : {
16850 8 : const int bLocalUseExceptions = GetUseExceptions();
16851 8 : if ( bLocalUseExceptions ) {
16852 7 : pushErrorHandler();
16853 : }
16854 8 : result = (bool)OGRCoordinateTransformationOptions_SetOperation(arg1,(char const *)arg2,arg3);
16855 8 : if ( bLocalUseExceptions ) {
16856 7 : popErrorHandler();
16857 : }
16858 : #ifndef SED_HACKS
16859 : if ( bLocalUseExceptions ) {
16860 : CPLErr eclass = CPLGetLastErrorType();
16861 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16862 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16863 : }
16864 : }
16865 : #endif
16866 : }
16867 8 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16868 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16869 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16870 : return resultobj;
16871 0 : fail:
16872 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16873 : return NULL;
16874 : }
16875 :
16876 :
16877 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetDesiredAccuracy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16878 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16879 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16880 1 : double arg2 ;
16881 1 : void *argp1 = 0 ;
16882 1 : int res1 = 0 ;
16883 1 : double val2 ;
16884 1 : int ecode2 = 0 ;
16885 1 : PyObject *swig_obj[2] ;
16886 1 : bool result;
16887 :
16888 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetDesiredAccuracy", 2, 2, swig_obj)) SWIG_fail;
16889 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16890 1 : if (!SWIG_IsOK(res1)) {
16891 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16892 : }
16893 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16894 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
16895 1 : if (!SWIG_IsOK(ecode2)) {
16896 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "2"" of type '" "double""'");
16897 : }
16898 1 : arg2 = static_cast< double >(val2);
16899 1 : {
16900 1 : const int bLocalUseExceptions = GetUseExceptions();
16901 1 : if ( bLocalUseExceptions ) {
16902 1 : pushErrorHandler();
16903 : }
16904 1 : result = (bool)OGRCoordinateTransformationOptions_SetDesiredAccuracy(arg1,arg2);
16905 1 : if ( bLocalUseExceptions ) {
16906 1 : popErrorHandler();
16907 : }
16908 : #ifndef SED_HACKS
16909 : if ( bLocalUseExceptions ) {
16910 : CPLErr eclass = CPLGetLastErrorType();
16911 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16912 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16913 : }
16914 : }
16915 : #endif
16916 : }
16917 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16918 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16919 : return resultobj;
16920 : fail:
16921 : return NULL;
16922 : }
16923 :
16924 :
16925 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetBallparkAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16926 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16927 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16928 1 : bool arg2 ;
16929 1 : void *argp1 = 0 ;
16930 1 : int res1 = 0 ;
16931 1 : bool val2 ;
16932 1 : int ecode2 = 0 ;
16933 1 : PyObject *swig_obj[2] ;
16934 1 : bool result;
16935 :
16936 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetBallparkAllowed", 2, 2, swig_obj)) SWIG_fail;
16937 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16938 1 : if (!SWIG_IsOK(res1)) {
16939 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16940 : }
16941 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16942 1 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
16943 1 : if (!SWIG_IsOK(ecode2)) {
16944 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "2"" of type '" "bool""'");
16945 : }
16946 1 : arg2 = static_cast< bool >(val2);
16947 1 : {
16948 1 : const int bLocalUseExceptions = GetUseExceptions();
16949 1 : if ( bLocalUseExceptions ) {
16950 1 : pushErrorHandler();
16951 : }
16952 1 : result = (bool)OGRCoordinateTransformationOptions_SetBallparkAllowed(arg1,arg2);
16953 1 : if ( bLocalUseExceptions ) {
16954 1 : popErrorHandler();
16955 : }
16956 : #ifndef SED_HACKS
16957 : if ( bLocalUseExceptions ) {
16958 : CPLErr eclass = CPLGetLastErrorType();
16959 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16960 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16961 : }
16962 : }
16963 : #endif
16964 : }
16965 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16966 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16967 : return resultobj;
16968 : fail:
16969 : return NULL;
16970 : }
16971 :
16972 :
16973 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOnlyBest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16974 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16975 0 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16976 0 : bool arg2 ;
16977 0 : void *argp1 = 0 ;
16978 0 : int res1 = 0 ;
16979 0 : bool val2 ;
16980 0 : int ecode2 = 0 ;
16981 0 : PyObject *swig_obj[2] ;
16982 0 : bool result;
16983 :
16984 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOnlyBest", 2, 2, swig_obj)) SWIG_fail;
16985 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16986 0 : if (!SWIG_IsOK(res1)) {
16987 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16988 : }
16989 0 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16990 0 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
16991 0 : if (!SWIG_IsOK(ecode2)) {
16992 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "2"" of type '" "bool""'");
16993 : }
16994 0 : arg2 = static_cast< bool >(val2);
16995 0 : {
16996 0 : const int bLocalUseExceptions = GetUseExceptions();
16997 0 : if ( bLocalUseExceptions ) {
16998 0 : pushErrorHandler();
16999 : }
17000 0 : result = (bool)OGRCoordinateTransformationOptions_SetOnlyBest(arg1,arg2);
17001 0 : if ( bLocalUseExceptions ) {
17002 0 : popErrorHandler();
17003 : }
17004 : #ifndef SED_HACKS
17005 : if ( bLocalUseExceptions ) {
17006 : CPLErr eclass = CPLGetLastErrorType();
17007 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17008 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17009 : }
17010 : }
17011 : #endif
17012 : }
17013 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17014 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17015 : return resultobj;
17016 : fail:
17017 : return NULL;
17018 : }
17019 :
17020 :
17021 271 : SWIGINTERN PyObject *CoordinateTransformationOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17022 271 : PyObject *obj;
17023 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
17024 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_NewClientData(obj));
17025 271 : return SWIG_Py_Void();
17026 : }
17027 :
17028 11 : SWIGINTERN PyObject *CoordinateTransformationOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17029 11 : return SWIG_Python_InitShadowInstance(args);
17030 : }
17031 :
17032 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17033 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17034 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17035 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17036 : void *argp1 = 0 ;
17037 : int res1 = 0 ;
17038 : void *argp2 = 0 ;
17039 : int res2 = 0 ;
17040 : OSRCoordinateTransformationShadow *result = 0 ;
17041 :
17042 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17043 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17044 : if (!SWIG_IsOK(res1)) {
17045 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17046 : }
17047 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17048 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17049 : if (!SWIG_IsOK(res2)) {
17050 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17051 : }
17052 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17053 : {
17054 : const int bLocalUseExceptions = GetUseExceptions();
17055 : if ( bLocalUseExceptions ) {
17056 : pushErrorHandler();
17057 : }
17058 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_0(arg1,arg2);
17059 : if ( bLocalUseExceptions ) {
17060 : popErrorHandler();
17061 : }
17062 : #ifndef SED_HACKS
17063 : if ( bLocalUseExceptions ) {
17064 : CPLErr eclass = CPLGetLastErrorType();
17065 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17066 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17067 : }
17068 : }
17069 : #endif
17070 : }
17071 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17072 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17073 : return resultobj;
17074 : fail:
17075 : return NULL;
17076 : }
17077 :
17078 :
17079 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17080 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17081 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17082 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17083 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) 0 ;
17084 : void *argp1 = 0 ;
17085 : int res1 = 0 ;
17086 : void *argp2 = 0 ;
17087 : int res2 = 0 ;
17088 : void *argp3 = 0 ;
17089 : int res3 = 0 ;
17090 : OSRCoordinateTransformationShadow *result = 0 ;
17091 :
17092 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
17093 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17094 : if (!SWIG_IsOK(res1)) {
17095 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17096 : }
17097 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17098 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17099 : if (!SWIG_IsOK(res2)) {
17100 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17101 : }
17102 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17103 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17104 : if (!SWIG_IsOK(res3)) {
17105 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
17106 : }
17107 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
17108 : {
17109 : const int bLocalUseExceptions = GetUseExceptions();
17110 : if ( bLocalUseExceptions ) {
17111 : pushErrorHandler();
17112 : }
17113 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_1(arg1,arg2,arg3);
17114 : if ( bLocalUseExceptions ) {
17115 : popErrorHandler();
17116 : }
17117 : #ifndef SED_HACKS
17118 : if ( bLocalUseExceptions ) {
17119 : CPLErr eclass = CPLGetLastErrorType();
17120 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17121 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17122 : }
17123 : }
17124 : #endif
17125 : }
17126 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17127 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17128 : return resultobj;
17129 : fail:
17130 : return NULL;
17131 : }
17132 :
17133 :
17134 151 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation(PyObject *self, PyObject *args) {
17135 151 : Py_ssize_t argc;
17136 151 : PyObject *argv[4] = {
17137 : 0
17138 : };
17139 :
17140 151 : if (!(argc = SWIG_Python_UnpackTuple(args, "new_CoordinateTransformation", 0, 3, argv))) SWIG_fail;
17141 151 : --argc;
17142 151 : if (argc == 2) {
17143 141 : int _v;
17144 141 : void *vptr = 0;
17145 141 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17146 141 : _v = SWIG_CheckState(res);
17147 141 : if (_v) {
17148 141 : void *vptr = 0;
17149 141 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17150 141 : _v = SWIG_CheckState(res);
17151 0 : if (_v) {
17152 141 : return _wrap_new_CoordinateTransformation__SWIG_0(self, argc, argv);
17153 : }
17154 : }
17155 : }
17156 10 : if (argc == 3) {
17157 10 : int _v;
17158 10 : void *vptr = 0;
17159 10 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17160 10 : _v = SWIG_CheckState(res);
17161 10 : if (_v) {
17162 10 : void *vptr = 0;
17163 10 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17164 10 : _v = SWIG_CheckState(res);
17165 10 : if (_v) {
17166 10 : void *vptr = 0;
17167 10 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRCoordinateTransformationOptions, 0);
17168 10 : _v = SWIG_CheckState(res);
17169 0 : if (_v) {
17170 10 : return _wrap_new_CoordinateTransformation__SWIG_1(self, argc, argv);
17171 : }
17172 : }
17173 : }
17174 : }
17175 :
17176 0 : fail:
17177 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CoordinateTransformation'.\n"
17178 : " Possible C/C++ prototypes are:\n"
17179 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *)\n"
17180 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *,OGRCoordinateTransformationOptions *)\n");
17181 : return 0;
17182 : }
17183 :
17184 :
17185 151 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17186 151 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17187 151 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17188 151 : void *argp1 = 0 ;
17189 151 : int res1 = 0 ;
17190 151 : PyObject *swig_obj[1] ;
17191 :
17192 151 : if (!args) SWIG_fail;
17193 151 : swig_obj[0] = args;
17194 151 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_DISOWN | 0 );
17195 151 : if (!SWIG_IsOK(res1)) {
17196 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformation" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17197 : }
17198 151 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17199 151 : {
17200 151 : const int bLocalUseExceptions = GetUseExceptions();
17201 151 : if ( bLocalUseExceptions ) {
17202 133 : pushErrorHandler();
17203 : }
17204 151 : delete_OSRCoordinateTransformationShadow(arg1);
17205 151 : if ( bLocalUseExceptions ) {
17206 133 : popErrorHandler();
17207 : }
17208 : #ifndef SED_HACKS
17209 : if ( bLocalUseExceptions ) {
17210 : CPLErr eclass = CPLGetLastErrorType();
17211 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17212 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17213 : }
17214 : }
17215 : #endif
17216 : }
17217 151 : resultobj = SWIG_Py_Void();
17218 151 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17219 : return resultobj;
17220 : fail:
17221 : return NULL;
17222 : }
17223 :
17224 :
17225 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_GetInverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17226 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17227 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17228 1 : void *argp1 = 0 ;
17229 1 : int res1 = 0 ;
17230 1 : PyObject *swig_obj[1] ;
17231 1 : OSRCoordinateTransformationShadow *result = 0 ;
17232 :
17233 1 : if (!args) SWIG_fail;
17234 1 : swig_obj[0] = args;
17235 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17236 1 : if (!SWIG_IsOK(res1)) {
17237 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_GetInverse" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17238 : }
17239 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17240 1 : {
17241 1 : const int bLocalUseExceptions = GetUseExceptions();
17242 1 : if ( bLocalUseExceptions ) {
17243 1 : pushErrorHandler();
17244 : }
17245 1 : result = (OSRCoordinateTransformationShadow *)OSRCoordinateTransformationShadow_GetInverse(arg1);
17246 1 : if ( bLocalUseExceptions ) {
17247 1 : popErrorHandler();
17248 : }
17249 : #ifndef SED_HACKS
17250 : if ( bLocalUseExceptions ) {
17251 : CPLErr eclass = CPLGetLastErrorType();
17252 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17253 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17254 : }
17255 : }
17256 : #endif
17257 : }
17258 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
17259 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17260 : return resultobj;
17261 : fail:
17262 : return NULL;
17263 : }
17264 :
17265 :
17266 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint3Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17267 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17268 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17269 1 : double *arg2 ;
17270 1 : void *argp1 = 0 ;
17271 1 : int res1 = 0 ;
17272 1 : double argin2[3] ;
17273 1 : PyObject *swig_obj[2] ;
17274 :
17275 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint3Double", 2, 2, swig_obj)) SWIG_fail;
17276 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17277 1 : if (!SWIG_IsOK(res1)) {
17278 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint3Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17279 : }
17280 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17281 1 : {
17282 : /* %typemap(in) (double argin2[ANY]) */
17283 1 : arg2 = argin2;
17284 1 : if (! PySequence_Check(swig_obj[1]) ) {
17285 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17286 0 : SWIG_fail;
17287 : }
17288 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17289 1 : if ( seq_size != 3 ) {
17290 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17291 0 : SWIG_fail;
17292 : }
17293 4 : for (unsigned int i=0; i<3; i++) {
17294 3 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17295 3 : double val;
17296 3 : if ( !PyArg_Parse(o, "d", &val ) ) {
17297 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17298 0 : Py_DECREF(o);
17299 0 : SWIG_fail;
17300 : }
17301 3 : arg2[i] = val;
17302 3 : Py_DECREF(o);
17303 : }
17304 : }
17305 1 : {
17306 1 : const int bLocalUseExceptions = GetUseExceptions();
17307 1 : if ( bLocalUseExceptions ) {
17308 1 : pushErrorHandler();
17309 : }
17310 1 : OSRCoordinateTransformationShadow__TransformPoint3Double(arg1,arg2);
17311 1 : if ( bLocalUseExceptions ) {
17312 1 : popErrorHandler();
17313 : }
17314 : #ifndef SED_HACKS
17315 : if ( bLocalUseExceptions ) {
17316 : CPLErr eclass = CPLGetLastErrorType();
17317 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17318 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17319 : }
17320 : }
17321 : #endif
17322 : }
17323 1 : resultobj = SWIG_Py_Void();
17324 1 : {
17325 : /* %typemap(argout) (double argout[ANY]) */
17326 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17327 1 : resultobj = t_output_helper(resultobj,out);
17328 : }
17329 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17330 : return resultobj;
17331 : fail:
17332 : return NULL;
17333 : }
17334 :
17335 :
17336 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint4Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17337 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17338 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17339 1 : double *arg2 ;
17340 1 : void *argp1 = 0 ;
17341 1 : int res1 = 0 ;
17342 1 : double argin2[4] ;
17343 1 : PyObject *swig_obj[2] ;
17344 :
17345 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint4Double", 2, 2, swig_obj)) SWIG_fail;
17346 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17347 1 : if (!SWIG_IsOK(res1)) {
17348 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint4Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17349 : }
17350 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17351 1 : {
17352 : /* %typemap(in) (double argin2[ANY]) */
17353 1 : arg2 = argin2;
17354 1 : if (! PySequence_Check(swig_obj[1]) ) {
17355 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17356 0 : SWIG_fail;
17357 : }
17358 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17359 1 : if ( seq_size != 4 ) {
17360 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17361 0 : SWIG_fail;
17362 : }
17363 5 : for (unsigned int i=0; i<4; i++) {
17364 4 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17365 4 : double val;
17366 4 : if ( !PyArg_Parse(o, "d", &val ) ) {
17367 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17368 0 : Py_DECREF(o);
17369 0 : SWIG_fail;
17370 : }
17371 4 : arg2[i] = val;
17372 4 : Py_DECREF(o);
17373 : }
17374 : }
17375 1 : {
17376 1 : const int bLocalUseExceptions = GetUseExceptions();
17377 1 : if ( bLocalUseExceptions ) {
17378 1 : pushErrorHandler();
17379 : }
17380 1 : OSRCoordinateTransformationShadow__TransformPoint4Double(arg1,arg2);
17381 1 : if ( bLocalUseExceptions ) {
17382 1 : popErrorHandler();
17383 : }
17384 : #ifndef SED_HACKS
17385 : if ( bLocalUseExceptions ) {
17386 : CPLErr eclass = CPLGetLastErrorType();
17387 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17388 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17389 : }
17390 : }
17391 : #endif
17392 : }
17393 1 : resultobj = SWIG_Py_Void();
17394 1 : {
17395 : /* %typemap(argout) (double argout[ANY]) */
17396 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17397 1 : resultobj = t_output_helper(resultobj,out);
17398 : }
17399 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17400 : return resultobj;
17401 : fail:
17402 : return NULL;
17403 : }
17404 :
17405 :
17406 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17407 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17408 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17409 : double *arg2 ;
17410 : double arg3 ;
17411 : double arg4 ;
17412 : double arg5 = (double) 0.0 ;
17413 : void *argp1 = 0 ;
17414 : int res1 = 0 ;
17415 : double argout2[3] ;
17416 : double val3 ;
17417 : int ecode3 = 0 ;
17418 : double val4 ;
17419 : int ecode4 = 0 ;
17420 : double val5 ;
17421 : int ecode5 = 0 ;
17422 :
17423 : {
17424 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17425 : memset(argout2, 0, sizeof(argout2));
17426 : arg2 = argout2;
17427 : }
17428 : if ((nobjs < 3) || (nobjs > 4)) SWIG_fail;
17429 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17430 : if (!SWIG_IsOK(res1)) {
17431 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17432 : }
17433 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17434 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17435 : if (!SWIG_IsOK(ecode3)) {
17436 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17437 : }
17438 : arg3 = static_cast< double >(val3);
17439 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17440 : if (!SWIG_IsOK(ecode4)) {
17441 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17442 : }
17443 : arg4 = static_cast< double >(val4);
17444 : if (swig_obj[3]) {
17445 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17446 : if (!SWIG_IsOK(ecode5)) {
17447 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17448 : }
17449 : arg5 = static_cast< double >(val5);
17450 : }
17451 : {
17452 : const int bLocalUseExceptions = GetUseExceptions();
17453 : if ( bLocalUseExceptions ) {
17454 : pushErrorHandler();
17455 : }
17456 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2,arg3,arg4,arg5);
17457 : if ( bLocalUseExceptions ) {
17458 : popErrorHandler();
17459 : }
17460 : #ifndef SED_HACKS
17461 : if ( bLocalUseExceptions ) {
17462 : CPLErr eclass = CPLGetLastErrorType();
17463 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17464 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17465 : }
17466 : }
17467 : #endif
17468 : }
17469 : resultobj = SWIG_Py_Void();
17470 : {
17471 : /* %typemap(argout) (double argout[ANY]) */
17472 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17473 : resultobj = t_output_helper(resultobj,out);
17474 : }
17475 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17476 : return resultobj;
17477 : fail:
17478 : return NULL;
17479 : }
17480 :
17481 :
17482 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17483 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17484 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17485 : double *arg2 ;
17486 : double arg3 ;
17487 : double arg4 ;
17488 : double arg5 ;
17489 : double arg6 ;
17490 : void *argp1 = 0 ;
17491 : int res1 = 0 ;
17492 : double argout2[4] ;
17493 : double val3 ;
17494 : int ecode3 = 0 ;
17495 : double val4 ;
17496 : int ecode4 = 0 ;
17497 : double val5 ;
17498 : int ecode5 = 0 ;
17499 : double val6 ;
17500 : int ecode6 = 0 ;
17501 :
17502 : {
17503 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17504 : memset(argout2, 0, sizeof(argout2));
17505 : arg2 = argout2;
17506 : }
17507 : if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
17508 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17509 : if (!SWIG_IsOK(res1)) {
17510 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17511 : }
17512 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17513 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17514 : if (!SWIG_IsOK(ecode3)) {
17515 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17516 : }
17517 : arg3 = static_cast< double >(val3);
17518 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17519 : if (!SWIG_IsOK(ecode4)) {
17520 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17521 : }
17522 : arg4 = static_cast< double >(val4);
17523 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17524 : if (!SWIG_IsOK(ecode5)) {
17525 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17526 : }
17527 : arg5 = static_cast< double >(val5);
17528 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
17529 : if (!SWIG_IsOK(ecode6)) {
17530 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "6"" of type '" "double""'");
17531 : }
17532 : arg6 = static_cast< double >(val6);
17533 : {
17534 : const int bLocalUseExceptions = GetUseExceptions();
17535 : if ( bLocalUseExceptions ) {
17536 : pushErrorHandler();
17537 : }
17538 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
17539 : if ( bLocalUseExceptions ) {
17540 : popErrorHandler();
17541 : }
17542 : #ifndef SED_HACKS
17543 : if ( bLocalUseExceptions ) {
17544 : CPLErr eclass = CPLGetLastErrorType();
17545 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17546 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17547 : }
17548 : }
17549 : #endif
17550 : }
17551 : resultobj = SWIG_Py_Void();
17552 : {
17553 : /* %typemap(argout) (double argout[ANY]) */
17554 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17555 : resultobj = t_output_helper(resultobj,out);
17556 : }
17557 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17558 : return resultobj;
17559 : fail:
17560 : return NULL;
17561 : }
17562 :
17563 :
17564 205 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint(PyObject *self, PyObject *args) {
17565 205 : Py_ssize_t argc;
17566 205 : PyObject *argv[6] = {
17567 : 0
17568 : };
17569 :
17570 205 : if (!(argc = SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoint", 0, 5, argv))) SWIG_fail;
17571 205 : --argc;
17572 205 : if ((argc >= 3) && (argc <= 4)) {
17573 201 : int _v;
17574 201 : void *vptr = 0;
17575 201 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17576 201 : _v = SWIG_CheckState(res);
17577 199 : if (_v) {
17578 199 : {
17579 199 : int res = SWIG_AsVal_double(argv[1], NULL);
17580 199 : _v = SWIG_CheckState(res);
17581 : }
17582 199 : if (_v) {
17583 199 : {
17584 199 : int res = SWIG_AsVal_double(argv[2], NULL);
17585 199 : _v = SWIG_CheckState(res);
17586 : }
17587 199 : if (_v) {
17588 199 : if (argc <= 3) {
17589 199 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17590 : }
17591 115 : {
17592 115 : int res = SWIG_AsVal_double(argv[3], NULL);
17593 115 : _v = SWIG_CheckState(res);
17594 : }
17595 115 : if (_v) {
17596 115 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17597 : }
17598 : }
17599 : }
17600 : }
17601 : }
17602 6 : if (argc == 5) {
17603 4 : int _v;
17604 4 : void *vptr = 0;
17605 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17606 4 : _v = SWIG_CheckState(res);
17607 4 : if (_v) {
17608 4 : {
17609 4 : int res = SWIG_AsVal_double(argv[1], NULL);
17610 4 : _v = SWIG_CheckState(res);
17611 : }
17612 4 : if (_v) {
17613 4 : {
17614 4 : int res = SWIG_AsVal_double(argv[2], NULL);
17615 4 : _v = SWIG_CheckState(res);
17616 : }
17617 4 : if (_v) {
17618 4 : {
17619 4 : int res = SWIG_AsVal_double(argv[3], NULL);
17620 4 : _v = SWIG_CheckState(res);
17621 : }
17622 4 : if (_v) {
17623 4 : {
17624 4 : int res = SWIG_AsVal_double(argv[4], NULL);
17625 4 : _v = SWIG_CheckState(res);
17626 : }
17627 4 : if (_v) {
17628 4 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, argc, argv);
17629 : }
17630 : }
17631 : }
17632 : }
17633 : }
17634 : }
17635 :
17636 2 : fail:
17637 2 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'.\n"
17638 : " Possible C/C++ prototypes are:\n"
17639 : " OSRCoordinateTransformationShadow::TransformPoint(double [3],double,double,double)\n"
17640 : " OSRCoordinateTransformationShadow::TransformPoint(double [4],double,double,double,double)\n");
17641 : return 0;
17642 : }
17643 :
17644 :
17645 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPointWithErrorCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17646 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17647 0 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17648 0 : double *arg2 ;
17649 0 : int *arg3 ;
17650 0 : double arg4 ;
17651 0 : double arg5 ;
17652 0 : double arg6 ;
17653 0 : double arg7 ;
17654 0 : void *argp1 = 0 ;
17655 0 : int res1 = 0 ;
17656 0 : double argout2[4] ;
17657 0 : int errorCode2[1] ;
17658 0 : double val4 ;
17659 0 : int ecode4 = 0 ;
17660 0 : double val5 ;
17661 0 : int ecode5 = 0 ;
17662 0 : double val6 ;
17663 0 : int ecode6 = 0 ;
17664 0 : double val7 ;
17665 0 : int ecode7 = 0 ;
17666 0 : PyObject *swig_obj[5] ;
17667 :
17668 0 : {
17669 : /* %typemap(in) (double argout2[4], int errorCode2[1]) */
17670 0 : arg2 = argout2;
17671 0 : arg3 = errorCode2;
17672 : }
17673 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPointWithErrorCode", 5, 5, swig_obj)) SWIG_fail;
17674 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17675 0 : if (!SWIG_IsOK(res1)) {
17676 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17677 : }
17678 0 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17679 0 : ecode4 = SWIG_AsVal_double(swig_obj[1], &val4);
17680 0 : if (!SWIG_IsOK(ecode4)) {
17681 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "4"" of type '" "double""'");
17682 : }
17683 0 : arg4 = static_cast< double >(val4);
17684 0 : ecode5 = SWIG_AsVal_double(swig_obj[2], &val5);
17685 0 : if (!SWIG_IsOK(ecode5)) {
17686 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "5"" of type '" "double""'");
17687 : }
17688 0 : arg5 = static_cast< double >(val5);
17689 0 : ecode6 = SWIG_AsVal_double(swig_obj[3], &val6);
17690 0 : if (!SWIG_IsOK(ecode6)) {
17691 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "6"" of type '" "double""'");
17692 : }
17693 0 : arg6 = static_cast< double >(val6);
17694 0 : ecode7 = SWIG_AsVal_double(swig_obj[4], &val7);
17695 0 : if (!SWIG_IsOK(ecode7)) {
17696 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "7"" of type '" "double""'");
17697 : }
17698 0 : arg7 = static_cast< double >(val7);
17699 0 : {
17700 0 : const int bLocalUseExceptions = GetUseExceptions();
17701 0 : if ( bLocalUseExceptions ) {
17702 0 : pushErrorHandler();
17703 : }
17704 0 : OSRCoordinateTransformationShadow_TransformPointWithErrorCode(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
17705 0 : if ( bLocalUseExceptions ) {
17706 0 : popErrorHandler();
17707 : }
17708 : #ifndef SED_HACKS
17709 : if ( bLocalUseExceptions ) {
17710 : CPLErr eclass = CPLGetLastErrorType();
17711 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17712 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17713 : }
17714 : }
17715 : #endif
17716 : }
17717 0 : resultobj = SWIG_Py_Void();
17718 0 : {
17719 : /* %typemap(argout) (double argout[4], int errorCode[1]) */
17720 0 : PyObject *r = PyTuple_New( 5 );
17721 0 : PyTuple_SetItem( r, 0, PyFloat_FromDouble(arg2[0]));
17722 0 : PyTuple_SetItem( r, 1, PyFloat_FromDouble(arg2[1]));
17723 0 : PyTuple_SetItem( r, 2, PyFloat_FromDouble(arg2[2]));
17724 0 : PyTuple_SetItem( r, 3, PyFloat_FromDouble(arg2[3]));
17725 0 : PyTuple_SetItem( r, 4, PyLong_FromLong(arg3[0]));
17726 0 : resultobj = t_output_helper(resultobj,r);
17727 : }
17728 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17729 : return resultobj;
17730 : fail:
17731 : return NULL;
17732 : }
17733 :
17734 :
17735 10 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17736 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17737 10 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17738 10 : int arg2 ;
17739 10 : double *arg3 = (double *) 0 ;
17740 10 : double *arg4 = (double *) 0 ;
17741 10 : double *arg5 = (double *) 0 ;
17742 10 : double *arg6 = (double *) 0 ;
17743 10 : void *argp1 = 0 ;
17744 10 : int res1 = 0 ;
17745 10 : int foundTime2 = FALSE ;
17746 10 : PyObject *swig_obj[2] ;
17747 :
17748 10 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoints", 2, 2, swig_obj)) SWIG_fail;
17749 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17750 10 : if (!SWIG_IsOK(res1)) {
17751 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoints" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17752 : }
17753 10 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17754 10 : {
17755 10 : if ( !PySequence_Check(swig_obj[1]) ) {
17756 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17757 0 : SWIG_fail;
17758 : }
17759 :
17760 10 : Py_ssize_t size = PySequence_Size(swig_obj[1]);
17761 10 : if( size != (int)size ) {
17762 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
17763 0 : SWIG_fail;
17764 : }
17765 10 : arg2 = (int)size;
17766 10 : arg3 = (double*) VSIMalloc(arg2*sizeof(double));
17767 10 : arg4 = (double*) VSIMalloc(arg2*sizeof(double));
17768 10 : arg5 = (double*) VSIMalloc(arg2*sizeof(double));
17769 10 : arg6 = (double*) VSIMalloc(arg2*sizeof(double));
17770 :
17771 10 : if (arg3 == NULL || arg4 == NULL || arg5 == NULL || arg6 == NULL)
17772 : {
17773 0 : PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
17774 0 : SWIG_fail;
17775 : }
17776 :
17777 10 : if (!DecomposeSequenceOf4DCoordinates(swig_obj[1],arg2,arg3,arg4,arg5,arg6, &foundTime2)) {
17778 0 : SWIG_fail;
17779 : }
17780 : }
17781 10 : {
17782 10 : const int bLocalUseExceptions = GetUseExceptions();
17783 10 : if ( bLocalUseExceptions ) {
17784 10 : pushErrorHandler();
17785 : }
17786 10 : OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6);
17787 10 : if ( bLocalUseExceptions ) {
17788 10 : popErrorHandler();
17789 : }
17790 : #ifndef SED_HACKS
17791 : if ( bLocalUseExceptions ) {
17792 : CPLErr eclass = CPLGetLastErrorType();
17793 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17794 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17795 : }
17796 : }
17797 : #endif
17798 : }
17799 10 : resultobj = SWIG_Py_Void();
17800 10 : {
17801 : /* %typemap(argout) (int nCount, double *x, double *y, double *z, double *t) */
17802 10 : Py_DECREF(resultobj);
17803 10 : PyObject *out = PyList_New( arg2 );
17804 10 : if( !out ) {
17805 0 : SWIG_fail;
17806 : }
17807 10 : int foundTime = foundTime2;
17808 33 : for( int i=0; i< arg2; i++ ) {
17809 38 : PyObject *tuple = PyTuple_New( foundTime ? 4 : 3 );
17810 23 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg3)[i] ) );
17811 23 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg4)[i] ) );
17812 23 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg5)[i] ) );
17813 23 : if( foundTime )
17814 8 : PyTuple_SetItem( tuple, 3, PyFloat_FromDouble( (arg6)[i] ) );
17815 23 : PyList_SetItem( out, i, tuple );
17816 : }
17817 10 : resultobj = out;
17818 : }
17819 10 : {
17820 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
17821 10 : VSIFree(arg3);
17822 10 : VSIFree(arg4);
17823 10 : VSIFree(arg5);
17824 10 : VSIFree(arg6);
17825 : }
17826 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17827 : return resultobj;
17828 0 : fail:
17829 0 : {
17830 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
17831 0 : VSIFree(arg3);
17832 0 : VSIFree(arg4);
17833 0 : VSIFree(arg5);
17834 0 : VSIFree(arg6);
17835 : }
17836 : return NULL;
17837 : }
17838 :
17839 :
17840 25 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17841 25 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17842 25 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17843 25 : double *arg2 ;
17844 25 : double arg3 ;
17845 25 : double arg4 ;
17846 25 : double arg5 ;
17847 25 : double arg6 ;
17848 25 : int arg7 ;
17849 25 : void *argp1 = 0 ;
17850 25 : int res1 = 0 ;
17851 25 : double argout2[4] ;
17852 25 : double val3 ;
17853 25 : int ecode3 = 0 ;
17854 25 : double val4 ;
17855 25 : int ecode4 = 0 ;
17856 25 : double val5 ;
17857 25 : int ecode5 = 0 ;
17858 25 : double val6 ;
17859 25 : int ecode6 = 0 ;
17860 25 : int val7 ;
17861 25 : int ecode7 = 0 ;
17862 25 : PyObject *swig_obj[6] ;
17863 :
17864 25 : {
17865 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17866 25 : memset(argout2, 0, sizeof(argout2));
17867 25 : arg2 = argout2;
17868 : }
17869 25 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformBounds", 6, 6, swig_obj)) SWIG_fail;
17870 25 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17871 25 : if (!SWIG_IsOK(res1)) {
17872 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17873 : }
17874 25 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17875 25 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17876 25 : if (!SWIG_IsOK(ecode3)) {
17877 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "3"" of type '" "double""'");
17878 : }
17879 25 : arg3 = static_cast< double >(val3);
17880 25 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17881 25 : if (!SWIG_IsOK(ecode4)) {
17882 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "4"" of type '" "double""'");
17883 : }
17884 25 : arg4 = static_cast< double >(val4);
17885 25 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17886 25 : if (!SWIG_IsOK(ecode5)) {
17887 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "5"" of type '" "double""'");
17888 : }
17889 25 : arg5 = static_cast< double >(val5);
17890 25 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
17891 25 : if (!SWIG_IsOK(ecode6)) {
17892 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "6"" of type '" "double""'");
17893 : }
17894 25 : arg6 = static_cast< double >(val6);
17895 25 : ecode7 = SWIG_AsVal_int(swig_obj[5], &val7);
17896 25 : if (!SWIG_IsOK(ecode7)) {
17897 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "7"" of type '" "int""'");
17898 : }
17899 25 : arg7 = static_cast< int >(val7);
17900 25 : {
17901 25 : const int bLocalUseExceptions = GetUseExceptions();
17902 25 : if ( bLocalUseExceptions ) {
17903 24 : pushErrorHandler();
17904 : }
17905 25 : OSRCoordinateTransformationShadow_TransformBounds(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
17906 25 : if ( bLocalUseExceptions ) {
17907 24 : popErrorHandler();
17908 : }
17909 : #ifndef SED_HACKS
17910 : if ( bLocalUseExceptions ) {
17911 : CPLErr eclass = CPLGetLastErrorType();
17912 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17913 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17914 : }
17915 : }
17916 : #endif
17917 : }
17918 25 : resultobj = SWIG_Py_Void();
17919 25 : {
17920 : /* %typemap(argout) (double argout[ANY]) */
17921 25 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17922 25 : resultobj = t_output_helper(resultobj,out);
17923 : }
17924 26 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17925 : return resultobj;
17926 : fail:
17927 : return NULL;
17928 : }
17929 :
17930 :
17931 271 : SWIGINTERN PyObject *CoordinateTransformation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17932 271 : PyObject *obj;
17933 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
17934 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_NewClientData(obj));
17935 271 : return SWIG_Py_Void();
17936 : }
17937 :
17938 151 : SWIGINTERN PyObject *CoordinateTransformation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17939 151 : return SWIG_Python_InitShadowInstance(args);
17940 : }
17941 :
17942 2 : SWIGINTERN PyObject *_wrap_CreateCoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17943 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17944 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17945 2 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17946 2 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) NULL ;
17947 2 : void *argp1 = 0 ;
17948 2 : int res1 = 0 ;
17949 2 : void *argp2 = 0 ;
17950 2 : int res2 = 0 ;
17951 2 : void *argp3 = 0 ;
17952 2 : int res3 = 0 ;
17953 2 : PyObject *swig_obj[3] ;
17954 2 : OSRCoordinateTransformationShadow *result = 0 ;
17955 :
17956 2 : if (!SWIG_Python_UnpackTuple(args, "CreateCoordinateTransformation", 2, 3, swig_obj)) SWIG_fail;
17957 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17958 2 : if (!SWIG_IsOK(res1)) {
17959 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17960 : }
17961 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17962 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17963 2 : if (!SWIG_IsOK(res2)) {
17964 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17965 : }
17966 2 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17967 2 : if (swig_obj[2]) {
17968 0 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17969 0 : if (!SWIG_IsOK(res3)) {
17970 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateCoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
17971 : }
17972 0 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
17973 : }
17974 2 : {
17975 2 : const int bLocalUseExceptions = GetUseExceptions();
17976 2 : if ( bLocalUseExceptions ) {
17977 2 : pushErrorHandler();
17978 : }
17979 2 : result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2,arg3);
17980 2 : if ( bLocalUseExceptions ) {
17981 2 : popErrorHandler();
17982 : }
17983 : #ifndef SED_HACKS
17984 : if ( bLocalUseExceptions ) {
17985 : CPLErr eclass = CPLGetLastErrorType();
17986 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17987 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17988 : }
17989 : }
17990 : #endif
17991 : }
17992 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
17993 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17994 : return resultobj;
17995 : fail:
17996 : return NULL;
17997 : }
17998 :
17999 :
18000 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18001 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18002 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18003 6609 : void *argp1 = 0 ;
18004 6609 : int res1 = 0 ;
18005 6609 : PyObject *swig_obj[1] ;
18006 6609 : char *result = 0 ;
18007 :
18008 6609 : if (!args) SWIG_fail;
18009 6609 : swig_obj[0] = args;
18010 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18011 6609 : if (!SWIG_IsOK(res1)) {
18012 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18013 : }
18014 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18015 6609 : {
18016 6609 : const int bLocalUseExceptions = GetUseExceptions();
18017 6609 : if ( bLocalUseExceptions ) {
18018 6609 : pushErrorHandler();
18019 : }
18020 6609 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18021 6609 : if ( bLocalUseExceptions ) {
18022 6609 : popErrorHandler();
18023 : }
18024 : #ifndef SED_HACKS
18025 : if ( bLocalUseExceptions ) {
18026 : CPLErr eclass = CPLGetLastErrorType();
18027 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18028 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18029 : }
18030 : }
18031 : #endif
18032 : }
18033 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18034 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18035 : return resultobj;
18036 : fail:
18037 : return NULL;
18038 : }
18039 :
18040 :
18041 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18042 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18043 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18044 6609 : void *argp1 = 0 ;
18045 6609 : int res1 = 0 ;
18046 6609 : PyObject *swig_obj[1] ;
18047 6609 : char *result = 0 ;
18048 :
18049 6609 : if (!args) SWIG_fail;
18050 6609 : swig_obj[0] = args;
18051 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18052 6609 : if (!SWIG_IsOK(res1)) {
18053 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18054 : }
18055 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18056 6609 : {
18057 6609 : const int bLocalUseExceptions = GetUseExceptions();
18058 6609 : if ( bLocalUseExceptions ) {
18059 6609 : pushErrorHandler();
18060 : }
18061 6609 : result = (char *)OSRCRSInfo_code_get(arg1);
18062 6609 : if ( bLocalUseExceptions ) {
18063 6609 : popErrorHandler();
18064 : }
18065 : #ifndef SED_HACKS
18066 : if ( bLocalUseExceptions ) {
18067 : CPLErr eclass = CPLGetLastErrorType();
18068 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18069 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18070 : }
18071 : }
18072 : #endif
18073 : }
18074 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18075 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18076 : return resultobj;
18077 : fail:
18078 : return NULL;
18079 : }
18080 :
18081 :
18082 1 : SWIGINTERN PyObject *_wrap_CRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18083 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18084 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18085 1 : void *argp1 = 0 ;
18086 1 : int res1 = 0 ;
18087 1 : PyObject *swig_obj[1] ;
18088 1 : char *result = 0 ;
18089 :
18090 1 : if (!args) SWIG_fail;
18091 1 : swig_obj[0] = args;
18092 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18093 1 : if (!SWIG_IsOK(res1)) {
18094 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18095 : }
18096 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18097 1 : {
18098 1 : const int bLocalUseExceptions = GetUseExceptions();
18099 1 : if ( bLocalUseExceptions ) {
18100 1 : pushErrorHandler();
18101 : }
18102 1 : result = (char *)OSRCRSInfo_name_get(arg1);
18103 1 : if ( bLocalUseExceptions ) {
18104 1 : popErrorHandler();
18105 : }
18106 : #ifndef SED_HACKS
18107 : if ( bLocalUseExceptions ) {
18108 : CPLErr eclass = CPLGetLastErrorType();
18109 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18110 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18111 : }
18112 : }
18113 : #endif
18114 : }
18115 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18116 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18117 : return resultobj;
18118 : fail:
18119 : return NULL;
18120 : }
18121 :
18122 :
18123 1 : SWIGINTERN PyObject *_wrap_CRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18124 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18125 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18126 1 : void *argp1 = 0 ;
18127 1 : int res1 = 0 ;
18128 1 : PyObject *swig_obj[1] ;
18129 1 : OSRCRSType result;
18130 :
18131 1 : if (!args) SWIG_fail;
18132 1 : swig_obj[0] = args;
18133 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18134 1 : if (!SWIG_IsOK(res1)) {
18135 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18136 : }
18137 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18138 1 : {
18139 1 : const int bLocalUseExceptions = GetUseExceptions();
18140 1 : if ( bLocalUseExceptions ) {
18141 1 : pushErrorHandler();
18142 : }
18143 1 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
18144 1 : if ( bLocalUseExceptions ) {
18145 1 : popErrorHandler();
18146 : }
18147 : #ifndef SED_HACKS
18148 : if ( bLocalUseExceptions ) {
18149 : CPLErr eclass = CPLGetLastErrorType();
18150 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18151 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18152 : }
18153 : }
18154 : #endif
18155 : }
18156 1 : resultobj = SWIG_From_int(static_cast< int >(result));
18157 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18158 : return resultobj;
18159 : fail:
18160 : return NULL;
18161 : }
18162 :
18163 :
18164 1 : SWIGINTERN PyObject *_wrap_CRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18165 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18166 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18167 1 : void *argp1 = 0 ;
18168 1 : int res1 = 0 ;
18169 1 : PyObject *swig_obj[1] ;
18170 1 : bool result;
18171 :
18172 1 : if (!args) SWIG_fail;
18173 1 : swig_obj[0] = args;
18174 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18175 1 : if (!SWIG_IsOK(res1)) {
18176 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18177 : }
18178 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18179 1 : {
18180 1 : const int bLocalUseExceptions = GetUseExceptions();
18181 1 : if ( bLocalUseExceptions ) {
18182 1 : pushErrorHandler();
18183 : }
18184 1 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
18185 1 : if ( bLocalUseExceptions ) {
18186 1 : popErrorHandler();
18187 : }
18188 : #ifndef SED_HACKS
18189 : if ( bLocalUseExceptions ) {
18190 : CPLErr eclass = CPLGetLastErrorType();
18191 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18192 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18193 : }
18194 : }
18195 : #endif
18196 : }
18197 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18198 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18199 : return resultobj;
18200 : fail:
18201 : return NULL;
18202 : }
18203 :
18204 :
18205 1 : SWIGINTERN PyObject *_wrap_CRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18206 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18207 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18208 1 : void *argp1 = 0 ;
18209 1 : int res1 = 0 ;
18210 1 : PyObject *swig_obj[1] ;
18211 1 : bool result;
18212 :
18213 1 : if (!args) SWIG_fail;
18214 1 : swig_obj[0] = args;
18215 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18216 1 : if (!SWIG_IsOK(res1)) {
18217 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18218 : }
18219 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18220 1 : {
18221 1 : const int bLocalUseExceptions = GetUseExceptions();
18222 1 : if ( bLocalUseExceptions ) {
18223 1 : pushErrorHandler();
18224 : }
18225 1 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
18226 1 : if ( bLocalUseExceptions ) {
18227 1 : popErrorHandler();
18228 : }
18229 : #ifndef SED_HACKS
18230 : if ( bLocalUseExceptions ) {
18231 : CPLErr eclass = CPLGetLastErrorType();
18232 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18233 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18234 : }
18235 : }
18236 : #endif
18237 : }
18238 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18239 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18240 : return resultobj;
18241 : fail:
18242 : return NULL;
18243 : }
18244 :
18245 :
18246 1 : SWIGINTERN PyObject *_wrap_CRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18247 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18248 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18249 1 : void *argp1 = 0 ;
18250 1 : int res1 = 0 ;
18251 1 : PyObject *swig_obj[1] ;
18252 1 : double result;
18253 :
18254 1 : if (!args) SWIG_fail;
18255 1 : swig_obj[0] = args;
18256 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18257 1 : if (!SWIG_IsOK(res1)) {
18258 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18259 : }
18260 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18261 1 : {
18262 1 : const int bLocalUseExceptions = GetUseExceptions();
18263 1 : if ( bLocalUseExceptions ) {
18264 1 : pushErrorHandler();
18265 : }
18266 1 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
18267 1 : if ( bLocalUseExceptions ) {
18268 1 : popErrorHandler();
18269 : }
18270 : #ifndef SED_HACKS
18271 : if ( bLocalUseExceptions ) {
18272 : CPLErr eclass = CPLGetLastErrorType();
18273 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18274 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18275 : }
18276 : }
18277 : #endif
18278 : }
18279 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18280 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18281 : return resultobj;
18282 : fail:
18283 : return NULL;
18284 : }
18285 :
18286 :
18287 1 : SWIGINTERN PyObject *_wrap_CRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18288 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18289 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18290 1 : void *argp1 = 0 ;
18291 1 : int res1 = 0 ;
18292 1 : PyObject *swig_obj[1] ;
18293 1 : double result;
18294 :
18295 1 : if (!args) SWIG_fail;
18296 1 : swig_obj[0] = args;
18297 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18298 1 : if (!SWIG_IsOK(res1)) {
18299 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18300 : }
18301 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18302 1 : {
18303 1 : const int bLocalUseExceptions = GetUseExceptions();
18304 1 : if ( bLocalUseExceptions ) {
18305 1 : pushErrorHandler();
18306 : }
18307 1 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
18308 1 : if ( bLocalUseExceptions ) {
18309 1 : popErrorHandler();
18310 : }
18311 : #ifndef SED_HACKS
18312 : if ( bLocalUseExceptions ) {
18313 : CPLErr eclass = CPLGetLastErrorType();
18314 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18315 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18316 : }
18317 : }
18318 : #endif
18319 : }
18320 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18321 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18322 : return resultobj;
18323 : fail:
18324 : return NULL;
18325 : }
18326 :
18327 :
18328 1 : SWIGINTERN PyObject *_wrap_CRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18329 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18330 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18331 1 : void *argp1 = 0 ;
18332 1 : int res1 = 0 ;
18333 1 : PyObject *swig_obj[1] ;
18334 1 : double result;
18335 :
18336 1 : if (!args) SWIG_fail;
18337 1 : swig_obj[0] = args;
18338 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18339 1 : if (!SWIG_IsOK(res1)) {
18340 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18341 : }
18342 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18343 1 : {
18344 1 : const int bLocalUseExceptions = GetUseExceptions();
18345 1 : if ( bLocalUseExceptions ) {
18346 1 : pushErrorHandler();
18347 : }
18348 1 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
18349 1 : if ( bLocalUseExceptions ) {
18350 1 : popErrorHandler();
18351 : }
18352 : #ifndef SED_HACKS
18353 : if ( bLocalUseExceptions ) {
18354 : CPLErr eclass = CPLGetLastErrorType();
18355 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18356 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18357 : }
18358 : }
18359 : #endif
18360 : }
18361 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18362 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18363 : return resultobj;
18364 : fail:
18365 : return NULL;
18366 : }
18367 :
18368 :
18369 1 : SWIGINTERN PyObject *_wrap_CRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18370 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18371 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18372 1 : void *argp1 = 0 ;
18373 1 : int res1 = 0 ;
18374 1 : PyObject *swig_obj[1] ;
18375 1 : double result;
18376 :
18377 1 : if (!args) SWIG_fail;
18378 1 : swig_obj[0] = args;
18379 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18380 1 : if (!SWIG_IsOK(res1)) {
18381 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18382 : }
18383 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18384 1 : {
18385 1 : const int bLocalUseExceptions = GetUseExceptions();
18386 1 : if ( bLocalUseExceptions ) {
18387 1 : pushErrorHandler();
18388 : }
18389 1 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
18390 1 : if ( bLocalUseExceptions ) {
18391 1 : popErrorHandler();
18392 : }
18393 : #ifndef SED_HACKS
18394 : if ( bLocalUseExceptions ) {
18395 : CPLErr eclass = CPLGetLastErrorType();
18396 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18397 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18398 : }
18399 : }
18400 : #endif
18401 : }
18402 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18403 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18404 : return resultobj;
18405 : fail:
18406 : return NULL;
18407 : }
18408 :
18409 :
18410 1 : SWIGINTERN PyObject *_wrap_CRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18411 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18412 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18413 1 : void *argp1 = 0 ;
18414 1 : int res1 = 0 ;
18415 1 : PyObject *swig_obj[1] ;
18416 1 : char *result = 0 ;
18417 :
18418 1 : if (!args) SWIG_fail;
18419 1 : swig_obj[0] = args;
18420 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18421 1 : if (!SWIG_IsOK(res1)) {
18422 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18423 : }
18424 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18425 1 : {
18426 1 : const int bLocalUseExceptions = GetUseExceptions();
18427 1 : if ( bLocalUseExceptions ) {
18428 1 : pushErrorHandler();
18429 : }
18430 1 : result = (char *)OSRCRSInfo_area_name_get(arg1);
18431 1 : if ( bLocalUseExceptions ) {
18432 1 : popErrorHandler();
18433 : }
18434 : #ifndef SED_HACKS
18435 : if ( bLocalUseExceptions ) {
18436 : CPLErr eclass = CPLGetLastErrorType();
18437 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18438 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18439 : }
18440 : }
18441 : #endif
18442 : }
18443 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18444 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18445 : return resultobj;
18446 : fail:
18447 : return NULL;
18448 : }
18449 :
18450 :
18451 1 : SWIGINTERN PyObject *_wrap_CRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18452 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18453 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18454 1 : void *argp1 = 0 ;
18455 1 : int res1 = 0 ;
18456 1 : PyObject *swig_obj[1] ;
18457 1 : char *result = 0 ;
18458 :
18459 1 : if (!args) SWIG_fail;
18460 1 : swig_obj[0] = args;
18461 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18462 1 : if (!SWIG_IsOK(res1)) {
18463 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18464 : }
18465 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18466 1 : {
18467 1 : const int bLocalUseExceptions = GetUseExceptions();
18468 1 : if ( bLocalUseExceptions ) {
18469 1 : pushErrorHandler();
18470 : }
18471 1 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
18472 1 : if ( bLocalUseExceptions ) {
18473 1 : popErrorHandler();
18474 : }
18475 : #ifndef SED_HACKS
18476 : if ( bLocalUseExceptions ) {
18477 : CPLErr eclass = CPLGetLastErrorType();
18478 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18479 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18480 : }
18481 : }
18482 : #endif
18483 : }
18484 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18485 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18486 : return resultobj;
18487 : fail:
18488 : return NULL;
18489 : }
18490 :
18491 :
18492 0 : SWIGINTERN PyObject *_wrap_new_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18493 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18494 0 : char *arg1 = (char *) 0 ;
18495 0 : char *arg2 = (char *) 0 ;
18496 0 : char *arg3 = (char *) 0 ;
18497 0 : OSRCRSType arg4 ;
18498 0 : bool arg5 ;
18499 0 : bool arg6 ;
18500 0 : double arg7 ;
18501 0 : double arg8 ;
18502 0 : double arg9 ;
18503 0 : double arg10 ;
18504 0 : char *arg11 = (char *) 0 ;
18505 0 : char *arg12 = (char *) 0 ;
18506 0 : int res1 ;
18507 0 : char *buf1 = 0 ;
18508 0 : int alloc1 = 0 ;
18509 0 : int res2 ;
18510 0 : char *buf2 = 0 ;
18511 0 : int alloc2 = 0 ;
18512 0 : int res3 ;
18513 0 : char *buf3 = 0 ;
18514 0 : int alloc3 = 0 ;
18515 0 : int val4 ;
18516 0 : int ecode4 = 0 ;
18517 0 : bool val5 ;
18518 0 : int ecode5 = 0 ;
18519 0 : bool val6 ;
18520 0 : int ecode6 = 0 ;
18521 0 : double val7 ;
18522 0 : int ecode7 = 0 ;
18523 0 : double val8 ;
18524 0 : int ecode8 = 0 ;
18525 0 : double val9 ;
18526 0 : int ecode9 = 0 ;
18527 0 : double val10 ;
18528 0 : int ecode10 = 0 ;
18529 0 : int res11 ;
18530 0 : char *buf11 = 0 ;
18531 0 : int alloc11 = 0 ;
18532 0 : int res12 ;
18533 0 : char *buf12 = 0 ;
18534 0 : int alloc12 = 0 ;
18535 0 : PyObject *swig_obj[12] ;
18536 0 : OSRCRSInfo *result = 0 ;
18537 :
18538 0 : if (!SWIG_Python_UnpackTuple(args, "new_CRSInfo", 12, 12, swig_obj)) SWIG_fail;
18539 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
18540 0 : if (!SWIG_IsOK(res1)) {
18541 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CRSInfo" "', argument " "1"" of type '" "char const *""'");
18542 : }
18543 0 : arg1 = reinterpret_cast< char * >(buf1);
18544 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
18545 0 : if (!SWIG_IsOK(res2)) {
18546 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CRSInfo" "', argument " "2"" of type '" "char const *""'");
18547 : }
18548 0 : arg2 = reinterpret_cast< char * >(buf2);
18549 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
18550 0 : if (!SWIG_IsOK(res3)) {
18551 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CRSInfo" "', argument " "3"" of type '" "char const *""'");
18552 : }
18553 0 : arg3 = reinterpret_cast< char * >(buf3);
18554 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
18555 0 : if (!SWIG_IsOK(ecode4)) {
18556 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CRSInfo" "', argument " "4"" of type '" "OSRCRSType""'");
18557 : }
18558 0 : arg4 = static_cast< OSRCRSType >(val4);
18559 0 : ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5);
18560 0 : if (!SWIG_IsOK(ecode5)) {
18561 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CRSInfo" "', argument " "5"" of type '" "bool""'");
18562 : }
18563 0 : arg5 = static_cast< bool >(val5);
18564 0 : ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
18565 0 : if (!SWIG_IsOK(ecode6)) {
18566 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CRSInfo" "', argument " "6"" of type '" "bool""'");
18567 : }
18568 0 : arg6 = static_cast< bool >(val6);
18569 0 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
18570 0 : if (!SWIG_IsOK(ecode7)) {
18571 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CRSInfo" "', argument " "7"" of type '" "double""'");
18572 : }
18573 0 : arg7 = static_cast< double >(val7);
18574 0 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
18575 0 : if (!SWIG_IsOK(ecode8)) {
18576 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CRSInfo" "', argument " "8"" of type '" "double""'");
18577 : }
18578 0 : arg8 = static_cast< double >(val8);
18579 0 : ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
18580 0 : if (!SWIG_IsOK(ecode9)) {
18581 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CRSInfo" "', argument " "9"" of type '" "double""'");
18582 : }
18583 0 : arg9 = static_cast< double >(val9);
18584 0 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
18585 0 : if (!SWIG_IsOK(ecode10)) {
18586 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CRSInfo" "', argument " "10"" of type '" "double""'");
18587 : }
18588 0 : arg10 = static_cast< double >(val10);
18589 0 : res11 = SWIG_AsCharPtrAndSize(swig_obj[10], &buf11, NULL, &alloc11);
18590 0 : if (!SWIG_IsOK(res11)) {
18591 0 : SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CRSInfo" "', argument " "11"" of type '" "char const *""'");
18592 : }
18593 0 : arg11 = reinterpret_cast< char * >(buf11);
18594 0 : res12 = SWIG_AsCharPtrAndSize(swig_obj[11], &buf12, NULL, &alloc12);
18595 0 : if (!SWIG_IsOK(res12)) {
18596 0 : SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CRSInfo" "', argument " "12"" of type '" "char const *""'");
18597 : }
18598 0 : arg12 = reinterpret_cast< char * >(buf12);
18599 0 : {
18600 0 : if (!arg3) {
18601 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18602 : }
18603 : }
18604 0 : {
18605 0 : const int bLocalUseExceptions = GetUseExceptions();
18606 0 : if ( bLocalUseExceptions ) {
18607 0 : pushErrorHandler();
18608 : }
18609 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);
18610 0 : if ( bLocalUseExceptions ) {
18611 0 : popErrorHandler();
18612 : }
18613 : #ifndef SED_HACKS
18614 : if ( bLocalUseExceptions ) {
18615 : CPLErr eclass = CPLGetLastErrorType();
18616 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18617 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18618 : }
18619 : }
18620 : #endif
18621 : }
18622 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_NEW | 0 );
18623 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18624 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18625 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18626 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18627 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18628 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18629 : return resultobj;
18630 0 : fail:
18631 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18632 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18633 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18634 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18635 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18636 : return NULL;
18637 : }
18638 :
18639 :
18640 6609 : SWIGINTERN PyObject *_wrap_delete_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18641 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18642 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18643 6609 : void *argp1 = 0 ;
18644 6609 : int res1 = 0 ;
18645 6609 : PyObject *swig_obj[1] ;
18646 :
18647 6609 : if (!args) SWIG_fail;
18648 6609 : swig_obj[0] = args;
18649 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_DISOWN | 0 );
18650 6609 : if (!SWIG_IsOK(res1)) {
18651 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRSInfo" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18652 : }
18653 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18654 6609 : {
18655 6609 : const int bLocalUseExceptions = GetUseExceptions();
18656 6609 : if ( bLocalUseExceptions ) {
18657 6609 : pushErrorHandler();
18658 : }
18659 6609 : delete_OSRCRSInfo(arg1);
18660 6609 : if ( bLocalUseExceptions ) {
18661 6609 : popErrorHandler();
18662 : }
18663 : #ifndef SED_HACKS
18664 : if ( bLocalUseExceptions ) {
18665 : CPLErr eclass = CPLGetLastErrorType();
18666 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18667 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18668 : }
18669 : }
18670 : #endif
18671 : }
18672 6609 : resultobj = SWIG_Py_Void();
18673 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18674 : return resultobj;
18675 : fail:
18676 : return NULL;
18677 : }
18678 :
18679 :
18680 271 : SWIGINTERN PyObject *CRSInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18681 271 : PyObject *obj;
18682 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18683 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCRSInfo, SWIG_NewClientData(obj));
18684 271 : return SWIG_Py_Void();
18685 : }
18686 :
18687 0 : SWIGINTERN PyObject *CRSInfo_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18688 0 : return SWIG_Python_InitShadowInstance(args);
18689 : }
18690 :
18691 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18692 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18693 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18694 0 : void *argp1 = 0 ;
18695 0 : int res1 = 0 ;
18696 0 : PyObject *swig_obj[1] ;
18697 0 : char *result = 0 ;
18698 :
18699 0 : if (!args) SWIG_fail;
18700 0 : swig_obj[0] = args;
18701 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18702 0 : if (!SWIG_IsOK(res1)) {
18703 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18704 : }
18705 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18706 0 : {
18707 0 : if (!arg1) {
18708 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18709 : }
18710 : }
18711 0 : {
18712 0 : const int bLocalUseExceptions = GetUseExceptions();
18713 0 : if ( bLocalUseExceptions ) {
18714 0 : pushErrorHandler();
18715 : }
18716 0 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18717 0 : if ( bLocalUseExceptions ) {
18718 0 : popErrorHandler();
18719 : }
18720 : #ifndef SED_HACKS
18721 : if ( bLocalUseExceptions ) {
18722 : CPLErr eclass = CPLGetLastErrorType();
18723 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18724 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18725 : }
18726 : }
18727 : #endif
18728 : }
18729 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18730 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18731 : return resultobj;
18732 : fail:
18733 : return NULL;
18734 : }
18735 :
18736 :
18737 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18738 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18739 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18740 0 : void *argp1 = 0 ;
18741 0 : int res1 = 0 ;
18742 0 : PyObject *swig_obj[1] ;
18743 0 : char *result = 0 ;
18744 :
18745 0 : if (!args) SWIG_fail;
18746 0 : swig_obj[0] = args;
18747 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18748 0 : if (!SWIG_IsOK(res1)) {
18749 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18750 : }
18751 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18752 0 : {
18753 0 : if (!arg1) {
18754 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18755 : }
18756 : }
18757 0 : {
18758 0 : const int bLocalUseExceptions = GetUseExceptions();
18759 0 : if ( bLocalUseExceptions ) {
18760 0 : pushErrorHandler();
18761 : }
18762 0 : result = (char *)OSRCRSInfo_code_get(arg1);
18763 0 : if ( bLocalUseExceptions ) {
18764 0 : popErrorHandler();
18765 : }
18766 : #ifndef SED_HACKS
18767 : if ( bLocalUseExceptions ) {
18768 : CPLErr eclass = CPLGetLastErrorType();
18769 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18770 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18771 : }
18772 : }
18773 : #endif
18774 : }
18775 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18776 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18777 : return resultobj;
18778 : fail:
18779 : return NULL;
18780 : }
18781 :
18782 :
18783 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18784 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18785 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18786 0 : void *argp1 = 0 ;
18787 0 : int res1 = 0 ;
18788 0 : PyObject *swig_obj[1] ;
18789 0 : char *result = 0 ;
18790 :
18791 0 : if (!args) SWIG_fail;
18792 0 : swig_obj[0] = args;
18793 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18794 0 : if (!SWIG_IsOK(res1)) {
18795 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18796 : }
18797 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18798 0 : {
18799 0 : if (!arg1) {
18800 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18801 : }
18802 : }
18803 0 : {
18804 0 : const int bLocalUseExceptions = GetUseExceptions();
18805 0 : if ( bLocalUseExceptions ) {
18806 0 : pushErrorHandler();
18807 : }
18808 0 : result = (char *)OSRCRSInfo_name_get(arg1);
18809 0 : if ( bLocalUseExceptions ) {
18810 0 : popErrorHandler();
18811 : }
18812 : #ifndef SED_HACKS
18813 : if ( bLocalUseExceptions ) {
18814 : CPLErr eclass = CPLGetLastErrorType();
18815 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18816 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18817 : }
18818 : }
18819 : #endif
18820 : }
18821 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18822 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18823 : return resultobj;
18824 : fail:
18825 : return NULL;
18826 : }
18827 :
18828 :
18829 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18830 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18831 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18832 0 : void *argp1 = 0 ;
18833 0 : int res1 = 0 ;
18834 0 : PyObject *swig_obj[1] ;
18835 0 : OSRCRSType result;
18836 :
18837 0 : if (!args) SWIG_fail;
18838 0 : swig_obj[0] = args;
18839 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18840 0 : if (!SWIG_IsOK(res1)) {
18841 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18842 : }
18843 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18844 0 : {
18845 0 : if (!arg1) {
18846 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18847 : }
18848 : }
18849 0 : {
18850 0 : const int bLocalUseExceptions = GetUseExceptions();
18851 0 : if ( bLocalUseExceptions ) {
18852 0 : pushErrorHandler();
18853 : }
18854 0 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
18855 0 : if ( bLocalUseExceptions ) {
18856 0 : popErrorHandler();
18857 : }
18858 : #ifndef SED_HACKS
18859 : if ( bLocalUseExceptions ) {
18860 : CPLErr eclass = CPLGetLastErrorType();
18861 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18862 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18863 : }
18864 : }
18865 : #endif
18866 : }
18867 0 : resultobj = SWIG_From_int(static_cast< int >(result));
18868 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18869 : return resultobj;
18870 : fail:
18871 : return NULL;
18872 : }
18873 :
18874 :
18875 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18876 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18877 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18878 0 : void *argp1 = 0 ;
18879 0 : int res1 = 0 ;
18880 0 : PyObject *swig_obj[1] ;
18881 0 : bool result;
18882 :
18883 0 : if (!args) SWIG_fail;
18884 0 : swig_obj[0] = args;
18885 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18886 0 : if (!SWIG_IsOK(res1)) {
18887 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18888 : }
18889 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18890 0 : {
18891 0 : if (!arg1) {
18892 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18893 : }
18894 : }
18895 0 : {
18896 0 : const int bLocalUseExceptions = GetUseExceptions();
18897 0 : if ( bLocalUseExceptions ) {
18898 0 : pushErrorHandler();
18899 : }
18900 0 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
18901 0 : if ( bLocalUseExceptions ) {
18902 0 : popErrorHandler();
18903 : }
18904 : #ifndef SED_HACKS
18905 : if ( bLocalUseExceptions ) {
18906 : CPLErr eclass = CPLGetLastErrorType();
18907 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18908 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18909 : }
18910 : }
18911 : #endif
18912 : }
18913 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18914 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18915 : return resultobj;
18916 : fail:
18917 : return NULL;
18918 : }
18919 :
18920 :
18921 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18922 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18923 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18924 0 : void *argp1 = 0 ;
18925 0 : int res1 = 0 ;
18926 0 : PyObject *swig_obj[1] ;
18927 0 : bool result;
18928 :
18929 0 : if (!args) SWIG_fail;
18930 0 : swig_obj[0] = args;
18931 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18932 0 : if (!SWIG_IsOK(res1)) {
18933 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18934 : }
18935 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18936 0 : {
18937 0 : if (!arg1) {
18938 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18939 : }
18940 : }
18941 0 : {
18942 0 : const int bLocalUseExceptions = GetUseExceptions();
18943 0 : if ( bLocalUseExceptions ) {
18944 0 : pushErrorHandler();
18945 : }
18946 0 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
18947 0 : if ( bLocalUseExceptions ) {
18948 0 : popErrorHandler();
18949 : }
18950 : #ifndef SED_HACKS
18951 : if ( bLocalUseExceptions ) {
18952 : CPLErr eclass = CPLGetLastErrorType();
18953 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18954 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18955 : }
18956 : }
18957 : #endif
18958 : }
18959 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18960 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18961 : return resultobj;
18962 : fail:
18963 : return NULL;
18964 : }
18965 :
18966 :
18967 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18968 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18969 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18970 0 : void *argp1 = 0 ;
18971 0 : int res1 = 0 ;
18972 0 : PyObject *swig_obj[1] ;
18973 0 : double result;
18974 :
18975 0 : if (!args) SWIG_fail;
18976 0 : swig_obj[0] = args;
18977 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18978 0 : if (!SWIG_IsOK(res1)) {
18979 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18980 : }
18981 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18982 0 : {
18983 0 : if (!arg1) {
18984 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18985 : }
18986 : }
18987 0 : {
18988 0 : const int bLocalUseExceptions = GetUseExceptions();
18989 0 : if ( bLocalUseExceptions ) {
18990 0 : pushErrorHandler();
18991 : }
18992 0 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
18993 0 : if ( bLocalUseExceptions ) {
18994 0 : popErrorHandler();
18995 : }
18996 : #ifndef SED_HACKS
18997 : if ( bLocalUseExceptions ) {
18998 : CPLErr eclass = CPLGetLastErrorType();
18999 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19000 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19001 : }
19002 : }
19003 : #endif
19004 : }
19005 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19006 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19007 : return resultobj;
19008 : fail:
19009 : return NULL;
19010 : }
19011 :
19012 :
19013 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19014 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19015 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19016 0 : void *argp1 = 0 ;
19017 0 : int res1 = 0 ;
19018 0 : PyObject *swig_obj[1] ;
19019 0 : double result;
19020 :
19021 0 : if (!args) SWIG_fail;
19022 0 : swig_obj[0] = args;
19023 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19024 0 : if (!SWIG_IsOK(res1)) {
19025 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19026 : }
19027 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19028 0 : {
19029 0 : if (!arg1) {
19030 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19031 : }
19032 : }
19033 0 : {
19034 0 : const int bLocalUseExceptions = GetUseExceptions();
19035 0 : if ( bLocalUseExceptions ) {
19036 0 : pushErrorHandler();
19037 : }
19038 0 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
19039 0 : if ( bLocalUseExceptions ) {
19040 0 : popErrorHandler();
19041 : }
19042 : #ifndef SED_HACKS
19043 : if ( bLocalUseExceptions ) {
19044 : CPLErr eclass = CPLGetLastErrorType();
19045 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19046 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19047 : }
19048 : }
19049 : #endif
19050 : }
19051 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19052 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19053 : return resultobj;
19054 : fail:
19055 : return NULL;
19056 : }
19057 :
19058 :
19059 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19060 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19061 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19062 0 : void *argp1 = 0 ;
19063 0 : int res1 = 0 ;
19064 0 : PyObject *swig_obj[1] ;
19065 0 : double result;
19066 :
19067 0 : if (!args) SWIG_fail;
19068 0 : swig_obj[0] = args;
19069 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19070 0 : if (!SWIG_IsOK(res1)) {
19071 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19072 : }
19073 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19074 0 : {
19075 0 : if (!arg1) {
19076 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19077 : }
19078 : }
19079 0 : {
19080 0 : const int bLocalUseExceptions = GetUseExceptions();
19081 0 : if ( bLocalUseExceptions ) {
19082 0 : pushErrorHandler();
19083 : }
19084 0 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
19085 0 : if ( bLocalUseExceptions ) {
19086 0 : popErrorHandler();
19087 : }
19088 : #ifndef SED_HACKS
19089 : if ( bLocalUseExceptions ) {
19090 : CPLErr eclass = CPLGetLastErrorType();
19091 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19092 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19093 : }
19094 : }
19095 : #endif
19096 : }
19097 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19098 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19099 : return resultobj;
19100 : fail:
19101 : return NULL;
19102 : }
19103 :
19104 :
19105 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19106 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19107 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19108 0 : void *argp1 = 0 ;
19109 0 : int res1 = 0 ;
19110 0 : PyObject *swig_obj[1] ;
19111 0 : double result;
19112 :
19113 0 : if (!args) SWIG_fail;
19114 0 : swig_obj[0] = args;
19115 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19116 0 : if (!SWIG_IsOK(res1)) {
19117 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19118 : }
19119 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19120 0 : {
19121 0 : if (!arg1) {
19122 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19123 : }
19124 : }
19125 0 : {
19126 0 : const int bLocalUseExceptions = GetUseExceptions();
19127 0 : if ( bLocalUseExceptions ) {
19128 0 : pushErrorHandler();
19129 : }
19130 0 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
19131 0 : if ( bLocalUseExceptions ) {
19132 0 : popErrorHandler();
19133 : }
19134 : #ifndef SED_HACKS
19135 : if ( bLocalUseExceptions ) {
19136 : CPLErr eclass = CPLGetLastErrorType();
19137 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19138 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19139 : }
19140 : }
19141 : #endif
19142 : }
19143 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19144 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19145 : return resultobj;
19146 : fail:
19147 : return NULL;
19148 : }
19149 :
19150 :
19151 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19152 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19153 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19154 0 : void *argp1 = 0 ;
19155 0 : int res1 = 0 ;
19156 0 : PyObject *swig_obj[1] ;
19157 0 : char *result = 0 ;
19158 :
19159 0 : if (!args) SWIG_fail;
19160 0 : swig_obj[0] = args;
19161 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19162 0 : if (!SWIG_IsOK(res1)) {
19163 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19164 : }
19165 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19166 0 : {
19167 0 : if (!arg1) {
19168 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19169 : }
19170 : }
19171 0 : {
19172 0 : const int bLocalUseExceptions = GetUseExceptions();
19173 0 : if ( bLocalUseExceptions ) {
19174 0 : pushErrorHandler();
19175 : }
19176 0 : result = (char *)OSRCRSInfo_area_name_get(arg1);
19177 0 : if ( bLocalUseExceptions ) {
19178 0 : popErrorHandler();
19179 : }
19180 : #ifndef SED_HACKS
19181 : if ( bLocalUseExceptions ) {
19182 : CPLErr eclass = CPLGetLastErrorType();
19183 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19184 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19185 : }
19186 : }
19187 : #endif
19188 : }
19189 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19190 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19191 : return resultobj;
19192 : fail:
19193 : return NULL;
19194 : }
19195 :
19196 :
19197 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19198 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19199 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19200 0 : void *argp1 = 0 ;
19201 0 : int res1 = 0 ;
19202 0 : PyObject *swig_obj[1] ;
19203 0 : char *result = 0 ;
19204 :
19205 0 : if (!args) SWIG_fail;
19206 0 : swig_obj[0] = args;
19207 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19208 0 : if (!SWIG_IsOK(res1)) {
19209 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19210 : }
19211 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19212 0 : {
19213 0 : if (!arg1) {
19214 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19215 : }
19216 : }
19217 0 : {
19218 0 : const int bLocalUseExceptions = GetUseExceptions();
19219 0 : if ( bLocalUseExceptions ) {
19220 0 : pushErrorHandler();
19221 : }
19222 0 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
19223 0 : if ( bLocalUseExceptions ) {
19224 0 : popErrorHandler();
19225 : }
19226 : #ifndef SED_HACKS
19227 : if ( bLocalUseExceptions ) {
19228 : CPLErr eclass = CPLGetLastErrorType();
19229 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19230 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19231 : }
19232 : }
19233 : #endif
19234 : }
19235 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19236 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19237 : return resultobj;
19238 : fail:
19239 : return NULL;
19240 : }
19241 :
19242 :
19243 1 : SWIGINTERN PyObject *_wrap_GetCRSInfoListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19244 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19245 1 : char *arg1 = (char *) 0 ;
19246 1 : OSRCRSInfo ***arg2 = (OSRCRSInfo ***) 0 ;
19247 1 : int *arg3 = (int *) 0 ;
19248 1 : int res1 ;
19249 1 : char *buf1 = 0 ;
19250 1 : int alloc1 = 0 ;
19251 1 : OSRCRSInfo **list2 = 0 ;
19252 1 : int count2 = 0 ;
19253 1 : PyObject *swig_obj[1] ;
19254 :
19255 1 : {
19256 : /* %typemap(in,numinputs=0) (OSRCRSInfo*** pList, int* pnListCount) */
19257 1 : arg2 = &list2;
19258 1 : arg3 = &count2;
19259 : }
19260 1 : if (!args) SWIG_fail;
19261 1 : swig_obj[0] = args;
19262 1 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
19263 1 : if (!SWIG_IsOK(res1)) {
19264 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCRSInfoListFromDatabase" "', argument " "1"" of type '" "char const *""'");
19265 : }
19266 1 : arg1 = reinterpret_cast< char * >(buf1);
19267 1 : {
19268 1 : const int bLocalUseExceptions = GetUseExceptions();
19269 1 : if ( bLocalUseExceptions ) {
19270 1 : pushErrorHandler();
19271 : }
19272 1 : GetCRSInfoListFromDatabase((char const *)arg1,arg2,arg3);
19273 1 : if ( bLocalUseExceptions ) {
19274 1 : popErrorHandler();
19275 : }
19276 : #ifndef SED_HACKS
19277 : if ( bLocalUseExceptions ) {
19278 : CPLErr eclass = CPLGetLastErrorType();
19279 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19280 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19281 : }
19282 : }
19283 : #endif
19284 : }
19285 1 : resultobj = SWIG_Py_Void();
19286 1 : {
19287 : /* %typemap(argout) (OSRCRSInfo*** pList, int* pnListCount) */
19288 1 : PyObject *dict = PyTuple_New( *arg3 );
19289 6610 : for( int i = 0; i < *arg3; i++ ) {
19290 13218 : OSRCRSInfo *o = new_OSRCRSInfo( (*arg2)[i]->pszAuthName,
19291 6609 : (*arg2)[i]->pszCode,
19292 6609 : (*arg2)[i]->pszName,
19293 : (*arg2)[i]->eType,
19294 6609 : (*arg2)[i]->bDeprecated,
19295 6609 : (*arg2)[i]->bBboxValid,
19296 : (*arg2)[i]->dfWestLongitudeDeg,
19297 : (*arg2)[i]->dfSouthLatitudeDeg,
19298 : (*arg2)[i]->dfEastLongitudeDeg,
19299 : (*arg2)[i]->dfNorthLatitudeDeg,
19300 6609 : (*arg2)[i]->pszAreaName,
19301 6609 : (*arg2)[i]->pszProjectionMethod );
19302 :
19303 6609 : PyTuple_SetItem(dict, i,
19304 : SWIG_NewPointerObj((void*)o,SWIGTYPE_p_OSRCRSInfo,1) );
19305 : }
19306 1 : Py_DECREF(resultobj);
19307 1 : resultobj = dict;
19308 : }
19309 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19310 1 : {
19311 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19312 1 : OSRDestroyCRSInfoList( *(arg2) );
19313 : }
19314 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19315 : return resultobj;
19316 0 : fail:
19317 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19318 0 : {
19319 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19320 0 : OSRDestroyCRSInfoList( *(arg2) );
19321 : }
19322 : return NULL;
19323 : }
19324 :
19325 :
19326 1 : SWIGINTERN PyObject *_wrap_SetPROJSearchPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19327 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19328 1 : char *arg1 = (char *) 0 ;
19329 1 : int bToFree1 = 0 ;
19330 1 : PyObject *swig_obj[1] ;
19331 :
19332 1 : if (!args) SWIG_fail;
19333 1 : swig_obj[0] = args;
19334 1 : {
19335 : /* %typemap(in) (const char *utf8_path) */
19336 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19337 : {
19338 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19339 : }
19340 : else
19341 : {
19342 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19343 :
19344 : }
19345 1 : if (arg1 == NULL)
19346 : {
19347 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19348 0 : SWIG_fail;
19349 : }
19350 : }
19351 1 : {
19352 1 : const int bLocalUseExceptions = GetUseExceptions();
19353 1 : if ( bLocalUseExceptions ) {
19354 1 : pushErrorHandler();
19355 : }
19356 1 : SetPROJSearchPath((char const *)arg1);
19357 1 : if ( bLocalUseExceptions ) {
19358 1 : popErrorHandler();
19359 : }
19360 : #ifndef SED_HACKS
19361 : if ( bLocalUseExceptions ) {
19362 : CPLErr eclass = CPLGetLastErrorType();
19363 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19364 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19365 : }
19366 : }
19367 : #endif
19368 : }
19369 1 : resultobj = SWIG_Py_Void();
19370 1 : {
19371 : /* %typemap(freearg) (const char *utf8_path) */
19372 1 : GDALPythonFreeCStr(arg1, bToFree1);
19373 : }
19374 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19375 : return resultobj;
19376 0 : fail:
19377 0 : {
19378 : /* %typemap(freearg) (const char *utf8_path) */
19379 0 : GDALPythonFreeCStr(arg1, bToFree1);
19380 : }
19381 : return NULL;
19382 : }
19383 :
19384 :
19385 16 : SWIGINTERN PyObject *_wrap_SetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19386 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19387 16 : char **arg1 = (char **) 0 ;
19388 16 : PyObject *swig_obj[1] ;
19389 :
19390 16 : if (!args) SWIG_fail;
19391 16 : swig_obj[0] = args;
19392 16 : {
19393 : /* %typemap(in) char **dict */
19394 16 : arg1 = NULL;
19395 16 : if ( PySequence_Check( swig_obj[0] ) ) {
19396 16 : int bErr = FALSE;
19397 16 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
19398 16 : if ( bErr )
19399 : {
19400 0 : SWIG_fail;
19401 : }
19402 : }
19403 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
19404 0 : int bErr = FALSE;
19405 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
19406 0 : if ( bErr )
19407 : {
19408 0 : SWIG_fail;
19409 : }
19410 : }
19411 : else {
19412 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19413 0 : SWIG_fail;
19414 : }
19415 : }
19416 16 : {
19417 16 : const int bLocalUseExceptions = GetUseExceptions();
19418 16 : if ( bLocalUseExceptions ) {
19419 16 : pushErrorHandler();
19420 : }
19421 16 : SetPROJSearchPaths(arg1);
19422 16 : if ( bLocalUseExceptions ) {
19423 16 : popErrorHandler();
19424 : }
19425 : #ifndef SED_HACKS
19426 : if ( bLocalUseExceptions ) {
19427 : CPLErr eclass = CPLGetLastErrorType();
19428 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19429 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19430 : }
19431 : }
19432 : #endif
19433 : }
19434 16 : resultobj = SWIG_Py_Void();
19435 16 : {
19436 : /* %typemap(freearg) char **dict */
19437 16 : CSLDestroy( arg1 );
19438 : }
19439 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19440 : return resultobj;
19441 0 : fail:
19442 0 : {
19443 : /* %typemap(freearg) char **dict */
19444 0 : CSLDestroy( arg1 );
19445 : }
19446 : return NULL;
19447 : }
19448 :
19449 :
19450 21 : SWIGINTERN PyObject *_wrap_GetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19451 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19452 21 : char **result = 0 ;
19453 :
19454 21 : if (!SWIG_Python_UnpackTuple(args, "GetPROJSearchPaths", 0, 0, 0)) SWIG_fail;
19455 21 : {
19456 21 : const int bLocalUseExceptions = GetUseExceptions();
19457 21 : if ( bLocalUseExceptions ) {
19458 21 : pushErrorHandler();
19459 : }
19460 21 : result = (char **)GetPROJSearchPaths();
19461 21 : if ( bLocalUseExceptions ) {
19462 21 : popErrorHandler();
19463 : }
19464 : #ifndef SED_HACKS
19465 : if ( bLocalUseExceptions ) {
19466 : CPLErr eclass = CPLGetLastErrorType();
19467 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19468 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19469 : }
19470 : }
19471 : #endif
19472 : }
19473 21 : {
19474 : /* %typemap(out) char **CSL -> ( string ) */
19475 21 : bool bErr = false;
19476 21 : resultobj = CSLToList(result, &bErr);
19477 21 : CSLDestroy(result);
19478 21 : if( bErr ) {
19479 0 : SWIG_fail;
19480 : }
19481 : }
19482 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19483 : return resultobj;
19484 : fail:
19485 : return NULL;
19486 : }
19487 :
19488 :
19489 69 : SWIGINTERN PyObject *_wrap_GetPROJVersionMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19490 69 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19491 69 : int result;
19492 :
19493 69 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMajor", 0, 0, 0)) SWIG_fail;
19494 69 : {
19495 69 : const int bLocalUseExceptions = GetUseExceptions();
19496 69 : if ( bLocalUseExceptions ) {
19497 62 : pushErrorHandler();
19498 : }
19499 69 : result = (int)GetPROJVersionMajor();
19500 69 : if ( bLocalUseExceptions ) {
19501 62 : popErrorHandler();
19502 : }
19503 : #ifndef SED_HACKS
19504 : if ( bLocalUseExceptions ) {
19505 : CPLErr eclass = CPLGetLastErrorType();
19506 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19507 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19508 : }
19509 : }
19510 : #endif
19511 : }
19512 69 : resultobj = SWIG_From_int(static_cast< int >(result));
19513 69 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19514 : return resultobj;
19515 0 : fail:
19516 0 : return NULL;
19517 : }
19518 :
19519 :
19520 63 : SWIGINTERN PyObject *_wrap_GetPROJVersionMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19521 63 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19522 63 : int result;
19523 :
19524 63 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMinor", 0, 0, 0)) SWIG_fail;
19525 63 : {
19526 63 : const int bLocalUseExceptions = GetUseExceptions();
19527 63 : if ( bLocalUseExceptions ) {
19528 59 : pushErrorHandler();
19529 : }
19530 63 : result = (int)GetPROJVersionMinor();
19531 63 : if ( bLocalUseExceptions ) {
19532 59 : popErrorHandler();
19533 : }
19534 : #ifndef SED_HACKS
19535 : if ( bLocalUseExceptions ) {
19536 : CPLErr eclass = CPLGetLastErrorType();
19537 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19538 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19539 : }
19540 : }
19541 : #endif
19542 : }
19543 63 : resultobj = SWIG_From_int(static_cast< int >(result));
19544 63 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19545 : return resultobj;
19546 0 : fail:
19547 0 : return NULL;
19548 : }
19549 :
19550 :
19551 48 : SWIGINTERN PyObject *_wrap_GetPROJVersionMicro(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19552 48 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19553 48 : int result;
19554 :
19555 48 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMicro", 0, 0, 0)) SWIG_fail;
19556 48 : {
19557 48 : const int bLocalUseExceptions = GetUseExceptions();
19558 48 : if ( bLocalUseExceptions ) {
19559 48 : pushErrorHandler();
19560 : }
19561 48 : result = (int)GetPROJVersionMicro();
19562 48 : if ( bLocalUseExceptions ) {
19563 48 : popErrorHandler();
19564 : }
19565 : #ifndef SED_HACKS
19566 : if ( bLocalUseExceptions ) {
19567 : CPLErr eclass = CPLGetLastErrorType();
19568 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19569 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19570 : }
19571 : }
19572 : #endif
19573 : }
19574 48 : resultobj = SWIG_From_int(static_cast< int >(result));
19575 48 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19576 : return resultobj;
19577 0 : fail:
19578 0 : return NULL;
19579 : }
19580 :
19581 :
19582 0 : SWIGINTERN PyObject *_wrap_GetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19583 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19584 0 : bool result;
19585 :
19586 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJEnableNetwork", 0, 0, 0)) SWIG_fail;
19587 0 : {
19588 0 : const int bLocalUseExceptions = GetUseExceptions();
19589 0 : if ( bLocalUseExceptions ) {
19590 0 : pushErrorHandler();
19591 : }
19592 0 : result = (bool)GetPROJEnableNetwork();
19593 0 : if ( bLocalUseExceptions ) {
19594 0 : popErrorHandler();
19595 : }
19596 : #ifndef SED_HACKS
19597 : if ( bLocalUseExceptions ) {
19598 : CPLErr eclass = CPLGetLastErrorType();
19599 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19600 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19601 : }
19602 : }
19603 : #endif
19604 : }
19605 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19606 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19607 : return resultobj;
19608 0 : fail:
19609 0 : return NULL;
19610 : }
19611 :
19612 :
19613 0 : SWIGINTERN PyObject *_wrap_SetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19614 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19615 0 : bool arg1 ;
19616 0 : bool val1 ;
19617 0 : int ecode1 = 0 ;
19618 0 : PyObject *swig_obj[1] ;
19619 :
19620 0 : if (!args) SWIG_fail;
19621 0 : swig_obj[0] = args;
19622 0 : ecode1 = SWIG_AsVal_bool(swig_obj[0], &val1);
19623 0 : if (!SWIG_IsOK(ecode1)) {
19624 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetPROJEnableNetwork" "', argument " "1"" of type '" "bool""'");
19625 : }
19626 0 : arg1 = static_cast< bool >(val1);
19627 0 : {
19628 0 : const int bLocalUseExceptions = GetUseExceptions();
19629 0 : if ( bLocalUseExceptions ) {
19630 0 : pushErrorHandler();
19631 : }
19632 0 : SetPROJEnableNetwork(arg1);
19633 0 : if ( bLocalUseExceptions ) {
19634 0 : popErrorHandler();
19635 : }
19636 : #ifndef SED_HACKS
19637 : if ( bLocalUseExceptions ) {
19638 : CPLErr eclass = CPLGetLastErrorType();
19639 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19640 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19641 : }
19642 : }
19643 : #endif
19644 : }
19645 0 : resultobj = SWIG_Py_Void();
19646 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19647 : return resultobj;
19648 : fail:
19649 : return NULL;
19650 : }
19651 :
19652 :
19653 1 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19654 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19655 1 : char *arg1 = (char *) 0 ;
19656 1 : int bToFree1 = 0 ;
19657 1 : PyObject *swig_obj[1] ;
19658 :
19659 1 : if (!args) SWIG_fail;
19660 1 : swig_obj[0] = args;
19661 1 : {
19662 : /* %typemap(in) (const char *utf8_path) */
19663 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19664 : {
19665 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19666 : }
19667 : else
19668 : {
19669 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19670 :
19671 : }
19672 1 : if (arg1 == NULL)
19673 : {
19674 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19675 0 : SWIG_fail;
19676 : }
19677 : }
19678 1 : {
19679 1 : const int bLocalUseExceptions = GetUseExceptions();
19680 1 : if ( bLocalUseExceptions ) {
19681 1 : pushErrorHandler();
19682 : }
19683 1 : SetPROJAuxDbPath((char const *)arg1);
19684 1 : if ( bLocalUseExceptions ) {
19685 1 : popErrorHandler();
19686 : }
19687 : #ifndef SED_HACKS
19688 : if ( bLocalUseExceptions ) {
19689 : CPLErr eclass = CPLGetLastErrorType();
19690 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19691 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19692 : }
19693 : }
19694 : #endif
19695 : }
19696 1 : resultobj = SWIG_Py_Void();
19697 1 : {
19698 : /* %typemap(freearg) (const char *utf8_path) */
19699 1 : GDALPythonFreeCStr(arg1, bToFree1);
19700 : }
19701 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19702 : return resultobj;
19703 0 : fail:
19704 0 : {
19705 : /* %typemap(freearg) (const char *utf8_path) */
19706 0 : GDALPythonFreeCStr(arg1, bToFree1);
19707 : }
19708 : return NULL;
19709 : }
19710 :
19711 :
19712 0 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19713 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19714 0 : char **arg1 = (char **) 0 ;
19715 0 : PyObject *swig_obj[1] ;
19716 :
19717 0 : if (!args) SWIG_fail;
19718 0 : swig_obj[0] = args;
19719 0 : {
19720 : /* %typemap(in) char **dict */
19721 0 : arg1 = NULL;
19722 0 : if ( PySequence_Check( swig_obj[0] ) ) {
19723 0 : int bErr = FALSE;
19724 0 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
19725 0 : if ( bErr )
19726 : {
19727 0 : SWIG_fail;
19728 : }
19729 : }
19730 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
19731 0 : int bErr = FALSE;
19732 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
19733 0 : if ( bErr )
19734 : {
19735 0 : SWIG_fail;
19736 : }
19737 : }
19738 : else {
19739 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19740 0 : SWIG_fail;
19741 : }
19742 : }
19743 0 : {
19744 0 : const int bLocalUseExceptions = GetUseExceptions();
19745 0 : if ( bLocalUseExceptions ) {
19746 0 : pushErrorHandler();
19747 : }
19748 0 : SetPROJAuxDbPaths(arg1);
19749 0 : if ( bLocalUseExceptions ) {
19750 0 : popErrorHandler();
19751 : }
19752 : #ifndef SED_HACKS
19753 : if ( bLocalUseExceptions ) {
19754 : CPLErr eclass = CPLGetLastErrorType();
19755 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19756 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19757 : }
19758 : }
19759 : #endif
19760 : }
19761 0 : resultobj = SWIG_Py_Void();
19762 0 : {
19763 : /* %typemap(freearg) char **dict */
19764 0 : CSLDestroy( arg1 );
19765 : }
19766 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19767 : return resultobj;
19768 0 : fail:
19769 0 : {
19770 : /* %typemap(freearg) char **dict */
19771 0 : CSLDestroy( arg1 );
19772 : }
19773 : return NULL;
19774 : }
19775 :
19776 :
19777 0 : SWIGINTERN PyObject *_wrap_GetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19778 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19779 0 : char **result = 0 ;
19780 :
19781 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJAuxDbPaths", 0, 0, 0)) SWIG_fail;
19782 0 : {
19783 0 : const int bLocalUseExceptions = GetUseExceptions();
19784 0 : if ( bLocalUseExceptions ) {
19785 0 : pushErrorHandler();
19786 : }
19787 0 : result = (char **)GetPROJAuxDbPaths();
19788 0 : if ( bLocalUseExceptions ) {
19789 0 : popErrorHandler();
19790 : }
19791 : #ifndef SED_HACKS
19792 : if ( bLocalUseExceptions ) {
19793 : CPLErr eclass = CPLGetLastErrorType();
19794 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19795 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19796 : }
19797 : }
19798 : #endif
19799 : }
19800 0 : {
19801 : /* %typemap(out) char **CSL -> ( string ) */
19802 0 : bool bErr = false;
19803 0 : resultobj = CSLToList(result, &bErr);
19804 0 : CSLDestroy(result);
19805 0 : if( bErr ) {
19806 0 : SWIG_fail;
19807 : }
19808 : }
19809 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19810 : return resultobj;
19811 : fail:
19812 : return NULL;
19813 : }
19814 :
19815 :
19816 : static PyMethodDef SwigMethods[] = {
19817 : { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
19818 : { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
19819 : { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
19820 : { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
19821 : { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
19822 : { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
19823 : { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
19824 : { "GetWellKnownGeogCSAsWKT", _wrap_GetWellKnownGeogCSAsWKT, METH_O, "GetWellKnownGeogCSAsWKT(char const * name) -> OGRErr"},
19825 : { "GetUserInputAsWKT", _wrap_GetUserInputAsWKT, METH_O, "GetUserInputAsWKT(char const * name) -> OGRErr"},
19826 : { "AreaOfUse_west_lon_degree_get", _wrap_AreaOfUse_west_lon_degree_get, METH_O, "AreaOfUse_west_lon_degree_get(AreaOfUse self) -> double"},
19827 : { "AreaOfUse_south_lat_degree_get", _wrap_AreaOfUse_south_lat_degree_get, METH_O, "AreaOfUse_south_lat_degree_get(AreaOfUse self) -> double"},
19828 : { "AreaOfUse_east_lon_degree_get", _wrap_AreaOfUse_east_lon_degree_get, METH_O, "AreaOfUse_east_lon_degree_get(AreaOfUse self) -> double"},
19829 : { "AreaOfUse_north_lat_degree_get", _wrap_AreaOfUse_north_lat_degree_get, METH_O, "AreaOfUse_north_lat_degree_get(AreaOfUse self) -> double"},
19830 : { "AreaOfUse_name_get", _wrap_AreaOfUse_name_get, METH_O, "AreaOfUse_name_get(AreaOfUse self) -> char *"},
19831 : { "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"},
19832 : { "delete_AreaOfUse", _wrap_delete_AreaOfUse, METH_O, "delete_AreaOfUse(AreaOfUse self)"},
19833 : { "AreaOfUse_swigregister", AreaOfUse_swigregister, METH_O, NULL},
19834 : { "AreaOfUse_swiginit", AreaOfUse_swiginit, METH_VARARGS, NULL},
19835 : { "OSRAreaOfUse_west_lon_degree_get", _wrap_OSRAreaOfUse_west_lon_degree_get, METH_O, "OSRAreaOfUse_west_lon_degree_get(AreaOfUse area) -> double"},
19836 : { "OSRAreaOfUse_south_lat_degree_get", _wrap_OSRAreaOfUse_south_lat_degree_get, METH_O, "OSRAreaOfUse_south_lat_degree_get(AreaOfUse area) -> double"},
19837 : { "OSRAreaOfUse_east_lon_degree_get", _wrap_OSRAreaOfUse_east_lon_degree_get, METH_O, "OSRAreaOfUse_east_lon_degree_get(AreaOfUse area) -> double"},
19838 : { "OSRAreaOfUse_north_lat_degree_get", _wrap_OSRAreaOfUse_north_lat_degree_get, METH_O, "OSRAreaOfUse_north_lat_degree_get(AreaOfUse area) -> double"},
19839 : { "OSRAreaOfUse_name_get", _wrap_OSRAreaOfUse_name_get, METH_O, "OSRAreaOfUse_name_get(AreaOfUse area) -> char const *"},
19840 : { "new_SpatialReference", (PyCFunction)(void(*)(void))_wrap_new_SpatialReference, METH_VARARGS|METH_KEYWORDS, "\n"
19841 : "new_SpatialReference(char const * wkt=\"\") -> SpatialReference\n"
19842 : "\n"
19843 : "Python proxy of an :cpp:class:`OGRSpatialReference`.\n"
19844 : "\n"
19845 : ""},
19846 : { "delete_SpatialReference", _wrap_delete_SpatialReference, METH_O, "delete_SpatialReference(SpatialReference self)"},
19847 : { "SpatialReference___str__", _wrap_SpatialReference___str__, METH_O, "SpatialReference___str__(SpatialReference self) -> retStringAndCPLFree *"},
19848 : { "SpatialReference_GetName", _wrap_SpatialReference_GetName, METH_O, "\n"
19849 : "SpatialReference_GetName(SpatialReference self) -> char const *\n"
19850 : "\n"
19851 : "\n"
19852 : "Return the CRS name.\n"
19853 : "\n"
19854 : "See :cpp:func:`OGRSpatialReference::GetName`.\n"
19855 : "\n"
19856 : "Returns\n"
19857 : "-------\n"
19858 : "str\n"
19859 : "\n"
19860 : "Examples\n"
19861 : "--------\n"
19862 : ">>> vt_sp = osr.SpatialReference()\n"
19863 : ">>> vt_sp.ImportFromEPSG(5646)\n"
19864 : "0\n"
19865 : ">>> vt_sp.GetName()\n"
19866 : "'NAD83 / Vermont (ftUS)'\n"
19867 : "\n"
19868 : "\n"
19869 : ""},
19870 : { "SpatialReference_IsSame", (PyCFunction)(void(*)(void))_wrap_SpatialReference_IsSame, METH_VARARGS|METH_KEYWORDS, "\n"
19871 : "SpatialReference_IsSame(SpatialReference self, SpatialReference rhs, char ** options=None) -> int\n"
19872 : "\n"
19873 : "\n"
19874 : "Determine if two spatial references describe the same system.\n"
19875 : "\n"
19876 : "See :cpp:func:`OGRSpatialReference::IsSame`.\n"
19877 : "\n"
19878 : "Parameters\n"
19879 : "----------\n"
19880 : "rhs : SpatialReference\n"
19881 : "options : list/dict\n"
19882 : "\n"
19883 : "Returns\n"
19884 : "-------\n"
19885 : "int\n"
19886 : " 1 if the spatial references describe the same system, 0 otherwise\n"
19887 : "\n"
19888 : "\n"
19889 : ""},
19890 : { "SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS, METH_VARARGS, "\n"
19891 : "SpatialReference_IsSameGeogCS(SpatialReference self, SpatialReference rhs) -> int\n"
19892 : "\n"
19893 : "\n"
19894 : "Determine if two spatial references share the same geographic coordinate system.\n"
19895 : "\n"
19896 : "See :cpp:func:`OGRSpatialReference::IsSameGeogCS`.\n"
19897 : "\n"
19898 : "Parameters\n"
19899 : "----------\n"
19900 : "rhs : SpatialReference\n"
19901 : "options : list/dict\n"
19902 : "\n"
19903 : "Returns\n"
19904 : "-------\n"
19905 : "int\n"
19906 : " 1 if the spatial references have the same GeogCS, 0 otherwise\n"
19907 : "\n"
19908 : "\n"
19909 : ""},
19910 : { "SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS, METH_VARARGS, "\n"
19911 : "SpatialReference_IsSameVertCS(SpatialReference self, SpatialReference rhs) -> int\n"
19912 : "\n"
19913 : "\n"
19914 : "Determine if two spatial references share the same vertical coordinate system.\n"
19915 : "\n"
19916 : "See :cpp:func:`OGRSpatialReference::IsSameVertCS`.\n"
19917 : "\n"
19918 : "Parameters\n"
19919 : "----------\n"
19920 : "rhs : SpatialReference\n"
19921 : "options : list/dict\n"
19922 : "\n"
19923 : "Returns\n"
19924 : "-------\n"
19925 : "int\n"
19926 : " 1 if the spatial references have the same VertCS, 0 otherwise\n"
19927 : "\n"
19928 : "\n"
19929 : ""},
19930 : { "SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic, METH_O, "\n"
19931 : "SpatialReference_IsGeographic(SpatialReference self) -> int\n"
19932 : "\n"
19933 : "\n"
19934 : "Check if this SRS is a geographic coordinate system.\n"
19935 : "\n"
19936 : "See :cpp:func:`OGRSpatialReference::IsGeographic`.\n"
19937 : "\n"
19938 : "Returns\n"
19939 : "-------\n"
19940 : "int\n"
19941 : " 1 if the SRS is geographic, 0 otherwise\n"
19942 : "\n"
19943 : ""},
19944 : { "SpatialReference_IsDerivedGeographic", _wrap_SpatialReference_IsDerivedGeographic, METH_O, "\n"
19945 : "SpatialReference_IsDerivedGeographic(SpatialReference self) -> int\n"
19946 : "\n"
19947 : "\n"
19948 : "Check if this CRS is a derived geographic CRS, such as a rotated long/lat grid.\n"
19949 : "\n"
19950 : "See :cpp:func:`OGRSpatialReference::IsDerivedGeographic`.\n"
19951 : "\n"
19952 : "Returns\n"
19953 : "-------\n"
19954 : "int\n"
19955 : " 1 if the CRS is derived geographic, 0 otherwise\n"
19956 : "\n"
19957 : ""},
19958 : { "SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected, METH_O, "\n"
19959 : "SpatialReference_IsProjected(SpatialReference self) -> int\n"
19960 : "\n"
19961 : "\n"
19962 : "Check if this SRS is a projected coordinate system.\n"
19963 : "\n"
19964 : "See :cpp:func:`OGRSpatialReference::IsProjected`.\n"
19965 : "\n"
19966 : "Returns\n"
19967 : "-------\n"
19968 : "int\n"
19969 : " 1 if the SRS is projected, 0 otherwise\n"
19970 : "\n"
19971 : ""},
19972 : { "SpatialReference_IsDerivedProjected", _wrap_SpatialReference_IsDerivedProjected, METH_O, "SpatialReference_IsDerivedProjected(SpatialReference self) -> int"},
19973 : { "SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound, METH_O, "\n"
19974 : "SpatialReference_IsCompound(SpatialReference self) -> int\n"
19975 : "\n"
19976 : "\n"
19977 : "Check if this CRS is a compound CRS.\n"
19978 : "\n"
19979 : "See :cpp:func:`OGRSpatialReference::IsCompound`.\n"
19980 : "\n"
19981 : "Returns\n"
19982 : "-------\n"
19983 : "int\n"
19984 : " 1 if the CRS is compound, 0 otherwise\n"
19985 : "\n"
19986 : ""},
19987 : { "SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric, METH_O, "\n"
19988 : "SpatialReference_IsGeocentric(SpatialReference self) -> int\n"
19989 : "\n"
19990 : "\n"
19991 : "Check if this SRS is a geocentric coordinate system.\n"
19992 : "\n"
19993 : "See :cpp:func:`OGRSpatialReference::IsGeocentric`.\n"
19994 : "\n"
19995 : "Returns\n"
19996 : "-------\n"
19997 : "int\n"
19998 : " 1 if the SRS is geocentric, 0 otherwise\n"
19999 : "\n"
20000 : ""},
20001 : { "SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal, METH_O, "\n"
20002 : "SpatialReference_IsLocal(SpatialReference self) -> int\n"
20003 : "\n"
20004 : "\n"
20005 : "Check if this CRS is a local CRS.\n"
20006 : "\n"
20007 : "See :cpp:func:`OGRSpatialReference::IsLocal`.\n"
20008 : "\n"
20009 : "Returns\n"
20010 : "-------\n"
20011 : "int\n"
20012 : " 1 if the SRS is local, 0 otherwise\n"
20013 : "\n"
20014 : ""},
20015 : { "SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical, METH_O, "\n"
20016 : "SpatialReference_IsVertical(SpatialReference self) -> int\n"
20017 : "\n"
20018 : "\n"
20019 : "Check if this is a vertical coordinate system.\n"
20020 : "\n"
20021 : "See :cpp:func:`OGRSpatialReference::IsVertical`.\n"
20022 : "\n"
20023 : "Returns\n"
20024 : "-------\n"
20025 : "int\n"
20026 : " 1 if the CRS is vertical, 0 otherwise\n"
20027 : "\n"
20028 : "\n"
20029 : ""},
20030 : { "SpatialReference_IsDynamic", _wrap_SpatialReference_IsDynamic, METH_O, "\n"
20031 : "SpatialReference_IsDynamic(SpatialReference self) -> bool\n"
20032 : "\n"
20033 : "\n"
20034 : "Check if this CRS is a dynamic coordinate CRS.\n"
20035 : "\n"
20036 : "See :cpp:func:`OGRSpatialReference::IsDynamic`.\n"
20037 : "\n"
20038 : "Returns\n"
20039 : "-------\n"
20040 : "bool\n"
20041 : "\n"
20042 : ""},
20043 : { "SpatialReference_HasPointMotionOperation", _wrap_SpatialReference_HasPointMotionOperation, METH_O, "\n"
20044 : "SpatialReference_HasPointMotionOperation(SpatialReference self) -> bool\n"
20045 : "\n"
20046 : "\n"
20047 : "Check if a CRS has an associated point motion operation.\n"
20048 : "\n"
20049 : "See :cpp:func:`OGRSpatialReference::HasPointMotionOperation`.\n"
20050 : "\n"
20051 : "Returns\n"
20052 : "-------\n"
20053 : "bool\n"
20054 : "\n"
20055 : "\n"
20056 : ""},
20057 : { "SpatialReference_GetCoordinateEpoch", _wrap_SpatialReference_GetCoordinateEpoch, METH_O, "\n"
20058 : "SpatialReference_GetCoordinateEpoch(SpatialReference self) -> double\n"
20059 : "\n"
20060 : "\n"
20061 : "Return the coordinate epoch as a decimal year.\n"
20062 : "\n"
20063 : "See :cpp:func:`OGRSpatialReference::GetCoordinateEpoch`.\n"
20064 : "\n"
20065 : "Returns\n"
20066 : "-------\n"
20067 : "float\n"
20068 : " coordinate epoch as a decimal year, or 0 if not set/relevant\n"
20069 : "\n"
20070 : "\n"
20071 : ""},
20072 : { "SpatialReference_SetCoordinateEpoch", _wrap_SpatialReference_SetCoordinateEpoch, METH_VARARGS, "SpatialReference_SetCoordinateEpoch(SpatialReference self, double coordinateEpoch)"},
20073 : { "SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong, METH_O, "SpatialReference_EPSGTreatsAsLatLong(SpatialReference self) -> int"},
20074 : { "SpatialReference_EPSGTreatsAsNorthingEasting", _wrap_SpatialReference_EPSGTreatsAsNorthingEasting, METH_O, "SpatialReference_EPSGTreatsAsNorthingEasting(SpatialReference self) -> int"},
20075 : { "SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority, METH_VARARGS, "SpatialReference_SetAuthority(SpatialReference self, char const * pszTargetKey, char const * pszAuthority, int nCode) -> OGRErr"},
20076 : { "SpatialReference_GetAttrValue", _wrap_SpatialReference_GetAttrValue, METH_VARARGS, "\n"
20077 : "SpatialReference_GetAttrValue(SpatialReference self, char const * name, int child=0) -> char const *\n"
20078 : "\n"
20079 : "\n"
20080 : "Fetch indicated attribute of named node.\n"
20081 : "\n"
20082 : "See :cpp:func:`OGRSpatialReference::GetAttrValue`.\n"
20083 : "\n"
20084 : "Parameters\n"
20085 : "----------\n"
20086 : "name : str\n"
20087 : " tree node to look for (case insensitive)\n"
20088 : "child : int, default = 0\n"
20089 : " 0-indexed child of the node\n"
20090 : "\n"
20091 : "Returns\n"
20092 : "-------\n"
20093 : "str\n"
20094 : "\n"
20095 : "Examples\n"
20096 : "--------\n"
20097 : ">>> vt_sp = osr.SpatialReference()\n"
20098 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20099 : "0\n"
20100 : ">>> vt_sp.GetAttrValue('UNIT', 0)\n"
20101 : "'US survey foot'\n"
20102 : "\n"
20103 : "\n"
20104 : ""},
20105 : { "SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue, METH_VARARGS, "SpatialReference_SetAttrValue(SpatialReference self, char const * name, char const * value) -> OGRErr"},
20106 : { "SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits, METH_VARARGS, "SpatialReference_SetAngularUnits(SpatialReference self, char const * name, double to_radians) -> OGRErr"},
20107 : { "SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits, METH_O, "\n"
20108 : "SpatialReference_GetAngularUnits(SpatialReference self) -> double\n"
20109 : "\n"
20110 : "\n"
20111 : "Fetch conversion between angular geographic coordinate system units and radians.\n"
20112 : "\n"
20113 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20114 : "\n"
20115 : "Returns\n"
20116 : "-------\n"
20117 : "float\n"
20118 : " Value to multiply angular distances by to transform them to radians.\n"
20119 : "\n"
20120 : "Examples\n"
20121 : "--------\n"
20122 : ">>> srs = osr.SpatialReference()\n"
20123 : ">>> srs.ImportFromEPSG(4326)\n"
20124 : "0\n"
20125 : ">>> srs.GetAngularUnits()\n"
20126 : "0.017453292519943295\n"
20127 : "\n"
20128 : "\n"
20129 : ""},
20130 : { "SpatialReference_GetAngularUnitsName", _wrap_SpatialReference_GetAngularUnitsName, METH_O, "\n"
20131 : "SpatialReference_GetAngularUnitsName(SpatialReference self) -> char const *\n"
20132 : "\n"
20133 : "\n"
20134 : "Fetch angular geographic coordinate system units.\n"
20135 : "\n"
20136 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20137 : "\n"
20138 : "Returns\n"
20139 : "-------\n"
20140 : "str\n"
20141 : "\n"
20142 : "Examples\n"
20143 : "--------\n"
20144 : ">>> srs = osr.SpatialReference()\n"
20145 : ">>> srs.ImportFromEPSG(4326)\n"
20146 : "0\n"
20147 : ">>> srs.GetAngularUnitsName()\n"
20148 : "'degree'\n"
20149 : "\n"
20150 : "\n"
20151 : ""},
20152 : { "SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits, METH_VARARGS, "SpatialReference_SetTargetLinearUnits(SpatialReference self, char const * target, char const * name, double to_meters) -> OGRErr"},
20153 : { "SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits, METH_VARARGS, "SpatialReference_SetLinearUnits(SpatialReference self, char const * name, double to_meters) -> OGRErr"},
20154 : { "SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters, METH_VARARGS, "SpatialReference_SetLinearUnitsAndUpdateParameters(SpatialReference self, char const * name, double to_meters) -> OGRErr"},
20155 : { "SpatialReference_GetTargetLinearUnits", _wrap_SpatialReference_GetTargetLinearUnits, METH_VARARGS, "\n"
20156 : "SpatialReference_GetTargetLinearUnits(SpatialReference self, char const * target_key) -> double\n"
20157 : "\n"
20158 : "\n"
20159 : "Fetch linear units for a target.\n"
20160 : "\n"
20161 : "See :cpp:func:`OGRSpatialReference::GetTargetLinearUnits`.\n"
20162 : "\n"
20163 : "Parameters\n"
20164 : "----------\n"
20165 : "target_key : str\n"
20166 : " key to look un, such as 'PROJCS' or 'VERT_CS'\n"
20167 : "\n"
20168 : "Returns\n"
20169 : "-------\n"
20170 : "double\n"
20171 : "\n"
20172 : "\n"
20173 : ""},
20174 : { "SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits, METH_O, "\n"
20175 : "SpatialReference_GetLinearUnits(SpatialReference self) -> double\n"
20176 : "\n"
20177 : "\n"
20178 : "Fetch the conversion between linear projection units and meters.\n"
20179 : "\n"
20180 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20181 : "\n"
20182 : "Returns\n"
20183 : "-------\n"
20184 : "float\n"
20185 : "\n"
20186 : "Examples\n"
20187 : "--------\n"
20188 : ">>> vt_sp = osr.SpatialReference()\n"
20189 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20190 : "0\n"
20191 : ">>> vt_sp.GetLinearUnits()\n"
20192 : "0.30480060960121924\n"
20193 : "\n"
20194 : "\n"
20195 : ""},
20196 : { "SpatialReference_GetLinearUnitsName", _wrap_SpatialReference_GetLinearUnitsName, METH_O, "\n"
20197 : "SpatialReference_GetLinearUnitsName(SpatialReference self) -> char const *\n"
20198 : "\n"
20199 : "\n"
20200 : "Fetch the name of the linear projection units.\n"
20201 : "\n"
20202 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20203 : "\n"
20204 : "Returns\n"
20205 : "-------\n"
20206 : "str\n"
20207 : "\n"
20208 : "Examples\n"
20209 : "--------\n"
20210 : ">>> vt_sp = osr.SpatialReference()\n"
20211 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20212 : "0\n"
20213 : ">>> vt_sp.GetLinearUnitsName()\n"
20214 : "'US survey foot'\n"
20215 : "\n"
20216 : "\n"
20217 : ""},
20218 : { "SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode, METH_VARARGS, "\n"
20219 : "SpatialReference_GetAuthorityCode(SpatialReference self, char const * target_key) -> char const *\n"
20220 : "\n"
20221 : "\n"
20222 : "Get the authority code for a node.\n"
20223 : "\n"
20224 : "See :cpp:func:`OGRSpatialReference::GetAuthorityCode`.\n"
20225 : "\n"
20226 : "Parameters\n"
20227 : "----------\n"
20228 : "target_key : str\n"
20229 : " the partial or complete path to the node to get an authority from\n"
20230 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority code\n"
20231 : " on the root element)\n"
20232 : "\n"
20233 : "Returns\n"
20234 : "-------\n"
20235 : "str or ``None`` on failure\n"
20236 : "\n"
20237 : "Examples\n"
20238 : "--------\n"
20239 : ">>> srs = osr.SpatialReference()\n"
20240 : ">>> srs.ImportFromEPSG(4326)\n"
20241 : "0\n"
20242 : ">>> srs.GetAuthorityName('DATUM')\n"
20243 : "'EPSG'\n"
20244 : ">>> srs.GetAuthorityCode('DATUM')\n"
20245 : "'6326'\n"
20246 : ">>> srs.GetAuthorityCode(None)\n"
20247 : "'4326'\n"
20248 : "\n"
20249 : "\n"
20250 : ""},
20251 : { "SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName, METH_VARARGS, "\n"
20252 : "SpatialReference_GetAuthorityName(SpatialReference self, char const * target_key) -> char const *\n"
20253 : "\n"
20254 : "\n"
20255 : "Get the authority name for a node.\n"
20256 : "\n"
20257 : "See :cpp:func:`OGRSpatialReference::GetAuthorityName`.\n"
20258 : "\n"
20259 : "Parameters\n"
20260 : "----------\n"
20261 : "target_key : str\n"
20262 : " the partial or complete path to the node to get an authority from\n"
20263 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority name\n"
20264 : " on the root element)\n"
20265 : "\n"
20266 : "Returns\n"
20267 : "-------\n"
20268 : "str\n"
20269 : "\n"
20270 : ""},
20271 : { "SpatialReference_GetAreaOfUse", _wrap_SpatialReference_GetAreaOfUse, METH_O, "\n"
20272 : "SpatialReference_GetAreaOfUse(SpatialReference self) -> AreaOfUse\n"
20273 : "\n"
20274 : "\n"
20275 : "Return the area of use of the SRS.\n"
20276 : "\n"
20277 : "See :cpp:func:`OGRSpatialReference::GetAreaOfUse`.\n"
20278 : "\n"
20279 : "Returns\n"
20280 : "-------\n"
20281 : "AreaOfUse\n"
20282 : " object providing a description of the area of use as well as bounding parallels / meridians\n"
20283 : "\n"
20284 : "Examples\n"
20285 : "--------\n"
20286 : "\n"
20287 : ">>> vt_sp = osr.SpatialReference()\n"
20288 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20289 : "0\n"
20290 : ">>> aou = vt_sp.GetAreaOfUse()\n"
20291 : ">>> aou.name\n"
20292 : "'United States (USA) - Vermont - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor.'\n"
20293 : ">>> aou.west_lon_degree, aou.south_lat_degree, aou.east_lon_degree, aou.north_lat_degree\n"
20294 : "(-73.44, 42.72, -71.5, 45.03)\n"
20295 : "\n"
20296 : "\n"
20297 : ""},
20298 : { "SpatialReference_GetAxisName", _wrap_SpatialReference_GetAxisName, METH_VARARGS, "\n"
20299 : "SpatialReference_GetAxisName(SpatialReference self, char const * target_key, int iAxis) -> char const *\n"
20300 : "\n"
20301 : "\n"
20302 : "Fetch an axis description.\n"
20303 : "\n"
20304 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20305 : "\n"
20306 : "Parameters\n"
20307 : "----------\n"
20308 : "target_key : str\n"
20309 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20310 : "iAxis : int\n"
20311 : " The 0-based index of the axis to fetch\n"
20312 : "\n"
20313 : "Returns\n"
20314 : "-------\n"
20315 : "str\n"
20316 : "\n"
20317 : "Examples\n"
20318 : "--------\n"
20319 : ">>> srs = osr.SpatialReference()\n"
20320 : ">>> srs.ImportFromEPSG(4979)\n"
20321 : "0\n"
20322 : ">>> for i in range(3):\n"
20323 : "... srs.GetAxisName('GEOGCS', i)\n"
20324 : "...\n"
20325 : "'Geodetic latitude'\n"
20326 : "'Geodetic longitude'\n"
20327 : "'Ellipsoidal height'\n"
20328 : "\n"
20329 : "\n"
20330 : ""},
20331 : { "SpatialReference_GetAxesCount", _wrap_SpatialReference_GetAxesCount, METH_O, "\n"
20332 : "SpatialReference_GetAxesCount(SpatialReference self) -> int\n"
20333 : "\n"
20334 : "\n"
20335 : "Return the number of axes of the coordinate system of the CRS.\n"
20336 : "\n"
20337 : "See :cpp:func:`OGRSpatialReference::GetAxesCount`.\n"
20338 : "\n"
20339 : "Returns\n"
20340 : "-------\n"
20341 : "int\n"
20342 : "\n"
20343 : "Examples\n"
20344 : "--------\n"
20345 : ">>> srs = osr.SpatialReference()\n"
20346 : ">>> srs.ImportFromEPSG(4326)\n"
20347 : "0\n"
20348 : ">>> srs.GetAxesCount()\n"
20349 : "2\n"
20350 : ">>> srs.ImportFromEPSG(4979)\n"
20351 : "0\n"
20352 : ">>> srs.GetAxesCount()\n"
20353 : "3\n"
20354 : "\n"
20355 : ""},
20356 : { "SpatialReference_GetAxisOrientation", _wrap_SpatialReference_GetAxisOrientation, METH_VARARGS, "\n"
20357 : "SpatialReference_GetAxisOrientation(SpatialReference self, char const * target_key, int iAxis) -> OGRAxisOrientation\n"
20358 : "\n"
20359 : "\n"
20360 : "Fetch an axis orientation.\n"
20361 : "\n"
20362 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20363 : "\n"
20364 : "Parameters\n"
20365 : "----------\n"
20366 : "target_key : str\n"
20367 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20368 : "iAxis : int\n"
20369 : " The 0-based index of the axis to fetch\n"
20370 : "\n"
20371 : "Returns\n"
20372 : "-------\n"
20373 : "int\n"
20374 : "\n"
20375 : "Examples\n"
20376 : "--------\n"
20377 : ">>> srs = osr.SpatialReference()\n"
20378 : ">>> srs.ImportFromEPSG(4979)\n"
20379 : "0\n"
20380 : ">>> srs.GetAxisOrientation('GEOGCS', 0) == osr.OAO_North\n"
20381 : "True\n"
20382 : ">>> srs.GetAxisOrientation('GEOGCS', 1) == osr.OAO_East\n"
20383 : "True\n"
20384 : ">>> srs.GetAxisOrientation('GEOGCS', 2) == osr.OAO_Up\n"
20385 : "True\n"
20386 : "\n"
20387 : ""},
20388 : { "SpatialReference_GetAxisMappingStrategy", _wrap_SpatialReference_GetAxisMappingStrategy, METH_O, "\n"
20389 : "SpatialReference_GetAxisMappingStrategy(SpatialReference self) -> OSRAxisMappingStrategy\n"
20390 : "\n"
20391 : "\n"
20392 : "Return the data axis to CRS axis mapping strategy:\n"
20393 : "\n"
20394 : "- :py:const:`OAMS_TRADITIONAL_GIS_ORDER` means that for geographic CRS\n"
20395 : " with lag/long order, the data will still be long/lat ordered. Similarly\n"
20396 : " for a projected CRS with northing/easting order, the data will still be\n"
20397 : " easting/northing ordered.\n"
20398 : "- :py:const:`OAMS_AUTHORITY_COMPLIANT` means that the data axis will be\n"
20399 : " identical to the CRS axis.\n"
20400 : "- :py:const:`OAMS_CUSTOM` means that the ordering is defined with\n"
20401 : " :py:meth:`SetDataAxisToSRSAxisMapping`.\n"
20402 : "\n"
20403 : "See :cpp:func:`OGRSpatialReference::GetAxisMappingStrategy`.\n"
20404 : "\n"
20405 : "Returns\n"
20406 : "-------\n"
20407 : "int\n"
20408 : "\n"
20409 : "\n"
20410 : ""},
20411 : { "SpatialReference_SetAxisMappingStrategy", _wrap_SpatialReference_SetAxisMappingStrategy, METH_VARARGS, "SpatialReference_SetAxisMappingStrategy(SpatialReference self, OSRAxisMappingStrategy strategy)"},
20412 : { "SpatialReference_GetDataAxisToSRSAxisMapping", _wrap_SpatialReference_GetDataAxisToSRSAxisMapping, METH_O, "\n"
20413 : "SpatialReference_GetDataAxisToSRSAxisMapping(SpatialReference self)\n"
20414 : "\n"
20415 : "\n"
20416 : "Return the data axis to SRS axis mapping.\n"
20417 : "\n"
20418 : "See :cpp:func:`OGRSpatialReference::GetDataAxisToSRSAxisMapping`.\n"
20419 : "\n"
20420 : "Returns\n"
20421 : "-------\n"
20422 : "tuple\n"
20423 : "\n"
20424 : "\n"
20425 : ""},
20426 : { "SpatialReference_SetDataAxisToSRSAxisMapping", _wrap_SpatialReference_SetDataAxisToSRSAxisMapping, METH_VARARGS, "SpatialReference_SetDataAxisToSRSAxisMapping(SpatialReference self, int nList) -> OGRErr"},
20427 : { "SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM, METH_VARARGS, "SpatialReference_SetUTM(SpatialReference self, int zone, int north=1) -> OGRErr"},
20428 : { "SpatialReference_GetUTMZone", _wrap_SpatialReference_GetUTMZone, METH_O, "\n"
20429 : "SpatialReference_GetUTMZone(SpatialReference self) -> int\n"
20430 : "\n"
20431 : "\n"
20432 : "Get UTM zone.\n"
20433 : "\n"
20434 : "See :cpp:func:`OGRSpatialReference::GetUTMZone`.\n"
20435 : "\n"
20436 : "Returns\n"
20437 : "-------\n"
20438 : "int\n"
20439 : " 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"
20440 : "\n"
20441 : "\n"
20442 : ""},
20443 : { "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"},
20444 : { "SpatialReference_AutoIdentifyEPSG", _wrap_SpatialReference_AutoIdentifyEPSG, METH_O, "\n"
20445 : "SpatialReference_AutoIdentifyEPSG(SpatialReference self) -> OGRErr\n"
20446 : "\n"
20447 : "\n"
20448 : "Add an EPSG authority code to the CRS\n"
20449 : "where an aspect of the coordinate system can be easily and safely\n"
20450 : "corresponded with an EPSG identifier.\n"
20451 : "\n"
20452 : "See :cpp:func:`OGRSpatialReference::AutoIdentifyEPSG`.\n"
20453 : "\n"
20454 : "Returns\n"
20455 : "-------\n"
20456 : "int\n"
20457 : " :py:const:`OGRERR_NONE` or :py:const:`OGRERR_UNSUPPORTED_SRS`.\n"
20458 : "\n"
20459 : "\n"
20460 : ""},
20461 : { "SpatialReference_FindMatches", _wrap_SpatialReference_FindMatches, METH_VARARGS, "SpatialReference_FindMatches(SpatialReference self, char ** options=None)"},
20462 : { "SpatialReference_SetProjection", _wrap_SpatialReference_SetProjection, METH_VARARGS, "SpatialReference_SetProjection(SpatialReference self, char const * arg) -> OGRErr"},
20463 : { "SpatialReference_SetProjParm", _wrap_SpatialReference_SetProjParm, METH_VARARGS, "SpatialReference_SetProjParm(SpatialReference self, char const * name, double val) -> OGRErr"},
20464 : { "SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm, METH_VARARGS, "\n"
20465 : "SpatialReference_GetProjParm(SpatialReference self, char const * name, double default_val=0.0) -> double\n"
20466 : "\n"
20467 : "\n"
20468 : "Fetch a projection parameter value.\n"
20469 : "\n"
20470 : "See :cpp:func:`OGRSpatialReference::GetProjParm`.\n"
20471 : "\n"
20472 : "Parameters\n"
20473 : "----------\n"
20474 : "name : str\n"
20475 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20476 : "default_val : float, default = 0.0\n"
20477 : " value to return if this parameter doesn't exist\n"
20478 : "\n"
20479 : "Returns\n"
20480 : "-------\n"
20481 : "float\n"
20482 : "\n"
20483 : "Examples\n"
20484 : "--------\n"
20485 : ">>> vt_sp = osr.SpatialReference()\n"
20486 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20487 : "0\n"
20488 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20489 : "1640416.6667\n"
20490 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_NORTHING)\n"
20491 : "0.0\n"
20492 : "\n"
20493 : "\n"
20494 : ""},
20495 : { "SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm, METH_VARARGS, "SpatialReference_SetNormProjParm(SpatialReference self, char const * name, double val) -> OGRErr"},
20496 : { "SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm, METH_VARARGS, "\n"
20497 : "SpatialReference_GetNormProjParm(SpatialReference self, char const * name, double default_val=0.0) -> double\n"
20498 : "\n"
20499 : "\n"
20500 : "Fetch a normalized projection parameter value.\n"
20501 : "\n"
20502 : "This method is the same as :py:meth:`GetProjParm` except that the value of the\n"
20503 : "parameter is normalized into degrees or meters depending on whether it is\n"
20504 : "linear or angular.\n"
20505 : "\n"
20506 : "See :cpp:func:`OGRSpatialReference::GetNormProjParm`.\n"
20507 : "\n"
20508 : "Parameters\n"
20509 : "----------\n"
20510 : "name : str\n"
20511 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20512 : "default_val : float, default = 0.0\n"
20513 : " value to return if this parameter doesn't exist\n"
20514 : "\n"
20515 : "Returns\n"
20516 : "-------\n"
20517 : "float\n"
20518 : "\n"
20519 : "Examples\n"
20520 : "--------\n"
20521 : ">>> vt_sp = osr.SpatialReference()\n"
20522 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20523 : "0\n"
20524 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20525 : "1640416.6667\n"
20526 : ">>> vt_sp.GetNormProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20527 : "500000.0000101601\n"
20528 : "\n"
20529 : "\n"
20530 : ""},
20531 : { "SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor, METH_O, "\n"
20532 : "SpatialReference_GetSemiMajor(SpatialReference self) -> double\n"
20533 : "\n"
20534 : "\n"
20535 : "Get spheroid semi major axis (in meters starting with GDAL 3.0)\n"
20536 : "\n"
20537 : "See :cpp:func:`OGRSpatialReference::GetSemiMajor`.\n"
20538 : "\n"
20539 : "Returns\n"
20540 : "-------\n"
20541 : "float\n"
20542 : " semi-major axis, or :py:const:`SRS_WGS84_SEMIMAJOR` if it cannot be found.\n"
20543 : "\n"
20544 : ""},
20545 : { "SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor, METH_O, "\n"
20546 : "SpatialReference_GetSemiMinor(SpatialReference self) -> double\n"
20547 : "\n"
20548 : "\n"
20549 : "Get spheroid semi minor axis.\n"
20550 : "\n"
20551 : "See :cpp:func:`OGRSpatialReference::GetSemiMinor`.\n"
20552 : "\n"
20553 : "Returns\n"
20554 : "-------\n"
20555 : "float\n"
20556 : " semi-minor axis, or :py:const:`SRS_WGS84_SEMIMINOR` if it cannot be found.\n"
20557 : "\n"
20558 : ""},
20559 : { "SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening, METH_O, "\n"
20560 : "SpatialReference_GetInvFlattening(SpatialReference self) -> double\n"
20561 : "\n"
20562 : "\n"
20563 : "Get the spheroid inverse flattening.\n"
20564 : "\n"
20565 : "See :cpp:func:`OGRSpatialReference::GetInvFlattening`.\n"
20566 : "\n"
20567 : "Returns\n"
20568 : "-------\n"
20569 : "float\n"
20570 : "\n"
20571 : "Examples\n"
20572 : "--------\n"
20573 : ">>> srs = osr.SpatialReference()\n"
20574 : ">>> srs.ImportFromEPSG(4326) # WGS84\n"
20575 : "0\n"
20576 : ">>> srs.GetInvFlattening()\n"
20577 : "298.257223563\n"
20578 : ">>> srs.ImportFromEPSG(4269) # NAD83\n"
20579 : "0\n"
20580 : ">>> srs.GetInvFlattening()\n"
20581 : "298.257222101\n"
20582 : "\n"
20583 : ""},
20584 : { "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"},
20585 : { "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"},
20586 : { "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"},
20587 : { "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"},
20588 : { "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"},
20589 : { "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"},
20590 : { "SpatialReference_SetEckertIV", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertIV, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertIV(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20591 : { "SpatialReference_SetEckertVI", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertVI, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertVI(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20592 : { "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"},
20593 : { "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"},
20594 : { "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"},
20595 : { "SpatialReference_SetGS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGS(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20596 : { "SpatialReference_SetGH", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGH, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGH(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20597 : { "SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH, METH_O, "SpatialReference_SetIGH(SpatialReference self) -> OGRErr"},
20598 : { "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"},
20599 : { "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"},
20600 : { "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"},
20601 : { "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"},
20602 : { "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"},
20603 : { "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"},
20604 : { "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"},
20605 : { "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"},
20606 : { "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"},
20607 : { "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"},
20608 : { "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"},
20609 : { "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"},
20610 : { "SpatialReference_SetMollweide", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMollweide, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMollweide(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20611 : { "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"},
20612 : { "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"},
20613 : { "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"},
20614 : { "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"},
20615 : { "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"},
20616 : { "SpatialReference_SetRobinson", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetRobinson, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetRobinson(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20617 : { "SpatialReference_SetSinusoidal", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSinusoidal, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSinusoidal(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20618 : { "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"},
20619 : { "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"},
20620 : { "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"},
20621 : { "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"},
20622 : { "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"},
20623 : { "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"},
20624 : { "SpatialReference_SetVDG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVDG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVDG(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20625 : { "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"},
20626 : { "SpatialReference_SetWellKnownGeogCS", _wrap_SpatialReference_SetWellKnownGeogCS, METH_VARARGS, "SpatialReference_SetWellKnownGeogCS(SpatialReference self, char const * name) -> OGRErr"},
20627 : { "SpatialReference_SetFromUserInput", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetFromUserInput, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetFromUserInput(SpatialReference self, char const * name, char ** options=None) -> OGRErr"},
20628 : { "SpatialReference_CopyGeogCSFrom", _wrap_SpatialReference_CopyGeogCSFrom, METH_VARARGS, "SpatialReference_CopyGeogCSFrom(SpatialReference self, SpatialReference rhs) -> OGRErr"},
20629 : { "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"},
20630 : { "SpatialReference_HasTOWGS84", _wrap_SpatialReference_HasTOWGS84, METH_O, "\n"
20631 : "SpatialReference_HasTOWGS84(SpatialReference self) -> bool\n"
20632 : "\n"
20633 : "\n"
20634 : "Return whether the SRS has a TOWGS84 parameter.\n"
20635 : "\n"
20636 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
20637 : "\n"
20638 : "Returns\n"
20639 : "-------\n"
20640 : "bool\n"
20641 : "\n"
20642 : "\n"
20643 : ""},
20644 : { "SpatialReference_GetTOWGS84", _wrap_SpatialReference_GetTOWGS84, METH_O, "\n"
20645 : "SpatialReference_GetTOWGS84(SpatialReference self) -> OGRErr\n"
20646 : "\n"
20647 : "\n"
20648 : "Fetch TOWGS84 parameter, if available.\n"
20649 : "\n"
20650 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
20651 : "\n"
20652 : "Returns\n"
20653 : "-------\n"
20654 : "tuple\n"
20655 : "\n"
20656 : "\n"
20657 : ""},
20658 : { "SpatialReference_AddGuessedTOWGS84", _wrap_SpatialReference_AddGuessedTOWGS84, METH_O, "SpatialReference_AddGuessedTOWGS84(SpatialReference self) -> OGRErr"},
20659 : { "SpatialReference_SetLocalCS", _wrap_SpatialReference_SetLocalCS, METH_VARARGS, "SpatialReference_SetLocalCS(SpatialReference self, char const * pszName) -> OGRErr"},
20660 : { "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"},
20661 : { "SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS, METH_VARARGS, "SpatialReference_SetProjCS(SpatialReference self, char const * name=\"unnamed\") -> OGRErr"},
20662 : { "SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS, METH_VARARGS, "SpatialReference_SetGeocCS(SpatialReference self, char const * name=\"unnamed\") -> OGRErr"},
20663 : { "SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS, METH_VARARGS, "SpatialReference_SetVertCS(SpatialReference self, char const * VertCSName=\"unnamed\", char const * VertDatumName=\"unnamed\", int VertDatumType=0) -> OGRErr"},
20664 : { "SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS, METH_VARARGS, "SpatialReference_SetCompoundCS(SpatialReference self, char const * name, SpatialReference horizcs, SpatialReference vertcs) -> OGRErr"},
20665 : { "SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt, METH_VARARGS, "\n"
20666 : "SpatialReference_ImportFromWkt(SpatialReference self, char ** ppszInput) -> OGRErr\n"
20667 : "\n"
20668 : "\n"
20669 : "Import from WKT string.\n"
20670 : "\n"
20671 : "See :cpp:func:`OGRSpatialReference::importFromWkt`.\n"
20672 : "\n"
20673 : "Parameters\n"
20674 : "----------\n"
20675 : "ppszInput : str\n"
20676 : " WKT string\n"
20677 : "\n"
20678 : "Returns\n"
20679 : "-------\n"
20680 : "int\n"
20681 : " :py:const:`OGRERR_NONE` if import succeeds, or :py:const:`OGRERR_CORRUPT_DATA` if it fails for any reason.\n"
20682 : "\n"
20683 : "\n"
20684 : ""},
20685 : { "SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4, METH_VARARGS, "\n"
20686 : "SpatialReference_ImportFromProj4(SpatialReference self, char * ppszInput) -> OGRErr\n"
20687 : "\n"
20688 : "\n"
20689 : "Initialize SRS based on PROJ coordinate string.\n"
20690 : "\n"
20691 : "See :cpp:func:`OGRSpatialReference::importFromProj4`.\n"
20692 : "\n"
20693 : "Parameters\n"
20694 : "----------\n"
20695 : "ppszInput : str\n"
20696 : " PROJ coordinate string\n"
20697 : "\n"
20698 : "Returns\n"
20699 : "-------\n"
20700 : "int\n"
20701 : " :py:const:`OGRERR_NONE` on success, or :py:const:`OGRERR_CORRUPT_DATA` on failure\n"
20702 : "\n"
20703 : "Examples\n"
20704 : "--------\n"
20705 : ">>> srs = osr.SpatialReference()\n"
20706 : ">>> srs.ImportFromProj4('+proj=utm +zone=18 +datum=WGS84')\n"
20707 : "0\n"
20708 : "\n"
20709 : ""},
20710 : { "SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl, METH_VARARGS, "\n"
20711 : "SpatialReference_ImportFromUrl(SpatialReference self, char * url) -> OGRErr\n"
20712 : "\n"
20713 : "\n"
20714 : "Initialize SRS based on a URL.\n"
20715 : "\n"
20716 : "This method will download the spatial reference at a given URL and\n"
20717 : "feed it into :py:meth:`SetFromUserInput` for you.\n"
20718 : "\n"
20719 : "See :cpp:func:`OGRSpatialReference::importFromUrl`.\n"
20720 : "\n"
20721 : "Parameters\n"
20722 : "----------\n"
20723 : "url : str\n"
20724 : "\n"
20725 : "Returns\n"
20726 : "-------\n"
20727 : "int\n"
20728 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
20729 : "\n"
20730 : "\n"
20731 : ""},
20732 : { "SpatialReference_ImportFromESRI", _wrap_SpatialReference_ImportFromESRI, METH_VARARGS, "SpatialReference_ImportFromESRI(SpatialReference self, char ** ppszInput) -> OGRErr"},
20733 : { "SpatialReference_ImportFromEPSG", _wrap_SpatialReference_ImportFromEPSG, METH_VARARGS, "\n"
20734 : "SpatialReference_ImportFromEPSG(SpatialReference self, int arg) -> OGRErr\n"
20735 : "\n"
20736 : "\n"
20737 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
20738 : "\n"
20739 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSGA`.\n"
20740 : "\n"
20741 : "See :cpp:func:`OGRSpatialReference::importFromEPSG`.\n"
20742 : "\n"
20743 : "Parameters\n"
20744 : "----------\n"
20745 : "arg : int\n"
20746 : " EPSG code to search in PROJ database\n"
20747 : "\n"
20748 : "Returns\n"
20749 : "-------\n"
20750 : "int\n"
20751 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
20752 : "\n"
20753 : "Examples\n"
20754 : "--------\n"
20755 : ">>> srs = osr.SpatialReference()\n"
20756 : ">>> srs.ImportFromEPSG(4326)\n"
20757 : "0\n"
20758 : "\n"
20759 : "\n"
20760 : ""},
20761 : { "SpatialReference_ImportFromEPSGA", _wrap_SpatialReference_ImportFromEPSGA, METH_VARARGS, "\n"
20762 : "SpatialReference_ImportFromEPSGA(SpatialReference self, int arg) -> OGRErr\n"
20763 : "\n"
20764 : "\n"
20765 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
20766 : "\n"
20767 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSG`.\n"
20768 : "\n"
20769 : "See :cpp:func:`OGRSpatialReference::importFromEPSGA`.\n"
20770 : "\n"
20771 : "Parameters\n"
20772 : "----------\n"
20773 : "arg : int\n"
20774 : " EPSG code to search in PROJ database\n"
20775 : "\n"
20776 : "Returns\n"
20777 : "-------\n"
20778 : "int\n"
20779 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
20780 : "\n"
20781 : "\n"
20782 : ""},
20783 : { "SpatialReference_ImportFromPCI", _wrap_SpatialReference_ImportFromPCI, METH_VARARGS, "SpatialReference_ImportFromPCI(SpatialReference self, char const * proj, char const * units=\"METRE\", double [17] argin=0) -> OGRErr"},
20784 : { "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"},
20785 : { "SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML, METH_VARARGS, "SpatialReference_ImportFromXML(SpatialReference self, char const * xmlString) -> OGRErr"},
20786 : { "SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM, METH_VARARGS, "SpatialReference_ImportFromERM(SpatialReference self, char const * proj, char const * datum, char const * units) -> OGRErr"},
20787 : { "SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys, METH_VARARGS, "SpatialReference_ImportFromMICoordSys(SpatialReference self, char const * pszCoordSys) -> OGRErr"},
20788 : { "SpatialReference_ImportFromOzi", _wrap_SpatialReference_ImportFromOzi, METH_VARARGS, "SpatialReference_ImportFromOzi(SpatialReference self, char const *const * papszLines) -> OGRErr"},
20789 : { "SpatialReference_ImportFromCF1", _wrap_SpatialReference_ImportFromCF1, METH_VARARGS, "SpatialReference_ImportFromCF1(SpatialReference self, char ** keyValues, char const * units=None) -> OGRErr"},
20790 : { "SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt, METH_VARARGS, "\n"
20791 : "SpatialReference_ExportToWkt(SpatialReference self, char ** options=None) -> OGRErr\n"
20792 : "\n"
20793 : "\n"
20794 : "Export this SRS into WKT 1 format.\n"
20795 : "\n"
20796 : "See :cpp:func:`OGRSpatialReference::exportToWkt`.\n"
20797 : "\n"
20798 : "Returns\n"
20799 : "-------\n"
20800 : "str\n"
20801 : "\n"
20802 : "See Also\n"
20803 : "--------\n"
20804 : ":py:meth:`ExportToPrettyWkt`\n"
20805 : "\n"
20806 : "\n"
20807 : ""},
20808 : { "SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt, METH_VARARGS, "\n"
20809 : "SpatialReference_ExportToPrettyWkt(SpatialReference self, int simplify=0) -> OGRErr\n"
20810 : "\n"
20811 : "\n"
20812 : "Convert this SRS into a nicely formatted WKT 1 string for display to a\n"
20813 : "person.\n"
20814 : "\n"
20815 : "See :cpp:func:`OGRSpatialReference::exportToPrettyWkt`.\n"
20816 : "\n"
20817 : "Parameters\n"
20818 : "----------\n"
20819 : "simplify : bool, default = False\n"
20820 : "\n"
20821 : "Returns\n"
20822 : "-------\n"
20823 : "str\n"
20824 : "\n"
20825 : "\n"
20826 : ""},
20827 : { "SpatialReference_ExportToPROJJSON", _wrap_SpatialReference_ExportToPROJJSON, METH_VARARGS, "\n"
20828 : "SpatialReference_ExportToPROJJSON(SpatialReference self, char ** options=None) -> OGRErr\n"
20829 : "\n"
20830 : "\n"
20831 : "Export this SRS in `PROJJSON <https://proj.org/en/latest/specifications/projjson.html>`_ format.\n"
20832 : "\n"
20833 : "See :cpp:func:`OGRSpatialReference::exportToPROJJSON`.\n"
20834 : "\n"
20835 : "Parameters\n"
20836 : "----------\n"
20837 : "options : list/dict\n"
20838 : " Options to control the format of the output. See :cpp:func:`OGRSpatialReference::ExportToPROJJSON`.\n"
20839 : "\n"
20840 : "Returns\n"
20841 : "-------\n"
20842 : "str\n"
20843 : "\n"
20844 : "\n"
20845 : ""},
20846 : { "SpatialReference_ExportToProj4", _wrap_SpatialReference_ExportToProj4, METH_O, "\n"
20847 : "SpatialReference_ExportToProj4(SpatialReference self) -> OGRErr\n"
20848 : "\n"
20849 : "\n"
20850 : "Export this SRS to PROJ.4 legacy format.\n"
20851 : "\n"
20852 : ".. warning::\n"
20853 : "\n"
20854 : " Use of this function is discouraged. See :cpp:func:`OGRSpatialReference::exportToProj4`.\n"
20855 : "\n"
20856 : "Returns\n"
20857 : "-------\n"
20858 : "str\n"
20859 : "\n"
20860 : "\n"
20861 : ""},
20862 : { "SpatialReference_ExportToPCI", _wrap_SpatialReference_ExportToPCI, METH_O, "SpatialReference_ExportToPCI(SpatialReference self) -> OGRErr"},
20863 : { "SpatialReference_ExportToUSGS", _wrap_SpatialReference_ExportToUSGS, METH_O, "SpatialReference_ExportToUSGS(SpatialReference self) -> OGRErr"},
20864 : { "SpatialReference_ExportToERM", _wrap_SpatialReference_ExportToERM, METH_O, "SpatialReference_ExportToERM(SpatialReference self) -> OGRErr"},
20865 : { "SpatialReference_ExportToXML", _wrap_SpatialReference_ExportToXML, METH_VARARGS, "SpatialReference_ExportToXML(SpatialReference self, char const * dialect=\"\") -> OGRErr"},
20866 : { "SpatialReference_ExportToMICoordSys", _wrap_SpatialReference_ExportToMICoordSys, METH_O, "SpatialReference_ExportToMICoordSys(SpatialReference self) -> OGRErr"},
20867 : { "SpatialReference_ExportToCF1", _wrap_SpatialReference_ExportToCF1, METH_VARARGS, "SpatialReference_ExportToCF1(SpatialReference self, char ** options=None) -> char **"},
20868 : { "SpatialReference_ExportToCF1Units", _wrap_SpatialReference_ExportToCF1Units, METH_VARARGS, "SpatialReference_ExportToCF1Units(SpatialReference self, char ** options=None) -> retStringAndCPLFree *"},
20869 : { "SpatialReference_CloneGeogCS", _wrap_SpatialReference_CloneGeogCS, METH_O, "SpatialReference_CloneGeogCS(SpatialReference self) -> SpatialReference"},
20870 : { "SpatialReference_Clone", _wrap_SpatialReference_Clone, METH_O, "SpatialReference_Clone(SpatialReference self) -> SpatialReference"},
20871 : { "SpatialReference_StripVertical", _wrap_SpatialReference_StripVertical, METH_O, "SpatialReference_StripVertical(SpatialReference self) -> OGRErr"},
20872 : { "SpatialReference_Validate", _wrap_SpatialReference_Validate, METH_O, "SpatialReference_Validate(SpatialReference self) -> OGRErr"},
20873 : { "SpatialReference_MorphToESRI", _wrap_SpatialReference_MorphToESRI, METH_O, "SpatialReference_MorphToESRI(SpatialReference self) -> OGRErr"},
20874 : { "SpatialReference_MorphFromESRI", _wrap_SpatialReference_MorphFromESRI, METH_O, "SpatialReference_MorphFromESRI(SpatialReference self) -> OGRErr"},
20875 : { "SpatialReference_ConvertToOtherProjection", _wrap_SpatialReference_ConvertToOtherProjection, METH_VARARGS, "SpatialReference_ConvertToOtherProjection(SpatialReference self, char const * other_projection, char ** options=None) -> SpatialReference"},
20876 : { "SpatialReference_PromoteTo3D", _wrap_SpatialReference_PromoteTo3D, METH_VARARGS, "SpatialReference_PromoteTo3D(SpatialReference self, char const * name=None) -> OGRErr"},
20877 : { "SpatialReference_DemoteTo2D", _wrap_SpatialReference_DemoteTo2D, METH_VARARGS, "SpatialReference_DemoteTo2D(SpatialReference self, char const * name=None) -> OGRErr"},
20878 : { "SpatialReference_swigregister", SpatialReference_swigregister, METH_O, NULL},
20879 : { "SpatialReference_swiginit", SpatialReference_swiginit, METH_VARARGS, NULL},
20880 : { "new_CoordinateTransformationOptions", _wrap_new_CoordinateTransformationOptions, METH_NOARGS, "new_CoordinateTransformationOptions() -> CoordinateTransformationOptions"},
20881 : { "delete_CoordinateTransformationOptions", _wrap_delete_CoordinateTransformationOptions, METH_O, "delete_CoordinateTransformationOptions(CoordinateTransformationOptions self)"},
20882 : { "CoordinateTransformationOptions_SetAreaOfInterest", _wrap_CoordinateTransformationOptions_SetAreaOfInterest, METH_VARARGS, "CoordinateTransformationOptions_SetAreaOfInterest(CoordinateTransformationOptions self, double westLongitudeDeg, double southLatitudeDeg, double eastLongitudeDeg, double northLatitudeDeg) -> bool"},
20883 : { "CoordinateTransformationOptions_SetOperation", _wrap_CoordinateTransformationOptions_SetOperation, METH_VARARGS, "CoordinateTransformationOptions_SetOperation(CoordinateTransformationOptions self, char const * operation, bool inverseCT=False) -> bool"},
20884 : { "CoordinateTransformationOptions_SetDesiredAccuracy", _wrap_CoordinateTransformationOptions_SetDesiredAccuracy, METH_VARARGS, "CoordinateTransformationOptions_SetDesiredAccuracy(CoordinateTransformationOptions self, double accuracy) -> bool"},
20885 : { "CoordinateTransformationOptions_SetBallparkAllowed", _wrap_CoordinateTransformationOptions_SetBallparkAllowed, METH_VARARGS, "CoordinateTransformationOptions_SetBallparkAllowed(CoordinateTransformationOptions self, bool allowBallpark) -> bool"},
20886 : { "CoordinateTransformationOptions_SetOnlyBest", _wrap_CoordinateTransformationOptions_SetOnlyBest, METH_VARARGS, "CoordinateTransformationOptions_SetOnlyBest(CoordinateTransformationOptions self, bool onlyBest) -> bool"},
20887 : { "CoordinateTransformationOptions_swigregister", CoordinateTransformationOptions_swigregister, METH_O, NULL},
20888 : { "CoordinateTransformationOptions_swiginit", CoordinateTransformationOptions_swiginit, METH_VARARGS, NULL},
20889 : { "new_CoordinateTransformation", _wrap_new_CoordinateTransformation, METH_VARARGS, "\n"
20890 : "CoordinateTransformation(SpatialReference src, SpatialReference dst)\n"
20891 : "new_CoordinateTransformation(SpatialReference src, SpatialReference dst, CoordinateTransformationOptions options) -> CoordinateTransformation\n"
20892 : "\n"
20893 : "Python proxy of an :cpp:class:`OGRCoordinateTransformation`.\n"
20894 : "\n"
20895 : ""},
20896 : { "delete_CoordinateTransformation", _wrap_delete_CoordinateTransformation, METH_O, "delete_CoordinateTransformation(CoordinateTransformation self)"},
20897 : { "CoordinateTransformation_GetInverse", _wrap_CoordinateTransformation_GetInverse, METH_O, "CoordinateTransformation_GetInverse(CoordinateTransformation self) -> CoordinateTransformation"},
20898 : { "CoordinateTransformation__TransformPoint3Double", _wrap_CoordinateTransformation__TransformPoint3Double, METH_VARARGS, "CoordinateTransformation__TransformPoint3Double(CoordinateTransformation self, double [3] inout)"},
20899 : { "CoordinateTransformation__TransformPoint4Double", _wrap_CoordinateTransformation__TransformPoint4Double, METH_VARARGS, "CoordinateTransformation__TransformPoint4Double(CoordinateTransformation self, double [4] inout)"},
20900 : { "CoordinateTransformation_TransformPoint", _wrap_CoordinateTransformation_TransformPoint, METH_VARARGS, "\n"
20901 : "CoordinateTransformation_TransformPoint(CoordinateTransformation self, double x, double y, double z=0.0)\n"
20902 : "CoordinateTransformation_TransformPoint(CoordinateTransformation self, double x, double y, double z, double t)\n"
20903 : ""},
20904 : { "CoordinateTransformation_TransformPointWithErrorCode", _wrap_CoordinateTransformation_TransformPointWithErrorCode, METH_VARARGS, "\n"
20905 : "CoordinateTransformation_TransformPointWithErrorCode(CoordinateTransformation self, double x, double y, double z, double t)\n"
20906 : "\n"
20907 : "\n"
20908 : "Variant of :py:meth:`TransformPoint` that provides an error code.\n"
20909 : "\n"
20910 : "See :cpp:func:`OCTTransformEx`.\n"
20911 : "\n"
20912 : "Parameters\n"
20913 : "----------\n"
20914 : "x : float\n"
20915 : "y : float\n"
20916 : "z : float\n"
20917 : "t : float\n"
20918 : "\n"
20919 : "Returns\n"
20920 : "-------\n"
20921 : "tuple\n"
20922 : " tuple of (x, y, z, t, error) values\n"
20923 : "\n"
20924 : "\n"
20925 : ""},
20926 : { "CoordinateTransformation_TransformPoints", _wrap_CoordinateTransformation_TransformPoints, METH_VARARGS, "\n"
20927 : "CoordinateTransformation_TransformPoints(CoordinateTransformation self, int nCount)\n"
20928 : "\n"
20929 : "\n"
20930 : "Transform multiple points.\n"
20931 : "\n"
20932 : "See :cpp:func:`OCTTransform`.\n"
20933 : "\n"
20934 : "Parameters\n"
20935 : "----------\n"
20936 : "arg\n"
20937 : " A list of tuples, or a 2xN, 3xN, or 4xN numpy array\n"
20938 : "\n"
20939 : "Returns\n"
20940 : "-------\n"
20941 : "list\n"
20942 : " A list of tuples of (x, y, z) or (x, y, z, t) values, depending on the input.\n"
20943 : "\n"
20944 : "Examples\n"
20945 : "--------\n"
20946 : ">>> ct.TransformPoints([(-72.58, 44.26), (-72.59, 44.26)])\n"
20947 : "[(7390620.052019633, -51202148.77747277, 0.0), (7387261.070131293, -51200373.68798984, 0.0)]\n"
20948 : "\n"
20949 : ">>> import numpy as np\n"
20950 : ">>> ct.TransformPoints(np.array([[-72.58, 44.26], [-72.59, 44.26]]))\n"
20951 : "[(7390620.052019633, -51202148.77747277, 0.0), (7387261.070131293, -51200373.68798984, 0.0)]\n"
20952 : "\n"
20953 : "\n"
20954 : "\n"
20955 : ""},
20956 : { "CoordinateTransformation_TransformBounds", _wrap_CoordinateTransformation_TransformBounds, METH_VARARGS, "\n"
20957 : "CoordinateTransformation_TransformBounds(CoordinateTransformation self, double minx, double miny, double maxx, double maxy, int densify_pts)\n"
20958 : "\n"
20959 : "\n"
20960 : "Transform a boundary, densifying the edges to account for nonlinear\n"
20961 : "transformations along these edges.\n"
20962 : "\n"
20963 : "See :cpp:func:`OCTTransformBounds`.\n"
20964 : "\n"
20965 : "Parameters\n"
20966 : "----------\n"
20967 : "minx : float\n"
20968 : " Minimum bounding coordinate of the first axis in source CRS\n"
20969 : "miny : float\n"
20970 : " Minimum bounding coordinate of the second axis in source CRS\n"
20971 : "maxx : float\n"
20972 : " Maximum bounding coordinate of the first axis in source CRS\n"
20973 : "maxy : float\n"
20974 : " Maximum bounding coordinate of the second axis in source CRS\n"
20975 : "densify_pts : int\n"
20976 : " The number of points to use to densify the bounding polygon.\n"
20977 : " Recommended to use 21.\n"
20978 : "\n"
20979 : "Returns\n"
20980 : "-------\n"
20981 : "tuple\n"
20982 : " Transformed values of xmin, ymin, xmax, ymax\n"
20983 : "\n"
20984 : "Examples\n"
20985 : "--------\n"
20986 : ">>> ct.TransformBounds(-72.5, 44.2, -72.4, 44.3, 21)\n"
20987 : "(7415356.140468472, -51238192.683464445, 7454323.154814391, -51210287.42581475)\n"
20988 : "\n"
20989 : "\n"
20990 : ""},
20991 : { "CoordinateTransformation_swigregister", CoordinateTransformation_swigregister, METH_O, NULL},
20992 : { "CoordinateTransformation_swiginit", CoordinateTransformation_swiginit, METH_VARARGS, NULL},
20993 : { "CreateCoordinateTransformation", _wrap_CreateCoordinateTransformation, METH_VARARGS, "\n"
20994 : "CreateCoordinateTransformation(SpatialReference src, SpatialReference dst, CoordinateTransformationOptions options=None) -> CoordinateTransformation\n"
20995 : "\n"
20996 : "\n"
20997 : "Create a :py:class:`CoordinateTransformation` using a set of :py:class:`CoordinateTransformationOptions`.\n"
20998 : "\n"
20999 : "See :cpp:func:`OCTNewCoordinateTransformationEx`.\n"
21000 : "\n"
21001 : "Parameters\n"
21002 : "----------\n"
21003 : "src : SpatialReference\n"
21004 : " source spatial reference system\n"
21005 : "dst : SpatialReference\n"
21006 : " target spatial reference ystem\n"
21007 : "options : CoordinateTransformationOptions\n"
21008 : "\n"
21009 : "Returns\n"
21010 : "-------\n"
21011 : "CoordinateTransformation\n"
21012 : "\n"
21013 : "\n"
21014 : ""},
21015 : { "CRSInfo_auth_name_get", _wrap_CRSInfo_auth_name_get, METH_O, "CRSInfo_auth_name_get(CRSInfo self) -> char *"},
21016 : { "CRSInfo_code_get", _wrap_CRSInfo_code_get, METH_O, "CRSInfo_code_get(CRSInfo self) -> char *"},
21017 : { "CRSInfo_name_get", _wrap_CRSInfo_name_get, METH_O, "CRSInfo_name_get(CRSInfo self) -> char *"},
21018 : { "CRSInfo_type_get", _wrap_CRSInfo_type_get, METH_O, "CRSInfo_type_get(CRSInfo self) -> OSRCRSType"},
21019 : { "CRSInfo_deprecated_get", _wrap_CRSInfo_deprecated_get, METH_O, "CRSInfo_deprecated_get(CRSInfo self) -> bool"},
21020 : { "CRSInfo_bbox_valid_get", _wrap_CRSInfo_bbox_valid_get, METH_O, "CRSInfo_bbox_valid_get(CRSInfo self) -> bool"},
21021 : { "CRSInfo_west_lon_degree_get", _wrap_CRSInfo_west_lon_degree_get, METH_O, "CRSInfo_west_lon_degree_get(CRSInfo self) -> double"},
21022 : { "CRSInfo_south_lat_degree_get", _wrap_CRSInfo_south_lat_degree_get, METH_O, "CRSInfo_south_lat_degree_get(CRSInfo self) -> double"},
21023 : { "CRSInfo_east_lon_degree_get", _wrap_CRSInfo_east_lon_degree_get, METH_O, "CRSInfo_east_lon_degree_get(CRSInfo self) -> double"},
21024 : { "CRSInfo_north_lat_degree_get", _wrap_CRSInfo_north_lat_degree_get, METH_O, "CRSInfo_north_lat_degree_get(CRSInfo self) -> double"},
21025 : { "CRSInfo_area_name_get", _wrap_CRSInfo_area_name_get, METH_O, "CRSInfo_area_name_get(CRSInfo self) -> char *"},
21026 : { "CRSInfo_projection_method_get", _wrap_CRSInfo_projection_method_get, METH_O, "CRSInfo_projection_method_get(CRSInfo self) -> char *"},
21027 : { "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"},
21028 : { "delete_CRSInfo", _wrap_delete_CRSInfo, METH_O, "delete_CRSInfo(CRSInfo self)"},
21029 : { "CRSInfo_swigregister", CRSInfo_swigregister, METH_O, NULL},
21030 : { "CRSInfo_swiginit", CRSInfo_swiginit, METH_VARARGS, NULL},
21031 : { "OSRCRSInfo_auth_name_get", _wrap_OSRCRSInfo_auth_name_get, METH_O, "OSRCRSInfo_auth_name_get(CRSInfo crsInfo) -> char const *"},
21032 : { "OSRCRSInfo_code_get", _wrap_OSRCRSInfo_code_get, METH_O, "OSRCRSInfo_code_get(CRSInfo crsInfo) -> char const *"},
21033 : { "OSRCRSInfo_name_get", _wrap_OSRCRSInfo_name_get, METH_O, "OSRCRSInfo_name_get(CRSInfo crsInfo) -> char const *"},
21034 : { "OSRCRSInfo_type_get", _wrap_OSRCRSInfo_type_get, METH_O, "OSRCRSInfo_type_get(CRSInfo crsInfo) -> OSRCRSType"},
21035 : { "OSRCRSInfo_deprecated_get", _wrap_OSRCRSInfo_deprecated_get, METH_O, "OSRCRSInfo_deprecated_get(CRSInfo crsInfo) -> bool"},
21036 : { "OSRCRSInfo_bbox_valid_get", _wrap_OSRCRSInfo_bbox_valid_get, METH_O, "OSRCRSInfo_bbox_valid_get(CRSInfo crsInfo) -> bool"},
21037 : { "OSRCRSInfo_west_lon_degree_get", _wrap_OSRCRSInfo_west_lon_degree_get, METH_O, "OSRCRSInfo_west_lon_degree_get(CRSInfo crsInfo) -> double"},
21038 : { "OSRCRSInfo_south_lat_degree_get", _wrap_OSRCRSInfo_south_lat_degree_get, METH_O, "OSRCRSInfo_south_lat_degree_get(CRSInfo crsInfo) -> double"},
21039 : { "OSRCRSInfo_east_lon_degree_get", _wrap_OSRCRSInfo_east_lon_degree_get, METH_O, "OSRCRSInfo_east_lon_degree_get(CRSInfo crsInfo) -> double"},
21040 : { "OSRCRSInfo_north_lat_degree_get", _wrap_OSRCRSInfo_north_lat_degree_get, METH_O, "OSRCRSInfo_north_lat_degree_get(CRSInfo crsInfo) -> double"},
21041 : { "OSRCRSInfo_area_name_get", _wrap_OSRCRSInfo_area_name_get, METH_O, "OSRCRSInfo_area_name_get(CRSInfo crsInfo) -> char const *"},
21042 : { "OSRCRSInfo_projection_method_get", _wrap_OSRCRSInfo_projection_method_get, METH_O, "OSRCRSInfo_projection_method_get(CRSInfo crsInfo) -> char const *"},
21043 : { "GetCRSInfoListFromDatabase", _wrap_GetCRSInfoListFromDatabase, METH_O, "GetCRSInfoListFromDatabase(char const * authName)"},
21044 : { "SetPROJSearchPath", _wrap_SetPROJSearchPath, METH_O, "SetPROJSearchPath(char const * utf8_path)"},
21045 : { "SetPROJSearchPaths", _wrap_SetPROJSearchPaths, METH_O, "SetPROJSearchPaths(char ** paths)"},
21046 : { "GetPROJSearchPaths", _wrap_GetPROJSearchPaths, METH_NOARGS, "GetPROJSearchPaths() -> char **"},
21047 : { "GetPROJVersionMajor", _wrap_GetPROJVersionMajor, METH_NOARGS, "GetPROJVersionMajor() -> int"},
21048 : { "GetPROJVersionMinor", _wrap_GetPROJVersionMinor, METH_NOARGS, "GetPROJVersionMinor() -> int"},
21049 : { "GetPROJVersionMicro", _wrap_GetPROJVersionMicro, METH_NOARGS, "GetPROJVersionMicro() -> int"},
21050 : { "GetPROJEnableNetwork", _wrap_GetPROJEnableNetwork, METH_NOARGS, "GetPROJEnableNetwork() -> bool"},
21051 : { "SetPROJEnableNetwork", _wrap_SetPROJEnableNetwork, METH_O, "SetPROJEnableNetwork(bool enabled)"},
21052 : { "SetPROJAuxDbPath", _wrap_SetPROJAuxDbPath, METH_O, "SetPROJAuxDbPath(char const * utf8_path)"},
21053 : { "SetPROJAuxDbPaths", _wrap_SetPROJAuxDbPaths, METH_O, "SetPROJAuxDbPaths(char ** paths)"},
21054 : { "GetPROJAuxDbPaths", _wrap_GetPROJAuxDbPaths, METH_NOARGS, "GetPROJAuxDbPaths() -> char **"},
21055 : { NULL, NULL, 0, NULL }
21056 : };
21057 :
21058 : static PyMethodDef SwigMethods_proxydocs[] = {
21059 : { NULL, NULL, 0, NULL }
21060 : };
21061 :
21062 :
21063 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
21064 :
21065 : static swig_type_info _swigt__p_OGRCoordinateTransformationOptions = {"_p_OGRCoordinateTransformationOptions", "OGRCoordinateTransformationOptions *", 0, 0, (void*)0, 0};
21066 : static swig_type_info _swigt__p_OSRAreaOfUse = {"_p_OSRAreaOfUse", "OSRAreaOfUse *", 0, 0, (void*)0, 0};
21067 : static swig_type_info _swigt__p_OSRCRSInfo = {"_p_OSRCRSInfo", "OSRCRSInfo *", 0, 0, (void*)0, 0};
21068 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
21069 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
21070 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
21071 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
21072 : static swig_type_info _swigt__p_int = {"_p_int", "OSRAxisMappingStrategy *|int *|OGRAxisOrientation *|OGRErr *", 0, 0, (void*)0, 0};
21073 : static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
21074 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
21075 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
21076 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
21077 : static swig_type_info _swigt__p_p_p_OSRCRSInfo = {"_p_p_p_OSRCRSInfo", "OSRCRSInfo ***", 0, 0, (void*)0, 0};
21078 : static swig_type_info _swigt__p_p_p_OSRSpatialReferenceShadow = {"_p_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow ***", 0, 0, (void*)0, 0};
21079 :
21080 : static swig_type_info *swig_type_initial[] = {
21081 : &_swigt__p_OGRCoordinateTransformationOptions,
21082 : &_swigt__p_OSRAreaOfUse,
21083 : &_swigt__p_OSRCRSInfo,
21084 : &_swigt__p_OSRCoordinateTransformationShadow,
21085 : &_swigt__p_OSRSpatialReferenceShadow,
21086 : &_swigt__p_char,
21087 : &_swigt__p_double,
21088 : &_swigt__p_int,
21089 : &_swigt__p_long,
21090 : &_swigt__p_p_char,
21091 : &_swigt__p_p_double,
21092 : &_swigt__p_p_int,
21093 : &_swigt__p_p_p_OSRCRSInfo,
21094 : &_swigt__p_p_p_OSRSpatialReferenceShadow,
21095 : };
21096 :
21097 : static swig_cast_info _swigc__p_OGRCoordinateTransformationOptions[] = { {&_swigt__p_OGRCoordinateTransformationOptions, 0, 0, 0},{0, 0, 0, 0}};
21098 : static swig_cast_info _swigc__p_OSRAreaOfUse[] = { {&_swigt__p_OSRAreaOfUse, 0, 0, 0},{0, 0, 0, 0}};
21099 : static swig_cast_info _swigc__p_OSRCRSInfo[] = { {&_swigt__p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21100 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
21101 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21102 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
21103 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
21104 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
21105 : static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
21106 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
21107 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
21108 : static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
21109 : static swig_cast_info _swigc__p_p_p_OSRCRSInfo[] = { {&_swigt__p_p_p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21110 : static swig_cast_info _swigc__p_p_p_OSRSpatialReferenceShadow[] = { {&_swigt__p_p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21111 :
21112 : static swig_cast_info *swig_cast_initial[] = {
21113 : _swigc__p_OGRCoordinateTransformationOptions,
21114 : _swigc__p_OSRAreaOfUse,
21115 : _swigc__p_OSRCRSInfo,
21116 : _swigc__p_OSRCoordinateTransformationShadow,
21117 : _swigc__p_OSRSpatialReferenceShadow,
21118 : _swigc__p_char,
21119 : _swigc__p_double,
21120 : _swigc__p_int,
21121 : _swigc__p_long,
21122 : _swigc__p_p_char,
21123 : _swigc__p_p_double,
21124 : _swigc__p_p_int,
21125 : _swigc__p_p_p_OSRCRSInfo,
21126 : _swigc__p_p_p_OSRSpatialReferenceShadow,
21127 : };
21128 :
21129 :
21130 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
21131 :
21132 : static swig_const_info swig_const_table[] = {
21133 : {0, 0, 0, 0.0, 0, 0}};
21134 :
21135 : #ifdef __cplusplus
21136 : }
21137 : #endif
21138 : /* -----------------------------------------------------------------------------
21139 : * Type initialization:
21140 : * This problem is tough by the requirement that no dynamic
21141 : * memory is used. Also, since swig_type_info structures store pointers to
21142 : * swig_cast_info structures and swig_cast_info structures store pointers back
21143 : * to swig_type_info structures, we need some lookup code at initialization.
21144 : * The idea is that swig generates all the structures that are needed.
21145 : * The runtime then collects these partially filled structures.
21146 : * The SWIG_InitializeModule function takes these initial arrays out of
21147 : * swig_module, and does all the lookup, filling in the swig_module.types
21148 : * array with the correct data and linking the correct swig_cast_info
21149 : * structures together.
21150 : *
21151 : * The generated swig_type_info structures are assigned statically to an initial
21152 : * array. We just loop through that array, and handle each type individually.
21153 : * First we lookup if this type has been already loaded, and if so, use the
21154 : * loaded structure instead of the generated one. Then we have to fill in the
21155 : * cast linked list. The cast data is initially stored in something like a
21156 : * two-dimensional array. Each row corresponds to a type (there are the same
21157 : * number of rows as there are in the swig_type_initial array). Each entry in
21158 : * a column is one of the swig_cast_info structures for that type.
21159 : * The cast_initial array is actually an array of arrays, because each row has
21160 : * a variable number of columns. So to actually build the cast linked list,
21161 : * we find the array of casts associated with the type, and loop through it
21162 : * adding the casts to the list. The one last trick we need to do is making
21163 : * sure the type pointer in the swig_cast_info struct is correct.
21164 : *
21165 : * First off, we lookup the cast->type name to see if it is already loaded.
21166 : * There are three cases to handle:
21167 : * 1) If the cast->type has already been loaded AND the type we are adding
21168 : * casting info to has not been loaded (it is in this module), THEN we
21169 : * replace the cast->type pointer with the type pointer that has already
21170 : * been loaded.
21171 : * 2) If BOTH types (the one we are adding casting info to, and the
21172 : * cast->type) are loaded, THEN the cast info has already been loaded by
21173 : * the previous module so we just ignore it.
21174 : * 3) Finally, if cast->type has not already been loaded, then we add that
21175 : * swig_cast_info to the linked list (because the cast->type) pointer will
21176 : * be correct.
21177 : * ----------------------------------------------------------------------------- */
21178 :
21179 : #ifdef __cplusplus
21180 : extern "C" {
21181 : #if 0
21182 : } /* c-mode */
21183 : #endif
21184 : #endif
21185 :
21186 : #if 0
21187 : #define SWIGRUNTIME_DEBUG
21188 : #endif
21189 :
21190 :
21191 : SWIGRUNTIME void
21192 : SWIG_InitializeModule(void *clientdata) {
21193 : size_t i;
21194 : swig_module_info *module_head, *iter;
21195 : int init;
21196 :
21197 : /* check to see if the circular list has been setup, if not, set it up */
21198 : if (swig_module.next==0) {
21199 : /* Initialize the swig_module */
21200 : swig_module.type_initial = swig_type_initial;
21201 : swig_module.cast_initial = swig_cast_initial;
21202 : swig_module.next = &swig_module;
21203 : init = 1;
21204 : } else {
21205 : init = 0;
21206 : }
21207 :
21208 : /* Try and load any already created modules */
21209 : module_head = SWIG_GetModule(clientdata);
21210 : if (!module_head) {
21211 : /* This is the first module loaded for this interpreter */
21212 : /* so set the swig module into the interpreter */
21213 : SWIG_SetModule(clientdata, &swig_module);
21214 : } else {
21215 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
21216 : iter=module_head;
21217 : do {
21218 : if (iter==&swig_module) {
21219 : /* Our module is already in the list, so there's nothing more to do. */
21220 : return;
21221 : }
21222 : iter=iter->next;
21223 : } while (iter!= module_head);
21224 :
21225 : /* otherwise we must add our module into the list */
21226 : swig_module.next = module_head->next;
21227 : module_head->next = &swig_module;
21228 : }
21229 :
21230 : /* When multiple interpreters are used, a module could have already been initialized in
21231 : a different interpreter, but not yet have a pointer in this interpreter.
21232 : In this case, we do not want to continue adding types... everything should be
21233 : set up already */
21234 : if (init == 0) return;
21235 :
21236 : /* Now work on filling in swig_module.types */
21237 : #ifdef SWIGRUNTIME_DEBUG
21238 : printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
21239 : #endif
21240 : for (i = 0; i < swig_module.size; ++i) {
21241 : swig_type_info *type = 0;
21242 : swig_type_info *ret;
21243 : swig_cast_info *cast;
21244 :
21245 : #ifdef SWIGRUNTIME_DEBUG
21246 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21247 : #endif
21248 :
21249 : /* if there is another module already loaded */
21250 : if (swig_module.next != &swig_module) {
21251 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
21252 : }
21253 : if (type) {
21254 : /* Overwrite clientdata field */
21255 : #ifdef SWIGRUNTIME_DEBUG
21256 : printf("SWIG_InitializeModule: found type %s\n", type->name);
21257 : #endif
21258 : if (swig_module.type_initial[i]->clientdata) {
21259 : type->clientdata = swig_module.type_initial[i]->clientdata;
21260 : #ifdef SWIGRUNTIME_DEBUG
21261 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
21262 : #endif
21263 : }
21264 : } else {
21265 : type = swig_module.type_initial[i];
21266 : }
21267 :
21268 : /* Insert casting types */
21269 : cast = swig_module.cast_initial[i];
21270 : while (cast->type) {
21271 : /* Don't need to add information already in the list */
21272 : ret = 0;
21273 : #ifdef SWIGRUNTIME_DEBUG
21274 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
21275 : #endif
21276 : if (swig_module.next != &swig_module) {
21277 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
21278 : #ifdef SWIGRUNTIME_DEBUG
21279 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
21280 : #endif
21281 : }
21282 : if (ret) {
21283 : if (type == swig_module.type_initial[i]) {
21284 : #ifdef SWIGRUNTIME_DEBUG
21285 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
21286 : #endif
21287 : cast->type = ret;
21288 : ret = 0;
21289 : } else {
21290 : /* Check for casting already in the list */
21291 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
21292 : #ifdef SWIGRUNTIME_DEBUG
21293 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
21294 : #endif
21295 : if (!ocast) ret = 0;
21296 : }
21297 : }
21298 :
21299 : if (!ret) {
21300 : #ifdef SWIGRUNTIME_DEBUG
21301 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
21302 : #endif
21303 : if (type->cast) {
21304 : type->cast->prev = cast;
21305 : cast->next = type->cast;
21306 : }
21307 : type->cast = cast;
21308 : }
21309 : cast++;
21310 : }
21311 : /* Set entry in modules->types array equal to the type */
21312 : swig_module.types[i] = type;
21313 : }
21314 : swig_module.types[i] = 0;
21315 :
21316 : #ifdef SWIGRUNTIME_DEBUG
21317 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21318 : for (i = 0; i < swig_module.size; ++i) {
21319 : int j = 0;
21320 : swig_cast_info *cast = swig_module.cast_initial[i];
21321 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21322 : while (cast->type) {
21323 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
21324 : cast++;
21325 : ++j;
21326 : }
21327 : printf("---- Total casts: %d\n",j);
21328 : }
21329 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21330 : #endif
21331 : }
21332 :
21333 : /* This function will propagate the clientdata field of type to
21334 : * any new swig_type_info structures that have been added into the list
21335 : * of equivalent types. It is like calling
21336 : * SWIG_TypeClientData(type, clientdata) a second time.
21337 : */
21338 : SWIGRUNTIME void
21339 : SWIG_PropagateClientData(void) {
21340 : size_t i;
21341 : swig_cast_info *equiv;
21342 : static int init_run = 0;
21343 :
21344 : if (init_run) return;
21345 : init_run = 1;
21346 :
21347 : for (i = 0; i < swig_module.size; i++) {
21348 : if (swig_module.types[i]->clientdata) {
21349 : equiv = swig_module.types[i]->cast;
21350 : while (equiv) {
21351 : if (!equiv->converter) {
21352 : if (equiv->type && !equiv->type->clientdata)
21353 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
21354 : }
21355 : equiv = equiv->next;
21356 : }
21357 : }
21358 : }
21359 : }
21360 :
21361 : #ifdef __cplusplus
21362 : #if 0
21363 : {
21364 : /* c-mode */
21365 : #endif
21366 : }
21367 : #endif
21368 :
21369 :
21370 :
21371 : #ifdef __cplusplus
21372 : extern "C" {
21373 : #endif
21374 :
21375 : /* Python-specific SWIG API */
21376 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
21377 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
21378 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
21379 :
21380 : /* -----------------------------------------------------------------------------
21381 : * global variable support code.
21382 : * ----------------------------------------------------------------------------- */
21383 :
21384 : typedef struct swig_globalvar {
21385 : char *name; /* Name of global variable */
21386 : PyObject *(*get_attr)(void); /* Return the current value */
21387 : int (*set_attr)(PyObject *); /* Set the value */
21388 : struct swig_globalvar *next;
21389 : } swig_globalvar;
21390 :
21391 : typedef struct swig_varlinkobject {
21392 : PyObject_HEAD
21393 : swig_globalvar *vars;
21394 : } swig_varlinkobject;
21395 :
21396 : SWIGINTERN PyObject *
21397 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
21398 : #if PY_VERSION_HEX >= 0x03000000
21399 : return PyUnicode_InternFromString("<Swig global variables>");
21400 : #else
21401 : return PyString_FromString("<Swig global variables>");
21402 : #endif
21403 : }
21404 :
21405 : SWIGINTERN PyObject *
21406 : swig_varlink_str(swig_varlinkobject *v) {
21407 : #if PY_VERSION_HEX >= 0x03000000
21408 : PyObject *str = PyUnicode_InternFromString("(");
21409 : PyObject *tail;
21410 : PyObject *joined;
21411 : swig_globalvar *var;
21412 : for (var = v->vars; var; var=var->next) {
21413 : tail = PyUnicode_FromString(var->name);
21414 : joined = PyUnicode_Concat(str, tail);
21415 : Py_DecRef(str);
21416 : Py_DecRef(tail);
21417 : str = joined;
21418 : if (var->next) {
21419 : tail = PyUnicode_InternFromString(", ");
21420 : joined = PyUnicode_Concat(str, tail);
21421 : Py_DecRef(str);
21422 : Py_DecRef(tail);
21423 : str = joined;
21424 : }
21425 : }
21426 : tail = PyUnicode_InternFromString(")");
21427 : joined = PyUnicode_Concat(str, tail);
21428 : Py_DecRef(str);
21429 : Py_DecRef(tail);
21430 : str = joined;
21431 : #else
21432 : PyObject *str = PyString_FromString("(");
21433 : swig_globalvar *var;
21434 : for (var = v->vars; var; var=var->next) {
21435 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
21436 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
21437 : }
21438 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
21439 : #endif
21440 : return str;
21441 : }
21442 :
21443 : SWIGINTERN void
21444 : swig_varlink_dealloc(swig_varlinkobject *v) {
21445 : swig_globalvar *var = v->vars;
21446 : while (var) {
21447 : swig_globalvar *n = var->next;
21448 : free(var->name);
21449 : free(var);
21450 : var = n;
21451 : }
21452 : }
21453 :
21454 : SWIGINTERN PyObject *
21455 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
21456 : PyObject *res = NULL;
21457 : swig_globalvar *var = v->vars;
21458 : while (var) {
21459 : if (strcmp(var->name,n) == 0) {
21460 : res = (*var->get_attr)();
21461 : break;
21462 : }
21463 : var = var->next;
21464 : }
21465 : if (res == NULL && !PyErr_Occurred()) {
21466 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21467 : }
21468 : return res;
21469 : }
21470 :
21471 : SWIGINTERN int
21472 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
21473 : int res = 1;
21474 : swig_globalvar *var = v->vars;
21475 : while (var) {
21476 : if (strcmp(var->name,n) == 0) {
21477 : res = (*var->set_attr)(p);
21478 : break;
21479 : }
21480 : var = var->next;
21481 : }
21482 : if (res == 1 && !PyErr_Occurred()) {
21483 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21484 : }
21485 : return res;
21486 : }
21487 :
21488 : SWIGINTERN PyTypeObject*
21489 : swig_varlink_type(void) {
21490 : static char varlink__doc__[] = "Swig var link object";
21491 : static PyTypeObject varlink_type;
21492 : static int type_init = 0;
21493 : if (!type_init) {
21494 : const PyTypeObject tmp = {
21495 : #if PY_VERSION_HEX >= 0x03000000
21496 : PyVarObject_HEAD_INIT(NULL, 0)
21497 : #else
21498 : PyObject_HEAD_INIT(NULL)
21499 : 0, /* ob_size */
21500 : #endif
21501 : "swigvarlink", /* tp_name */
21502 : sizeof(swig_varlinkobject), /* tp_basicsize */
21503 : 0, /* tp_itemsize */
21504 : (destructor) swig_varlink_dealloc, /* tp_dealloc */
21505 : 0, /* tp_print */
21506 : (getattrfunc) swig_varlink_getattr, /* tp_getattr */
21507 : (setattrfunc) swig_varlink_setattr, /* tp_setattr */
21508 : 0, /* tp_compare */
21509 : (reprfunc) swig_varlink_repr, /* tp_repr */
21510 : 0, /* tp_as_number */
21511 : 0, /* tp_as_sequence */
21512 : 0, /* tp_as_mapping */
21513 : 0, /* tp_hash */
21514 : 0, /* tp_call */
21515 : (reprfunc) swig_varlink_str, /* tp_str */
21516 : 0, /* tp_getattro */
21517 : 0, /* tp_setattro */
21518 : 0, /* tp_as_buffer */
21519 : 0, /* tp_flags */
21520 : varlink__doc__, /* tp_doc */
21521 : 0, /* tp_traverse */
21522 : 0, /* tp_clear */
21523 : 0, /* tp_richcompare */
21524 : 0, /* tp_weaklistoffset */
21525 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
21526 : 0, /* tp_del */
21527 : 0, /* tp_version_tag */
21528 : #if PY_VERSION_HEX >= 0x03040000
21529 : 0, /* tp_finalize */
21530 : #endif
21531 : #ifdef COUNT_ALLOCS
21532 : 0, /* tp_allocs */
21533 : 0, /* tp_frees */
21534 : 0, /* tp_maxalloc */
21535 : 0, /* tp_prev */
21536 : 0 /* tp_next */
21537 : #endif
21538 : };
21539 : varlink_type = tmp;
21540 : type_init = 1;
21541 : if (PyType_Ready(&varlink_type) < 0)
21542 : return NULL;
21543 : }
21544 : return &varlink_type;
21545 : }
21546 :
21547 : /* Create a variable linking object for use later */
21548 : SWIGINTERN PyObject *
21549 : SWIG_Python_newvarlink(void) {
21550 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
21551 : if (result) {
21552 : result->vars = 0;
21553 : }
21554 : return ((PyObject*) result);
21555 : }
21556 :
21557 : SWIGINTERN void
21558 : SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
21559 : swig_varlinkobject *v = (swig_varlinkobject *) p;
21560 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
21561 : if (gv) {
21562 : size_t size = strlen(name)+1;
21563 : gv->name = (char *)malloc(size);
21564 : if (gv->name) {
21565 : memcpy(gv->name, name, size);
21566 : gv->get_attr = get_attr;
21567 : gv->set_attr = set_attr;
21568 : gv->next = v->vars;
21569 : }
21570 : }
21571 : v->vars = gv;
21572 : }
21573 :
21574 : SWIGINTERN PyObject *
21575 : SWIG_globals(void) {
21576 : static PyObject *globals = 0;
21577 : if (!globals) {
21578 : globals = SWIG_newvarlink();
21579 : }
21580 : return globals;
21581 : }
21582 :
21583 : /* -----------------------------------------------------------------------------
21584 : * constants/methods manipulation
21585 : * ----------------------------------------------------------------------------- */
21586 :
21587 : /* Install Constants */
21588 : SWIGINTERN void
21589 271 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
21590 271 : PyObject *obj = 0;
21591 271 : size_t i;
21592 271 : for (i = 0; constants[i].type; ++i) {
21593 0 : switch(constants[i].type) {
21594 0 : case SWIG_PY_POINTER:
21595 0 : obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
21596 0 : break;
21597 0 : case SWIG_PY_BINARY:
21598 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
21599 : break;
21600 : default:
21601 : obj = 0;
21602 : break;
21603 : }
21604 0 : if (obj) {
21605 0 : PyDict_SetItemString(d, constants[i].name, obj);
21606 0 : Py_DECREF(obj);
21607 : }
21608 : }
21609 271 : }
21610 :
21611 : /* -----------------------------------------------------------------------------*/
21612 : /* Fix SwigMethods to carry the callback ptrs when needed */
21613 : /* -----------------------------------------------------------------------------*/
21614 :
21615 : SWIGINTERN void
21616 271 : SWIG_Python_FixMethods(PyMethodDef *methods,
21617 : swig_const_info *const_table,
21618 : swig_type_info **types,
21619 : swig_type_info **types_initial) {
21620 271 : size_t i;
21621 62601 : for (i = 0; methods[i].ml_name; ++i) {
21622 62330 : const char *c = methods[i].ml_doc;
21623 62330 : if (!c) continue;
21624 59349 : c = strstr(c, "swig_ptr: ");
21625 59349 : if (c) {
21626 0 : int j;
21627 0 : swig_const_info *ci = 0;
21628 0 : const char *name = c + 10;
21629 0 : for (j = 0; const_table[j].type; ++j) {
21630 0 : if (strncmp(const_table[j].name, name,
21631 : strlen(const_table[j].name)) == 0) {
21632 : ci = &(const_table[j]);
21633 : break;
21634 : }
21635 : }
21636 0 : if (ci) {
21637 62330 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
21638 0 : if (ptr) {
21639 0 : size_t shift = (ci->ptype) - types;
21640 0 : swig_type_info *ty = types_initial[shift];
21641 0 : size_t ldoc = (c - methods[i].ml_doc);
21642 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
21643 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
21644 0 : if (ndoc) {
21645 0 : char *buff = ndoc;
21646 0 : memcpy(buff, methods[i].ml_doc, ldoc);
21647 0 : buff += ldoc;
21648 0 : memcpy(buff, "swig_ptr: ", 10);
21649 0 : buff += 10;
21650 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
21651 0 : methods[i].ml_doc = ndoc;
21652 : }
21653 : }
21654 : }
21655 : }
21656 : }
21657 271 : }
21658 :
21659 : /* -----------------------------------------------------------------------------
21660 : * Method creation and docstring support functions
21661 : * ----------------------------------------------------------------------------- */
21662 :
21663 : /* -----------------------------------------------------------------------------
21664 : * Function to find the method definition with the correct docstring for the
21665 : * proxy module as opposed to the low-level API
21666 : * ----------------------------------------------------------------------------- */
21667 :
21668 0 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
21669 : /* Find the function in the modified method table */
21670 0 : size_t offset = 0;
21671 0 : int found = 0;
21672 0 : while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
21673 0 : if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
21674 : found = 1;
21675 : break;
21676 : }
21677 0 : offset++;
21678 : }
21679 : /* Use the copy with the modified docstring if available */
21680 0 : return found ? &SwigMethods_proxydocs[offset] : NULL;
21681 : }
21682 :
21683 : /* -----------------------------------------------------------------------------
21684 : * Wrapper of PyInstanceMethod_New() used in Python 3
21685 : * It is exported to the generated module, used for -fastproxy
21686 : * ----------------------------------------------------------------------------- */
21687 :
21688 0 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
21689 0 : if (PyCFunction_Check(func)) {
21690 0 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
21691 0 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
21692 0 : if (ml)
21693 0 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
21694 : }
21695 : #if PY_VERSION_HEX >= 0x03000000
21696 0 : return PyInstanceMethod_New(func);
21697 : #else
21698 : return PyMethod_New(func, NULL, NULL);
21699 : #endif
21700 : }
21701 :
21702 : /* -----------------------------------------------------------------------------
21703 : * Wrapper of PyStaticMethod_New()
21704 : * It is exported to the generated module, used for -fastproxy
21705 : * ----------------------------------------------------------------------------- */
21706 :
21707 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
21708 : if (PyCFunction_Check(func)) {
21709 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
21710 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
21711 : if (ml)
21712 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
21713 : }
21714 : return PyStaticMethod_New(func);
21715 : }
21716 :
21717 : #ifdef __cplusplus
21718 : }
21719 : #endif
21720 :
21721 : /* -----------------------------------------------------------------------------*
21722 : * Partial Init method
21723 : * -----------------------------------------------------------------------------*/
21724 :
21725 : #ifdef __cplusplus
21726 : extern "C"
21727 : #endif
21728 :
21729 : SWIGEXPORT
21730 : #if PY_VERSION_HEX >= 0x03000000
21731 : PyObject*
21732 : #else
21733 : void
21734 : #endif
21735 271 : SWIG_init(void) {
21736 271 : PyObject *m, *d, *md, *globals;
21737 :
21738 : #if PY_VERSION_HEX >= 0x03000000
21739 271 : static struct PyModuleDef SWIG_module = {
21740 : PyModuleDef_HEAD_INIT,
21741 : SWIG_name,
21742 : NULL,
21743 : -1,
21744 : SwigMethods,
21745 : NULL,
21746 : NULL,
21747 : NULL,
21748 : NULL
21749 : };
21750 : #endif
21751 :
21752 : #if defined(SWIGPYTHON_BUILTIN)
21753 : static SwigPyClientData SwigPyObject_clientdata = {
21754 : 0, 0, 0, 0, 0, 0, 0
21755 : };
21756 : static PyGetSetDef this_getset_def = {
21757 : (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
21758 : };
21759 : static SwigPyGetSet thisown_getset_closure = {
21760 : SwigPyObject_own,
21761 : SwigPyObject_own
21762 : };
21763 : static PyGetSetDef thisown_getset_def = {
21764 : (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
21765 : };
21766 : PyTypeObject *builtin_pytype;
21767 : int builtin_base_count;
21768 : swig_type_info *builtin_basetype;
21769 : PyObject *tuple;
21770 : PyGetSetDescrObject *static_getset;
21771 : PyTypeObject *metatype;
21772 : PyTypeObject *swigpyobject;
21773 : SwigPyClientData *cd;
21774 : PyObject *public_interface, *public_symbol;
21775 : PyObject *this_descr;
21776 : PyObject *thisown_descr;
21777 : PyObject *self = 0;
21778 : int i;
21779 :
21780 : (void)builtin_pytype;
21781 : (void)builtin_base_count;
21782 : (void)builtin_basetype;
21783 : (void)tuple;
21784 : (void)static_getset;
21785 : (void)self;
21786 :
21787 : /* Metaclass is used to implement static member variables */
21788 : metatype = SwigPyObjectType();
21789 : assert(metatype);
21790 : #endif
21791 :
21792 271 : (void)globals;
21793 :
21794 : /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
21795 271 : SWIG_This();
21796 271 : SWIG_Python_TypeCache();
21797 271 : SwigPyPacked_type();
21798 : #ifndef SWIGPYTHON_BUILTIN
21799 271 : SwigPyObject_type();
21800 : #endif
21801 :
21802 : /* Fix SwigMethods to carry the callback ptrs when needed */
21803 271 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
21804 :
21805 : #if PY_VERSION_HEX >= 0x03000000
21806 271 : m = PyModule_Create(&SWIG_module);
21807 : #else
21808 : m = Py_InitModule(SWIG_name, SwigMethods);
21809 : #endif
21810 :
21811 271 : md = d = PyModule_GetDict(m);
21812 271 : (void)md;
21813 :
21814 271 : SWIG_InitializeModule(0);
21815 :
21816 : #ifdef SWIGPYTHON_BUILTIN
21817 : swigpyobject = SwigPyObject_TypeOnce();
21818 :
21819 : SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
21820 : assert(SwigPyObject_stype);
21821 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
21822 : if (!cd) {
21823 : SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
21824 : SwigPyObject_clientdata.pytype = swigpyobject;
21825 : } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
21826 : PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
21827 : # if PY_VERSION_HEX >= 0x03000000
21828 : return NULL;
21829 : # else
21830 : return;
21831 : # endif
21832 : }
21833 :
21834 : /* All objects have a 'this' attribute */
21835 : this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
21836 : (void)this_descr;
21837 :
21838 : /* All objects have a 'thisown' attribute */
21839 : thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
21840 : (void)thisown_descr;
21841 :
21842 : public_interface = PyList_New(0);
21843 : public_symbol = 0;
21844 : (void)public_symbol;
21845 :
21846 : PyDict_SetItemString(md, "__all__", public_interface);
21847 : Py_DECREF(public_interface);
21848 : for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
21849 : SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
21850 : for (i = 0; swig_const_table[i].name != 0; ++i)
21851 : SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
21852 : #endif
21853 :
21854 271 : SWIG_InstallConstants(d,swig_const_table);
21855 :
21856 271 : 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\"]]"));
21857 271 : SWIG_Python_SetConstant(d, "SRS_PT_ALBERS_CONIC_EQUAL_AREA",SWIG_FromCharPtr("Albers_Conic_Equal_Area"));
21858 271 : SWIG_Python_SetConstant(d, "SRS_PT_AZIMUTHAL_EQUIDISTANT",SWIG_FromCharPtr("Azimuthal_Equidistant"));
21859 271 : SWIG_Python_SetConstant(d, "SRS_PT_CASSINI_SOLDNER",SWIG_FromCharPtr("Cassini_Soldner"));
21860 271 : SWIG_Python_SetConstant(d, "SRS_PT_CYLINDRICAL_EQUAL_AREA",SWIG_FromCharPtr("Cylindrical_Equal_Area"));
21861 271 : SWIG_Python_SetConstant(d, "SRS_PT_BONNE",SWIG_FromCharPtr("Bonne"));
21862 271 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_I",SWIG_FromCharPtr("Eckert_I"));
21863 271 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_II",SWIG_FromCharPtr("Eckert_II"));
21864 271 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_III",SWIG_FromCharPtr("Eckert_III"));
21865 271 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_IV",SWIG_FromCharPtr("Eckert_IV"));
21866 271 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_V",SWIG_FromCharPtr("Eckert_V"));
21867 271 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_VI",SWIG_FromCharPtr("Eckert_VI"));
21868 271 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIDISTANT_CONIC",SWIG_FromCharPtr("Equidistant_Conic"));
21869 271 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIRECTANGULAR",SWIG_FromCharPtr("Equirectangular"));
21870 271 : SWIG_Python_SetConstant(d, "SRS_PT_GALL_STEREOGRAPHIC",SWIG_FromCharPtr("Gall_Stereographic"));
21871 271 : SWIG_Python_SetConstant(d, "SRS_PT_GAUSSSCHREIBERTMERCATOR",SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
21872 271 : SWIG_Python_SetConstant(d, "SRS_PT_GEOSTATIONARY_SATELLITE",SWIG_FromCharPtr("Geostationary_Satellite"));
21873 271 : SWIG_Python_SetConstant(d, "SRS_PT_GOODE_HOMOLOSINE",SWIG_FromCharPtr("Goode_Homolosine"));
21874 271 : SWIG_Python_SetConstant(d, "SRS_PT_IGH",SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
21875 271 : SWIG_Python_SetConstant(d, "SRS_PT_GNOMONIC",SWIG_FromCharPtr("Gnomonic"));
21876 271 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Azimuth_Center"));
21877 271 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
21878 271 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
21879 271 : SWIG_Python_SetConstant(d, "SRS_PT_LABORDE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
21880 271 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_1SP"));
21881 271 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP"));
21882 271 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP_Belgium"));
21883 271 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA",SWIG_FromCharPtr("Lambert_Azimuthal_Equal_Area"));
21884 271 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_1SP",SWIG_FromCharPtr("Mercator_1SP"));
21885 271 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_2SP",SWIG_FromCharPtr("Mercator_2SP"));
21886 271 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_AUXILIARY_SPHERE",SWIG_FromCharPtr("Mercator_Auxiliary_Sphere"));
21887 271 : SWIG_Python_SetConstant(d, "SRS_PT_MILLER_CYLINDRICAL",SWIG_FromCharPtr("Miller_Cylindrical"));
21888 271 : SWIG_Python_SetConstant(d, "SRS_PT_MOLLWEIDE",SWIG_FromCharPtr("Mollweide"));
21889 271 : SWIG_Python_SetConstant(d, "SRS_PT_NEW_ZEALAND_MAP_GRID",SWIG_FromCharPtr("New_Zealand_Map_Grid"));
21890 271 : SWIG_Python_SetConstant(d, "SRS_PT_OBLIQUE_STEREOGRAPHIC",SWIG_FromCharPtr("Oblique_Stereographic"));
21891 271 : SWIG_Python_SetConstant(d, "SRS_PT_ORTHOGRAPHIC",SWIG_FromCharPtr("Orthographic"));
21892 271 : SWIG_Python_SetConstant(d, "SRS_PT_POLAR_STEREOGRAPHIC",SWIG_FromCharPtr("Polar_Stereographic"));
21893 271 : SWIG_Python_SetConstant(d, "SRS_PT_POLYCONIC",SWIG_FromCharPtr("Polyconic"));
21894 271 : SWIG_Python_SetConstant(d, "SRS_PT_ROBINSON",SWIG_FromCharPtr("Robinson"));
21895 271 : SWIG_Python_SetConstant(d, "SRS_PT_SINUSOIDAL",SWIG_FromCharPtr("Sinusoidal"));
21896 271 : SWIG_Python_SetConstant(d, "SRS_PT_STEREOGRAPHIC",SWIG_FromCharPtr("Stereographic"));
21897 271 : SWIG_Python_SetConstant(d, "SRS_PT_SWISS_OBLIQUE_CYLINDRICAL",SWIG_FromCharPtr("Swiss_Oblique_Cylindrical"));
21898 271 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR",SWIG_FromCharPtr("Transverse_Mercator"));
21899 271 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED",SWIG_FromCharPtr("Transverse_Mercator_South_Orientated"));
21900 271 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_21",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_21"));
21901 271 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_22",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_22"));
21902 271 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_23",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_23"));
21903 271 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_24",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_24"));
21904 271 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_25",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_25"));
21905 271 : SWIG_Python_SetConstant(d, "SRS_PT_TUNISIA_MINING_GRID",SWIG_FromCharPtr("Tunisia_Mining_Grid"));
21906 271 : SWIG_Python_SetConstant(d, "SRS_PT_TWO_POINT_EQUIDISTANT",SWIG_FromCharPtr("Two_Point_Equidistant"));
21907 271 : SWIG_Python_SetConstant(d, "SRS_PT_VANDERGRINTEN",SWIG_FromCharPtr("VanDerGrinten"));
21908 271 : SWIG_Python_SetConstant(d, "SRS_PT_KROVAK",SWIG_FromCharPtr("Krovak"));
21909 271 : SWIG_Python_SetConstant(d, "SRS_PT_IMW_POLYCONIC",SWIG_FromCharPtr("International_Map_of_the_World_Polyconic"));
21910 271 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_I",SWIG_FromCharPtr("Wagner_I"));
21911 271 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_II",SWIG_FromCharPtr("Wagner_II"));
21912 271 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_III",SWIG_FromCharPtr("Wagner_III"));
21913 271 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_IV",SWIG_FromCharPtr("Wagner_IV"));
21914 271 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_V",SWIG_FromCharPtr("Wagner_V"));
21915 271 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VI",SWIG_FromCharPtr("Wagner_VI"));
21916 271 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VII",SWIG_FromCharPtr("Wagner_VII"));
21917 271 : SWIG_Python_SetConstant(d, "SRS_PT_QSC",SWIG_FromCharPtr("Quadrilateralized_Spherical_Cube"));
21918 271 : SWIG_Python_SetConstant(d, "SRS_PT_AITOFF",SWIG_FromCharPtr("Aitoff"));
21919 271 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_I",SWIG_FromCharPtr("Winkel_I"));
21920 271 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_II",SWIG_FromCharPtr("Winkel_II"));
21921 271 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_TRIPEL",SWIG_FromCharPtr("Winkel_Tripel"));
21922 271 : SWIG_Python_SetConstant(d, "SRS_PT_CRASTER_PARABOLIC",SWIG_FromCharPtr("Craster_Parabolic"));
21923 271 : SWIG_Python_SetConstant(d, "SRS_PT_LOXIMUTHAL",SWIG_FromCharPtr("Loximuthal"));
21924 271 : SWIG_Python_SetConstant(d, "SRS_PT_QUARTIC_AUTHALIC",SWIG_FromCharPtr("Quartic_Authalic"));
21925 271 : SWIG_Python_SetConstant(d, "SRS_PT_SCH",SWIG_FromCharPtr("Spherical_Cross_Track_Height"));
21926 271 : SWIG_Python_SetConstant(d, "SRS_PP_CENTRAL_MERIDIAN",SWIG_FromCharPtr("central_meridian"));
21927 271 : SWIG_Python_SetConstant(d, "SRS_PP_SCALE_FACTOR",SWIG_FromCharPtr("scale_factor"));
21928 271 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_1",SWIG_FromCharPtr("standard_parallel_1"));
21929 271 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_2",SWIG_FromCharPtr("standard_parallel_2"));
21930 271 : SWIG_Python_SetConstant(d, "SRS_PP_PSEUDO_STD_PARALLEL_1",SWIG_FromCharPtr("pseudo_standard_parallel_1"));
21931 271 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_CENTER",SWIG_FromCharPtr("longitude_of_center"));
21932 271 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_CENTER",SWIG_FromCharPtr("latitude_of_center"));
21933 271 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_ORIGIN",SWIG_FromCharPtr("longitude_of_origin"));
21934 271 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_ORIGIN",SWIG_FromCharPtr("latitude_of_origin"));
21935 271 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_EASTING",SWIG_FromCharPtr("false_easting"));
21936 271 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_NORTHING",SWIG_FromCharPtr("false_northing"));
21937 271 : SWIG_Python_SetConstant(d, "SRS_PP_AZIMUTH",SWIG_FromCharPtr("azimuth"));
21938 271 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_1",SWIG_FromCharPtr("longitude_of_point_1"));
21939 271 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_1",SWIG_FromCharPtr("latitude_of_point_1"));
21940 271 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_2",SWIG_FromCharPtr("longitude_of_point_2"));
21941 271 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_2",SWIG_FromCharPtr("latitude_of_point_2"));
21942 271 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_3",SWIG_FromCharPtr("longitude_of_point_3"));
21943 271 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_3",SWIG_FromCharPtr("latitude_of_point_3"));
21944 271 : SWIG_Python_SetConstant(d, "SRS_PP_RECTIFIED_GRID_ANGLE",SWIG_FromCharPtr("rectified_grid_angle"));
21945 271 : SWIG_Python_SetConstant(d, "SRS_PP_LANDSAT_NUMBER",SWIG_FromCharPtr("landsat_number"));
21946 271 : SWIG_Python_SetConstant(d, "SRS_PP_PATH_NUMBER",SWIG_FromCharPtr("path_number"));
21947 271 : SWIG_Python_SetConstant(d, "SRS_PP_PERSPECTIVE_POINT_HEIGHT",SWIG_FromCharPtr("perspective_point_height"));
21948 271 : SWIG_Python_SetConstant(d, "SRS_PP_SATELLITE_HEIGHT",SWIG_FromCharPtr("satellite_height"));
21949 271 : SWIG_Python_SetConstant(d, "SRS_PP_FIPSZONE",SWIG_FromCharPtr("fipszone"));
21950 271 : SWIG_Python_SetConstant(d, "SRS_PP_ZONE",SWIG_FromCharPtr("zone"));
21951 271 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Latitude_Of_1st_Point"));
21952 271 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Longitude_Of_1st_Point"));
21953 271 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Latitude_Of_2nd_Point"));
21954 271 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Longitude_Of_2nd_Point"));
21955 271 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LATITUDE",SWIG_FromCharPtr("peg_point_latitude"));
21956 271 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LONGITUDE",SWIG_FromCharPtr("peg_point_longitude"));
21957 271 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEADING",SWIG_FromCharPtr("peg_point_heading"));
21958 271 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEIGHT",SWIG_FromCharPtr("peg_point_height"));
21959 271 : SWIG_Python_SetConstant(d, "SRS_UL_METER",SWIG_FromCharPtr("Meter"));
21960 271 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT",SWIG_FromCharPtr("Foot (International)"));
21961 271 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
21962 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT",SWIG_FromCharPtr("Foot_US"));
21963 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT_CONV",SWIG_FromCharPtr("0.3048006096012192"));
21964 271 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE",SWIG_FromCharPtr("Nautical Mile"));
21965 271 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE_CONV",SWIG_FromCharPtr("1852.0"));
21966 271 : SWIG_Python_SetConstant(d, "SRS_UL_LINK",SWIG_FromCharPtr("Link"));
21967 271 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_CONV",SWIG_FromCharPtr("0.20116684023368047"));
21968 271 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN",SWIG_FromCharPtr("Chain"));
21969 271 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN_CONV",SWIG_FromCharPtr("20.116684023368047"));
21970 271 : SWIG_Python_SetConstant(d, "SRS_UL_ROD",SWIG_FromCharPtr("Rod"));
21971 271 : SWIG_Python_SetConstant(d, "SRS_UL_ROD_CONV",SWIG_FromCharPtr("5.02921005842012"));
21972 271 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke",SWIG_FromCharPtr("Link_Clarke"));
21973 271 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke_CONV",SWIG_FromCharPtr("0.2011661949"));
21974 271 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER",SWIG_FromCharPtr("Kilometer"));
21975 271 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER_CONV",SWIG_FromCharPtr("1000."));
21976 271 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER",SWIG_FromCharPtr("Decimeter"));
21977 271 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER_CONV",SWIG_FromCharPtr("0.1"));
21978 271 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER",SWIG_FromCharPtr("Centimeter"));
21979 271 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER_CONV",SWIG_FromCharPtr("0.01"));
21980 271 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER",SWIG_FromCharPtr("Millimeter"));
21981 271 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER_CONV",SWIG_FromCharPtr("0.001"));
21982 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE",SWIG_FromCharPtr("Nautical_Mile_International"));
21983 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE_CONV",SWIG_FromCharPtr("1852.0"));
21984 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH",SWIG_FromCharPtr("Inch_International"));
21985 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH_CONV",SWIG_FromCharPtr("0.0254"));
21986 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT",SWIG_FromCharPtr("Foot_International"));
21987 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
21988 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD",SWIG_FromCharPtr("Yard_International"));
21989 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD_CONV",SWIG_FromCharPtr("0.9144"));
21990 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_International"));
21991 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE_CONV",SWIG_FromCharPtr("1609.344"));
21992 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM",SWIG_FromCharPtr("Fathom_International"));
21993 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM_CONV",SWIG_FromCharPtr("1.8288"));
21994 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN",SWIG_FromCharPtr("Chain_International"));
21995 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN_CONV",SWIG_FromCharPtr("20.1168"));
21996 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK",SWIG_FromCharPtr("Link_International"));
21997 271 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK_CONV",SWIG_FromCharPtr("0.201168"));
21998 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH",SWIG_FromCharPtr("Inch_US_Surveyor"));
21999 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH_CONV",SWIG_FromCharPtr("0.025400050800101603"));
22000 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD",SWIG_FromCharPtr("Yard_US_Surveyor"));
22001 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD_CONV",SWIG_FromCharPtr("0.914401828803658"));
22002 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN",SWIG_FromCharPtr("Chain_US_Surveyor"));
22003 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN_CONV",SWIG_FromCharPtr("20.11684023368047"));
22004 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_US_Surveyor"));
22005 271 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE_CONV",SWIG_FromCharPtr("1609.347218694437"));
22006 271 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD",SWIG_FromCharPtr("Yard_Indian"));
22007 271 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD_CONV",SWIG_FromCharPtr("0.91439523"));
22008 271 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT",SWIG_FromCharPtr("Foot_Indian"));
22009 271 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT_CONV",SWIG_FromCharPtr("0.30479841"));
22010 271 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN",SWIG_FromCharPtr("Chain_Indian"));
22011 271 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN_CONV",SWIG_FromCharPtr("20.11669506"));
22012 271 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE",SWIG_FromCharPtr("degree"));
22013 271 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE_CONV",SWIG_FromCharPtr("0.0174532925199433"));
22014 271 : SWIG_Python_SetConstant(d, "SRS_UA_RADIAN",SWIG_FromCharPtr("radian"));
22015 271 : SWIG_Python_SetConstant(d, "SRS_PM_GREENWICH",SWIG_FromCharPtr("Greenwich"));
22016 271 : SWIG_Python_SetConstant(d, "SRS_DN_NAD27",SWIG_FromCharPtr("North_American_Datum_1927"));
22017 271 : SWIG_Python_SetConstant(d, "SRS_DN_NAD83",SWIG_FromCharPtr("North_American_Datum_1983"));
22018 271 : SWIG_Python_SetConstant(d, "SRS_DN_WGS72",SWIG_FromCharPtr("WGS_1972"));
22019 271 : SWIG_Python_SetConstant(d, "SRS_DN_WGS84",SWIG_FromCharPtr("WGS_1984"));
22020 271 : SWIG_Python_SetConstant(d, "SRS_WGS84_SEMIMAJOR",SWIG_From_double(static_cast< double >(6378137.0)));
22021 271 : SWIG_Python_SetConstant(d, "SRS_WGS84_INVFLATTENING",SWIG_From_double(static_cast< double >(298.257223563)));
22022 271 : SWIG_Python_SetConstant(d, "OAO_Other",SWIG_From_int(static_cast< int >(0)));
22023 271 : SWIG_Python_SetConstant(d, "OAO_North",SWIG_From_int(static_cast< int >(1)));
22024 271 : SWIG_Python_SetConstant(d, "OAO_South",SWIG_From_int(static_cast< int >(2)));
22025 271 : SWIG_Python_SetConstant(d, "OAO_East",SWIG_From_int(static_cast< int >(3)));
22026 271 : SWIG_Python_SetConstant(d, "OAO_West",SWIG_From_int(static_cast< int >(4)));
22027 271 : SWIG_Python_SetConstant(d, "OAO_Up",SWIG_From_int(static_cast< int >(5)));
22028 271 : SWIG_Python_SetConstant(d, "OAO_Down",SWIG_From_int(static_cast< int >(6)));
22029 271 : SWIG_Python_SetConstant(d, "OAMS_TRADITIONAL_GIS_ORDER",SWIG_From_int(static_cast< int >(0)));
22030 271 : SWIG_Python_SetConstant(d, "OAMS_AUTHORITY_COMPLIANT",SWIG_From_int(static_cast< int >(1)));
22031 271 : SWIG_Python_SetConstant(d, "OAMS_CUSTOM",SWIG_From_int(static_cast< int >(2)));
22032 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP",SWIG_From_int(static_cast< int >(1024)));
22033 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_WRONG_SYNTAX",SWIG_From_int(static_cast< int >(1025)));
22034 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MISSING_ARG",SWIG_From_int(static_cast< int >(1026)));
22035 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE",SWIG_From_int(static_cast< int >(1027)));
22036 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS",SWIG_From_int(static_cast< int >(1028)));
22037 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID",SWIG_From_int(static_cast< int >(1029)));
22038 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM",SWIG_From_int(static_cast< int >(2048)));
22039 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_INVALID_COORD",SWIG_From_int(static_cast< int >(2049)));
22040 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN",SWIG_From_int(static_cast< int >(2050)));
22041 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_NO_OPERATION",SWIG_From_int(static_cast< int >(2051)));
22042 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID",SWIG_From_int(static_cast< int >(2052)));
22043 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_GRID_AT_NODATA",SWIG_From_int(static_cast< int >(2053)));
22044 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER",SWIG_From_int(static_cast< int >(4096)));
22045 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_API_MISUSE",SWIG_From_int(static_cast< int >(4097)));
22046 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NO_INVERSE_OP",SWIG_From_int(static_cast< int >(4098)));
22047 271 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NETWORK_ERROR",SWIG_From_int(static_cast< int >(4099)));
22048 :
22049 : // Will be turned on for GDAL 4.0
22050 : // UseExceptions();
22051 :
22052 271 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_2D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_2D)));
22053 271 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_3D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_3D)));
22054 271 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOCENTRIC",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOCENTRIC)));
22055 271 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_PROJECTED",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_PROJECTED)));
22056 271 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_VERTICAL",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_VERTICAL)));
22057 271 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_COMPOUND",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_COMPOUND)));
22058 271 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_OTHER",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_OTHER)));
22059 :
22060 : /* Initialize threading */
22061 271 : SWIG_PYTHON_INITIALIZE_THREADS;
22062 : #if PY_VERSION_HEX >= 0x03000000
22063 271 : return m;
22064 : #else
22065 : return;
22066 : #endif
22067 : }
22068 :
|