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 7068 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
449 7068 : if (ty) {
450 7068 : swig_cast_info *iter = ty->cast;
451 9824 : while (iter) {
452 9820 : if (strcmp(iter->type->name, c) == 0) {
453 7064 : if (iter == ty->cast)
454 : return iter;
455 : /* Move iter to the top of the linked list */
456 753 : iter->prev->next = iter->next;
457 753 : if (iter->next)
458 476 : iter->next->prev = iter->prev;
459 753 : iter->next = ty->cast;
460 753 : iter->prev = 0;
461 753 : if (ty->cast) ty->cast->prev = iter;
462 753 : ty->cast = iter;
463 753 : return iter;
464 : }
465 2756 : 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 969 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
503 969 : 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 29 : 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 29 : if (!type) return NULL;
539 29 : if (type->str != NULL) {
540 : const char *last_name = type->str;
541 : const char *s;
542 580 : for (s = type->str; *s; s++)
543 551 : 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 4155 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
571 4155 : SWIG_TypeClientData(ti, clientdata);
572 4155 : 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 19690 : SWIG_MangledTypeQueryModule(swig_module_info *start,
585 : swig_module_info *end,
586 : const char *name) {
587 19690 : swig_module_info *iter = start;
588 38789 : do {
589 38789 : if (iter->size) {
590 38789 : size_t l = 0;
591 38789 : size_t r = iter->size - 1;
592 133734 : do {
593 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
594 133734 : size_t i = (l + r) >> 1;
595 133734 : const char *iname = iter->types[i]->name;
596 133734 : if (iname) {
597 133734 : int compare = strcmp(name, iname);
598 133734 : if (compare == 0) {
599 11936 : return iter->types[i];
600 121798 : } else if (compare < 0) {
601 60503 : if (i) {
602 45851 : r = i - 1;
603 : } else {
604 : break;
605 : }
606 61295 : } else if (compare > 0) {
607 61295 : l = i + 1;
608 : }
609 : } else {
610 : break; /* should never happen */
611 : }
612 107146 : } while (l <= r);
613 : }
614 26853 : iter = iter->next;
615 26853 : } 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 23 : 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 23 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
634 23 : 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 300 : SWIG_Python_str_FromChar(const char *c)
839 : {
840 : #if PY_VERSION_HEX >= 0x03000000
841 300 : 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 241 : SWIG_Python_ErrorType(int code) {
868 241 : PyObject* type = 0;
869 22 : 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 213 : case SWIG_RuntimeError:
877 213 : type = PyExc_RuntimeError;
878 0 : break;
879 0 : case SWIG_IndexError:
880 0 : type = PyExc_IndexError;
881 0 : break;
882 22 : case SWIG_TypeError:
883 22 : type = PyExc_TypeError;
884 22 : 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 6 : case SWIG_ValueError:
895 6 : 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 213 : 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 0 : SWIG_Python_TypeErrorOccurred(PyObject *obj)
938 : {
939 0 : PyObject *error;
940 0 : if (obj)
941 : return 0;
942 0 : error = PyErr_Occurred();
943 0 : return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
944 : }
945 :
946 : SWIGRUNTIME void
947 0 : SWIG_Python_RaiseOrModifyTypeError(const char *message)
948 : {
949 0 : 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 0 : PyErr_SetString(PyExc_TypeError, message);
964 : }
965 0 : }
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 606 : void end() { if (status) { PyGILState_Release(state); status = false;} }
986 582 : SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
987 24 : ~SWIG_Python_Thread_Block() { end(); }
988 : };
989 : class SWIG_Python_Thread_Allow {
990 : bool status;
991 : PyThreadState *save;
992 : public:
993 7186940 : void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
994 7186940 : SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
995 0 : ~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 251 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1143 251 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1144 251 : PyErr_SetString(errtype, msg);
1145 251 : SWIG_PYTHON_THREAD_END_BLOCK;
1146 251 : }
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 52907 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1173 52907 : PyDict_SetItemString(d, name, obj);
1174 52907 : Py_DECREF(obj);
1175 52907 : }
1176 :
1177 : #endif
1178 :
1179 : /* Append a value to the result obj */
1180 :
1181 : SWIGINTERN PyObject*
1182 22299 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1183 22299 : if (!result) {
1184 : result = obj;
1185 14418 : } else if (result == Py_None) {
1186 13896 : Py_DECREF(result);
1187 : result = obj;
1188 : } else {
1189 522 : if (!PyList_Check(result)) {
1190 87 : PyObject *o2 = result;
1191 87 : result = PyList_New(1);
1192 87 : PyList_SetItem(result, 0, o2);
1193 : }
1194 522 : PyList_Append(result,obj);
1195 522 : Py_DECREF(obj);
1196 : }
1197 22299 : return result;
1198 : }
1199 :
1200 : /* Unpack the argument tuple */
1201 :
1202 : SWIGINTERN Py_ssize_t
1203 2020610 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1204 : {
1205 2020610 : if (!args) {
1206 34392 : 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 1986220 : if (!PyTuple_Check(args)) {
1215 4155 : if (min <= 1 && max >= 1) {
1216 4155 : Py_ssize_t i;
1217 4155 : objs[0] = args;
1218 4155 : 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 1982060 : Py_ssize_t l = PyTuple_GET_SIZE(args);
1227 1982060 : if (l < min) {
1228 1 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1229 : name, (min == max ? "" : "at least "), (int)min, (int)l);
1230 1 : return 0;
1231 1982060 : } 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 6190620 : for (i = 0; i < l; ++i) {
1238 4208560 : objs[i] = PyTuple_GET_ITEM(args, i);
1239 : }
1240 2042610 : for (; l < max; ++l) {
1241 60550 : objs[l] = 0;
1242 : }
1243 1982060 : 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 1387080 : SWIG_Py_Void(void)
1282 : {
1283 1387080 : PyObject *none = Py_None;
1284 0 : Py_INCREF(none);
1285 376540 : 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 4155 : SwigPyClientData_New(PyObject* obj)
1320 : {
1321 4155 : if (!obj) {
1322 : return 0;
1323 : } else {
1324 4155 : SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1325 : /* the klass element */
1326 4155 : data->klass = obj;
1327 4155 : Py_INCREF(data->klass);
1328 : /* the newraw method and newargs arguments used to create a new raw instance */
1329 4155 : if (PyClass_Check(obj)) {
1330 4155 : data->newraw = 0;
1331 4155 : data->newargs = obj;
1332 4155 : 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 4155 : data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1346 4155 : if (PyErr_Occurred()) {
1347 554 : PyErr_Clear();
1348 554 : data->destroy = 0;
1349 : }
1350 4155 : if (data->destroy) {
1351 3601 : int flags;
1352 3601 : Py_INCREF(data->destroy);
1353 3601 : flags = PyCFunction_GET_FLAGS(data->destroy);
1354 3601 : data->delargs = !(flags & (METH_O));
1355 : } else {
1356 554 : data->delargs = 0;
1357 : }
1358 4155 : data->implicitconv = 0;
1359 4155 : data->pytype = 0;
1360 4155 : 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 29 : SwigPyObject_repr(SwigPyObject *v)
1443 : {
1444 29 : const char *name = SWIG_TypePrettyName(v->ty);
1445 29 : PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1446 29 : 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 29 : 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 1 : SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1470 : {
1471 1 : void *i = v->ptr;
1472 1 : void *j = w->ptr;
1473 1 : 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 1 : SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1479 : {
1480 1 : PyObject* res;
1481 1 : if( op != Py_EQ && op != Py_NE ) {
1482 0 : Py_INCREF(Py_NotImplemented);
1483 0 : return Py_NotImplemented;
1484 : }
1485 2 : res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1486 1 : 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 11840100 : SwigPyObject_type(void) {
1506 11840100 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1507 11840100 : 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 1118260 : SwigPyObject_dealloc(PyObject *v)
1529 : {
1530 1118260 : SwigPyObject *sobj = (SwigPyObject *) v;
1531 1118260 : PyObject *next = sobj->next;
1532 1118260 : if (sobj->own == SWIG_POINTER_OWN) {
1533 703611 : swig_type_info *ty = sobj->ty;
1534 703611 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1535 703611 : PyObject *destroy = data ? data->destroy : 0;
1536 703611 : if (destroy) {
1537 : /* destroy is always a VARARGS method */
1538 703611 : 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 703611 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
1548 703611 : PyErr_Fetch(&type, &value, &traceback);
1549 :
1550 703611 : 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 703611 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1557 703611 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1558 703611 : res = ((*meth)(mself, v));
1559 : }
1560 703611 : if (!res)
1561 0 : PyErr_WriteUnraisable(destroy);
1562 :
1563 703611 : PyErr_Restore(type, value, traceback);
1564 :
1565 1407220 : Py_XDECREF(res);
1566 : }
1567 : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1568 : else {
1569 : const char *name = SWIG_TypePrettyName(ty);
1570 : printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1571 : }
1572 : #endif
1573 : }
1574 1118260 : Py_XDECREF(next);
1575 1118260 : PyObject_DEL(v);
1576 1118260 : }
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 351 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1605 : {
1606 351 : SwigPyObject *sobj = (SwigPyObject *)v;
1607 351 : sobj->own = 0;
1608 351 : 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 351 : SwigPyObject_own(PyObject *v, PyObject *args)
1621 : {
1622 351 : PyObject *val = 0;
1623 351 : if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1624 : return NULL;
1625 : } else {
1626 351 : SwigPyObject *sobj = (SwigPyObject *)v;
1627 351 : PyObject *obj = PyBool_FromLong(sobj->own);
1628 351 : if (val) {
1629 351 : if (PyObject_IsTrue(val)) {
1630 0 : SwigPyObject_acquire(v,args);
1631 : } else {
1632 351 : SwigPyObject_disown(v,args);
1633 : }
1634 : }
1635 351 : 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 277 : SwigPyObject_TypeOnce(void) {
1652 277 : static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1653 :
1654 277 : 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 277 : static PyTypeObject swigpyobject_type;
1699 277 : static int type_init = 0;
1700 277 : if (!type_init) {
1701 277 : 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 277 : swigpyobject_type = tmp;
1770 277 : type_init = 1;
1771 277 : if (PyType_Ready(&swigpyobject_type) < 0)
1772 0 : return NULL;
1773 : }
1774 : return &swigpyobject_type;
1775 : }
1776 :
1777 : SWIGRUNTIME PyObject *
1778 1118430 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1779 : {
1780 1118430 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1781 1118430 : if (sobj) {
1782 1118430 : sobj->ptr = ptr;
1783 1118430 : sobj->ty = ty;
1784 1118430 : sobj->own = own;
1785 1118430 : sobj->next = 0;
1786 : }
1787 1118430 : 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 277 : SwigPyPacked_type(void) {
1836 277 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1837 277 : 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 277 : SwigPyPacked_TypeOnce(void) {
1858 277 : static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1859 277 : static PyTypeObject swigpypacked_type;
1860 277 : static int type_init = 0;
1861 277 : if (!type_init) {
1862 277 : 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 277 : swigpypacked_type = tmp;
1931 277 : type_init = 1;
1932 277 : 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 4993350 : SWIG_This(void)
1978 : {
1979 4993350 : if (Swig_This_global == NULL)
1980 277 : Swig_This_global = SWIG_Python_str_FromChar("this");
1981 4993350 : 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 5330690 : SWIG_Python_GetSwigThis(PyObject *pyobj)
1993 : {
1994 5330720 : PyObject *obj;
1995 :
1996 5330720 : 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 4632690 : 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 4632690 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2039 4632690 : if (obj) {
2040 4272230 : Py_DECREF(obj);
2041 : } else {
2042 360458 : if (PyErr_Occurred()) PyErr_Clear();
2043 360458 : return 0;
2044 : }
2045 : #endif
2046 4272230 : 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 4971330 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2074 4971330 : int res;
2075 4971330 : SwigPyObject *sobj;
2076 4971330 : int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2077 :
2078 4971330 : if (!obj)
2079 : return SWIG_ERROR;
2080 4971330 : if (obj == Py_None && !implicit_conv) {
2081 1018 : if (ptr)
2082 1018 : *ptr = 0;
2083 2036 : return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2084 : }
2085 :
2086 4970310 : res = SWIG_ERROR;
2087 :
2088 4970310 : sobj = SWIG_Python_GetSwigThis(obj);
2089 4970310 : if (own)
2090 0 : *own = 0;
2091 4970320 : while (sobj) {
2092 4970240 : void *vptr = sobj->ptr;
2093 4970240 : if (ty) {
2094 4970240 : swig_type_info *to = sobj->ty;
2095 4970240 : if (to == ty) {
2096 : /* no type cast needed */
2097 4969260 : if (ptr) *ptr = vptr;
2098 : break;
2099 : } else {
2100 973 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2101 973 : if (!tc) {
2102 4 : sobj = (SwigPyObject *)sobj->next;
2103 : } else {
2104 969 : if (ptr) {
2105 969 : int newmemory = 0;
2106 969 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2107 969 : 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 4970310 : if (sobj) {
2122 4970230 : if (own)
2123 0 : *own = *own | sobj->own;
2124 4970230 : if (flags & SWIG_POINTER_DISOWN) {
2125 731997 : sobj->own = 0;
2126 : }
2127 : res = SWIG_OK;
2128 : } else {
2129 82 : 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 360380 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2281 : {
2282 360380 : 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 360380 : dict = PyObject_GetAttrString(inst, "__dict__");
2296 360380 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2297 360380 : Py_DECREF(dict);
2298 360380 : }
2299 :
2300 :
2301 : SWIGINTERN PyObject *
2302 360380 : SWIG_Python_InitShadowInstance(PyObject *args) {
2303 360380 : PyObject *obj[2];
2304 360380 : if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2305 : return NULL;
2306 : } else {
2307 360380 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2308 360380 : if (sthis) {
2309 0 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2310 : } else {
2311 360380 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2312 : }
2313 360380 : return SWIG_Py_Void();
2314 : }
2315 : }
2316 :
2317 : /* Create a new pointer object */
2318 :
2319 : SWIGRUNTIME PyObject *
2320 1129960 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2321 1129960 : SwigPyClientData *clientdata;
2322 1129960 : PyObject * robj;
2323 1129960 : int own;
2324 :
2325 1129960 : if (!ptr)
2326 11533 : return SWIG_Py_Void();
2327 :
2328 1118430 : clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2329 1118430 : own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2330 1118430 : 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 1118430 : assert(!(flags & SWIG_BUILTIN_TP_INIT));
2361 :
2362 1118430 : robj = SwigPyObject_New(ptr, type, own);
2363 1118430 : if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2364 757776 : PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2365 757776 : 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 300 : SWIG_Python_TypeCache(void) {
2441 300 : static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2442 300 : return cache;
2443 : }
2444 :
2445 : SWIGRUNTIME swig_type_info *
2446 23 : SWIG_Python_TypeQuery(const char *type)
2447 : {
2448 23 : PyObject *cache = SWIG_Python_TypeCache();
2449 23 : PyObject *key = SWIG_Python_str_FromChar(type);
2450 23 : PyObject *obj = PyDict_GetItem(cache, key);
2451 23 : swig_type_info *descriptor;
2452 23 : if (obj) {
2453 0 : descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2454 : } else {
2455 23 : swig_module_info *swig_module = SWIG_GetModule(0);
2456 23 : descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2457 23 : if (descriptor) {
2458 23 : obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2459 23 : PyDict_SetItem(cache, key, obj);
2460 23 : Py_DECREF(obj);
2461 : }
2462 : }
2463 23 : Py_DECREF(key);
2464 23 : 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_ArrowArray swig_types[0]
2666 : #define SWIGTYPE_p_ArrowArrayStream swig_types[1]
2667 : #define SWIGTYPE_p_ArrowSchema swig_types[2]
2668 : #define SWIGTYPE_p_GDALDatasetShadow swig_types[3]
2669 : #define SWIGTYPE_p_GDALDriverShadow swig_types[4]
2670 : #define SWIGTYPE_p_GDALMajorObjectShadow swig_types[5]
2671 : #define SWIGTYPE_p_GDALProgressFunc swig_types[6]
2672 : #define SWIGTYPE_p_GIntBig swig_types[7]
2673 : #define SWIGTYPE_p_OGRCodedValue swig_types[8]
2674 : #define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[9]
2675 : #define SWIGTYPE_p_OGRFeatureShadow swig_types[10]
2676 : #define SWIGTYPE_p_OGRFieldDefnShadow swig_types[11]
2677 : #define SWIGTYPE_p_OGRFieldDomainShadow swig_types[12]
2678 : #define SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow swig_types[13]
2679 : #define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[14]
2680 : #define SWIGTYPE_p_OGRGeomTransformerShadow swig_types[15]
2681 : #define SWIGTYPE_p_OGRGeometryShadow swig_types[16]
2682 : #define SWIGTYPE_p_OGRLayerShadow swig_types[17]
2683 : #define SWIGTYPE_p_OGRPreparedGeometryShadow swig_types[18]
2684 : #define SWIGTYPE_p_OGRStyleTableShadow swig_types[19]
2685 : #define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[20]
2686 : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[21]
2687 : #define SWIGTYPE_p_bool swig_types[22]
2688 : #define SWIGTYPE_p_char swig_types[23]
2689 : #define SWIGTYPE_p_double swig_types[24]
2690 : #define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[25]
2691 : #define SWIGTYPE_p_float swig_types[26]
2692 : #define SWIGTYPE_p_int swig_types[27]
2693 : #define SWIGTYPE_p_p_GIntBig swig_types[28]
2694 : #define SWIGTYPE_p_p_OGRGeometryTypeCounter swig_types[29]
2695 : #define SWIGTYPE_p_p_OGRSpatialReferenceH swig_types[30]
2696 : #define SWIGTYPE_p_p_char swig_types[31]
2697 : #define SWIGTYPE_p_p_double swig_types[32]
2698 : #define SWIGTYPE_p_p_int swig_types[33]
2699 : #define SWIGTYPE_p_size_t swig_types[34]
2700 : static swig_type_info *swig_types[36];
2701 : static swig_module_info swig_module = {swig_types, 35, 0, 0, 0, 0};
2702 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2703 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2704 :
2705 : /* -------- TYPES TABLE (END) -------- */
2706 :
2707 : #ifdef SWIG_TypeQuery
2708 : # undef SWIG_TypeQuery
2709 : #endif
2710 : #define SWIG_TypeQuery SWIG_Python_TypeQuery
2711 :
2712 : /*-----------------------------------------------
2713 : @(target):= _ogr.so
2714 : ------------------------------------------------*/
2715 : #if PY_VERSION_HEX >= 0x03000000
2716 : # define SWIG_init PyInit__ogr
2717 :
2718 : #else
2719 : # define SWIG_init init_ogr
2720 :
2721 : #endif
2722 : #define SWIG_name "_ogr"
2723 :
2724 : #define SWIGVERSION 0x040001
2725 : #define SWIG_VERSION SWIGVERSION
2726 :
2727 :
2728 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2729 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2730 :
2731 :
2732 : #include <stdexcept>
2733 :
2734 :
2735 : namespace swig {
2736 : class SwigPtr_PyObject {
2737 : protected:
2738 : PyObject *_obj;
2739 :
2740 : public:
2741 : SwigPtr_PyObject() :_obj(0)
2742 : {
2743 : }
2744 :
2745 : SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
2746 : {
2747 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2748 : Py_XINCREF(_obj);
2749 : SWIG_PYTHON_THREAD_END_BLOCK;
2750 : }
2751 :
2752 : SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2753 : {
2754 : if (initial_ref) {
2755 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2756 : Py_XINCREF(_obj);
2757 : SWIG_PYTHON_THREAD_END_BLOCK;
2758 : }
2759 : }
2760 :
2761 : SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
2762 : {
2763 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2764 : Py_XINCREF(item._obj);
2765 : Py_XDECREF(_obj);
2766 : _obj = item._obj;
2767 : SWIG_PYTHON_THREAD_END_BLOCK;
2768 : return *this;
2769 : }
2770 :
2771 : ~SwigPtr_PyObject()
2772 : {
2773 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2774 : Py_XDECREF(_obj);
2775 : SWIG_PYTHON_THREAD_END_BLOCK;
2776 : }
2777 :
2778 : operator PyObject *() const
2779 : {
2780 : return _obj;
2781 : }
2782 :
2783 : PyObject *operator->() const
2784 : {
2785 : return _obj;
2786 : }
2787 : };
2788 : }
2789 :
2790 :
2791 : namespace swig {
2792 : struct SwigVar_PyObject : SwigPtr_PyObject {
2793 : SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2794 :
2795 : SwigVar_PyObject & operator = (PyObject* obj)
2796 : {
2797 : Py_XDECREF(_obj);
2798 : _obj = obj;
2799 : return *this;
2800 : }
2801 : };
2802 : }
2803 :
2804 :
2805 : typedef void* VoidPtrAsLong;
2806 :
2807 :
2808 : typedef char retStringAndCPLFree;
2809 :
2810 :
2811 : #include <iostream>
2812 : using namespace std;
2813 :
2814 : #define CPL_SUPRESS_CPLUSPLUS
2815 :
2816 : #include "gdal.h"
2817 : #include "ogr_api.h"
2818 : #include "ogr_core.h"
2819 : #include "cpl_port.h"
2820 : #include "cpl_string.h"
2821 : #include "ogr_srs_api.h"
2822 : #include "ogr_recordbatch.h"
2823 : #include "ogr_p.h"
2824 :
2825 : #define FIELD_INDEX_ERROR_TMPL "Invalid field index: '%i'"
2826 : #define FIELD_NAME_ERROR_TMPL "Invalid field name: '%s'"
2827 :
2828 : typedef void GDALMajorObjectShadow;
2829 : typedef void GDALDatasetShadow;
2830 :
2831 : #ifdef DEBUG
2832 : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
2833 : typedef struct OGRDriverHS OGRDriverShadow;
2834 : typedef struct OGRDataSourceHS OGRDataSourceShadow;
2835 : typedef struct OGRLayerHS OGRLayerShadow;
2836 : typedef struct OGRFeatureHS OGRFeatureShadow;
2837 : typedef struct OGRFeatureDefnHS OGRFeatureDefnShadow;
2838 : typedef struct OGRGeometryHS OGRGeometryShadow;
2839 : typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
2840 : typedef struct OGRFieldDefnHS OGRFieldDefnShadow;
2841 : #else
2842 : typedef void OSRSpatialReferenceShadow;
2843 : typedef void OGRDriverShadow;
2844 : typedef void OGRDataSourceShadow;
2845 : typedef void OGRLayerShadow;
2846 : typedef void OGRFeatureShadow;
2847 : typedef void OGRFeatureDefnShadow;
2848 : typedef void OGRGeometryShadow;
2849 : typedef void OSRCoordinateTransformationShadow;
2850 : typedef void OGRFieldDefnShadow;
2851 : #endif
2852 :
2853 : typedef struct OGRStyleTableHS OGRStyleTableShadow;
2854 : typedef struct OGRGeomFieldDefnHS OGRGeomFieldDefnShadow;
2855 : typedef struct OGRGeomTransformer OGRGeomTransformerShadow;
2856 : typedef struct _OGRPreparedGeometry OGRPreparedGeometryShadow;
2857 : typedef struct OGRFieldDomainHS OGRFieldDomainShadow;
2858 : typedef struct OGRGeomCoordinatePrecision OGRGeomCoordinatePrecisionShadow;
2859 :
2860 :
2861 : SWIGINTERNINLINE PyObject*
2862 439262 : SWIG_From_int (int value)
2863 : {
2864 439262 : return PyInt_FromLong((long) value);
2865 : }
2866 :
2867 :
2868 : SWIGINTERN swig_type_info*
2869 252 : SWIG_pchar_descriptor(void)
2870 : {
2871 252 : static int init = 0;
2872 252 : static swig_type_info* info = 0;
2873 252 : if (!init) {
2874 23 : info = SWIG_TypeQuery("_p_char");
2875 23 : init = 1;
2876 : }
2877 252 : return info;
2878 : }
2879 :
2880 :
2881 : SWIGINTERNINLINE PyObject *
2882 243044 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2883 : {
2884 243044 : if (carray) {
2885 242923 : if (size > INT_MAX) {
2886 0 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2887 0 : return pchar_descriptor ?
2888 0 : SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
2889 : } else {
2890 : #if PY_VERSION_HEX >= 0x03000000
2891 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2892 : return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
2893 : #else
2894 242923 : return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
2895 : #endif
2896 : #else
2897 : return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
2898 : #endif
2899 : }
2900 : } else {
2901 121 : return SWIG_Py_Void();
2902 : }
2903 : }
2904 :
2905 :
2906 : SWIGINTERNINLINE PyObject *
2907 243044 : SWIG_FromCharPtr(const char *cptr)
2908 : {
2909 231410 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2910 : }
2911 :
2912 :
2913 : #define MODULE_NAME "ogr"
2914 :
2915 :
2916 : #include "cpl_string.h"
2917 : #include "cpl_conv.h"
2918 :
2919 : static int bUseExceptions=0;
2920 : static int bUserHasSpecifiedIfUsingExceptions = FALSE;
2921 : static thread_local int bUseExceptionsLocal = -1;
2922 :
2923 2920940 : struct PythonBindingErrorHandlerContext
2924 : {
2925 : std::string osInitialMsg{};
2926 : std::string osFailureMsg{};
2927 : CPLErrorNum nLastCode = CPLE_None;
2928 : bool bMemoryError = false;
2929 : };
2930 :
2931 : static void CPL_STDCALL
2932 676 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
2933 : {
2934 676 : PythonBindingErrorHandlerContext* ctxt = static_cast<
2935 676 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
2936 :
2937 : /*
2938 : ** Generally we want to suppress error reporting if we have exceptions
2939 : ** enabled as the error message will be in the exception thrown in
2940 : ** Python.
2941 : */
2942 :
2943 : /* If the error class is CE_Fatal, we want to have a message issued
2944 : because the CPL support code does an abort() before any exception
2945 : can be generated */
2946 676 : if (eclass == CE_Fatal ) {
2947 0 : CPLCallPreviousHandler(eclass, err_no, msg );
2948 : }
2949 :
2950 : /*
2951 : ** We do not want to interfere with non-failure messages since
2952 : ** they won't be translated into exceptions.
2953 : */
2954 676 : else if (eclass != CE_Failure ) {
2955 184 : CPLCallPreviousHandler(eclass, err_no, msg );
2956 : }
2957 : else {
2958 492 : ctxt->nLastCode = err_no;
2959 492 : try
2960 : {
2961 492 : if( ctxt->osFailureMsg.empty() ) {
2962 322 : ctxt->osFailureMsg = msg;
2963 322 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2964 : } else {
2965 170 : if( ctxt->osFailureMsg.size() < 10000 ) {
2966 340 : std::string osTmp(msg);
2967 170 : osTmp += "\nMay be caused by: ";
2968 170 : osTmp += ctxt->osFailureMsg;
2969 170 : ctxt->osFailureMsg = std::move(osTmp);
2970 170 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2971 : }
2972 : else
2973 : {
2974 0 : std::string osTmp(msg);
2975 0 : osTmp += "\n[...]\nMay be caused by: ";
2976 0 : osTmp += ctxt->osInitialMsg;
2977 0 : ctxt->osFailureMsg = std::move(osTmp);
2978 : }
2979 : }
2980 : }
2981 0 : catch( const std::exception& )
2982 : {
2983 0 : ctxt->bMemoryError = true;
2984 : }
2985 : }
2986 676 : }
2987 :
2988 :
2989 :
2990 :
2991 : static
2992 7272230 : int GetUseExceptions() {
2993 4641680 : return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
2994 : }
2995 :
2996 9575 : static int _GetExceptionsLocal()
2997 : {
2998 9575 : return bUseExceptionsLocal;
2999 : }
3000 :
3001 19150 : static void _SetExceptionsLocal(int bVal)
3002 : {
3003 19150 : bUseExceptionsLocal = bVal;
3004 : }
3005 :
3006 : static
3007 29 : void _UseExceptions() {
3008 29 : CPLErrorReset();
3009 29 : bUserHasSpecifiedIfUsingExceptions = TRUE;
3010 29 : if( !bUseExceptions )
3011 : {
3012 26 : bUseExceptions = 1;
3013 : }
3014 : }
3015 :
3016 : static
3017 5 : void _DontUseExceptions() {
3018 5 : CPLErrorReset();
3019 5 : bUserHasSpecifiedIfUsingExceptions = TRUE;
3020 5 : if( bUseExceptions )
3021 : {
3022 0 : bUseExceptions = 0;
3023 : }
3024 : }
3025 :
3026 19148 : static int _UserHasSpecifiedIfUsingExceptions()
3027 : {
3028 1716 : return bUserHasSpecifiedIfUsingExceptions || bUseExceptionsLocal >= 0;
3029 : }
3030 :
3031 :
3032 :
3033 : #include <limits.h>
3034 : #if !defined(SWIG_NO_LLONG_MAX)
3035 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3036 : # define LLONG_MAX __LONG_LONG_MAX__
3037 : # define LLONG_MIN (-LLONG_MAX - 1LL)
3038 : # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3039 : # endif
3040 : #endif
3041 :
3042 :
3043 : SWIGINTERN int
3044 709105 : SWIG_AsVal_double (PyObject *obj, double *val)
3045 : {
3046 709105 : int res = SWIG_TypeError;
3047 709105 : if (PyFloat_Check(obj)) {
3048 384399 : if (val) *val = PyFloat_AsDouble(obj);
3049 384399 : return SWIG_OK;
3050 : #if PY_VERSION_HEX < 0x03000000
3051 : } else if (PyInt_Check(obj)) {
3052 : if (val) *val = (double) PyInt_AsLong(obj);
3053 : return SWIG_OK;
3054 : #endif
3055 324706 : } else if (PyLong_Check(obj)) {
3056 324706 : double v = PyLong_AsDouble(obj);
3057 324706 : if (!PyErr_Occurred()) {
3058 324706 : if (val) *val = v;
3059 324706 : return SWIG_OK;
3060 : } else {
3061 0 : PyErr_Clear();
3062 : }
3063 : }
3064 : #ifdef SWIG_PYTHON_CAST_MODE
3065 : {
3066 : int dispatch = 0;
3067 : double d = PyFloat_AsDouble(obj);
3068 : if (!PyErr_Occurred()) {
3069 : if (val) *val = d;
3070 : return SWIG_AddCast(SWIG_OK);
3071 : } else {
3072 : PyErr_Clear();
3073 : }
3074 : if (!dispatch) {
3075 : long v = PyLong_AsLong(obj);
3076 : if (!PyErr_Occurred()) {
3077 : if (val) *val = v;
3078 : return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3079 : } else {
3080 : PyErr_Clear();
3081 : }
3082 : }
3083 : }
3084 : #endif
3085 : return res;
3086 : }
3087 :
3088 :
3089 : #include <float.h>
3090 :
3091 :
3092 : #include <math.h>
3093 :
3094 :
3095 : SWIGINTERNINLINE int
3096 : SWIG_CanCastAsInteger(double *d, double min, double max) {
3097 : double x = *d;
3098 : if ((min <= x && x <= max)) {
3099 : double fx = floor(x);
3100 : double cx = ceil(x);
3101 : double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3102 : if ((errno == EDOM) || (errno == ERANGE)) {
3103 : errno = 0;
3104 : } else {
3105 : double summ, reps, diff;
3106 : if (rd < x) {
3107 : diff = x - rd;
3108 : } else if (rd > x) {
3109 : diff = rd - x;
3110 : } else {
3111 : return 1;
3112 : }
3113 : summ = rd + x;
3114 : reps = diff/summ;
3115 : if (reps < 8*DBL_EPSILON) {
3116 : *d = rd;
3117 : return 1;
3118 : }
3119 : }
3120 : }
3121 : return 0;
3122 : }
3123 :
3124 :
3125 : SWIGINTERN int
3126 1806820 : SWIG_AsVal_long (PyObject *obj, long* val)
3127 : {
3128 : #if PY_VERSION_HEX < 0x03000000
3129 : if (PyInt_Check(obj)) {
3130 : if (val) *val = PyInt_AsLong(obj);
3131 : return SWIG_OK;
3132 : } else
3133 : #endif
3134 1806820 : if (PyLong_Check(obj)) {
3135 1802610 : long v = PyLong_AsLong(obj);
3136 1802610 : if (!PyErr_Occurred()) {
3137 1802610 : if (val) *val = v;
3138 1802610 : return SWIG_OK;
3139 : } else {
3140 0 : PyErr_Clear();
3141 0 : return SWIG_OverflowError;
3142 : }
3143 : }
3144 : #ifdef SWIG_PYTHON_CAST_MODE
3145 : {
3146 : int dispatch = 0;
3147 : long v = PyInt_AsLong(obj);
3148 : if (!PyErr_Occurred()) {
3149 : if (val) *val = v;
3150 : return SWIG_AddCast(SWIG_OK);
3151 : } else {
3152 : PyErr_Clear();
3153 : }
3154 : if (!dispatch) {
3155 : double d;
3156 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3157 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3158 : if (val) *val = (long)(d);
3159 : return res;
3160 : }
3161 : }
3162 : }
3163 : #endif
3164 : return SWIG_TypeError;
3165 : }
3166 :
3167 :
3168 : SWIGINTERN int
3169 1311330 : SWIG_AsVal_int (PyObject * obj, int *val)
3170 : {
3171 1311330 : long v;
3172 2622670 : int res = SWIG_AsVal_long (obj, &v);
3173 1311330 : if (SWIG_IsOK(res)) {
3174 1307120 : if ((v < INT_MIN || v > INT_MAX)) {
3175 : return SWIG_OverflowError;
3176 : } else {
3177 811635 : if (val) *val = static_cast< int >(v);
3178 : }
3179 : }
3180 : return res;
3181 : }
3182 :
3183 :
3184 : /* Completely unrelated: just to avoid Coverity warnings */
3185 :
3186 : static int bReturnSame = 1;
3187 :
3188 0 : void NeverCallMePlease() {
3189 0 : bReturnSame = 0;
3190 0 : }
3191 :
3192 : /* Some SWIG code generates dead code, which Coverity warns about */
3193 4693300 : template<class T> static T ReturnSame(T x)
3194 : {
3195 18554 : if( bReturnSame )
3196 : return x;
3197 : return 0;
3198 : }
3199 :
3200 2920940 : static void pushErrorHandler()
3201 : {
3202 2920940 : CPLErrorReset();
3203 2920940 : PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
3204 2920940 : CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
3205 2920940 : }
3206 :
3207 2920940 : static void popErrorHandler()
3208 : {
3209 2920940 : PythonBindingErrorHandlerContext* ctxt = static_cast<
3210 2920940 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
3211 2920940 : CPLPopErrorHandler();
3212 2920940 : if( ctxt->bMemoryError )
3213 : {
3214 0 : CPLErrorSetState(
3215 : CE_Failure, CPLE_OutOfMemory, "Out of memory");
3216 : }
3217 2920940 : else if( !ctxt->osFailureMsg.empty() )
3218 : {
3219 350 : CPLErrorSetState(
3220 322 : CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
3221 : ctxt->nLastCode, ctxt->osFailureMsg.c_str());
3222 : }
3223 2920940 : delete ctxt;
3224 2920940 : }
3225 :
3226 :
3227 :
3228 :
3229 : /* Return a PyObject* from a NULL terminated C String */
3230 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
3231 9581 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
3232 : {
3233 9581 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3234 432819 : while(*pszIter != 0)
3235 : {
3236 423238 : if (*pszIter > 127)
3237 : {
3238 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
3239 0 : if (pyObj != NULL && !PyErr_Occurred())
3240 : return pyObj;
3241 0 : PyErr_Clear();
3242 0 : return PyBytes_FromString(pszStr);
3243 : }
3244 423238 : pszIter ++;
3245 : }
3246 9581 : return PyUnicode_FromString(pszStr);
3247 : }
3248 :
3249 : /* Return a NULL terminated c String from a PyObject */
3250 : /* Result must be freed with GDALPythonFreeCStr */
3251 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3252 24422 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
3253 : {
3254 24422 : *pbToFree = 0;
3255 24422 : if (PyUnicode_Check(pyObject))
3256 : {
3257 24422 : char *pszStr;
3258 24422 : char *pszNewStr;
3259 24422 : Py_ssize_t nLen;
3260 24422 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
3261 24422 : if( pyUTF8Str == NULL )
3262 : return NULL;
3263 24420 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3264 24420 : pszNewStr = (char *) malloc(nLen+1);
3265 24420 : if( pszNewStr == NULL )
3266 : {
3267 0 : CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
3268 : (unsigned long long)(nLen + 1));
3269 0 : Py_XDECREF(pyUTF8Str);
3270 0 : return NULL;
3271 : }
3272 24420 : memcpy(pszNewStr, pszStr, nLen+1);
3273 24420 : Py_XDECREF(pyUTF8Str);
3274 24420 : *pbToFree = 1;
3275 24420 : return pszNewStr;
3276 : }
3277 0 : else if( PyBytes_Check(pyObject) )
3278 : {
3279 0 : char* ret = PyBytes_AsString(pyObject);
3280 :
3281 : // Check if there are \0 bytes inside the string
3282 0 : const Py_ssize_t size = PyBytes_Size(pyObject);
3283 0 : for( Py_ssize_t i = 0; i < size; i++ )
3284 : {
3285 0 : if( ret[i] == 0 )
3286 : {
3287 0 : CPLError(CE_Failure, CPLE_AppDefined,
3288 : "bytes object cast as string contains a zero-byte.");
3289 0 : return NULL;
3290 : }
3291 : }
3292 :
3293 : return ret;
3294 : }
3295 : else
3296 : {
3297 0 : CPLError(CE_Failure, CPLE_AppDefined,
3298 : "Passed object is neither of type string nor bytes");
3299 0 : return NULL;
3300 : }
3301 : }
3302 :
3303 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3304 3211 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
3305 : {
3306 3211 : PyObject* os = PyImport_ImportModule("os");
3307 3211 : if (os == NULL)
3308 : {
3309 : return NULL;
3310 : }
3311 :
3312 3211 : PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
3313 3211 : if (pathLike == NULL)
3314 : {
3315 0 : Py_DECREF(os);
3316 0 : return NULL;
3317 : }
3318 :
3319 3211 : if (!PyObject_IsInstance(pyObject, pathLike))
3320 : {
3321 0 : Py_DECREF(pathLike);
3322 0 : Py_DECREF(os);
3323 0 : return NULL;
3324 : }
3325 :
3326 3211 : PyObject* str = PyObject_Str(pyObject);
3327 3211 : char* ret = NULL;
3328 3211 : if (str != NULL)
3329 : {
3330 3211 : ret = GDALPythonObjectToCStr(str, pbToFree);
3331 3211 : Py_DECREF(str);
3332 : }
3333 :
3334 3211 : Py_DECREF(pathLike);
3335 3211 : Py_DECREF(os);
3336 :
3337 : return ret;
3338 : }
3339 :
3340 :
3341 : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
3342 21506 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
3343 : {
3344 21506 : if (bToFree)
3345 21504 : free(ptr);
3346 : }
3347 :
3348 :
3349 :
3350 :
3351 : typedef struct {
3352 : PyObject *psPyCallback;
3353 : PyObject *psPyCallbackData;
3354 : int nLastReported;
3355 : } PyProgressData;
3356 :
3357 : /************************************************************************/
3358 : /* PyProgressProxy() */
3359 : /************************************************************************/
3360 :
3361 :
3362 : static int CPL_STDCALL
3363 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData ) CPL_UNUSED;
3364 :
3365 : static int CPL_STDCALL
3366 24 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
3367 :
3368 : {
3369 24 : PyProgressData *psInfo = (PyProgressData *) pData;
3370 24 : PyObject *psArgs, *psResult;
3371 24 : int bContinue = TRUE;
3372 :
3373 24 : if( dfComplete > 0 && psInfo->nLastReported == (int) (100.0 * dfComplete) )
3374 : return TRUE;
3375 :
3376 24 : if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
3377 : return TRUE;
3378 :
3379 24 : psInfo->nLastReported = (int) (100.0 * dfComplete);
3380 :
3381 24 : if( pszMessage == NULL )
3382 0 : pszMessage = "";
3383 :
3384 48 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3385 :
3386 24 : if( psInfo->psPyCallbackData == NULL )
3387 24 : psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
3388 : else
3389 0 : psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
3390 : psInfo->psPyCallbackData );
3391 :
3392 24 : psResult = PyObject_CallObject( psInfo->psPyCallback, psArgs);
3393 24 : Py_XDECREF(psArgs);
3394 :
3395 24 : if( PyErr_Occurred() != NULL )
3396 : {
3397 0 : PyErr_Print();
3398 0 : PyErr_Clear();
3399 0 : SWIG_PYTHON_THREAD_END_BLOCK;
3400 : return FALSE;
3401 : }
3402 :
3403 24 : if( psResult == NULL )
3404 : {
3405 0 : SWIG_PYTHON_THREAD_END_BLOCK;
3406 : return TRUE;
3407 : }
3408 :
3409 24 : if( psResult == Py_None )
3410 : {
3411 0 : SWIG_PYTHON_THREAD_END_BLOCK;
3412 : return TRUE;
3413 : }
3414 :
3415 24 : if( !PyArg_Parse( psResult, "i", &bContinue ) )
3416 : {
3417 0 : PyErr_Clear();
3418 0 : CPLError(CE_Failure, CPLE_AppDefined, "bad progress return value");
3419 0 : Py_XDECREF(psResult);
3420 0 : SWIG_PYTHON_THREAD_END_BLOCK;
3421 : return FALSE;
3422 : }
3423 :
3424 24 : Py_XDECREF(psResult);
3425 24 : SWIG_PYTHON_THREAD_END_BLOCK;
3426 :
3427 24 : return bContinue;
3428 : }
3429 :
3430 :
3431 : #include "gdal.h"
3432 :
3433 20 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
3434 20 : return GDALGetDescription( self );
3435 : }
3436 :
3437 : SWIGINTERN int
3438 88520 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3439 : {
3440 : #if PY_VERSION_HEX>=0x03000000
3441 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3442 : if (PyBytes_Check(obj))
3443 : #else
3444 88520 : if (PyUnicode_Check(obj))
3445 : #endif
3446 : #else
3447 : if (PyString_Check(obj))
3448 : #endif
3449 : {
3450 88268 : char *cstr; Py_ssize_t len;
3451 88268 : int ret = SWIG_OK;
3452 : #if PY_VERSION_HEX>=0x03000000
3453 : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3454 88268 : if (!alloc && cptr) {
3455 : /* We can't allow converting without allocation, since the internal
3456 : representation of string in Python 3 is UCS-2/UCS-4 but we require
3457 : a UTF-8 representation.
3458 : TODO(bhy) More detailed explanation */
3459 : return SWIG_RuntimeError;
3460 : }
3461 88268 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3462 88268 : if (!obj)
3463 : return SWIG_TypeError;
3464 88268 : if (alloc)
3465 85342 : *alloc = SWIG_NEWOBJ;
3466 : #endif
3467 88268 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3468 : #else
3469 : PyString_AsStringAndSize(obj, &cstr, &len);
3470 : #endif
3471 88268 : if (cptr) {
3472 85342 : if (alloc) {
3473 85342 : if (*alloc == SWIG_NEWOBJ) {
3474 85342 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3475 85342 : *alloc = SWIG_NEWOBJ;
3476 : } else {
3477 0 : *cptr = cstr;
3478 0 : *alloc = SWIG_OLDOBJ;
3479 : }
3480 : } else {
3481 : #if PY_VERSION_HEX>=0x03000000
3482 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3483 : *cptr = PyBytes_AsString(obj);
3484 : #else
3485 : assert(0); /* Should never reach here with Unicode strings in Python 3 */
3486 : #endif
3487 : #else
3488 : *cptr = SWIG_Python_str_AsChar(obj);
3489 : if (!*cptr)
3490 : ret = SWIG_TypeError;
3491 : #endif
3492 : }
3493 : }
3494 88268 : if (psize) *psize = len + 1;
3495 : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3496 88268 : Py_XDECREF(obj);
3497 : #endif
3498 88268 : return ret;
3499 : } else {
3500 : #if defined(SWIG_PYTHON_2_UNICODE)
3501 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3502 : #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3503 : #endif
3504 : #if PY_VERSION_HEX<0x03000000
3505 : if (PyUnicode_Check(obj)) {
3506 : char *cstr; Py_ssize_t len;
3507 : if (!alloc && cptr) {
3508 : return SWIG_RuntimeError;
3509 : }
3510 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3511 : if (!obj)
3512 : return SWIG_TypeError;
3513 : if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3514 : if (cptr) {
3515 : if (alloc) *alloc = SWIG_NEWOBJ;
3516 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3517 : }
3518 : if (psize) *psize = len + 1;
3519 :
3520 : Py_XDECREF(obj);
3521 : return SWIG_OK;
3522 : } else {
3523 : Py_XDECREF(obj);
3524 : }
3525 : }
3526 : #endif
3527 : #endif
3528 :
3529 252 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3530 252 : if (pchar_descriptor) {
3531 252 : void* vptr = 0;
3532 252 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3533 209 : if (cptr) *cptr = (char *) vptr;
3534 209 : if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3535 209 : if (alloc) *alloc = SWIG_OLDOBJ;
3536 209 : return SWIG_OK;
3537 : }
3538 : }
3539 : }
3540 : return SWIG_TypeError;
3541 : }
3542 :
3543 :
3544 :
3545 :
3546 0 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
3547 0 : GDALSetDescription( self, pszNewDesc );
3548 0 : }
3549 8 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
3550 8 : return GDALGetMetadataDomainList( self );
3551 : }
3552 :
3553 423 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
3554 : {
3555 423 : PyObject* res;
3556 423 : if ( stringarray == NULL ) {
3557 45 : res = Py_None;
3558 45 : Py_INCREF( res );
3559 : }
3560 : else {
3561 378 : int len = CSLCount( stringarray );
3562 378 : res = PyList_New( len );
3563 378 : if( !res ) {
3564 0 : *pbErr = true;
3565 0 : return res;
3566 : }
3567 1317 : for ( int i = 0; i < len; ++i ) {
3568 939 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
3569 939 : PyList_SetItem(res, i, o );
3570 : }
3571 : }
3572 423 : *pbErr = false;
3573 423 : return res;
3574 : }
3575 :
3576 82 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
3577 82 : return GDALGetMetadata( self, pszDomain );
3578 : }
3579 :
3580 : /* Return a PyObject* from a C String */
3581 416 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
3582 : {
3583 416 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3584 3810 : for( size_t i = 0; i < nLen; ++i)
3585 : {
3586 3394 : if (pszIter[i] > 127)
3587 : {
3588 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
3589 0 : if (pyObj != NULL && !PyErr_Occurred())
3590 : return pyObj;
3591 0 : PyErr_Clear();
3592 0 : return PyBytes_FromStringAndSize(pszStr, nLen);
3593 : }
3594 : }
3595 416 : return PyUnicode_FromStringAndSize(pszStr, nLen);
3596 : }
3597 :
3598 :
3599 : static PyObject*
3600 87 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
3601 87 : PyObject* dict = PyDict_New();
3602 87 : if ( stringarray != NULL ) {
3603 486 : for (char** iter = stringarray; *iter; ++iter ) {
3604 416 : const char* pszSep = strchr( *iter, '=' );
3605 416 : if ( pszSep != NULL) {
3606 416 : const char* keyptr = *iter;
3607 416 : const char* valptr = pszSep + 1;
3608 416 : PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
3609 416 : PyObject *val = GDALPythonObjectFromCStr( valptr );
3610 416 : PyDict_SetItem(dict, nm, val );
3611 416 : Py_DECREF(nm);
3612 416 : Py_DECREF(val);
3613 : }
3614 : }
3615 : }
3616 87 : if( bFreeCSL )
3617 0 : CSLDestroy(stringarray);
3618 87 : return dict;
3619 : }
3620 :
3621 9 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
3622 9 : return GDALGetMetadata( self, pszDomain );
3623 : }
3624 :
3625 : /************************************************************************/
3626 : /* CSLFromPySequence() */
3627 : /************************************************************************/
3628 955 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
3629 :
3630 : {
3631 955 : *pbErr = FALSE;
3632 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
3633 955 : if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
3634 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
3635 0 : *pbErr = TRUE;
3636 0 : return NULL;
3637 : }
3638 :
3639 955 : Py_ssize_t size = PySequence_Size(pySeq);
3640 955 : if( size > (Py_ssize_t)(INT_MAX - 1) ) {
3641 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
3642 0 : *pbErr = TRUE;
3643 0 : return NULL;
3644 : }
3645 955 : if( size == 0 ) {
3646 : return NULL;
3647 : }
3648 695 : char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
3649 695 : if( !papszRet ) {
3650 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3651 0 : *pbErr = TRUE;
3652 0 : return NULL;
3653 : }
3654 2993 : for (int i = 0; i < (int)size; i++) {
3655 2298 : PyObject* pyObj = PySequence_GetItem(pySeq,i);
3656 2298 : if (PyUnicode_Check(pyObj))
3657 : {
3658 2298 : char *pszStr;
3659 2298 : Py_ssize_t nLen;
3660 2298 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
3661 2298 : if( !pyUTF8Str )
3662 : {
3663 0 : Py_DECREF(pyObj);
3664 0 : PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
3665 0 : CSLDestroy(papszRet);
3666 0 : *pbErr = TRUE;
3667 0 : return NULL;
3668 : }
3669 2298 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3670 2298 : papszRet[i] = VSIStrdup(pszStr);
3671 4572 : Py_XDECREF(pyUTF8Str);
3672 : }
3673 0 : else if (PyBytes_Check(pyObj))
3674 0 : papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
3675 : else
3676 : {
3677 0 : Py_DECREF(pyObj);
3678 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
3679 0 : CSLDestroy(papszRet);
3680 0 : *pbErr = TRUE;
3681 0 : return NULL;
3682 : }
3683 2298 : Py_DECREF(pyObj);
3684 2298 : if( !papszRet[i] )
3685 : {
3686 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3687 0 : CSLDestroy(papszRet);
3688 0 : *pbErr = TRUE;
3689 0 : return NULL;
3690 : }
3691 : }
3692 : return papszRet;
3693 : }
3694 :
3695 :
3696 55 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
3697 :
3698 : {
3699 55 : char** retCSL = NULL;
3700 55 : Py_ssize_t size = PyMapping_Length( pyObj );
3701 55 : if ( size > 0 && size == (int)size) {
3702 55 : PyObject *item_list = PyMapping_Items( pyObj );
3703 116 : for( int i=0; i<(int)size; i++ ) {
3704 61 : PyObject *it = PySequence_GetItem( item_list, i );
3705 :
3706 61 : PyObject *k, *v;
3707 61 : if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
3708 0 : Py_DECREF(it);
3709 0 : Py_DECREF(item_list);
3710 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
3711 0 : CSLDestroy(retCSL);
3712 0 : *pbErr = TRUE;
3713 0 : return NULL;
3714 : }
3715 :
3716 61 : PyObject* kStr = PyObject_Str(k);
3717 61 : if( PyErr_Occurred() )
3718 : {
3719 0 : Py_DECREF(it);
3720 0 : Py_DECREF(item_list);
3721 0 : CSLDestroy(retCSL);
3722 0 : *pbErr = TRUE;
3723 0 : return NULL;
3724 : }
3725 :
3726 61 : PyObject* vStr;
3727 61 : if( PyBytes_Check(v) )
3728 : {
3729 0 : vStr = v;
3730 0 : Py_INCREF(vStr);
3731 : }
3732 : else
3733 : {
3734 61 : vStr = PyObject_Str(v);
3735 61 : if( PyErr_Occurred() )
3736 : {
3737 0 : Py_DECREF(it);
3738 0 : Py_DECREF(kStr);
3739 0 : Py_DECREF(item_list);
3740 0 : CSLDestroy(retCSL);
3741 0 : *pbErr = TRUE;
3742 0 : return NULL;
3743 : }
3744 : }
3745 :
3746 61 : int bFreeK, bFreeV;
3747 61 : char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
3748 61 : char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
3749 61 : if( pszK == NULL || pszV == NULL )
3750 : {
3751 0 : GDALPythonFreeCStr(pszK, bFreeK);
3752 0 : GDALPythonFreeCStr(pszV, bFreeV);
3753 0 : Py_DECREF(kStr);
3754 0 : Py_DECREF(vStr);
3755 0 : Py_DECREF(it);
3756 0 : Py_DECREF(item_list);
3757 0 : PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
3758 0 : CSLDestroy(retCSL);
3759 0 : *pbErr = TRUE;
3760 0 : return NULL;
3761 : }
3762 61 : retCSL = CSLAddNameValue( retCSL, pszK, pszV );
3763 :
3764 61 : GDALPythonFreeCStr(pszK, bFreeK);
3765 61 : GDALPythonFreeCStr(pszV, bFreeV);
3766 61 : Py_DECREF(kStr);
3767 61 : Py_DECREF(vStr);
3768 61 : Py_DECREF(it);
3769 : }
3770 55 : Py_DECREF(item_list);
3771 : }
3772 55 : *pbErr = FALSE;
3773 55 : return retCSL;
3774 : }
3775 :
3776 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
3777 : return GDALSetMetadata( self, papszMetadata, pszDomain );
3778 : }
3779 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
3780 : char *tmpList[2];
3781 : tmpList[0] = pszMetadataString;
3782 : tmpList[1] = 0;
3783 : return GDALSetMetadata( self, tmpList, pszDomain );
3784 : }
3785 479 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
3786 479 : return GDALGetMetadataItem( self, pszName, pszDomain);
3787 : }
3788 297 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
3789 297 : return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
3790 : }
3791 :
3792 4820 : int GetGEOSVersionMajor() {
3793 4820 : int num;
3794 4820 : OGRGetGEOSVersion(&num, NULL, NULL);
3795 4820 : return num;
3796 : }
3797 :
3798 329 : int GetGEOSVersionMinor() {
3799 329 : int num;
3800 329 : OGRGetGEOSVersion(NULL, &num, NULL);
3801 329 : return num;
3802 : }
3803 :
3804 329 : int GetGEOSVersionMicro() {
3805 329 : int num;
3806 329 : OGRGetGEOSVersion(NULL, NULL, &num);
3807 329 : return num;
3808 : }
3809 :
3810 4 : SWIGINTERN OGRStyleTableShadow *new_OGRStyleTableShadow(){
3811 4 : return (OGRStyleTableShadow*) OGR_STBL_Create();
3812 : }
3813 4 : SWIGINTERN void delete_OGRStyleTableShadow(OGRStyleTableShadow *self){
3814 4 : OGR_STBL_Destroy( (OGRStyleTableH) self );
3815 4 : }
3816 5 : SWIGINTERN int OGRStyleTableShadow_AddStyle(OGRStyleTableShadow *self,char const *pszName,char const *pszStyleString){
3817 5 : return OGR_STBL_AddStyle( (OGRStyleTableH) self, pszName, pszStyleString);
3818 : }
3819 2 : SWIGINTERN int OGRStyleTableShadow_LoadStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
3820 2 : return OGR_STBL_LoadStyleTable( (OGRStyleTableH) self, utf8_path );
3821 : }
3822 2 : SWIGINTERN int OGRStyleTableShadow_SaveStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
3823 2 : return OGR_STBL_SaveStyleTable( (OGRStyleTableH) self, utf8_path );
3824 : }
3825 2 : SWIGINTERN char const *OGRStyleTableShadow_Find(OGRStyleTableShadow *self,char const *pszName){
3826 2 : return OGR_STBL_Find( (OGRStyleTableH) self, pszName );
3827 : }
3828 1 : SWIGINTERN void OGRStyleTableShadow_ResetStyleStringReading(OGRStyleTableShadow *self){
3829 1 : OGR_STBL_ResetStyleStringReading( (OGRStyleTableH) self );
3830 1 : }
3831 5 : SWIGINTERN char const *OGRStyleTableShadow_GetNextStyle(OGRStyleTableShadow *self){
3832 5 : return OGR_STBL_GetNextStyle( (OGRStyleTableH) self );
3833 : }
3834 1 : SWIGINTERN char const *OGRStyleTableShadow_GetLastStyleName(OGRStyleTableShadow *self){
3835 1 : return OGR_STBL_GetLastStyleName( (OGRStyleTableH) self );
3836 : }
3837 4 : SWIGINTERN ArrowArray *new_ArrowArray(){
3838 4 : return (struct ArrowArray* )calloc(1, sizeof(struct ArrowArray));
3839 : }
3840 571 : SWIGINTERN void delete_ArrowArray(ArrowArray *self){
3841 571 : if( self->release )
3842 514 : self->release(self);
3843 571 : free(self);
3844 : }
3845 527 : SWIGINTERN VoidPtrAsLong ArrowArray__getPtr(ArrowArray *self){
3846 527 : return self;
3847 : }
3848 1 : SWIGINTERN GIntBig ArrowArray_GetChildrenCount(ArrowArray *self){
3849 1 : return self->n_children;
3850 : }
3851 0 : SWIGINTERN GIntBig ArrowArray_GetLength(ArrowArray *self){
3852 0 : return self->length;
3853 : }
3854 126 : SWIGINTERN ArrowSchema *new_ArrowSchema(){
3855 126 : return (struct ArrowSchema* )calloc(1, sizeof(struct ArrowSchema));
3856 : }
3857 508 : SWIGINTERN void delete_ArrowSchema(ArrowSchema *self){
3858 508 : if( self->release )
3859 425 : self->release(self);
3860 508 : free(self);
3861 : }
3862 684 : SWIGINTERN VoidPtrAsLong ArrowSchema__getPtr(ArrowSchema *self){
3863 684 : return self;
3864 : }
3865 426 : SWIGINTERN char const *ArrowSchema_GetName(ArrowSchema *self){
3866 426 : return self->name;
3867 : }
3868 26 : SWIGINTERN GIntBig ArrowSchema_GetChildrenCount(ArrowSchema *self){
3869 26 : return self->n_children;
3870 : }
3871 833 : SWIGINTERN ArrowSchema const *ArrowSchema_GetChild(ArrowSchema *self,int iChild){
3872 833 : if( iChild < 0 || iChild >= self->n_children )
3873 : {
3874 0 : CPLError(CE_Failure, CPLE_AppDefined, "Wrong index");
3875 0 : return NULL;
3876 : }
3877 833 : return self->children[iChild];
3878 : }
3879 350 : SWIGINTERN void delete_ArrowArrayStream(ArrowArrayStream *self){
3880 350 : if( self->release )
3881 350 : self->release(self);
3882 350 : free(self);
3883 : }
3884 382 : SWIGINTERN ArrowSchema *ArrowArrayStream_GetSchema(ArrowArrayStream *self){
3885 382 : struct ArrowSchema* schema = (struct ArrowSchema* )malloc(sizeof(struct ArrowSchema));
3886 382 : if( self->get_schema(self, schema) == 0 )
3887 : {
3888 : return schema;
3889 : }
3890 : else
3891 : {
3892 0 : free(schema);
3893 0 : return NULL;
3894 : }
3895 : }
3896 : SWIGINTERN ArrowArray *ArrowArrayStream_GetNextRecordBatch(ArrowArrayStream *self,char **options=NULL){
3897 : struct ArrowArray* array = (struct ArrowArray* )malloc(sizeof(struct ArrowArray));
3898 : if( self->get_next(self, array) == 0 && array->release != NULL )
3899 : {
3900 : return array;
3901 : }
3902 : else
3903 : {
3904 : free(array);
3905 : return NULL;
3906 : }
3907 : }
3908 :
3909 15 : static void ReleaseArrowArrayStreamPyCapsule(PyObject* capsule) {
3910 15 : struct ArrowArrayStream* stream =
3911 15 : (struct ArrowArrayStream*)PyCapsule_GetPointer(capsule, "arrow_array_stream");
3912 15 : if (stream->release != NULL) {
3913 3 : stream->release(stream);
3914 : }
3915 15 : CPLFree(stream);
3916 15 : }
3917 :
3918 11 : static char** ParseArrowMetadata(const char *pabyMetadata)
3919 : {
3920 11 : char** ret = NULL;
3921 11 : int32_t nKVP;
3922 11 : memcpy(&nKVP, pabyMetadata, sizeof(int32_t));
3923 11 : pabyMetadata += sizeof(int32_t);
3924 22 : for (int i = 0; i < nKVP; ++i)
3925 : {
3926 11 : int32_t nSizeKey;
3927 11 : memcpy(&nSizeKey, pabyMetadata, sizeof(int32_t));
3928 11 : pabyMetadata += sizeof(int32_t);
3929 22 : std::string osKey;
3930 11 : osKey.assign(pabyMetadata, nSizeKey);
3931 11 : pabyMetadata += nSizeKey;
3932 :
3933 11 : int32_t nSizeValue;
3934 11 : memcpy(&nSizeValue, pabyMetadata, sizeof(int32_t));
3935 11 : pabyMetadata += sizeof(int32_t);
3936 22 : std::string osValue;
3937 11 : osValue.assign(pabyMetadata, nSizeValue);
3938 11 : pabyMetadata += nSizeValue;
3939 :
3940 11 : ret = CSLSetNameValue(ret, osKey.c_str(), osValue.c_str());
3941 : }
3942 :
3943 11 : return ret;
3944 : }
3945 :
3946 : // Create output fields using CreateFieldFromArrowSchema()
3947 : static bool CreateFieldsFromArrowSchema(OGRLayerH hDstLayer,
3948 : const struct ArrowSchema* schemaSrc,
3949 : char** options)
3950 : {
3951 : for (int i = 0; i < schemaSrc->n_children; ++i)
3952 : {
3953 : const char *metadata =
3954 : schemaSrc->children[i]->metadata;
3955 : if( metadata )
3956 : {
3957 : char** keyValues = ParseArrowMetadata(metadata);
3958 : const char *ARROW_EXTENSION_NAME_KEY = "ARROW:extension:name";
3959 : const char *EXTENSION_NAME_OGC_WKB = "ogc.wkb";
3960 : const char *EXTENSION_NAME_GEOARROW_WKB = "geoarrow.wkb";
3961 : const char* value = CSLFetchNameValue(keyValues, ARROW_EXTENSION_NAME_KEY);
3962 : const bool bSkip = ( value && (EQUAL(value, EXTENSION_NAME_OGC_WKB) || EQUAL(value, EXTENSION_NAME_GEOARROW_WKB)) );
3963 : CSLDestroy(keyValues);
3964 : if( bSkip )
3965 : continue;
3966 : }
3967 :
3968 : const char *pszFieldName =
3969 : schemaSrc->children[i]->name;
3970 : if (!EQUAL(pszFieldName, "OGC_FID") &&
3971 : !EQUAL(pszFieldName, "wkb_geometry") &&
3972 : !OGR_L_CreateFieldFromArrowSchema(
3973 : hDstLayer, schemaSrc->children[i], options))
3974 : {
3975 : CPLError(CE_Failure, CPLE_AppDefined,
3976 : "Cannot create field %s",
3977 : pszFieldName);
3978 : return false;
3979 : }
3980 : }
3981 : return true;
3982 : }
3983 :
3984 :
3985 264 : SWIGINTERN GDALDatasetShadow *OGRLayerShadow_GetDataset(OGRLayerShadow *self){
3986 264 : return OGR_L_GetDataset(self);
3987 : }
3988 29 : SWIGINTERN OGRErr OGRLayerShadow_Rename(OGRLayerShadow *self,char const *new_name){
3989 29 : return OGR_L_Rename( self, new_name);
3990 : }
3991 :
3992 :
3993 : #include "ogr_core.h"
3994 : static char const *
3995 5718 : OGRErrMessages( int rc ) {
3996 5718 : switch( rc ) {
3997 : case OGRERR_NONE:
3998 : return "OGR Error: None";
3999 2172 : case OGRERR_NOT_ENOUGH_DATA:
4000 2172 : return "OGR Error: Not enough data to deserialize";
4001 0 : case OGRERR_NOT_ENOUGH_MEMORY:
4002 0 : return "OGR Error: Not enough memory";
4003 1098 : case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
4004 1098 : return "OGR Error: Unsupported geometry type";
4005 0 : case OGRERR_UNSUPPORTED_OPERATION:
4006 0 : return "OGR Error: Unsupported operation";
4007 2372 : case OGRERR_CORRUPT_DATA:
4008 2372 : return "OGR Error: Corrupt data";
4009 71 : case OGRERR_FAILURE:
4010 71 : return "OGR Error: General Error";
4011 0 : case OGRERR_UNSUPPORTED_SRS:
4012 0 : return "OGR Error: Unsupported SRS";
4013 0 : case OGRERR_INVALID_HANDLE:
4014 0 : return "OGR Error: Invalid handle";
4015 5 : case OGRERR_NON_EXISTING_FEATURE:
4016 5 : return "OGR Error: Non existing feature";
4017 0 : default:
4018 0 : return "OGR Error: Unknown";
4019 : }
4020 : }
4021 :
4022 0 : SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
4023 0 : return OGR_L_GetRefCount(self);
4024 : }
4025 : SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_0(OGRLayerShadow *self,OGRGeometryShadow *filter){
4026 : OGR_L_SetSpatialFilter (self, filter);
4027 : }
4028 : SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_0(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
4029 : OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);
4030 : }
4031 : SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_1(OGRLayerShadow *self,int iGeomField,OGRGeometryShadow *filter){
4032 : OGR_L_SetSpatialFilterEx (self, iGeomField, filter);
4033 : }
4034 : SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_1(OGRLayerShadow *self,int iGeomField,double minx,double miny,double maxx,double maxy){
4035 : OGR_L_SetSpatialFilterRectEx(self, iGeomField, minx, miny, maxx, maxy);
4036 : }
4037 5 : SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
4038 5 : return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
4039 : }
4040 1453 : SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
4041 1453 : return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
4042 : }
4043 17679 : SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
4044 17679 : OGR_L_ResetReading(self);
4045 17679 : }
4046 1259 : SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
4047 1259 : return OGR_L_GetName(self);
4048 : }
4049 1114 : SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
4050 1114 : return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
4051 : }
4052 690 : SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
4053 690 : return OGR_L_GetGeometryColumn(self);
4054 : }
4055 386 : SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
4056 386 : return OGR_L_GetFIDColumn(self);
4057 : }
4058 2538 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,GIntBig fid){
4059 2538 : return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
4060 : }
4061 80315 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
4062 80315 : return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
4063 : }
4064 41 : SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,GIntBig new_index){
4065 41 : return OGR_L_SetNextByIndex(self, new_index);
4066 : }
4067 2478 : SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
4068 2478 : return OGR_L_SetFeature(self, feature);
4069 : }
4070 282556 : SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
4071 282556 : return OGR_L_CreateFeature(self, feature);
4072 : }
4073 31 : SWIGINTERN OGRErr OGRLayerShadow_UpsertFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
4074 31 : return OGR_L_UpsertFeature(self, feature);
4075 : }
4076 :
4077 : static int*
4078 114 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
4079 : /* check if is List */
4080 114 : if ( !PySequence_Check(pySeq) ) {
4081 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4082 0 : *pnSize = -1;
4083 0 : return NULL;
4084 : }
4085 114 : Py_ssize_t size = PySequence_Size(pySeq);
4086 114 : if( size > (Py_ssize_t)INT_MAX ) {
4087 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4088 0 : *pnSize = -1;
4089 0 : return NULL;
4090 : }
4091 114 : if( (size_t)size > SIZE_MAX / sizeof(int) ) {
4092 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4093 0 : *pnSize = -1;
4094 0 : return NULL;
4095 : }
4096 114 : *pnSize = (int)size;
4097 114 : int* ret = (int*) malloc((*pnSize)*sizeof(int));
4098 114 : if( !ret ) {
4099 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
4100 0 : *pnSize = -1;
4101 0 : return NULL;
4102 : }
4103 241 : for( int i = 0; i<*pnSize; i++ ) {
4104 127 : PyObject *o = PySequence_GetItem(pySeq,i);
4105 127 : if ( !PyArg_Parse(o,"i",&ret[i]) ) {
4106 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
4107 0 : Py_DECREF(o);
4108 0 : free(ret);
4109 0 : *pnSize = -1;
4110 0 : return NULL;
4111 : }
4112 127 : Py_DECREF(o);
4113 : }
4114 : return ret;
4115 : }
4116 :
4117 :
4118 : SWIGINTERN int
4119 69 : SWIG_AsVal_bool (PyObject *obj, bool *val)
4120 : {
4121 69 : int r;
4122 69 : if (!PyBool_Check(obj))
4123 : return SWIG_ERROR;
4124 69 : r = PyObject_IsTrue(obj);
4125 69 : if (r == -1)
4126 : return SWIG_ERROR;
4127 69 : if (val) *val = r ? true : false;
4128 : return SWIG_OK;
4129 : }
4130 :
4131 31 : SWIGINTERN OGRErr OGRLayerShadow_UpdateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature,int nUpdatedFieldsCount,int const *panUpdatedFieldsIdx,int nUpdatedGeomFieldsCount,int const *panUpdatedGeomFieldsIdx,bool bUpdateStyleString){
4132 31 : return OGR_L_UpdateFeature(self, feature,
4133 : nUpdatedFieldsCount,
4134 : panUpdatedFieldsIdx,
4135 : nUpdatedGeomFieldsCount,
4136 : panUpdatedGeomFieldsIdx,
4137 : bUpdateStyleString);
4138 : }
4139 3355 : SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,GIntBig fid){
4140 3355 : return OGR_L_DeleteFeature(self, fid);
4141 : }
4142 251 : SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
4143 251 : return OGR_L_SyncToDisk(self);
4144 : }
4145 127446 : SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
4146 254892 : auto defn = (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
4147 127446 : if (defn)
4148 127446 : OGR_FD_Reference(defn);
4149 127446 : return defn;
4150 : }
4151 36892 : SWIGINTERN GIntBig OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
4152 36892 : return OGR_L_GetFeatureCount(self, force);
4153 : }
4154 :
4155 : static PyObject *
4156 13799 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
4157 13799 : PyObject *out = PyTuple_New( size );
4158 68910 : for( unsigned int i=0; i<size; i++ ) {
4159 55111 : PyObject *val = PyFloat_FromDouble( *first );
4160 55111 : ++first;
4161 55111 : PyTuple_SetItem( out, i, val );
4162 : }
4163 13799 : return out;
4164 : }
4165 :
4166 378 : SWIGINTERN void OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int *isvalid=NULL,int force=1,int can_return_null=0,int geom_field=0){
4167 756 : OGRErr eErr = OGR_L_GetExtentEx(self, geom_field, (OGREnvelope*)argout, force);
4168 378 : if (can_return_null)
4169 36 : *isvalid = (eErr == 0);
4170 : else
4171 : *isvalid = TRUE;
4172 378 : return;
4173 : }
4174 60 : SWIGINTERN void OGRLayerShadow_GetExtent3D(OGRLayerShadow *self,double argout[6],int *isvalid=NULL,int force=1,int can_return_null=0,int geom_field=0){
4175 120 : OGRErr eErr = OGR_L_GetExtent3D(self, geom_field, (OGREnvelope3D*)argout, force);
4176 60 : if (can_return_null)
4177 1 : *isvalid = (eErr == 0);
4178 : else
4179 : *isvalid = TRUE;
4180 60 : return;
4181 : }
4182 784 : SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
4183 1568 : return (OGR_L_TestCapability(self, cap) > 0);
4184 : }
4185 :
4186 : SWIGINTERNINLINE PyObject*
4187 37753 : SWIG_From_bool (bool value)
4188 : {
4189 37753 : return PyBool_FromLong(value ? 1 : 0);
4190 : }
4191 :
4192 77400 : SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
4193 77400 : return OGR_L_CreateField(self, field_def, approx_ok);
4194 : }
4195 373 : SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
4196 373 : return OGR_L_DeleteField(self, iField);
4197 : }
4198 34 : SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
4199 34 : return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
4200 : }
4201 43 : SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
4202 43 : if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
4203 : {
4204 0 : CPLError(CE_Failure, CPLE_IllegalArg,
4205 : "List should have %d elements",
4206 : OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
4207 0 : return 6;
4208 : }
4209 43 : return OGR_L_ReorderFields(self, pList);
4210 : }
4211 126 : SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
4212 126 : return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
4213 : }
4214 33 : SWIGINTERN OGRErr OGRLayerShadow_AlterGeomFieldDefn(OGRLayerShadow *self,int iGeomField,OGRGeomFieldDefnShadow const *field_def,int nFlags){
4215 33 : return OGR_L_AlterGeomFieldDefn(self, iGeomField, const_cast<OGRGeomFieldDefnShadow*>(field_def), nFlags);
4216 : }
4217 132 : SWIGINTERN OGRErr OGRLayerShadow_CreateGeomField(OGRLayerShadow *self,OGRGeomFieldDefnShadow *field_def,int approx_ok=1){
4218 132 : return OGR_L_CreateGeomField(self, field_def, approx_ok);
4219 : }
4220 149 : SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
4221 149 : return OGR_L_StartTransaction(self);
4222 : }
4223 129 : SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
4224 129 : return OGR_L_CommitTransaction(self);
4225 : }
4226 26 : SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
4227 26 : return OGR_L_RollbackTransaction(self);
4228 : }
4229 2 : SWIGINTERN int OGRLayerShadow_FindFieldIndex(OGRLayerShadow *self,char const *pszFieldName,int bExactMatch){
4230 2 : return OGR_L_FindFieldIndex(self, pszFieldName, bExactMatch );
4231 : }
4232 945 : SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
4233 1890 : OGRSpatialReferenceH ref = OGR_L_GetSpatialRef(self);
4234 945 : if( ref )
4235 820 : OSRReference(ref);
4236 945 : return (OSRSpatialReferenceShadow*) ref;
4237 : }
4238 0 : SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
4239 0 : return OGR_L_GetFeaturesRead(self);
4240 : }
4241 265 : SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
4242 265 : return OGR_L_SetIgnoredFields( self, options );
4243 : }
4244 7 : SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4245 7 : return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data );
4246 : }
4247 7 : SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4248 7 : return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data );
4249 : }
4250 4 : SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4251 4 : return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data );
4252 : }
4253 6 : SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4254 6 : return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data );
4255 : }
4256 5 : SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4257 5 : return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data );
4258 : }
4259 3 : SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4260 3 : return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data );
4261 : }
4262 6 : SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4263 6 : return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data );
4264 : }
4265 3 : SWIGINTERN OGRStyleTableShadow *OGRLayerShadow_GetStyleTable(OGRLayerShadow *self){
4266 3 : return (OGRStyleTableShadow*) OGR_L_GetStyleTable(self);
4267 : }
4268 2 : SWIGINTERN void OGRLayerShadow_SetStyleTable(OGRLayerShadow *self,OGRStyleTableShadow *table){
4269 2 : if( table != NULL )
4270 1 : OGR_L_SetStyleTable(self, (OGRStyleTableH) table);
4271 : }
4272 16 : SWIGINTERN PyObject *OGRLayerShadow_ExportArrowArrayStreamPyCapsule(OGRLayerShadow *self,char **options=NULL){
4273 16 : struct ArrowArrayStream* stream =
4274 16 : (struct ArrowArrayStream*)CPLMalloc(sizeof(struct ArrowArrayStream));
4275 :
4276 16 : const int success = OGR_L_GetArrowStream(self, stream, options);
4277 :
4278 16 : PyObject* ret;
4279 16 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
4280 16 : if( success )
4281 : {
4282 15 : ret = PyCapsule_New(stream, "arrow_array_stream", ReleaseArrowArrayStreamPyCapsule);
4283 : }
4284 : else
4285 : {
4286 1 : CPLFree(stream);
4287 1 : Py_INCREF(Py_None);
4288 1 : ret = Py_None;
4289 : }
4290 :
4291 16 : SWIG_PYTHON_THREAD_END_BLOCK;
4292 :
4293 16 : return ret;
4294 : }
4295 352 : SWIGINTERN ArrowArrayStream *OGRLayerShadow_GetArrowStream(OGRLayerShadow *self,char **options=NULL){
4296 352 : struct ArrowArrayStream* stream = (struct ArrowArrayStream* )malloc(sizeof(struct ArrowArrayStream));
4297 352 : if( OGR_L_GetArrowStream(self, stream, options) )
4298 : return stream;
4299 : else
4300 : {
4301 2 : free(stream);
4302 2 : return NULL;
4303 : }
4304 : }
4305 19 : SWIGINTERN void OGRLayerShadow_IsArrowSchemaSupported(OGRLayerShadow *self,ArrowSchema const *schema,bool *pbRet,char **errorMsg,char **options=NULL){
4306 38 : *pbRet = OGR_L_IsArrowSchemaSupported(self, schema, options, errorMsg);
4307 : }
4308 526 : SWIGINTERN OGRErr OGRLayerShadow_CreateFieldFromArrowSchema(OGRLayerShadow *self,ArrowSchema const *schema,char **options=NULL){
4309 526 : return OGR_L_CreateFieldFromArrowSchema(self, schema, options) ? 0 : 6;
4310 : }
4311 47 : SWIGINTERN OGRErr OGRLayerShadow_WriteArrowBatch(OGRLayerShadow *self,ArrowSchema const *schema,ArrowArray *array,char **options=NULL){
4312 47 : return OGR_L_WriteArrowBatch(self, schema, array, options) ? 0 : 6;
4313 : }
4314 12 : SWIGINTERN OGRErr OGRLayerShadow_WriteArrowStreamCapsule(OGRLayerShadow *self,PyObject *capsule,int createFieldsFromSchema,char **options=NULL){
4315 12 : ArrowArrayStream* stream = (ArrowArrayStream*)PyCapsule_GetPointer(capsule, "arrow_array_stream");
4316 12 : if( !stream )
4317 : {
4318 0 : CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(capsule, \"arrow_array_stream\") failed");
4319 0 : return 6;
4320 : }
4321 12 : if( stream->release == NULL )
4322 : {
4323 0 : CPLError(CE_Failure, CPLE_AppDefined, "stream->release == NULL");
4324 0 : return 6;
4325 : }
4326 :
4327 12 : ArrowSchema schema;
4328 12 : if( stream->get_schema(stream, &schema) != 0 )
4329 : {
4330 0 : stream->release(stream);
4331 0 : return 6;
4332 : }
4333 :
4334 12 : if( createFieldsFromSchema == TRUE ||
4335 12 : (createFieldsFromSchema == -1 && OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)) == 0) )
4336 : {
4337 12 : if( !CreateFieldsFromArrowSchema(self, &schema, options) )
4338 : {
4339 0 : schema.release(&schema);
4340 0 : stream->release(stream);
4341 0 : return 6;
4342 : }
4343 : }
4344 :
4345 36 : while( true )
4346 : {
4347 24 : ArrowArray array;
4348 24 : if( stream->get_next(stream, &array) == 0 )
4349 : {
4350 24 : if( array.release == NULL )
4351 : break;
4352 12 : if( !OGR_L_WriteArrowBatch(self, &schema, &array, options) )
4353 : {
4354 0 : if( array.release )
4355 0 : array.release(&array);
4356 0 : schema.release(&schema);
4357 0 : stream->release(stream);
4358 0 : return 6;
4359 : }
4360 12 : if( array.release )
4361 12 : array.release(&array);
4362 : }
4363 : else
4364 : {
4365 0 : CPLError(CE_Failure, CPLE_AppDefined, "stream->get_next(stream, &array) failed");
4366 0 : schema.release(&schema);
4367 0 : stream->release(stream);
4368 0 : return 6;
4369 : }
4370 12 : }
4371 12 : schema.release(&schema);
4372 12 : stream->release(stream);
4373 : return 0;
4374 : }
4375 0 : SWIGINTERN OGRErr OGRLayerShadow_WriteArrowSchemaAndArrowArrayCapsule(OGRLayerShadow *self,PyObject *schemaCapsule,PyObject *arrayCapsule,int createFieldsFromSchema,char **options=NULL){
4376 0 : ArrowSchema* schema = (ArrowSchema*)PyCapsule_GetPointer(schemaCapsule, "arrow_schema");
4377 0 : if( !schema )
4378 : {
4379 0 : CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(schemaCapsule, \"arrow_schema\") failed");
4380 0 : return 6;
4381 : }
4382 0 : if( schema->release == NULL )
4383 : {
4384 0 : CPLError(CE_Failure, CPLE_AppDefined, "schema->release == NULL");
4385 0 : return 6;
4386 : }
4387 :
4388 0 : if( createFieldsFromSchema == TRUE ||
4389 0 : (createFieldsFromSchema == -1 && OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)) == 0) )
4390 : {
4391 0 : if( !CreateFieldsFromArrowSchema(self, schema, options) )
4392 : {
4393 0 : schema->release(schema);
4394 0 : return 6;
4395 : }
4396 : }
4397 :
4398 0 : ArrowArray* array = (ArrowArray*)PyCapsule_GetPointer(arrayCapsule, "arrow_array");
4399 0 : if( !array )
4400 : {
4401 0 : CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(arrayCapsule, \"arrow_array\") failed");
4402 0 : schema->release(schema);
4403 0 : return 6;
4404 : }
4405 0 : if( array->release == NULL )
4406 : {
4407 0 : CPLError(CE_Failure, CPLE_AppDefined, "array->release == NULL");
4408 0 : schema->release(schema);
4409 0 : return 6;
4410 : }
4411 :
4412 0 : OGRErr eErr = 0;
4413 0 : if( !OGR_L_WriteArrowBatch(self, schema, array, options) )
4414 : {
4415 0 : eErr = 6;
4416 : }
4417 :
4418 0 : if( schema->release )
4419 0 : schema->release(schema);
4420 0 : if( array->release )
4421 0 : array->release(array);
4422 : return eErr;
4423 : }
4424 54 : SWIGINTERN void OGRLayerShadow_GetGeometryTypes(OGRLayerShadow *self,OGRGeometryTypeCounter **ppRet,int *pnEntryCount,int geom_field=0,int flags=0,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4425 108 : *ppRet = OGR_L_GetGeometryTypes(self, geom_field, flags, pnEntryCount, callback, callback_data);
4426 : }
4427 4 : SWIGINTERN void OGRLayerShadow_GetSupportedSRSList(OGRLayerShadow *self,OGRSpatialReferenceH **ppRet,int *pnEntryCount,int geom_field=0){
4428 8 : *ppRet = OGR_L_GetSupportedSRSList(self, geom_field, pnEntryCount);
4429 : }
4430 9 : SWIGINTERN OGRErr OGRLayerShadow_SetActiveSRS(OGRLayerShadow *self,int geom_field,OSRSpatialReferenceShadow *srs){
4431 9 : return OGR_L_SetActiveSRS(self, geom_field, srs);
4432 : }
4433 202935 : SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
4434 202935 : OGR_F_Destroy(self);
4435 202935 : }
4436 121287 : SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
4437 121287 : return (OGRFeatureShadow*) OGR_F_Create( feature_def );
4438 : }
4439 45160 : SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
4440 45160 : return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
4441 : }
4442 235985 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
4443 235985 : return OGR_F_SetGeometry(self, geom);
4444 : }
4445 33931 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
4446 33931 : return OGR_F_SetGeometryDirectly(self, geom);
4447 : }
4448 38537 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
4449 38537 : return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
4450 : }
4451 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
4452 : return OGR_F_SetGeomField(self, iField, geom);
4453 : }
4454 1 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
4455 1 : int iField = OGR_F_GetGeomFieldIndex(self, field_name);
4456 1 : if (iField == -1)
4457 : {
4458 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4459 0 : return 6;
4460 : }
4461 : else
4462 1 : return OGR_F_SetGeomField(self, iField, geom);
4463 : }
4464 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
4465 : return OGR_F_SetGeomFieldDirectly(self, iField, geom);
4466 : }
4467 16 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
4468 16 : int iField = OGR_F_GetGeomFieldIndex(self, field_name);
4469 16 : if (iField == -1)
4470 : {
4471 1 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4472 1 : return 6;
4473 : }
4474 : else
4475 15 : return OGR_F_SetGeomFieldDirectly(self, iField, geom);
4476 : }
4477 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_0(OGRFeatureShadow *self,int iField){
4478 : return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, iField);
4479 : }
4480 56 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4481 56 : int i = OGR_F_GetGeomFieldIndex(self, field_name);
4482 56 : if (i == -1)
4483 : {
4484 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4485 0 : return NULL;
4486 : }
4487 : else
4488 56 : return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, i);
4489 : }
4490 49 : SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
4491 49 : return (OGRFeatureShadow*) OGR_F_Clone(self);
4492 : }
4493 109 : SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
4494 218 : return (OGR_F_Equal(self, feature) > 0);
4495 : }
4496 110164 : SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
4497 110164 : return OGR_F_GetFieldCount(self);
4498 : }
4499 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
4500 : return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
4501 : }
4502 14 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4503 14 : int i = OGR_F_GetFieldIndex(self, field_name);
4504 14 : if (i == -1)
4505 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4506 : else
4507 14 : return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
4508 0 : return NULL;
4509 : }
4510 121 : SWIGINTERN int OGRFeatureShadow_GetGeomFieldCount(OGRFeatureShadow *self){
4511 121 : return OGR_F_GetGeomFieldCount(self);
4512 : }
4513 : SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
4514 : return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, id);
4515 : }
4516 0 : SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4517 0 : int i = OGR_F_GetGeomFieldIndex(self, field_name);
4518 0 : if (i == -1)
4519 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4520 : else
4521 0 : return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, i);
4522 0 : return NULL;
4523 : }
4524 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
4525 : return OGR_F_GetFieldAsString(self, id);
4526 : }
4527 836 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4528 836 : int i = OGR_F_GetFieldIndex(self, field_name);
4529 836 : if (i == -1)
4530 : {
4531 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4532 0 : return NULL;
4533 : }
4534 : else
4535 : {
4536 836 : return OGR_F_GetFieldAsString(self, i);
4537 : }
4538 : }
4539 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_0(OGRFeatureShadow *self,int id,char **options=0){
4540 : return OGR_F_GetFieldAsISO8601DateTime(self, id, options);
4541 : }
4542 6 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_1(OGRFeatureShadow *self,char const *field_name,char **options=0){
4543 6 : int i = OGR_F_GetFieldIndex(self, field_name);
4544 6 : if (i == -1)
4545 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4546 : else
4547 6 : return OGR_F_GetFieldAsISO8601DateTime(self, i, options);
4548 0 : return NULL;
4549 : }
4550 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
4551 : return OGR_F_GetFieldAsInteger(self, id);
4552 : }
4553 217 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4554 217 : int i = OGR_F_GetFieldIndex(self, field_name);
4555 217 : if (i == -1)
4556 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4557 : else
4558 217 : return OGR_F_GetFieldAsInteger(self, i);
4559 0 : return 0;
4560 : }
4561 : SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(OGRFeatureShadow *self,int id){
4562 : return OGR_F_GetFieldAsInteger64(self, id);
4563 : }
4564 0 : SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4565 0 : int i = OGR_F_GetFieldIndex(self, field_name);
4566 0 : if (i == -1)
4567 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4568 : else
4569 0 : return OGR_F_GetFieldAsInteger64(self, i);
4570 0 : return 0;
4571 : }
4572 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
4573 : return OGR_F_GetFieldAsDouble(self, id);
4574 : }
4575 :
4576 : #define SWIG_From_double PyFloat_FromDouble
4577 :
4578 52 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4579 52 : int i = OGR_F_GetFieldIndex(self, field_name);
4580 52 : if (i == -1)
4581 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4582 : else
4583 52 : return OGR_F_GetFieldAsDouble(self, i);
4584 0 : return 0;
4585 : }
4586 :
4587 : SWIGINTERNINLINE PyObject *
4588 : SWIG_From_float (float value)
4589 : {
4590 : return SWIG_From_double (value);
4591 : }
4592 :
4593 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,float *pfSecond,int *pnTZFlag){
4594 : OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
4595 : pnHour, pnMinute, pfSecond,
4596 : pnTZFlag);
4597 : }
4598 1 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,float *pfSecond,int *pnTZFlag){
4599 1 : int id = OGR_F_GetFieldIndex(self, field_name);
4600 1 : if (id == -1)
4601 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4602 : else
4603 1 : OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
4604 : pnHour, pnMinute, pfSecond,
4605 : pnTZFlag);
4606 1 : }
4607 : SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
4608 : *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
4609 : }
4610 0 : SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,int const **pList){
4611 0 : int id = OGR_F_GetFieldIndex(self, field_name);
4612 0 : if (id == -1)
4613 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4614 : else
4615 0 : *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
4616 0 : }
4617 332 : SWIGINTERN void OGRFeatureShadow_GetFieldAsInteger64List(OGRFeatureShadow *self,int id,int *nLen,GIntBig const **pList){
4618 664 : *pList = OGR_F_GetFieldAsInteger64List(self, id, nLen);
4619 : }
4620 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
4621 : *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
4622 : }
4623 0 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,double const **pList){
4624 0 : int id = OGR_F_GetFieldIndex(self, field_name);
4625 0 : if (id == -1)
4626 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4627 : else
4628 0 : *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
4629 0 : }
4630 343 : SWIGINTERN char **OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id){
4631 343 : return OGR_F_GetFieldAsStringList(self, id);
4632 : }
4633 39 : SWIGINTERN OGRErr OGRFeatureShadow_GetFieldAsBinary__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,char **pBuf){
4634 39 : GByte* pabyBlob = OGR_F_GetFieldAsBinary(self, id, nLen);
4635 39 : *pBuf = (char*)VSIMalloc(*nLen);
4636 39 : memcpy(*pBuf, pabyBlob, *nLen);
4637 39 : return 0;
4638 : }
4639 68 : SWIGINTERN OGRErr OGRFeatureShadow_GetFieldAsBinary__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,char **pBuf){
4640 68 : int id = OGR_F_GetFieldIndex(self, field_name);
4641 68 : if (id == -1)
4642 : {
4643 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4644 0 : return 6;
4645 : }
4646 : else
4647 : {
4648 68 : GByte* pabyBlob = OGR_F_GetFieldAsBinary(self, id, nLen);
4649 68 : *pBuf = (char*)VSIMalloc(*nLen);
4650 68 : memcpy(*pBuf, pabyBlob, *nLen);
4651 68 : return 0;
4652 : }
4653 : }
4654 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
4655 : return (OGR_F_IsFieldSet(self, id) > 0);
4656 : }
4657 212 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4658 212 : int i = OGR_F_GetFieldIndex(self, field_name);
4659 212 : if (i == -1)
4660 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4661 : else
4662 212 : return (OGR_F_IsFieldSet(self, i) > 0);
4663 0 : return false;
4664 : }
4665 : SWIGINTERN bool OGRFeatureShadow_IsFieldNull__SWIG_0(OGRFeatureShadow *self,int id){
4666 : return (OGR_F_IsFieldNull(self, id) > 0);
4667 : }
4668 56 : SWIGINTERN bool OGRFeatureShadow_IsFieldNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4669 56 : int i = OGR_F_GetFieldIndex(self, field_name);
4670 56 : if (i == -1)
4671 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4672 : else
4673 56 : return (OGR_F_IsFieldNull(self, i) > 0);
4674 0 : return false;
4675 : }
4676 : SWIGINTERN bool OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(OGRFeatureShadow *self,int id){
4677 : return (OGR_F_IsFieldSetAndNotNull(self, id) > 0);
4678 : }
4679 53 : SWIGINTERN bool OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4680 53 : int i = OGR_F_GetFieldIndex(self, field_name);
4681 53 : if (i == -1)
4682 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4683 : else
4684 53 : return (OGR_F_IsFieldSetAndNotNull(self, i) > 0);
4685 0 : return false;
4686 : }
4687 302 : SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *field_name){
4688 : // Do not issue an error if the field doesn't exist. It is intended to be silent
4689 302 : return OGR_F_GetFieldIndex(self, field_name);
4690 : }
4691 73 : SWIGINTERN int OGRFeatureShadow_GetGeomFieldIndex(OGRFeatureShadow *self,char const *field_name){
4692 : // Do not issue an error if the field doesn't exist. It is intended to be silent
4693 73 : return OGR_F_GetGeomFieldIndex(self, field_name);
4694 : }
4695 5239 : SWIGINTERN GIntBig OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
4696 5239 : return OGR_F_GetFID(self);
4697 : }
4698 160523 : SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,GIntBig fid){
4699 160523 : return OGR_F_SetFID(self, fid);
4700 : }
4701 0 : SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
4702 0 : OGR_F_DumpReadable(self, NULL);
4703 0 : }
4704 96 : SWIGINTERN retStringAndCPLFree *OGRFeatureShadow_DumpReadableAsString(OGRFeatureShadow *self,char **options=NULL){
4705 96 : return OGR_F_DumpReadableAsString(self, options);
4706 : }
4707 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
4708 : OGR_F_UnsetField(self, id);
4709 : }
4710 4 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4711 4 : int i = OGR_F_GetFieldIndex(self, field_name);
4712 4 : if (i == -1)
4713 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4714 : else
4715 4 : OGR_F_UnsetField(self, i);
4716 4 : }
4717 : SWIGINTERN void OGRFeatureShadow_SetFieldNull__SWIG_0(OGRFeatureShadow *self,int id){
4718 : OGR_F_SetFieldNull(self, id);
4719 : }
4720 19 : SWIGINTERN void OGRFeatureShadow_SetFieldNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4721 19 : int i = OGR_F_GetFieldIndex(self, field_name);
4722 19 : if (i == -1)
4723 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4724 : else
4725 19 : OGR_F_SetFieldNull(self, i);
4726 19 : }
4727 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
4728 : OGR_F_SetFieldString(self, id, value);
4729 : }
4730 0 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *field_name,char const *value){
4731 0 : int i = OGR_F_GetFieldIndex(self, field_name);
4732 0 : if (i == -1)
4733 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4734 : else
4735 0 : OGR_F_SetFieldString(self, i, value);
4736 0 : }
4737 84468 : SWIGINTERN void OGRFeatureShadow_SetFieldInteger64(OGRFeatureShadow *self,int id,GIntBig value){
4738 84468 : OGR_F_SetFieldInteger64(self, id, value);
4739 84468 : }
4740 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,double value){
4741 : OGR_F_SetFieldDouble(self, id, value);
4742 : }
4743 1283 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *field_name,double value){
4744 1283 : int i = OGR_F_GetFieldIndex(self, field_name);
4745 1283 : if (i == -1)
4746 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4747 : else
4748 1283 : OGR_F_SetFieldDouble(self, i, value);
4749 1283 : }
4750 :
4751 : /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
4752 : #ifndef SWIG_isfinite
4753 : /* isfinite() is a macro for C99 */
4754 : # if defined(isfinite)
4755 : # define SWIG_isfinite(X) (isfinite(X))
4756 : # elif defined(__cplusplus) && __cplusplus >= 201103L
4757 : /* Use a template so that this works whether isfinite() is std::isfinite() or
4758 : * in the global namespace. The reality seems to vary between compiler
4759 : * versions.
4760 : *
4761 : * Make sure namespace std exists to avoid compiler warnings.
4762 : *
4763 : * extern "C++" is required as this fragment can end up inside an extern "C" { } block
4764 : */
4765 : namespace std { }
4766 : extern "C++" template<typename T>
4767 0 : inline int SWIG_isfinite_func(T x) {
4768 : using namespace std;
4769 0 : return isfinite(x);
4770 : }
4771 : # define SWIG_isfinite(X) (SWIG_isfinite_func(X))
4772 : # elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
4773 : # define SWIG_isfinite(X) (__builtin_isfinite(X))
4774 : # elif defined(__clang__) && defined(__has_builtin)
4775 : # if __has_builtin(__builtin_isfinite)
4776 : # define SWIG_isfinite(X) (__builtin_isfinite(X))
4777 : # endif
4778 : # elif defined(_MSC_VER)
4779 : # define SWIG_isfinite(X) (_finite(X))
4780 : # elif defined(__sun) && defined(__SVR4)
4781 : # include <ieeefp.h>
4782 : # define SWIG_isfinite(X) (finite(X))
4783 : # endif
4784 : #endif
4785 :
4786 :
4787 : /* Accept infinite as a valid float value unless we are unable to check if a value is finite */
4788 : #ifdef SWIG_isfinite
4789 : # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
4790 : #else
4791 : # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
4792 : #endif
4793 :
4794 :
4795 : SWIGINTERN int
4796 88 : SWIG_AsVal_float (PyObject * obj, float *val)
4797 : {
4798 88 : double v;
4799 88 : int res = SWIG_AsVal_double (obj, &v);
4800 88 : if (SWIG_IsOK(res)) {
4801 88 : if (SWIG_Float_Overflow_Check(v)) {
4802 : return SWIG_OverflowError;
4803 : } else {
4804 88 : if (val) *val = static_cast< float >(v);
4805 : }
4806 : }
4807 : return res;
4808 : }
4809 :
4810 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,float second,int tzflag){
4811 : OGR_F_SetFieldDateTimeEx(self, id, year, month, day,
4812 : hour, minute, second,
4813 : tzflag);
4814 : }
4815 20 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *field_name,int year,int month,int day,int hour,int minute,float second,int tzflag){
4816 20 : int i = OGR_F_GetFieldIndex(self, field_name);
4817 20 : if (i == -1)
4818 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4819 : else
4820 20 : OGR_F_SetFieldDateTimeEx(self, i, year, month, day,
4821 : hour, minute, second,
4822 : tzflag);
4823 20 : }
4824 9 : SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
4825 9 : OGR_F_SetFieldIntegerList(self, id, nList, pList);
4826 9 : }
4827 :
4828 : static GIntBig*
4829 122 : CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
4830 : /* check if is List */
4831 122 : if ( !PySequence_Check(pySeq) ) {
4832 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4833 0 : *pnSize = -1;
4834 0 : return NULL;
4835 : }
4836 122 : Py_ssize_t size = PySequence_Size(pySeq);
4837 122 : if( size > (Py_ssize_t)INT_MAX ) {
4838 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4839 0 : *pnSize = -1;
4840 0 : return NULL;
4841 : }
4842 122 : if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
4843 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4844 0 : *pnSize = -1;
4845 0 : return NULL;
4846 : }
4847 122 : *pnSize = (int)size;
4848 122 : GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
4849 122 : if( !ret ) {
4850 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
4851 0 : *pnSize = -1;
4852 0 : return NULL;
4853 : }
4854 712 : for( int i = 0; i<*pnSize; i++ ) {
4855 590 : PyObject *o = PySequence_GetItem(pySeq,i);
4856 590 : if ( !PyArg_Parse(o,"L",&ret[i]) ) {
4857 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
4858 0 : Py_DECREF(o);
4859 0 : free(ret);
4860 0 : *pnSize = -1;
4861 0 : return NULL;
4862 : }
4863 590 : Py_DECREF(o);
4864 : }
4865 : return ret;
4866 : }
4867 :
4868 122 : SWIGINTERN void OGRFeatureShadow_SetFieldInteger64List(OGRFeatureShadow *self,int id,int nList,GIntBig *pList){
4869 122 : OGR_F_SetFieldInteger64List(self, id, nList, pList);
4870 122 : }
4871 :
4872 : static double*
4873 90 : CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
4874 : /* check if is List */
4875 90 : if ( !PySequence_Check(pySeq) ) {
4876 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4877 0 : *pnSize = -1;
4878 0 : return NULL;
4879 : }
4880 90 : Py_ssize_t size = PySequence_Size(pySeq);
4881 90 : if( size > (Py_ssize_t)INT_MAX ) {
4882 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4883 0 : *pnSize = -1;
4884 0 : return NULL;
4885 : }
4886 90 : if( (size_t)size > SIZE_MAX / sizeof(double) ) {
4887 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4888 0 : *pnSize = -1;
4889 0 : return NULL;
4890 : }
4891 90 : *pnSize = (int)size;
4892 90 : double* ret = (double*) malloc((*pnSize)*sizeof(double));
4893 90 : if( !ret ) {
4894 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
4895 0 : *pnSize = -1;
4896 0 : return NULL;
4897 : }
4898 291 : for( int i = 0; i<*pnSize; i++ ) {
4899 201 : PyObject *o = PySequence_GetItem(pySeq,i);
4900 201 : if ( !PyArg_Parse(o,"d",&ret[i]) ) {
4901 0 : PyErr_SetString(PyExc_TypeError, "not an number");
4902 0 : Py_DECREF(o);
4903 0 : free(ret);
4904 0 : *pnSize = -1;
4905 0 : return NULL;
4906 : }
4907 201 : Py_DECREF(o);
4908 : }
4909 : return ret;
4910 : }
4911 :
4912 90 : SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList(OGRFeatureShadow *self,int id,int nList,double *pList){
4913 90 : OGR_F_SetFieldDoubleList(self, id, nList, pList);
4914 90 : }
4915 42 : SWIGINTERN void OGRFeatureShadow_SetFieldStringList(OGRFeatureShadow *self,int id,char **pList){
4916 42 : OGR_F_SetFieldStringList(self, id, pList);
4917 42 : }
4918 :
4919 : static bool
4920 515 : GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
4921 515 : {
4922 515 : if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
4923 : {
4924 515 : if( view->len > INT_MAX ) {
4925 0 : PyBuffer_Release(view);
4926 0 : PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
4927 0 : return false;
4928 : }
4929 515 : *viewIsValid = true;
4930 515 : *nLen = (int) view->len;
4931 515 : *pBuf = (char*) view->buf;
4932 515 : return true;
4933 : }
4934 : else
4935 : {
4936 0 : PyErr_Clear();
4937 : }
4938 : }
4939 0 : if (PyUnicode_Check(input))
4940 : {
4941 0 : size_t safeLen = 0;
4942 0 : int ret;
4943 0 : try {
4944 0 : ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
4945 : }
4946 0 : catch( const std::exception& )
4947 : {
4948 0 : PyErr_SetString(PyExc_MemoryError, "out of memory");
4949 0 : return false;
4950 : }
4951 0 : if (!SWIG_IsOK(ret)) {
4952 0 : PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
4953 0 : return false;
4954 : }
4955 :
4956 0 : if (safeLen) safeLen--;
4957 0 : if( safeLen > INT_MAX ) {
4958 0 : PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
4959 0 : return false;
4960 : }
4961 0 : *nLen = (int) safeLen;
4962 0 : return true;
4963 : }
4964 : else
4965 : {
4966 0 : PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
4967 0 : return false;
4968 : }
4969 : }
4970 :
4971 515 : SWIGINTERN void OGRFeatureShadow__SetFieldBinary(OGRFeatureShadow *self,int id,int nLen,char *pBuf){
4972 515 : OGR_F_SetFieldBinary(self, id, nLen, pBuf);
4973 515 : }
4974 4 : SWIGINTERN void OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(OGRFeatureShadow *self,int id,char const *pszValue){
4975 4 : int nBytes;
4976 4 : GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
4977 4 : OGR_F_SetFieldBinary(self, id, nBytes, pabyBuf);
4978 4 : CPLFree(pabyBuf);
4979 4 : }
4980 2 : SWIGINTERN void OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(OGRFeatureShadow *self,char const *field_name,char const *pszValue){
4981 2 : int i = OGR_F_GetFieldIndex(self, field_name);
4982 2 : if (i == -1)
4983 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4984 : else
4985 : {
4986 2 : int nBytes;
4987 2 : GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
4988 2 : OGR_F_SetFieldBinary(self, i, nBytes, pabyBuf);
4989 2 : CPLFree(pabyBuf);
4990 : }
4991 2 : }
4992 1732 : SWIGINTERN OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
4993 1732 : return OGR_F_SetFrom(self, other, forgiving);
4994 : }
4995 0 : SWIGINTERN OGRErr OGRFeatureShadow_SetFromWithMap(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving,int nList,int *pList){
4996 0 : if (nList != OGR_F_GetFieldCount(other))
4997 : {
4998 0 : CPLError(CE_Failure, CPLE_AppDefined,
4999 : "The size of map doesn't match with the field count of the source feature");
5000 0 : return 6;
5001 : }
5002 0 : return OGR_F_SetFromWithMap(self, other, forgiving, pList);
5003 : }
5004 1582 : SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
5005 1582 : return (const char*) OGR_F_GetStyleString(self);
5006 : }
5007 113 : SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
5008 113 : OGR_F_SetStyleString(self, the_string);
5009 113 : }
5010 100838 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
5011 100838 : OGRFieldDefnH fd = OGR_F_GetFieldDefnRef( self, id );
5012 100838 : if (fd)
5013 100838 : return (OGRFieldType) OGR_Fld_GetType( fd );
5014 : else
5015 : return (OGRFieldType)0;
5016 : }
5017 0 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *field_name){
5018 0 : int i = OGR_F_GetFieldIndex(self, field_name);
5019 0 : if (i == -1) {
5020 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
5021 0 : return (OGRFieldType)0;
5022 : } else
5023 0 : return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, i ) );
5024 : }
5025 10 : SWIGINTERN int OGRFeatureShadow_Validate(OGRFeatureShadow *self,int flags=OGR_F_VAL_ALL,int bEmitError=TRUE){
5026 10 : return OGR_F_Validate(self, flags, bEmitError);
5027 : }
5028 2 : SWIGINTERN void OGRFeatureShadow_FillUnsetWithDefault(OGRFeatureShadow *self,int bNotNullableOnly=FALSE,char **options=NULL){
5029 2 : OGR_F_FillUnsetWithDefault(self, bNotNullableOnly, options );
5030 2 : }
5031 9 : SWIGINTERN char const *OGRFeatureShadow_GetNativeData(OGRFeatureShadow *self){
5032 9 : return OGR_F_GetNativeData(self);
5033 : }
5034 9 : SWIGINTERN char const *OGRFeatureShadow_GetNativeMediaType(OGRFeatureShadow *self){
5035 9 : return OGR_F_GetNativeMediaType(self);
5036 : }
5037 4 : SWIGINTERN void OGRFeatureShadow_SetNativeData(OGRFeatureShadow *self,char const *nativeData){
5038 4 : OGR_F_SetNativeData(self, nativeData);
5039 4 : }
5040 4 : SWIGINTERN void OGRFeatureShadow_SetNativeMediaType(OGRFeatureShadow *self,char const *nativeMediaType){
5041 4 : OGR_F_SetNativeMediaType(self, nativeMediaType);
5042 4 : }
5043 12028 : SWIGINTERN void OGRFeatureShadow_SetFieldString(OGRFeatureShadow *self,int id,char const *value){
5044 12028 : OGR_F_SetFieldString(self, id, value);
5045 : }
5046 :
5047 197 : static int ValidateOGRGeometryType(OGRwkbGeometryType field_type)
5048 : {
5049 197 : switch(field_type)
5050 : {
5051 : case wkbUnknown:
5052 : case wkbPoint:
5053 : case wkbLineString:
5054 : case wkbPolygon:
5055 : case wkbMultiPoint:
5056 : case wkbMultiLineString:
5057 : case wkbMultiPolygon:
5058 : case wkbGeometryCollection:
5059 : case wkbCircularString:
5060 : case wkbCompoundCurve:
5061 : case wkbCurvePolygon:
5062 : case wkbMultiCurve:
5063 : case wkbMultiSurface:
5064 : case wkbCurve:
5065 : case wkbSurface:
5066 : case wkbTriangle:
5067 : case wkbTIN:
5068 : case wkbPolyhedralSurface:
5069 : case wkbNone:
5070 : /*case wkbLinearRing:*/
5071 : case wkbCircularStringZ:
5072 : case wkbCompoundCurveZ:
5073 : case wkbCurvePolygonZ:
5074 : case wkbMultiCurveZ:
5075 : case wkbMultiSurfaceZ:
5076 : case wkbCurveZ:
5077 : case wkbSurfaceZ:
5078 : case wkbTriangleZ:
5079 : case wkbTINZ:
5080 : case wkbPolyhedralSurfaceZ:
5081 : case wkbPoint25D:
5082 : case wkbLineString25D:
5083 : case wkbPolygon25D:
5084 : case wkbMultiPoint25D:
5085 : case wkbMultiLineString25D:
5086 : case wkbMultiPolygon25D:
5087 : case wkbGeometryCollection25D:
5088 : case wkbPointM:
5089 : case wkbLineStringM:
5090 : case wkbPolygonM:
5091 : case wkbMultiPointM:
5092 : case wkbMultiLineStringM:
5093 : case wkbMultiPolygonM:
5094 : case wkbGeometryCollectionM:
5095 : case wkbCircularStringM:
5096 : case wkbCompoundCurveM:
5097 : case wkbCurvePolygonM:
5098 : case wkbMultiCurveM:
5099 : case wkbMultiSurfaceM:
5100 : case wkbCurveM:
5101 : case wkbSurfaceM:
5102 : case wkbTriangleM:
5103 : case wkbTINM:
5104 : case wkbPolyhedralSurfaceM:
5105 : case wkbPointZM:
5106 : case wkbLineStringZM:
5107 : case wkbPolygonZM:
5108 : case wkbMultiPointZM:
5109 : case wkbMultiLineStringZM:
5110 : case wkbMultiPolygonZM:
5111 : case wkbGeometryCollectionZM:
5112 : case wkbCircularStringZM:
5113 : case wkbCompoundCurveZM:
5114 : case wkbCurvePolygonZM:
5115 : case wkbMultiCurveZM:
5116 : case wkbMultiSurfaceZM:
5117 : case wkbCurveZM:
5118 : case wkbSurfaceZM:
5119 : case wkbTriangleZM:
5120 : case wkbTINZM:
5121 : case wkbPolyhedralSurfaceZM:
5122 : return TRUE;
5123 2 : default:
5124 2 : CPLError(CE_Failure, CPLE_IllegalArg, "Illegal geometry type value");
5125 2 : return FALSE;
5126 : }
5127 : }
5128 :
5129 127556 : SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
5130 : /*OGR_FD_Destroy(self);*/
5131 127556 : OGR_FD_Release( OGRFeatureDefnH(self) );
5132 127556 : }
5133 110 : SWIGINTERN OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name_null_ok=NULL){
5134 220 : OGRFeatureDefnH h = OGR_FD_Create(name_null_ok);
5135 110 : OGR_FD_Reference(h);
5136 110 : return (OGRFeatureDefnShadow* )h;
5137 : }
5138 103 : SWIGINTERN char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
5139 103 : return OGR_FD_GetName(self);
5140 : }
5141 46567 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
5142 46567 : return OGR_FD_GetFieldCount(self);
5143 : }
5144 203143 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
5145 203143 : return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
5146 : }
5147 1728 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *field_name){
5148 : // Do not issue an error if the field doesn't exist. It is intended to be silent
5149 1728 : return OGR_FD_GetFieldIndex(self, field_name);
5150 : }
5151 397 : SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
5152 397 : OGR_FD_AddFieldDefn(self, defn);
5153 397 : }
5154 408 : SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldCount(OGRFeatureDefnShadow *self){
5155 408 : return OGR_FD_GetGeomFieldCount(self);
5156 : }
5157 589 : SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureDefnShadow_GetGeomFieldDefn(OGRFeatureDefnShadow *self,int i){
5158 589 : return (OGRGeomFieldDefnShadow*) OGR_FD_GetGeomFieldDefn(self, i);
5159 : }
5160 37 : SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldIndex(OGRFeatureDefnShadow *self,char const *field_name){
5161 : // Do not issue an error if the field doesn't exist. It is intended to be silent
5162 37 : return OGR_FD_GetGeomFieldIndex(self, field_name);
5163 : }
5164 11 : SWIGINTERN void OGRFeatureDefnShadow_AddGeomFieldDefn(OGRFeatureDefnShadow *self,OGRGeomFieldDefnShadow *defn){
5165 11 : OGR_FD_AddGeomFieldDefn(self, defn);
5166 11 : }
5167 4 : SWIGINTERN OGRErr OGRFeatureDefnShadow_DeleteGeomFieldDefn(OGRFeatureDefnShadow *self,int idx){
5168 4 : return OGR_FD_DeleteGeomFieldDefn(self, idx);
5169 : }
5170 82 : SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
5171 82 : return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
5172 : }
5173 12 : SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
5174 12 : if( ValidateOGRGeometryType(geom_type) )
5175 11 : OGR_FD_SetGeomType(self, geom_type);
5176 12 : }
5177 3 : SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
5178 3 : return OGR_FD_GetReferenceCount(self);
5179 : }
5180 6 : SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
5181 6 : return OGR_FD_IsGeometryIgnored(self);
5182 : }
5183 3 : SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
5184 3 : return OGR_FD_SetGeometryIgnored(self,bIgnored);
5185 : }
5186 2 : SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
5187 2 : return OGR_FD_IsStyleIgnored(self);
5188 : }
5189 0 : SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
5190 0 : return OGR_FD_SetStyleIgnored(self,bIgnored);
5191 : }
5192 11 : SWIGINTERN int OGRFeatureDefnShadow_IsSame(OGRFeatureDefnShadow *self,OGRFeatureDefnShadow *other_defn){
5193 11 : return OGR_FD_IsSame(self, other_defn);
5194 : }
5195 :
5196 77681 : static int ValidateOGRFieldType(OGRFieldType field_type)
5197 : {
5198 77681 : switch(field_type)
5199 : {
5200 : case OFTInteger:
5201 : case OFTIntegerList:
5202 : case OFTReal:
5203 : case OFTRealList:
5204 : case OFTString:
5205 : case OFTStringList:
5206 : case OFTBinary:
5207 : case OFTDate:
5208 : case OFTTime:
5209 : case OFTDateTime:
5210 : case OFTInteger64:
5211 : case OFTInteger64List:
5212 : return TRUE;
5213 0 : default:
5214 0 : CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
5215 0 : return FALSE;
5216 : }
5217 : }
5218 :
5219 :
5220 420 : static int ValidateOGRFieldSubType(OGRFieldSubType field_subtype)
5221 : {
5222 420 : switch(field_subtype)
5223 : {
5224 : case OFSTNone:
5225 : case OFSTBoolean:
5226 : case OFSTInt16:
5227 : case OFSTFloat32:
5228 : case OFSTJSON:
5229 : case OFSTUUID:
5230 : return TRUE;
5231 0 : default:
5232 0 : CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field subtype value");
5233 0 : return FALSE;
5234 : }
5235 : }
5236 :
5237 77668 : SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
5238 77668 : OGR_Fld_Destroy(self);
5239 77668 : }
5240 77681 : SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
5241 77681 : if (ValidateOGRFieldType(field_type))
5242 77681 : return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
5243 : else
5244 0 : return NULL;
5245 : }
5246 193560 : SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
5247 193560 : return OGR_Fld_GetNameRef(self);
5248 : }
5249 1537 : SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
5250 1537 : return OGR_Fld_GetNameRef(self);
5251 : }
5252 2 : SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
5253 2 : OGR_Fld_SetName(self, name);
5254 2 : }
5255 47 : SWIGINTERN char const *OGRFieldDefnShadow_GetAlternativeName(OGRFieldDefnShadow *self){
5256 47 : return OGR_Fld_GetAlternativeNameRef(self);
5257 : }
5258 9 : SWIGINTERN char const *OGRFieldDefnShadow_GetAlternativeNameRef(OGRFieldDefnShadow *self){
5259 9 : return OGR_Fld_GetAlternativeNameRef(self);
5260 : }
5261 17 : SWIGINTERN void OGRFieldDefnShadow_SetAlternativeName(OGRFieldDefnShadow *self,char const *alternativeName){
5262 17 : OGR_Fld_SetAlternativeName(self, alternativeName);
5263 17 : }
5264 4226 : SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
5265 4226 : return OGR_Fld_GetType(self);
5266 : }
5267 0 : SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
5268 0 : if (ValidateOGRFieldType(type))
5269 0 : OGR_Fld_SetType(self, type);
5270 0 : }
5271 88540 : SWIGINTERN OGRFieldSubType OGRFieldDefnShadow_GetSubType(OGRFieldDefnShadow *self){
5272 88540 : return OGR_Fld_GetSubType(self);
5273 : }
5274 420 : SWIGINTERN void OGRFieldDefnShadow_SetSubType(OGRFieldDefnShadow *self,OGRFieldSubType type){
5275 420 : if (ValidateOGRFieldSubType(type))
5276 420 : OGR_Fld_SetSubType(self, type);
5277 420 : }
5278 0 : SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
5279 0 : return OGR_Fld_GetJustify(self);
5280 : }
5281 0 : SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
5282 0 : OGR_Fld_SetJustify(self, justify);
5283 0 : }
5284 2732 : SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
5285 2732 : return OGR_Fld_GetWidth(self);
5286 : }
5287 323 : SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
5288 323 : OGR_Fld_SetWidth(self, width);
5289 323 : }
5290 1608 : SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
5291 1608 : return OGR_Fld_GetPrecision(self);
5292 : }
5293 24 : SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
5294 24 : OGR_Fld_SetPrecision(self, precision);
5295 24 : }
5296 0 : SWIGINTERN int OGRFieldDefnShadow_GetTZFlag(OGRFieldDefnShadow *self){
5297 0 : return OGR_Fld_GetTZFlag(self);
5298 : }
5299 6 : SWIGINTERN void OGRFieldDefnShadow_SetTZFlag(OGRFieldDefnShadow *self,int tzflag){
5300 6 : OGR_Fld_SetTZFlag(self, tzflag);
5301 6 : }
5302 13 : SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
5303 13 : return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
5304 : }
5305 36 : SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
5306 36 : return OGR_GetFieldTypeName(type);
5307 : }
5308 6 : SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
5309 6 : return OGR_Fld_IsIgnored( self );
5310 : }
5311 0 : SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
5312 0 : OGR_Fld_SetIgnored( self, bIgnored );
5313 0 : }
5314 80 : SWIGINTERN int OGRFieldDefnShadow_IsNullable(OGRFieldDefnShadow *self){
5315 80 : return OGR_Fld_IsNullable( self );
5316 : }
5317 190 : SWIGINTERN void OGRFieldDefnShadow_SetNullable(OGRFieldDefnShadow *self,int bNullable){
5318 190 : OGR_Fld_SetNullable( self, bNullable );
5319 190 : }
5320 80 : SWIGINTERN int OGRFieldDefnShadow_IsUnique(OGRFieldDefnShadow *self){
5321 80 : return OGR_Fld_IsUnique( self );
5322 : }
5323 28 : SWIGINTERN void OGRFieldDefnShadow_SetUnique(OGRFieldDefnShadow *self,int bUnique){
5324 28 : OGR_Fld_SetUnique( self, bUnique );
5325 28 : }
5326 4 : SWIGINTERN int OGRFieldDefnShadow_IsGenerated(OGRFieldDefnShadow *self){
5327 4 : return OGR_Fld_IsGenerated( self );
5328 : }
5329 0 : SWIGINTERN void OGRFieldDefnShadow_SetGenerated(OGRFieldDefnShadow *self,int bGenerated){
5330 0 : OGR_Fld_SetGenerated( self, bGenerated );
5331 0 : }
5332 137 : SWIGINTERN char const *OGRFieldDefnShadow_GetDefault(OGRFieldDefnShadow *self){
5333 137 : return OGR_Fld_GetDefault( self );
5334 : }
5335 149 : SWIGINTERN void OGRFieldDefnShadow_SetDefault(OGRFieldDefnShadow *self,char const *pszValue){
5336 149 : OGR_Fld_SetDefault( self, pszValue );
5337 149 : }
5338 3 : SWIGINTERN int OGRFieldDefnShadow_IsDefaultDriverSpecific(OGRFieldDefnShadow *self){
5339 3 : return OGR_Fld_IsDefaultDriverSpecific( self );
5340 : }
5341 32 : SWIGINTERN char const *OGRFieldDefnShadow_GetDomainName(OGRFieldDefnShadow *self){
5342 32 : return OGR_Fld_GetDomainName(self);
5343 : }
5344 22 : SWIGINTERN void OGRFieldDefnShadow_SetDomainName(OGRFieldDefnShadow *self,char const *name){
5345 22 : OGR_Fld_SetDomainName( self, name );
5346 22 : }
5347 58 : SWIGINTERN char const *OGRFieldDefnShadow_GetComment(OGRFieldDefnShadow *self){
5348 58 : return OGR_Fld_GetComment(self);
5349 : }
5350 32 : SWIGINTERN void OGRFieldDefnShadow_SetComment(OGRFieldDefnShadow *self,char const *comment){
5351 32 : OGR_Fld_SetComment( self, comment );
5352 32 : }
5353 183 : SWIGINTERN void delete_OGRGeomFieldDefnShadow(OGRGeomFieldDefnShadow *self){
5354 183 : OGR_GFld_Destroy(self);
5355 183 : }
5356 183 : SWIGINTERN OGRGeomFieldDefnShadow *new_OGRGeomFieldDefnShadow(char const *name_null_ok="",OGRwkbGeometryType field_type=wkbUnknown){
5357 183 : if( ValidateOGRGeometryType(field_type) )
5358 183 : return (OGRGeomFieldDefnShadow*) OGR_GFld_Create(name_null_ok, field_type);
5359 : else
5360 : return NULL;
5361 : }
5362 229 : SWIGINTERN char const *OGRGeomFieldDefnShadow_GetName(OGRGeomFieldDefnShadow *self){
5363 229 : return OGR_GFld_GetNameRef(self);
5364 : }
5365 82 : SWIGINTERN char const *OGRGeomFieldDefnShadow_GetNameRef(OGRGeomFieldDefnShadow *self){
5366 82 : return OGR_GFld_GetNameRef(self);
5367 : }
5368 4 : SWIGINTERN void OGRGeomFieldDefnShadow_SetName(OGRGeomFieldDefnShadow *self,char const *name){
5369 4 : OGR_GFld_SetName(self, name);
5370 4 : }
5371 97 : SWIGINTERN OGRwkbGeometryType OGRGeomFieldDefnShadow_GetType(OGRGeomFieldDefnShadow *self){
5372 97 : return OGR_GFld_GetType(self);
5373 : }
5374 2 : SWIGINTERN void OGRGeomFieldDefnShadow_SetType(OGRGeomFieldDefnShadow *self,OGRwkbGeometryType type){
5375 2 : if( ValidateOGRGeometryType(type) )
5376 1 : OGR_GFld_SetType(self, type);
5377 2 : }
5378 81 : SWIGINTERN OSRSpatialReferenceShadow *OGRGeomFieldDefnShadow_GetSpatialRef(OGRGeomFieldDefnShadow *self){
5379 162 : OGRSpatialReferenceH ref = OGR_GFld_GetSpatialRef(self);
5380 81 : if( ref )
5381 70 : OSRReference(ref);
5382 81 : return (OSRSpatialReferenceShadow*) ref;
5383 : }
5384 48 : SWIGINTERN void OGRGeomFieldDefnShadow_SetSpatialRef(OGRGeomFieldDefnShadow *self,OSRSpatialReferenceShadow *srs){
5385 48 : OGR_GFld_SetSpatialRef( self, (OGRSpatialReferenceH)srs );
5386 48 : }
5387 6 : SWIGINTERN int OGRGeomFieldDefnShadow_IsIgnored(OGRGeomFieldDefnShadow *self){
5388 6 : return OGR_GFld_IsIgnored( self );
5389 : }
5390 1 : SWIGINTERN void OGRGeomFieldDefnShadow_SetIgnored(OGRGeomFieldDefnShadow *self,int bIgnored){
5391 1 : OGR_GFld_SetIgnored( self, bIgnored );
5392 1 : }
5393 85 : SWIGINTERN int OGRGeomFieldDefnShadow_IsNullable(OGRGeomFieldDefnShadow *self){
5394 85 : return OGR_GFld_IsNullable( self );
5395 : }
5396 23 : SWIGINTERN void OGRGeomFieldDefnShadow_SetNullable(OGRGeomFieldDefnShadow *self,int bNullable){
5397 23 : return OGR_GFld_SetNullable( self, bNullable );
5398 : }
5399 42 : SWIGINTERN OGRGeomCoordinatePrecisionShadow *OGRGeomFieldDefnShadow_GetCoordinatePrecision(OGRGeomFieldDefnShadow *self){
5400 42 : return OGR_GFld_GetCoordinatePrecision(self);
5401 : }
5402 18 : SWIGINTERN void OGRGeomFieldDefnShadow_SetCoordinatePrecision(OGRGeomFieldDefnShadow *self,OGRGeomCoordinatePrecisionShadow *coordPrec){
5403 18 : OGR_GFld_SetCoordinatePrecision(self, coordPrec);
5404 18 : }
5405 :
5406 31028 : OGRGeometryShadow* CreateGeometryFromWkb( size_t len, char *bin_string,
5407 : OSRSpatialReferenceShadow *reference=NULL ) {
5408 31028 : OGRGeometryH geom = NULL;
5409 31028 : OGRErr err = OGR_G_CreateFromWkbEx( (unsigned char *) bin_string,
5410 : reference,
5411 : &geom,
5412 : len );
5413 31028 : if (err != 0 ) {
5414 5472 : CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
5415 5472 : return NULL;
5416 : }
5417 25556 : return (OGRGeometryShadow*) geom;
5418 : }
5419 :
5420 :
5421 :
5422 : static bool
5423 31028 : GetBufferAsCharPtrSizetSize( PyObject* input, size_t *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
5424 31028 : {
5425 31028 : if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
5426 : {
5427 31021 : *viewIsValid = true;
5428 31021 : *nLen = view->len;
5429 31021 : *pBuf = (char*) view->buf;
5430 31021 : return true;
5431 : }
5432 : else
5433 : {
5434 7 : PyErr_Clear();
5435 : }
5436 : }
5437 7 : if (PyUnicode_Check(input))
5438 : {
5439 7 : size_t safeLen = 0;
5440 7 : int ret;
5441 7 : try {
5442 7 : ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
5443 : }
5444 0 : catch( const std::exception& )
5445 : {
5446 0 : PyErr_SetString(PyExc_MemoryError, "out of memory");
5447 0 : return false;
5448 : }
5449 7 : if (!SWIG_IsOK(ret)) {
5450 0 : PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
5451 0 : return false;
5452 : }
5453 :
5454 7 : if (safeLen) safeLen--;
5455 7 : *nLen = safeLen;
5456 7 : return true;
5457 : }
5458 : else
5459 : {
5460 0 : PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
5461 0 : return false;
5462 : }
5463 : }
5464 :
5465 :
5466 : SWIGINTERN int
5467 : SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
5468 : {
5469 : #if PY_VERSION_HEX < 0x03000000
5470 : if (PyInt_Check(obj)) {
5471 : long v = PyInt_AsLong(obj);
5472 : if (v >= 0) {
5473 : if (val) *val = v;
5474 : return SWIG_OK;
5475 : } else {
5476 : return SWIG_OverflowError;
5477 : }
5478 : } else
5479 : #endif
5480 : if (PyLong_Check(obj)) {
5481 : unsigned long v = PyLong_AsUnsignedLong(obj);
5482 : if (!PyErr_Occurred()) {
5483 : if (val) *val = v;
5484 : return SWIG_OK;
5485 : } else {
5486 : PyErr_Clear();
5487 : return SWIG_OverflowError;
5488 : }
5489 : }
5490 : #ifdef SWIG_PYTHON_CAST_MODE
5491 : {
5492 : int dispatch = 0;
5493 : unsigned long v = PyLong_AsUnsignedLong(obj);
5494 : if (!PyErr_Occurred()) {
5495 : if (val) *val = v;
5496 : return SWIG_AddCast(SWIG_OK);
5497 : } else {
5498 : PyErr_Clear();
5499 : }
5500 : if (!dispatch) {
5501 : double d;
5502 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
5503 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
5504 : if (val) *val = (unsigned long)(d);
5505 : return res;
5506 : }
5507 : }
5508 : }
5509 : #endif
5510 : return SWIG_TypeError;
5511 : }
5512 :
5513 :
5514 : #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
5515 : # define SWIG_LONG_LONG_AVAILABLE
5516 : #endif
5517 :
5518 :
5519 : #ifdef SWIG_LONG_LONG_AVAILABLE
5520 : SWIGINTERN int
5521 : SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
5522 : {
5523 : int res = SWIG_TypeError;
5524 : if (PyLong_Check(obj)) {
5525 : unsigned long long v = PyLong_AsUnsignedLongLong(obj);
5526 : if (!PyErr_Occurred()) {
5527 : if (val) *val = v;
5528 : return SWIG_OK;
5529 : } else {
5530 : PyErr_Clear();
5531 : res = SWIG_OverflowError;
5532 : }
5533 : } else {
5534 : unsigned long v;
5535 : res = SWIG_AsVal_unsigned_SS_long (obj,&v);
5536 : if (SWIG_IsOK(res)) {
5537 : if (val) *val = v;
5538 : return res;
5539 : }
5540 : }
5541 : #ifdef SWIG_PYTHON_CAST_MODE
5542 : {
5543 : const double mant_max = 1LL << DBL_MANT_DIG;
5544 : double d;
5545 : res = SWIG_AsVal_double (obj,&d);
5546 : if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
5547 : return SWIG_OverflowError;
5548 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
5549 : if (val) *val = (unsigned long long)(d);
5550 : return SWIG_AddCast(res);
5551 : }
5552 : res = SWIG_TypeError;
5553 : }
5554 : #endif
5555 : return res;
5556 : }
5557 : #endif
5558 :
5559 :
5560 : SWIGINTERNINLINE int
5561 : SWIG_AsVal_size_t (PyObject * obj, size_t *val)
5562 : {
5563 : int res = SWIG_TypeError;
5564 : #ifdef SWIG_LONG_LONG_AVAILABLE
5565 : if (sizeof(size_t) <= sizeof(unsigned long)) {
5566 : #endif
5567 : unsigned long v;
5568 : res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
5569 : if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
5570 : #ifdef SWIG_LONG_LONG_AVAILABLE
5571 : } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
5572 : unsigned long long v;
5573 : res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
5574 : if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
5575 : }
5576 : #endif
5577 : return res;
5578 : }
5579 :
5580 :
5581 115995 : OGRGeometryShadow* CreateGeometryFromWkt( char **val,
5582 : OSRSpatialReferenceShadow *reference=NULL ) {
5583 115995 : OGRGeometryH geom = NULL;
5584 115995 : OGRErr err = OGR_G_CreateFromWkt(val,
5585 : reference,
5586 : &geom);
5587 115995 : if (err != 0 ) {
5588 237 : CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
5589 237 : return NULL;
5590 : }
5591 115758 : return (OGRGeometryShadow*) geom;
5592 : }
5593 :
5594 :
5595 :
5596 286 : OGRGeometryShadow *CreateGeometryFromGML( const char * input_string ) {
5597 286 : OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateFromGML(input_string);
5598 286 : return geom;
5599 : }
5600 :
5601 :
5602 :
5603 42 : OGRGeometryShadow *CreateGeometryFromJson( const char * input_string ) {
5604 42 : OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromJson(input_string);
5605 42 : return geom;
5606 : }
5607 :
5608 :
5609 :
5610 2 : OGRGeometryShadow *CreateGeometryFromEsriJson( const char * input_string ) {
5611 2 : OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromEsriJson(input_string);
5612 2 : return geom;
5613 : }
5614 :
5615 :
5616 :
5617 1 : OGRGeometryShadow *CreateGeometryFromEnvelope(double xmin,
5618 : double ymin,
5619 : double xmax,
5620 : double ymax,
5621 : OSRSpatialReferenceShadow *reference = nullptr) {
5622 1 : OGRGeometryShadow* geom = (OGRGeometryShadow*) OGR_G_CreateFromEnvelope(xmin, ymin, xmax, ymax, reference);
5623 1 : return geom;
5624 : }
5625 :
5626 :
5627 5 : OGRGeometryShadow* BuildPolygonFromEdges( OGRGeometryShadow* hLineCollection,
5628 : int bBestEffort = 0,
5629 : int bAutoClose = 0,
5630 : double dfTolerance=0) {
5631 :
5632 5 : OGRGeometryH hPolygon = NULL;
5633 :
5634 5 : OGRErr eErr;
5635 :
5636 5 : hPolygon = OGRBuildPolygonFromEdges( hLineCollection, bBestEffort,
5637 : bAutoClose, dfTolerance, &eErr );
5638 :
5639 5 : if (eErr != OGRERR_NONE ) {
5640 2 : CPLError(CE_Failure, eErr, "%s", OGRErrMessages(eErr));
5641 2 : return NULL;
5642 : }
5643 :
5644 : return (OGRGeometryShadow* )hPolygon;
5645 : }
5646 :
5647 :
5648 1 : OGRGeometryShadow* ApproximateArcAngles(
5649 : double dfCenterX, double dfCenterY, double dfZ,
5650 : double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation,
5651 : double dfStartAngle, double dfEndAngle,
5652 : double dfMaxAngleStepSizeDegrees ) {
5653 :
5654 1 : return (OGRGeometryShadow* )OGR_G_ApproximateArcAngles(
5655 : dfCenterX, dfCenterY, dfZ,
5656 : dfPrimaryRadius, dfSecondaryAxis, dfRotation,
5657 1 : dfStartAngle, dfEndAngle, dfMaxAngleStepSizeDegrees );
5658 : }
5659 :
5660 :
5661 46 : OGRGeometryShadow* ForceToPolygon( OGRGeometryShadow *geom_in ) {
5662 46 : if (geom_in == NULL)
5663 : return NULL;
5664 45 : return (OGRGeometryShadow* )OGR_G_ForceToPolygon( OGR_G_Clone(geom_in) );
5665 : }
5666 :
5667 :
5668 60 : OGRGeometryShadow* ForceToLineString( OGRGeometryShadow *geom_in ) {
5669 60 : if (geom_in == NULL)
5670 : return NULL;
5671 59 : return (OGRGeometryShadow* )OGR_G_ForceToLineString( OGR_G_Clone(geom_in) );
5672 : }
5673 :
5674 :
5675 47 : OGRGeometryShadow* ForceToMultiPolygon( OGRGeometryShadow *geom_in ) {
5676 47 : if (geom_in == NULL)
5677 : return NULL;
5678 46 : return (OGRGeometryShadow* )OGR_G_ForceToMultiPolygon( OGR_G_Clone(geom_in) );
5679 : }
5680 :
5681 :
5682 42 : OGRGeometryShadow* ForceToMultiPoint( OGRGeometryShadow *geom_in ) {
5683 42 : if (geom_in == NULL)
5684 : return NULL;
5685 41 : return (OGRGeometryShadow* )OGR_G_ForceToMultiPoint( OGR_G_Clone(geom_in) );
5686 : }
5687 :
5688 :
5689 50 : OGRGeometryShadow* ForceToMultiLineString( OGRGeometryShadow *geom_in ) {
5690 50 : if (geom_in == NULL)
5691 : return NULL;
5692 49 : return (OGRGeometryShadow* )OGR_G_ForceToMultiLineString( OGR_G_Clone(geom_in) );
5693 : }
5694 :
5695 :
5696 831 : OGRGeometryShadow* ForceTo( OGRGeometryShadow *geom_in, OGRwkbGeometryType eTargetType, char** options = NULL ) {
5697 831 : if (geom_in == NULL)
5698 : return NULL;
5699 819 : return (OGRGeometryShadow* )OGR_G_ForceTo( OGR_G_Clone(geom_in), eTargetType, options );
5700 : }
5701 :
5702 288179 : SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){
5703 288179 : OGR_G_DestroyGeometry( self );
5704 288179 : }
5705 160979 : SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow(OGRwkbGeometryType type=wkbUnknown,char *wkt=0,int wkb=0,char *wkb_buf=0,char *gml=0){
5706 160979 : if (type != wkbUnknown ) {
5707 160815 : return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
5708 : }
5709 164 : else if ( wkt != 0 ) {
5710 163 : return CreateGeometryFromWkt( &wkt );
5711 : }
5712 1 : else if ( wkb != 0 ) {
5713 0 : return CreateGeometryFromWkb( wkb, wkb_buf );
5714 : }
5715 1 : else if ( gml != 0 ) {
5716 0 : return CreateGeometryFromGML( gml );
5717 : }
5718 : // throw?
5719 : else {
5720 1 : CPLError(CE_Failure, 1, "Empty geometries cannot be constructed");
5721 1 : return NULL;}
5722 :
5723 : }
5724 2467 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
5725 2467 : return OGR_G_ExportToWkt(self, argout);
5726 : }
5727 5414 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkt(OGRGeometryShadow *self,char **argout){
5728 5414 : return OGR_G_ExportToIsoWkt(self, argout);
5729 : }
5730 103 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,size_t *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbNDR){
5731 103 : *nLen = OGR_G_WkbSizeEx( self );
5732 103 : *pBuf = (char *) VSI_MALLOC_VERBOSE( *nLen );
5733 103 : if( *pBuf == NULL )
5734 : return 6;
5735 103 : return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
5736 : }
5737 10570 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkb(OGRGeometryShadow *self,size_t *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbNDR){
5738 10570 : *nLen = OGR_G_WkbSizeEx( self );
5739 10570 : *pBuf = (char *) VSI_MALLOC_VERBOSE( *nLen );
5740 10570 : if( *pBuf == NULL )
5741 : return 6;
5742 10570 : return OGR_G_ExportToIsoWkb(self, byte_order, (unsigned char*) *pBuf );
5743 : }
5744 66 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self,char **options=0){
5745 66 : return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
5746 : }
5747 0 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
5748 0 : return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
5749 : }
5750 88 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self,char **options=0){
5751 88 : return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
5752 : }
5753 278 : SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
5754 278 : OGR_G_AddPoint( self, x, y, z );
5755 278 : }
5756 0 : SWIGINTERN void OGRGeometryShadow_AddPointM(OGRGeometryShadow *self,double x,double y,double m){
5757 0 : OGR_G_AddPointM( self, x, y, m );
5758 0 : }
5759 0 : SWIGINTERN void OGRGeometryShadow_AddPointZM(OGRGeometryShadow *self,double x,double y,double z,double m){
5760 0 : OGR_G_AddPointZM( self, x, y, z, m );
5761 0 : }
5762 1249 : SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
5763 1249 : OGR_G_AddPoint_2D( self, x, y );
5764 1249 : }
5765 9 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
5766 9 : return OGR_G_AddGeometryDirectly( self, other_disown );
5767 : }
5768 104 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
5769 104 : return OGR_G_AddGeometry( self, other );
5770 : }
5771 87 : SWIGINTERN OGRErr OGRGeometryShadow_RemoveGeometry(OGRGeometryShadow *self,int iSubGeom){
5772 87 : return OGR_G_RemoveGeometry( self, iSubGeom, TRUE );
5773 : }
5774 12445 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
5775 12445 : return (OGRGeometryShadow*) OGR_G_Clone(self);
5776 : }
5777 3945 : SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
5778 3945 : return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
5779 : }
5780 16601 : SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
5781 16601 : return (const char *) OGR_G_GetGeometryName(self);
5782 : }
5783 28 : SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
5784 28 : return OGR_G_Length(self);
5785 : }
5786 21 : SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
5787 21 : return OGR_G_Area(self);
5788 : }
5789 25 : SWIGINTERN double OGRGeometryShadow_GeodesicLength(OGRGeometryShadow *self){
5790 25 : return OGR_G_GeodesicLength(self);
5791 : }
5792 24 : SWIGINTERN double OGRGeometryShadow_GeodesicArea(OGRGeometryShadow *self){
5793 24 : return OGR_G_GeodesicArea(self);
5794 : }
5795 33 : SWIGINTERN bool OGRGeometryShadow_IsClockwise(OGRGeometryShadow *self){
5796 33 : return OGR_G_IsClockwise(self);
5797 : }
5798 1413 : SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
5799 1413 : return OGR_G_Area(self);
5800 : }
5801 13175 : SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
5802 13175 : return OGR_G_GetPointCount(self);
5803 : }
5804 11 : SWIGINTERN void OGRGeometryShadow_GetPoints(OGRGeometryShadow *self,int *pnCount,double **ppadfXY,double **ppadfZ,int nCoordDimension=0){
5805 11 : int nPoints = OGR_G_GetPointCount(self);
5806 11 : *pnCount = nPoints;
5807 11 : if (nPoints == 0)
5808 : {
5809 1 : *ppadfXY = NULL;
5810 1 : *ppadfZ = NULL;
5811 : }
5812 11 : *ppadfXY = (double*)VSIMalloc(2 * sizeof(double) * nPoints);
5813 11 : if (*ppadfXY == NULL)
5814 : {
5815 0 : CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate resulting array");
5816 0 : *pnCount = 0;
5817 0 : return;
5818 : }
5819 11 : if (nCoordDimension <= 0)
5820 7 : nCoordDimension = OGR_G_GetCoordinateDimension(self);
5821 11 : *ppadfZ = (nCoordDimension == 3) ? (double*)VSIMalloc(sizeof(double) * nPoints) : NULL;
5822 11 : OGR_G_GetPoints(self,
5823 : *ppadfXY, 2 * sizeof(double),
5824 11 : (*ppadfXY) + 1, 2 * sizeof(double),
5825 : *ppadfZ, sizeof(double));
5826 : }
5827 32244 : SWIGINTERN double OGRGeometryShadow_GetX(OGRGeometryShadow *self,int point=0){
5828 32244 : return OGR_G_GetX(self, point);
5829 : }
5830 31035 : SWIGINTERN double OGRGeometryShadow_GetY(OGRGeometryShadow *self,int point=0){
5831 31035 : return OGR_G_GetY(self, point);
5832 : }
5833 15350 : SWIGINTERN double OGRGeometryShadow_GetZ(OGRGeometryShadow *self,int point=0){
5834 15350 : return OGR_G_GetZ(self, point);
5835 : }
5836 2276 : SWIGINTERN double OGRGeometryShadow_GetM(OGRGeometryShadow *self,int point=0){
5837 2276 : return OGR_G_GetM(self, point);
5838 : }
5839 217 : SWIGINTERN void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint=0,double argout[3]=NULL){
5840 :
5841 217 : OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
5842 217 : }
5843 1 : SWIGINTERN void OGRGeometryShadow_GetPointZM(OGRGeometryShadow *self,int iPoint=0,double argout[4]=NULL){
5844 :
5845 1 : OGR_G_GetPointZM( self, iPoint, argout+0, argout+1, argout+2, argout+3 );
5846 1 : }
5847 3 : SWIGINTERN void OGRGeometryShadow_GetPoint_2D(OGRGeometryShadow *self,int iPoint=0,double argout[2]=NULL){
5848 :
5849 3 : OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
5850 3 : }
5851 12582 : SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
5852 12582 : return OGR_G_GetGeometryCount(self);
5853 : }
5854 168 : SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
5855 168 : OGR_G_SetPoint(self, point, x, y, z);
5856 168 : }
5857 0 : SWIGINTERN void OGRGeometryShadow_SetPointM(OGRGeometryShadow *self,int point,double x,double y,double m){
5858 0 : OGR_G_SetPointM(self, point, x, y, m);
5859 0 : }
5860 0 : SWIGINTERN void OGRGeometryShadow_SetPointZM(OGRGeometryShadow *self,int point,double x,double y,double z,double m){
5861 0 : OGR_G_SetPointZM(self, point, x, y, z, m);
5862 0 : }
5863 160062 : SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
5864 160062 : OGR_G_SetPoint_2D(self, point, x, y);
5865 160062 : }
5866 2 : SWIGINTERN void OGRGeometryShadow_SwapXY(OGRGeometryShadow *self){
5867 2 : OGR_G_SwapXY(self);
5868 2 : }
5869 3081 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
5870 3081 : return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
5871 : }
5872 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
5873 1 : return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
5874 : }
5875 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SimplifyPreserveTopology(OGRGeometryShadow *self,double tolerance){
5876 1 : return (OGRGeometryShadow*) OGR_G_SimplifyPreserveTopology(self, tolerance);
5877 : }
5878 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_DelaunayTriangulation(OGRGeometryShadow *self,double dfTolerance=0.0,int bOnlyEdges=FALSE){
5879 1 : return (OGRGeometryShadow*) OGR_G_DelaunayTriangulation(self, dfTolerance, bOnlyEdges);
5880 : }
5881 3 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Polygonize(OGRGeometryShadow *self){
5882 3 : return (OGRGeometryShadow*) OGR_G_Polygonize(self);
5883 : }
5884 0 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_BuildArea(OGRGeometryShadow *self){
5885 0 : return (OGRGeometryShadow*) OGR_G_BuildArea(self);
5886 : }
5887 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Boundary(OGRGeometryShadow *self){
5888 1 : return (OGRGeometryShadow*) OGR_G_Boundary(self);
5889 : }
5890 5 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
5891 5 : return (OGRGeometryShadow*) OGR_G_Boundary(self);
5892 : }
5893 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
5894 1 : return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
5895 : }
5896 2 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConcaveHull(OGRGeometryShadow *self,double ratio,bool allowHoles){
5897 2 : return (OGRGeometryShadow*) OGR_G_ConcaveHull(self, ratio, allowHoles);
5898 : }
5899 11 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_MakeValid(OGRGeometryShadow *self,char **options=NULL){
5900 11 : return (OGRGeometryShadow*) OGR_G_MakeValidEx(self, options);
5901 : }
5902 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SetPrecision(OGRGeometryShadow *self,double gridSize,int flags=0){
5903 1 : return (OGRGeometryShadow*) OGR_G_SetPrecision(self, gridSize, flags);
5904 : }
5905 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Normalize(OGRGeometryShadow *self){
5906 1 : return (OGRGeometryShadow*) OGR_G_Normalize(self);
5907 : }
5908 18 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_RemoveLowerDimensionSubGeoms(OGRGeometryShadow *self){
5909 18 : return (OGRGeometryShadow*) OGR_G_RemoveLowerDimensionSubGeoms(self);
5910 : }
5911 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer__SWIG_0(OGRGeometryShadow *self,double distance,int quadsecs=30){
5912 : return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
5913 : }
5914 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer__SWIG_1(OGRGeometryShadow *self,double distance,char **options){
5915 : return (OGRGeometryShadow*) OGR_G_BufferEx( self, distance, options );
5916 : }
5917 11 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
5918 11 : return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
5919 : }
5920 9 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
5921 9 : return (OGRGeometryShadow*) OGR_G_Union( self, other );
5922 : }
5923 2 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
5924 2 : return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
5925 : }
5926 2 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnaryUnion(OGRGeometryShadow *self){
5927 2 : return (OGRGeometryShadow*) OGR_G_UnaryUnion( self );
5928 : }
5929 5 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
5930 5 : return (OGRGeometryShadow*) OGR_G_Difference( self, other );
5931 : }
5932 5 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
5933 5 : return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
5934 : }
5935 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
5936 1 : return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
5937 : }
5938 1 : SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
5939 1 : return OGR_G_Distance(self, other);
5940 : }
5941 1 : SWIGINTERN double OGRGeometryShadow_Distance3D(OGRGeometryShadow *self,OGRGeometryShadow *other){
5942 1 : return OGR_G_Distance3D(self, other);
5943 : }
5944 4 : SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
5945 4 : OGR_G_Empty(self);
5946 4 : }
5947 2159 : SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
5948 4318 : return (OGR_G_IsEmpty(self) > 0);
5949 : }
5950 19 : SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
5951 38 : return (OGR_G_IsValid(self) > 0);
5952 : }
5953 5 : SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
5954 10 : return (OGR_G_IsSimple(self) > 0);
5955 : }
5956 1 : SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
5957 2 : return (OGR_G_IsRing(self) > 0);
5958 : }
5959 7 : SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
5960 14 : return (OGR_G_Intersects(self, other) > 0);
5961 : }
5962 2 : SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
5963 4 : return (OGR_G_Intersects(self, other) > 0);
5964 : }
5965 28011 : SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
5966 56022 : return (OGR_G_Equals(self, other) > 0);
5967 : }
5968 170 : SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
5969 340 : return (OGR_G_Equals(self, other) > 0);
5970 : }
5971 6 : SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
5972 12 : return (OGR_G_Disjoint(self, other) > 0);
5973 : }
5974 6 : SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
5975 12 : return (OGR_G_Touches(self, other) > 0);
5976 : }
5977 6 : SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
5978 12 : return (OGR_G_Crosses(self, other) > 0);
5979 : }
5980 6400 : SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
5981 12800 : return (OGR_G_Within(self, other) > 0);
5982 : }
5983 9 : SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
5984 18 : return (OGR_G_Contains(self, other) > 0);
5985 : }
5986 6 : SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
5987 12 : return (OGR_G_Overlaps(self, other) > 0);
5988 : }
5989 9 : SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
5990 9 : return OGR_G_TransformTo(self, reference);
5991 : }
5992 : SWIGINTERN OGRErr OGRGeometryShadow_Transform__SWIG_0(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
5993 : return OGR_G_Transform(self, trans);
5994 : }
5995 62 : SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
5996 124 : OGRSpatialReferenceH ref = OGR_G_GetSpatialReference(self);
5997 62 : if( ref )
5998 60 : OSRReference(ref);
5999 62 : return (OSRSpatialReferenceShadow*) ref;
6000 : }
6001 74 : SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
6002 74 : OGR_G_AssignSpatialReference(self, reference);
6003 74 : }
6004 6 : SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
6005 6 : OGR_G_CloseRings(self);
6006 6 : }
6007 31 : SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
6008 31 : OGR_G_FlattenTo2D(self);
6009 31 : }
6010 21 : SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
6011 21 : OGR_G_Segmentize(self, dfMaxLength);
6012 21 : }
6013 13140 : SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
6014 13140 : OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
6015 13140 : }
6016 10 : SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
6017 10 : OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
6018 10 : }
6019 5 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
6020 10 : OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
6021 5 : OGR_G_Centroid( self, pt );
6022 5 : return pt;
6023 : }
6024 4 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){
6025 4 : return (OGRGeometryShadow*) OGR_G_PointOnSurface( self );
6026 : }
6027 2 : SWIGINTERN size_t OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
6028 2 : return OGR_G_WkbSizeEx(self);
6029 : }
6030 :
6031 : #define SWIG_From_long PyInt_FromLong
6032 :
6033 :
6034 : SWIGINTERNINLINE PyObject*
6035 2 : SWIG_From_unsigned_SS_long (unsigned long value)
6036 : {
6037 2 : return (value > LONG_MAX) ?
6038 2 : PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
6039 : }
6040 :
6041 :
6042 : #ifdef SWIG_LONG_LONG_AVAILABLE
6043 : SWIGINTERNINLINE PyObject*
6044 : SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
6045 : {
6046 : return (value > LONG_MAX) ?
6047 : PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
6048 : }
6049 : #endif
6050 :
6051 :
6052 : SWIGINTERNINLINE PyObject *
6053 2 : SWIG_From_size_t (size_t value)
6054 : {
6055 : #ifdef SWIG_LONG_LONG_AVAILABLE
6056 2 : if (sizeof(size_t) <= sizeof(unsigned long)) {
6057 : #endif
6058 2 : return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
6059 : #ifdef SWIG_LONG_LONG_AVAILABLE
6060 : } else {
6061 : /* assume sizeof(size_t) <= sizeof(unsigned long long) */
6062 : return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value));
6063 : }
6064 : #endif
6065 : }
6066 :
6067 77 : SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
6068 77 : return OGR_G_GetCoordinateDimension(self);
6069 : }
6070 4 : SWIGINTERN int OGRGeometryShadow_CoordinateDimension(OGRGeometryShadow *self){
6071 4 : return OGR_G_CoordinateDimension(self);
6072 : }
6073 34985 : SWIGINTERN int OGRGeometryShadow_Is3D(OGRGeometryShadow *self){
6074 34985 : return OGR_G_Is3D(self);
6075 : }
6076 38044 : SWIGINTERN int OGRGeometryShadow_IsMeasured(OGRGeometryShadow *self){
6077 38044 : return OGR_G_IsMeasured(self);
6078 : }
6079 56 : SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
6080 56 : OGR_G_SetCoordinateDimension(self, dimension);
6081 56 : }
6082 154 : SWIGINTERN void OGRGeometryShadow_Set3D(OGRGeometryShadow *self,int b3D){
6083 154 : OGR_G_Set3D(self, b3D);
6084 154 : }
6085 154 : SWIGINTERN void OGRGeometryShadow_SetMeasured(OGRGeometryShadow *self,int bMeasured){
6086 154 : OGR_G_SetMeasured(self, bMeasured);
6087 154 : }
6088 21 : SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
6089 21 : return OGR_G_GetDimension(self);
6090 : }
6091 29 : SWIGINTERN int OGRGeometryShadow_HasCurveGeometry(OGRGeometryShadow *self,int bLookForCircular=FALSE){
6092 29 : return OGR_G_HasCurveGeometry(self, bLookForCircular);
6093 : }
6094 3084 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetLinearGeometry(OGRGeometryShadow *self,double dfMaxAngleStepSizeDegrees=0.0,char **options=NULL){
6095 3084 : return (OGRGeometryShadow* )OGR_G_GetLinearGeometry(self, dfMaxAngleStepSizeDegrees, options);
6096 : }
6097 3066 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetCurveGeometry(OGRGeometryShadow *self,char **options=NULL){
6098 3066 : return (OGRGeometryShadow* )OGR_G_GetCurveGeometry(self, options);
6099 : }
6100 22 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Value(OGRGeometryShadow *self,double dfDistance){
6101 22 : return (OGRGeometryShadow*)OGR_G_Value(self, dfDistance);
6102 : }
6103 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Transform__SWIG_1(OGRGeometryShadow *self,OGRGeomTransformerShadow *transformer){
6104 : return (OGRGeometryShadow*)OGR_GeomTransformer_Transform(transformer, self);
6105 : }
6106 1 : SWIGINTERN OGRPreparedGeometryShadow *OGRGeometryShadow_CreatePreparedGeometry(OGRGeometryShadow *self){
6107 1 : return (OGRPreparedGeometryShadow*)OGRCreatePreparedGeometry(self);
6108 : }
6109 1 : SWIGINTERN void delete_OGRPreparedGeometryShadow(OGRPreparedGeometryShadow *self){
6110 1 : OGRDestroyPreparedGeometry( self );
6111 1 : }
6112 3 : SWIGINTERN bool OGRPreparedGeometryShadow_Intersects(OGRPreparedGeometryShadow *self,OGRGeometryShadow const *otherGeom){
6113 6 : return OGRPreparedGeometryIntersects(self, (OGRGeometryH)otherGeom);
6114 : }
6115 3 : SWIGINTERN bool OGRPreparedGeometryShadow_Contains(OGRPreparedGeometryShadow *self,OGRGeometryShadow const *otherGeom){
6116 6 : return OGRPreparedGeometryContains(self, (OGRGeometryH)otherGeom);
6117 : }
6118 6 : SWIGINTERN OGRGeomTransformerShadow *new_OGRGeomTransformerShadow(OSRCoordinateTransformationShadow *ct,char **options=NULL){
6119 6 : return OGR_GeomTransformer_Create(ct, options);
6120 : }
6121 6 : SWIGINTERN void delete_OGRGeomTransformerShadow(OGRGeomTransformerShadow *self){
6122 6 : OGR_GeomTransformer_Destroy( self );
6123 6 : }
6124 2 : SWIGINTERN OGRGeometryShadow *OGRGeomTransformerShadow_Transform(OGRGeomTransformerShadow *self,OGRGeometryShadow *src_geom){
6125 2 : return (OGRGeometryShadow*)OGR_GeomTransformer_Transform(self, src_geom);
6126 : }
6127 47 : SWIGINTERN void delete_OGRFieldDomainShadow(OGRFieldDomainShadow *self){
6128 47 : OGR_FldDomain_Destroy(self);
6129 47 : }
6130 57 : SWIGINTERN char const *OGRFieldDomainShadow_GetName(OGRFieldDomainShadow *self){
6131 57 : return OGR_FldDomain_GetName(self);
6132 : }
6133 60 : SWIGINTERN char const *OGRFieldDomainShadow_GetDescription(OGRFieldDomainShadow *self){
6134 60 : return OGR_FldDomain_GetDescription(self);
6135 : }
6136 62 : SWIGINTERN OGRFieldType OGRFieldDomainShadow_GetFieldType(OGRFieldDomainShadow *self){
6137 62 : return OGR_FldDomain_GetFieldType(self);
6138 : }
6139 40 : SWIGINTERN OGRFieldSubType OGRFieldDomainShadow_GetFieldSubType(OGRFieldDomainShadow *self){
6140 40 : return OGR_FldDomain_GetFieldSubType(self);
6141 : }
6142 56 : SWIGINTERN OGRFieldDomainType OGRFieldDomainShadow_GetDomainType(OGRFieldDomainShadow *self){
6143 56 : return OGR_FldDomain_GetDomainType(self);
6144 : }
6145 2 : SWIGINTERN OGRFieldDomainSplitPolicy OGRFieldDomainShadow_GetSplitPolicy(OGRFieldDomainShadow *self){
6146 2 : return OGR_FldDomain_GetSplitPolicy(self);
6147 : }
6148 1 : SWIGINTERN void OGRFieldDomainShadow_SetSplitPolicy(OGRFieldDomainShadow *self,OGRFieldDomainSplitPolicy policy){
6149 1 : OGR_FldDomain_SetSplitPolicy(self, policy);
6150 1 : }
6151 2 : SWIGINTERN OGRFieldDomainMergePolicy OGRFieldDomainShadow_GetMergePolicy(OGRFieldDomainShadow *self){
6152 2 : return OGR_FldDomain_GetMergePolicy(self);
6153 : }
6154 1 : SWIGINTERN void OGRFieldDomainShadow_SetMergePolicy(OGRFieldDomainShadow *self,OGRFieldDomainMergePolicy policy){
6155 1 : OGR_FldDomain_SetMergePolicy(self, policy);
6156 1 : }
6157 37 : SWIGINTERN OGRCodedValue const *OGRFieldDomainShadow_GetEnumeration(OGRFieldDomainShadow *self){
6158 37 : return OGR_CodedFldDomain_GetEnumeration(self);
6159 : }
6160 15 : SWIGINTERN double OGRFieldDomainShadow_GetMinAsDouble(OGRFieldDomainShadow *self){
6161 15 : const OGRField* psVal = OGR_RangeFldDomain_GetMin(self, NULL);
6162 15 : if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
6163 3 : return CPLAtof("-inf");
6164 12 : const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
6165 12 : if( eType == OFTInteger )
6166 7 : return psVal->Integer;
6167 5 : if( eType == OFTInteger64 )
6168 2 : return (double)psVal->Integer64;
6169 3 : if( eType == OFTReal )
6170 3 : return psVal->Real;
6171 0 : return CPLAtof("-inf");
6172 : }
6173 4 : SWIGINTERN char const *OGRFieldDomainShadow_GetMinAsString(OGRFieldDomainShadow *self){
6174 4 : const OGRField* psVal = OGR_RangeFldDomain_GetMin(self, NULL);
6175 4 : if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
6176 1 : return NULL;
6177 3 : const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
6178 3 : if( eType == OFTInteger )
6179 0 : return CPLSPrintf("%d", psVal->Integer);
6180 3 : if( eType == OFTInteger64 )
6181 0 : return CPLSPrintf(CPL_FRMT_GIB, psVal->Integer64);
6182 3 : if( eType == OFTReal )
6183 0 : return CPLSPrintf("%.18g", psVal->Real);
6184 3 : if( eType == OFTDateTime )
6185 3 : return CPLSPrintf("%04d-%02d-%02dT%02d:%02d:%02d",
6186 3 : psVal->Date.Year,
6187 3 : psVal->Date.Month,
6188 3 : psVal->Date.Day,
6189 3 : psVal->Date.Hour,
6190 3 : psVal->Date.Minute,
6191 3 : static_cast<int>(psVal->Date.Second + 0.5));
6192 : return NULL;
6193 : }
6194 7 : SWIGINTERN bool OGRFieldDomainShadow_IsMinInclusive(OGRFieldDomainShadow *self){
6195 7 : bool isInclusive = false;
6196 7 : (void)OGR_RangeFldDomain_GetMin(self, &isInclusive);
6197 7 : return isInclusive;
6198 : }
6199 15 : SWIGINTERN double OGRFieldDomainShadow_GetMaxAsDouble(OGRFieldDomainShadow *self){
6200 15 : const OGRField* psVal = OGR_RangeFldDomain_GetMax(self, NULL);
6201 15 : if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
6202 3 : return CPLAtof("inf");
6203 12 : const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
6204 12 : if( eType == OFTInteger )
6205 7 : return psVal->Integer;
6206 5 : if( eType == OFTInteger64 )
6207 2 : return (double)psVal->Integer64;
6208 3 : if( eType == OFTReal )
6209 3 : return psVal->Real;
6210 0 : return CPLAtof("inf");
6211 : }
6212 4 : SWIGINTERN char const *OGRFieldDomainShadow_GetMaxAsString(OGRFieldDomainShadow *self){
6213 4 : const OGRField* psVal = OGR_RangeFldDomain_GetMax(self, NULL);
6214 4 : if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
6215 1 : return NULL;
6216 3 : const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
6217 3 : if( eType == OFTInteger )
6218 0 : return CPLSPrintf("%d", psVal->Integer);
6219 3 : if( eType == OFTInteger64 )
6220 0 : return CPLSPrintf(CPL_FRMT_GIB, psVal->Integer64);
6221 3 : if( eType == OFTReal )
6222 0 : return CPLSPrintf("%.18g", psVal->Real);
6223 3 : if( eType == OFTDateTime )
6224 3 : return CPLSPrintf("%04d-%02d-%02dT%02d:%02d:%02d",
6225 3 : psVal->Date.Year,
6226 3 : psVal->Date.Month,
6227 3 : psVal->Date.Day,
6228 3 : psVal->Date.Hour,
6229 3 : psVal->Date.Minute,
6230 3 : static_cast<int>(psVal->Date.Second + 0.5));
6231 : return NULL;
6232 : }
6233 7 : SWIGINTERN bool OGRFieldDomainShadow_IsMaxInclusive(OGRFieldDomainShadow *self){
6234 7 : bool isInclusive = false;
6235 7 : (void)OGR_RangeFldDomain_GetMax(self, &isInclusive);
6236 7 : return isInclusive;
6237 : }
6238 9 : SWIGINTERN char const *OGRFieldDomainShadow_GetGlob(OGRFieldDomainShadow *self){
6239 9 : return OGR_GlobFldDomain_GetGlob(self);
6240 : }
6241 :
6242 : static
6243 19 : OGRFieldDomainShadow* CreateCodedFieldDomain( const char *name,
6244 : const char* description,
6245 : OGRFieldType type,
6246 : OGRFieldSubType subtype,
6247 : const OGRCodedValue* enumeration) {
6248 19 : return (OGRFieldDomainShadow*) OGR_CodedFldDomain_Create( name,
6249 : description,
6250 : type,
6251 : subtype,
6252 : enumeration );
6253 : }
6254 :
6255 :
6256 : static
6257 15 : OGRFieldDomainShadow* CreateRangeFieldDomain( const char *name,
6258 : const char* description,
6259 : OGRFieldType type,
6260 : OGRFieldSubType subtype,
6261 : double* min,
6262 : bool minIsInclusive,
6263 : double* max,
6264 : bool maxIsInclusive) {
6265 15 : OGRField sMin;
6266 15 : if (min )
6267 : {
6268 13 : if( type == OFTInteger )
6269 6 : sMin.Integer = static_cast<int>(*min);
6270 7 : else if( type == OFTInteger64 )
6271 2 : sMin.Integer64 = static_cast<GIntBig>(*min);
6272 5 : else if( type == OFTReal )
6273 4 : sMin.Real = *min;
6274 : else
6275 : return NULL;
6276 : }
6277 :
6278 14 : OGRField sMax;
6279 14 : if( max )
6280 : {
6281 12 : if( type == OFTInteger )
6282 6 : sMax.Integer = static_cast<int>(*max);
6283 6 : else if( type == OFTInteger64 )
6284 2 : sMax.Integer64 = static_cast<GIntBig>(*max);
6285 4 : else if( type == OFTReal )
6286 4 : sMax.Real = *max;
6287 : else
6288 : return NULL;
6289 : }
6290 18 : return (OGRFieldDomainShadow*) OGR_RangeFldDomain_Create( name,
6291 : description,
6292 : type,
6293 : subtype,
6294 : min ? &sMin : NULL,
6295 : minIsInclusive,
6296 : max ? &sMax : NULL,
6297 : maxIsInclusive );
6298 : }
6299 :
6300 :
6301 : static
6302 4 : OGRFieldDomainShadow* CreateRangeFieldDomainDateTime( const char *name,
6303 : const char* description,
6304 : const char* min,
6305 : bool minIsInclusive,
6306 : const char* max,
6307 : double maxIsInclusive) {
6308 4 : OGRField sMin;
6309 4 : OGRField sMax;
6310 4 : if( min && !OGRParseXMLDateTime(min, &sMin))
6311 : {
6312 0 : CPLError(CE_Failure, CPLE_AppDefined,
6313 : "Invalid min: %s",
6314 : min);
6315 0 : return NULL;
6316 : }
6317 4 : if( max && !OGRParseXMLDateTime(max, &sMax))
6318 : {
6319 0 : CPLError(CE_Failure, CPLE_AppDefined,
6320 : "Invalid max: %s",
6321 : max);
6322 0 : return NULL;
6323 : }
6324 6 : return (OGRFieldDomainShadow*) OGR_RangeFldDomain_Create( name,
6325 : description,
6326 : OFTDateTime,
6327 : OFSTNone,
6328 : min ? &sMin : NULL,
6329 : minIsInclusive,
6330 : max ? &sMax : NULL,
6331 : maxIsInclusive );
6332 : }
6333 :
6334 :
6335 : static
6336 14 : OGRFieldDomainShadow* CreateGlobFieldDomain( const char *name,
6337 : const char* description,
6338 : OGRFieldType type,
6339 : OGRFieldSubType subtype,
6340 : const char* glob ) {
6341 14 : return (OGRFieldDomainShadow*) OGR_GlobFldDomain_Create( name,
6342 : description,
6343 : type,
6344 : subtype,
6345 : glob );
6346 : }
6347 :
6348 19 : SWIGINTERN void delete_OGRGeomCoordinatePrecisionShadow(OGRGeomCoordinatePrecisionShadow *self){
6349 19 : OGRGeomCoordinatePrecisionDestroy(self);
6350 19 : }
6351 19 : SWIGINTERN void OGRGeomCoordinatePrecisionShadow_Set(OGRGeomCoordinatePrecisionShadow *self,double xyResolution,double zResolution,double mResolution){
6352 19 : OGRGeomCoordinatePrecisionSet(self, xyResolution, zResolution, mResolution);
6353 19 : }
6354 3 : SWIGINTERN void OGRGeomCoordinatePrecisionShadow_SetFromMeter(OGRGeomCoordinatePrecisionShadow *self,OSRSpatialReferenceShadow *srs,double xyMeterResolution,double zMeterResolution,double mResolution){
6355 3 : OGRGeomCoordinatePrecisionSetFromMeter(self, srs, xyMeterResolution, zMeterResolution, mResolution);
6356 3 : }
6357 45 : SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetXYResolution(OGRGeomCoordinatePrecisionShadow *self){
6358 45 : return OGRGeomCoordinatePrecisionGetXYResolution(self);
6359 : }
6360 42 : SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetZResolution(OGRGeomCoordinatePrecisionShadow *self){
6361 42 : return OGRGeomCoordinatePrecisionGetZResolution(self);
6362 : }
6363 27 : SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetMResolution(OGRGeomCoordinatePrecisionShadow *self){
6364 27 : return OGRGeomCoordinatePrecisionGetMResolution(self);
6365 : }
6366 4 : SWIGINTERN char **OGRGeomCoordinatePrecisionShadow_GetFormats(OGRGeomCoordinatePrecisionShadow *self){
6367 4 : return OGRGeomCoordinatePrecisionGetFormats(self);
6368 : }
6369 5 : SWIGINTERN char **OGRGeomCoordinatePrecisionShadow_GetFormatSpecificOptions(OGRGeomCoordinatePrecisionShadow *self,char const *formatName){
6370 5 : return OGRGeomCoordinatePrecisionGetFormatSpecificOptions(self, formatName);
6371 : }
6372 1 : SWIGINTERN void OGRGeomCoordinatePrecisionShadow_SetFormatSpecificOptions(OGRGeomCoordinatePrecisionShadow *self,char const *formatName,char **formatSpecificOptions){
6373 1 : OGRGeomCoordinatePrecisionSetFormatSpecificOptions(self, formatName, formatSpecificOptions);
6374 1 : }
6375 :
6376 : static
6377 19 : OGRGeomCoordinatePrecisionShadow* CreateGeomCoordinatePrecision() {
6378 19 : return OGRGeomCoordinatePrecisionCreate();
6379 : }
6380 :
6381 :
6382 0 : char const *OGRDriverShadow_get_name( OGRDriverShadow *h ) {
6383 0 : return OGR_Dr_GetName( h );
6384 : }
6385 :
6386 0 : char const *OGRDataSourceShadow_get_name( OGRDataSourceShadow *h ) {
6387 0 : return OGR_DS_GetName( h );
6388 : }
6389 :
6390 0 : char const *OGRDriverShadow_name_get( OGRDriverShadow *h ) {
6391 0 : return OGR_Dr_GetName( h );
6392 : }
6393 :
6394 0 : char const *OGRDataSourceShadow_name_get( OGRDataSourceShadow *h ) {
6395 0 : return OGR_DS_GetName( h );
6396 : }
6397 :
6398 :
6399 18 : OGRwkbGeometryType GT_SetModifier( OGRwkbGeometryType eType, int bSetZ, int bSetM = FALSE)
6400 : {
6401 18 : return OGR_GT_SetModifier(eType, bSetZ, bSetM);
6402 : }
6403 :
6404 :
6405 1 : OGRDataSourceShadow* GetOpenDS(int ds_number) {
6406 1 : OGRDataSourceShadow* layer = (OGRDataSourceShadow*) OGRGetOpenDS(ds_number);
6407 1 : return layer;
6408 : }
6409 :
6410 :
6411 7118 : OGRDataSourceShadow* Open( const char *utf8_path, int update =0 ) {
6412 7118 : CPLErrorReset();
6413 7118 : int nOpenFlags = GDAL_OF_VECTOR;
6414 7118 : if( update )
6415 1632 : nOpenFlags |= GDAL_OF_UPDATE;
6416 : #ifdef SWIGPYTHON
6417 9194 : if( GetUseExceptions() )
6418 2680 : nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
6419 : #endif
6420 7118 : OGRDataSourceShadow* ds = (OGRDataSourceShadow*)GDALOpenEx( utf8_path, nOpenFlags, NULL,
6421 : NULL, NULL );
6422 : #ifndef SWIGPYTHON
6423 : if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
6424 : {
6425 : CPLDebug( "SWIG",
6426 : "OGROpen() succeeded, but an error is posted, so we destroy"
6427 : " the datasource and fail at swig level." );
6428 : OGRReleaseDataSource(ds);
6429 : ds = NULL;
6430 : }
6431 : #endif
6432 7118 : return ds;
6433 : }
6434 :
6435 :
6436 23 : OGRDataSourceShadow* OpenShared( const char *utf8_path, int update =0 ) {
6437 23 : CPLErrorReset();
6438 23 : int nOpenFlags = GDAL_OF_VECTOR | GDAL_OF_SHARED;
6439 23 : if( update )
6440 12 : nOpenFlags |= GDAL_OF_UPDATE;
6441 : #ifdef SWIGPYTHON
6442 37 : if( GetUseExceptions() )
6443 14 : nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
6444 : #endif
6445 23 : OGRDataSourceShadow* ds = (OGRDataSourceShadow*)GDALOpenEx( utf8_path, nOpenFlags, NULL,
6446 : NULL, NULL );
6447 : #ifndef SWIGPYTHON
6448 : if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
6449 : {
6450 : OGRReleaseDataSource(ds);
6451 : ds = NULL;
6452 : }
6453 : #endif
6454 23 : return ds;
6455 : }
6456 :
6457 :
6458 : static
6459 2738 : OGRDriverShadow* GetDriverByName( char const *name ) {
6460 2738 : return (OGRDriverShadow*) OGRGetDriverByName( name );
6461 : }
6462 :
6463 : static
6464 0 : OGRDriverShadow* GetDriver(int driver_number) {
6465 0 : return (OGRDriverShadow*) OGRGetDriver(driver_number);
6466 : }
6467 :
6468 :
6469 59 : char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
6470 59 : int nResArgCount;
6471 :
6472 59 : if( papszArgv == NULL )
6473 : return NULL;
6474 :
6475 118 : bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
6476 59 : CSLFindString(papszArgv, "OGR_SKIP") >= 0 );
6477 :
6478 59 : nResArgCount =
6479 59 : GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, GDAL_OF_VECTOR | nOptions );
6480 :
6481 59 : if( bReloadDrivers )
6482 : {
6483 0 : GDALAllRegister();
6484 : }
6485 :
6486 59 : if( nResArgCount <= 0 )
6487 : return NULL;
6488 : else
6489 57 : return papszArgv;
6490 : }
6491 :
6492 :
6493 : static
6494 11 : int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
6495 11 : return GDALTermProgress( dfProgress, pszMessage, pData);
6496 : }
6497 :
6498 : #ifdef __cplusplus
6499 : extern "C" {
6500 : #endif
6501 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6502 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6503 0 : int result;
6504 :
6505 0 : if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
6506 0 : {
6507 : #ifdef SED_HACKS
6508 0 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
6509 : #endif
6510 0 : result = GetUseExceptions();
6511 : }
6512 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6513 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6514 : return resultobj;
6515 0 : fail:
6516 0 : return NULL;
6517 : }
6518 :
6519 :
6520 9575 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6521 9575 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6522 9575 : int result;
6523 :
6524 9575 : if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
6525 9575 : {
6526 : #ifdef SED_HACKS
6527 9575 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
6528 : #endif
6529 9575 : result = (int)_GetExceptionsLocal();
6530 : }
6531 9575 : resultobj = SWIG_From_int(static_cast< int >(result));
6532 9575 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6533 : return resultobj;
6534 0 : fail:
6535 0 : return NULL;
6536 : }
6537 :
6538 :
6539 19150 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6540 19150 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6541 19150 : int arg1 ;
6542 19150 : int val1 ;
6543 19150 : int ecode1 = 0 ;
6544 19150 : PyObject *swig_obj[1] ;
6545 :
6546 19150 : if (!args) SWIG_fail;
6547 19150 : swig_obj[0] = args;
6548 19150 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
6549 19150 : if (!SWIG_IsOK(ecode1)) {
6550 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
6551 : }
6552 19150 : arg1 = static_cast< int >(val1);
6553 19150 : {
6554 : #ifdef SED_HACKS
6555 19150 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
6556 : #endif
6557 19150 : _SetExceptionsLocal(arg1);
6558 : }
6559 19150 : resultobj = SWIG_Py_Void();
6560 19150 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6561 : return resultobj;
6562 : fail:
6563 : return NULL;
6564 : }
6565 :
6566 :
6567 29 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6568 29 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6569 :
6570 29 : if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
6571 29 : _UseExceptions();
6572 29 : resultobj = SWIG_Py_Void();
6573 29 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6574 : return resultobj;
6575 0 : fail:
6576 0 : return NULL;
6577 : }
6578 :
6579 :
6580 5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6581 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6582 :
6583 5 : if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
6584 5 : _DontUseExceptions();
6585 5 : resultobj = SWIG_Py_Void();
6586 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6587 : return resultobj;
6588 0 : fail:
6589 0 : return NULL;
6590 : }
6591 :
6592 :
6593 19148 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6594 19148 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6595 19148 : int result;
6596 :
6597 19148 : if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
6598 19148 : {
6599 : #ifdef SED_HACKS
6600 19148 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
6601 : #endif
6602 19148 : result = (int)_UserHasSpecifiedIfUsingExceptions();
6603 : }
6604 19148 : resultobj = SWIG_From_int(static_cast< int >(result));
6605 19148 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6606 : return resultobj;
6607 0 : fail:
6608 0 : return NULL;
6609 : }
6610 :
6611 :
6612 20 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6613 20 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6614 20 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6615 20 : void *argp1 = 0 ;
6616 20 : int res1 = 0 ;
6617 20 : PyObject *swig_obj[1] ;
6618 20 : char *result = 0 ;
6619 :
6620 20 : if (!args) SWIG_fail;
6621 20 : swig_obj[0] = args;
6622 20 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6623 20 : if (!SWIG_IsOK(res1)) {
6624 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6625 : }
6626 20 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6627 20 : {
6628 20 : const int bLocalUseExceptions = GetUseExceptions();
6629 20 : if ( bLocalUseExceptions ) {
6630 7 : pushErrorHandler();
6631 : }
6632 20 : {
6633 20 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6634 20 : result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
6635 20 : SWIG_PYTHON_THREAD_END_ALLOW;
6636 : }
6637 20 : if ( bLocalUseExceptions ) {
6638 7 : popErrorHandler();
6639 : }
6640 : #ifndef SED_HACKS
6641 : if ( bLocalUseExceptions ) {
6642 : CPLErr eclass = CPLGetLastErrorType();
6643 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6644 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6645 : }
6646 : }
6647 : #endif
6648 : }
6649 20 : resultobj = SWIG_FromCharPtr((const char *)result);
6650 20 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6651 : return resultobj;
6652 : fail:
6653 : return NULL;
6654 : }
6655 :
6656 :
6657 0 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6658 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6659 0 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6660 0 : char *arg2 = (char *) 0 ;
6661 0 : void *argp1 = 0 ;
6662 0 : int res1 = 0 ;
6663 0 : int res2 ;
6664 0 : char *buf2 = 0 ;
6665 0 : int alloc2 = 0 ;
6666 0 : PyObject *swig_obj[2] ;
6667 :
6668 0 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
6669 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6670 0 : if (!SWIG_IsOK(res1)) {
6671 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6672 : }
6673 0 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6674 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6675 0 : if (!SWIG_IsOK(res2)) {
6676 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
6677 : }
6678 0 : arg2 = reinterpret_cast< char * >(buf2);
6679 0 : {
6680 0 : if (!arg2) {
6681 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6682 : }
6683 : }
6684 0 : {
6685 0 : const int bLocalUseExceptions = GetUseExceptions();
6686 0 : if ( bLocalUseExceptions ) {
6687 0 : pushErrorHandler();
6688 : }
6689 0 : {
6690 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6691 0 : GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
6692 0 : SWIG_PYTHON_THREAD_END_ALLOW;
6693 : }
6694 0 : if ( bLocalUseExceptions ) {
6695 0 : popErrorHandler();
6696 : }
6697 : #ifndef SED_HACKS
6698 : if ( bLocalUseExceptions ) {
6699 : CPLErr eclass = CPLGetLastErrorType();
6700 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6701 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6702 : }
6703 : }
6704 : #endif
6705 : }
6706 0 : resultobj = SWIG_Py_Void();
6707 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6708 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6709 : return resultobj;
6710 0 : fail:
6711 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6712 : return NULL;
6713 : }
6714 :
6715 :
6716 8 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6717 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6718 8 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6719 8 : void *argp1 = 0 ;
6720 8 : int res1 = 0 ;
6721 8 : PyObject *swig_obj[1] ;
6722 8 : char **result = 0 ;
6723 :
6724 8 : if (!args) SWIG_fail;
6725 8 : swig_obj[0] = args;
6726 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6727 8 : if (!SWIG_IsOK(res1)) {
6728 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6729 : }
6730 8 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6731 8 : {
6732 8 : const int bLocalUseExceptions = GetUseExceptions();
6733 8 : if ( bLocalUseExceptions ) {
6734 0 : pushErrorHandler();
6735 : }
6736 8 : {
6737 8 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6738 8 : result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
6739 8 : SWIG_PYTHON_THREAD_END_ALLOW;
6740 : }
6741 8 : if ( bLocalUseExceptions ) {
6742 0 : popErrorHandler();
6743 : }
6744 : #ifndef SED_HACKS
6745 : if ( bLocalUseExceptions ) {
6746 : CPLErr eclass = CPLGetLastErrorType();
6747 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6748 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6749 : }
6750 : }
6751 : #endif
6752 : }
6753 8 : {
6754 : /* %typemap(out) char **CSL -> ( string ) */
6755 8 : bool bErr = false;
6756 8 : resultobj = CSLToList(result, &bErr);
6757 8 : CSLDestroy(result);
6758 8 : if( bErr ) {
6759 0 : SWIG_fail;
6760 : }
6761 : }
6762 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6763 : return resultobj;
6764 : fail:
6765 : return NULL;
6766 : }
6767 :
6768 :
6769 82 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6770 82 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6771 82 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6772 82 : char *arg2 = (char *) "" ;
6773 82 : void *argp1 = 0 ;
6774 82 : int res1 = 0 ;
6775 82 : int res2 ;
6776 82 : char *buf2 = 0 ;
6777 82 : int alloc2 = 0 ;
6778 82 : PyObject *swig_obj[2] ;
6779 82 : char **result = 0 ;
6780 :
6781 82 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
6782 82 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6783 82 : if (!SWIG_IsOK(res1)) {
6784 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6785 : }
6786 82 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6787 82 : if (swig_obj[1]) {
6788 63 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6789 63 : if (!SWIG_IsOK(res2)) {
6790 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
6791 : }
6792 63 : arg2 = reinterpret_cast< char * >(buf2);
6793 : }
6794 82 : {
6795 82 : const int bLocalUseExceptions = GetUseExceptions();
6796 82 : if ( bLocalUseExceptions ) {
6797 51 : pushErrorHandler();
6798 : }
6799 82 : {
6800 82 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6801 82 : result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
6802 82 : SWIG_PYTHON_THREAD_END_ALLOW;
6803 : }
6804 82 : if ( bLocalUseExceptions ) {
6805 51 : popErrorHandler();
6806 : }
6807 : #ifndef SED_HACKS
6808 : if ( bLocalUseExceptions ) {
6809 : CPLErr eclass = CPLGetLastErrorType();
6810 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6811 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6812 : }
6813 : }
6814 : #endif
6815 : }
6816 82 : {
6817 : /* %typemap(out) char **dict */
6818 82 : resultobj = GetCSLStringAsPyDict(result, false);
6819 : }
6820 82 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6821 82 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6822 : return resultobj;
6823 0 : fail:
6824 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6825 : return NULL;
6826 : }
6827 :
6828 :
6829 9 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6830 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6831 9 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6832 9 : char *arg2 = (char *) "" ;
6833 9 : void *argp1 = 0 ;
6834 9 : int res1 = 0 ;
6835 9 : int res2 ;
6836 9 : char *buf2 = 0 ;
6837 9 : int alloc2 = 0 ;
6838 9 : PyObject *swig_obj[2] ;
6839 9 : char **result = 0 ;
6840 :
6841 9 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
6842 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6843 9 : if (!SWIG_IsOK(res1)) {
6844 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6845 : }
6846 9 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6847 9 : if (swig_obj[1]) {
6848 5 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6849 5 : if (!SWIG_IsOK(res2)) {
6850 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
6851 : }
6852 5 : arg2 = reinterpret_cast< char * >(buf2);
6853 : }
6854 9 : {
6855 9 : const int bLocalUseExceptions = GetUseExceptions();
6856 9 : if ( bLocalUseExceptions ) {
6857 5 : pushErrorHandler();
6858 : }
6859 9 : {
6860 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6861 9 : result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
6862 9 : SWIG_PYTHON_THREAD_END_ALLOW;
6863 : }
6864 9 : if ( bLocalUseExceptions ) {
6865 5 : popErrorHandler();
6866 : }
6867 : #ifndef SED_HACKS
6868 : if ( bLocalUseExceptions ) {
6869 : CPLErr eclass = CPLGetLastErrorType();
6870 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6871 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6872 : }
6873 : }
6874 : #endif
6875 : }
6876 9 : {
6877 : /* %typemap(out) char **options -> ( string ) */
6878 9 : bool bErr = false;
6879 9 : resultobj = CSLToList(result, &bErr);
6880 9 : if( bErr ) {
6881 0 : SWIG_fail;
6882 : }
6883 : }
6884 9 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6885 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6886 : return resultobj;
6887 0 : fail:
6888 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6889 : return NULL;
6890 : }
6891 :
6892 :
6893 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
6894 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6895 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6896 : char **arg2 = (char **) 0 ;
6897 : char *arg3 = (char *) "" ;
6898 : void *argp1 = 0 ;
6899 : int res1 = 0 ;
6900 : int res3 ;
6901 : char *buf3 = 0 ;
6902 : int alloc3 = 0 ;
6903 : CPLErr result;
6904 :
6905 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
6906 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6907 : if (!SWIG_IsOK(res1)) {
6908 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6909 : }
6910 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6911 : {
6912 : /* %typemap(in) char **dict */
6913 : arg2 = NULL;
6914 : if ( PySequence_Check( swig_obj[1] ) ) {
6915 : int bErr = FALSE;
6916 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
6917 : if ( bErr )
6918 : {
6919 : SWIG_fail;
6920 : }
6921 : }
6922 : else if ( PyMapping_Check( swig_obj[1] ) ) {
6923 : int bErr = FALSE;
6924 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
6925 : if ( bErr )
6926 : {
6927 : SWIG_fail;
6928 : }
6929 : }
6930 : else {
6931 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
6932 : SWIG_fail;
6933 : }
6934 : }
6935 : if (swig_obj[2]) {
6936 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6937 : if (!SWIG_IsOK(res3)) {
6938 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
6939 : }
6940 : arg3 = reinterpret_cast< char * >(buf3);
6941 : }
6942 : {
6943 : const int bLocalUseExceptions = GetUseExceptions();
6944 : if ( bLocalUseExceptions ) {
6945 : pushErrorHandler();
6946 : }
6947 : {
6948 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6949 : result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
6950 : SWIG_PYTHON_THREAD_END_ALLOW;
6951 : }
6952 : if ( bLocalUseExceptions ) {
6953 : popErrorHandler();
6954 : }
6955 : #ifndef SED_HACKS
6956 : if ( bLocalUseExceptions ) {
6957 : CPLErr eclass = CPLGetLastErrorType();
6958 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6959 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6960 : }
6961 : }
6962 : #endif
6963 : }
6964 : resultobj = SWIG_From_int(static_cast< int >(result));
6965 : {
6966 : /* %typemap(freearg) char **dict */
6967 : CSLDestroy( arg2 );
6968 : }
6969 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6970 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6971 : return resultobj;
6972 : fail:
6973 : {
6974 : /* %typemap(freearg) char **dict */
6975 : CSLDestroy( arg2 );
6976 : }
6977 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6978 : return NULL;
6979 : }
6980 :
6981 :
6982 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
6983 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6984 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6985 : char *arg2 = (char *) 0 ;
6986 : char *arg3 = (char *) "" ;
6987 : void *argp1 = 0 ;
6988 : int res1 = 0 ;
6989 : int res2 ;
6990 : char *buf2 = 0 ;
6991 : int alloc2 = 0 ;
6992 : int res3 ;
6993 : char *buf3 = 0 ;
6994 : int alloc3 = 0 ;
6995 : CPLErr result;
6996 :
6997 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
6998 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6999 : if (!SWIG_IsOK(res1)) {
7000 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
7001 : }
7002 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
7003 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7004 : if (!SWIG_IsOK(res2)) {
7005 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
7006 : }
7007 : arg2 = reinterpret_cast< char * >(buf2);
7008 : if (swig_obj[2]) {
7009 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
7010 : if (!SWIG_IsOK(res3)) {
7011 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
7012 : }
7013 : arg3 = reinterpret_cast< char * >(buf3);
7014 : }
7015 : {
7016 : const int bLocalUseExceptions = GetUseExceptions();
7017 : if ( bLocalUseExceptions ) {
7018 : pushErrorHandler();
7019 : }
7020 : {
7021 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7022 : result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
7023 : SWIG_PYTHON_THREAD_END_ALLOW;
7024 : }
7025 : if ( bLocalUseExceptions ) {
7026 : popErrorHandler();
7027 : }
7028 : #ifndef SED_HACKS
7029 : if ( bLocalUseExceptions ) {
7030 : CPLErr eclass = CPLGetLastErrorType();
7031 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7032 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7033 : }
7034 : }
7035 : #endif
7036 : }
7037 : resultobj = SWIG_From_int(static_cast< int >(result));
7038 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7039 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7040 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7041 : return resultobj;
7042 : fail:
7043 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7044 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7045 : return NULL;
7046 : }
7047 :
7048 :
7049 35 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
7050 35 : Py_ssize_t argc;
7051 35 : PyObject *argv[4] = {
7052 : 0
7053 : };
7054 :
7055 35 : if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
7056 35 : --argc;
7057 35 : if ((argc >= 2) && (argc <= 3)) {
7058 35 : int _v;
7059 35 : void *vptr = 0;
7060 35 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
7061 39 : _v = SWIG_CheckState(res);
7062 35 : if (_v) {
7063 35 : {
7064 : /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
7065 : /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
7066 : /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
7067 : /* (see #4816) */
7068 35 : _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
7069 : }
7070 31 : if (_v) {
7071 31 : if (argc <= 2) {
7072 31 : return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
7073 : }
7074 3 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
7075 3 : _v = SWIG_CheckState(res);
7076 3 : if (_v) {
7077 3 : return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
7078 : }
7079 : }
7080 : }
7081 : }
7082 4 : if ((argc >= 2) && (argc <= 3)) {
7083 4 : int _v;
7084 4 : void *vptr = 0;
7085 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
7086 4 : _v = SWIG_CheckState(res);
7087 4 : if (_v) {
7088 4 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
7089 4 : _v = SWIG_CheckState(res);
7090 4 : if (_v) {
7091 4 : if (argc <= 2) {
7092 4 : return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
7093 : }
7094 1 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
7095 1 : _v = SWIG_CheckState(res);
7096 1 : if (_v) {
7097 1 : return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
7098 : }
7099 : }
7100 : }
7101 : }
7102 :
7103 0 : fail:
7104 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
7105 : " Possible C/C++ prototypes are:\n"
7106 : " GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
7107 : " GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
7108 : return 0;
7109 : }
7110 :
7111 :
7112 479 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7113 479 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7114 479 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
7115 479 : char *arg2 = (char *) 0 ;
7116 479 : char *arg3 = (char *) "" ;
7117 479 : void *argp1 = 0 ;
7118 479 : int res1 = 0 ;
7119 479 : int res2 ;
7120 479 : char *buf2 = 0 ;
7121 479 : int alloc2 = 0 ;
7122 479 : int res3 ;
7123 479 : char *buf3 = 0 ;
7124 479 : int alloc3 = 0 ;
7125 479 : PyObject *swig_obj[3] ;
7126 479 : char *result = 0 ;
7127 :
7128 479 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
7129 479 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
7130 479 : if (!SWIG_IsOK(res1)) {
7131 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
7132 : }
7133 479 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
7134 479 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7135 479 : if (!SWIG_IsOK(res2)) {
7136 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
7137 : }
7138 479 : arg2 = reinterpret_cast< char * >(buf2);
7139 479 : if (swig_obj[2]) {
7140 424 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
7141 424 : if (!SWIG_IsOK(res3)) {
7142 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
7143 : }
7144 424 : arg3 = reinterpret_cast< char * >(buf3);
7145 : }
7146 479 : {
7147 479 : if (!arg2) {
7148 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7149 : }
7150 : }
7151 479 : {
7152 479 : const int bLocalUseExceptions = GetUseExceptions();
7153 479 : if ( bLocalUseExceptions ) {
7154 433 : pushErrorHandler();
7155 : }
7156 479 : {
7157 479 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7158 479 : result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
7159 479 : SWIG_PYTHON_THREAD_END_ALLOW;
7160 : }
7161 479 : if ( bLocalUseExceptions ) {
7162 433 : popErrorHandler();
7163 : }
7164 : #ifndef SED_HACKS
7165 : if ( bLocalUseExceptions ) {
7166 : CPLErr eclass = CPLGetLastErrorType();
7167 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7168 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7169 : }
7170 : }
7171 : #endif
7172 : }
7173 479 : resultobj = SWIG_FromCharPtr((const char *)result);
7174 479 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7175 479 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7176 479 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7177 : return resultobj;
7178 0 : fail:
7179 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7180 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7181 : return NULL;
7182 : }
7183 :
7184 :
7185 297 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7186 297 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7187 297 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
7188 297 : char *arg2 = (char *) 0 ;
7189 297 : char *arg3 = (char *) 0 ;
7190 297 : char *arg4 = (char *) "" ;
7191 297 : void *argp1 = 0 ;
7192 297 : int res1 = 0 ;
7193 297 : int res2 ;
7194 297 : char *buf2 = 0 ;
7195 297 : int alloc2 = 0 ;
7196 297 : int res3 ;
7197 297 : char *buf3 = 0 ;
7198 297 : int alloc3 = 0 ;
7199 297 : int res4 ;
7200 297 : char *buf4 = 0 ;
7201 297 : int alloc4 = 0 ;
7202 297 : PyObject *swig_obj[4] ;
7203 297 : CPLErr result;
7204 :
7205 297 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
7206 297 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
7207 297 : if (!SWIG_IsOK(res1)) {
7208 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
7209 : }
7210 297 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
7211 297 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7212 297 : if (!SWIG_IsOK(res2)) {
7213 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
7214 : }
7215 297 : arg2 = reinterpret_cast< char * >(buf2);
7216 297 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
7217 297 : if (!SWIG_IsOK(res3)) {
7218 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
7219 : }
7220 297 : arg3 = reinterpret_cast< char * >(buf3);
7221 297 : if (swig_obj[3]) {
7222 5 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
7223 5 : if (!SWIG_IsOK(res4)) {
7224 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
7225 : }
7226 5 : arg4 = reinterpret_cast< char * >(buf4);
7227 : }
7228 297 : {
7229 297 : if (!arg2) {
7230 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7231 : }
7232 : }
7233 297 : {
7234 297 : const int bLocalUseExceptions = GetUseExceptions();
7235 297 : if ( bLocalUseExceptions ) {
7236 270 : pushErrorHandler();
7237 : }
7238 297 : {
7239 297 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7240 297 : result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
7241 297 : SWIG_PYTHON_THREAD_END_ALLOW;
7242 : }
7243 297 : if ( bLocalUseExceptions ) {
7244 270 : popErrorHandler();
7245 : }
7246 : #ifndef SED_HACKS
7247 : if ( bLocalUseExceptions ) {
7248 : CPLErr eclass = CPLGetLastErrorType();
7249 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7250 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7251 : }
7252 : }
7253 : #endif
7254 : }
7255 297 : resultobj = SWIG_From_int(static_cast< int >(result));
7256 297 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7257 297 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7258 297 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
7259 297 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7260 : return resultobj;
7261 0 : fail:
7262 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7263 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7264 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
7265 : return NULL;
7266 : }
7267 :
7268 :
7269 277 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7270 277 : PyObject *obj;
7271 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
7272 277 : SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
7273 277 : return SWIG_Py_Void();
7274 : }
7275 :
7276 4820 : SWIGINTERN PyObject *_wrap_GetGEOSVersionMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7277 4820 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7278 4820 : int result;
7279 :
7280 4820 : if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMajor", 0, 0, 0)) SWIG_fail;
7281 4820 : {
7282 4820 : const int bLocalUseExceptions = GetUseExceptions();
7283 4820 : if ( bLocalUseExceptions ) {
7284 689 : pushErrorHandler();
7285 : }
7286 4820 : {
7287 4820 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7288 4820 : result = (int)GetGEOSVersionMajor();
7289 4820 : SWIG_PYTHON_THREAD_END_ALLOW;
7290 : }
7291 4820 : if ( bLocalUseExceptions ) {
7292 689 : popErrorHandler();
7293 : }
7294 : #ifndef SED_HACKS
7295 : if ( bLocalUseExceptions ) {
7296 : CPLErr eclass = CPLGetLastErrorType();
7297 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7298 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7299 : }
7300 : }
7301 : #endif
7302 : }
7303 4820 : resultobj = SWIG_From_int(static_cast< int >(result));
7304 4820 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7305 : return resultobj;
7306 0 : fail:
7307 0 : return NULL;
7308 : }
7309 :
7310 :
7311 329 : SWIGINTERN PyObject *_wrap_GetGEOSVersionMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7312 329 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7313 329 : int result;
7314 :
7315 329 : if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMinor", 0, 0, 0)) SWIG_fail;
7316 329 : {
7317 329 : const int bLocalUseExceptions = GetUseExceptions();
7318 329 : if ( bLocalUseExceptions ) {
7319 328 : pushErrorHandler();
7320 : }
7321 329 : {
7322 329 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7323 329 : result = (int)GetGEOSVersionMinor();
7324 329 : SWIG_PYTHON_THREAD_END_ALLOW;
7325 : }
7326 329 : if ( bLocalUseExceptions ) {
7327 328 : popErrorHandler();
7328 : }
7329 : #ifndef SED_HACKS
7330 : if ( bLocalUseExceptions ) {
7331 : CPLErr eclass = CPLGetLastErrorType();
7332 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7333 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7334 : }
7335 : }
7336 : #endif
7337 : }
7338 329 : resultobj = SWIG_From_int(static_cast< int >(result));
7339 329 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7340 : return resultobj;
7341 0 : fail:
7342 0 : return NULL;
7343 : }
7344 :
7345 :
7346 329 : SWIGINTERN PyObject *_wrap_GetGEOSVersionMicro(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7347 329 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7348 329 : int result;
7349 :
7350 329 : if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMicro", 0, 0, 0)) SWIG_fail;
7351 329 : {
7352 329 : const int bLocalUseExceptions = GetUseExceptions();
7353 329 : if ( bLocalUseExceptions ) {
7354 328 : pushErrorHandler();
7355 : }
7356 329 : {
7357 329 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7358 329 : result = (int)GetGEOSVersionMicro();
7359 329 : SWIG_PYTHON_THREAD_END_ALLOW;
7360 : }
7361 329 : if ( bLocalUseExceptions ) {
7362 328 : popErrorHandler();
7363 : }
7364 : #ifndef SED_HACKS
7365 : if ( bLocalUseExceptions ) {
7366 : CPLErr eclass = CPLGetLastErrorType();
7367 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7368 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7369 : }
7370 : }
7371 : #endif
7372 : }
7373 329 : resultobj = SWIG_From_int(static_cast< int >(result));
7374 329 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7375 : return resultobj;
7376 0 : fail:
7377 0 : return NULL;
7378 : }
7379 :
7380 :
7381 4 : SWIGINTERN PyObject *_wrap_new_StyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7382 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7383 4 : OGRStyleTableShadow *result = 0 ;
7384 :
7385 4 : if (!SWIG_Python_UnpackTuple(args, "new_StyleTable", 0, 0, 0)) SWIG_fail;
7386 4 : {
7387 4 : const int bLocalUseExceptions = GetUseExceptions();
7388 4 : if ( bLocalUseExceptions ) {
7389 4 : pushErrorHandler();
7390 : }
7391 4 : {
7392 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7393 4 : result = (OGRStyleTableShadow *)new_OGRStyleTableShadow();
7394 4 : SWIG_PYTHON_THREAD_END_ALLOW;
7395 : }
7396 4 : if ( bLocalUseExceptions ) {
7397 4 : popErrorHandler();
7398 : }
7399 : #ifndef SED_HACKS
7400 : if ( bLocalUseExceptions ) {
7401 : CPLErr eclass = CPLGetLastErrorType();
7402 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7403 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7404 : }
7405 : }
7406 : #endif
7407 : }
7408 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, SWIG_POINTER_NEW | 0 );
7409 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7410 : return resultobj;
7411 0 : fail:
7412 0 : return NULL;
7413 : }
7414 :
7415 :
7416 4 : SWIGINTERN PyObject *_wrap_delete_StyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7417 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7418 4 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7419 4 : void *argp1 = 0 ;
7420 4 : int res1 = 0 ;
7421 4 : PyObject *swig_obj[1] ;
7422 :
7423 4 : if (!args) SWIG_fail;
7424 4 : swig_obj[0] = args;
7425 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, SWIG_POINTER_DISOWN | 0 );
7426 4 : if (!SWIG_IsOK(res1)) {
7427 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7428 : }
7429 4 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7430 4 : {
7431 4 : const int bLocalUseExceptions = GetUseExceptions();
7432 4 : if ( bLocalUseExceptions ) {
7433 4 : pushErrorHandler();
7434 : }
7435 4 : {
7436 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7437 4 : delete_OGRStyleTableShadow(arg1);
7438 4 : SWIG_PYTHON_THREAD_END_ALLOW;
7439 : }
7440 4 : if ( bLocalUseExceptions ) {
7441 4 : popErrorHandler();
7442 : }
7443 : #ifndef SED_HACKS
7444 : if ( bLocalUseExceptions ) {
7445 : CPLErr eclass = CPLGetLastErrorType();
7446 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7447 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7448 : }
7449 : }
7450 : #endif
7451 : }
7452 4 : resultobj = SWIG_Py_Void();
7453 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7454 : return resultobj;
7455 : fail:
7456 : return NULL;
7457 : }
7458 :
7459 :
7460 5 : SWIGINTERN PyObject *_wrap_StyleTable_AddStyle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7461 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7462 5 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7463 5 : char *arg2 = (char *) 0 ;
7464 5 : char *arg3 = (char *) 0 ;
7465 5 : void *argp1 = 0 ;
7466 5 : int res1 = 0 ;
7467 5 : int res2 ;
7468 5 : char *buf2 = 0 ;
7469 5 : int alloc2 = 0 ;
7470 5 : int res3 ;
7471 5 : char *buf3 = 0 ;
7472 5 : int alloc3 = 0 ;
7473 5 : PyObject *swig_obj[3] ;
7474 5 : int result;
7475 :
7476 5 : if (!SWIG_Python_UnpackTuple(args, "StyleTable_AddStyle", 3, 3, swig_obj)) SWIG_fail;
7477 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7478 5 : if (!SWIG_IsOK(res1)) {
7479 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_AddStyle" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7480 : }
7481 5 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7482 5 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7483 5 : if (!SWIG_IsOK(res2)) {
7484 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StyleTable_AddStyle" "', argument " "2"" of type '" "char const *""'");
7485 : }
7486 5 : arg2 = reinterpret_cast< char * >(buf2);
7487 5 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
7488 5 : if (!SWIG_IsOK(res3)) {
7489 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StyleTable_AddStyle" "', argument " "3"" of type '" "char const *""'");
7490 : }
7491 5 : arg3 = reinterpret_cast< char * >(buf3);
7492 5 : {
7493 5 : const int bLocalUseExceptions = GetUseExceptions();
7494 5 : if ( bLocalUseExceptions ) {
7495 5 : pushErrorHandler();
7496 : }
7497 5 : {
7498 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7499 5 : result = (int)OGRStyleTableShadow_AddStyle(arg1,(char const *)arg2,(char const *)arg3);
7500 5 : SWIG_PYTHON_THREAD_END_ALLOW;
7501 : }
7502 5 : if ( bLocalUseExceptions ) {
7503 5 : popErrorHandler();
7504 : }
7505 : #ifndef SED_HACKS
7506 : if ( bLocalUseExceptions ) {
7507 : CPLErr eclass = CPLGetLastErrorType();
7508 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7509 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7510 : }
7511 : }
7512 : #endif
7513 : }
7514 5 : resultobj = SWIG_From_int(static_cast< int >(result));
7515 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7516 5 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7517 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7518 : return resultobj;
7519 0 : fail:
7520 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7521 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7522 : return NULL;
7523 : }
7524 :
7525 :
7526 2 : SWIGINTERN PyObject *_wrap_StyleTable_LoadStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7527 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7528 2 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7529 2 : char *arg2 = (char *) 0 ;
7530 2 : void *argp1 = 0 ;
7531 2 : int res1 = 0 ;
7532 2 : int bToFree2 = 0 ;
7533 2 : PyObject *swig_obj[2] ;
7534 2 : int result;
7535 :
7536 2 : if (!SWIG_Python_UnpackTuple(args, "StyleTable_LoadStyleTable", 2, 2, swig_obj)) SWIG_fail;
7537 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7538 2 : if (!SWIG_IsOK(res1)) {
7539 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_LoadStyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7540 : }
7541 2 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7542 2 : {
7543 : /* %typemap(in) (const char *utf8_path) */
7544 2 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
7545 : {
7546 2 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
7547 : }
7548 : else
7549 : {
7550 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
7551 :
7552 : }
7553 2 : if (arg2 == NULL)
7554 : {
7555 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
7556 0 : SWIG_fail;
7557 : }
7558 : }
7559 2 : {
7560 2 : const int bLocalUseExceptions = GetUseExceptions();
7561 2 : if ( bLocalUseExceptions ) {
7562 2 : pushErrorHandler();
7563 : }
7564 2 : {
7565 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7566 2 : result = (int)OGRStyleTableShadow_LoadStyleTable(arg1,(char const *)arg2);
7567 2 : SWIG_PYTHON_THREAD_END_ALLOW;
7568 : }
7569 2 : if ( bLocalUseExceptions ) {
7570 2 : popErrorHandler();
7571 : }
7572 : #ifndef SED_HACKS
7573 : if ( bLocalUseExceptions ) {
7574 : CPLErr eclass = CPLGetLastErrorType();
7575 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7576 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7577 : }
7578 : }
7579 : #endif
7580 : }
7581 2 : resultobj = SWIG_From_int(static_cast< int >(result));
7582 2 : {
7583 : /* %typemap(freearg) (const char *utf8_path) */
7584 2 : GDALPythonFreeCStr(arg2, bToFree2);
7585 : }
7586 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7587 : return resultobj;
7588 0 : fail:
7589 0 : {
7590 : /* %typemap(freearg) (const char *utf8_path) */
7591 2 : GDALPythonFreeCStr(arg2, bToFree2);
7592 : }
7593 : return NULL;
7594 : }
7595 :
7596 :
7597 2 : SWIGINTERN PyObject *_wrap_StyleTable_SaveStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7598 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7599 2 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7600 2 : char *arg2 = (char *) 0 ;
7601 2 : void *argp1 = 0 ;
7602 2 : int res1 = 0 ;
7603 2 : int bToFree2 = 0 ;
7604 2 : PyObject *swig_obj[2] ;
7605 2 : int result;
7606 :
7607 2 : if (!SWIG_Python_UnpackTuple(args, "StyleTable_SaveStyleTable", 2, 2, swig_obj)) SWIG_fail;
7608 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7609 2 : if (!SWIG_IsOK(res1)) {
7610 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_SaveStyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7611 : }
7612 2 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7613 2 : {
7614 : /* %typemap(in) (const char *utf8_path) */
7615 2 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
7616 : {
7617 2 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
7618 : }
7619 : else
7620 : {
7621 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
7622 :
7623 : }
7624 2 : if (arg2 == NULL)
7625 : {
7626 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
7627 0 : SWIG_fail;
7628 : }
7629 : }
7630 2 : {
7631 2 : const int bLocalUseExceptions = GetUseExceptions();
7632 2 : if ( bLocalUseExceptions ) {
7633 2 : pushErrorHandler();
7634 : }
7635 2 : {
7636 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7637 2 : result = (int)OGRStyleTableShadow_SaveStyleTable(arg1,(char const *)arg2);
7638 2 : SWIG_PYTHON_THREAD_END_ALLOW;
7639 : }
7640 2 : if ( bLocalUseExceptions ) {
7641 2 : popErrorHandler();
7642 : }
7643 : #ifndef SED_HACKS
7644 : if ( bLocalUseExceptions ) {
7645 : CPLErr eclass = CPLGetLastErrorType();
7646 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7647 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7648 : }
7649 : }
7650 : #endif
7651 : }
7652 2 : resultobj = SWIG_From_int(static_cast< int >(result));
7653 2 : {
7654 : /* %typemap(freearg) (const char *utf8_path) */
7655 2 : GDALPythonFreeCStr(arg2, bToFree2);
7656 : }
7657 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7658 : return resultobj;
7659 0 : fail:
7660 0 : {
7661 : /* %typemap(freearg) (const char *utf8_path) */
7662 2 : GDALPythonFreeCStr(arg2, bToFree2);
7663 : }
7664 : return NULL;
7665 : }
7666 :
7667 :
7668 2 : SWIGINTERN PyObject *_wrap_StyleTable_Find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7669 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7670 2 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7671 2 : char *arg2 = (char *) 0 ;
7672 2 : void *argp1 = 0 ;
7673 2 : int res1 = 0 ;
7674 2 : int res2 ;
7675 2 : char *buf2 = 0 ;
7676 2 : int alloc2 = 0 ;
7677 2 : PyObject *swig_obj[2] ;
7678 2 : char *result = 0 ;
7679 :
7680 2 : if (!SWIG_Python_UnpackTuple(args, "StyleTable_Find", 2, 2, swig_obj)) SWIG_fail;
7681 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7682 2 : if (!SWIG_IsOK(res1)) {
7683 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_Find" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7684 : }
7685 2 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7686 2 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7687 2 : if (!SWIG_IsOK(res2)) {
7688 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StyleTable_Find" "', argument " "2"" of type '" "char const *""'");
7689 : }
7690 2 : arg2 = reinterpret_cast< char * >(buf2);
7691 2 : {
7692 2 : const int bLocalUseExceptions = GetUseExceptions();
7693 2 : if ( bLocalUseExceptions ) {
7694 2 : pushErrorHandler();
7695 : }
7696 2 : {
7697 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7698 2 : result = (char *)OGRStyleTableShadow_Find(arg1,(char const *)arg2);
7699 2 : SWIG_PYTHON_THREAD_END_ALLOW;
7700 : }
7701 2 : if ( bLocalUseExceptions ) {
7702 2 : popErrorHandler();
7703 : }
7704 : #ifndef SED_HACKS
7705 : if ( bLocalUseExceptions ) {
7706 : CPLErr eclass = CPLGetLastErrorType();
7707 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7708 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7709 : }
7710 : }
7711 : #endif
7712 : }
7713 2 : resultobj = SWIG_FromCharPtr((const char *)result);
7714 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7715 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7716 : return resultobj;
7717 0 : fail:
7718 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7719 : return NULL;
7720 : }
7721 :
7722 :
7723 1 : SWIGINTERN PyObject *_wrap_StyleTable_ResetStyleStringReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7724 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7725 1 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7726 1 : void *argp1 = 0 ;
7727 1 : int res1 = 0 ;
7728 1 : PyObject *swig_obj[1] ;
7729 :
7730 1 : if (!args) SWIG_fail;
7731 1 : swig_obj[0] = args;
7732 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7733 1 : if (!SWIG_IsOK(res1)) {
7734 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_ResetStyleStringReading" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7735 : }
7736 1 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7737 1 : {
7738 1 : const int bLocalUseExceptions = GetUseExceptions();
7739 1 : if ( bLocalUseExceptions ) {
7740 1 : pushErrorHandler();
7741 : }
7742 1 : {
7743 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7744 1 : OGRStyleTableShadow_ResetStyleStringReading(arg1);
7745 1 : SWIG_PYTHON_THREAD_END_ALLOW;
7746 : }
7747 1 : if ( bLocalUseExceptions ) {
7748 1 : popErrorHandler();
7749 : }
7750 : #ifndef SED_HACKS
7751 : if ( bLocalUseExceptions ) {
7752 : CPLErr eclass = CPLGetLastErrorType();
7753 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7754 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7755 : }
7756 : }
7757 : #endif
7758 : }
7759 1 : resultobj = SWIG_Py_Void();
7760 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7761 : return resultobj;
7762 : fail:
7763 : return NULL;
7764 : }
7765 :
7766 :
7767 5 : SWIGINTERN PyObject *_wrap_StyleTable_GetNextStyle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7768 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7769 5 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7770 5 : void *argp1 = 0 ;
7771 5 : int res1 = 0 ;
7772 5 : PyObject *swig_obj[1] ;
7773 5 : char *result = 0 ;
7774 :
7775 5 : if (!args) SWIG_fail;
7776 5 : swig_obj[0] = args;
7777 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7778 5 : if (!SWIG_IsOK(res1)) {
7779 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_GetNextStyle" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7780 : }
7781 5 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7782 5 : {
7783 5 : const int bLocalUseExceptions = GetUseExceptions();
7784 5 : if ( bLocalUseExceptions ) {
7785 5 : pushErrorHandler();
7786 : }
7787 5 : {
7788 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7789 5 : result = (char *)OGRStyleTableShadow_GetNextStyle(arg1);
7790 5 : SWIG_PYTHON_THREAD_END_ALLOW;
7791 : }
7792 5 : if ( bLocalUseExceptions ) {
7793 5 : popErrorHandler();
7794 : }
7795 : #ifndef SED_HACKS
7796 : if ( bLocalUseExceptions ) {
7797 : CPLErr eclass = CPLGetLastErrorType();
7798 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7799 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7800 : }
7801 : }
7802 : #endif
7803 : }
7804 5 : resultobj = SWIG_FromCharPtr((const char *)result);
7805 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7806 : return resultobj;
7807 : fail:
7808 : return NULL;
7809 : }
7810 :
7811 :
7812 1 : SWIGINTERN PyObject *_wrap_StyleTable_GetLastStyleName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7813 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7814 1 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7815 1 : void *argp1 = 0 ;
7816 1 : int res1 = 0 ;
7817 1 : PyObject *swig_obj[1] ;
7818 1 : char *result = 0 ;
7819 :
7820 1 : if (!args) SWIG_fail;
7821 1 : swig_obj[0] = args;
7822 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7823 1 : if (!SWIG_IsOK(res1)) {
7824 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_GetLastStyleName" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7825 : }
7826 1 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7827 1 : {
7828 1 : const int bLocalUseExceptions = GetUseExceptions();
7829 1 : if ( bLocalUseExceptions ) {
7830 1 : pushErrorHandler();
7831 : }
7832 1 : {
7833 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7834 1 : result = (char *)OGRStyleTableShadow_GetLastStyleName(arg1);
7835 1 : SWIG_PYTHON_THREAD_END_ALLOW;
7836 : }
7837 1 : if ( bLocalUseExceptions ) {
7838 1 : popErrorHandler();
7839 : }
7840 : #ifndef SED_HACKS
7841 : if ( bLocalUseExceptions ) {
7842 : CPLErr eclass = CPLGetLastErrorType();
7843 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7844 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7845 : }
7846 : }
7847 : #endif
7848 : }
7849 1 : resultobj = SWIG_FromCharPtr((const char *)result);
7850 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7851 : return resultobj;
7852 : fail:
7853 : return NULL;
7854 : }
7855 :
7856 :
7857 277 : SWIGINTERN PyObject *StyleTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7858 277 : PyObject *obj;
7859 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
7860 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRStyleTableShadow, SWIG_NewClientData(obj));
7861 277 : return SWIG_Py_Void();
7862 : }
7863 :
7864 4 : SWIGINTERN PyObject *StyleTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7865 4 : return SWIG_Python_InitShadowInstance(args);
7866 : }
7867 :
7868 4 : SWIGINTERN PyObject *_wrap_new_ArrowArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7869 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7870 4 : ArrowArray *result = 0 ;
7871 :
7872 4 : if (!SWIG_Python_UnpackTuple(args, "new_ArrowArray", 0, 0, 0)) SWIG_fail;
7873 4 : {
7874 4 : const int bLocalUseExceptions = GetUseExceptions();
7875 4 : if ( bLocalUseExceptions ) {
7876 4 : pushErrorHandler();
7877 : }
7878 4 : {
7879 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7880 4 : result = (ArrowArray *)new_ArrowArray();
7881 4 : SWIG_PYTHON_THREAD_END_ALLOW;
7882 : }
7883 4 : if ( bLocalUseExceptions ) {
7884 4 : popErrorHandler();
7885 : }
7886 : #ifndef SED_HACKS
7887 : if ( bLocalUseExceptions ) {
7888 : CPLErr eclass = CPLGetLastErrorType();
7889 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7890 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7891 : }
7892 : }
7893 : #endif
7894 : }
7895 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArray, SWIG_POINTER_NEW | 0 );
7896 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7897 : return resultobj;
7898 0 : fail:
7899 0 : return NULL;
7900 : }
7901 :
7902 :
7903 571 : SWIGINTERN PyObject *_wrap_delete_ArrowArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7904 571 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7905 571 : ArrowArray *arg1 = (ArrowArray *) 0 ;
7906 571 : void *argp1 = 0 ;
7907 571 : int res1 = 0 ;
7908 571 : PyObject *swig_obj[1] ;
7909 :
7910 571 : if (!args) SWIG_fail;
7911 571 : swig_obj[0] = args;
7912 571 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, SWIG_POINTER_DISOWN | 0 );
7913 571 : if (!SWIG_IsOK(res1)) {
7914 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowArray" "', argument " "1"" of type '" "ArrowArray *""'");
7915 : }
7916 571 : arg1 = reinterpret_cast< ArrowArray * >(argp1);
7917 571 : {
7918 571 : const int bLocalUseExceptions = GetUseExceptions();
7919 571 : if ( bLocalUseExceptions ) {
7920 251 : pushErrorHandler();
7921 : }
7922 571 : {
7923 571 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7924 571 : delete_ArrowArray(arg1);
7925 571 : SWIG_PYTHON_THREAD_END_ALLOW;
7926 : }
7927 571 : if ( bLocalUseExceptions ) {
7928 251 : popErrorHandler();
7929 : }
7930 : #ifndef SED_HACKS
7931 : if ( bLocalUseExceptions ) {
7932 : CPLErr eclass = CPLGetLastErrorType();
7933 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7934 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7935 : }
7936 : }
7937 : #endif
7938 : }
7939 571 : resultobj = SWIG_Py_Void();
7940 571 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7941 : return resultobj;
7942 : fail:
7943 : return NULL;
7944 : }
7945 :
7946 :
7947 527 : SWIGINTERN PyObject *_wrap_ArrowArray__getPtr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7948 527 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7949 527 : ArrowArray *arg1 = (ArrowArray *) 0 ;
7950 527 : void *argp1 = 0 ;
7951 527 : int res1 = 0 ;
7952 527 : PyObject *swig_obj[1] ;
7953 527 : VoidPtrAsLong result;
7954 :
7955 527 : if (!args) SWIG_fail;
7956 527 : swig_obj[0] = args;
7957 527 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 | 0 );
7958 527 : if (!SWIG_IsOK(res1)) {
7959 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray__getPtr" "', argument " "1"" of type '" "ArrowArray *""'");
7960 : }
7961 527 : arg1 = reinterpret_cast< ArrowArray * >(argp1);
7962 527 : {
7963 527 : const int bLocalUseExceptions = GetUseExceptions();
7964 527 : if ( bLocalUseExceptions ) {
7965 208 : pushErrorHandler();
7966 : }
7967 527 : {
7968 527 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7969 527 : result = (VoidPtrAsLong)ArrowArray__getPtr(arg1);
7970 527 : SWIG_PYTHON_THREAD_END_ALLOW;
7971 : }
7972 527 : if ( bLocalUseExceptions ) {
7973 208 : popErrorHandler();
7974 : }
7975 : #ifndef SED_HACKS
7976 : if ( bLocalUseExceptions ) {
7977 : CPLErr eclass = CPLGetLastErrorType();
7978 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7979 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7980 : }
7981 : }
7982 : #endif
7983 : }
7984 527 : {
7985 527 : resultobj = PyLong_FromVoidPtr(result);
7986 : }
7987 527 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7988 : return resultobj;
7989 : fail:
7990 : return NULL;
7991 : }
7992 :
7993 :
7994 1 : SWIGINTERN PyObject *_wrap_ArrowArray_GetChildrenCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7995 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7996 1 : ArrowArray *arg1 = (ArrowArray *) 0 ;
7997 1 : void *argp1 = 0 ;
7998 1 : int res1 = 0 ;
7999 1 : PyObject *swig_obj[1] ;
8000 1 : GIntBig result;
8001 :
8002 1 : if (!args) SWIG_fail;
8003 1 : swig_obj[0] = args;
8004 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 | 0 );
8005 1 : if (!SWIG_IsOK(res1)) {
8006 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray_GetChildrenCount" "', argument " "1"" of type '" "ArrowArray *""'");
8007 : }
8008 1 : arg1 = reinterpret_cast< ArrowArray * >(argp1);
8009 1 : {
8010 1 : const int bLocalUseExceptions = GetUseExceptions();
8011 1 : if ( bLocalUseExceptions ) {
8012 0 : pushErrorHandler();
8013 : }
8014 1 : {
8015 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8016 1 : result = ArrowArray_GetChildrenCount(arg1);
8017 1 : SWIG_PYTHON_THREAD_END_ALLOW;
8018 : }
8019 1 : if ( bLocalUseExceptions ) {
8020 0 : popErrorHandler();
8021 : }
8022 : #ifndef SED_HACKS
8023 : if ( bLocalUseExceptions ) {
8024 : CPLErr eclass = CPLGetLastErrorType();
8025 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8026 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8027 : }
8028 : }
8029 : #endif
8030 : }
8031 1 : {
8032 1 : resultobj = PyLong_FromLongLong(result);
8033 : }
8034 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8035 : return resultobj;
8036 : fail:
8037 : return NULL;
8038 : }
8039 :
8040 :
8041 0 : SWIGINTERN PyObject *_wrap_ArrowArray_GetLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8042 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8043 0 : ArrowArray *arg1 = (ArrowArray *) 0 ;
8044 0 : void *argp1 = 0 ;
8045 0 : int res1 = 0 ;
8046 0 : PyObject *swig_obj[1] ;
8047 0 : GIntBig result;
8048 :
8049 0 : if (!args) SWIG_fail;
8050 0 : swig_obj[0] = args;
8051 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 | 0 );
8052 0 : if (!SWIG_IsOK(res1)) {
8053 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray_GetLength" "', argument " "1"" of type '" "ArrowArray *""'");
8054 : }
8055 0 : arg1 = reinterpret_cast< ArrowArray * >(argp1);
8056 0 : {
8057 0 : const int bLocalUseExceptions = GetUseExceptions();
8058 0 : if ( bLocalUseExceptions ) {
8059 0 : pushErrorHandler();
8060 : }
8061 0 : {
8062 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8063 0 : result = ArrowArray_GetLength(arg1);
8064 0 : SWIG_PYTHON_THREAD_END_ALLOW;
8065 : }
8066 0 : if ( bLocalUseExceptions ) {
8067 0 : popErrorHandler();
8068 : }
8069 : #ifndef SED_HACKS
8070 : if ( bLocalUseExceptions ) {
8071 : CPLErr eclass = CPLGetLastErrorType();
8072 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8073 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8074 : }
8075 : }
8076 : #endif
8077 : }
8078 0 : {
8079 0 : resultobj = PyLong_FromLongLong(result);
8080 : }
8081 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8082 : return resultobj;
8083 : fail:
8084 : return NULL;
8085 : }
8086 :
8087 :
8088 277 : SWIGINTERN PyObject *ArrowArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8089 277 : PyObject *obj;
8090 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
8091 277 : SWIG_TypeNewClientData(SWIGTYPE_p_ArrowArray, SWIG_NewClientData(obj));
8092 277 : return SWIG_Py_Void();
8093 : }
8094 :
8095 4 : SWIGINTERN PyObject *ArrowArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8096 4 : return SWIG_Python_InitShadowInstance(args);
8097 : }
8098 :
8099 126 : SWIGINTERN PyObject *_wrap_new_ArrowSchema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8100 126 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8101 126 : ArrowSchema *result = 0 ;
8102 :
8103 126 : if (!SWIG_Python_UnpackTuple(args, "new_ArrowSchema", 0, 0, 0)) SWIG_fail;
8104 126 : {
8105 126 : const int bLocalUseExceptions = GetUseExceptions();
8106 126 : if ( bLocalUseExceptions ) {
8107 126 : pushErrorHandler();
8108 : }
8109 126 : {
8110 126 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8111 126 : result = (ArrowSchema *)new_ArrowSchema();
8112 126 : SWIG_PYTHON_THREAD_END_ALLOW;
8113 : }
8114 126 : if ( bLocalUseExceptions ) {
8115 126 : popErrorHandler();
8116 : }
8117 : #ifndef SED_HACKS
8118 : if ( bLocalUseExceptions ) {
8119 : CPLErr eclass = CPLGetLastErrorType();
8120 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8121 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8122 : }
8123 : }
8124 : #endif
8125 : }
8126 126 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, SWIG_POINTER_NEW | 0 );
8127 126 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8128 : return resultobj;
8129 0 : fail:
8130 0 : return NULL;
8131 : }
8132 :
8133 :
8134 508 : SWIGINTERN PyObject *_wrap_delete_ArrowSchema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8135 508 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8136 508 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8137 508 : void *argp1 = 0 ;
8138 508 : int res1 = 0 ;
8139 508 : PyObject *swig_obj[1] ;
8140 :
8141 508 : if (!args) SWIG_fail;
8142 508 : swig_obj[0] = args;
8143 508 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, SWIG_POINTER_DISOWN | 0 );
8144 508 : if (!SWIG_IsOK(res1)) {
8145 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowSchema" "', argument " "1"" of type '" "ArrowSchema *""'");
8146 : }
8147 508 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8148 508 : {
8149 508 : const int bLocalUseExceptions = GetUseExceptions();
8150 508 : if ( bLocalUseExceptions ) {
8151 389 : pushErrorHandler();
8152 : }
8153 508 : {
8154 508 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8155 508 : delete_ArrowSchema(arg1);
8156 508 : SWIG_PYTHON_THREAD_END_ALLOW;
8157 : }
8158 508 : if ( bLocalUseExceptions ) {
8159 389 : popErrorHandler();
8160 : }
8161 : #ifndef SED_HACKS
8162 : if ( bLocalUseExceptions ) {
8163 : CPLErr eclass = CPLGetLastErrorType();
8164 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8165 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8166 : }
8167 : }
8168 : #endif
8169 : }
8170 508 : resultobj = SWIG_Py_Void();
8171 508 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8172 : return resultobj;
8173 : fail:
8174 : return NULL;
8175 : }
8176 :
8177 :
8178 684 : SWIGINTERN PyObject *_wrap_ArrowSchema__getPtr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8179 684 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8180 684 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8181 684 : void *argp1 = 0 ;
8182 684 : int res1 = 0 ;
8183 684 : PyObject *swig_obj[1] ;
8184 684 : VoidPtrAsLong result;
8185 :
8186 684 : if (!args) SWIG_fail;
8187 684 : swig_obj[0] = args;
8188 684 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 | 0 );
8189 684 : if (!SWIG_IsOK(res1)) {
8190 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema__getPtr" "', argument " "1"" of type '" "ArrowSchema *""'");
8191 : }
8192 684 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8193 684 : {
8194 684 : const int bLocalUseExceptions = GetUseExceptions();
8195 684 : if ( bLocalUseExceptions ) {
8196 354 : pushErrorHandler();
8197 : }
8198 684 : {
8199 684 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8200 684 : result = (VoidPtrAsLong)ArrowSchema__getPtr(arg1);
8201 684 : SWIG_PYTHON_THREAD_END_ALLOW;
8202 : }
8203 684 : if ( bLocalUseExceptions ) {
8204 354 : popErrorHandler();
8205 : }
8206 : #ifndef SED_HACKS
8207 : if ( bLocalUseExceptions ) {
8208 : CPLErr eclass = CPLGetLastErrorType();
8209 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8210 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8211 : }
8212 : }
8213 : #endif
8214 : }
8215 684 : {
8216 684 : resultobj = PyLong_FromVoidPtr(result);
8217 : }
8218 684 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8219 : return resultobj;
8220 : fail:
8221 : return NULL;
8222 : }
8223 :
8224 :
8225 426 : SWIGINTERN PyObject *_wrap_ArrowSchema_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8226 426 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8227 426 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8228 426 : void *argp1 = 0 ;
8229 426 : int res1 = 0 ;
8230 426 : PyObject *swig_obj[1] ;
8231 426 : char *result = 0 ;
8232 :
8233 426 : if (!args) SWIG_fail;
8234 426 : swig_obj[0] = args;
8235 426 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 | 0 );
8236 426 : if (!SWIG_IsOK(res1)) {
8237 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetName" "', argument " "1"" of type '" "ArrowSchema *""'");
8238 : }
8239 426 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8240 426 : {
8241 426 : const int bLocalUseExceptions = GetUseExceptions();
8242 426 : if ( bLocalUseExceptions ) {
8243 426 : pushErrorHandler();
8244 : }
8245 426 : {
8246 426 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8247 426 : result = (char *)ArrowSchema_GetName(arg1);
8248 426 : SWIG_PYTHON_THREAD_END_ALLOW;
8249 : }
8250 426 : if ( bLocalUseExceptions ) {
8251 426 : popErrorHandler();
8252 : }
8253 : #ifndef SED_HACKS
8254 : if ( bLocalUseExceptions ) {
8255 : CPLErr eclass = CPLGetLastErrorType();
8256 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8257 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8258 : }
8259 : }
8260 : #endif
8261 : }
8262 426 : resultobj = SWIG_FromCharPtr((const char *)result);
8263 426 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8264 : return resultobj;
8265 : fail:
8266 : return NULL;
8267 : }
8268 :
8269 :
8270 26 : SWIGINTERN PyObject *_wrap_ArrowSchema_GetChildrenCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8271 26 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8272 26 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8273 26 : void *argp1 = 0 ;
8274 26 : int res1 = 0 ;
8275 26 : PyObject *swig_obj[1] ;
8276 26 : GIntBig result;
8277 :
8278 26 : if (!args) SWIG_fail;
8279 26 : swig_obj[0] = args;
8280 26 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 | 0 );
8281 26 : if (!SWIG_IsOK(res1)) {
8282 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetChildrenCount" "', argument " "1"" of type '" "ArrowSchema *""'");
8283 : }
8284 26 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8285 26 : {
8286 26 : const int bLocalUseExceptions = GetUseExceptions();
8287 26 : if ( bLocalUseExceptions ) {
8288 26 : pushErrorHandler();
8289 : }
8290 26 : {
8291 26 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8292 26 : result = ArrowSchema_GetChildrenCount(arg1);
8293 26 : SWIG_PYTHON_THREAD_END_ALLOW;
8294 : }
8295 26 : if ( bLocalUseExceptions ) {
8296 26 : popErrorHandler();
8297 : }
8298 : #ifndef SED_HACKS
8299 : if ( bLocalUseExceptions ) {
8300 : CPLErr eclass = CPLGetLastErrorType();
8301 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8302 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8303 : }
8304 : }
8305 : #endif
8306 : }
8307 26 : {
8308 26 : resultobj = PyLong_FromLongLong(result);
8309 : }
8310 26 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8311 : return resultobj;
8312 : fail:
8313 : return NULL;
8314 : }
8315 :
8316 :
8317 833 : SWIGINTERN PyObject *_wrap_ArrowSchema_GetChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8318 833 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8319 833 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8320 833 : int arg2 ;
8321 833 : void *argp1 = 0 ;
8322 833 : int res1 = 0 ;
8323 833 : int val2 ;
8324 833 : int ecode2 = 0 ;
8325 833 : PyObject *swig_obj[2] ;
8326 833 : ArrowSchema *result = 0 ;
8327 :
8328 833 : if (!SWIG_Python_UnpackTuple(args, "ArrowSchema_GetChild", 2, 2, swig_obj)) SWIG_fail;
8329 833 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 | 0 );
8330 833 : if (!SWIG_IsOK(res1)) {
8331 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetChild" "', argument " "1"" of type '" "ArrowSchema *""'");
8332 : }
8333 833 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8334 833 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8335 833 : if (!SWIG_IsOK(ecode2)) {
8336 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrowSchema_GetChild" "', argument " "2"" of type '" "int""'");
8337 : }
8338 833 : arg2 = static_cast< int >(val2);
8339 833 : {
8340 833 : const int bLocalUseExceptions = GetUseExceptions();
8341 833 : if ( bLocalUseExceptions ) {
8342 833 : pushErrorHandler();
8343 : }
8344 833 : {
8345 833 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8346 833 : result = (ArrowSchema *)ArrowSchema_GetChild(arg1,arg2);
8347 833 : SWIG_PYTHON_THREAD_END_ALLOW;
8348 : }
8349 833 : if ( bLocalUseExceptions ) {
8350 833 : popErrorHandler();
8351 : }
8352 : #ifndef SED_HACKS
8353 : if ( bLocalUseExceptions ) {
8354 : CPLErr eclass = CPLGetLastErrorType();
8355 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8356 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8357 : }
8358 : }
8359 : #endif
8360 : }
8361 833 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, 0 | 0 );
8362 833 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8363 : return resultobj;
8364 : fail:
8365 : return NULL;
8366 : }
8367 :
8368 :
8369 277 : SWIGINTERN PyObject *ArrowSchema_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8370 277 : PyObject *obj;
8371 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
8372 277 : SWIG_TypeNewClientData(SWIGTYPE_p_ArrowSchema, SWIG_NewClientData(obj));
8373 277 : return SWIG_Py_Void();
8374 : }
8375 :
8376 126 : SWIGINTERN PyObject *ArrowSchema_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8377 126 : return SWIG_Python_InitShadowInstance(args);
8378 : }
8379 :
8380 350 : SWIGINTERN PyObject *_wrap_delete_ArrowArrayStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8381 350 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8382 350 : ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
8383 350 : void *argp1 = 0 ;
8384 350 : int res1 = 0 ;
8385 350 : PyObject *swig_obj[1] ;
8386 :
8387 350 : if (!args) SWIG_fail;
8388 350 : swig_obj[0] = args;
8389 350 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, SWIG_POINTER_DISOWN | 0 );
8390 350 : if (!SWIG_IsOK(res1)) {
8391 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowArrayStream" "', argument " "1"" of type '" "ArrowArrayStream *""'");
8392 : }
8393 350 : arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
8394 350 : {
8395 350 : const int bLocalUseExceptions = GetUseExceptions();
8396 350 : if ( bLocalUseExceptions ) {
8397 250 : pushErrorHandler();
8398 : }
8399 350 : {
8400 350 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8401 350 : delete_ArrowArrayStream(arg1);
8402 350 : SWIG_PYTHON_THREAD_END_ALLOW;
8403 : }
8404 350 : if ( bLocalUseExceptions ) {
8405 250 : popErrorHandler();
8406 : }
8407 : #ifndef SED_HACKS
8408 : if ( bLocalUseExceptions ) {
8409 : CPLErr eclass = CPLGetLastErrorType();
8410 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8411 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8412 : }
8413 : }
8414 : #endif
8415 : }
8416 350 : resultobj = SWIG_Py_Void();
8417 350 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8418 : return resultobj;
8419 : fail:
8420 : return NULL;
8421 : }
8422 :
8423 :
8424 382 : SWIGINTERN PyObject *_wrap_ArrowArrayStream_GetSchema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8425 382 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8426 382 : ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
8427 382 : void *argp1 = 0 ;
8428 382 : int res1 = 0 ;
8429 382 : PyObject *swig_obj[1] ;
8430 382 : ArrowSchema *result = 0 ;
8431 :
8432 382 : if (!args) SWIG_fail;
8433 382 : swig_obj[0] = args;
8434 382 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, 0 | 0 );
8435 382 : if (!SWIG_IsOK(res1)) {
8436 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArrayStream_GetSchema" "', argument " "1"" of type '" "ArrowArrayStream *""'");
8437 : }
8438 382 : arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
8439 382 : {
8440 382 : const int bLocalUseExceptions = GetUseExceptions();
8441 382 : if ( bLocalUseExceptions ) {
8442 263 : pushErrorHandler();
8443 : }
8444 382 : {
8445 382 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8446 382 : result = (ArrowSchema *)ArrowArrayStream_GetSchema(arg1);
8447 382 : SWIG_PYTHON_THREAD_END_ALLOW;
8448 : }
8449 382 : if ( bLocalUseExceptions ) {
8450 263 : popErrorHandler();
8451 : }
8452 : #ifndef SED_HACKS
8453 : if ( bLocalUseExceptions ) {
8454 : CPLErr eclass = CPLGetLastErrorType();
8455 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8456 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8457 : }
8458 : }
8459 : #endif
8460 : }
8461 382 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, SWIG_POINTER_OWN | 0 );
8462 382 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8463 : return resultobj;
8464 : fail:
8465 : return NULL;
8466 : }
8467 :
8468 :
8469 888 : SWIGINTERN PyObject *_wrap_ArrowArrayStream_GetNextRecordBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8470 888 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8471 888 : ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
8472 888 : char **arg2 = (char **) NULL ;
8473 888 : void *argp1 = 0 ;
8474 888 : int res1 = 0 ;
8475 888 : PyObject *swig_obj[2] ;
8476 888 : ArrowArray *result = 0 ;
8477 :
8478 888 : if (!SWIG_Python_UnpackTuple(args, "ArrowArrayStream_GetNextRecordBatch", 1, 2, swig_obj)) SWIG_fail;
8479 888 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, 0 | 0 );
8480 888 : if (!SWIG_IsOK(res1)) {
8481 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArrayStream_GetNextRecordBatch" "', argument " "1"" of type '" "ArrowArrayStream *""'");
8482 : }
8483 888 : arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
8484 888 : if (swig_obj[1]) {
8485 0 : {
8486 : /* %typemap(in) char **dict */
8487 0 : arg2 = NULL;
8488 0 : if ( PySequence_Check( swig_obj[1] ) ) {
8489 0 : int bErr = FALSE;
8490 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
8491 0 : if ( bErr )
8492 : {
8493 0 : SWIG_fail;
8494 : }
8495 : }
8496 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
8497 0 : int bErr = FALSE;
8498 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
8499 0 : if ( bErr )
8500 : {
8501 0 : SWIG_fail;
8502 : }
8503 : }
8504 : else {
8505 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
8506 0 : SWIG_fail;
8507 : }
8508 : }
8509 : }
8510 888 : {
8511 888 : const int bLocalUseExceptions = GetUseExceptions();
8512 888 : if ( bLocalUseExceptions ) {
8513 478 : pushErrorHandler();
8514 : }
8515 888 : {
8516 888 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8517 888 : result = (ArrowArray *)ArrowArrayStream_GetNextRecordBatch(arg1,arg2);
8518 888 : SWIG_PYTHON_THREAD_END_ALLOW;
8519 : }
8520 888 : if ( bLocalUseExceptions ) {
8521 478 : popErrorHandler();
8522 : }
8523 : #ifndef SED_HACKS
8524 : if ( bLocalUseExceptions ) {
8525 : CPLErr eclass = CPLGetLastErrorType();
8526 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8527 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8528 : }
8529 : }
8530 : #endif
8531 : }
8532 888 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArray, SWIG_POINTER_OWN | 0 );
8533 888 : {
8534 : /* %typemap(freearg) char **dict */
8535 888 : CSLDestroy( arg2 );
8536 : }
8537 924 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8538 : return resultobj;
8539 0 : fail:
8540 0 : {
8541 : /* %typemap(freearg) char **dict */
8542 0 : CSLDestroy( arg2 );
8543 : }
8544 : return NULL;
8545 : }
8546 :
8547 :
8548 277 : SWIGINTERN PyObject *ArrowArrayStream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8549 277 : PyObject *obj;
8550 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
8551 277 : SWIG_TypeNewClientData(SWIGTYPE_p_ArrowArrayStream, SWIG_NewClientData(obj));
8552 277 : return SWIG_Py_Void();
8553 : }
8554 :
8555 264 : SWIGINTERN PyObject *_wrap_Layer_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8556 264 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8557 264 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8558 264 : void *argp1 = 0 ;
8559 264 : int res1 = 0 ;
8560 264 : PyObject *swig_obj[1] ;
8561 264 : GDALDatasetShadow *result = 0 ;
8562 :
8563 264 : if (!args) SWIG_fail;
8564 264 : swig_obj[0] = args;
8565 264 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8566 264 : if (!SWIG_IsOK(res1)) {
8567 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetDataset" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8568 : }
8569 264 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8570 264 : {
8571 264 : const int bLocalUseExceptions = GetUseExceptions();
8572 264 : if ( bLocalUseExceptions ) {
8573 124 : pushErrorHandler();
8574 : }
8575 264 : {
8576 264 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8577 264 : result = (GDALDatasetShadow *)OGRLayerShadow_GetDataset(arg1);
8578 264 : SWIG_PYTHON_THREAD_END_ALLOW;
8579 : }
8580 264 : if ( bLocalUseExceptions ) {
8581 124 : popErrorHandler();
8582 : }
8583 : #ifndef SED_HACKS
8584 : if ( bLocalUseExceptions ) {
8585 : CPLErr eclass = CPLGetLastErrorType();
8586 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8587 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8588 : }
8589 : }
8590 : #endif
8591 : }
8592 264 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 | 0 );
8593 264 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8594 : return resultobj;
8595 : fail:
8596 : return NULL;
8597 : }
8598 :
8599 :
8600 29 : SWIGINTERN PyObject *_wrap_Layer_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8601 29 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8602 29 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8603 29 : char *arg2 = (char *) 0 ;
8604 29 : void *argp1 = 0 ;
8605 29 : int res1 = 0 ;
8606 29 : int res2 ;
8607 29 : char *buf2 = 0 ;
8608 29 : int alloc2 = 0 ;
8609 29 : PyObject *swig_obj[2] ;
8610 29 : OGRErr result;
8611 :
8612 29 : if (!SWIG_Python_UnpackTuple(args, "Layer_Rename", 2, 2, swig_obj)) SWIG_fail;
8613 29 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8614 29 : if (!SWIG_IsOK(res1)) {
8615 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Rename" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8616 : }
8617 29 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8618 29 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8619 29 : if (!SWIG_IsOK(res2)) {
8620 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Rename" "', argument " "2"" of type '" "char const *""'");
8621 : }
8622 29 : arg2 = reinterpret_cast< char * >(buf2);
8623 29 : {
8624 29 : if (!arg2) {
8625 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8626 : }
8627 : }
8628 29 : {
8629 29 : const int bLocalUseExceptions = GetUseExceptions();
8630 29 : if ( bLocalUseExceptions ) {
8631 3 : pushErrorHandler();
8632 : }
8633 29 : {
8634 29 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8635 29 : result = (OGRErr)OGRLayerShadow_Rename(arg1,(char const *)arg2);
8636 29 : SWIG_PYTHON_THREAD_END_ALLOW;
8637 : }
8638 29 : if ( bLocalUseExceptions ) {
8639 3 : popErrorHandler();
8640 : }
8641 : #ifndef SED_HACKS
8642 : if ( bLocalUseExceptions ) {
8643 : CPLErr eclass = CPLGetLastErrorType();
8644 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8645 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8646 : }
8647 : }
8648 : #endif
8649 : }
8650 29 : {
8651 : /* %typemap(out) OGRErr */
8652 41 : if ( result != 0 && GetUseExceptions()) {
8653 0 : const char* pszMessage = CPLGetLastErrorMsg();
8654 0 : if( pszMessage[0] != '\0' )
8655 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8656 : else
8657 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8658 0 : SWIG_fail;
8659 : }
8660 : }
8661 29 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8662 29 : {
8663 : /* %typemap(ret) OGRErr */
8664 29 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8665 29 : resultobj = PyInt_FromLong( result );
8666 : }
8667 : }
8668 29 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8669 : return resultobj;
8670 0 : fail:
8671 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8672 : return NULL;
8673 : }
8674 :
8675 :
8676 0 : SWIGINTERN PyObject *_wrap_Layer_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8677 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8678 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8679 0 : void *argp1 = 0 ;
8680 0 : int res1 = 0 ;
8681 0 : PyObject *swig_obj[1] ;
8682 0 : int result;
8683 :
8684 0 : if (!args) SWIG_fail;
8685 0 : swig_obj[0] = args;
8686 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8687 0 : if (!SWIG_IsOK(res1)) {
8688 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetRefCount" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8689 : }
8690 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8691 0 : {
8692 0 : const int bLocalUseExceptions = GetUseExceptions();
8693 0 : if ( bLocalUseExceptions ) {
8694 0 : pushErrorHandler();
8695 : }
8696 0 : {
8697 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8698 0 : result = (int)OGRLayerShadow_GetRefCount(arg1);
8699 0 : SWIG_PYTHON_THREAD_END_ALLOW;
8700 : }
8701 0 : if ( bLocalUseExceptions ) {
8702 0 : popErrorHandler();
8703 : }
8704 : #ifndef SED_HACKS
8705 : if ( bLocalUseExceptions ) {
8706 : CPLErr eclass = CPLGetLastErrorType();
8707 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8708 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8709 : }
8710 : }
8711 : #endif
8712 : }
8713 0 : resultobj = SWIG_From_int(static_cast< int >(result));
8714 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8715 : return resultobj;
8716 : fail:
8717 : return NULL;
8718 : }
8719 :
8720 :
8721 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
8722 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8723 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8724 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
8725 : void *argp1 = 0 ;
8726 : int res1 = 0 ;
8727 : void *argp2 = 0 ;
8728 : int res2 = 0 ;
8729 :
8730 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
8731 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8732 : if (!SWIG_IsOK(res1)) {
8733 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8734 : }
8735 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8736 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
8737 : if (!SWIG_IsOK(res2)) {
8738 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
8739 : }
8740 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
8741 : {
8742 : const int bLocalUseExceptions = GetUseExceptions();
8743 : if ( bLocalUseExceptions ) {
8744 : pushErrorHandler();
8745 : }
8746 : {
8747 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8748 : OGRLayerShadow_SetSpatialFilter__SWIG_0(arg1,arg2);
8749 : SWIG_PYTHON_THREAD_END_ALLOW;
8750 : }
8751 : if ( bLocalUseExceptions ) {
8752 : popErrorHandler();
8753 : }
8754 : #ifndef SED_HACKS
8755 : if ( bLocalUseExceptions ) {
8756 : CPLErr eclass = CPLGetLastErrorType();
8757 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8758 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8759 : }
8760 : }
8761 : #endif
8762 : }
8763 : resultobj = SWIG_Py_Void();
8764 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8765 : return resultobj;
8766 : fail:
8767 : return NULL;
8768 : }
8769 :
8770 :
8771 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
8772 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8773 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8774 : double arg2 ;
8775 : double arg3 ;
8776 : double arg4 ;
8777 : double arg5 ;
8778 : void *argp1 = 0 ;
8779 : int res1 = 0 ;
8780 : double val2 ;
8781 : int ecode2 = 0 ;
8782 : double val3 ;
8783 : int ecode3 = 0 ;
8784 : double val4 ;
8785 : int ecode4 = 0 ;
8786 : double val5 ;
8787 : int ecode5 = 0 ;
8788 :
8789 : if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
8790 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8791 : if (!SWIG_IsOK(res1)) {
8792 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8793 : }
8794 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8795 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
8796 : if (!SWIG_IsOK(ecode2)) {
8797 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "double""'");
8798 : }
8799 : arg2 = static_cast< double >(val2);
8800 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8801 : if (!SWIG_IsOK(ecode3)) {
8802 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
8803 : }
8804 : arg3 = static_cast< double >(val3);
8805 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
8806 : if (!SWIG_IsOK(ecode4)) {
8807 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
8808 : }
8809 : arg4 = static_cast< double >(val4);
8810 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
8811 : if (!SWIG_IsOK(ecode5)) {
8812 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
8813 : }
8814 : arg5 = static_cast< double >(val5);
8815 : {
8816 : const int bLocalUseExceptions = GetUseExceptions();
8817 : if ( bLocalUseExceptions ) {
8818 : pushErrorHandler();
8819 : }
8820 : {
8821 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8822 : OGRLayerShadow_SetSpatialFilterRect__SWIG_0(arg1,arg2,arg3,arg4,arg5);
8823 : SWIG_PYTHON_THREAD_END_ALLOW;
8824 : }
8825 : if ( bLocalUseExceptions ) {
8826 : popErrorHandler();
8827 : }
8828 : #ifndef SED_HACKS
8829 : if ( bLocalUseExceptions ) {
8830 : CPLErr eclass = CPLGetLastErrorType();
8831 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8832 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8833 : }
8834 : }
8835 : #endif
8836 : }
8837 : resultobj = SWIG_Py_Void();
8838 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8839 : return resultobj;
8840 : fail:
8841 : return NULL;
8842 : }
8843 :
8844 :
8845 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
8846 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8847 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8848 : int arg2 ;
8849 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
8850 : void *argp1 = 0 ;
8851 : int res1 = 0 ;
8852 : int val2 ;
8853 : int ecode2 = 0 ;
8854 : void *argp3 = 0 ;
8855 : int res3 = 0 ;
8856 :
8857 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
8858 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8859 : if (!SWIG_IsOK(res1)) {
8860 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8861 : }
8862 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8863 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8864 : if (!SWIG_IsOK(ecode2)) {
8865 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "int""'");
8866 : }
8867 : arg2 = static_cast< int >(val2);
8868 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
8869 : if (!SWIG_IsOK(res3)) {
8870 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SetSpatialFilter" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
8871 : }
8872 : arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
8873 : {
8874 : const int bLocalUseExceptions = GetUseExceptions();
8875 : if ( bLocalUseExceptions ) {
8876 : pushErrorHandler();
8877 : }
8878 : {
8879 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8880 : OGRLayerShadow_SetSpatialFilter__SWIG_1(arg1,arg2,arg3);
8881 : SWIG_PYTHON_THREAD_END_ALLOW;
8882 : }
8883 : if ( bLocalUseExceptions ) {
8884 : popErrorHandler();
8885 : }
8886 : #ifndef SED_HACKS
8887 : if ( bLocalUseExceptions ) {
8888 : CPLErr eclass = CPLGetLastErrorType();
8889 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8890 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8891 : }
8892 : }
8893 : #endif
8894 : }
8895 : resultobj = SWIG_Py_Void();
8896 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8897 : return resultobj;
8898 : fail:
8899 : return NULL;
8900 : }
8901 :
8902 :
8903 659 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter(PyObject *self, PyObject *args) {
8904 659 : Py_ssize_t argc;
8905 659 : PyObject *argv[4] = {
8906 : 0
8907 : };
8908 :
8909 659 : if (!(argc = SWIG_Python_UnpackTuple(args, "Layer_SetSpatialFilter", 0, 3, argv))) SWIG_fail;
8910 659 : --argc;
8911 659 : if (argc == 2) {
8912 647 : int _v;
8913 647 : void *vptr = 0;
8914 647 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
8915 647 : _v = SWIG_CheckState(res);
8916 647 : if (_v) {
8917 647 : void *vptr = 0;
8918 647 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
8919 647 : _v = SWIG_CheckState(res);
8920 0 : if (_v) {
8921 647 : return _wrap_Layer_SetSpatialFilter__SWIG_0(self, argc, argv);
8922 : }
8923 : }
8924 : }
8925 12 : if (argc == 3) {
8926 12 : int _v;
8927 12 : void *vptr = 0;
8928 12 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
8929 12 : _v = SWIG_CheckState(res);
8930 12 : if (_v) {
8931 12 : {
8932 12 : int res = SWIG_AsVal_int(argv[1], NULL);
8933 12 : _v = SWIG_CheckState(res);
8934 : }
8935 12 : if (_v) {
8936 12 : void *vptr = 0;
8937 12 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
8938 12 : _v = SWIG_CheckState(res);
8939 0 : if (_v) {
8940 12 : return _wrap_Layer_SetSpatialFilter__SWIG_1(self, argc, argv);
8941 : }
8942 : }
8943 : }
8944 : }
8945 :
8946 0 : fail:
8947 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Layer_SetSpatialFilter'.\n"
8948 : " Possible C/C++ prototypes are:\n"
8949 : " OGRLayerShadow::SetSpatialFilter(OGRGeometryShadow *)\n"
8950 : " OGRLayerShadow::SetSpatialFilter(int,OGRGeometryShadow *)\n");
8951 : return 0;
8952 : }
8953 :
8954 :
8955 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
8956 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8957 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8958 : int arg2 ;
8959 : double arg3 ;
8960 : double arg4 ;
8961 : double arg5 ;
8962 : double arg6 ;
8963 : void *argp1 = 0 ;
8964 : int res1 = 0 ;
8965 : int val2 ;
8966 : int ecode2 = 0 ;
8967 : double val3 ;
8968 : int ecode3 = 0 ;
8969 : double val4 ;
8970 : int ecode4 = 0 ;
8971 : double val5 ;
8972 : int ecode5 = 0 ;
8973 : double val6 ;
8974 : int ecode6 = 0 ;
8975 :
8976 : if ((nobjs < 6) || (nobjs > 6)) SWIG_fail;
8977 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8978 : if (!SWIG_IsOK(res1)) {
8979 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8980 : }
8981 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8982 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8983 : if (!SWIG_IsOK(ecode2)) {
8984 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "int""'");
8985 : }
8986 : arg2 = static_cast< int >(val2);
8987 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8988 : if (!SWIG_IsOK(ecode3)) {
8989 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
8990 : }
8991 : arg3 = static_cast< double >(val3);
8992 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
8993 : if (!SWIG_IsOK(ecode4)) {
8994 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
8995 : }
8996 : arg4 = static_cast< double >(val4);
8997 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
8998 : if (!SWIG_IsOK(ecode5)) {
8999 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
9000 : }
9001 : arg5 = static_cast< double >(val5);
9002 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
9003 : if (!SWIG_IsOK(ecode6)) {
9004 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_SetSpatialFilterRect" "', argument " "6"" of type '" "double""'");
9005 : }
9006 : arg6 = static_cast< double >(val6);
9007 : {
9008 : const int bLocalUseExceptions = GetUseExceptions();
9009 : if ( bLocalUseExceptions ) {
9010 : pushErrorHandler();
9011 : }
9012 : {
9013 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9014 : OGRLayerShadow_SetSpatialFilterRect__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
9015 : SWIG_PYTHON_THREAD_END_ALLOW;
9016 : }
9017 : if ( bLocalUseExceptions ) {
9018 : popErrorHandler();
9019 : }
9020 : #ifndef SED_HACKS
9021 : if ( bLocalUseExceptions ) {
9022 : CPLErr eclass = CPLGetLastErrorType();
9023 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9024 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9025 : }
9026 : }
9027 : #endif
9028 : }
9029 : resultobj = SWIG_Py_Void();
9030 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9031 : return resultobj;
9032 : fail:
9033 : return NULL;
9034 : }
9035 :
9036 :
9037 47728 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect(PyObject *self, PyObject *args) {
9038 47728 : Py_ssize_t argc;
9039 47728 : PyObject *argv[7] = {
9040 : 0
9041 : };
9042 :
9043 47728 : if (!(argc = SWIG_Python_UnpackTuple(args, "Layer_SetSpatialFilterRect", 0, 6, argv))) SWIG_fail;
9044 47728 : --argc;
9045 47728 : if (argc == 5) {
9046 47713 : int _v;
9047 47713 : void *vptr = 0;
9048 47713 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
9049 47713 : _v = SWIG_CheckState(res);
9050 47713 : if (_v) {
9051 47713 : {
9052 47713 : int res = SWIG_AsVal_double(argv[1], NULL);
9053 47713 : _v = SWIG_CheckState(res);
9054 : }
9055 47713 : if (_v) {
9056 47713 : {
9057 47713 : int res = SWIG_AsVal_double(argv[2], NULL);
9058 47713 : _v = SWIG_CheckState(res);
9059 : }
9060 47713 : if (_v) {
9061 47713 : {
9062 47713 : int res = SWIG_AsVal_double(argv[3], NULL);
9063 47713 : _v = SWIG_CheckState(res);
9064 : }
9065 47713 : if (_v) {
9066 47713 : {
9067 47713 : int res = SWIG_AsVal_double(argv[4], NULL);
9068 47713 : _v = SWIG_CheckState(res);
9069 : }
9070 47713 : if (_v) {
9071 47713 : return _wrap_Layer_SetSpatialFilterRect__SWIG_0(self, argc, argv);
9072 : }
9073 : }
9074 : }
9075 : }
9076 : }
9077 : }
9078 15 : if (argc == 6) {
9079 15 : int _v;
9080 15 : void *vptr = 0;
9081 15 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
9082 15 : _v = SWIG_CheckState(res);
9083 15 : if (_v) {
9084 15 : {
9085 15 : int res = SWIG_AsVal_int(argv[1], NULL);
9086 15 : _v = SWIG_CheckState(res);
9087 : }
9088 15 : if (_v) {
9089 15 : {
9090 15 : int res = SWIG_AsVal_double(argv[2], NULL);
9091 15 : _v = SWIG_CheckState(res);
9092 : }
9093 15 : if (_v) {
9094 15 : {
9095 15 : int res = SWIG_AsVal_double(argv[3], NULL);
9096 15 : _v = SWIG_CheckState(res);
9097 : }
9098 15 : if (_v) {
9099 15 : {
9100 15 : int res = SWIG_AsVal_double(argv[4], NULL);
9101 15 : _v = SWIG_CheckState(res);
9102 : }
9103 15 : if (_v) {
9104 15 : {
9105 15 : int res = SWIG_AsVal_double(argv[5], NULL);
9106 15 : _v = SWIG_CheckState(res);
9107 : }
9108 15 : if (_v) {
9109 15 : return _wrap_Layer_SetSpatialFilterRect__SWIG_1(self, argc, argv);
9110 : }
9111 : }
9112 : }
9113 : }
9114 : }
9115 : }
9116 : }
9117 :
9118 0 : fail:
9119 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Layer_SetSpatialFilterRect'.\n"
9120 : " Possible C/C++ prototypes are:\n"
9121 : " OGRLayerShadow::SetSpatialFilterRect(double,double,double,double)\n"
9122 : " OGRLayerShadow::SetSpatialFilterRect(int,double,double,double,double)\n");
9123 : return 0;
9124 : }
9125 :
9126 :
9127 5 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9128 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9129 5 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9130 5 : void *argp1 = 0 ;
9131 5 : int res1 = 0 ;
9132 5 : PyObject *swig_obj[1] ;
9133 5 : OGRGeometryShadow *result = 0 ;
9134 :
9135 5 : if (!args) SWIG_fail;
9136 5 : swig_obj[0] = args;
9137 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9138 5 : if (!SWIG_IsOK(res1)) {
9139 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9140 : }
9141 5 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9142 5 : {
9143 5 : const int bLocalUseExceptions = GetUseExceptions();
9144 5 : if ( bLocalUseExceptions ) {
9145 1 : pushErrorHandler();
9146 : }
9147 5 : {
9148 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9149 5 : result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
9150 5 : SWIG_PYTHON_THREAD_END_ALLOW;
9151 : }
9152 5 : if ( bLocalUseExceptions ) {
9153 1 : popErrorHandler();
9154 : }
9155 : #ifndef SED_HACKS
9156 : if ( bLocalUseExceptions ) {
9157 : CPLErr eclass = CPLGetLastErrorType();
9158 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9159 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9160 : }
9161 : }
9162 : #endif
9163 : }
9164 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
9165 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9166 : return resultobj;
9167 : fail:
9168 : return NULL;
9169 : }
9170 :
9171 :
9172 1453 : SWIGINTERN PyObject *_wrap_Layer_SetAttributeFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9173 1453 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9174 1453 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9175 1453 : char *arg2 = (char *) 0 ;
9176 1453 : void *argp1 = 0 ;
9177 1453 : int res1 = 0 ;
9178 1453 : int res2 ;
9179 1453 : char *buf2 = 0 ;
9180 1453 : int alloc2 = 0 ;
9181 1453 : PyObject *swig_obj[2] ;
9182 1453 : OGRErr result;
9183 :
9184 1453 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetAttributeFilter", 2, 2, swig_obj)) SWIG_fail;
9185 1453 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9186 1453 : if (!SWIG_IsOK(res1)) {
9187 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetAttributeFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9188 : }
9189 1453 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9190 1453 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
9191 1453 : if (!SWIG_IsOK(res2)) {
9192 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetAttributeFilter" "', argument " "2"" of type '" "char *""'");
9193 : }
9194 1453 : arg2 = reinterpret_cast< char * >(buf2);
9195 1453 : {
9196 1453 : const int bLocalUseExceptions = GetUseExceptions();
9197 1453 : if ( bLocalUseExceptions ) {
9198 872 : pushErrorHandler();
9199 : }
9200 1453 : {
9201 1453 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9202 1453 : result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
9203 1453 : SWIG_PYTHON_THREAD_END_ALLOW;
9204 : }
9205 1453 : if ( bLocalUseExceptions ) {
9206 872 : popErrorHandler();
9207 : }
9208 : #ifndef SED_HACKS
9209 : if ( bLocalUseExceptions ) {
9210 : CPLErr eclass = CPLGetLastErrorType();
9211 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9212 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9213 : }
9214 : }
9215 : #endif
9216 : }
9217 1453 : {
9218 : /* %typemap(out) OGRErr */
9219 1489 : if ( result != 0 && GetUseExceptions()) {
9220 4 : const char* pszMessage = CPLGetLastErrorMsg();
9221 4 : if( pszMessage[0] != '\0' )
9222 4 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9223 : else
9224 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9225 4 : SWIG_fail;
9226 : }
9227 : }
9228 1449 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9229 1449 : {
9230 : /* %typemap(ret) OGRErr */
9231 1449 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9232 1449 : resultobj = PyInt_FromLong( result );
9233 : }
9234 : }
9235 1453 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9236 : return resultobj;
9237 4 : fail:
9238 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9239 : return NULL;
9240 : }
9241 :
9242 :
9243 17679 : SWIGINTERN PyObject *_wrap_Layer_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9244 17679 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9245 17679 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9246 17679 : void *argp1 = 0 ;
9247 17679 : int res1 = 0 ;
9248 17679 : PyObject *swig_obj[1] ;
9249 :
9250 17679 : if (!args) SWIG_fail;
9251 17679 : swig_obj[0] = args;
9252 17679 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9253 17679 : if (!SWIG_IsOK(res1)) {
9254 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ResetReading" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9255 : }
9256 17679 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9257 17679 : {
9258 17679 : const int bLocalUseExceptions = GetUseExceptions();
9259 17679 : if ( bLocalUseExceptions ) {
9260 13347 : pushErrorHandler();
9261 : }
9262 17679 : {
9263 17679 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9264 17679 : OGRLayerShadow_ResetReading(arg1);
9265 17679 : SWIG_PYTHON_THREAD_END_ALLOW;
9266 : }
9267 17679 : if ( bLocalUseExceptions ) {
9268 13347 : popErrorHandler();
9269 : }
9270 : #ifndef SED_HACKS
9271 : if ( bLocalUseExceptions ) {
9272 : CPLErr eclass = CPLGetLastErrorType();
9273 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9274 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9275 : }
9276 : }
9277 : #endif
9278 : }
9279 17679 : resultobj = SWIG_Py_Void();
9280 17679 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9281 : return resultobj;
9282 : fail:
9283 : return NULL;
9284 : }
9285 :
9286 :
9287 1265 : SWIGINTERN PyObject *_wrap_Layer_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9288 1265 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9289 1265 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9290 1265 : void *argp1 = 0 ;
9291 1265 : int res1 = 0 ;
9292 1265 : PyObject *swig_obj[1] ;
9293 1265 : char *result = 0 ;
9294 :
9295 1265 : if (!args) SWIG_fail;
9296 1265 : swig_obj[0] = args;
9297 1265 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9298 1265 : if (!SWIG_IsOK(res1)) {
9299 12 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetName" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9300 : }
9301 1259 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9302 1259 : {
9303 1259 : const int bLocalUseExceptions = GetUseExceptions();
9304 1259 : if ( bLocalUseExceptions ) {
9305 869 : pushErrorHandler();
9306 : }
9307 1259 : {
9308 1259 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9309 1259 : result = (char *)OGRLayerShadow_GetName(arg1);
9310 1259 : SWIG_PYTHON_THREAD_END_ALLOW;
9311 : }
9312 1259 : if ( bLocalUseExceptions ) {
9313 869 : popErrorHandler();
9314 : }
9315 : #ifndef SED_HACKS
9316 : if ( bLocalUseExceptions ) {
9317 : CPLErr eclass = CPLGetLastErrorType();
9318 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9319 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9320 : }
9321 : }
9322 : #endif
9323 : }
9324 1259 : resultobj = SWIG_FromCharPtr((const char *)result);
9325 1267 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9326 : return resultobj;
9327 : fail:
9328 : return NULL;
9329 : }
9330 :
9331 :
9332 1114 : SWIGINTERN PyObject *_wrap_Layer_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9333 1114 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9334 1114 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9335 1114 : void *argp1 = 0 ;
9336 1114 : int res1 = 0 ;
9337 1114 : PyObject *swig_obj[1] ;
9338 1114 : OGRwkbGeometryType result;
9339 :
9340 1114 : if (!args) SWIG_fail;
9341 1114 : swig_obj[0] = args;
9342 1114 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9343 1114 : if (!SWIG_IsOK(res1)) {
9344 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeomType" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9345 : }
9346 1114 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9347 1114 : {
9348 1114 : const int bLocalUseExceptions = GetUseExceptions();
9349 1114 : if ( bLocalUseExceptions ) {
9350 624 : pushErrorHandler();
9351 : }
9352 1114 : {
9353 1114 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9354 1114 : result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
9355 1114 : SWIG_PYTHON_THREAD_END_ALLOW;
9356 : }
9357 1114 : if ( bLocalUseExceptions ) {
9358 624 : popErrorHandler();
9359 : }
9360 : #ifndef SED_HACKS
9361 : if ( bLocalUseExceptions ) {
9362 : CPLErr eclass = CPLGetLastErrorType();
9363 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9364 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9365 : }
9366 : }
9367 : #endif
9368 : }
9369 1114 : resultobj = SWIG_From_int(static_cast< int >(result));
9370 1114 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9371 : return resultobj;
9372 : fail:
9373 : return NULL;
9374 : }
9375 :
9376 :
9377 690 : SWIGINTERN PyObject *_wrap_Layer_GetGeometryColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9378 690 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9379 690 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9380 690 : void *argp1 = 0 ;
9381 690 : int res1 = 0 ;
9382 690 : PyObject *swig_obj[1] ;
9383 690 : char *result = 0 ;
9384 :
9385 690 : if (!args) SWIG_fail;
9386 690 : swig_obj[0] = args;
9387 690 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9388 690 : if (!SWIG_IsOK(res1)) {
9389 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeometryColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9390 : }
9391 690 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9392 690 : {
9393 690 : const int bLocalUseExceptions = GetUseExceptions();
9394 690 : if ( bLocalUseExceptions ) {
9395 513 : pushErrorHandler();
9396 : }
9397 690 : {
9398 690 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9399 690 : result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
9400 690 : SWIG_PYTHON_THREAD_END_ALLOW;
9401 : }
9402 690 : if ( bLocalUseExceptions ) {
9403 513 : popErrorHandler();
9404 : }
9405 : #ifndef SED_HACKS
9406 : if ( bLocalUseExceptions ) {
9407 : CPLErr eclass = CPLGetLastErrorType();
9408 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9409 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9410 : }
9411 : }
9412 : #endif
9413 : }
9414 690 : resultobj = SWIG_FromCharPtr((const char *)result);
9415 690 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9416 : return resultobj;
9417 : fail:
9418 : return NULL;
9419 : }
9420 :
9421 :
9422 386 : SWIGINTERN PyObject *_wrap_Layer_GetFIDColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9423 386 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9424 386 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9425 386 : void *argp1 = 0 ;
9426 386 : int res1 = 0 ;
9427 386 : PyObject *swig_obj[1] ;
9428 386 : char *result = 0 ;
9429 :
9430 386 : if (!args) SWIG_fail;
9431 386 : swig_obj[0] = args;
9432 386 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9433 386 : if (!SWIG_IsOK(res1)) {
9434 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFIDColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9435 : }
9436 386 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9437 386 : {
9438 386 : const int bLocalUseExceptions = GetUseExceptions();
9439 386 : if ( bLocalUseExceptions ) {
9440 124 : pushErrorHandler();
9441 : }
9442 386 : {
9443 386 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9444 386 : result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
9445 386 : SWIG_PYTHON_THREAD_END_ALLOW;
9446 : }
9447 386 : if ( bLocalUseExceptions ) {
9448 124 : popErrorHandler();
9449 : }
9450 : #ifndef SED_HACKS
9451 : if ( bLocalUseExceptions ) {
9452 : CPLErr eclass = CPLGetLastErrorType();
9453 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9454 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9455 : }
9456 : }
9457 : #endif
9458 : }
9459 386 : resultobj = SWIG_FromCharPtr((const char *)result);
9460 386 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9461 : return resultobj;
9462 : fail:
9463 : return NULL;
9464 : }
9465 :
9466 :
9467 2538 : SWIGINTERN PyObject *_wrap_Layer_GetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9468 2538 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9469 2538 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9470 2538 : GIntBig arg2 ;
9471 2538 : void *argp1 = 0 ;
9472 2538 : int res1 = 0 ;
9473 2538 : PyObject *swig_obj[2] ;
9474 2538 : OGRFeatureShadow *result = 0 ;
9475 :
9476 2538 : if (!SWIG_Python_UnpackTuple(args, "Layer_GetFeature", 2, 2, swig_obj)) SWIG_fail;
9477 2538 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9478 2538 : if (!SWIG_IsOK(res1)) {
9479 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9480 : }
9481 2538 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9482 2538 : {
9483 2538 : arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
9484 : }
9485 2538 : {
9486 2538 : const int bLocalUseExceptions = GetUseExceptions();
9487 2538 : if ( bLocalUseExceptions ) {
9488 2101 : pushErrorHandler();
9489 : }
9490 2538 : {
9491 2538 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9492 2538 : result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
9493 2538 : SWIG_PYTHON_THREAD_END_ALLOW;
9494 : }
9495 2538 : if ( bLocalUseExceptions ) {
9496 2101 : popErrorHandler();
9497 : }
9498 : #ifndef SED_HACKS
9499 : if ( bLocalUseExceptions ) {
9500 : CPLErr eclass = CPLGetLastErrorType();
9501 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9502 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9503 : }
9504 : }
9505 : #endif
9506 : }
9507 2538 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
9508 2548 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9509 : return resultobj;
9510 : fail:
9511 : return NULL;
9512 : }
9513 :
9514 :
9515 80315 : SWIGINTERN PyObject *_wrap_Layer_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9516 80315 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9517 80315 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9518 80315 : void *argp1 = 0 ;
9519 80315 : int res1 = 0 ;
9520 80315 : PyObject *swig_obj[1] ;
9521 80315 : OGRFeatureShadow *result = 0 ;
9522 :
9523 80315 : if (!args) SWIG_fail;
9524 80315 : swig_obj[0] = args;
9525 80315 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9526 80315 : if (!SWIG_IsOK(res1)) {
9527 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetNextFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9528 : }
9529 80315 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9530 80315 : {
9531 80315 : const int bLocalUseExceptions = GetUseExceptions();
9532 80315 : if ( bLocalUseExceptions ) {
9533 50592 : pushErrorHandler();
9534 : }
9535 80315 : {
9536 80315 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9537 80315 : result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
9538 80315 : SWIG_PYTHON_THREAD_END_ALLOW;
9539 : }
9540 80315 : if ( bLocalUseExceptions ) {
9541 50592 : popErrorHandler();
9542 : }
9543 : #ifndef SED_HACKS
9544 : if ( bLocalUseExceptions ) {
9545 : CPLErr eclass = CPLGetLastErrorType();
9546 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9547 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9548 : }
9549 : }
9550 : #endif
9551 : }
9552 80315 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
9553 80357 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9554 : return resultobj;
9555 : fail:
9556 : return NULL;
9557 : }
9558 :
9559 :
9560 41 : SWIGINTERN PyObject *_wrap_Layer_SetNextByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9561 41 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9562 41 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9563 41 : GIntBig arg2 ;
9564 41 : void *argp1 = 0 ;
9565 41 : int res1 = 0 ;
9566 41 : PyObject *swig_obj[2] ;
9567 41 : OGRErr result;
9568 :
9569 41 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetNextByIndex", 2, 2, swig_obj)) SWIG_fail;
9570 41 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9571 41 : if (!SWIG_IsOK(res1)) {
9572 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetNextByIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9573 : }
9574 41 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9575 41 : {
9576 41 : arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
9577 : }
9578 41 : {
9579 41 : const int bLocalUseExceptions = GetUseExceptions();
9580 41 : if ( bLocalUseExceptions ) {
9581 0 : pushErrorHandler();
9582 : }
9583 41 : {
9584 41 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9585 41 : result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
9586 41 : SWIG_PYTHON_THREAD_END_ALLOW;
9587 : }
9588 41 : if ( bLocalUseExceptions ) {
9589 0 : popErrorHandler();
9590 : }
9591 : #ifndef SED_HACKS
9592 : if ( bLocalUseExceptions ) {
9593 : CPLErr eclass = CPLGetLastErrorType();
9594 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9595 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9596 : }
9597 : }
9598 : #endif
9599 : }
9600 41 : {
9601 : /* %typemap(out) OGRErr */
9602 51 : if ( result != 0 && GetUseExceptions()) {
9603 0 : const char* pszMessage = CPLGetLastErrorMsg();
9604 0 : if( pszMessage[0] != '\0' )
9605 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9606 : else
9607 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9608 0 : SWIG_fail;
9609 : }
9610 : }
9611 41 : {
9612 : /* %typemap(ret) OGRErr */
9613 41 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9614 41 : resultobj = PyInt_FromLong( result );
9615 : }
9616 : }
9617 41 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9618 : return resultobj;
9619 : fail:
9620 : return NULL;
9621 : }
9622 :
9623 :
9624 2478 : SWIGINTERN PyObject *_wrap_Layer_SetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9625 2478 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9626 2478 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9627 2478 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9628 2478 : void *argp1 = 0 ;
9629 2478 : int res1 = 0 ;
9630 2478 : void *argp2 = 0 ;
9631 2478 : int res2 = 0 ;
9632 2478 : PyObject *swig_obj[2] ;
9633 2478 : OGRErr result;
9634 :
9635 2478 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetFeature", 2, 2, swig_obj)) SWIG_fail;
9636 2478 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9637 2478 : if (!SWIG_IsOK(res1)) {
9638 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9639 : }
9640 2478 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9641 2478 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9642 2478 : if (!SWIG_IsOK(res2)) {
9643 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9644 : }
9645 2478 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9646 2478 : {
9647 2478 : if (!arg2) {
9648 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9649 : }
9650 : }
9651 2478 : {
9652 2478 : const int bLocalUseExceptions = GetUseExceptions();
9653 2478 : if ( bLocalUseExceptions ) {
9654 24 : pushErrorHandler();
9655 : }
9656 2478 : {
9657 2478 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9658 2478 : result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
9659 2478 : SWIG_PYTHON_THREAD_END_ALLOW;
9660 : }
9661 2478 : if ( bLocalUseExceptions ) {
9662 24 : popErrorHandler();
9663 : }
9664 : #ifndef SED_HACKS
9665 : if ( bLocalUseExceptions ) {
9666 : CPLErr eclass = CPLGetLastErrorType();
9667 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9668 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9669 : }
9670 : }
9671 : #endif
9672 : }
9673 2478 : {
9674 : /* %typemap(out) OGRErr */
9675 2532 : if ( result != 0 && GetUseExceptions()) {
9676 3 : const char* pszMessage = CPLGetLastErrorMsg();
9677 3 : if( pszMessage[0] != '\0' )
9678 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9679 : else
9680 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9681 3 : SWIG_fail;
9682 : }
9683 : }
9684 2475 : {
9685 : /* %typemap(ret) OGRErr */
9686 2475 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9687 2475 : resultobj = PyInt_FromLong( result );
9688 : }
9689 : }
9690 2478 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9691 : return resultobj;
9692 : fail:
9693 : return NULL;
9694 : }
9695 :
9696 :
9697 282556 : SWIGINTERN PyObject *_wrap_Layer_CreateFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9698 282556 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9699 282556 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9700 282556 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9701 282556 : void *argp1 = 0 ;
9702 282556 : int res1 = 0 ;
9703 282556 : void *argp2 = 0 ;
9704 282556 : int res2 = 0 ;
9705 282556 : PyObject *swig_obj[2] ;
9706 282556 : OGRErr result;
9707 :
9708 282556 : if (!SWIG_Python_UnpackTuple(args, "Layer_CreateFeature", 2, 2, swig_obj)) SWIG_fail;
9709 282556 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9710 282556 : if (!SWIG_IsOK(res1)) {
9711 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9712 : }
9713 282556 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9714 282556 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9715 282556 : if (!SWIG_IsOK(res2)) {
9716 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9717 : }
9718 282556 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9719 282556 : {
9720 282556 : if (!arg2) {
9721 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9722 : }
9723 : }
9724 282556 : {
9725 282556 : const int bLocalUseExceptions = GetUseExceptions();
9726 282556 : if ( bLocalUseExceptions ) {
9727 222082 : pushErrorHandler();
9728 : }
9729 282556 : {
9730 282556 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9731 282556 : result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
9732 282556 : SWIG_PYTHON_THREAD_END_ALLOW;
9733 : }
9734 282556 : if ( bLocalUseExceptions ) {
9735 222082 : popErrorHandler();
9736 : }
9737 : #ifndef SED_HACKS
9738 : if ( bLocalUseExceptions ) {
9739 : CPLErr eclass = CPLGetLastErrorType();
9740 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9741 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9742 : }
9743 : }
9744 : #endif
9745 : }
9746 282556 : {
9747 : /* %typemap(out) OGRErr */
9748 282713 : if ( result != 0 && GetUseExceptions()) {
9749 29 : const char* pszMessage = CPLGetLastErrorMsg();
9750 29 : if( pszMessage[0] != '\0' )
9751 29 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9752 : else
9753 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9754 29 : SWIG_fail;
9755 : }
9756 : }
9757 282527 : {
9758 : /* %typemap(ret) OGRErr */
9759 282527 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9760 282527 : resultobj = PyInt_FromLong( result );
9761 : }
9762 : }
9763 282556 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9764 : return resultobj;
9765 : fail:
9766 : return NULL;
9767 : }
9768 :
9769 :
9770 31 : SWIGINTERN PyObject *_wrap_Layer_UpsertFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9771 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9772 31 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9773 31 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9774 31 : void *argp1 = 0 ;
9775 31 : int res1 = 0 ;
9776 31 : void *argp2 = 0 ;
9777 31 : int res2 = 0 ;
9778 31 : PyObject *swig_obj[2] ;
9779 31 : OGRErr result;
9780 :
9781 31 : if (!SWIG_Python_UnpackTuple(args, "Layer_UpsertFeature", 2, 2, swig_obj)) SWIG_fail;
9782 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9783 31 : if (!SWIG_IsOK(res1)) {
9784 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_UpsertFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9785 : }
9786 31 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9787 31 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9788 31 : if (!SWIG_IsOK(res2)) {
9789 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_UpsertFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9790 : }
9791 31 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9792 31 : {
9793 31 : if (!arg2) {
9794 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9795 : }
9796 : }
9797 31 : {
9798 31 : const int bLocalUseExceptions = GetUseExceptions();
9799 31 : if ( bLocalUseExceptions ) {
9800 0 : pushErrorHandler();
9801 : }
9802 31 : {
9803 31 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9804 31 : result = (OGRErr)OGRLayerShadow_UpsertFeature(arg1,arg2);
9805 31 : SWIG_PYTHON_THREAD_END_ALLOW;
9806 : }
9807 31 : if ( bLocalUseExceptions ) {
9808 0 : popErrorHandler();
9809 : }
9810 : #ifndef SED_HACKS
9811 : if ( bLocalUseExceptions ) {
9812 : CPLErr eclass = CPLGetLastErrorType();
9813 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9814 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9815 : }
9816 : }
9817 : #endif
9818 : }
9819 31 : {
9820 : /* %typemap(out) OGRErr */
9821 32 : if ( result != 0 && GetUseExceptions()) {
9822 0 : const char* pszMessage = CPLGetLastErrorMsg();
9823 0 : if( pszMessage[0] != '\0' )
9824 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9825 : else
9826 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9827 0 : SWIG_fail;
9828 : }
9829 : }
9830 31 : {
9831 : /* %typemap(ret) OGRErr */
9832 31 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9833 31 : resultobj = PyInt_FromLong( result );
9834 : }
9835 : }
9836 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9837 : return resultobj;
9838 : fail:
9839 : return NULL;
9840 : }
9841 :
9842 :
9843 31 : SWIGINTERN PyObject *_wrap_Layer_UpdateFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9844 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9845 31 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9846 31 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9847 31 : int arg3 ;
9848 31 : int *arg4 = (int *) 0 ;
9849 31 : int arg5 ;
9850 31 : int *arg6 = (int *) 0 ;
9851 31 : bool arg7 ;
9852 31 : void *argp1 = 0 ;
9853 31 : int res1 = 0 ;
9854 31 : void *argp2 = 0 ;
9855 31 : int res2 = 0 ;
9856 31 : bool val7 ;
9857 31 : int ecode7 = 0 ;
9858 31 : PyObject *swig_obj[5] ;
9859 31 : OGRErr result;
9860 :
9861 31 : if (!SWIG_Python_UnpackTuple(args, "Layer_UpdateFeature", 5, 5, swig_obj)) SWIG_fail;
9862 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9863 31 : if (!SWIG_IsOK(res1)) {
9864 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_UpdateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9865 : }
9866 31 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9867 31 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9868 31 : if (!SWIG_IsOK(res2)) {
9869 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_UpdateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9870 : }
9871 31 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9872 31 : {
9873 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
9874 31 : arg4 = CreateCIntListFromSequence(swig_obj[2], &arg3);
9875 31 : if( arg3 < 0 ) {
9876 0 : SWIG_fail;
9877 : }
9878 : }
9879 31 : {
9880 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
9881 31 : arg6 = CreateCIntListFromSequence(swig_obj[3], &arg5);
9882 31 : if( arg5 < 0 ) {
9883 0 : SWIG_fail;
9884 : }
9885 : }
9886 31 : ecode7 = SWIG_AsVal_bool(swig_obj[4], &val7);
9887 31 : if (!SWIG_IsOK(ecode7)) {
9888 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Layer_UpdateFeature" "', argument " "7"" of type '" "bool""'");
9889 : }
9890 31 : arg7 = static_cast< bool >(val7);
9891 31 : {
9892 31 : if (!arg2) {
9893 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9894 : }
9895 : }
9896 31 : {
9897 31 : const int bLocalUseExceptions = GetUseExceptions();
9898 31 : if ( bLocalUseExceptions ) {
9899 4 : pushErrorHandler();
9900 : }
9901 31 : {
9902 31 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9903 31 : result = (OGRErr)OGRLayerShadow_UpdateFeature(arg1,arg2,arg3,(int const *)arg4,arg5,(int const *)arg6,arg7);
9904 31 : SWIG_PYTHON_THREAD_END_ALLOW;
9905 : }
9906 31 : if ( bLocalUseExceptions ) {
9907 4 : popErrorHandler();
9908 : }
9909 : #ifndef SED_HACKS
9910 : if ( bLocalUseExceptions ) {
9911 : CPLErr eclass = CPLGetLastErrorType();
9912 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9913 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9914 : }
9915 : }
9916 : #endif
9917 : }
9918 31 : {
9919 : /* %typemap(out) OGRErr */
9920 43 : if ( result != 0 && GetUseExceptions()) {
9921 0 : const char* pszMessage = CPLGetLastErrorMsg();
9922 0 : if( pszMessage[0] != '\0' )
9923 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9924 : else
9925 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9926 0 : SWIG_fail;
9927 : }
9928 : }
9929 31 : {
9930 : /* %typemap(freearg) (int nList, int* pList) */
9931 31 : free(arg4);
9932 : }
9933 31 : {
9934 : /* %typemap(freearg) (int nList, int* pList) */
9935 31 : free(arg6);
9936 : }
9937 31 : {
9938 : /* %typemap(ret) OGRErr */
9939 31 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9940 31 : resultobj = PyInt_FromLong( result );
9941 : }
9942 : }
9943 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9944 : return resultobj;
9945 0 : fail:
9946 0 : {
9947 : /* %typemap(freearg) (int nList, int* pList) */
9948 0 : free(arg4);
9949 : }
9950 0 : {
9951 : /* %typemap(freearg) (int nList, int* pList) */
9952 0 : free(arg6);
9953 : }
9954 0 : return NULL;
9955 : }
9956 :
9957 :
9958 3355 : SWIGINTERN PyObject *_wrap_Layer_DeleteFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9959 3355 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9960 3355 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9961 3355 : GIntBig arg2 ;
9962 3355 : void *argp1 = 0 ;
9963 3355 : int res1 = 0 ;
9964 3355 : PyObject *swig_obj[2] ;
9965 3355 : OGRErr result;
9966 :
9967 3355 : if (!SWIG_Python_UnpackTuple(args, "Layer_DeleteFeature", 2, 2, swig_obj)) SWIG_fail;
9968 3355 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9969 3355 : if (!SWIG_IsOK(res1)) {
9970 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9971 : }
9972 3355 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9973 3355 : {
9974 3355 : arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
9975 : }
9976 3355 : {
9977 3355 : const int bLocalUseExceptions = GetUseExceptions();
9978 3355 : if ( bLocalUseExceptions ) {
9979 36 : pushErrorHandler();
9980 : }
9981 3355 : {
9982 3355 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9983 3355 : result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
9984 3355 : SWIG_PYTHON_THREAD_END_ALLOW;
9985 : }
9986 3355 : if ( bLocalUseExceptions ) {
9987 36 : popErrorHandler();
9988 : }
9989 : #ifndef SED_HACKS
9990 : if ( bLocalUseExceptions ) {
9991 : CPLErr eclass = CPLGetLastErrorType();
9992 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9993 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9994 : }
9995 : }
9996 : #endif
9997 : }
9998 3355 : {
9999 : /* %typemap(out) OGRErr */
10000 3403 : if ( result != 0 && GetUseExceptions()) {
10001 7 : const char* pszMessage = CPLGetLastErrorMsg();
10002 7 : if( pszMessage[0] != '\0' )
10003 2 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10004 : else
10005 5 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10006 7 : SWIG_fail;
10007 : }
10008 : }
10009 3348 : {
10010 : /* %typemap(ret) OGRErr */
10011 3348 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10012 3348 : resultobj = PyInt_FromLong( result );
10013 : }
10014 : }
10015 3355 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10016 : return resultobj;
10017 : fail:
10018 : return NULL;
10019 : }
10020 :
10021 :
10022 251 : SWIGINTERN PyObject *_wrap_Layer_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10023 251 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10024 251 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10025 251 : void *argp1 = 0 ;
10026 251 : int res1 = 0 ;
10027 251 : PyObject *swig_obj[1] ;
10028 251 : OGRErr result;
10029 :
10030 251 : if (!args) SWIG_fail;
10031 251 : swig_obj[0] = args;
10032 251 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10033 251 : if (!SWIG_IsOK(res1)) {
10034 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SyncToDisk" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10035 : }
10036 251 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10037 251 : {
10038 251 : const int bLocalUseExceptions = GetUseExceptions();
10039 251 : if ( bLocalUseExceptions ) {
10040 19 : pushErrorHandler();
10041 : }
10042 251 : {
10043 251 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10044 251 : result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
10045 251 : SWIG_PYTHON_THREAD_END_ALLOW;
10046 : }
10047 251 : if ( bLocalUseExceptions ) {
10048 19 : popErrorHandler();
10049 : }
10050 : #ifndef SED_HACKS
10051 : if ( bLocalUseExceptions ) {
10052 : CPLErr eclass = CPLGetLastErrorType();
10053 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10054 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10055 : }
10056 : }
10057 : #endif
10058 : }
10059 251 : {
10060 : /* %typemap(out) OGRErr */
10061 253 : if ( result != 0 && GetUseExceptions()) {
10062 0 : const char* pszMessage = CPLGetLastErrorMsg();
10063 0 : if( pszMessage[0] != '\0' )
10064 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10065 : else
10066 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10067 0 : SWIG_fail;
10068 : }
10069 : }
10070 251 : {
10071 : /* %typemap(ret) OGRErr */
10072 251 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10073 251 : resultobj = PyInt_FromLong( result );
10074 : }
10075 : }
10076 251 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10077 : return resultobj;
10078 : fail:
10079 : return NULL;
10080 : }
10081 :
10082 :
10083 127446 : SWIGINTERN PyObject *_wrap_Layer_GetLayerDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10084 127446 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10085 127446 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10086 127446 : void *argp1 = 0 ;
10087 127446 : int res1 = 0 ;
10088 127446 : PyObject *swig_obj[1] ;
10089 127446 : OGRFeatureDefnShadow *result = 0 ;
10090 :
10091 127446 : if (!args) SWIG_fail;
10092 127446 : swig_obj[0] = args;
10093 127446 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10094 127446 : if (!SWIG_IsOK(res1)) {
10095 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetLayerDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10096 : }
10097 127446 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10098 127446 : {
10099 127446 : const int bLocalUseExceptions = GetUseExceptions();
10100 127446 : if ( bLocalUseExceptions ) {
10101 65106 : pushErrorHandler();
10102 : }
10103 127446 : {
10104 127446 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10105 127446 : result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
10106 127446 : SWIG_PYTHON_THREAD_END_ALLOW;
10107 : }
10108 127446 : if ( bLocalUseExceptions ) {
10109 65106 : 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 127446 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_OWN | 0 );
10121 127454 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10122 : return resultobj;
10123 : fail:
10124 : return NULL;
10125 : }
10126 :
10127 :
10128 36900 : SWIGINTERN PyObject *_wrap_Layer_GetFeatureCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10129 36900 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10130 36900 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10131 36900 : int arg2 = (int) 1 ;
10132 36900 : void *argp1 = 0 ;
10133 36900 : int res1 = 0 ;
10134 36900 : int val2 ;
10135 36900 : int ecode2 = 0 ;
10136 36900 : PyObject * obj0 = 0 ;
10137 36900 : PyObject * obj1 = 0 ;
10138 36900 : char * kwnames[] = {
10139 : (char *)"self", (char *)"force", NULL
10140 : };
10141 36900 : GIntBig result;
10142 :
10143 36900 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Layer_GetFeatureCount", kwnames, &obj0, &obj1)) SWIG_fail;
10144 36900 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10145 36900 : if (!SWIG_IsOK(res1)) {
10146 16 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeatureCount" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10147 : }
10148 36892 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10149 36892 : if (obj1) {
10150 54 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10151 54 : if (!SWIG_IsOK(ecode2)) {
10152 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeatureCount" "', argument " "2"" of type '" "int""'");
10153 : }
10154 : arg2 = static_cast< int >(val2);
10155 : }
10156 36892 : {
10157 36892 : const int bLocalUseExceptions = GetUseExceptions();
10158 36892 : if ( bLocalUseExceptions ) {
10159 2858 : pushErrorHandler();
10160 : }
10161 36892 : {
10162 36892 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10163 36892 : result = OGRLayerShadow_GetFeatureCount(arg1,arg2);
10164 36892 : SWIG_PYTHON_THREAD_END_ALLOW;
10165 : }
10166 36892 : if ( bLocalUseExceptions ) {
10167 2858 : popErrorHandler();
10168 : }
10169 : #ifndef SED_HACKS
10170 : if ( bLocalUseExceptions ) {
10171 : CPLErr eclass = CPLGetLastErrorType();
10172 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10173 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10174 : }
10175 : }
10176 : #endif
10177 : }
10178 36892 : {
10179 36892 : resultobj = PyLong_FromLongLong(result);
10180 : }
10181 36918 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10182 : return resultobj;
10183 : fail:
10184 : return NULL;
10185 : }
10186 :
10187 :
10188 378 : SWIGINTERN PyObject *_wrap_Layer_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10189 378 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10190 378 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10191 378 : double *arg2 ;
10192 378 : int *arg3 = (int *) NULL ;
10193 378 : int arg4 = (int) 1 ;
10194 378 : int arg5 = (int) 0 ;
10195 378 : int arg6 = (int) 0 ;
10196 378 : void *argp1 = 0 ;
10197 378 : int res1 = 0 ;
10198 378 : double argout2[4] ;
10199 378 : int isvalid2 ;
10200 378 : int val4 ;
10201 378 : int ecode4 = 0 ;
10202 378 : int val5 ;
10203 378 : int ecode5 = 0 ;
10204 378 : int val6 ;
10205 378 : int ecode6 = 0 ;
10206 378 : PyObject * obj0 = 0 ;
10207 378 : PyObject * obj1 = 0 ;
10208 378 : PyObject * obj2 = 0 ;
10209 378 : PyObject * obj3 = 0 ;
10210 378 : char * kwnames[] = {
10211 : (char *)"self", (char *)"force", (char *)"can_return_null", (char *)"geom_field", NULL
10212 : };
10213 :
10214 378 : {
10215 : /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
10216 378 : arg2 = argout2;
10217 378 : arg3 = &isvalid2;
10218 : }
10219 378 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:Layer_GetExtent", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
10220 378 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10221 378 : if (!SWIG_IsOK(res1)) {
10222 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10223 : }
10224 378 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10225 378 : if (obj1) {
10226 54 : ecode4 = SWIG_AsVal_int(obj1, &val4);
10227 54 : if (!SWIG_IsOK(ecode4)) {
10228 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetExtent" "', argument " "4"" of type '" "int""'");
10229 : }
10230 : arg4 = static_cast< int >(val4);
10231 : }
10232 378 : if (obj2) {
10233 36 : ecode5 = SWIG_AsVal_int(obj2, &val5);
10234 36 : if (!SWIG_IsOK(ecode5)) {
10235 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetExtent" "', argument " "5"" of type '" "int""'");
10236 : }
10237 : arg5 = static_cast< int >(val5);
10238 : }
10239 378 : if (obj3) {
10240 78 : ecode6 = SWIG_AsVal_int(obj3, &val6);
10241 78 : if (!SWIG_IsOK(ecode6)) {
10242 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_GetExtent" "', argument " "6"" of type '" "int""'");
10243 : }
10244 : arg6 = static_cast< int >(val6);
10245 : }
10246 378 : {
10247 378 : const int bLocalUseExceptions = GetUseExceptions();
10248 378 : if ( bLocalUseExceptions ) {
10249 238 : pushErrorHandler();
10250 : }
10251 378 : {
10252 378 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10253 378 : OGRLayerShadow_GetExtent(arg1,arg2,arg3,arg4,arg5,arg6);
10254 378 : SWIG_PYTHON_THREAD_END_ALLOW;
10255 : }
10256 378 : if ( bLocalUseExceptions ) {
10257 238 : popErrorHandler();
10258 : }
10259 : #ifndef SED_HACKS
10260 : if ( bLocalUseExceptions ) {
10261 : CPLErr eclass = CPLGetLastErrorType();
10262 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10263 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10264 : }
10265 : }
10266 : #endif
10267 : }
10268 378 : resultobj = SWIG_Py_Void();
10269 378 : {
10270 : /* %typemap(argout) (double argout[4], int* isvalid) */
10271 378 : PyObject *r;
10272 378 : if ( !*arg3 ) {
10273 9 : Py_INCREF(Py_None);
10274 9 : r = Py_None;
10275 : }
10276 : else {
10277 369 : r = CreateTupleFromDoubleArray(arg2, 4);
10278 : }
10279 : #if 0x040001 >= 0x040300
10280 : resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
10281 : #else
10282 378 : resultobj = SWIG_Python_AppendOutput(resultobj,r);
10283 : #endif
10284 : }
10285 456 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10286 : return resultobj;
10287 : fail:
10288 : return NULL;
10289 : }
10290 :
10291 :
10292 60 : SWIGINTERN PyObject *_wrap_Layer_GetExtent3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10293 60 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10294 60 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10295 60 : double *arg2 ;
10296 60 : int *arg3 = (int *) NULL ;
10297 60 : int arg4 = (int) 1 ;
10298 60 : int arg5 = (int) 0 ;
10299 60 : int arg6 = (int) 0 ;
10300 60 : void *argp1 = 0 ;
10301 60 : int res1 = 0 ;
10302 60 : double argout2[6] ;
10303 60 : int isvalid2 ;
10304 60 : int val4 ;
10305 60 : int ecode4 = 0 ;
10306 60 : int val5 ;
10307 60 : int ecode5 = 0 ;
10308 60 : int val6 ;
10309 60 : int ecode6 = 0 ;
10310 60 : PyObject * obj0 = 0 ;
10311 60 : PyObject * obj1 = 0 ;
10312 60 : PyObject * obj2 = 0 ;
10313 60 : PyObject * obj3 = 0 ;
10314 60 : char * kwnames[] = {
10315 : (char *)"self", (char *)"force", (char *)"can_return_null", (char *)"geom_field", NULL
10316 : };
10317 :
10318 60 : {
10319 : /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
10320 60 : arg2 = argout2;
10321 60 : arg3 = &isvalid2;
10322 : }
10323 60 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:Layer_GetExtent3D", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
10324 60 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10325 60 : if (!SWIG_IsOK(res1)) {
10326 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent3D" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10327 : }
10328 60 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10329 60 : if (obj1) {
10330 0 : ecode4 = SWIG_AsVal_int(obj1, &val4);
10331 0 : if (!SWIG_IsOK(ecode4)) {
10332 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetExtent3D" "', argument " "4"" of type '" "int""'");
10333 : }
10334 : arg4 = static_cast< int >(val4);
10335 : }
10336 60 : if (obj2) {
10337 1 : ecode5 = SWIG_AsVal_int(obj2, &val5);
10338 1 : if (!SWIG_IsOK(ecode5)) {
10339 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetExtent3D" "', argument " "5"" of type '" "int""'");
10340 : }
10341 : arg5 = static_cast< int >(val5);
10342 : }
10343 60 : if (obj3) {
10344 0 : ecode6 = SWIG_AsVal_int(obj3, &val6);
10345 0 : if (!SWIG_IsOK(ecode6)) {
10346 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_GetExtent3D" "', argument " "6"" of type '" "int""'");
10347 : }
10348 : arg6 = static_cast< int >(val6);
10349 : }
10350 60 : {
10351 60 : const int bLocalUseExceptions = GetUseExceptions();
10352 60 : if ( bLocalUseExceptions ) {
10353 35 : pushErrorHandler();
10354 : }
10355 60 : {
10356 60 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10357 60 : OGRLayerShadow_GetExtent3D(arg1,arg2,arg3,arg4,arg5,arg6);
10358 60 : SWIG_PYTHON_THREAD_END_ALLOW;
10359 : }
10360 60 : if ( bLocalUseExceptions ) {
10361 35 : popErrorHandler();
10362 : }
10363 : #ifndef SED_HACKS
10364 : if ( bLocalUseExceptions ) {
10365 : CPLErr eclass = CPLGetLastErrorType();
10366 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10367 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10368 : }
10369 : }
10370 : #endif
10371 : }
10372 60 : resultobj = SWIG_Py_Void();
10373 60 : {
10374 : /* %typemap(argout) (double argout[6], int* isvalid) */
10375 60 : PyObject *r;
10376 60 : if ( !*arg3 ) {
10377 1 : Py_INCREF(Py_None);
10378 1 : r = Py_None;
10379 : }
10380 : else {
10381 59 : r = CreateTupleFromDoubleArray(arg2, 6);
10382 : }
10383 : #if 0x040001 >= 0x040300
10384 : resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
10385 : #else
10386 60 : resultobj = SWIG_Python_AppendOutput(resultobj,r);
10387 : #endif
10388 : }
10389 60 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10390 : return resultobj;
10391 : fail:
10392 : return NULL;
10393 : }
10394 :
10395 :
10396 784 : SWIGINTERN PyObject *_wrap_Layer_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10397 784 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10398 784 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10399 784 : char *arg2 = (char *) 0 ;
10400 784 : void *argp1 = 0 ;
10401 784 : int res1 = 0 ;
10402 784 : int res2 ;
10403 784 : char *buf2 = 0 ;
10404 784 : int alloc2 = 0 ;
10405 784 : PyObject *swig_obj[2] ;
10406 784 : bool result;
10407 :
10408 784 : if (!SWIG_Python_UnpackTuple(args, "Layer_TestCapability", 2, 2, swig_obj)) SWIG_fail;
10409 784 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10410 784 : if (!SWIG_IsOK(res1)) {
10411 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_TestCapability" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10412 : }
10413 784 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10414 784 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
10415 784 : if (!SWIG_IsOK(res2)) {
10416 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_TestCapability" "', argument " "2"" of type '" "char const *""'");
10417 : }
10418 784 : arg2 = reinterpret_cast< char * >(buf2);
10419 784 : {
10420 784 : const int bLocalUseExceptions = GetUseExceptions();
10421 784 : if ( bLocalUseExceptions ) {
10422 421 : pushErrorHandler();
10423 : }
10424 784 : {
10425 784 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10426 784 : result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
10427 784 : SWIG_PYTHON_THREAD_END_ALLOW;
10428 : }
10429 784 : if ( bLocalUseExceptions ) {
10430 421 : popErrorHandler();
10431 : }
10432 : #ifndef SED_HACKS
10433 : if ( bLocalUseExceptions ) {
10434 : CPLErr eclass = CPLGetLastErrorType();
10435 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10436 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10437 : }
10438 : }
10439 : #endif
10440 : }
10441 784 : resultobj = SWIG_From_bool(static_cast< bool >(result));
10442 784 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10443 788 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10444 : return resultobj;
10445 0 : fail:
10446 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10447 : return NULL;
10448 : }
10449 :
10450 :
10451 77400 : SWIGINTERN PyObject *_wrap_Layer_CreateField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10452 77400 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10453 77400 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10454 77400 : OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
10455 77400 : int arg3 = (int) 1 ;
10456 77400 : void *argp1 = 0 ;
10457 77400 : int res1 = 0 ;
10458 77400 : void *argp2 = 0 ;
10459 77400 : int res2 = 0 ;
10460 77400 : int val3 ;
10461 77400 : int ecode3 = 0 ;
10462 77400 : PyObject * obj0 = 0 ;
10463 77400 : PyObject * obj1 = 0 ;
10464 77400 : PyObject * obj2 = 0 ;
10465 77400 : char * kwnames[] = {
10466 : (char *)"self", (char *)"field_def", (char *)"approx_ok", NULL
10467 : };
10468 77400 : OGRErr result;
10469 :
10470 77400 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Layer_CreateField", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
10471 77400 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10472 77400 : if (!SWIG_IsOK(res1)) {
10473 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10474 : }
10475 77400 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10476 77400 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
10477 77400 : if (!SWIG_IsOK(res2)) {
10478 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateField" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'");
10479 : }
10480 77400 : arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
10481 77400 : if (obj2) {
10482 24 : ecode3 = SWIG_AsVal_int(obj2, &val3);
10483 24 : if (!SWIG_IsOK(ecode3)) {
10484 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateField" "', argument " "3"" of type '" "int""'");
10485 : }
10486 : arg3 = static_cast< int >(val3);
10487 : }
10488 77400 : {
10489 77400 : if (!arg2) {
10490 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10491 : }
10492 : }
10493 77400 : {
10494 77400 : const int bLocalUseExceptions = GetUseExceptions();
10495 77400 : if ( bLocalUseExceptions ) {
10496 69478 : pushErrorHandler();
10497 : }
10498 77400 : {
10499 77400 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10500 77400 : result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
10501 77400 : SWIG_PYTHON_THREAD_END_ALLOW;
10502 : }
10503 77400 : if ( bLocalUseExceptions ) {
10504 69478 : popErrorHandler();
10505 : }
10506 : #ifndef SED_HACKS
10507 : if ( bLocalUseExceptions ) {
10508 : CPLErr eclass = CPLGetLastErrorType();
10509 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10510 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10511 : }
10512 : }
10513 : #endif
10514 : }
10515 77400 : {
10516 : /* %typemap(out) OGRErr */
10517 77460 : if ( result != 0 && GetUseExceptions()) {
10518 16 : const char* pszMessage = CPLGetLastErrorMsg();
10519 16 : if( pszMessage[0] != '\0' )
10520 16 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10521 : else
10522 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10523 16 : SWIG_fail;
10524 : }
10525 : }
10526 77384 : {
10527 : /* %typemap(ret) OGRErr */
10528 77384 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10529 77384 : resultobj = PyInt_FromLong( result );
10530 : }
10531 : }
10532 77400 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10533 : return resultobj;
10534 : fail:
10535 : return NULL;
10536 : }
10537 :
10538 :
10539 373 : SWIGINTERN PyObject *_wrap_Layer_DeleteField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10540 373 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10541 373 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10542 373 : int arg2 ;
10543 373 : void *argp1 = 0 ;
10544 373 : int res1 = 0 ;
10545 373 : int val2 ;
10546 373 : int ecode2 = 0 ;
10547 373 : PyObject *swig_obj[2] ;
10548 373 : OGRErr result;
10549 :
10550 373 : if (!SWIG_Python_UnpackTuple(args, "Layer_DeleteField", 2, 2, swig_obj)) SWIG_fail;
10551 373 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10552 373 : if (!SWIG_IsOK(res1)) {
10553 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10554 : }
10555 373 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10556 373 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
10557 373 : if (!SWIG_IsOK(ecode2)) {
10558 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteField" "', argument " "2"" of type '" "int""'");
10559 : }
10560 373 : arg2 = static_cast< int >(val2);
10561 373 : {
10562 373 : const int bLocalUseExceptions = GetUseExceptions();
10563 373 : if ( bLocalUseExceptions ) {
10564 9 : pushErrorHandler();
10565 : }
10566 373 : {
10567 373 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10568 373 : result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
10569 373 : SWIG_PYTHON_THREAD_END_ALLOW;
10570 : }
10571 373 : if ( bLocalUseExceptions ) {
10572 9 : popErrorHandler();
10573 : }
10574 : #ifndef SED_HACKS
10575 : if ( bLocalUseExceptions ) {
10576 : CPLErr eclass = CPLGetLastErrorType();
10577 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10578 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10579 : }
10580 : }
10581 : #endif
10582 : }
10583 373 : {
10584 : /* %typemap(out) OGRErr */
10585 394 : if ( result != 0 && GetUseExceptions()) {
10586 3 : const char* pszMessage = CPLGetLastErrorMsg();
10587 3 : if( pszMessage[0] != '\0' )
10588 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10589 : else
10590 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10591 3 : SWIG_fail;
10592 : }
10593 : }
10594 370 : {
10595 : /* %typemap(ret) OGRErr */
10596 370 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10597 370 : resultobj = PyInt_FromLong( result );
10598 : }
10599 : }
10600 373 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10601 : return resultobj;
10602 : fail:
10603 : return NULL;
10604 : }
10605 :
10606 :
10607 34 : SWIGINTERN PyObject *_wrap_Layer_ReorderField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10608 34 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10609 34 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10610 34 : int arg2 ;
10611 34 : int arg3 ;
10612 34 : void *argp1 = 0 ;
10613 34 : int res1 = 0 ;
10614 34 : int val2 ;
10615 34 : int ecode2 = 0 ;
10616 34 : int val3 ;
10617 34 : int ecode3 = 0 ;
10618 34 : PyObject *swig_obj[3] ;
10619 34 : OGRErr result;
10620 :
10621 34 : if (!SWIG_Python_UnpackTuple(args, "Layer_ReorderField", 3, 3, swig_obj)) SWIG_fail;
10622 34 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10623 34 : if (!SWIG_IsOK(res1)) {
10624 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10625 : }
10626 34 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10627 34 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
10628 34 : if (!SWIG_IsOK(ecode2)) {
10629 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_ReorderField" "', argument " "2"" of type '" "int""'");
10630 : }
10631 34 : arg2 = static_cast< int >(val2);
10632 34 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
10633 34 : if (!SWIG_IsOK(ecode3)) {
10634 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_ReorderField" "', argument " "3"" of type '" "int""'");
10635 : }
10636 34 : arg3 = static_cast< int >(val3);
10637 34 : {
10638 34 : const int bLocalUseExceptions = GetUseExceptions();
10639 34 : if ( bLocalUseExceptions ) {
10640 0 : pushErrorHandler();
10641 : }
10642 34 : {
10643 34 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10644 34 : result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
10645 34 : SWIG_PYTHON_THREAD_END_ALLOW;
10646 : }
10647 34 : if ( bLocalUseExceptions ) {
10648 0 : popErrorHandler();
10649 : }
10650 : #ifndef SED_HACKS
10651 : if ( bLocalUseExceptions ) {
10652 : CPLErr eclass = CPLGetLastErrorType();
10653 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10654 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10655 : }
10656 : }
10657 : #endif
10658 : }
10659 34 : {
10660 : /* %typemap(out) OGRErr */
10661 34 : if ( result != 0 && GetUseExceptions()) {
10662 0 : const char* pszMessage = CPLGetLastErrorMsg();
10663 0 : if( pszMessage[0] != '\0' )
10664 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10665 : else
10666 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10667 0 : SWIG_fail;
10668 : }
10669 : }
10670 34 : {
10671 : /* %typemap(ret) OGRErr */
10672 34 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10673 34 : resultobj = PyInt_FromLong( result );
10674 : }
10675 : }
10676 34 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10677 : return resultobj;
10678 : fail:
10679 : return NULL;
10680 : }
10681 :
10682 :
10683 43 : SWIGINTERN PyObject *_wrap_Layer_ReorderFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10684 43 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10685 43 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10686 43 : int arg2 ;
10687 43 : int *arg3 = (int *) 0 ;
10688 43 : void *argp1 = 0 ;
10689 43 : int res1 = 0 ;
10690 43 : PyObject *swig_obj[2] ;
10691 43 : OGRErr result;
10692 :
10693 43 : if (!SWIG_Python_UnpackTuple(args, "Layer_ReorderFields", 2, 2, swig_obj)) SWIG_fail;
10694 43 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10695 43 : if (!SWIG_IsOK(res1)) {
10696 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderFields" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10697 : }
10698 43 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10699 43 : {
10700 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
10701 43 : arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
10702 43 : if( arg2 < 0 ) {
10703 0 : SWIG_fail;
10704 : }
10705 : }
10706 43 : {
10707 43 : const int bLocalUseExceptions = GetUseExceptions();
10708 43 : if ( bLocalUseExceptions ) {
10709 0 : pushErrorHandler();
10710 : }
10711 43 : {
10712 43 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10713 43 : result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
10714 43 : SWIG_PYTHON_THREAD_END_ALLOW;
10715 : }
10716 43 : if ( bLocalUseExceptions ) {
10717 0 : popErrorHandler();
10718 : }
10719 : #ifndef SED_HACKS
10720 : if ( bLocalUseExceptions ) {
10721 : CPLErr eclass = CPLGetLastErrorType();
10722 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10723 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10724 : }
10725 : }
10726 : #endif
10727 : }
10728 43 : {
10729 : /* %typemap(out) OGRErr */
10730 53 : if ( result != 0 && GetUseExceptions()) {
10731 0 : const char* pszMessage = CPLGetLastErrorMsg();
10732 0 : if( pszMessage[0] != '\0' )
10733 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10734 : else
10735 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10736 0 : SWIG_fail;
10737 : }
10738 : }
10739 43 : {
10740 : /* %typemap(freearg) (int nList, int* pList) */
10741 43 : free(arg3);
10742 : }
10743 43 : {
10744 : /* %typemap(ret) OGRErr */
10745 43 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10746 43 : resultobj = PyInt_FromLong( result );
10747 : }
10748 : }
10749 43 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10750 : return resultobj;
10751 0 : fail:
10752 0 : {
10753 : /* %typemap(freearg) (int nList, int* pList) */
10754 0 : free(arg3);
10755 : }
10756 0 : return NULL;
10757 : }
10758 :
10759 :
10760 126 : SWIGINTERN PyObject *_wrap_Layer_AlterFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10761 126 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10762 126 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10763 126 : int arg2 ;
10764 126 : OGRFieldDefnShadow *arg3 = (OGRFieldDefnShadow *) 0 ;
10765 126 : int arg4 ;
10766 126 : void *argp1 = 0 ;
10767 126 : int res1 = 0 ;
10768 126 : int val2 ;
10769 126 : int ecode2 = 0 ;
10770 126 : void *argp3 = 0 ;
10771 126 : int res3 = 0 ;
10772 126 : int val4 ;
10773 126 : int ecode4 = 0 ;
10774 126 : PyObject *swig_obj[4] ;
10775 126 : OGRErr result;
10776 :
10777 126 : if (!SWIG_Python_UnpackTuple(args, "Layer_AlterFieldDefn", 4, 4, swig_obj)) SWIG_fail;
10778 126 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10779 126 : if (!SWIG_IsOK(res1)) {
10780 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_AlterFieldDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10781 : }
10782 126 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10783 126 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
10784 126 : if (!SWIG_IsOK(ecode2)) {
10785 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_AlterFieldDefn" "', argument " "2"" of type '" "int""'");
10786 : }
10787 126 : arg2 = static_cast< int >(val2);
10788 126 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
10789 126 : if (!SWIG_IsOK(res3)) {
10790 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_AlterFieldDefn" "', argument " "3"" of type '" "OGRFieldDefnShadow *""'");
10791 : }
10792 126 : arg3 = reinterpret_cast< OGRFieldDefnShadow * >(argp3);
10793 126 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
10794 126 : if (!SWIG_IsOK(ecode4)) {
10795 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_AlterFieldDefn" "', argument " "4"" of type '" "int""'");
10796 : }
10797 126 : arg4 = static_cast< int >(val4);
10798 126 : {
10799 126 : if (!arg3) {
10800 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10801 : }
10802 : }
10803 126 : {
10804 126 : const int bLocalUseExceptions = GetUseExceptions();
10805 126 : if ( bLocalUseExceptions ) {
10806 2 : pushErrorHandler();
10807 : }
10808 126 : {
10809 126 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10810 126 : result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
10811 126 : SWIG_PYTHON_THREAD_END_ALLOW;
10812 : }
10813 126 : if ( bLocalUseExceptions ) {
10814 2 : popErrorHandler();
10815 : }
10816 : #ifndef SED_HACKS
10817 : if ( bLocalUseExceptions ) {
10818 : CPLErr eclass = CPLGetLastErrorType();
10819 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10820 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10821 : }
10822 : }
10823 : #endif
10824 : }
10825 126 : {
10826 : /* %typemap(out) OGRErr */
10827 160 : if ( result != 0 && GetUseExceptions()) {
10828 0 : const char* pszMessage = CPLGetLastErrorMsg();
10829 0 : if( pszMessage[0] != '\0' )
10830 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10831 : else
10832 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10833 0 : SWIG_fail;
10834 : }
10835 : }
10836 126 : {
10837 : /* %typemap(ret) OGRErr */
10838 126 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10839 126 : resultobj = PyInt_FromLong( result );
10840 : }
10841 : }
10842 126 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10843 : return resultobj;
10844 : fail:
10845 : return NULL;
10846 : }
10847 :
10848 :
10849 33 : SWIGINTERN PyObject *_wrap_Layer_AlterGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10850 33 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10851 33 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10852 33 : int arg2 ;
10853 33 : OGRGeomFieldDefnShadow *arg3 = (OGRGeomFieldDefnShadow *) 0 ;
10854 33 : int arg4 ;
10855 33 : void *argp1 = 0 ;
10856 33 : int res1 = 0 ;
10857 33 : int val2 ;
10858 33 : int ecode2 = 0 ;
10859 33 : void *argp3 = 0 ;
10860 33 : int res3 = 0 ;
10861 33 : int val4 ;
10862 33 : int ecode4 = 0 ;
10863 33 : PyObject *swig_obj[4] ;
10864 33 : OGRErr result;
10865 :
10866 33 : if (!SWIG_Python_UnpackTuple(args, "Layer_AlterGeomFieldDefn", 4, 4, swig_obj)) SWIG_fail;
10867 33 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10868 33 : if (!SWIG_IsOK(res1)) {
10869 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_AlterGeomFieldDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10870 : }
10871 33 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10872 33 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
10873 33 : if (!SWIG_IsOK(ecode2)) {
10874 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_AlterGeomFieldDefn" "', argument " "2"" of type '" "int""'");
10875 : }
10876 33 : arg2 = static_cast< int >(val2);
10877 33 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
10878 33 : if (!SWIG_IsOK(res3)) {
10879 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_AlterGeomFieldDefn" "', argument " "3"" of type '" "OGRGeomFieldDefnShadow const *""'");
10880 : }
10881 33 : arg3 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp3);
10882 33 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
10883 33 : if (!SWIG_IsOK(ecode4)) {
10884 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_AlterGeomFieldDefn" "', argument " "4"" of type '" "int""'");
10885 : }
10886 33 : arg4 = static_cast< int >(val4);
10887 33 : {
10888 33 : if (!arg3) {
10889 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10890 : }
10891 : }
10892 33 : {
10893 33 : const int bLocalUseExceptions = GetUseExceptions();
10894 33 : if ( bLocalUseExceptions ) {
10895 4 : pushErrorHandler();
10896 : }
10897 33 : {
10898 33 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10899 33 : result = (OGRErr)OGRLayerShadow_AlterGeomFieldDefn(arg1,arg2,(OGRGeomFieldDefnShadow const *)arg3,arg4);
10900 33 : SWIG_PYTHON_THREAD_END_ALLOW;
10901 : }
10902 33 : if ( bLocalUseExceptions ) {
10903 4 : popErrorHandler();
10904 : }
10905 : #ifndef SED_HACKS
10906 : if ( bLocalUseExceptions ) {
10907 : CPLErr eclass = CPLGetLastErrorType();
10908 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10909 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10910 : }
10911 : }
10912 : #endif
10913 : }
10914 33 : {
10915 : /* %typemap(out) OGRErr */
10916 41 : if ( result != 0 && GetUseExceptions()) {
10917 0 : const char* pszMessage = CPLGetLastErrorMsg();
10918 0 : if( pszMessage[0] != '\0' )
10919 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10920 : else
10921 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10922 0 : SWIG_fail;
10923 : }
10924 : }
10925 33 : {
10926 : /* %typemap(ret) OGRErr */
10927 33 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10928 33 : resultobj = PyInt_FromLong( result );
10929 : }
10930 : }
10931 33 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10932 : return resultobj;
10933 : fail:
10934 : return NULL;
10935 : }
10936 :
10937 :
10938 132 : SWIGINTERN PyObject *_wrap_Layer_CreateGeomField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10939 132 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10940 132 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10941 132 : OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
10942 132 : int arg3 = (int) 1 ;
10943 132 : void *argp1 = 0 ;
10944 132 : int res1 = 0 ;
10945 132 : void *argp2 = 0 ;
10946 132 : int res2 = 0 ;
10947 132 : int val3 ;
10948 132 : int ecode3 = 0 ;
10949 132 : PyObject * obj0 = 0 ;
10950 132 : PyObject * obj1 = 0 ;
10951 132 : PyObject * obj2 = 0 ;
10952 132 : char * kwnames[] = {
10953 : (char *)"self", (char *)"field_def", (char *)"approx_ok", NULL
10954 : };
10955 132 : OGRErr result;
10956 :
10957 132 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Layer_CreateGeomField", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
10958 132 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10959 132 : if (!SWIG_IsOK(res1)) {
10960 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateGeomField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10961 : }
10962 132 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10963 132 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
10964 132 : if (!SWIG_IsOK(res2)) {
10965 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateGeomField" "', argument " "2"" of type '" "OGRGeomFieldDefnShadow *""'");
10966 : }
10967 132 : arg2 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp2);
10968 132 : if (obj2) {
10969 2 : ecode3 = SWIG_AsVal_int(obj2, &val3);
10970 2 : if (!SWIG_IsOK(ecode3)) {
10971 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateGeomField" "', argument " "3"" of type '" "int""'");
10972 : }
10973 : arg3 = static_cast< int >(val3);
10974 : }
10975 132 : {
10976 132 : if (!arg2) {
10977 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10978 : }
10979 : }
10980 132 : {
10981 132 : const int bLocalUseExceptions = GetUseExceptions();
10982 132 : if ( bLocalUseExceptions ) {
10983 51 : pushErrorHandler();
10984 : }
10985 132 : {
10986 132 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10987 132 : result = (OGRErr)OGRLayerShadow_CreateGeomField(arg1,arg2,arg3);
10988 132 : SWIG_PYTHON_THREAD_END_ALLOW;
10989 : }
10990 132 : if ( bLocalUseExceptions ) {
10991 51 : popErrorHandler();
10992 : }
10993 : #ifndef SED_HACKS
10994 : if ( bLocalUseExceptions ) {
10995 : CPLErr eclass = CPLGetLastErrorType();
10996 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10997 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10998 : }
10999 : }
11000 : #endif
11001 : }
11002 132 : {
11003 : /* %typemap(out) OGRErr */
11004 142 : if ( result != 0 && GetUseExceptions()) {
11005 1 : const char* pszMessage = CPLGetLastErrorMsg();
11006 1 : if( pszMessage[0] != '\0' )
11007 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11008 : else
11009 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11010 1 : SWIG_fail;
11011 : }
11012 : }
11013 131 : {
11014 : /* %typemap(ret) OGRErr */
11015 131 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11016 131 : resultobj = PyInt_FromLong( result );
11017 : }
11018 : }
11019 132 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11020 : return resultobj;
11021 : fail:
11022 : return NULL;
11023 : }
11024 :
11025 :
11026 149 : SWIGINTERN PyObject *_wrap_Layer_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11027 149 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11028 149 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11029 149 : void *argp1 = 0 ;
11030 149 : int res1 = 0 ;
11031 149 : PyObject *swig_obj[1] ;
11032 149 : OGRErr result;
11033 :
11034 149 : if (!args) SWIG_fail;
11035 149 : swig_obj[0] = args;
11036 149 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11037 149 : if (!SWIG_IsOK(res1)) {
11038 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_StartTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11039 : }
11040 149 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11041 149 : {
11042 149 : const int bLocalUseExceptions = GetUseExceptions();
11043 149 : if ( bLocalUseExceptions ) {
11044 16 : pushErrorHandler();
11045 : }
11046 149 : {
11047 149 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11048 149 : result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
11049 149 : SWIG_PYTHON_THREAD_END_ALLOW;
11050 : }
11051 149 : if ( bLocalUseExceptions ) {
11052 16 : popErrorHandler();
11053 : }
11054 : #ifndef SED_HACKS
11055 : if ( bLocalUseExceptions ) {
11056 : CPLErr eclass = CPLGetLastErrorType();
11057 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11058 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11059 : }
11060 : }
11061 : #endif
11062 : }
11063 149 : {
11064 : /* %typemap(out) OGRErr */
11065 153 : if ( result != 0 && GetUseExceptions()) {
11066 0 : const char* pszMessage = CPLGetLastErrorMsg();
11067 0 : if( pszMessage[0] != '\0' )
11068 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11069 : else
11070 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11071 0 : SWIG_fail;
11072 : }
11073 : }
11074 149 : {
11075 : /* %typemap(ret) OGRErr */
11076 149 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11077 149 : resultobj = PyInt_FromLong( result );
11078 : }
11079 : }
11080 149 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11081 : return resultobj;
11082 : fail:
11083 : return NULL;
11084 : }
11085 :
11086 :
11087 129 : SWIGINTERN PyObject *_wrap_Layer_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11088 129 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11089 129 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11090 129 : void *argp1 = 0 ;
11091 129 : int res1 = 0 ;
11092 129 : PyObject *swig_obj[1] ;
11093 129 : OGRErr result;
11094 :
11095 129 : if (!args) SWIG_fail;
11096 129 : swig_obj[0] = args;
11097 129 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11098 129 : if (!SWIG_IsOK(res1)) {
11099 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CommitTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11100 : }
11101 129 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11102 129 : {
11103 129 : const int bLocalUseExceptions = GetUseExceptions();
11104 129 : if ( bLocalUseExceptions ) {
11105 16 : pushErrorHandler();
11106 : }
11107 129 : {
11108 129 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11109 129 : result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
11110 129 : SWIG_PYTHON_THREAD_END_ALLOW;
11111 : }
11112 129 : if ( bLocalUseExceptions ) {
11113 16 : popErrorHandler();
11114 : }
11115 : #ifndef SED_HACKS
11116 : if ( bLocalUseExceptions ) {
11117 : CPLErr eclass = CPLGetLastErrorType();
11118 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11119 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11120 : }
11121 : }
11122 : #endif
11123 : }
11124 129 : {
11125 : /* %typemap(out) OGRErr */
11126 147 : if ( result != 0 && GetUseExceptions()) {
11127 0 : const char* pszMessage = CPLGetLastErrorMsg();
11128 0 : if( pszMessage[0] != '\0' )
11129 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11130 : else
11131 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11132 0 : SWIG_fail;
11133 : }
11134 : }
11135 129 : {
11136 : /* %typemap(ret) OGRErr */
11137 129 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11138 129 : resultobj = PyInt_FromLong( result );
11139 : }
11140 : }
11141 129 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11142 : return resultobj;
11143 : fail:
11144 : return NULL;
11145 : }
11146 :
11147 :
11148 26 : SWIGINTERN PyObject *_wrap_Layer_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11149 26 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11150 26 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11151 26 : void *argp1 = 0 ;
11152 26 : int res1 = 0 ;
11153 26 : PyObject *swig_obj[1] ;
11154 26 : OGRErr result;
11155 :
11156 26 : if (!args) SWIG_fail;
11157 26 : swig_obj[0] = args;
11158 26 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11159 26 : if (!SWIG_IsOK(res1)) {
11160 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_RollbackTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11161 : }
11162 26 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11163 26 : {
11164 26 : const int bLocalUseExceptions = GetUseExceptions();
11165 26 : if ( bLocalUseExceptions ) {
11166 0 : pushErrorHandler();
11167 : }
11168 26 : {
11169 26 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11170 26 : result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
11171 26 : SWIG_PYTHON_THREAD_END_ALLOW;
11172 : }
11173 26 : if ( bLocalUseExceptions ) {
11174 0 : popErrorHandler();
11175 : }
11176 : #ifndef SED_HACKS
11177 : if ( bLocalUseExceptions ) {
11178 : CPLErr eclass = CPLGetLastErrorType();
11179 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11180 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11181 : }
11182 : }
11183 : #endif
11184 : }
11185 26 : {
11186 : /* %typemap(out) OGRErr */
11187 33 : if ( result != 0 && GetUseExceptions()) {
11188 0 : const char* pszMessage = CPLGetLastErrorMsg();
11189 0 : if( pszMessage[0] != '\0' )
11190 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11191 : else
11192 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11193 0 : SWIG_fail;
11194 : }
11195 : }
11196 26 : {
11197 : /* %typemap(ret) OGRErr */
11198 26 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11199 26 : resultobj = PyInt_FromLong( result );
11200 : }
11201 : }
11202 26 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11203 : return resultobj;
11204 : fail:
11205 : return NULL;
11206 : }
11207 :
11208 :
11209 2 : SWIGINTERN PyObject *_wrap_Layer_FindFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11210 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11211 2 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11212 2 : char *arg2 = (char *) 0 ;
11213 2 : int arg3 ;
11214 2 : void *argp1 = 0 ;
11215 2 : int res1 = 0 ;
11216 2 : int res2 ;
11217 2 : char *buf2 = 0 ;
11218 2 : int alloc2 = 0 ;
11219 2 : int val3 ;
11220 2 : int ecode3 = 0 ;
11221 2 : PyObject *swig_obj[3] ;
11222 2 : int result;
11223 :
11224 2 : if (!SWIG_Python_UnpackTuple(args, "Layer_FindFieldIndex", 3, 3, swig_obj)) SWIG_fail;
11225 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11226 2 : if (!SWIG_IsOK(res1)) {
11227 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_FindFieldIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11228 : }
11229 2 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11230 2 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
11231 2 : if (!SWIG_IsOK(res2)) {
11232 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_FindFieldIndex" "', argument " "2"" of type '" "char const *""'");
11233 : }
11234 2 : arg2 = reinterpret_cast< char * >(buf2);
11235 2 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
11236 2 : if (!SWIG_IsOK(ecode3)) {
11237 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_FindFieldIndex" "', argument " "3"" of type '" "int""'");
11238 : }
11239 2 : arg3 = static_cast< int >(val3);
11240 2 : {
11241 2 : const int bLocalUseExceptions = GetUseExceptions();
11242 2 : if ( bLocalUseExceptions ) {
11243 0 : pushErrorHandler();
11244 : }
11245 2 : {
11246 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11247 2 : result = (int)OGRLayerShadow_FindFieldIndex(arg1,(char const *)arg2,arg3);
11248 2 : SWIG_PYTHON_THREAD_END_ALLOW;
11249 : }
11250 2 : if ( bLocalUseExceptions ) {
11251 0 : popErrorHandler();
11252 : }
11253 : #ifndef SED_HACKS
11254 : if ( bLocalUseExceptions ) {
11255 : CPLErr eclass = CPLGetLastErrorType();
11256 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11257 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11258 : }
11259 : }
11260 : #endif
11261 : }
11262 2 : resultobj = SWIG_From_int(static_cast< int >(result));
11263 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11264 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11265 : return resultobj;
11266 0 : fail:
11267 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11268 : return NULL;
11269 : }
11270 :
11271 :
11272 945 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11273 945 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11274 945 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11275 945 : void *argp1 = 0 ;
11276 945 : int res1 = 0 ;
11277 945 : PyObject *swig_obj[1] ;
11278 945 : OSRSpatialReferenceShadow *result = 0 ;
11279 :
11280 945 : if (!args) SWIG_fail;
11281 945 : swig_obj[0] = args;
11282 945 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11283 945 : if (!SWIG_IsOK(res1)) {
11284 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialRef" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11285 : }
11286 945 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11287 945 : {
11288 945 : const int bLocalUseExceptions = GetUseExceptions();
11289 945 : if ( bLocalUseExceptions ) {
11290 532 : pushErrorHandler();
11291 : }
11292 945 : {
11293 945 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11294 945 : result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
11295 945 : SWIG_PYTHON_THREAD_END_ALLOW;
11296 : }
11297 945 : if ( bLocalUseExceptions ) {
11298 532 : 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 945 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
11310 945 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11311 : return resultobj;
11312 : fail:
11313 : return NULL;
11314 : }
11315 :
11316 :
11317 0 : SWIGINTERN PyObject *_wrap_Layer_GetFeaturesRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11318 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11319 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11320 0 : void *argp1 = 0 ;
11321 0 : int res1 = 0 ;
11322 0 : PyObject *swig_obj[1] ;
11323 0 : GIntBig result;
11324 :
11325 0 : if (!args) SWIG_fail;
11326 0 : swig_obj[0] = args;
11327 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11328 0 : if (!SWIG_IsOK(res1)) {
11329 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeaturesRead" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11330 : }
11331 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11332 0 : {
11333 0 : const int bLocalUseExceptions = GetUseExceptions();
11334 0 : if ( bLocalUseExceptions ) {
11335 0 : pushErrorHandler();
11336 : }
11337 0 : {
11338 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11339 0 : result = OGRLayerShadow_GetFeaturesRead(arg1);
11340 0 : SWIG_PYTHON_THREAD_END_ALLOW;
11341 : }
11342 0 : if ( bLocalUseExceptions ) {
11343 0 : popErrorHandler();
11344 : }
11345 : #ifndef SED_HACKS
11346 : if ( bLocalUseExceptions ) {
11347 : CPLErr eclass = CPLGetLastErrorType();
11348 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11349 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11350 : }
11351 : }
11352 : #endif
11353 : }
11354 0 : {
11355 0 : resultobj = PyLong_FromLongLong(result);
11356 : }
11357 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11358 : return resultobj;
11359 : fail:
11360 : return NULL;
11361 : }
11362 :
11363 :
11364 265 : SWIGINTERN PyObject *_wrap_Layer_SetIgnoredFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11365 265 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11366 265 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11367 265 : char **arg2 = (char **) 0 ;
11368 265 : void *argp1 = 0 ;
11369 265 : int res1 = 0 ;
11370 265 : PyObject *swig_obj[2] ;
11371 265 : OGRErr result;
11372 :
11373 265 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetIgnoredFields", 2, 2, swig_obj)) SWIG_fail;
11374 265 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11375 265 : if (!SWIG_IsOK(res1)) {
11376 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetIgnoredFields" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11377 : }
11378 265 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11379 265 : {
11380 : /* %typemap(in) char **dict */
11381 265 : arg2 = NULL;
11382 265 : if ( PySequence_Check( swig_obj[1] ) ) {
11383 265 : int bErr = FALSE;
11384 265 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
11385 265 : if ( bErr )
11386 : {
11387 0 : SWIG_fail;
11388 : }
11389 : }
11390 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
11391 0 : int bErr = FALSE;
11392 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
11393 0 : if ( bErr )
11394 : {
11395 0 : SWIG_fail;
11396 : }
11397 : }
11398 : else {
11399 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
11400 0 : SWIG_fail;
11401 : }
11402 : }
11403 265 : {
11404 265 : const int bLocalUseExceptions = GetUseExceptions();
11405 265 : if ( bLocalUseExceptions ) {
11406 246 : pushErrorHandler();
11407 : }
11408 265 : {
11409 265 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11410 265 : result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
11411 265 : SWIG_PYTHON_THREAD_END_ALLOW;
11412 : }
11413 265 : if ( bLocalUseExceptions ) {
11414 246 : popErrorHandler();
11415 : }
11416 : #ifndef SED_HACKS
11417 : if ( bLocalUseExceptions ) {
11418 : CPLErr eclass = CPLGetLastErrorType();
11419 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11420 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11421 : }
11422 : }
11423 : #endif
11424 : }
11425 265 : {
11426 : /* %typemap(out) OGRErr */
11427 265 : if ( result != 0 && GetUseExceptions()) {
11428 0 : const char* pszMessage = CPLGetLastErrorMsg();
11429 0 : if( pszMessage[0] != '\0' )
11430 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11431 : else
11432 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11433 0 : SWIG_fail;
11434 : }
11435 : }
11436 265 : {
11437 : /* %typemap(freearg) char **dict */
11438 265 : CSLDestroy( arg2 );
11439 : }
11440 265 : {
11441 : /* %typemap(ret) OGRErr */
11442 265 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11443 265 : resultobj = PyInt_FromLong( result );
11444 : }
11445 : }
11446 267 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11447 : return resultobj;
11448 0 : fail:
11449 0 : {
11450 : /* %typemap(freearg) char **dict */
11451 0 : CSLDestroy( arg2 );
11452 : }
11453 : return NULL;
11454 : }
11455 :
11456 :
11457 7 : SWIGINTERN PyObject *_wrap_Layer_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11458 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11459 7 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11460 7 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
11461 7 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
11462 7 : char **arg4 = (char **) NULL ;
11463 7 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
11464 7 : void *arg6 = (void *) NULL ;
11465 7 : void *argp1 = 0 ;
11466 7 : int res1 = 0 ;
11467 7 : void *argp2 = 0 ;
11468 7 : int res2 = 0 ;
11469 7 : void *argp3 = 0 ;
11470 7 : int res3 = 0 ;
11471 7 : PyObject * obj0 = 0 ;
11472 7 : PyObject * obj1 = 0 ;
11473 7 : PyObject * obj2 = 0 ;
11474 7 : PyObject * obj3 = 0 ;
11475 7 : PyObject * obj4 = 0 ;
11476 7 : PyObject * obj5 = 0 ;
11477 7 : char * kwnames[] = {
11478 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
11479 : };
11480 7 : OGRErr result;
11481 :
11482 : /* %typemap(arginit) ( const char* callback_data=NULL) */
11483 7 : PyProgressData *psProgressInfo;
11484 7 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
11485 7 : psProgressInfo->nLastReported = -1;
11486 7 : psProgressInfo->psPyCallback = NULL;
11487 7 : psProgressInfo->psPyCallbackData = NULL;
11488 7 : arg6 = psProgressInfo;
11489 7 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Intersection", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11490 7 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11491 7 : if (!SWIG_IsOK(res1)) {
11492 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Intersection" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11493 : }
11494 7 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11495 7 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11496 7 : if (!SWIG_IsOK(res2)) {
11497 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Intersection" "', argument " "2"" of type '" "OGRLayerShadow *""'");
11498 : }
11499 7 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
11500 7 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11501 7 : if (!SWIG_IsOK(res3)) {
11502 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Intersection" "', argument " "3"" of type '" "OGRLayerShadow *""'");
11503 : }
11504 7 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
11505 7 : if (obj3) {
11506 6 : {
11507 : /* %typemap(in) char **dict */
11508 6 : arg4 = NULL;
11509 6 : if ( PySequence_Check( obj3 ) ) {
11510 6 : int bErr = FALSE;
11511 6 : arg4 = CSLFromPySequence(obj3, &bErr);
11512 6 : if ( bErr )
11513 : {
11514 0 : SWIG_fail;
11515 : }
11516 : }
11517 0 : else if ( PyMapping_Check( obj3 ) ) {
11518 0 : int bErr = FALSE;
11519 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
11520 0 : if ( bErr )
11521 : {
11522 0 : SWIG_fail;
11523 : }
11524 : }
11525 : else {
11526 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
11527 0 : SWIG_fail;
11528 : }
11529 : }
11530 : }
11531 7 : if (obj4) {
11532 1 : {
11533 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
11534 : /* callback_func typemap */
11535 :
11536 : /* In some cases 0 is passed instead of None. */
11537 : /* See https://github.com/OSGeo/gdal/pull/219 */
11538 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
11539 : {
11540 0 : if( PyLong_AsLong(obj4) == 0 )
11541 : {
11542 0 : obj4 = Py_None;
11543 : }
11544 : }
11545 :
11546 1 : if (obj4 && obj4 != Py_None ) {
11547 1 : void* cbfunction = NULL;
11548 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
11549 : (void**)&cbfunction,
11550 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
11551 : SWIG_POINTER_EXCEPTION | 0 ));
11552 :
11553 1 : if ( cbfunction == GDALTermProgress ) {
11554 : arg5 = GDALTermProgress;
11555 : } else {
11556 1 : if (!PyCallable_Check(obj4)) {
11557 0 : PyErr_SetString( PyExc_RuntimeError,
11558 : "Object given is not a Python function" );
11559 0 : SWIG_fail;
11560 : }
11561 1 : psProgressInfo->psPyCallback = obj4;
11562 1 : arg5 = PyProgressProxy;
11563 : }
11564 :
11565 : }
11566 :
11567 : }
11568 : }
11569 7 : if (obj5) {
11570 0 : {
11571 : /* %typemap(in) ( void* callback_data=NULL) */
11572 0 : psProgressInfo->psPyCallbackData = obj5 ;
11573 : }
11574 : }
11575 7 : {
11576 7 : const int bLocalUseExceptions = GetUseExceptions();
11577 7 : if ( bLocalUseExceptions ) {
11578 7 : pushErrorHandler();
11579 : }
11580 7 : {
11581 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11582 7 : result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,arg5,arg6);
11583 7 : SWIG_PYTHON_THREAD_END_ALLOW;
11584 : }
11585 7 : if ( bLocalUseExceptions ) {
11586 7 : popErrorHandler();
11587 : }
11588 : #ifndef SED_HACKS
11589 : if ( bLocalUseExceptions ) {
11590 : CPLErr eclass = CPLGetLastErrorType();
11591 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11592 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11593 : }
11594 : }
11595 : #endif
11596 : }
11597 7 : {
11598 : /* %typemap(out) OGRErr */
11599 7 : if ( result != 0 && GetUseExceptions()) {
11600 0 : const char* pszMessage = CPLGetLastErrorMsg();
11601 0 : if( pszMessage[0] != '\0' )
11602 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11603 : else
11604 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11605 0 : SWIG_fail;
11606 : }
11607 : }
11608 7 : {
11609 : /* %typemap(freearg) char **dict */
11610 7 : CSLDestroy( arg4 );
11611 : }
11612 7 : {
11613 : /* %typemap(freearg) ( void* callback_data=NULL) */
11614 :
11615 7 : CPLFree(psProgressInfo);
11616 :
11617 : }
11618 7 : {
11619 : /* %typemap(ret) OGRErr */
11620 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11621 7 : resultobj = PyInt_FromLong( result );
11622 : }
11623 : }
11624 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11625 : return resultobj;
11626 0 : fail:
11627 0 : {
11628 : /* %typemap(freearg) char **dict */
11629 0 : CSLDestroy( arg4 );
11630 : }
11631 0 : {
11632 : /* %typemap(freearg) ( void* callback_data=NULL) */
11633 :
11634 0 : CPLFree(psProgressInfo);
11635 :
11636 : }
11637 : return NULL;
11638 : }
11639 :
11640 :
11641 7 : SWIGINTERN PyObject *_wrap_Layer_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11642 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11643 7 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11644 7 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
11645 7 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
11646 7 : char **arg4 = (char **) NULL ;
11647 7 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
11648 7 : void *arg6 = (void *) NULL ;
11649 7 : void *argp1 = 0 ;
11650 7 : int res1 = 0 ;
11651 7 : void *argp2 = 0 ;
11652 7 : int res2 = 0 ;
11653 7 : void *argp3 = 0 ;
11654 7 : int res3 = 0 ;
11655 7 : PyObject * obj0 = 0 ;
11656 7 : PyObject * obj1 = 0 ;
11657 7 : PyObject * obj2 = 0 ;
11658 7 : PyObject * obj3 = 0 ;
11659 7 : PyObject * obj4 = 0 ;
11660 7 : PyObject * obj5 = 0 ;
11661 7 : char * kwnames[] = {
11662 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
11663 : };
11664 7 : OGRErr result;
11665 :
11666 : /* %typemap(arginit) ( const char* callback_data=NULL) */
11667 7 : PyProgressData *psProgressInfo;
11668 7 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
11669 7 : psProgressInfo->nLastReported = -1;
11670 7 : psProgressInfo->psPyCallback = NULL;
11671 7 : psProgressInfo->psPyCallbackData = NULL;
11672 7 : arg6 = psProgressInfo;
11673 7 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Union", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11674 7 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11675 7 : if (!SWIG_IsOK(res1)) {
11676 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Union" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11677 : }
11678 7 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11679 7 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11680 7 : if (!SWIG_IsOK(res2)) {
11681 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Union" "', argument " "2"" of type '" "OGRLayerShadow *""'");
11682 : }
11683 7 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
11684 7 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11685 7 : if (!SWIG_IsOK(res3)) {
11686 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Union" "', argument " "3"" of type '" "OGRLayerShadow *""'");
11687 : }
11688 7 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
11689 7 : if (obj3) {
11690 5 : {
11691 : /* %typemap(in) char **dict */
11692 5 : arg4 = NULL;
11693 5 : if ( PySequence_Check( obj3 ) ) {
11694 5 : int bErr = FALSE;
11695 5 : arg4 = CSLFromPySequence(obj3, &bErr);
11696 5 : if ( bErr )
11697 : {
11698 0 : SWIG_fail;
11699 : }
11700 : }
11701 0 : else if ( PyMapping_Check( obj3 ) ) {
11702 0 : int bErr = FALSE;
11703 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
11704 0 : if ( bErr )
11705 : {
11706 0 : SWIG_fail;
11707 : }
11708 : }
11709 : else {
11710 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
11711 0 : SWIG_fail;
11712 : }
11713 : }
11714 : }
11715 7 : if (obj4) {
11716 1 : {
11717 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
11718 : /* callback_func typemap */
11719 :
11720 : /* In some cases 0 is passed instead of None. */
11721 : /* See https://github.com/OSGeo/gdal/pull/219 */
11722 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
11723 : {
11724 0 : if( PyLong_AsLong(obj4) == 0 )
11725 : {
11726 0 : obj4 = Py_None;
11727 : }
11728 : }
11729 :
11730 1 : if (obj4 && obj4 != Py_None ) {
11731 1 : void* cbfunction = NULL;
11732 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
11733 : (void**)&cbfunction,
11734 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
11735 : SWIG_POINTER_EXCEPTION | 0 ));
11736 :
11737 1 : if ( cbfunction == GDALTermProgress ) {
11738 : arg5 = GDALTermProgress;
11739 : } else {
11740 1 : if (!PyCallable_Check(obj4)) {
11741 0 : PyErr_SetString( PyExc_RuntimeError,
11742 : "Object given is not a Python function" );
11743 0 : SWIG_fail;
11744 : }
11745 1 : psProgressInfo->psPyCallback = obj4;
11746 1 : arg5 = PyProgressProxy;
11747 : }
11748 :
11749 : }
11750 :
11751 : }
11752 : }
11753 7 : if (obj5) {
11754 0 : {
11755 : /* %typemap(in) ( void* callback_data=NULL) */
11756 0 : psProgressInfo->psPyCallbackData = obj5 ;
11757 : }
11758 : }
11759 7 : {
11760 7 : const int bLocalUseExceptions = GetUseExceptions();
11761 7 : if ( bLocalUseExceptions ) {
11762 7 : pushErrorHandler();
11763 : }
11764 7 : {
11765 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11766 7 : result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,arg5,arg6);
11767 7 : SWIG_PYTHON_THREAD_END_ALLOW;
11768 : }
11769 7 : if ( bLocalUseExceptions ) {
11770 7 : popErrorHandler();
11771 : }
11772 : #ifndef SED_HACKS
11773 : if ( bLocalUseExceptions ) {
11774 : CPLErr eclass = CPLGetLastErrorType();
11775 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11776 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11777 : }
11778 : }
11779 : #endif
11780 : }
11781 7 : {
11782 : /* %typemap(out) OGRErr */
11783 7 : if ( result != 0 && GetUseExceptions()) {
11784 0 : const char* pszMessage = CPLGetLastErrorMsg();
11785 0 : if( pszMessage[0] != '\0' )
11786 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11787 : else
11788 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11789 0 : SWIG_fail;
11790 : }
11791 : }
11792 7 : {
11793 : /* %typemap(freearg) char **dict */
11794 7 : CSLDestroy( arg4 );
11795 : }
11796 7 : {
11797 : /* %typemap(freearg) ( void* callback_data=NULL) */
11798 :
11799 7 : CPLFree(psProgressInfo);
11800 :
11801 : }
11802 7 : {
11803 : /* %typemap(ret) OGRErr */
11804 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11805 7 : resultobj = PyInt_FromLong( result );
11806 : }
11807 : }
11808 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11809 : return resultobj;
11810 0 : fail:
11811 0 : {
11812 : /* %typemap(freearg) char **dict */
11813 0 : CSLDestroy( arg4 );
11814 : }
11815 0 : {
11816 : /* %typemap(freearg) ( void* callback_data=NULL) */
11817 :
11818 0 : CPLFree(psProgressInfo);
11819 :
11820 : }
11821 : return NULL;
11822 : }
11823 :
11824 :
11825 4 : SWIGINTERN PyObject *_wrap_Layer_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11826 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11827 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11828 4 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
11829 4 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
11830 4 : char **arg4 = (char **) NULL ;
11831 4 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
11832 4 : void *arg6 = (void *) NULL ;
11833 4 : void *argp1 = 0 ;
11834 4 : int res1 = 0 ;
11835 4 : void *argp2 = 0 ;
11836 4 : int res2 = 0 ;
11837 4 : void *argp3 = 0 ;
11838 4 : int res3 = 0 ;
11839 4 : PyObject * obj0 = 0 ;
11840 4 : PyObject * obj1 = 0 ;
11841 4 : PyObject * obj2 = 0 ;
11842 4 : PyObject * obj3 = 0 ;
11843 4 : PyObject * obj4 = 0 ;
11844 4 : PyObject * obj5 = 0 ;
11845 4 : char * kwnames[] = {
11846 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
11847 : };
11848 4 : OGRErr result;
11849 :
11850 : /* %typemap(arginit) ( const char* callback_data=NULL) */
11851 4 : PyProgressData *psProgressInfo;
11852 4 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
11853 4 : psProgressInfo->nLastReported = -1;
11854 4 : psProgressInfo->psPyCallback = NULL;
11855 4 : psProgressInfo->psPyCallbackData = NULL;
11856 4 : arg6 = psProgressInfo;
11857 4 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_SymDifference", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11858 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11859 4 : if (!SWIG_IsOK(res1)) {
11860 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SymDifference" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11861 : }
11862 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11863 4 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11864 4 : if (!SWIG_IsOK(res2)) {
11865 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SymDifference" "', argument " "2"" of type '" "OGRLayerShadow *""'");
11866 : }
11867 4 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
11868 4 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11869 4 : if (!SWIG_IsOK(res3)) {
11870 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SymDifference" "', argument " "3"" of type '" "OGRLayerShadow *""'");
11871 : }
11872 4 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
11873 4 : if (obj3) {
11874 2 : {
11875 : /* %typemap(in) char **dict */
11876 2 : arg4 = NULL;
11877 2 : if ( PySequence_Check( obj3 ) ) {
11878 2 : int bErr = FALSE;
11879 2 : arg4 = CSLFromPySequence(obj3, &bErr);
11880 2 : if ( bErr )
11881 : {
11882 0 : SWIG_fail;
11883 : }
11884 : }
11885 0 : else if ( PyMapping_Check( obj3 ) ) {
11886 0 : int bErr = FALSE;
11887 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
11888 0 : if ( bErr )
11889 : {
11890 0 : SWIG_fail;
11891 : }
11892 : }
11893 : else {
11894 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
11895 0 : SWIG_fail;
11896 : }
11897 : }
11898 : }
11899 4 : if (obj4) {
11900 1 : {
11901 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
11902 : /* callback_func typemap */
11903 :
11904 : /* In some cases 0 is passed instead of None. */
11905 : /* See https://github.com/OSGeo/gdal/pull/219 */
11906 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
11907 : {
11908 0 : if( PyLong_AsLong(obj4) == 0 )
11909 : {
11910 0 : obj4 = Py_None;
11911 : }
11912 : }
11913 :
11914 1 : if (obj4 && obj4 != Py_None ) {
11915 1 : void* cbfunction = NULL;
11916 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
11917 : (void**)&cbfunction,
11918 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
11919 : SWIG_POINTER_EXCEPTION | 0 ));
11920 :
11921 1 : if ( cbfunction == GDALTermProgress ) {
11922 : arg5 = GDALTermProgress;
11923 : } else {
11924 1 : if (!PyCallable_Check(obj4)) {
11925 0 : PyErr_SetString( PyExc_RuntimeError,
11926 : "Object given is not a Python function" );
11927 0 : SWIG_fail;
11928 : }
11929 1 : psProgressInfo->psPyCallback = obj4;
11930 1 : arg5 = PyProgressProxy;
11931 : }
11932 :
11933 : }
11934 :
11935 : }
11936 : }
11937 4 : if (obj5) {
11938 0 : {
11939 : /* %typemap(in) ( void* callback_data=NULL) */
11940 0 : psProgressInfo->psPyCallbackData = obj5 ;
11941 : }
11942 : }
11943 4 : {
11944 4 : const int bLocalUseExceptions = GetUseExceptions();
11945 4 : if ( bLocalUseExceptions ) {
11946 4 : pushErrorHandler();
11947 : }
11948 4 : {
11949 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11950 4 : result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,arg5,arg6);
11951 4 : SWIG_PYTHON_THREAD_END_ALLOW;
11952 : }
11953 4 : if ( bLocalUseExceptions ) {
11954 4 : popErrorHandler();
11955 : }
11956 : #ifndef SED_HACKS
11957 : if ( bLocalUseExceptions ) {
11958 : CPLErr eclass = CPLGetLastErrorType();
11959 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11960 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11961 : }
11962 : }
11963 : #endif
11964 : }
11965 4 : {
11966 : /* %typemap(out) OGRErr */
11967 4 : if ( result != 0 && GetUseExceptions()) {
11968 0 : const char* pszMessage = CPLGetLastErrorMsg();
11969 0 : if( pszMessage[0] != '\0' )
11970 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11971 : else
11972 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11973 0 : SWIG_fail;
11974 : }
11975 : }
11976 4 : {
11977 : /* %typemap(freearg) char **dict */
11978 4 : CSLDestroy( arg4 );
11979 : }
11980 4 : {
11981 : /* %typemap(freearg) ( void* callback_data=NULL) */
11982 :
11983 4 : CPLFree(psProgressInfo);
11984 :
11985 : }
11986 4 : {
11987 : /* %typemap(ret) OGRErr */
11988 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11989 4 : resultobj = PyInt_FromLong( result );
11990 : }
11991 : }
11992 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11993 : return resultobj;
11994 0 : fail:
11995 0 : {
11996 : /* %typemap(freearg) char **dict */
11997 0 : CSLDestroy( arg4 );
11998 : }
11999 0 : {
12000 : /* %typemap(freearg) ( void* callback_data=NULL) */
12001 :
12002 0 : CPLFree(psProgressInfo);
12003 :
12004 : }
12005 : return NULL;
12006 : }
12007 :
12008 :
12009 6 : SWIGINTERN PyObject *_wrap_Layer_Identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12010 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12011 6 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12012 6 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
12013 6 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
12014 6 : char **arg4 = (char **) NULL ;
12015 6 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
12016 6 : void *arg6 = (void *) NULL ;
12017 6 : void *argp1 = 0 ;
12018 6 : int res1 = 0 ;
12019 6 : void *argp2 = 0 ;
12020 6 : int res2 = 0 ;
12021 6 : void *argp3 = 0 ;
12022 6 : int res3 = 0 ;
12023 6 : PyObject * obj0 = 0 ;
12024 6 : PyObject * obj1 = 0 ;
12025 6 : PyObject * obj2 = 0 ;
12026 6 : PyObject * obj3 = 0 ;
12027 6 : PyObject * obj4 = 0 ;
12028 6 : PyObject * obj5 = 0 ;
12029 6 : char * kwnames[] = {
12030 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
12031 : };
12032 6 : OGRErr result;
12033 :
12034 : /* %typemap(arginit) ( const char* callback_data=NULL) */
12035 6 : PyProgressData *psProgressInfo;
12036 6 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
12037 6 : psProgressInfo->nLastReported = -1;
12038 6 : psProgressInfo->psPyCallback = NULL;
12039 6 : psProgressInfo->psPyCallbackData = NULL;
12040 6 : arg6 = psProgressInfo;
12041 6 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Identity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12042 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12043 6 : if (!SWIG_IsOK(res1)) {
12044 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Identity" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12045 : }
12046 6 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12047 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12048 6 : if (!SWIG_IsOK(res2)) {
12049 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Identity" "', argument " "2"" of type '" "OGRLayerShadow *""'");
12050 : }
12051 6 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
12052 6 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12053 6 : if (!SWIG_IsOK(res3)) {
12054 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Identity" "', argument " "3"" of type '" "OGRLayerShadow *""'");
12055 : }
12056 6 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
12057 6 : if (obj3) {
12058 5 : {
12059 : /* %typemap(in) char **dict */
12060 5 : arg4 = NULL;
12061 5 : if ( PySequence_Check( obj3 ) ) {
12062 5 : int bErr = FALSE;
12063 5 : arg4 = CSLFromPySequence(obj3, &bErr);
12064 5 : if ( bErr )
12065 : {
12066 0 : SWIG_fail;
12067 : }
12068 : }
12069 0 : else if ( PyMapping_Check( obj3 ) ) {
12070 0 : int bErr = FALSE;
12071 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
12072 0 : if ( bErr )
12073 : {
12074 0 : SWIG_fail;
12075 : }
12076 : }
12077 : else {
12078 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12079 0 : SWIG_fail;
12080 : }
12081 : }
12082 : }
12083 6 : if (obj4) {
12084 1 : {
12085 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
12086 : /* callback_func typemap */
12087 :
12088 : /* In some cases 0 is passed instead of None. */
12089 : /* See https://github.com/OSGeo/gdal/pull/219 */
12090 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
12091 : {
12092 0 : if( PyLong_AsLong(obj4) == 0 )
12093 : {
12094 0 : obj4 = Py_None;
12095 : }
12096 : }
12097 :
12098 1 : if (obj4 && obj4 != Py_None ) {
12099 1 : void* cbfunction = NULL;
12100 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
12101 : (void**)&cbfunction,
12102 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
12103 : SWIG_POINTER_EXCEPTION | 0 ));
12104 :
12105 1 : if ( cbfunction == GDALTermProgress ) {
12106 : arg5 = GDALTermProgress;
12107 : } else {
12108 1 : if (!PyCallable_Check(obj4)) {
12109 0 : PyErr_SetString( PyExc_RuntimeError,
12110 : "Object given is not a Python function" );
12111 0 : SWIG_fail;
12112 : }
12113 1 : psProgressInfo->psPyCallback = obj4;
12114 1 : arg5 = PyProgressProxy;
12115 : }
12116 :
12117 : }
12118 :
12119 : }
12120 : }
12121 6 : if (obj5) {
12122 0 : {
12123 : /* %typemap(in) ( void* callback_data=NULL) */
12124 0 : psProgressInfo->psPyCallbackData = obj5 ;
12125 : }
12126 : }
12127 6 : {
12128 6 : const int bLocalUseExceptions = GetUseExceptions();
12129 6 : if ( bLocalUseExceptions ) {
12130 6 : pushErrorHandler();
12131 : }
12132 6 : {
12133 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12134 6 : result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,arg5,arg6);
12135 6 : SWIG_PYTHON_THREAD_END_ALLOW;
12136 : }
12137 6 : if ( bLocalUseExceptions ) {
12138 6 : popErrorHandler();
12139 : }
12140 : #ifndef SED_HACKS
12141 : if ( bLocalUseExceptions ) {
12142 : CPLErr eclass = CPLGetLastErrorType();
12143 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12144 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12145 : }
12146 : }
12147 : #endif
12148 : }
12149 6 : {
12150 : /* %typemap(out) OGRErr */
12151 6 : if ( result != 0 && GetUseExceptions()) {
12152 0 : const char* pszMessage = CPLGetLastErrorMsg();
12153 0 : if( pszMessage[0] != '\0' )
12154 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12155 : else
12156 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12157 0 : SWIG_fail;
12158 : }
12159 : }
12160 6 : {
12161 : /* %typemap(freearg) char **dict */
12162 6 : CSLDestroy( arg4 );
12163 : }
12164 6 : {
12165 : /* %typemap(freearg) ( void* callback_data=NULL) */
12166 :
12167 6 : CPLFree(psProgressInfo);
12168 :
12169 : }
12170 6 : {
12171 : /* %typemap(ret) OGRErr */
12172 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12173 6 : resultobj = PyInt_FromLong( result );
12174 : }
12175 : }
12176 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12177 : return resultobj;
12178 0 : fail:
12179 0 : {
12180 : /* %typemap(freearg) char **dict */
12181 0 : CSLDestroy( arg4 );
12182 : }
12183 0 : {
12184 : /* %typemap(freearg) ( void* callback_data=NULL) */
12185 :
12186 0 : CPLFree(psProgressInfo);
12187 :
12188 : }
12189 : return NULL;
12190 : }
12191 :
12192 :
12193 5 : SWIGINTERN PyObject *_wrap_Layer_Update(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12194 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12195 5 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12196 5 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
12197 5 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
12198 5 : char **arg4 = (char **) NULL ;
12199 5 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
12200 5 : void *arg6 = (void *) NULL ;
12201 5 : void *argp1 = 0 ;
12202 5 : int res1 = 0 ;
12203 5 : void *argp2 = 0 ;
12204 5 : int res2 = 0 ;
12205 5 : void *argp3 = 0 ;
12206 5 : int res3 = 0 ;
12207 5 : PyObject * obj0 = 0 ;
12208 5 : PyObject * obj1 = 0 ;
12209 5 : PyObject * obj2 = 0 ;
12210 5 : PyObject * obj3 = 0 ;
12211 5 : PyObject * obj4 = 0 ;
12212 5 : PyObject * obj5 = 0 ;
12213 5 : char * kwnames[] = {
12214 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
12215 : };
12216 5 : OGRErr result;
12217 :
12218 : /* %typemap(arginit) ( const char* callback_data=NULL) */
12219 5 : PyProgressData *psProgressInfo;
12220 5 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
12221 5 : psProgressInfo->nLastReported = -1;
12222 5 : psProgressInfo->psPyCallback = NULL;
12223 5 : psProgressInfo->psPyCallbackData = NULL;
12224 5 : arg6 = psProgressInfo;
12225 5 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Update", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12226 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12227 5 : if (!SWIG_IsOK(res1)) {
12228 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Update" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12229 : }
12230 5 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12231 5 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12232 5 : if (!SWIG_IsOK(res2)) {
12233 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Update" "', argument " "2"" of type '" "OGRLayerShadow *""'");
12234 : }
12235 5 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
12236 5 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12237 5 : if (!SWIG_IsOK(res3)) {
12238 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Update" "', argument " "3"" of type '" "OGRLayerShadow *""'");
12239 : }
12240 5 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
12241 5 : if (obj3) {
12242 2 : {
12243 : /* %typemap(in) char **dict */
12244 2 : arg4 = NULL;
12245 2 : if ( PySequence_Check( obj3 ) ) {
12246 2 : int bErr = FALSE;
12247 2 : arg4 = CSLFromPySequence(obj3, &bErr);
12248 2 : if ( bErr )
12249 : {
12250 0 : SWIG_fail;
12251 : }
12252 : }
12253 0 : else if ( PyMapping_Check( obj3 ) ) {
12254 0 : int bErr = FALSE;
12255 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
12256 0 : if ( bErr )
12257 : {
12258 0 : SWIG_fail;
12259 : }
12260 : }
12261 : else {
12262 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12263 0 : SWIG_fail;
12264 : }
12265 : }
12266 : }
12267 5 : if (obj4) {
12268 1 : {
12269 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
12270 : /* callback_func typemap */
12271 :
12272 : /* In some cases 0 is passed instead of None. */
12273 : /* See https://github.com/OSGeo/gdal/pull/219 */
12274 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
12275 : {
12276 0 : if( PyLong_AsLong(obj4) == 0 )
12277 : {
12278 0 : obj4 = Py_None;
12279 : }
12280 : }
12281 :
12282 1 : if (obj4 && obj4 != Py_None ) {
12283 1 : void* cbfunction = NULL;
12284 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
12285 : (void**)&cbfunction,
12286 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
12287 : SWIG_POINTER_EXCEPTION | 0 ));
12288 :
12289 1 : if ( cbfunction == GDALTermProgress ) {
12290 : arg5 = GDALTermProgress;
12291 : } else {
12292 1 : if (!PyCallable_Check(obj4)) {
12293 0 : PyErr_SetString( PyExc_RuntimeError,
12294 : "Object given is not a Python function" );
12295 0 : SWIG_fail;
12296 : }
12297 1 : psProgressInfo->psPyCallback = obj4;
12298 1 : arg5 = PyProgressProxy;
12299 : }
12300 :
12301 : }
12302 :
12303 : }
12304 : }
12305 5 : if (obj5) {
12306 0 : {
12307 : /* %typemap(in) ( void* callback_data=NULL) */
12308 0 : psProgressInfo->psPyCallbackData = obj5 ;
12309 : }
12310 : }
12311 5 : {
12312 5 : const int bLocalUseExceptions = GetUseExceptions();
12313 5 : if ( bLocalUseExceptions ) {
12314 5 : pushErrorHandler();
12315 : }
12316 5 : {
12317 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12318 5 : result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,arg5,arg6);
12319 5 : SWIG_PYTHON_THREAD_END_ALLOW;
12320 : }
12321 5 : if ( bLocalUseExceptions ) {
12322 5 : popErrorHandler();
12323 : }
12324 : #ifndef SED_HACKS
12325 : if ( bLocalUseExceptions ) {
12326 : CPLErr eclass = CPLGetLastErrorType();
12327 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12328 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12329 : }
12330 : }
12331 : #endif
12332 : }
12333 5 : {
12334 : /* %typemap(out) OGRErr */
12335 5 : if ( result != 0 && GetUseExceptions()) {
12336 0 : const char* pszMessage = CPLGetLastErrorMsg();
12337 0 : if( pszMessage[0] != '\0' )
12338 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12339 : else
12340 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12341 0 : SWIG_fail;
12342 : }
12343 : }
12344 5 : {
12345 : /* %typemap(freearg) char **dict */
12346 5 : CSLDestroy( arg4 );
12347 : }
12348 5 : {
12349 : /* %typemap(freearg) ( void* callback_data=NULL) */
12350 :
12351 5 : CPLFree(psProgressInfo);
12352 :
12353 : }
12354 5 : {
12355 : /* %typemap(ret) OGRErr */
12356 5 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12357 5 : resultobj = PyInt_FromLong( result );
12358 : }
12359 : }
12360 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12361 : return resultobj;
12362 0 : fail:
12363 0 : {
12364 : /* %typemap(freearg) char **dict */
12365 0 : CSLDestroy( arg4 );
12366 : }
12367 0 : {
12368 : /* %typemap(freearg) ( void* callback_data=NULL) */
12369 :
12370 0 : CPLFree(psProgressInfo);
12371 :
12372 : }
12373 : return NULL;
12374 : }
12375 :
12376 :
12377 3 : SWIGINTERN PyObject *_wrap_Layer_Clip(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12378 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12379 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12380 3 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
12381 3 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
12382 3 : char **arg4 = (char **) NULL ;
12383 3 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
12384 3 : void *arg6 = (void *) NULL ;
12385 3 : void *argp1 = 0 ;
12386 3 : int res1 = 0 ;
12387 3 : void *argp2 = 0 ;
12388 3 : int res2 = 0 ;
12389 3 : void *argp3 = 0 ;
12390 3 : int res3 = 0 ;
12391 3 : PyObject * obj0 = 0 ;
12392 3 : PyObject * obj1 = 0 ;
12393 3 : PyObject * obj2 = 0 ;
12394 3 : PyObject * obj3 = 0 ;
12395 3 : PyObject * obj4 = 0 ;
12396 3 : PyObject * obj5 = 0 ;
12397 3 : char * kwnames[] = {
12398 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
12399 : };
12400 3 : OGRErr result;
12401 :
12402 : /* %typemap(arginit) ( const char* callback_data=NULL) */
12403 3 : PyProgressData *psProgressInfo;
12404 3 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
12405 3 : psProgressInfo->nLastReported = -1;
12406 3 : psProgressInfo->psPyCallback = NULL;
12407 3 : psProgressInfo->psPyCallbackData = NULL;
12408 3 : arg6 = psProgressInfo;
12409 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Clip", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12410 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12411 3 : if (!SWIG_IsOK(res1)) {
12412 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Clip" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12413 : }
12414 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12415 3 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12416 3 : if (!SWIG_IsOK(res2)) {
12417 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Clip" "', argument " "2"" of type '" "OGRLayerShadow *""'");
12418 : }
12419 3 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
12420 3 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12421 3 : if (!SWIG_IsOK(res3)) {
12422 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Clip" "', argument " "3"" of type '" "OGRLayerShadow *""'");
12423 : }
12424 3 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
12425 3 : if (obj3) {
12426 2 : {
12427 : /* %typemap(in) char **dict */
12428 2 : arg4 = NULL;
12429 2 : if ( PySequence_Check( obj3 ) ) {
12430 2 : int bErr = FALSE;
12431 2 : arg4 = CSLFromPySequence(obj3, &bErr);
12432 2 : if ( bErr )
12433 : {
12434 0 : SWIG_fail;
12435 : }
12436 : }
12437 0 : else if ( PyMapping_Check( obj3 ) ) {
12438 0 : int bErr = FALSE;
12439 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
12440 0 : if ( bErr )
12441 : {
12442 0 : SWIG_fail;
12443 : }
12444 : }
12445 : else {
12446 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12447 0 : SWIG_fail;
12448 : }
12449 : }
12450 : }
12451 3 : if (obj4) {
12452 1 : {
12453 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
12454 : /* callback_func typemap */
12455 :
12456 : /* In some cases 0 is passed instead of None. */
12457 : /* See https://github.com/OSGeo/gdal/pull/219 */
12458 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
12459 : {
12460 0 : if( PyLong_AsLong(obj4) == 0 )
12461 : {
12462 0 : obj4 = Py_None;
12463 : }
12464 : }
12465 :
12466 1 : if (obj4 && obj4 != Py_None ) {
12467 1 : void* cbfunction = NULL;
12468 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
12469 : (void**)&cbfunction,
12470 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
12471 : SWIG_POINTER_EXCEPTION | 0 ));
12472 :
12473 1 : if ( cbfunction == GDALTermProgress ) {
12474 : arg5 = GDALTermProgress;
12475 : } else {
12476 1 : if (!PyCallable_Check(obj4)) {
12477 0 : PyErr_SetString( PyExc_RuntimeError,
12478 : "Object given is not a Python function" );
12479 0 : SWIG_fail;
12480 : }
12481 1 : psProgressInfo->psPyCallback = obj4;
12482 1 : arg5 = PyProgressProxy;
12483 : }
12484 :
12485 : }
12486 :
12487 : }
12488 : }
12489 3 : if (obj5) {
12490 0 : {
12491 : /* %typemap(in) ( void* callback_data=NULL) */
12492 0 : psProgressInfo->psPyCallbackData = obj5 ;
12493 : }
12494 : }
12495 3 : {
12496 3 : const int bLocalUseExceptions = GetUseExceptions();
12497 3 : if ( bLocalUseExceptions ) {
12498 3 : pushErrorHandler();
12499 : }
12500 3 : {
12501 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12502 3 : result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,arg5,arg6);
12503 3 : SWIG_PYTHON_THREAD_END_ALLOW;
12504 : }
12505 3 : if ( bLocalUseExceptions ) {
12506 3 : popErrorHandler();
12507 : }
12508 : #ifndef SED_HACKS
12509 : if ( bLocalUseExceptions ) {
12510 : CPLErr eclass = CPLGetLastErrorType();
12511 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12512 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12513 : }
12514 : }
12515 : #endif
12516 : }
12517 3 : {
12518 : /* %typemap(out) OGRErr */
12519 3 : if ( result != 0 && GetUseExceptions()) {
12520 0 : const char* pszMessage = CPLGetLastErrorMsg();
12521 0 : if( pszMessage[0] != '\0' )
12522 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12523 : else
12524 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12525 0 : SWIG_fail;
12526 : }
12527 : }
12528 3 : {
12529 : /* %typemap(freearg) char **dict */
12530 3 : CSLDestroy( arg4 );
12531 : }
12532 3 : {
12533 : /* %typemap(freearg) ( void* callback_data=NULL) */
12534 :
12535 3 : CPLFree(psProgressInfo);
12536 :
12537 : }
12538 3 : {
12539 : /* %typemap(ret) OGRErr */
12540 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12541 3 : resultobj = PyInt_FromLong( result );
12542 : }
12543 : }
12544 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12545 : return resultobj;
12546 0 : fail:
12547 0 : {
12548 : /* %typemap(freearg) char **dict */
12549 0 : CSLDestroy( arg4 );
12550 : }
12551 0 : {
12552 : /* %typemap(freearg) ( void* callback_data=NULL) */
12553 :
12554 0 : CPLFree(psProgressInfo);
12555 :
12556 : }
12557 : return NULL;
12558 : }
12559 :
12560 :
12561 6 : SWIGINTERN PyObject *_wrap_Layer_Erase(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12562 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12563 6 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12564 6 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
12565 6 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
12566 6 : char **arg4 = (char **) NULL ;
12567 6 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
12568 6 : void *arg6 = (void *) NULL ;
12569 6 : void *argp1 = 0 ;
12570 6 : int res1 = 0 ;
12571 6 : void *argp2 = 0 ;
12572 6 : int res2 = 0 ;
12573 6 : void *argp3 = 0 ;
12574 6 : int res3 = 0 ;
12575 6 : PyObject * obj0 = 0 ;
12576 6 : PyObject * obj1 = 0 ;
12577 6 : PyObject * obj2 = 0 ;
12578 6 : PyObject * obj3 = 0 ;
12579 6 : PyObject * obj4 = 0 ;
12580 6 : PyObject * obj5 = 0 ;
12581 6 : char * kwnames[] = {
12582 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
12583 : };
12584 6 : OGRErr result;
12585 :
12586 : /* %typemap(arginit) ( const char* callback_data=NULL) */
12587 6 : PyProgressData *psProgressInfo;
12588 6 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
12589 6 : psProgressInfo->nLastReported = -1;
12590 6 : psProgressInfo->psPyCallback = NULL;
12591 6 : psProgressInfo->psPyCallbackData = NULL;
12592 6 : arg6 = psProgressInfo;
12593 6 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Erase", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12594 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12595 6 : if (!SWIG_IsOK(res1)) {
12596 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Erase" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12597 : }
12598 6 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12599 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12600 6 : if (!SWIG_IsOK(res2)) {
12601 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Erase" "', argument " "2"" of type '" "OGRLayerShadow *""'");
12602 : }
12603 6 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
12604 6 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12605 6 : if (!SWIG_IsOK(res3)) {
12606 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Erase" "', argument " "3"" of type '" "OGRLayerShadow *""'");
12607 : }
12608 6 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
12609 6 : if (obj3) {
12610 3 : {
12611 : /* %typemap(in) char **dict */
12612 3 : arg4 = NULL;
12613 3 : if ( PySequence_Check( obj3 ) ) {
12614 3 : int bErr = FALSE;
12615 3 : arg4 = CSLFromPySequence(obj3, &bErr);
12616 3 : if ( bErr )
12617 : {
12618 0 : SWIG_fail;
12619 : }
12620 : }
12621 0 : else if ( PyMapping_Check( obj3 ) ) {
12622 0 : int bErr = FALSE;
12623 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
12624 0 : if ( bErr )
12625 : {
12626 0 : SWIG_fail;
12627 : }
12628 : }
12629 : else {
12630 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12631 0 : SWIG_fail;
12632 : }
12633 : }
12634 : }
12635 6 : if (obj4) {
12636 1 : {
12637 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
12638 : /* callback_func typemap */
12639 :
12640 : /* In some cases 0 is passed instead of None. */
12641 : /* See https://github.com/OSGeo/gdal/pull/219 */
12642 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
12643 : {
12644 0 : if( PyLong_AsLong(obj4) == 0 )
12645 : {
12646 0 : obj4 = Py_None;
12647 : }
12648 : }
12649 :
12650 1 : if (obj4 && obj4 != Py_None ) {
12651 1 : void* cbfunction = NULL;
12652 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
12653 : (void**)&cbfunction,
12654 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
12655 : SWIG_POINTER_EXCEPTION | 0 ));
12656 :
12657 1 : if ( cbfunction == GDALTermProgress ) {
12658 : arg5 = GDALTermProgress;
12659 : } else {
12660 1 : if (!PyCallable_Check(obj4)) {
12661 0 : PyErr_SetString( PyExc_RuntimeError,
12662 : "Object given is not a Python function" );
12663 0 : SWIG_fail;
12664 : }
12665 1 : psProgressInfo->psPyCallback = obj4;
12666 1 : arg5 = PyProgressProxy;
12667 : }
12668 :
12669 : }
12670 :
12671 : }
12672 : }
12673 6 : if (obj5) {
12674 0 : {
12675 : /* %typemap(in) ( void* callback_data=NULL) */
12676 0 : psProgressInfo->psPyCallbackData = obj5 ;
12677 : }
12678 : }
12679 6 : {
12680 6 : const int bLocalUseExceptions = GetUseExceptions();
12681 6 : if ( bLocalUseExceptions ) {
12682 6 : pushErrorHandler();
12683 : }
12684 6 : {
12685 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12686 6 : result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,arg5,arg6);
12687 6 : SWIG_PYTHON_THREAD_END_ALLOW;
12688 : }
12689 6 : if ( bLocalUseExceptions ) {
12690 6 : popErrorHandler();
12691 : }
12692 : #ifndef SED_HACKS
12693 : if ( bLocalUseExceptions ) {
12694 : CPLErr eclass = CPLGetLastErrorType();
12695 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12696 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12697 : }
12698 : }
12699 : #endif
12700 : }
12701 6 : {
12702 : /* %typemap(out) OGRErr */
12703 6 : if ( result != 0 && GetUseExceptions()) {
12704 0 : const char* pszMessage = CPLGetLastErrorMsg();
12705 0 : if( pszMessage[0] != '\0' )
12706 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12707 : else
12708 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12709 0 : SWIG_fail;
12710 : }
12711 : }
12712 6 : {
12713 : /* %typemap(freearg) char **dict */
12714 6 : CSLDestroy( arg4 );
12715 : }
12716 6 : {
12717 : /* %typemap(freearg) ( void* callback_data=NULL) */
12718 :
12719 6 : CPLFree(psProgressInfo);
12720 :
12721 : }
12722 6 : {
12723 : /* %typemap(ret) OGRErr */
12724 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12725 6 : resultobj = PyInt_FromLong( result );
12726 : }
12727 : }
12728 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12729 : return resultobj;
12730 0 : fail:
12731 0 : {
12732 : /* %typemap(freearg) char **dict */
12733 0 : CSLDestroy( arg4 );
12734 : }
12735 0 : {
12736 : /* %typemap(freearg) ( void* callback_data=NULL) */
12737 :
12738 0 : CPLFree(psProgressInfo);
12739 :
12740 : }
12741 : return NULL;
12742 : }
12743 :
12744 :
12745 3 : SWIGINTERN PyObject *_wrap_Layer_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12746 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12747 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12748 3 : void *argp1 = 0 ;
12749 3 : int res1 = 0 ;
12750 3 : PyObject *swig_obj[1] ;
12751 3 : OGRStyleTableShadow *result = 0 ;
12752 :
12753 3 : if (!args) SWIG_fail;
12754 3 : swig_obj[0] = args;
12755 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12756 3 : if (!SWIG_IsOK(res1)) {
12757 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetStyleTable" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12758 : }
12759 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12760 3 : {
12761 3 : const int bLocalUseExceptions = GetUseExceptions();
12762 3 : if ( bLocalUseExceptions ) {
12763 3 : pushErrorHandler();
12764 : }
12765 3 : {
12766 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12767 3 : result = (OGRStyleTableShadow *)OGRLayerShadow_GetStyleTable(arg1);
12768 3 : SWIG_PYTHON_THREAD_END_ALLOW;
12769 : }
12770 3 : if ( bLocalUseExceptions ) {
12771 3 : popErrorHandler();
12772 : }
12773 : #ifndef SED_HACKS
12774 : if ( bLocalUseExceptions ) {
12775 : CPLErr eclass = CPLGetLastErrorType();
12776 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12777 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12778 : }
12779 : }
12780 : #endif
12781 : }
12782 3 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
12783 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12784 : return resultobj;
12785 : fail:
12786 : return NULL;
12787 : }
12788 :
12789 :
12790 2 : SWIGINTERN PyObject *_wrap_Layer_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12791 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12792 2 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12793 2 : OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
12794 2 : void *argp1 = 0 ;
12795 2 : int res1 = 0 ;
12796 2 : void *argp2 = 0 ;
12797 2 : int res2 = 0 ;
12798 2 : PyObject *swig_obj[2] ;
12799 :
12800 2 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
12801 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12802 2 : if (!SWIG_IsOK(res1)) {
12803 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetStyleTable" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12804 : }
12805 2 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12806 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
12807 2 : if (!SWIG_IsOK(res2)) {
12808 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'");
12809 : }
12810 2 : arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
12811 2 : {
12812 2 : const int bLocalUseExceptions = GetUseExceptions();
12813 2 : if ( bLocalUseExceptions ) {
12814 2 : pushErrorHandler();
12815 : }
12816 2 : {
12817 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12818 2 : OGRLayerShadow_SetStyleTable(arg1,arg2);
12819 2 : SWIG_PYTHON_THREAD_END_ALLOW;
12820 : }
12821 2 : if ( bLocalUseExceptions ) {
12822 2 : popErrorHandler();
12823 : }
12824 : #ifndef SED_HACKS
12825 : if ( bLocalUseExceptions ) {
12826 : CPLErr eclass = CPLGetLastErrorType();
12827 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12828 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12829 : }
12830 : }
12831 : #endif
12832 : }
12833 2 : resultobj = SWIG_Py_Void();
12834 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12835 : return resultobj;
12836 : fail:
12837 : return NULL;
12838 : }
12839 :
12840 :
12841 16 : SWIGINTERN PyObject *_wrap_Layer_ExportArrowArrayStreamPyCapsule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12842 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12843 16 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12844 16 : char **arg2 = (char **) NULL ;
12845 16 : void *argp1 = 0 ;
12846 16 : int res1 = 0 ;
12847 16 : PyObject *swig_obj[2] ;
12848 16 : PyObject *result = 0 ;
12849 :
12850 16 : if (!SWIG_Python_UnpackTuple(args, "Layer_ExportArrowArrayStreamPyCapsule", 1, 2, swig_obj)) SWIG_fail;
12851 16 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12852 16 : if (!SWIG_IsOK(res1)) {
12853 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ExportArrowArrayStreamPyCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12854 : }
12855 16 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12856 16 : if (swig_obj[1]) {
12857 1 : {
12858 : /* %typemap(in) char **dict */
12859 1 : arg2 = NULL;
12860 1 : if ( PySequence_Check( swig_obj[1] ) ) {
12861 0 : int bErr = FALSE;
12862 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
12863 0 : if ( bErr )
12864 : {
12865 0 : SWIG_fail;
12866 : }
12867 : }
12868 1 : else if ( PyMapping_Check( swig_obj[1] ) ) {
12869 1 : int bErr = FALSE;
12870 1 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
12871 1 : if ( bErr )
12872 : {
12873 0 : SWIG_fail;
12874 : }
12875 : }
12876 : else {
12877 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12878 0 : SWIG_fail;
12879 : }
12880 : }
12881 : }
12882 16 : {
12883 16 : const int bLocalUseExceptions = GetUseExceptions();
12884 16 : if ( bLocalUseExceptions ) {
12885 16 : pushErrorHandler();
12886 : }
12887 16 : {
12888 16 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12889 16 : result = (PyObject *)OGRLayerShadow_ExportArrowArrayStreamPyCapsule(arg1,arg2);
12890 16 : SWIG_PYTHON_THREAD_END_ALLOW;
12891 : }
12892 16 : if ( bLocalUseExceptions ) {
12893 16 : popErrorHandler();
12894 : }
12895 : #ifndef SED_HACKS
12896 : if ( bLocalUseExceptions ) {
12897 : CPLErr eclass = CPLGetLastErrorType();
12898 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12899 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12900 : }
12901 : }
12902 : #endif
12903 : }
12904 16 : resultobj = result;
12905 16 : {
12906 : /* %typemap(freearg) char **dict */
12907 16 : CSLDestroy( arg2 );
12908 : }
12909 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12910 : return resultobj;
12911 0 : fail:
12912 0 : {
12913 : /* %typemap(freearg) char **dict */
12914 0 : CSLDestroy( arg2 );
12915 : }
12916 : return NULL;
12917 : }
12918 :
12919 :
12920 352 : SWIGINTERN PyObject *_wrap_Layer_GetArrowStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12921 352 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12922 352 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12923 352 : char **arg2 = (char **) NULL ;
12924 352 : void *argp1 = 0 ;
12925 352 : int res1 = 0 ;
12926 352 : PyObject *swig_obj[2] ;
12927 352 : ArrowArrayStream *result = 0 ;
12928 :
12929 352 : if (!SWIG_Python_UnpackTuple(args, "Layer_GetArrowStream", 1, 2, swig_obj)) SWIG_fail;
12930 352 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12931 352 : if (!SWIG_IsOK(res1)) {
12932 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetArrowStream" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12933 : }
12934 352 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12935 352 : if (swig_obj[1]) {
12936 325 : {
12937 : /* %typemap(in) char **dict */
12938 325 : arg2 = NULL;
12939 325 : if ( PySequence_Check( swig_obj[1] ) ) {
12940 325 : int bErr = FALSE;
12941 325 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
12942 325 : if ( bErr )
12943 : {
12944 0 : SWIG_fail;
12945 : }
12946 : }
12947 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
12948 0 : int bErr = FALSE;
12949 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
12950 0 : if ( bErr )
12951 : {
12952 0 : SWIG_fail;
12953 : }
12954 : }
12955 : else {
12956 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12957 0 : SWIG_fail;
12958 : }
12959 : }
12960 : }
12961 352 : {
12962 352 : const int bLocalUseExceptions = GetUseExceptions();
12963 352 : if ( bLocalUseExceptions ) {
12964 234 : pushErrorHandler();
12965 : }
12966 352 : {
12967 352 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12968 352 : result = (ArrowArrayStream *)OGRLayerShadow_GetArrowStream(arg1,arg2);
12969 352 : SWIG_PYTHON_THREAD_END_ALLOW;
12970 : }
12971 352 : if ( bLocalUseExceptions ) {
12972 234 : popErrorHandler();
12973 : }
12974 : #ifndef SED_HACKS
12975 : if ( bLocalUseExceptions ) {
12976 : CPLErr eclass = CPLGetLastErrorType();
12977 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12978 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12979 : }
12980 : }
12981 : #endif
12982 : }
12983 352 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArrayStream, SWIG_POINTER_OWN | 0 );
12984 352 : {
12985 : /* %typemap(freearg) char **dict */
12986 352 : CSLDestroy( arg2 );
12987 : }
12988 352 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12989 : return resultobj;
12990 0 : fail:
12991 0 : {
12992 : /* %typemap(freearg) char **dict */
12993 0 : CSLDestroy( arg2 );
12994 : }
12995 : return NULL;
12996 : }
12997 :
12998 :
12999 19 : SWIGINTERN PyObject *_wrap_Layer_IsArrowSchemaSupported(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13000 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13001 19 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13002 19 : ArrowSchema *arg2 = (ArrowSchema *) 0 ;
13003 19 : bool *arg3 = (bool *) 0 ;
13004 19 : char **arg4 = (char **) 0 ;
13005 19 : char **arg5 = (char **) NULL ;
13006 19 : void *argp1 = 0 ;
13007 19 : int res1 = 0 ;
13008 19 : void *argp2 = 0 ;
13009 19 : int res2 = 0 ;
13010 19 : bool ret3 ;
13011 19 : char *errorMsg3 ;
13012 19 : PyObject *swig_obj[3] ;
13013 :
13014 19 : {
13015 : /* %typemap(in,numinputs=0) (bool* pbRet, char **errorMsg3) */
13016 19 : arg3 = &ret3;
13017 19 : arg4 = &errorMsg3;
13018 : }
13019 19 : if (!SWIG_Python_UnpackTuple(args, "Layer_IsArrowSchemaSupported", 2, 3, swig_obj)) SWIG_fail;
13020 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13021 19 : if (!SWIG_IsOK(res1)) {
13022 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_IsArrowSchemaSupported" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13023 : }
13024 19 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13025 19 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 | 0 );
13026 19 : if (!SWIG_IsOK(res2)) {
13027 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_IsArrowSchemaSupported" "', argument " "2"" of type '" "ArrowSchema const *""'");
13028 : }
13029 19 : arg2 = reinterpret_cast< ArrowSchema * >(argp2);
13030 19 : if (swig_obj[2]) {
13031 3 : {
13032 : /* %typemap(in) char **dict */
13033 3 : arg5 = NULL;
13034 3 : if ( PySequence_Check( swig_obj[2] ) ) {
13035 3 : int bErr = FALSE;
13036 3 : arg5 = CSLFromPySequence(swig_obj[2], &bErr);
13037 3 : if ( bErr )
13038 : {
13039 0 : SWIG_fail;
13040 : }
13041 : }
13042 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
13043 0 : int bErr = FALSE;
13044 0 : arg5 = CSLFromPyMapping(swig_obj[2], &bErr);
13045 0 : if ( bErr )
13046 : {
13047 0 : SWIG_fail;
13048 : }
13049 : }
13050 : else {
13051 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13052 0 : SWIG_fail;
13053 : }
13054 : }
13055 : }
13056 19 : {
13057 19 : const int bLocalUseExceptions = GetUseExceptions();
13058 19 : if ( bLocalUseExceptions ) {
13059 19 : pushErrorHandler();
13060 : }
13061 19 : {
13062 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13063 19 : OGRLayerShadow_IsArrowSchemaSupported(arg1,(ArrowSchema const *)arg2,arg3,arg4,arg5);
13064 19 : SWIG_PYTHON_THREAD_END_ALLOW;
13065 : }
13066 19 : if ( bLocalUseExceptions ) {
13067 19 : popErrorHandler();
13068 : }
13069 : #ifndef SED_HACKS
13070 : if ( bLocalUseExceptions ) {
13071 : CPLErr eclass = CPLGetLastErrorType();
13072 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13073 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13074 : }
13075 : }
13076 : #endif
13077 : }
13078 19 : resultobj = SWIG_Py_Void();
13079 19 : {
13080 : /* %typemap(argout) (bool* pbRet, char **errorMsg)*/
13081 19 : Py_DECREF(resultobj);
13082 19 : resultobj = PyTuple_New(2);
13083 19 : PyTuple_SetItem(resultobj, 0, PyBool_FromLong(*arg3));
13084 19 : if( *arg4 )
13085 : {
13086 4 : PyTuple_SetItem(resultobj, 1, PyUnicode_FromString(*arg4));
13087 4 : VSIFree(*arg4);
13088 : }
13089 : else
13090 : {
13091 15 : PyTuple_SetItem(resultobj, 1, Py_None);
13092 15 : Py_INCREF(Py_None);
13093 : }
13094 : }
13095 19 : {
13096 : /* %typemap(freearg) char **dict */
13097 19 : CSLDestroy( arg5 );
13098 : }
13099 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13100 : return resultobj;
13101 0 : fail:
13102 0 : {
13103 : /* %typemap(freearg) char **dict */
13104 0 : CSLDestroy( arg5 );
13105 : }
13106 : return NULL;
13107 : }
13108 :
13109 :
13110 526 : SWIGINTERN PyObject *_wrap_Layer_CreateFieldFromArrowSchema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13111 526 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13112 526 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13113 526 : ArrowSchema *arg2 = (ArrowSchema *) 0 ;
13114 526 : char **arg3 = (char **) NULL ;
13115 526 : void *argp1 = 0 ;
13116 526 : int res1 = 0 ;
13117 526 : void *argp2 = 0 ;
13118 526 : int res2 = 0 ;
13119 526 : PyObject *swig_obj[3] ;
13120 526 : OGRErr result;
13121 :
13122 526 : if (!SWIG_Python_UnpackTuple(args, "Layer_CreateFieldFromArrowSchema", 2, 3, swig_obj)) SWIG_fail;
13123 526 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13124 526 : if (!SWIG_IsOK(res1)) {
13125 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFieldFromArrowSchema" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13126 : }
13127 526 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13128 526 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 | 0 );
13129 526 : if (!SWIG_IsOK(res2)) {
13130 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFieldFromArrowSchema" "', argument " "2"" of type '" "ArrowSchema const *""'");
13131 : }
13132 526 : arg2 = reinterpret_cast< ArrowSchema * >(argp2);
13133 526 : if (swig_obj[2]) {
13134 119 : {
13135 : /* %typemap(in) char **dict */
13136 119 : arg3 = NULL;
13137 119 : if ( PySequence_Check( swig_obj[2] ) ) {
13138 119 : int bErr = FALSE;
13139 119 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
13140 119 : if ( bErr )
13141 : {
13142 0 : SWIG_fail;
13143 : }
13144 : }
13145 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
13146 0 : int bErr = FALSE;
13147 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
13148 0 : if ( bErr )
13149 : {
13150 0 : SWIG_fail;
13151 : }
13152 : }
13153 : else {
13154 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13155 0 : SWIG_fail;
13156 : }
13157 : }
13158 : }
13159 526 : {
13160 526 : const int bLocalUseExceptions = GetUseExceptions();
13161 526 : if ( bLocalUseExceptions ) {
13162 526 : pushErrorHandler();
13163 : }
13164 526 : {
13165 526 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13166 526 : result = (OGRErr)OGRLayerShadow_CreateFieldFromArrowSchema(arg1,(ArrowSchema const *)arg2,arg3);
13167 526 : SWIG_PYTHON_THREAD_END_ALLOW;
13168 : }
13169 526 : if ( bLocalUseExceptions ) {
13170 526 : popErrorHandler();
13171 : }
13172 : #ifndef SED_HACKS
13173 : if ( bLocalUseExceptions ) {
13174 : CPLErr eclass = CPLGetLastErrorType();
13175 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13176 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13177 : }
13178 : }
13179 : #endif
13180 : }
13181 526 : {
13182 : /* %typemap(out) OGRErr */
13183 526 : if ( result != 0 && GetUseExceptions()) {
13184 0 : const char* pszMessage = CPLGetLastErrorMsg();
13185 0 : if( pszMessage[0] != '\0' )
13186 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13187 : else
13188 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13189 0 : SWIG_fail;
13190 : }
13191 : }
13192 526 : {
13193 : /* %typemap(freearg) char **dict */
13194 526 : CSLDestroy( arg3 );
13195 : }
13196 526 : {
13197 : /* %typemap(ret) OGRErr */
13198 526 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13199 526 : resultobj = PyInt_FromLong( result );
13200 : }
13201 : }
13202 526 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13203 : return resultobj;
13204 0 : fail:
13205 0 : {
13206 : /* %typemap(freearg) char **dict */
13207 0 : CSLDestroy( arg3 );
13208 : }
13209 : return NULL;
13210 : }
13211 :
13212 :
13213 47 : SWIGINTERN PyObject *_wrap_Layer_WriteArrowBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13214 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13215 47 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13216 47 : ArrowSchema *arg2 = (ArrowSchema *) 0 ;
13217 47 : ArrowArray *arg3 = (ArrowArray *) 0 ;
13218 47 : char **arg4 = (char **) NULL ;
13219 47 : void *argp1 = 0 ;
13220 47 : int res1 = 0 ;
13221 47 : void *argp2 = 0 ;
13222 47 : int res2 = 0 ;
13223 47 : void *argp3 = 0 ;
13224 47 : int res3 = 0 ;
13225 47 : PyObject *swig_obj[4] ;
13226 47 : OGRErr result;
13227 :
13228 47 : if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowBatch", 3, 4, swig_obj)) SWIG_fail;
13229 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13230 47 : if (!SWIG_IsOK(res1)) {
13231 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowBatch" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13232 : }
13233 47 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13234 47 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 | 0 );
13235 47 : if (!SWIG_IsOK(res2)) {
13236 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_WriteArrowBatch" "', argument " "2"" of type '" "ArrowSchema const *""'");
13237 : }
13238 47 : arg2 = reinterpret_cast< ArrowSchema * >(argp2);
13239 47 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_ArrowArray, 0 | 0 );
13240 47 : if (!SWIG_IsOK(res3)) {
13241 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_WriteArrowBatch" "', argument " "3"" of type '" "ArrowArray *""'");
13242 : }
13243 47 : arg3 = reinterpret_cast< ArrowArray * >(argp3);
13244 47 : if (swig_obj[3]) {
13245 23 : {
13246 : /* %typemap(in) char **dict */
13247 23 : arg4 = NULL;
13248 23 : if ( PySequence_Check( swig_obj[3] ) ) {
13249 11 : int bErr = FALSE;
13250 11 : arg4 = CSLFromPySequence(swig_obj[3], &bErr);
13251 11 : if ( bErr )
13252 : {
13253 0 : SWIG_fail;
13254 : }
13255 : }
13256 12 : else if ( PyMapping_Check( swig_obj[3] ) ) {
13257 12 : int bErr = FALSE;
13258 12 : arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
13259 12 : if ( bErr )
13260 : {
13261 0 : SWIG_fail;
13262 : }
13263 : }
13264 : else {
13265 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13266 0 : SWIG_fail;
13267 : }
13268 : }
13269 : }
13270 47 : {
13271 47 : const int bLocalUseExceptions = GetUseExceptions();
13272 47 : if ( bLocalUseExceptions ) {
13273 47 : pushErrorHandler();
13274 : }
13275 47 : {
13276 47 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13277 47 : result = (OGRErr)OGRLayerShadow_WriteArrowBatch(arg1,(ArrowSchema const *)arg2,arg3,arg4);
13278 47 : SWIG_PYTHON_THREAD_END_ALLOW;
13279 : }
13280 47 : if ( bLocalUseExceptions ) {
13281 47 : popErrorHandler();
13282 : }
13283 : #ifndef SED_HACKS
13284 : if ( bLocalUseExceptions ) {
13285 : CPLErr eclass = CPLGetLastErrorType();
13286 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13287 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13288 : }
13289 : }
13290 : #endif
13291 : }
13292 47 : {
13293 : /* %typemap(out) OGRErr */
13294 58 : if ( result != 0 && GetUseExceptions()) {
13295 11 : const char* pszMessage = CPLGetLastErrorMsg();
13296 11 : if( pszMessage[0] != '\0' )
13297 11 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13298 : else
13299 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13300 11 : SWIG_fail;
13301 : }
13302 : }
13303 36 : {
13304 : /* %typemap(freearg) char **dict */
13305 36 : CSLDestroy( arg4 );
13306 : }
13307 36 : {
13308 : /* %typemap(ret) OGRErr */
13309 36 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13310 36 : resultobj = PyInt_FromLong( result );
13311 : }
13312 : }
13313 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13314 : return resultobj;
13315 11 : fail:
13316 11 : {
13317 : /* %typemap(freearg) char **dict */
13318 11 : CSLDestroy( arg4 );
13319 : }
13320 : return NULL;
13321 : }
13322 :
13323 :
13324 12 : SWIGINTERN PyObject *_wrap_Layer_WriteArrowStreamCapsule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13325 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13326 12 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13327 12 : PyObject *arg2 = (PyObject *) 0 ;
13328 12 : int arg3 ;
13329 12 : char **arg4 = (char **) NULL ;
13330 12 : void *argp1 = 0 ;
13331 12 : int res1 = 0 ;
13332 12 : int val3 ;
13333 12 : int ecode3 = 0 ;
13334 12 : PyObject *swig_obj[4] ;
13335 12 : OGRErr result;
13336 :
13337 12 : if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowStreamCapsule", 3, 4, swig_obj)) SWIG_fail;
13338 12 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13339 12 : if (!SWIG_IsOK(res1)) {
13340 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowStreamCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13341 : }
13342 12 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13343 12 : arg2 = swig_obj[1];
13344 12 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
13345 12 : if (!SWIG_IsOK(ecode3)) {
13346 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_WriteArrowStreamCapsule" "', argument " "3"" of type '" "int""'");
13347 : }
13348 12 : arg3 = static_cast< int >(val3);
13349 12 : if (swig_obj[3]) {
13350 12 : {
13351 : /* %typemap(in) char **dict */
13352 12 : arg4 = NULL;
13353 12 : if ( PySequence_Check( swig_obj[3] ) ) {
13354 12 : int bErr = FALSE;
13355 12 : arg4 = CSLFromPySequence(swig_obj[3], &bErr);
13356 12 : if ( bErr )
13357 : {
13358 0 : SWIG_fail;
13359 : }
13360 : }
13361 0 : else if ( PyMapping_Check( swig_obj[3] ) ) {
13362 0 : int bErr = FALSE;
13363 0 : arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
13364 0 : if ( bErr )
13365 : {
13366 0 : SWIG_fail;
13367 : }
13368 : }
13369 : else {
13370 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13371 0 : SWIG_fail;
13372 : }
13373 : }
13374 : }
13375 12 : {
13376 12 : const int bLocalUseExceptions = GetUseExceptions();
13377 12 : if ( bLocalUseExceptions ) {
13378 12 : pushErrorHandler();
13379 : }
13380 12 : {
13381 12 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13382 12 : result = (OGRErr)OGRLayerShadow_WriteArrowStreamCapsule(arg1,arg2,arg3,arg4);
13383 12 : SWIG_PYTHON_THREAD_END_ALLOW;
13384 : }
13385 12 : if ( bLocalUseExceptions ) {
13386 12 : popErrorHandler();
13387 : }
13388 : #ifndef SED_HACKS
13389 : if ( bLocalUseExceptions ) {
13390 : CPLErr eclass = CPLGetLastErrorType();
13391 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13392 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13393 : }
13394 : }
13395 : #endif
13396 : }
13397 12 : {
13398 : /* %typemap(out) OGRErr */
13399 12 : if ( result != 0 && GetUseExceptions()) {
13400 0 : const char* pszMessage = CPLGetLastErrorMsg();
13401 0 : if( pszMessage[0] != '\0' )
13402 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13403 : else
13404 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13405 0 : SWIG_fail;
13406 : }
13407 : }
13408 12 : {
13409 : /* %typemap(freearg) char **dict */
13410 12 : CSLDestroy( arg4 );
13411 : }
13412 12 : {
13413 : /* %typemap(ret) OGRErr */
13414 12 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13415 12 : resultobj = PyInt_FromLong( result );
13416 : }
13417 : }
13418 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13419 : return resultobj;
13420 0 : fail:
13421 0 : {
13422 : /* %typemap(freearg) char **dict */
13423 0 : CSLDestroy( arg4 );
13424 : }
13425 : return NULL;
13426 : }
13427 :
13428 :
13429 0 : SWIGINTERN PyObject *_wrap_Layer_WriteArrowSchemaAndArrowArrayCapsule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13430 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13431 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13432 0 : PyObject *arg2 = (PyObject *) 0 ;
13433 0 : PyObject *arg3 = (PyObject *) 0 ;
13434 0 : int arg4 ;
13435 0 : char **arg5 = (char **) NULL ;
13436 0 : void *argp1 = 0 ;
13437 0 : int res1 = 0 ;
13438 0 : int val4 ;
13439 0 : int ecode4 = 0 ;
13440 0 : PyObject *swig_obj[5] ;
13441 0 : OGRErr result;
13442 :
13443 0 : if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowSchemaAndArrowArrayCapsule", 4, 5, swig_obj)) SWIG_fail;
13444 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13445 0 : if (!SWIG_IsOK(res1)) {
13446 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowSchemaAndArrowArrayCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13447 : }
13448 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13449 0 : arg2 = swig_obj[1];
13450 0 : arg3 = swig_obj[2];
13451 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
13452 0 : if (!SWIG_IsOK(ecode4)) {
13453 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_WriteArrowSchemaAndArrowArrayCapsule" "', argument " "4"" of type '" "int""'");
13454 : }
13455 0 : arg4 = static_cast< int >(val4);
13456 0 : if (swig_obj[4]) {
13457 0 : {
13458 : /* %typemap(in) char **dict */
13459 0 : arg5 = NULL;
13460 0 : if ( PySequence_Check( swig_obj[4] ) ) {
13461 0 : int bErr = FALSE;
13462 0 : arg5 = CSLFromPySequence(swig_obj[4], &bErr);
13463 0 : if ( bErr )
13464 : {
13465 0 : SWIG_fail;
13466 : }
13467 : }
13468 0 : else if ( PyMapping_Check( swig_obj[4] ) ) {
13469 0 : int bErr = FALSE;
13470 0 : arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
13471 0 : if ( bErr )
13472 : {
13473 0 : SWIG_fail;
13474 : }
13475 : }
13476 : else {
13477 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13478 0 : SWIG_fail;
13479 : }
13480 : }
13481 : }
13482 0 : {
13483 0 : const int bLocalUseExceptions = GetUseExceptions();
13484 0 : if ( bLocalUseExceptions ) {
13485 0 : pushErrorHandler();
13486 : }
13487 0 : {
13488 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13489 0 : result = (OGRErr)OGRLayerShadow_WriteArrowSchemaAndArrowArrayCapsule(arg1,arg2,arg3,arg4,arg5);
13490 0 : SWIG_PYTHON_THREAD_END_ALLOW;
13491 : }
13492 0 : if ( bLocalUseExceptions ) {
13493 0 : popErrorHandler();
13494 : }
13495 : #ifndef SED_HACKS
13496 : if ( bLocalUseExceptions ) {
13497 : CPLErr eclass = CPLGetLastErrorType();
13498 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13499 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13500 : }
13501 : }
13502 : #endif
13503 : }
13504 0 : {
13505 : /* %typemap(out) OGRErr */
13506 0 : if ( result != 0 && GetUseExceptions()) {
13507 0 : const char* pszMessage = CPLGetLastErrorMsg();
13508 0 : if( pszMessage[0] != '\0' )
13509 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13510 : else
13511 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13512 0 : SWIG_fail;
13513 : }
13514 : }
13515 0 : {
13516 : /* %typemap(freearg) char **dict */
13517 0 : CSLDestroy( arg5 );
13518 : }
13519 0 : {
13520 : /* %typemap(ret) OGRErr */
13521 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13522 0 : resultobj = PyInt_FromLong( result );
13523 : }
13524 : }
13525 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13526 : return resultobj;
13527 0 : fail:
13528 0 : {
13529 : /* %typemap(freearg) char **dict */
13530 0 : CSLDestroy( arg5 );
13531 : }
13532 : return NULL;
13533 : }
13534 :
13535 :
13536 54 : SWIGINTERN PyObject *_wrap_Layer_GetGeometryTypes(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13537 54 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13538 54 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13539 54 : OGRGeometryTypeCounter **arg2 = (OGRGeometryTypeCounter **) 0 ;
13540 54 : int *arg3 = (int *) 0 ;
13541 54 : int arg4 = (int) 0 ;
13542 54 : int arg5 = (int) 0 ;
13543 54 : GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
13544 54 : void *arg7 = (void *) NULL ;
13545 54 : void *argp1 = 0 ;
13546 54 : int res1 = 0 ;
13547 54 : OGRGeometryTypeCounter *pRet2 = NULL ;
13548 54 : int nEntryCount2 = 0 ;
13549 54 : int val4 ;
13550 54 : int ecode4 = 0 ;
13551 54 : int val5 ;
13552 54 : int ecode5 = 0 ;
13553 54 : PyObject * obj0 = 0 ;
13554 54 : PyObject * obj1 = 0 ;
13555 54 : PyObject * obj2 = 0 ;
13556 54 : PyObject * obj3 = 0 ;
13557 54 : PyObject * obj4 = 0 ;
13558 54 : char * kwnames[] = {
13559 : (char *)"self", (char *)"geom_field", (char *)"flags", (char *)"callback", (char *)"callback_data", NULL
13560 : };
13561 :
13562 : /* %typemap(arginit) ( const char* callback_data=NULL) */
13563 54 : PyProgressData *psProgressInfo;
13564 54 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
13565 54 : psProgressInfo->nLastReported = -1;
13566 54 : psProgressInfo->psPyCallback = NULL;
13567 54 : psProgressInfo->psPyCallbackData = NULL;
13568 54 : arg7 = psProgressInfo;
13569 54 : {
13570 : /* %typemap(in,numinputs=0) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
13571 54 : arg2 = &pRet2;
13572 54 : arg3 = &nEntryCount2;
13573 : }
13574 54 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Layer_GetGeometryTypes", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
13575 54 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13576 54 : if (!SWIG_IsOK(res1)) {
13577 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeometryTypes" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13578 : }
13579 54 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13580 54 : if (obj1) {
13581 6 : ecode4 = SWIG_AsVal_int(obj1, &val4);
13582 6 : if (!SWIG_IsOK(ecode4)) {
13583 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetGeometryTypes" "', argument " "4"" of type '" "int""'");
13584 : }
13585 : arg4 = static_cast< int >(val4);
13586 : }
13587 54 : if (obj2) {
13588 19 : ecode5 = SWIG_AsVal_int(obj2, &val5);
13589 19 : if (!SWIG_IsOK(ecode5)) {
13590 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetGeometryTypes" "', argument " "5"" of type '" "int""'");
13591 : }
13592 : arg5 = static_cast< int >(val5);
13593 : }
13594 54 : if (obj3) {
13595 6 : {
13596 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
13597 : /* callback_func typemap */
13598 :
13599 : /* In some cases 0 is passed instead of None. */
13600 : /* See https://github.com/OSGeo/gdal/pull/219 */
13601 6 : if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
13602 : {
13603 0 : if( PyLong_AsLong(obj3) == 0 )
13604 : {
13605 0 : obj3 = Py_None;
13606 : }
13607 : }
13608 :
13609 6 : if (obj3 && obj3 != Py_None ) {
13610 6 : void* cbfunction = NULL;
13611 6 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
13612 : (void**)&cbfunction,
13613 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
13614 : SWIG_POINTER_EXCEPTION | 0 ));
13615 :
13616 6 : if ( cbfunction == GDALTermProgress ) {
13617 : arg6 = GDALTermProgress;
13618 : } else {
13619 6 : if (!PyCallable_Check(obj3)) {
13620 0 : PyErr_SetString( PyExc_RuntimeError,
13621 : "Object given is not a Python function" );
13622 0 : SWIG_fail;
13623 : }
13624 6 : psProgressInfo->psPyCallback = obj3;
13625 6 : arg6 = PyProgressProxy;
13626 : }
13627 :
13628 : }
13629 :
13630 : }
13631 : }
13632 54 : if (obj4) {
13633 0 : {
13634 : /* %typemap(in) ( void* callback_data=NULL) */
13635 0 : psProgressInfo->psPyCallbackData = obj4 ;
13636 : }
13637 : }
13638 54 : {
13639 54 : const int bLocalUseExceptions = GetUseExceptions();
13640 54 : if ( bLocalUseExceptions ) {
13641 12 : pushErrorHandler();
13642 : }
13643 54 : {
13644 54 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13645 54 : OGRLayerShadow_GetGeometryTypes(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
13646 54 : SWIG_PYTHON_THREAD_END_ALLOW;
13647 : }
13648 54 : if ( bLocalUseExceptions ) {
13649 12 : popErrorHandler();
13650 : }
13651 : #ifndef SED_HACKS
13652 : if ( bLocalUseExceptions ) {
13653 : CPLErr eclass = CPLGetLastErrorType();
13654 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13655 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13656 : }
13657 : }
13658 : #endif
13659 : }
13660 54 : resultobj = SWIG_Py_Void();
13661 54 : {
13662 : /* %typemap(argout) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
13663 54 : Py_DECREF(resultobj);
13664 54 : int nEntryCount = *(arg3);
13665 54 : OGRGeometryTypeCounter* pRet = *(arg2);
13666 54 : if( pRet == NULL )
13667 : {
13668 6 : PyErr_SetString( PyExc_RuntimeError, CPLGetLastErrorMsg() );
13669 6 : SWIG_fail;
13670 : }
13671 48 : resultobj = PyDict_New();
13672 153 : for(int i = 0; i < nEntryCount; ++ i)
13673 : {
13674 105 : PyObject *key = PyInt_FromLong( (int)(pRet[i].eGeomType) );
13675 105 : PyObject *val = PyLong_FromLongLong( pRet[i].nCount );
13676 105 : PyDict_SetItem(resultobj, key, val );
13677 105 : Py_DECREF(key);
13678 105 : Py_DECREF(val);
13679 : }
13680 : }
13681 48 : {
13682 : /* %typemap(freearg) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
13683 48 : VSIFree(*arg2);
13684 : }
13685 48 : {
13686 : /* %typemap(freearg) ( void* callback_data=NULL) */
13687 :
13688 48 : CPLFree(psProgressInfo);
13689 :
13690 : }
13691 54 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13692 : return resultobj;
13693 6 : fail:
13694 6 : {
13695 : /* %typemap(freearg) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
13696 6 : VSIFree(*arg2);
13697 : }
13698 6 : {
13699 : /* %typemap(freearg) ( void* callback_data=NULL) */
13700 :
13701 6 : CPLFree(psProgressInfo);
13702 :
13703 : }
13704 : return NULL;
13705 : }
13706 :
13707 :
13708 4 : SWIGINTERN PyObject *_wrap_Layer_GetSupportedSRSList(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13709 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13710 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13711 4 : OGRSpatialReferenceH **arg2 = (OGRSpatialReferenceH **) 0 ;
13712 4 : int *arg3 = (int *) 0 ;
13713 4 : int arg4 = (int) 0 ;
13714 4 : void *argp1 = 0 ;
13715 4 : int res1 = 0 ;
13716 4 : OGRSpatialReferenceH *pRet2 = NULL ;
13717 4 : int nEntryCount2 = 0 ;
13718 4 : int val4 ;
13719 4 : int ecode4 = 0 ;
13720 4 : PyObject * obj0 = 0 ;
13721 4 : PyObject * obj1 = 0 ;
13722 4 : char * kwnames[] = {
13723 : (char *)"self", (char *)"geom_field", NULL
13724 : };
13725 :
13726 4 : {
13727 : /* %typemap(in,numinputs=0) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
13728 4 : arg2 = &pRet2;
13729 4 : arg3 = &nEntryCount2;
13730 : }
13731 4 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Layer_GetSupportedSRSList", kwnames, &obj0, &obj1)) SWIG_fail;
13732 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13733 4 : if (!SWIG_IsOK(res1)) {
13734 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSupportedSRSList" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13735 : }
13736 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13737 4 : if (obj1) {
13738 0 : ecode4 = SWIG_AsVal_int(obj1, &val4);
13739 0 : if (!SWIG_IsOK(ecode4)) {
13740 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetSupportedSRSList" "', argument " "4"" of type '" "int""'");
13741 : }
13742 : arg4 = static_cast< int >(val4);
13743 : }
13744 4 : {
13745 4 : const int bLocalUseExceptions = GetUseExceptions();
13746 4 : if ( bLocalUseExceptions ) {
13747 2 : pushErrorHandler();
13748 : }
13749 4 : {
13750 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13751 4 : OGRLayerShadow_GetSupportedSRSList(arg1,arg2,arg3,arg4);
13752 4 : SWIG_PYTHON_THREAD_END_ALLOW;
13753 : }
13754 4 : if ( bLocalUseExceptions ) {
13755 2 : popErrorHandler();
13756 : }
13757 : #ifndef SED_HACKS
13758 : if ( bLocalUseExceptions ) {
13759 : CPLErr eclass = CPLGetLastErrorType();
13760 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13761 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13762 : }
13763 : }
13764 : #endif
13765 : }
13766 4 : resultobj = SWIG_Py_Void();
13767 4 : {
13768 : /* %typemap(argout) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
13769 4 : Py_DECREF(resultobj);
13770 4 : int nEntryCount = *(arg3);
13771 4 : OGRSpatialReferenceH* pRet = *(arg2);
13772 4 : if( nEntryCount == 0)
13773 : {
13774 2 : Py_INCREF(Py_None);
13775 2 : resultobj = Py_None;
13776 : }
13777 : else
13778 : {
13779 2 : resultobj = PyList_New(nEntryCount);
13780 2 : if( !resultobj ) {
13781 0 : SWIG_fail;
13782 : }
13783 7 : for(int i = 0; i < nEntryCount; ++ i)
13784 : {
13785 5 : OSRReference(pRet[i]);
13786 5 : PyList_SetItem(resultobj, i, SWIG_NewPointerObj(
13787 : SWIG_as_voidptr(pRet[i]),SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN) );
13788 : }
13789 : }
13790 : }
13791 4 : {
13792 : /* %typemap(freearg) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
13793 4 : OSRFreeSRSArray(*arg2);
13794 : }
13795 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13796 : return resultobj;
13797 0 : fail:
13798 0 : {
13799 : /* %typemap(freearg) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
13800 0 : OSRFreeSRSArray(*arg2);
13801 : }
13802 : return NULL;
13803 : }
13804 :
13805 :
13806 9 : SWIGINTERN PyObject *_wrap_Layer_SetActiveSRS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13807 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13808 9 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13809 9 : int arg2 ;
13810 9 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
13811 9 : void *argp1 = 0 ;
13812 9 : int res1 = 0 ;
13813 9 : int val2 ;
13814 9 : int ecode2 = 0 ;
13815 9 : void *argp3 = 0 ;
13816 9 : int res3 = 0 ;
13817 9 : PyObject *swig_obj[3] ;
13818 9 : OGRErr result;
13819 :
13820 9 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetActiveSRS", 3, 3, swig_obj)) SWIG_fail;
13821 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13822 9 : if (!SWIG_IsOK(res1)) {
13823 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetActiveSRS" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13824 : }
13825 9 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13826 9 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
13827 9 : if (!SWIG_IsOK(ecode2)) {
13828 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetActiveSRS" "', argument " "2"" of type '" "int""'");
13829 : }
13830 9 : arg2 = static_cast< int >(val2);
13831 9 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13832 9 : if (!SWIG_IsOK(res3)) {
13833 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SetActiveSRS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
13834 : }
13835 9 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
13836 9 : {
13837 9 : const int bLocalUseExceptions = GetUseExceptions();
13838 9 : if ( bLocalUseExceptions ) {
13839 4 : pushErrorHandler();
13840 : }
13841 9 : {
13842 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13843 9 : result = (OGRErr)OGRLayerShadow_SetActiveSRS(arg1,arg2,arg3);
13844 9 : SWIG_PYTHON_THREAD_END_ALLOW;
13845 : }
13846 9 : if ( bLocalUseExceptions ) {
13847 4 : popErrorHandler();
13848 : }
13849 : #ifndef SED_HACKS
13850 : if ( bLocalUseExceptions ) {
13851 : CPLErr eclass = CPLGetLastErrorType();
13852 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13853 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13854 : }
13855 : }
13856 : #endif
13857 : }
13858 9 : {
13859 : /* %typemap(out) OGRErr */
13860 14 : if ( result != 0 && GetUseExceptions()) {
13861 2 : const char* pszMessage = CPLGetLastErrorMsg();
13862 2 : if( pszMessage[0] != '\0' )
13863 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13864 : else
13865 2 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13866 2 : SWIG_fail;
13867 : }
13868 : }
13869 7 : {
13870 : /* %typemap(ret) OGRErr */
13871 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13872 7 : resultobj = PyInt_FromLong( result );
13873 : }
13874 : }
13875 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13876 : return resultobj;
13877 : fail:
13878 : return NULL;
13879 : }
13880 :
13881 :
13882 277 : SWIGINTERN PyObject *Layer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13883 277 : PyObject *obj;
13884 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
13885 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRLayerShadow, SWIG_NewClientData(obj));
13886 277 : return SWIG_Py_Void();
13887 : }
13888 :
13889 202935 : SWIGINTERN PyObject *_wrap_delete_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13890 202935 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13891 202935 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
13892 202935 : void *argp1 = 0 ;
13893 202935 : int res1 = 0 ;
13894 202935 : PyObject *swig_obj[1] ;
13895 :
13896 202935 : if (!args) SWIG_fail;
13897 202935 : swig_obj[0] = args;
13898 202935 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_DISOWN | 0 );
13899 202935 : if (!SWIG_IsOK(res1)) {
13900 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Feature" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
13901 : }
13902 202935 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
13903 202935 : {
13904 202935 : const int bLocalUseExceptions = GetUseExceptions();
13905 202935 : if ( bLocalUseExceptions ) {
13906 113450 : pushErrorHandler();
13907 : }
13908 202935 : {
13909 202935 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13910 202935 : delete_OGRFeatureShadow(arg1);
13911 202935 : SWIG_PYTHON_THREAD_END_ALLOW;
13912 : }
13913 202935 : if ( bLocalUseExceptions ) {
13914 113450 : popErrorHandler();
13915 : }
13916 : #ifndef SED_HACKS
13917 : if ( bLocalUseExceptions ) {
13918 : CPLErr eclass = CPLGetLastErrorType();
13919 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13920 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13921 : }
13922 : }
13923 : #endif
13924 : }
13925 202935 : resultobj = SWIG_Py_Void();
13926 202935 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13927 : return resultobj;
13928 : fail:
13929 : return NULL;
13930 : }
13931 :
13932 :
13933 121287 : SWIGINTERN PyObject *_wrap_new_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13934 121287 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13935 121287 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
13936 121287 : void *argp1 = 0 ;
13937 121287 : int res1 = 0 ;
13938 121287 : PyObject * obj0 = 0 ;
13939 121287 : char * kwnames[] = {
13940 : (char *)"feature_def", NULL
13941 : };
13942 121287 : OGRFeatureShadow *result = 0 ;
13943 :
13944 121287 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:new_Feature", kwnames, &obj0)) SWIG_fail;
13945 121287 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
13946 121287 : if (!SWIG_IsOK(res1)) {
13947 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Feature" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
13948 : }
13949 121287 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
13950 121287 : {
13951 121287 : if (!arg1) {
13952 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13953 : }
13954 : }
13955 121287 : {
13956 121287 : const int bLocalUseExceptions = GetUseExceptions();
13957 121287 : if ( bLocalUseExceptions ) {
13958 62150 : pushErrorHandler();
13959 : }
13960 121287 : {
13961 121287 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13962 121287 : result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
13963 121287 : SWIG_PYTHON_THREAD_END_ALLOW;
13964 : }
13965 121287 : if ( bLocalUseExceptions ) {
13966 62150 : popErrorHandler();
13967 : }
13968 : #ifndef SED_HACKS
13969 : if ( bLocalUseExceptions ) {
13970 : CPLErr eclass = CPLGetLastErrorType();
13971 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13972 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13973 : }
13974 : }
13975 : #endif
13976 : }
13977 121287 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_NEW | 0 );
13978 121287 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13979 : return resultobj;
13980 : fail:
13981 : return NULL;
13982 : }
13983 :
13984 :
13985 45160 : SWIGINTERN PyObject *_wrap_Feature_GetDefnRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13986 45160 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13987 45160 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
13988 45160 : void *argp1 = 0 ;
13989 45160 : int res1 = 0 ;
13990 45160 : PyObject *swig_obj[1] ;
13991 45160 : OGRFeatureDefnShadow *result = 0 ;
13992 :
13993 45160 : if (!args) SWIG_fail;
13994 45160 : swig_obj[0] = args;
13995 45160 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
13996 45160 : if (!SWIG_IsOK(res1)) {
13997 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
13998 : }
13999 45160 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14000 45160 : {
14001 45160 : const int bLocalUseExceptions = GetUseExceptions();
14002 45160 : if ( bLocalUseExceptions ) {
14003 21874 : pushErrorHandler();
14004 : }
14005 45160 : {
14006 45160 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14007 45160 : result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
14008 45160 : SWIG_PYTHON_THREAD_END_ALLOW;
14009 : }
14010 45160 : if ( bLocalUseExceptions ) {
14011 21874 : popErrorHandler();
14012 : }
14013 : #ifndef SED_HACKS
14014 : if ( bLocalUseExceptions ) {
14015 : CPLErr eclass = CPLGetLastErrorType();
14016 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14017 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14018 : }
14019 : }
14020 : #endif
14021 : }
14022 45160 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
14023 45160 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14024 : return resultobj;
14025 : fail:
14026 : return NULL;
14027 : }
14028 :
14029 :
14030 235985 : SWIGINTERN PyObject *_wrap_Feature_SetGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14031 235985 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14032 235985 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14033 235985 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
14034 235985 : void *argp1 = 0 ;
14035 235985 : int res1 = 0 ;
14036 235985 : void *argp2 = 0 ;
14037 235985 : int res2 = 0 ;
14038 235985 : PyObject *swig_obj[2] ;
14039 235985 : OGRErr result;
14040 :
14041 235985 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetGeometry", 2, 2, swig_obj)) SWIG_fail;
14042 235985 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14043 235985 : if (!SWIG_IsOK(res1)) {
14044 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometry" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14045 : }
14046 235985 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14047 235985 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14048 235985 : if (!SWIG_IsOK(res2)) {
14049 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
14050 : }
14051 235985 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
14052 235985 : {
14053 235985 : const int bLocalUseExceptions = GetUseExceptions();
14054 235985 : if ( bLocalUseExceptions ) {
14055 218693 : pushErrorHandler();
14056 : }
14057 235985 : {
14058 235985 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14059 235985 : result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
14060 235985 : SWIG_PYTHON_THREAD_END_ALLOW;
14061 : }
14062 235985 : if ( bLocalUseExceptions ) {
14063 218693 : popErrorHandler();
14064 : }
14065 : #ifndef SED_HACKS
14066 : if ( bLocalUseExceptions ) {
14067 : CPLErr eclass = CPLGetLastErrorType();
14068 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14069 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14070 : }
14071 : }
14072 : #endif
14073 : }
14074 235985 : {
14075 : /* %typemap(out) OGRErr */
14076 235987 : if ( result != 0 && GetUseExceptions()) {
14077 0 : const char* pszMessage = CPLGetLastErrorMsg();
14078 0 : if( pszMessage[0] != '\0' )
14079 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14080 : else
14081 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14082 0 : SWIG_fail;
14083 : }
14084 : }
14085 235985 : {
14086 : /* %typemap(ret) OGRErr */
14087 235985 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14088 235985 : resultobj = PyInt_FromLong( result );
14089 : }
14090 : }
14091 235985 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14092 : return resultobj;
14093 : fail:
14094 : return NULL;
14095 : }
14096 :
14097 :
14098 33931 : SWIGINTERN PyObject *_wrap_Feature_SetGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14099 33931 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14100 33931 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14101 33931 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
14102 33931 : void *argp1 = 0 ;
14103 33931 : int res1 = 0 ;
14104 33931 : int res2 = 0 ;
14105 33931 : PyObject *swig_obj[2] ;
14106 33931 : OGRErr result;
14107 :
14108 33931 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetGeometryDirectly", 2, 2, swig_obj)) SWIG_fail;
14109 33931 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14110 33931 : if (!SWIG_IsOK(res1)) {
14111 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometryDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14112 : }
14113 33931 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14114 33931 : res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
14115 33931 : if (!SWIG_IsOK(res2)) {
14116 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
14117 : }
14118 33931 : {
14119 33931 : const int bLocalUseExceptions = GetUseExceptions();
14120 33931 : if ( bLocalUseExceptions ) {
14121 1057 : pushErrorHandler();
14122 : }
14123 33931 : {
14124 33931 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14125 33931 : result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
14126 33931 : SWIG_PYTHON_THREAD_END_ALLOW;
14127 : }
14128 33931 : if ( bLocalUseExceptions ) {
14129 1057 : popErrorHandler();
14130 : }
14131 : #ifndef SED_HACKS
14132 : if ( bLocalUseExceptions ) {
14133 : CPLErr eclass = CPLGetLastErrorType();
14134 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14135 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14136 : }
14137 : }
14138 : #endif
14139 : }
14140 33931 : {
14141 : /* %typemap(out) OGRErr */
14142 33932 : if ( result != 0 && GetUseExceptions()) {
14143 0 : const char* pszMessage = CPLGetLastErrorMsg();
14144 0 : if( pszMessage[0] != '\0' )
14145 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14146 : else
14147 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14148 0 : SWIG_fail;
14149 : }
14150 : }
14151 33931 : {
14152 : /* %typemap(ret) OGRErr */
14153 33931 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14154 33931 : resultobj = PyInt_FromLong( result );
14155 : }
14156 : }
14157 33931 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14158 : return resultobj;
14159 : fail:
14160 : return NULL;
14161 : }
14162 :
14163 :
14164 38537 : SWIGINTERN PyObject *_wrap_Feature_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14165 38537 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14166 38537 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14167 38537 : void *argp1 = 0 ;
14168 38537 : int res1 = 0 ;
14169 38537 : PyObject *swig_obj[1] ;
14170 38537 : OGRGeometryShadow *result = 0 ;
14171 :
14172 38537 : if (!args) SWIG_fail;
14173 38537 : swig_obj[0] = args;
14174 38537 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14175 38537 : if (!SWIG_IsOK(res1)) {
14176 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeometryRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14177 : }
14178 38537 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14179 38537 : {
14180 38537 : const int bLocalUseExceptions = GetUseExceptions();
14181 38537 : if ( bLocalUseExceptions ) {
14182 33138 : pushErrorHandler();
14183 : }
14184 38537 : {
14185 38537 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14186 38537 : result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
14187 38537 : SWIG_PYTHON_THREAD_END_ALLOW;
14188 : }
14189 38537 : if ( bLocalUseExceptions ) {
14190 33138 : popErrorHandler();
14191 : }
14192 : #ifndef SED_HACKS
14193 : if ( bLocalUseExceptions ) {
14194 : CPLErr eclass = CPLGetLastErrorType();
14195 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14196 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14197 : }
14198 : }
14199 : #endif
14200 : }
14201 38537 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14202 38537 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14203 : return resultobj;
14204 : fail:
14205 : return NULL;
14206 : }
14207 :
14208 :
14209 : SWIGINTERN PyObject *_wrap_Feature_SetGeomField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14210 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14211 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14212 : int arg2 ;
14213 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
14214 : void *argp1 = 0 ;
14215 : int res1 = 0 ;
14216 : int val2 ;
14217 : int ecode2 = 0 ;
14218 : void *argp3 = 0 ;
14219 : int res3 = 0 ;
14220 : OGRErr result;
14221 :
14222 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
14223 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14224 : if (!SWIG_IsOK(res1)) {
14225 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14226 : }
14227 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14228 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14229 : if (!SWIG_IsOK(ecode2)) {
14230 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetGeomField" "', argument " "2"" of type '" "int""'");
14231 : }
14232 : arg2 = static_cast< int >(val2);
14233 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14234 : if (!SWIG_IsOK(res3)) {
14235 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomField" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
14236 : }
14237 : arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
14238 : {
14239 : const int bLocalUseExceptions = GetUseExceptions();
14240 : if ( bLocalUseExceptions ) {
14241 : pushErrorHandler();
14242 : }
14243 : {
14244 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14245 : result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_0(arg1,arg2,arg3);
14246 : SWIG_PYTHON_THREAD_END_ALLOW;
14247 : }
14248 : if ( bLocalUseExceptions ) {
14249 : popErrorHandler();
14250 : }
14251 : #ifndef SED_HACKS
14252 : if ( bLocalUseExceptions ) {
14253 : CPLErr eclass = CPLGetLastErrorType();
14254 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14255 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14256 : }
14257 : }
14258 : #endif
14259 : }
14260 : {
14261 : /* %typemap(out) OGRErr */
14262 : if ( result != 0 && GetUseExceptions()) {
14263 : const char* pszMessage = CPLGetLastErrorMsg();
14264 : if( pszMessage[0] != '\0' )
14265 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14266 : else
14267 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14268 : SWIG_fail;
14269 : }
14270 : }
14271 : {
14272 : /* %typemap(ret) OGRErr */
14273 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14274 : resultobj = PyInt_FromLong( result );
14275 : }
14276 : }
14277 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14278 : return resultobj;
14279 : fail:
14280 : return NULL;
14281 : }
14282 :
14283 :
14284 : SWIGINTERN PyObject *_wrap_Feature_SetGeomField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14285 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14286 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14287 : char *arg2 = (char *) 0 ;
14288 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
14289 : void *argp1 = 0 ;
14290 : int res1 = 0 ;
14291 : int bToFree2 = 0 ;
14292 : void *argp3 = 0 ;
14293 : int res3 = 0 ;
14294 : OGRErr result;
14295 :
14296 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
14297 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14298 : if (!SWIG_IsOK(res1)) {
14299 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14300 : }
14301 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14302 : {
14303 : /* %typemap(in) (const char *utf8_path) */
14304 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
14305 : {
14306 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
14307 : }
14308 : else
14309 : {
14310 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
14311 :
14312 : }
14313 : if (arg2 == NULL)
14314 : {
14315 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
14316 : SWIG_fail;
14317 : }
14318 : }
14319 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14320 : if (!SWIG_IsOK(res3)) {
14321 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomField" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
14322 : }
14323 : arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
14324 : {
14325 : const int bLocalUseExceptions = GetUseExceptions();
14326 : if ( bLocalUseExceptions ) {
14327 : pushErrorHandler();
14328 : }
14329 : {
14330 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14331 : result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_1(arg1,(char const *)arg2,arg3);
14332 : SWIG_PYTHON_THREAD_END_ALLOW;
14333 : }
14334 : if ( bLocalUseExceptions ) {
14335 : popErrorHandler();
14336 : }
14337 : #ifndef SED_HACKS
14338 : if ( bLocalUseExceptions ) {
14339 : CPLErr eclass = CPLGetLastErrorType();
14340 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14341 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14342 : }
14343 : }
14344 : #endif
14345 : }
14346 : {
14347 : /* %typemap(out) OGRErr */
14348 : if ( result != 0 && GetUseExceptions()) {
14349 : const char* pszMessage = CPLGetLastErrorMsg();
14350 : if( pszMessage[0] != '\0' )
14351 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14352 : else
14353 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14354 : SWIG_fail;
14355 : }
14356 : }
14357 : {
14358 : /* %typemap(freearg) (const char *utf8_path) */
14359 : GDALPythonFreeCStr(arg2, bToFree2);
14360 : }
14361 : {
14362 : /* %typemap(ret) OGRErr */
14363 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14364 : resultobj = PyInt_FromLong( result );
14365 : }
14366 : }
14367 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14368 : return resultobj;
14369 : fail:
14370 : {
14371 : /* %typemap(freearg) (const char *utf8_path) */
14372 : GDALPythonFreeCStr(arg2, bToFree2);
14373 : }
14374 : return NULL;
14375 : }
14376 :
14377 :
14378 235 : SWIGINTERN PyObject *_wrap_Feature_SetGeomField(PyObject *self, PyObject *args) {
14379 235 : Py_ssize_t argc;
14380 235 : PyObject *argv[4] = {
14381 : 0
14382 : };
14383 :
14384 235 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetGeomField", 0, 3, argv))) SWIG_fail;
14385 235 : --argc;
14386 235 : if (argc == 3) {
14387 235 : int _v;
14388 235 : void *vptr = 0;
14389 235 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14390 236 : _v = SWIG_CheckState(res);
14391 235 : if (_v) {
14392 235 : {
14393 235 : int res = SWIG_AsVal_int(argv[1], NULL);
14394 235 : _v = SWIG_CheckState(res);
14395 : }
14396 234 : if (_v) {
14397 234 : void *vptr = 0;
14398 234 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
14399 234 : _v = SWIG_CheckState(res);
14400 0 : if (_v) {
14401 234 : return _wrap_Feature_SetGeomField__SWIG_0(self, argc, argv);
14402 : }
14403 : }
14404 : }
14405 : }
14406 1 : if (argc == 3) {
14407 1 : int _v;
14408 1 : void *vptr = 0;
14409 1 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14410 1 : _v = SWIG_CheckState(res);
14411 1 : if (_v) {
14412 1 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
14413 1 : _v = SWIG_CheckState(res);
14414 1 : if (_v) {
14415 1 : void *vptr = 0;
14416 1 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
14417 1 : _v = SWIG_CheckState(res);
14418 0 : if (_v) {
14419 1 : return _wrap_Feature_SetGeomField__SWIG_1(self, argc, argv);
14420 : }
14421 : }
14422 : }
14423 : }
14424 :
14425 0 : fail:
14426 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetGeomField'.\n"
14427 : " Possible C/C++ prototypes are:\n"
14428 : " OGRFeatureShadow::SetGeomField(int,OGRGeometryShadow *)\n"
14429 : " OGRFeatureShadow::SetGeomField(char const *,OGRGeometryShadow *)\n");
14430 : return 0;
14431 : }
14432 :
14433 :
14434 : SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14435 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14436 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14437 : int arg2 ;
14438 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
14439 : void *argp1 = 0 ;
14440 : int res1 = 0 ;
14441 : int val2 ;
14442 : int ecode2 = 0 ;
14443 : int res3 = 0 ;
14444 : OGRErr result;
14445 :
14446 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
14447 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14448 : if (!SWIG_IsOK(res1)) {
14449 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14450 : }
14451 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14452 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14453 : if (!SWIG_IsOK(ecode2)) {
14454 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "2"" of type '" "int""'");
14455 : }
14456 : arg2 = static_cast< int >(val2);
14457 : res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&arg3), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
14458 : if (!SWIG_IsOK(res3)) {
14459 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
14460 : }
14461 : {
14462 : const int bLocalUseExceptions = GetUseExceptions();
14463 : if ( bLocalUseExceptions ) {
14464 : pushErrorHandler();
14465 : }
14466 : {
14467 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14468 : result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(arg1,arg2,arg3);
14469 : SWIG_PYTHON_THREAD_END_ALLOW;
14470 : }
14471 : if ( bLocalUseExceptions ) {
14472 : popErrorHandler();
14473 : }
14474 : #ifndef SED_HACKS
14475 : if ( bLocalUseExceptions ) {
14476 : CPLErr eclass = CPLGetLastErrorType();
14477 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14478 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14479 : }
14480 : }
14481 : #endif
14482 : }
14483 : {
14484 : /* %typemap(out) OGRErr */
14485 : if ( result != 0 && GetUseExceptions()) {
14486 : const char* pszMessage = CPLGetLastErrorMsg();
14487 : if( pszMessage[0] != '\0' )
14488 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14489 : else
14490 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14491 : SWIG_fail;
14492 : }
14493 : }
14494 : {
14495 : /* %typemap(ret) OGRErr */
14496 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14497 : resultobj = PyInt_FromLong( result );
14498 : }
14499 : }
14500 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14501 : return resultobj;
14502 : fail:
14503 : return NULL;
14504 : }
14505 :
14506 :
14507 : SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14508 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14509 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14510 : char *arg2 = (char *) 0 ;
14511 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
14512 : void *argp1 = 0 ;
14513 : int res1 = 0 ;
14514 : int bToFree2 = 0 ;
14515 : int res3 = 0 ;
14516 : OGRErr result;
14517 :
14518 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
14519 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14520 : if (!SWIG_IsOK(res1)) {
14521 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14522 : }
14523 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14524 : {
14525 : /* %typemap(in) (const char *utf8_path) */
14526 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
14527 : {
14528 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
14529 : }
14530 : else
14531 : {
14532 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
14533 :
14534 : }
14535 : if (arg2 == NULL)
14536 : {
14537 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
14538 : SWIG_fail;
14539 : }
14540 : }
14541 : res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&arg3), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
14542 : if (!SWIG_IsOK(res3)) {
14543 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
14544 : }
14545 : {
14546 : const int bLocalUseExceptions = GetUseExceptions();
14547 : if ( bLocalUseExceptions ) {
14548 : pushErrorHandler();
14549 : }
14550 : {
14551 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14552 : result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(arg1,(char const *)arg2,arg3);
14553 : SWIG_PYTHON_THREAD_END_ALLOW;
14554 : }
14555 : if ( bLocalUseExceptions ) {
14556 : popErrorHandler();
14557 : }
14558 : #ifndef SED_HACKS
14559 : if ( bLocalUseExceptions ) {
14560 : CPLErr eclass = CPLGetLastErrorType();
14561 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14562 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14563 : }
14564 : }
14565 : #endif
14566 : }
14567 : {
14568 : /* %typemap(out) OGRErr */
14569 : if ( result != 0 && GetUseExceptions()) {
14570 : const char* pszMessage = CPLGetLastErrorMsg();
14571 : if( pszMessage[0] != '\0' )
14572 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14573 : else
14574 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14575 : SWIG_fail;
14576 : }
14577 : }
14578 : {
14579 : /* %typemap(freearg) (const char *utf8_path) */
14580 : GDALPythonFreeCStr(arg2, bToFree2);
14581 : }
14582 : {
14583 : /* %typemap(ret) OGRErr */
14584 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14585 : resultobj = PyInt_FromLong( result );
14586 : }
14587 : }
14588 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14589 : return resultobj;
14590 : fail:
14591 : {
14592 : /* %typemap(freearg) (const char *utf8_path) */
14593 : GDALPythonFreeCStr(arg2, bToFree2);
14594 : }
14595 : return NULL;
14596 : }
14597 :
14598 :
14599 35 : SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly(PyObject *self, PyObject *args) {
14600 35 : Py_ssize_t argc;
14601 35 : PyObject *argv[4] = {
14602 : 0
14603 : };
14604 :
14605 35 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetGeomFieldDirectly", 0, 3, argv))) SWIG_fail;
14606 35 : --argc;
14607 35 : if (argc == 3) {
14608 35 : int _v;
14609 35 : void *vptr = 0;
14610 35 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14611 51 : _v = SWIG_CheckState(res);
14612 35 : if (_v) {
14613 35 : {
14614 35 : int res = SWIG_AsVal_int(argv[1], NULL);
14615 35 : _v = SWIG_CheckState(res);
14616 : }
14617 19 : if (_v) {
14618 19 : void *vptr = 0;
14619 19 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
14620 19 : _v = SWIG_CheckState(res);
14621 0 : if (_v) {
14622 19 : return _wrap_Feature_SetGeomFieldDirectly__SWIG_0(self, argc, argv);
14623 : }
14624 : }
14625 : }
14626 : }
14627 16 : if (argc == 3) {
14628 16 : int _v;
14629 16 : void *vptr = 0;
14630 16 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14631 16 : _v = SWIG_CheckState(res);
14632 16 : if (_v) {
14633 16 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
14634 16 : _v = SWIG_CheckState(res);
14635 16 : if (_v) {
14636 16 : void *vptr = 0;
14637 16 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
14638 16 : _v = SWIG_CheckState(res);
14639 0 : if (_v) {
14640 16 : return _wrap_Feature_SetGeomFieldDirectly__SWIG_1(self, argc, argv);
14641 : }
14642 : }
14643 : }
14644 : }
14645 :
14646 0 : fail:
14647 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetGeomFieldDirectly'.\n"
14648 : " Possible C/C++ prototypes are:\n"
14649 : " OGRFeatureShadow::SetGeomFieldDirectly(int,OGRGeometryShadow *)\n"
14650 : " OGRFeatureShadow::SetGeomFieldDirectly(char const *,OGRGeometryShadow *)\n");
14651 : return 0;
14652 : }
14653 :
14654 :
14655 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14656 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14657 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14658 : int arg2 ;
14659 : void *argp1 = 0 ;
14660 : int res1 = 0 ;
14661 : int val2 ;
14662 : int ecode2 = 0 ;
14663 : OGRGeometryShadow *result = 0 ;
14664 :
14665 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
14666 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14667 : if (!SWIG_IsOK(res1)) {
14668 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14669 : }
14670 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14671 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14672 : if (!SWIG_IsOK(ecode2)) {
14673 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetGeomFieldRef" "', argument " "2"" of type '" "int""'");
14674 : }
14675 : arg2 = static_cast< int >(val2);
14676 : {
14677 : const int bLocalUseExceptions = GetUseExceptions();
14678 : if ( bLocalUseExceptions ) {
14679 : pushErrorHandler();
14680 : }
14681 : {
14682 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14683 : result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_0(arg1,arg2);
14684 : SWIG_PYTHON_THREAD_END_ALLOW;
14685 : }
14686 : if ( bLocalUseExceptions ) {
14687 : popErrorHandler();
14688 : }
14689 : #ifndef SED_HACKS
14690 : if ( bLocalUseExceptions ) {
14691 : CPLErr eclass = CPLGetLastErrorType();
14692 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14693 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14694 : }
14695 : }
14696 : #endif
14697 : }
14698 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14699 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14700 : return resultobj;
14701 : fail:
14702 : return NULL;
14703 : }
14704 :
14705 :
14706 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14707 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14708 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14709 : char *arg2 = (char *) 0 ;
14710 : void *argp1 = 0 ;
14711 : int res1 = 0 ;
14712 : int bToFree2 = 0 ;
14713 : OGRGeometryShadow *result = 0 ;
14714 :
14715 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
14716 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14717 : if (!SWIG_IsOK(res1)) {
14718 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14719 : }
14720 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14721 : {
14722 : /* %typemap(in) (const char *utf8_path) */
14723 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
14724 : {
14725 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
14726 : }
14727 : else
14728 : {
14729 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
14730 :
14731 : }
14732 : if (arg2 == NULL)
14733 : {
14734 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
14735 : SWIG_fail;
14736 : }
14737 : }
14738 : {
14739 : const int bLocalUseExceptions = GetUseExceptions();
14740 : if ( bLocalUseExceptions ) {
14741 : pushErrorHandler();
14742 : }
14743 : {
14744 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14745 : result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_1(arg1,(char const *)arg2);
14746 : SWIG_PYTHON_THREAD_END_ALLOW;
14747 : }
14748 : if ( bLocalUseExceptions ) {
14749 : 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 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14761 : {
14762 : /* %typemap(freearg) (const char *utf8_path) */
14763 : GDALPythonFreeCStr(arg2, bToFree2);
14764 : }
14765 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14766 : return resultobj;
14767 : fail:
14768 : {
14769 : /* %typemap(freearg) (const char *utf8_path) */
14770 : GDALPythonFreeCStr(arg2, bToFree2);
14771 : }
14772 : return NULL;
14773 : }
14774 :
14775 :
14776 386 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef(PyObject *self, PyObject *args) {
14777 386 : Py_ssize_t argc;
14778 386 : PyObject *argv[3] = {
14779 : 0
14780 : };
14781 :
14782 386 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldRef", 0, 2, argv))) SWIG_fail;
14783 386 : --argc;
14784 386 : if (argc == 2) {
14785 386 : int _v;
14786 386 : void *vptr = 0;
14787 386 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14788 442 : _v = SWIG_CheckState(res);
14789 386 : if (_v) {
14790 386 : {
14791 386 : int res = SWIG_AsVal_int(argv[1], NULL);
14792 386 : _v = SWIG_CheckState(res);
14793 : }
14794 330 : if (_v) {
14795 330 : return _wrap_Feature_GetGeomFieldRef__SWIG_0(self, argc, argv);
14796 : }
14797 : }
14798 : }
14799 56 : if (argc == 2) {
14800 56 : int _v;
14801 56 : void *vptr = 0;
14802 56 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14803 56 : _v = SWIG_CheckState(res);
14804 56 : if (_v) {
14805 56 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
14806 56 : _v = SWIG_CheckState(res);
14807 56 : if (_v) {
14808 56 : return _wrap_Feature_GetGeomFieldRef__SWIG_1(self, argc, argv);
14809 : }
14810 : }
14811 : }
14812 :
14813 0 : fail:
14814 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetGeomFieldRef'.\n"
14815 : " Possible C/C++ prototypes are:\n"
14816 : " OGRFeatureShadow::GetGeomFieldRef(int)\n"
14817 : " OGRFeatureShadow::GetGeomFieldRef(char const *)\n");
14818 : return 0;
14819 : }
14820 :
14821 :
14822 49 : SWIGINTERN PyObject *_wrap_Feature_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14823 49 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14824 49 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14825 49 : void *argp1 = 0 ;
14826 49 : int res1 = 0 ;
14827 49 : PyObject *swig_obj[1] ;
14828 49 : OGRFeatureShadow *result = 0 ;
14829 :
14830 49 : if (!args) SWIG_fail;
14831 49 : swig_obj[0] = args;
14832 49 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14833 49 : if (!SWIG_IsOK(res1)) {
14834 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Clone" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14835 : }
14836 49 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14837 49 : {
14838 49 : const int bLocalUseExceptions = GetUseExceptions();
14839 49 : if ( bLocalUseExceptions ) {
14840 43 : pushErrorHandler();
14841 : }
14842 49 : {
14843 49 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14844 49 : result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
14845 49 : SWIG_PYTHON_THREAD_END_ALLOW;
14846 : }
14847 49 : if ( bLocalUseExceptions ) {
14848 43 : popErrorHandler();
14849 : }
14850 : #ifndef SED_HACKS
14851 : if ( bLocalUseExceptions ) {
14852 : CPLErr eclass = CPLGetLastErrorType();
14853 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14854 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14855 : }
14856 : }
14857 : #endif
14858 : }
14859 49 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
14860 49 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14861 : return resultobj;
14862 : fail:
14863 : return NULL;
14864 : }
14865 :
14866 :
14867 109 : SWIGINTERN PyObject *_wrap_Feature_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14868 109 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14869 109 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14870 109 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
14871 109 : void *argp1 = 0 ;
14872 109 : int res1 = 0 ;
14873 109 : void *argp2 = 0 ;
14874 109 : int res2 = 0 ;
14875 109 : PyObject *swig_obj[2] ;
14876 109 : bool result;
14877 :
14878 109 : if (!SWIG_Python_UnpackTuple(args, "Feature_Equal", 2, 2, swig_obj)) SWIG_fail;
14879 109 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14880 109 : if (!SWIG_IsOK(res1)) {
14881 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Equal" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14882 : }
14883 109 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14884 109 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14885 109 : if (!SWIG_IsOK(res2)) {
14886 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_Equal" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
14887 : }
14888 109 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
14889 109 : {
14890 109 : if (!arg2) {
14891 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14892 : }
14893 : }
14894 109 : {
14895 109 : const int bLocalUseExceptions = GetUseExceptions();
14896 109 : if ( bLocalUseExceptions ) {
14897 97 : pushErrorHandler();
14898 : }
14899 109 : {
14900 109 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14901 109 : result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
14902 109 : SWIG_PYTHON_THREAD_END_ALLOW;
14903 : }
14904 109 : if ( bLocalUseExceptions ) {
14905 97 : popErrorHandler();
14906 : }
14907 : #ifndef SED_HACKS
14908 : if ( bLocalUseExceptions ) {
14909 : CPLErr eclass = CPLGetLastErrorType();
14910 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14911 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14912 : }
14913 : }
14914 : #endif
14915 : }
14916 109 : resultobj = SWIG_From_bool(static_cast< bool >(result));
14917 109 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14918 : return resultobj;
14919 : fail:
14920 : return NULL;
14921 : }
14922 :
14923 :
14924 110164 : SWIGINTERN PyObject *_wrap_Feature_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14925 110164 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14926 110164 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14927 110164 : void *argp1 = 0 ;
14928 110164 : int res1 = 0 ;
14929 110164 : PyObject *swig_obj[1] ;
14930 110164 : int result;
14931 :
14932 110164 : if (!args) SWIG_fail;
14933 110164 : swig_obj[0] = args;
14934 110164 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14935 110164 : if (!SWIG_IsOK(res1)) {
14936 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14937 : }
14938 110164 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14939 110164 : {
14940 110164 : const int bLocalUseExceptions = GetUseExceptions();
14941 110164 : if ( bLocalUseExceptions ) {
14942 91033 : pushErrorHandler();
14943 : }
14944 110164 : {
14945 110164 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14946 110164 : result = (int)OGRFeatureShadow_GetFieldCount(arg1);
14947 110164 : SWIG_PYTHON_THREAD_END_ALLOW;
14948 : }
14949 110164 : if ( bLocalUseExceptions ) {
14950 91033 : popErrorHandler();
14951 : }
14952 : #ifndef SED_HACKS
14953 : if ( bLocalUseExceptions ) {
14954 : CPLErr eclass = CPLGetLastErrorType();
14955 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14956 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14957 : }
14958 : }
14959 : #endif
14960 : }
14961 110164 : resultobj = SWIG_From_int(static_cast< int >(result));
14962 110164 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14963 : return resultobj;
14964 : fail:
14965 : return NULL;
14966 : }
14967 :
14968 :
14969 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14970 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14971 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14972 : int arg2 ;
14973 : void *argp1 = 0 ;
14974 : int res1 = 0 ;
14975 : int val2 ;
14976 : int ecode2 = 0 ;
14977 : OGRFieldDefnShadow *result = 0 ;
14978 :
14979 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
14980 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14981 : if (!SWIG_IsOK(res1)) {
14982 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14983 : }
14984 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14985 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14986 : if (!SWIG_IsOK(ecode2)) {
14987 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "int""'");
14988 : }
14989 : arg2 = static_cast< int >(val2);
14990 : {
14991 : const int bLocalUseExceptions = GetUseExceptions();
14992 : if ( bLocalUseExceptions ) {
14993 : pushErrorHandler();
14994 : }
14995 : {
14996 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14997 : result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
14998 : SWIG_PYTHON_THREAD_END_ALLOW;
14999 : }
15000 : if ( bLocalUseExceptions ) {
15001 : popErrorHandler();
15002 : }
15003 : #ifndef SED_HACKS
15004 : if ( bLocalUseExceptions ) {
15005 : CPLErr eclass = CPLGetLastErrorType();
15006 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15007 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15008 : }
15009 : }
15010 : #endif
15011 : }
15012 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
15013 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15014 : return resultobj;
15015 : fail:
15016 : return NULL;
15017 : }
15018 :
15019 :
15020 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15021 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15022 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15023 : char *arg2 = (char *) 0 ;
15024 : void *argp1 = 0 ;
15025 : int res1 = 0 ;
15026 : int bToFree2 = 0 ;
15027 : OGRFieldDefnShadow *result = 0 ;
15028 :
15029 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15030 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15031 : if (!SWIG_IsOK(res1)) {
15032 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15033 : }
15034 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15035 : {
15036 : /* %typemap(in) (const char *utf8_path) */
15037 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15038 : {
15039 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15040 : }
15041 : else
15042 : {
15043 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15044 :
15045 : }
15046 : if (arg2 == NULL)
15047 : {
15048 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15049 : SWIG_fail;
15050 : }
15051 : }
15052 : {
15053 : const int bLocalUseExceptions = GetUseExceptions();
15054 : if ( bLocalUseExceptions ) {
15055 : pushErrorHandler();
15056 : }
15057 : {
15058 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15059 : result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
15060 : SWIG_PYTHON_THREAD_END_ALLOW;
15061 : }
15062 : if ( bLocalUseExceptions ) {
15063 : popErrorHandler();
15064 : }
15065 : #ifndef SED_HACKS
15066 : if ( bLocalUseExceptions ) {
15067 : CPLErr eclass = CPLGetLastErrorType();
15068 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15069 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15070 : }
15071 : }
15072 : #endif
15073 : }
15074 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
15075 : {
15076 : /* %typemap(freearg) (const char *utf8_path) */
15077 : GDALPythonFreeCStr(arg2, bToFree2);
15078 : }
15079 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15080 : return resultobj;
15081 : fail:
15082 : {
15083 : /* %typemap(freearg) (const char *utf8_path) */
15084 : GDALPythonFreeCStr(arg2, bToFree2);
15085 : }
15086 : return NULL;
15087 : }
15088 :
15089 :
15090 87222 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef(PyObject *self, PyObject *args) {
15091 87222 : Py_ssize_t argc;
15092 87222 : PyObject *argv[3] = {
15093 : 0
15094 : };
15095 :
15096 87222 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldDefnRef", 0, 2, argv))) SWIG_fail;
15097 87222 : --argc;
15098 87222 : if (argc == 2) {
15099 87222 : int _v;
15100 87222 : void *vptr = 0;
15101 87222 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15102 87236 : _v = SWIG_CheckState(res);
15103 87222 : if (_v) {
15104 87222 : {
15105 87222 : int res = SWIG_AsVal_int(argv[1], NULL);
15106 87222 : _v = SWIG_CheckState(res);
15107 : }
15108 87208 : if (_v) {
15109 87208 : return _wrap_Feature_GetFieldDefnRef__SWIG_0(self, argc, argv);
15110 : }
15111 : }
15112 : }
15113 14 : if (argc == 2) {
15114 14 : int _v;
15115 14 : void *vptr = 0;
15116 14 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15117 14 : _v = SWIG_CheckState(res);
15118 14 : if (_v) {
15119 14 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15120 14 : _v = SWIG_CheckState(res);
15121 14 : if (_v) {
15122 14 : return _wrap_Feature_GetFieldDefnRef__SWIG_1(self, argc, argv);
15123 : }
15124 : }
15125 : }
15126 :
15127 0 : fail:
15128 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldDefnRef'.\n"
15129 : " Possible C/C++ prototypes are:\n"
15130 : " OGRFeatureShadow::GetFieldDefnRef(int)\n"
15131 : " OGRFeatureShadow::GetFieldDefnRef(char const *)\n");
15132 : return 0;
15133 : }
15134 :
15135 :
15136 121 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15137 121 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15138 121 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15139 121 : void *argp1 = 0 ;
15140 121 : int res1 = 0 ;
15141 121 : PyObject *swig_obj[1] ;
15142 121 : int result;
15143 :
15144 121 : if (!args) SWIG_fail;
15145 121 : swig_obj[0] = args;
15146 121 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15147 121 : if (!SWIG_IsOK(res1)) {
15148 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15149 : }
15150 121 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15151 121 : {
15152 121 : const int bLocalUseExceptions = GetUseExceptions();
15153 121 : if ( bLocalUseExceptions ) {
15154 51 : pushErrorHandler();
15155 : }
15156 121 : {
15157 121 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15158 121 : result = (int)OGRFeatureShadow_GetGeomFieldCount(arg1);
15159 121 : SWIG_PYTHON_THREAD_END_ALLOW;
15160 : }
15161 121 : if ( bLocalUseExceptions ) {
15162 51 : popErrorHandler();
15163 : }
15164 : #ifndef SED_HACKS
15165 : if ( bLocalUseExceptions ) {
15166 : CPLErr eclass = CPLGetLastErrorType();
15167 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15168 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15169 : }
15170 : }
15171 : #endif
15172 : }
15173 121 : resultobj = SWIG_From_int(static_cast< int >(result));
15174 121 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15175 : return resultobj;
15176 : fail:
15177 : return NULL;
15178 : }
15179 :
15180 :
15181 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15182 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15183 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15184 : int arg2 ;
15185 : void *argp1 = 0 ;
15186 : int res1 = 0 ;
15187 : int val2 ;
15188 : int ecode2 = 0 ;
15189 : OGRGeomFieldDefnShadow *result = 0 ;
15190 :
15191 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15192 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15193 : if (!SWIG_IsOK(res1)) {
15194 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15195 : }
15196 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15197 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15198 : if (!SWIG_IsOK(ecode2)) {
15199 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "2"" of type '" "int""'");
15200 : }
15201 : arg2 = static_cast< int >(val2);
15202 : {
15203 : const int bLocalUseExceptions = GetUseExceptions();
15204 : if ( bLocalUseExceptions ) {
15205 : pushErrorHandler();
15206 : }
15207 : {
15208 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15209 : result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(arg1,arg2);
15210 : SWIG_PYTHON_THREAD_END_ALLOW;
15211 : }
15212 : if ( bLocalUseExceptions ) {
15213 : popErrorHandler();
15214 : }
15215 : #ifndef SED_HACKS
15216 : if ( bLocalUseExceptions ) {
15217 : CPLErr eclass = CPLGetLastErrorType();
15218 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15219 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15220 : }
15221 : }
15222 : #endif
15223 : }
15224 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
15225 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15226 : return resultobj;
15227 : fail:
15228 : return NULL;
15229 : }
15230 :
15231 :
15232 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15233 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15234 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15235 : char *arg2 = (char *) 0 ;
15236 : void *argp1 = 0 ;
15237 : int res1 = 0 ;
15238 : int bToFree2 = 0 ;
15239 : OGRGeomFieldDefnShadow *result = 0 ;
15240 :
15241 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15242 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15243 : if (!SWIG_IsOK(res1)) {
15244 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15245 : }
15246 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15247 : {
15248 : /* %typemap(in) (const char *utf8_path) */
15249 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15250 : {
15251 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15252 : }
15253 : else
15254 : {
15255 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15256 :
15257 : }
15258 : if (arg2 == NULL)
15259 : {
15260 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15261 : SWIG_fail;
15262 : }
15263 : }
15264 : {
15265 : const int bLocalUseExceptions = GetUseExceptions();
15266 : if ( bLocalUseExceptions ) {
15267 : pushErrorHandler();
15268 : }
15269 : {
15270 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15271 : result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
15272 : SWIG_PYTHON_THREAD_END_ALLOW;
15273 : }
15274 : if ( bLocalUseExceptions ) {
15275 : popErrorHandler();
15276 : }
15277 : #ifndef SED_HACKS
15278 : if ( bLocalUseExceptions ) {
15279 : CPLErr eclass = CPLGetLastErrorType();
15280 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15281 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15282 : }
15283 : }
15284 : #endif
15285 : }
15286 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
15287 : {
15288 : /* %typemap(freearg) (const char *utf8_path) */
15289 : GDALPythonFreeCStr(arg2, bToFree2);
15290 : }
15291 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15292 : return resultobj;
15293 : fail:
15294 : {
15295 : /* %typemap(freearg) (const char *utf8_path) */
15296 : GDALPythonFreeCStr(arg2, bToFree2);
15297 : }
15298 : return NULL;
15299 : }
15300 :
15301 :
15302 2 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef(PyObject *self, PyObject *args) {
15303 2 : Py_ssize_t argc;
15304 2 : PyObject *argv[3] = {
15305 : 0
15306 : };
15307 :
15308 2 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldDefnRef", 0, 2, argv))) SWIG_fail;
15309 2 : --argc;
15310 2 : if (argc == 2) {
15311 2 : int _v;
15312 2 : void *vptr = 0;
15313 2 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15314 2 : _v = SWIG_CheckState(res);
15315 2 : if (_v) {
15316 2 : {
15317 2 : int res = SWIG_AsVal_int(argv[1], NULL);
15318 2 : _v = SWIG_CheckState(res);
15319 : }
15320 2 : if (_v) {
15321 2 : return _wrap_Feature_GetGeomFieldDefnRef__SWIG_0(self, argc, argv);
15322 : }
15323 : }
15324 : }
15325 0 : if (argc == 2) {
15326 0 : int _v;
15327 0 : void *vptr = 0;
15328 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15329 0 : _v = SWIG_CheckState(res);
15330 0 : if (_v) {
15331 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15332 0 : _v = SWIG_CheckState(res);
15333 0 : if (_v) {
15334 0 : return _wrap_Feature_GetGeomFieldDefnRef__SWIG_1(self, argc, argv);
15335 : }
15336 : }
15337 : }
15338 :
15339 0 : fail:
15340 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetGeomFieldDefnRef'.\n"
15341 : " Possible C/C++ prototypes are:\n"
15342 : " OGRFeatureShadow::GetGeomFieldDefnRef(int)\n"
15343 : " OGRFeatureShadow::GetGeomFieldDefnRef(char const *)\n");
15344 : return 0;
15345 : }
15346 :
15347 :
15348 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15349 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15350 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15351 : int arg2 ;
15352 : void *argp1 = 0 ;
15353 : int res1 = 0 ;
15354 : int val2 ;
15355 : int ecode2 = 0 ;
15356 : char *result = 0 ;
15357 :
15358 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15359 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15360 : if (!SWIG_IsOK(res1)) {
15361 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15362 : }
15363 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15364 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15365 : if (!SWIG_IsOK(ecode2)) {
15366 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "int""'");
15367 : }
15368 : arg2 = static_cast< int >(val2);
15369 : {
15370 : const int bLocalUseExceptions = GetUseExceptions();
15371 : if ( bLocalUseExceptions ) {
15372 : pushErrorHandler();
15373 : }
15374 : {
15375 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15376 : result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
15377 : SWIG_PYTHON_THREAD_END_ALLOW;
15378 : }
15379 : if ( bLocalUseExceptions ) {
15380 : popErrorHandler();
15381 : }
15382 : #ifndef SED_HACKS
15383 : if ( bLocalUseExceptions ) {
15384 : CPLErr eclass = CPLGetLastErrorType();
15385 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15386 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15387 : }
15388 : }
15389 : #endif
15390 : }
15391 : resultobj = SWIG_FromCharPtr((const char *)result);
15392 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15393 : return resultobj;
15394 : fail:
15395 : return NULL;
15396 : }
15397 :
15398 :
15399 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15400 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15401 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15402 : char *arg2 = (char *) 0 ;
15403 : void *argp1 = 0 ;
15404 : int res1 = 0 ;
15405 : int bToFree2 = 0 ;
15406 : char *result = 0 ;
15407 :
15408 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15409 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15410 : if (!SWIG_IsOK(res1)) {
15411 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15412 : }
15413 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15414 : {
15415 : /* %typemap(in) (const char *utf8_path) */
15416 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15417 : {
15418 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15419 : }
15420 : else
15421 : {
15422 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15423 :
15424 : }
15425 : if (arg2 == NULL)
15426 : {
15427 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15428 : SWIG_fail;
15429 : }
15430 : }
15431 : {
15432 : const int bLocalUseExceptions = GetUseExceptions();
15433 : if ( bLocalUseExceptions ) {
15434 : pushErrorHandler();
15435 : }
15436 : {
15437 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15438 : result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
15439 : SWIG_PYTHON_THREAD_END_ALLOW;
15440 : }
15441 : if ( bLocalUseExceptions ) {
15442 : popErrorHandler();
15443 : }
15444 : #ifndef SED_HACKS
15445 : if ( bLocalUseExceptions ) {
15446 : CPLErr eclass = CPLGetLastErrorType();
15447 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15448 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15449 : }
15450 : }
15451 : #endif
15452 : }
15453 : resultobj = SWIG_FromCharPtr((const char *)result);
15454 : {
15455 : /* %typemap(freearg) (const char *utf8_path) */
15456 : GDALPythonFreeCStr(arg2, bToFree2);
15457 : }
15458 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15459 : return resultobj;
15460 : fail:
15461 : {
15462 : /* %typemap(freearg) (const char *utf8_path) */
15463 : GDALPythonFreeCStr(arg2, bToFree2);
15464 : }
15465 : return NULL;
15466 : }
15467 :
15468 :
15469 10756 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString(PyObject *self, PyObject *args) {
15470 10756 : Py_ssize_t argc;
15471 10756 : PyObject *argv[3] = {
15472 : 0
15473 : };
15474 :
15475 10756 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsString", 0, 2, argv))) SWIG_fail;
15476 10756 : --argc;
15477 10756 : if (argc == 2) {
15478 10756 : int _v;
15479 10756 : void *vptr = 0;
15480 10756 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15481 11592 : _v = SWIG_CheckState(res);
15482 10756 : if (_v) {
15483 10756 : {
15484 10756 : int res = SWIG_AsVal_int(argv[1], NULL);
15485 10756 : _v = SWIG_CheckState(res);
15486 : }
15487 9920 : if (_v) {
15488 9920 : return _wrap_Feature_GetFieldAsString__SWIG_0(self, argc, argv);
15489 : }
15490 : }
15491 : }
15492 836 : if (argc == 2) {
15493 836 : int _v;
15494 836 : void *vptr = 0;
15495 836 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15496 836 : _v = SWIG_CheckState(res);
15497 836 : if (_v) {
15498 836 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15499 836 : _v = SWIG_CheckState(res);
15500 836 : if (_v) {
15501 836 : return _wrap_Feature_GetFieldAsString__SWIG_1(self, argc, argv);
15502 : }
15503 : }
15504 : }
15505 :
15506 0 : fail:
15507 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsString'.\n"
15508 : " Possible C/C++ prototypes are:\n"
15509 : " OGRFeatureShadow::GetFieldAsString(int)\n"
15510 : " OGRFeatureShadow::GetFieldAsString(char const *)\n");
15511 : return 0;
15512 : }
15513 :
15514 :
15515 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15516 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15517 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15518 : int arg2 ;
15519 : char **arg3 = (char **) 0 ;
15520 : void *argp1 = 0 ;
15521 : int res1 = 0 ;
15522 : int val2 ;
15523 : int ecode2 = 0 ;
15524 : char *result = 0 ;
15525 :
15526 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
15527 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15528 : if (!SWIG_IsOK(res1)) {
15529 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15530 : }
15531 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15532 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15533 : if (!SWIG_IsOK(ecode2)) {
15534 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "2"" of type '" "int""'");
15535 : }
15536 : arg2 = static_cast< int >(val2);
15537 : if (swig_obj[2]) {
15538 : {
15539 : /* %typemap(in) char **dict */
15540 : arg3 = NULL;
15541 : if ( PySequence_Check( swig_obj[2] ) ) {
15542 : int bErr = FALSE;
15543 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
15544 : if ( bErr )
15545 : {
15546 : SWIG_fail;
15547 : }
15548 : }
15549 : else if ( PyMapping_Check( swig_obj[2] ) ) {
15550 : int bErr = FALSE;
15551 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
15552 : if ( bErr )
15553 : {
15554 : SWIG_fail;
15555 : }
15556 : }
15557 : else {
15558 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15559 : SWIG_fail;
15560 : }
15561 : }
15562 : }
15563 : {
15564 : const int bLocalUseExceptions = GetUseExceptions();
15565 : if ( bLocalUseExceptions ) {
15566 : pushErrorHandler();
15567 : }
15568 : {
15569 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15570 : result = (char *)OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_0(arg1,arg2,arg3);
15571 : SWIG_PYTHON_THREAD_END_ALLOW;
15572 : }
15573 : if ( bLocalUseExceptions ) {
15574 : popErrorHandler();
15575 : }
15576 : #ifndef SED_HACKS
15577 : if ( bLocalUseExceptions ) {
15578 : CPLErr eclass = CPLGetLastErrorType();
15579 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15580 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15581 : }
15582 : }
15583 : #endif
15584 : }
15585 : resultobj = SWIG_FromCharPtr((const char *)result);
15586 : {
15587 : /* %typemap(freearg) char **dict */
15588 : CSLDestroy( arg3 );
15589 : }
15590 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15591 : return resultobj;
15592 : fail:
15593 : {
15594 : /* %typemap(freearg) char **dict */
15595 : CSLDestroy( arg3 );
15596 : }
15597 : return NULL;
15598 : }
15599 :
15600 :
15601 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15602 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15603 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15604 : char *arg2 = (char *) 0 ;
15605 : char **arg3 = (char **) 0 ;
15606 : void *argp1 = 0 ;
15607 : int res1 = 0 ;
15608 : int bToFree2 = 0 ;
15609 : char *result = 0 ;
15610 :
15611 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
15612 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15613 : if (!SWIG_IsOK(res1)) {
15614 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15615 : }
15616 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15617 : {
15618 : /* %typemap(in) (const char *utf8_path) */
15619 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15620 : {
15621 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15622 : }
15623 : else
15624 : {
15625 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15626 :
15627 : }
15628 : if (arg2 == NULL)
15629 : {
15630 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15631 : SWIG_fail;
15632 : }
15633 : }
15634 : if (swig_obj[2]) {
15635 : {
15636 : /* %typemap(in) char **dict */
15637 : arg3 = NULL;
15638 : if ( PySequence_Check( swig_obj[2] ) ) {
15639 : int bErr = FALSE;
15640 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
15641 : if ( bErr )
15642 : {
15643 : SWIG_fail;
15644 : }
15645 : }
15646 : else if ( PyMapping_Check( swig_obj[2] ) ) {
15647 : int bErr = FALSE;
15648 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
15649 : if ( bErr )
15650 : {
15651 : SWIG_fail;
15652 : }
15653 : }
15654 : else {
15655 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15656 : SWIG_fail;
15657 : }
15658 : }
15659 : }
15660 : {
15661 : const int bLocalUseExceptions = GetUseExceptions();
15662 : if ( bLocalUseExceptions ) {
15663 : pushErrorHandler();
15664 : }
15665 : {
15666 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15667 : result = (char *)OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_1(arg1,(char const *)arg2,arg3);
15668 : SWIG_PYTHON_THREAD_END_ALLOW;
15669 : }
15670 : if ( bLocalUseExceptions ) {
15671 : popErrorHandler();
15672 : }
15673 : #ifndef SED_HACKS
15674 : if ( bLocalUseExceptions ) {
15675 : CPLErr eclass = CPLGetLastErrorType();
15676 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15677 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15678 : }
15679 : }
15680 : #endif
15681 : }
15682 : resultobj = SWIG_FromCharPtr((const char *)result);
15683 : {
15684 : /* %typemap(freearg) (const char *utf8_path) */
15685 : GDALPythonFreeCStr(arg2, bToFree2);
15686 : }
15687 : {
15688 : /* %typemap(freearg) char **dict */
15689 : CSLDestroy( arg3 );
15690 : }
15691 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15692 : return resultobj;
15693 : fail:
15694 : {
15695 : /* %typemap(freearg) (const char *utf8_path) */
15696 : GDALPythonFreeCStr(arg2, bToFree2);
15697 : }
15698 : {
15699 : /* %typemap(freearg) char **dict */
15700 : CSLDestroy( arg3 );
15701 : }
15702 : return NULL;
15703 : }
15704 :
15705 :
15706 8 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime(PyObject *self, PyObject *args) {
15707 8 : Py_ssize_t argc;
15708 8 : PyObject *argv[4] = {
15709 : 0
15710 : };
15711 :
15712 8 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsISO8601DateTime", 0, 3, argv))) SWIG_fail;
15713 8 : --argc;
15714 8 : if ((argc >= 2) && (argc <= 3)) {
15715 8 : int _v;
15716 8 : void *vptr = 0;
15717 8 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15718 14 : _v = SWIG_CheckState(res);
15719 8 : if (_v) {
15720 8 : {
15721 8 : int res = SWIG_AsVal_int(argv[1], NULL);
15722 8 : _v = SWIG_CheckState(res);
15723 : }
15724 2 : if (_v) {
15725 2 : if (argc <= 2) {
15726 2 : return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(self, argc, argv);
15727 : }
15728 0 : {
15729 : /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
15730 : /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
15731 : /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
15732 : /* (see #4816) */
15733 0 : _v = ((PyMapping_Check(argv[2]) || PySequence_Check(argv[2]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0)) ) ? 1 : 0;
15734 : }
15735 0 : if (_v) {
15736 0 : return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(self, argc, argv);
15737 : }
15738 : }
15739 : }
15740 : }
15741 6 : if ((argc >= 2) && (argc <= 3)) {
15742 6 : int _v;
15743 6 : void *vptr = 0;
15744 6 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15745 6 : _v = SWIG_CheckState(res);
15746 6 : if (_v) {
15747 6 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15748 6 : _v = SWIG_CheckState(res);
15749 6 : if (_v) {
15750 6 : if (argc <= 2) {
15751 6 : return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(self, argc, argv);
15752 : }
15753 0 : {
15754 : /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
15755 : /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
15756 : /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
15757 : /* (see #4816) */
15758 0 : _v = ((PyMapping_Check(argv[2]) || PySequence_Check(argv[2]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0)) ) ? 1 : 0;
15759 : }
15760 0 : if (_v) {
15761 0 : return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(self, argc, argv);
15762 : }
15763 : }
15764 : }
15765 : }
15766 :
15767 0 : fail:
15768 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsISO8601DateTime'.\n"
15769 : " Possible C/C++ prototypes are:\n"
15770 : " OGRFeatureShadow::GetFieldAsISO8601DateTime(int,char **)\n"
15771 : " OGRFeatureShadow::GetFieldAsISO8601DateTime(char const *,char **)\n");
15772 : return 0;
15773 : }
15774 :
15775 :
15776 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15777 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15778 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15779 : int arg2 ;
15780 : void *argp1 = 0 ;
15781 : int res1 = 0 ;
15782 : int val2 ;
15783 : int ecode2 = 0 ;
15784 : int result;
15785 :
15786 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15787 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15788 : if (!SWIG_IsOK(res1)) {
15789 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15790 : }
15791 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15792 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15793 : if (!SWIG_IsOK(ecode2)) {
15794 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "int""'");
15795 : }
15796 : arg2 = static_cast< int >(val2);
15797 : {
15798 : const int bLocalUseExceptions = GetUseExceptions();
15799 : if ( bLocalUseExceptions ) {
15800 : pushErrorHandler();
15801 : }
15802 : {
15803 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15804 : result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
15805 : SWIG_PYTHON_THREAD_END_ALLOW;
15806 : }
15807 : if ( bLocalUseExceptions ) {
15808 : popErrorHandler();
15809 : }
15810 : #ifndef SED_HACKS
15811 : if ( bLocalUseExceptions ) {
15812 : CPLErr eclass = CPLGetLastErrorType();
15813 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15814 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15815 : }
15816 : }
15817 : #endif
15818 : }
15819 : resultobj = SWIG_From_int(static_cast< int >(result));
15820 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15821 : return resultobj;
15822 : fail:
15823 : return NULL;
15824 : }
15825 :
15826 :
15827 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15828 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15829 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15830 : char *arg2 = (char *) 0 ;
15831 : void *argp1 = 0 ;
15832 : int res1 = 0 ;
15833 : int bToFree2 = 0 ;
15834 : int result;
15835 :
15836 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15837 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15838 : if (!SWIG_IsOK(res1)) {
15839 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15840 : }
15841 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15842 : {
15843 : /* %typemap(in) (const char *utf8_path) */
15844 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15845 : {
15846 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15847 : }
15848 : else
15849 : {
15850 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15851 :
15852 : }
15853 : if (arg2 == NULL)
15854 : {
15855 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15856 : SWIG_fail;
15857 : }
15858 : }
15859 : {
15860 : const int bLocalUseExceptions = GetUseExceptions();
15861 : if ( bLocalUseExceptions ) {
15862 : pushErrorHandler();
15863 : }
15864 : {
15865 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15866 : result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
15867 : SWIG_PYTHON_THREAD_END_ALLOW;
15868 : }
15869 : if ( bLocalUseExceptions ) {
15870 : popErrorHandler();
15871 : }
15872 : #ifndef SED_HACKS
15873 : if ( bLocalUseExceptions ) {
15874 : CPLErr eclass = CPLGetLastErrorType();
15875 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15876 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15877 : }
15878 : }
15879 : #endif
15880 : }
15881 : resultobj = SWIG_From_int(static_cast< int >(result));
15882 : {
15883 : /* %typemap(freearg) (const char *utf8_path) */
15884 : GDALPythonFreeCStr(arg2, bToFree2);
15885 : }
15886 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15887 : return resultobj;
15888 : fail:
15889 : {
15890 : /* %typemap(freearg) (const char *utf8_path) */
15891 : GDALPythonFreeCStr(arg2, bToFree2);
15892 : }
15893 : return NULL;
15894 : }
15895 :
15896 :
15897 87788 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger(PyObject *self, PyObject *args) {
15898 87788 : Py_ssize_t argc;
15899 87788 : PyObject *argv[3] = {
15900 : 0
15901 : };
15902 :
15903 87788 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger", 0, 2, argv))) SWIG_fail;
15904 87788 : --argc;
15905 87788 : if (argc == 2) {
15906 87788 : int _v;
15907 87788 : void *vptr = 0;
15908 87788 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15909 88005 : _v = SWIG_CheckState(res);
15910 87788 : if (_v) {
15911 87788 : {
15912 87788 : int res = SWIG_AsVal_int(argv[1], NULL);
15913 87788 : _v = SWIG_CheckState(res);
15914 : }
15915 87571 : if (_v) {
15916 87571 : return _wrap_Feature_GetFieldAsInteger__SWIG_0(self, argc, argv);
15917 : }
15918 : }
15919 : }
15920 217 : if (argc == 2) {
15921 217 : int _v;
15922 217 : void *vptr = 0;
15923 217 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15924 217 : _v = SWIG_CheckState(res);
15925 217 : if (_v) {
15926 217 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15927 217 : _v = SWIG_CheckState(res);
15928 217 : if (_v) {
15929 217 : return _wrap_Feature_GetFieldAsInteger__SWIG_1(self, argc, argv);
15930 : }
15931 : }
15932 : }
15933 :
15934 0 : fail:
15935 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsInteger'.\n"
15936 : " Possible C/C++ prototypes are:\n"
15937 : " OGRFeatureShadow::GetFieldAsInteger(int)\n"
15938 : " OGRFeatureShadow::GetFieldAsInteger(char const *)\n");
15939 : return 0;
15940 : }
15941 :
15942 :
15943 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15944 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15945 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15946 : int arg2 ;
15947 : void *argp1 = 0 ;
15948 : int res1 = 0 ;
15949 : int val2 ;
15950 : int ecode2 = 0 ;
15951 : GIntBig result;
15952 :
15953 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15954 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15955 : if (!SWIG_IsOK(res1)) {
15956 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15957 : }
15958 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15959 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15960 : if (!SWIG_IsOK(ecode2)) {
15961 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger64" "', argument " "2"" of type '" "int""'");
15962 : }
15963 : arg2 = static_cast< int >(val2);
15964 : {
15965 : const int bLocalUseExceptions = GetUseExceptions();
15966 : if ( bLocalUseExceptions ) {
15967 : pushErrorHandler();
15968 : }
15969 : {
15970 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15971 : result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(arg1,arg2);
15972 : SWIG_PYTHON_THREAD_END_ALLOW;
15973 : }
15974 : if ( bLocalUseExceptions ) {
15975 : popErrorHandler();
15976 : }
15977 : #ifndef SED_HACKS
15978 : if ( bLocalUseExceptions ) {
15979 : CPLErr eclass = CPLGetLastErrorType();
15980 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15981 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15982 : }
15983 : }
15984 : #endif
15985 : }
15986 : {
15987 : resultobj = PyLong_FromLongLong(result);
15988 : }
15989 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15990 : return resultobj;
15991 : fail:
15992 : return NULL;
15993 : }
15994 :
15995 :
15996 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15997 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15998 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15999 : char *arg2 = (char *) 0 ;
16000 : void *argp1 = 0 ;
16001 : int res1 = 0 ;
16002 : int bToFree2 = 0 ;
16003 : GIntBig result;
16004 :
16005 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16006 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16007 : if (!SWIG_IsOK(res1)) {
16008 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16009 : }
16010 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16011 : {
16012 : /* %typemap(in) (const char *utf8_path) */
16013 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16014 : {
16015 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16016 : }
16017 : else
16018 : {
16019 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16020 :
16021 : }
16022 : if (arg2 == NULL)
16023 : {
16024 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16025 : SWIG_fail;
16026 : }
16027 : }
16028 : {
16029 : const int bLocalUseExceptions = GetUseExceptions();
16030 : if ( bLocalUseExceptions ) {
16031 : pushErrorHandler();
16032 : }
16033 : {
16034 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16035 : result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(arg1,(char const *)arg2);
16036 : SWIG_PYTHON_THREAD_END_ALLOW;
16037 : }
16038 : if ( bLocalUseExceptions ) {
16039 : popErrorHandler();
16040 : }
16041 : #ifndef SED_HACKS
16042 : if ( bLocalUseExceptions ) {
16043 : CPLErr eclass = CPLGetLastErrorType();
16044 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16045 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16046 : }
16047 : }
16048 : #endif
16049 : }
16050 : {
16051 : resultobj = PyLong_FromLongLong(result);
16052 : }
16053 : {
16054 : /* %typemap(freearg) (const char *utf8_path) */
16055 : GDALPythonFreeCStr(arg2, bToFree2);
16056 : }
16057 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16058 : return resultobj;
16059 : fail:
16060 : {
16061 : /* %typemap(freearg) (const char *utf8_path) */
16062 : GDALPythonFreeCStr(arg2, bToFree2);
16063 : }
16064 : return NULL;
16065 : }
16066 :
16067 :
16068 1437 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64(PyObject *self, PyObject *args) {
16069 1437 : Py_ssize_t argc;
16070 1437 : PyObject *argv[3] = {
16071 : 0
16072 : };
16073 :
16074 1437 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger64", 0, 2, argv))) SWIG_fail;
16075 1437 : --argc;
16076 1437 : if (argc == 2) {
16077 1437 : int _v;
16078 1437 : void *vptr = 0;
16079 1437 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16080 1437 : _v = SWIG_CheckState(res);
16081 1437 : if (_v) {
16082 1437 : {
16083 1437 : int res = SWIG_AsVal_int(argv[1], NULL);
16084 1437 : _v = SWIG_CheckState(res);
16085 : }
16086 1437 : if (_v) {
16087 1437 : return _wrap_Feature_GetFieldAsInteger64__SWIG_0(self, argc, argv);
16088 : }
16089 : }
16090 : }
16091 0 : if (argc == 2) {
16092 0 : int _v;
16093 0 : void *vptr = 0;
16094 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16095 0 : _v = SWIG_CheckState(res);
16096 0 : if (_v) {
16097 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
16098 0 : _v = SWIG_CheckState(res);
16099 0 : if (_v) {
16100 0 : return _wrap_Feature_GetFieldAsInteger64__SWIG_1(self, argc, argv);
16101 : }
16102 : }
16103 : }
16104 :
16105 0 : fail:
16106 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsInteger64'.\n"
16107 : " Possible C/C++ prototypes are:\n"
16108 : " OGRFeatureShadow::GetFieldAsInteger64(int)\n"
16109 : " OGRFeatureShadow::GetFieldAsInteger64(char const *)\n");
16110 : return 0;
16111 : }
16112 :
16113 :
16114 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16115 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16116 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16117 : int arg2 ;
16118 : void *argp1 = 0 ;
16119 : int res1 = 0 ;
16120 : int val2 ;
16121 : int ecode2 = 0 ;
16122 : double result;
16123 :
16124 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16125 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16126 : if (!SWIG_IsOK(res1)) {
16127 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16128 : }
16129 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16130 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16131 : if (!SWIG_IsOK(ecode2)) {
16132 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "int""'");
16133 : }
16134 : arg2 = static_cast< int >(val2);
16135 : {
16136 : const int bLocalUseExceptions = GetUseExceptions();
16137 : if ( bLocalUseExceptions ) {
16138 : pushErrorHandler();
16139 : }
16140 : {
16141 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16142 : result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
16143 : SWIG_PYTHON_THREAD_END_ALLOW;
16144 : }
16145 : if ( bLocalUseExceptions ) {
16146 : popErrorHandler();
16147 : }
16148 : #ifndef SED_HACKS
16149 : if ( bLocalUseExceptions ) {
16150 : CPLErr eclass = CPLGetLastErrorType();
16151 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16152 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16153 : }
16154 : }
16155 : #endif
16156 : }
16157 : resultobj = SWIG_From_double(static_cast< double >(result));
16158 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16159 : return resultobj;
16160 : fail:
16161 : return NULL;
16162 : }
16163 :
16164 :
16165 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16166 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16167 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16168 : char *arg2 = (char *) 0 ;
16169 : void *argp1 = 0 ;
16170 : int res1 = 0 ;
16171 : int bToFree2 = 0 ;
16172 : double result;
16173 :
16174 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16175 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16176 : if (!SWIG_IsOK(res1)) {
16177 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16178 : }
16179 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16180 : {
16181 : /* %typemap(in) (const char *utf8_path) */
16182 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16183 : {
16184 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16185 : }
16186 : else
16187 : {
16188 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16189 :
16190 : }
16191 : if (arg2 == NULL)
16192 : {
16193 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16194 : SWIG_fail;
16195 : }
16196 : }
16197 : {
16198 : const int bLocalUseExceptions = GetUseExceptions();
16199 : if ( bLocalUseExceptions ) {
16200 : pushErrorHandler();
16201 : }
16202 : {
16203 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16204 : result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
16205 : SWIG_PYTHON_THREAD_END_ALLOW;
16206 : }
16207 : if ( bLocalUseExceptions ) {
16208 : popErrorHandler();
16209 : }
16210 : #ifndef SED_HACKS
16211 : if ( bLocalUseExceptions ) {
16212 : CPLErr eclass = CPLGetLastErrorType();
16213 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16214 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16215 : }
16216 : }
16217 : #endif
16218 : }
16219 : resultobj = SWIG_From_double(static_cast< double >(result));
16220 : {
16221 : /* %typemap(freearg) (const char *utf8_path) */
16222 : GDALPythonFreeCStr(arg2, bToFree2);
16223 : }
16224 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16225 : return resultobj;
16226 : fail:
16227 : {
16228 : /* %typemap(freearg) (const char *utf8_path) */
16229 : GDALPythonFreeCStr(arg2, bToFree2);
16230 : }
16231 : return NULL;
16232 : }
16233 :
16234 :
16235 2044 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble(PyObject *self, PyObject *args) {
16236 2044 : Py_ssize_t argc;
16237 2044 : PyObject *argv[3] = {
16238 : 0
16239 : };
16240 :
16241 2044 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDouble", 0, 2, argv))) SWIG_fail;
16242 2044 : --argc;
16243 2044 : if (argc == 2) {
16244 2044 : int _v;
16245 2044 : void *vptr = 0;
16246 2044 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16247 2096 : _v = SWIG_CheckState(res);
16248 2044 : if (_v) {
16249 2044 : {
16250 2044 : int res = SWIG_AsVal_int(argv[1], NULL);
16251 2044 : _v = SWIG_CheckState(res);
16252 : }
16253 1992 : if (_v) {
16254 1992 : return _wrap_Feature_GetFieldAsDouble__SWIG_0(self, argc, argv);
16255 : }
16256 : }
16257 : }
16258 52 : if (argc == 2) {
16259 52 : int _v;
16260 52 : void *vptr = 0;
16261 52 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16262 52 : _v = SWIG_CheckState(res);
16263 52 : if (_v) {
16264 52 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
16265 52 : _v = SWIG_CheckState(res);
16266 52 : if (_v) {
16267 52 : return _wrap_Feature_GetFieldAsDouble__SWIG_1(self, argc, argv);
16268 : }
16269 : }
16270 : }
16271 :
16272 0 : fail:
16273 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDouble'.\n"
16274 : " Possible C/C++ prototypes are:\n"
16275 : " OGRFeatureShadow::GetFieldAsDouble(int)\n"
16276 : " OGRFeatureShadow::GetFieldAsDouble(char const *)\n");
16277 : return 0;
16278 : }
16279 :
16280 :
16281 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16282 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16283 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16284 : int arg2 ;
16285 : int *arg3 = (int *) 0 ;
16286 : int *arg4 = (int *) 0 ;
16287 : int *arg5 = (int *) 0 ;
16288 : int *arg6 = (int *) 0 ;
16289 : int *arg7 = (int *) 0 ;
16290 : float *arg8 = (float *) 0 ;
16291 : int *arg9 = (int *) 0 ;
16292 : void *argp1 = 0 ;
16293 : int res1 = 0 ;
16294 : int val2 ;
16295 : int ecode2 = 0 ;
16296 : int temp3 ;
16297 : int res3 = SWIG_TMPOBJ ;
16298 : int temp4 ;
16299 : int res4 = SWIG_TMPOBJ ;
16300 : int temp5 ;
16301 : int res5 = SWIG_TMPOBJ ;
16302 : int temp6 ;
16303 : int res6 = SWIG_TMPOBJ ;
16304 : int temp7 ;
16305 : int res7 = SWIG_TMPOBJ ;
16306 : float temp8 ;
16307 : int res8 = SWIG_TMPOBJ ;
16308 : int temp9 ;
16309 : int res9 = SWIG_TMPOBJ ;
16310 :
16311 : arg3 = &temp3;
16312 : arg4 = &temp4;
16313 : arg5 = &temp5;
16314 : arg6 = &temp6;
16315 : arg7 = &temp7;
16316 : arg8 = &temp8;
16317 : arg9 = &temp9;
16318 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16319 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16320 : if (!SWIG_IsOK(res1)) {
16321 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16322 : }
16323 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16324 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16325 : if (!SWIG_IsOK(ecode2)) {
16326 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDateTime" "', argument " "2"" of type '" "int""'");
16327 : }
16328 : arg2 = static_cast< int >(val2);
16329 : {
16330 : const int bLocalUseExceptions = GetUseExceptions();
16331 : if ( bLocalUseExceptions ) {
16332 : pushErrorHandler();
16333 : }
16334 : {
16335 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16336 : OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
16337 : SWIG_PYTHON_THREAD_END_ALLOW;
16338 : }
16339 : if ( bLocalUseExceptions ) {
16340 : popErrorHandler();
16341 : }
16342 : #ifndef SED_HACKS
16343 : if ( bLocalUseExceptions ) {
16344 : CPLErr eclass = CPLGetLastErrorType();
16345 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16346 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16347 : }
16348 : }
16349 : #endif
16350 : }
16351 : resultobj = SWIG_Py_Void();
16352 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
16353 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
16354 : } else {
16355 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16356 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
16357 : }
16358 : if (ReturnSame(SWIG_IsTmpObj(res4))) {
16359 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
16360 : } else {
16361 : int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16362 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
16363 : }
16364 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
16365 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
16366 : } else {
16367 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16368 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
16369 : }
16370 : if (ReturnSame(SWIG_IsTmpObj(res6))) {
16371 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
16372 : } else {
16373 : int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16374 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
16375 : }
16376 : if (ReturnSame(SWIG_IsTmpObj(res7))) {
16377 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
16378 : } else {
16379 : int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16380 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
16381 : }
16382 : if (ReturnSame(SWIG_IsTmpObj(res8))) {
16383 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg8)));
16384 : } else {
16385 : int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16386 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_float, new_flags));
16387 : }
16388 : if (ReturnSame(SWIG_IsTmpObj(res9))) {
16389 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
16390 : } else {
16391 : int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16392 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
16393 : }
16394 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16395 : return resultobj;
16396 : fail:
16397 : return NULL;
16398 : }
16399 :
16400 :
16401 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16402 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16403 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16404 : char *arg2 = (char *) 0 ;
16405 : int *arg3 = (int *) 0 ;
16406 : int *arg4 = (int *) 0 ;
16407 : int *arg5 = (int *) 0 ;
16408 : int *arg6 = (int *) 0 ;
16409 : int *arg7 = (int *) 0 ;
16410 : float *arg8 = (float *) 0 ;
16411 : int *arg9 = (int *) 0 ;
16412 : void *argp1 = 0 ;
16413 : int res1 = 0 ;
16414 : int bToFree2 = 0 ;
16415 : int temp3 ;
16416 : int res3 = SWIG_TMPOBJ ;
16417 : int temp4 ;
16418 : int res4 = SWIG_TMPOBJ ;
16419 : int temp5 ;
16420 : int res5 = SWIG_TMPOBJ ;
16421 : int temp6 ;
16422 : int res6 = SWIG_TMPOBJ ;
16423 : int temp7 ;
16424 : int res7 = SWIG_TMPOBJ ;
16425 : float temp8 ;
16426 : int res8 = SWIG_TMPOBJ ;
16427 : int temp9 ;
16428 : int res9 = SWIG_TMPOBJ ;
16429 :
16430 : arg3 = &temp3;
16431 : arg4 = &temp4;
16432 : arg5 = &temp5;
16433 : arg6 = &temp6;
16434 : arg7 = &temp7;
16435 : arg8 = &temp8;
16436 : arg9 = &temp9;
16437 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16438 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16439 : if (!SWIG_IsOK(res1)) {
16440 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16441 : }
16442 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16443 : {
16444 : /* %typemap(in) (const char *utf8_path) */
16445 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16446 : {
16447 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16448 : }
16449 : else
16450 : {
16451 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16452 :
16453 : }
16454 : if (arg2 == NULL)
16455 : {
16456 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16457 : SWIG_fail;
16458 : }
16459 : }
16460 : {
16461 : const int bLocalUseExceptions = GetUseExceptions();
16462 : if ( bLocalUseExceptions ) {
16463 : pushErrorHandler();
16464 : }
16465 : {
16466 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16467 : OGRFeatureShadow_GetFieldAsDateTime__SWIG_1(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
16468 : SWIG_PYTHON_THREAD_END_ALLOW;
16469 : }
16470 : if ( bLocalUseExceptions ) {
16471 : popErrorHandler();
16472 : }
16473 : #ifndef SED_HACKS
16474 : if ( bLocalUseExceptions ) {
16475 : CPLErr eclass = CPLGetLastErrorType();
16476 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16477 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16478 : }
16479 : }
16480 : #endif
16481 : }
16482 : resultobj = SWIG_Py_Void();
16483 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
16484 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
16485 : } else {
16486 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16487 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
16488 : }
16489 : if (ReturnSame(SWIG_IsTmpObj(res4))) {
16490 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
16491 : } else {
16492 : int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16493 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
16494 : }
16495 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
16496 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
16497 : } else {
16498 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16499 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
16500 : }
16501 : if (ReturnSame(SWIG_IsTmpObj(res6))) {
16502 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
16503 : } else {
16504 : int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16505 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
16506 : }
16507 : if (ReturnSame(SWIG_IsTmpObj(res7))) {
16508 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
16509 : } else {
16510 : int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16511 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
16512 : }
16513 : if (ReturnSame(SWIG_IsTmpObj(res8))) {
16514 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg8)));
16515 : } else {
16516 : int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16517 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_float, new_flags));
16518 : }
16519 : if (ReturnSame(SWIG_IsTmpObj(res9))) {
16520 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
16521 : } else {
16522 : int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16523 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
16524 : }
16525 : {
16526 : /* %typemap(freearg) (const char *utf8_path) */
16527 : GDALPythonFreeCStr(arg2, bToFree2);
16528 : }
16529 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16530 : return resultobj;
16531 : fail:
16532 : {
16533 : /* %typemap(freearg) (const char *utf8_path) */
16534 : GDALPythonFreeCStr(arg2, bToFree2);
16535 : }
16536 : return NULL;
16537 : }
16538 :
16539 :
16540 87 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime(PyObject *self, PyObject *args) {
16541 87 : Py_ssize_t argc;
16542 87 : PyObject *argv[3] = {
16543 : 0
16544 : };
16545 :
16546 87 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDateTime", 0, 2, argv))) SWIG_fail;
16547 87 : --argc;
16548 87 : if (argc == 2) {
16549 87 : int _v;
16550 87 : void *vptr = 0;
16551 87 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16552 88 : _v = SWIG_CheckState(res);
16553 87 : if (_v) {
16554 87 : {
16555 87 : int res = SWIG_AsVal_int(argv[1], NULL);
16556 87 : _v = SWIG_CheckState(res);
16557 : }
16558 86 : if (_v) {
16559 86 : return _wrap_Feature_GetFieldAsDateTime__SWIG_0(self, argc, argv);
16560 : }
16561 : }
16562 : }
16563 1 : if (argc == 2) {
16564 1 : int _v;
16565 1 : void *vptr = 0;
16566 1 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16567 1 : _v = SWIG_CheckState(res);
16568 1 : if (_v) {
16569 1 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
16570 1 : _v = SWIG_CheckState(res);
16571 1 : if (_v) {
16572 1 : return _wrap_Feature_GetFieldAsDateTime__SWIG_1(self, argc, argv);
16573 : }
16574 : }
16575 : }
16576 :
16577 0 : fail:
16578 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDateTime'.\n"
16579 : " Possible C/C++ prototypes are:\n"
16580 : " OGRFeatureShadow::GetFieldAsDateTime(int,int *,int *,int *,int *,int *,float *,int *)\n"
16581 : " OGRFeatureShadow::GetFieldAsDateTime(char const *,int *,int *,int *,int *,int *,float *,int *)\n");
16582 : return 0;
16583 : }
16584 :
16585 :
16586 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16587 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16588 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16589 : int arg2 ;
16590 : int *arg3 = (int *) 0 ;
16591 : int **arg4 = (int **) 0 ;
16592 : void *argp1 = 0 ;
16593 : int res1 = 0 ;
16594 : int val2 ;
16595 : int ecode2 = 0 ;
16596 : int nLen3 = 0 ;
16597 : int *pList3 = NULL ;
16598 :
16599 : {
16600 : /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
16601 : arg3 = &nLen3;
16602 : arg4 = &pList3;
16603 : }
16604 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16605 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16606 : if (!SWIG_IsOK(res1)) {
16607 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16608 : }
16609 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16610 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16611 : if (!SWIG_IsOK(ecode2)) {
16612 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "2"" of type '" "int""'");
16613 : }
16614 : arg2 = static_cast< int >(val2);
16615 : {
16616 : const int bLocalUseExceptions = GetUseExceptions();
16617 : if ( bLocalUseExceptions ) {
16618 : pushErrorHandler();
16619 : }
16620 : {
16621 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16622 : OGRFeatureShadow_GetFieldAsIntegerList__SWIG_0(arg1,arg2,arg3,(int const **)arg4);
16623 : SWIG_PYTHON_THREAD_END_ALLOW;
16624 : }
16625 : if ( bLocalUseExceptions ) {
16626 : popErrorHandler();
16627 : }
16628 : #ifndef SED_HACKS
16629 : if ( bLocalUseExceptions ) {
16630 : CPLErr eclass = CPLGetLastErrorType();
16631 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16632 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16633 : }
16634 : }
16635 : #endif
16636 : }
16637 : resultobj = SWIG_Py_Void();
16638 : {
16639 : /* %typemap(argout) (int *nLen, const int **pList ) */
16640 : Py_DECREF(resultobj);
16641 : PyObject *out = PyList_New( *arg3 );
16642 : if( !out ) {
16643 : SWIG_fail;
16644 : }
16645 : for( int i=0; i<*arg3; i++ ) {
16646 : PyObject *val = PyInt_FromLong( (*arg4)[i] );
16647 : PyList_SetItem( out, i, val );
16648 : }
16649 : resultobj = out;
16650 : }
16651 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16652 : return resultobj;
16653 : fail:
16654 : return NULL;
16655 : }
16656 :
16657 :
16658 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16659 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16660 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16661 : char *arg2 = (char *) 0 ;
16662 : int *arg3 = (int *) 0 ;
16663 : int **arg4 = (int **) 0 ;
16664 : void *argp1 = 0 ;
16665 : int res1 = 0 ;
16666 : int bToFree2 = 0 ;
16667 : int nLen3 = 0 ;
16668 : int *pList3 = NULL ;
16669 :
16670 : {
16671 : /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
16672 : arg3 = &nLen3;
16673 : arg4 = &pList3;
16674 : }
16675 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16676 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16677 : if (!SWIG_IsOK(res1)) {
16678 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16679 : }
16680 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16681 : {
16682 : /* %typemap(in) (const char *utf8_path) */
16683 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16684 : {
16685 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16686 : }
16687 : else
16688 : {
16689 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16690 :
16691 : }
16692 : if (arg2 == NULL)
16693 : {
16694 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16695 : SWIG_fail;
16696 : }
16697 : }
16698 : {
16699 : const int bLocalUseExceptions = GetUseExceptions();
16700 : if ( bLocalUseExceptions ) {
16701 : pushErrorHandler();
16702 : }
16703 : {
16704 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16705 : OGRFeatureShadow_GetFieldAsIntegerList__SWIG_1(arg1,(char const *)arg2,arg3,(int const **)arg4);
16706 : SWIG_PYTHON_THREAD_END_ALLOW;
16707 : }
16708 : if ( bLocalUseExceptions ) {
16709 : popErrorHandler();
16710 : }
16711 : #ifndef SED_HACKS
16712 : if ( bLocalUseExceptions ) {
16713 : CPLErr eclass = CPLGetLastErrorType();
16714 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16715 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16716 : }
16717 : }
16718 : #endif
16719 : }
16720 : resultobj = SWIG_Py_Void();
16721 : {
16722 : /* %typemap(argout) (int *nLen, const int **pList ) */
16723 : Py_DECREF(resultobj);
16724 : PyObject *out = PyList_New( *arg3 );
16725 : if( !out ) {
16726 : SWIG_fail;
16727 : }
16728 : for( int i=0; i<*arg3; i++ ) {
16729 : PyObject *val = PyInt_FromLong( (*arg4)[i] );
16730 : PyList_SetItem( out, i, val );
16731 : }
16732 : resultobj = out;
16733 : }
16734 : {
16735 : /* %typemap(freearg) (const char *utf8_path) */
16736 : GDALPythonFreeCStr(arg2, bToFree2);
16737 : }
16738 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16739 : return resultobj;
16740 : fail:
16741 : {
16742 : /* %typemap(freearg) (const char *utf8_path) */
16743 : GDALPythonFreeCStr(arg2, bToFree2);
16744 : }
16745 : return NULL;
16746 : }
16747 :
16748 :
16749 811 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList(PyObject *self, PyObject *args) {
16750 811 : Py_ssize_t argc;
16751 811 : PyObject *argv[3] = {
16752 : 0
16753 : };
16754 :
16755 811 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsIntegerList", 0, 2, argv))) SWIG_fail;
16756 811 : --argc;
16757 811 : if (argc == 2) {
16758 811 : int _v;
16759 811 : void *vptr = 0;
16760 811 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16761 811 : _v = SWIG_CheckState(res);
16762 811 : if (_v) {
16763 811 : {
16764 811 : int res = SWIG_AsVal_int(argv[1], NULL);
16765 811 : _v = SWIG_CheckState(res);
16766 : }
16767 811 : if (_v) {
16768 811 : return _wrap_Feature_GetFieldAsIntegerList__SWIG_0(self, argc, argv);
16769 : }
16770 : }
16771 : }
16772 0 : if (argc == 2) {
16773 0 : int _v;
16774 0 : void *vptr = 0;
16775 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16776 0 : _v = SWIG_CheckState(res);
16777 0 : if (_v) {
16778 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
16779 0 : _v = SWIG_CheckState(res);
16780 0 : if (_v) {
16781 0 : return _wrap_Feature_GetFieldAsIntegerList__SWIG_1(self, argc, argv);
16782 : }
16783 : }
16784 : }
16785 :
16786 0 : fail:
16787 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsIntegerList'.\n"
16788 : " Possible C/C++ prototypes are:\n"
16789 : " OGRFeatureShadow::GetFieldAsIntegerList(int,int *,int const **)\n"
16790 : " OGRFeatureShadow::GetFieldAsIntegerList(char const *,int *,int const **)\n");
16791 : return 0;
16792 : }
16793 :
16794 :
16795 332 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16796 332 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16797 332 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16798 332 : int arg2 ;
16799 332 : int *arg3 = (int *) 0 ;
16800 332 : GIntBig **arg4 = (GIntBig **) 0 ;
16801 332 : void *argp1 = 0 ;
16802 332 : int res1 = 0 ;
16803 332 : int val2 ;
16804 332 : int ecode2 = 0 ;
16805 332 : int nLen3 = 0 ;
16806 332 : GIntBig *pList3 = NULL ;
16807 332 : PyObject *swig_obj[2] ;
16808 :
16809 332 : {
16810 : /* %typemap(in,numinputs=0) (int *nLen3, const GIntBig **pList3) (int nLen3, GIntBig *pList3) */
16811 332 : arg3 = &nLen3;
16812 332 : arg4 = &pList3;
16813 : }
16814 332 : if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger64List", 2, 2, swig_obj)) SWIG_fail;
16815 332 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16816 332 : if (!SWIG_IsOK(res1)) {
16817 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64List" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16818 : }
16819 332 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16820 332 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16821 332 : if (!SWIG_IsOK(ecode2)) {
16822 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger64List" "', argument " "2"" of type '" "int""'");
16823 : }
16824 332 : arg2 = static_cast< int >(val2);
16825 332 : {
16826 332 : const int bLocalUseExceptions = GetUseExceptions();
16827 332 : if ( bLocalUseExceptions ) {
16828 303 : pushErrorHandler();
16829 : }
16830 332 : {
16831 332 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16832 332 : OGRFeatureShadow_GetFieldAsInteger64List(arg1,arg2,arg3,(GIntBig const **)arg4);
16833 332 : SWIG_PYTHON_THREAD_END_ALLOW;
16834 : }
16835 332 : if ( bLocalUseExceptions ) {
16836 303 : popErrorHandler();
16837 : }
16838 : #ifndef SED_HACKS
16839 : if ( bLocalUseExceptions ) {
16840 : CPLErr eclass = CPLGetLastErrorType();
16841 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16842 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16843 : }
16844 : }
16845 : #endif
16846 : }
16847 332 : resultobj = SWIG_Py_Void();
16848 332 : {
16849 : /* %typemap(argout) (int *nLen, const GIntBig **pList ) */
16850 332 : Py_DECREF(resultobj);
16851 332 : PyObject *out = PyList_New( *arg3 );
16852 332 : if( !out ) {
16853 0 : SWIG_fail;
16854 : }
16855 833 : for( int i=0; i<*arg3; i++ ) {
16856 501 : char szTmp[32];
16857 501 : snprintf(szTmp, sizeof(szTmp), CPL_FRMT_GIB, (*arg4)[i]);
16858 501 : PyObject* val;
16859 501 : val = PyLong_FromString(szTmp, NULL, 10);
16860 501 : PyList_SetItem( out, i, val );
16861 : }
16862 332 : resultobj = out;
16863 : }
16864 332 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16865 : return resultobj;
16866 : fail:
16867 : return NULL;
16868 : }
16869 :
16870 :
16871 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16872 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16873 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16874 : int arg2 ;
16875 : int *arg3 = (int *) 0 ;
16876 : double **arg4 = (double **) 0 ;
16877 : void *argp1 = 0 ;
16878 : int res1 = 0 ;
16879 : int val2 ;
16880 : int ecode2 = 0 ;
16881 : int nLen3 = 0 ;
16882 : double *pList3 = NULL ;
16883 :
16884 : {
16885 : /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
16886 : arg3 = &nLen3;
16887 : arg4 = &pList3;
16888 : }
16889 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16890 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16891 : if (!SWIG_IsOK(res1)) {
16892 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16893 : }
16894 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16895 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16896 : if (!SWIG_IsOK(ecode2)) {
16897 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "2"" of type '" "int""'");
16898 : }
16899 : arg2 = static_cast< int >(val2);
16900 : {
16901 : const int bLocalUseExceptions = GetUseExceptions();
16902 : if ( bLocalUseExceptions ) {
16903 : pushErrorHandler();
16904 : }
16905 : {
16906 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16907 : OGRFeatureShadow_GetFieldAsDoubleList__SWIG_0(arg1,arg2,arg3,(double const **)arg4);
16908 : SWIG_PYTHON_THREAD_END_ALLOW;
16909 : }
16910 : if ( bLocalUseExceptions ) {
16911 : popErrorHandler();
16912 : }
16913 : #ifndef SED_HACKS
16914 : if ( bLocalUseExceptions ) {
16915 : CPLErr eclass = CPLGetLastErrorType();
16916 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16917 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16918 : }
16919 : }
16920 : #endif
16921 : }
16922 : resultobj = SWIG_Py_Void();
16923 : {
16924 : /* %typemap(argout) (int *nLen, const double **pList ) */
16925 : Py_DECREF(resultobj);
16926 : PyObject *out = PyList_New( *arg3 );
16927 : if( !out ) {
16928 : SWIG_fail;
16929 : }
16930 : for( int i=0; i<*arg3; i++ ) {
16931 : PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
16932 : PyList_SetItem( out, i, val );
16933 : }
16934 : resultobj = out;
16935 : }
16936 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16937 : return resultobj;
16938 : fail:
16939 : return NULL;
16940 : }
16941 :
16942 :
16943 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16944 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16945 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16946 : char *arg2 = (char *) 0 ;
16947 : int *arg3 = (int *) 0 ;
16948 : double **arg4 = (double **) 0 ;
16949 : void *argp1 = 0 ;
16950 : int res1 = 0 ;
16951 : int bToFree2 = 0 ;
16952 : int nLen3 = 0 ;
16953 : double *pList3 = NULL ;
16954 :
16955 : {
16956 : /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
16957 : arg3 = &nLen3;
16958 : arg4 = &pList3;
16959 : }
16960 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16961 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16962 : if (!SWIG_IsOK(res1)) {
16963 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16964 : }
16965 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16966 : {
16967 : /* %typemap(in) (const char *utf8_path) */
16968 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16969 : {
16970 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16971 : }
16972 : else
16973 : {
16974 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16975 :
16976 : }
16977 : if (arg2 == NULL)
16978 : {
16979 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16980 : SWIG_fail;
16981 : }
16982 : }
16983 : {
16984 : const int bLocalUseExceptions = GetUseExceptions();
16985 : if ( bLocalUseExceptions ) {
16986 : pushErrorHandler();
16987 : }
16988 : {
16989 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16990 : OGRFeatureShadow_GetFieldAsDoubleList__SWIG_1(arg1,(char const *)arg2,arg3,(double const **)arg4);
16991 : SWIG_PYTHON_THREAD_END_ALLOW;
16992 : }
16993 : if ( bLocalUseExceptions ) {
16994 : popErrorHandler();
16995 : }
16996 : #ifndef SED_HACKS
16997 : if ( bLocalUseExceptions ) {
16998 : CPLErr eclass = CPLGetLastErrorType();
16999 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17000 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17001 : }
17002 : }
17003 : #endif
17004 : }
17005 : resultobj = SWIG_Py_Void();
17006 : {
17007 : /* %typemap(argout) (int *nLen, const double **pList ) */
17008 : Py_DECREF(resultobj);
17009 : PyObject *out = PyList_New( *arg3 );
17010 : if( !out ) {
17011 : SWIG_fail;
17012 : }
17013 : for( int i=0; i<*arg3; i++ ) {
17014 : PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
17015 : PyList_SetItem( out, i, val );
17016 : }
17017 : resultobj = out;
17018 : }
17019 : {
17020 : /* %typemap(freearg) (const char *utf8_path) */
17021 : GDALPythonFreeCStr(arg2, bToFree2);
17022 : }
17023 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17024 : return resultobj;
17025 : fail:
17026 : {
17027 : /* %typemap(freearg) (const char *utf8_path) */
17028 : GDALPythonFreeCStr(arg2, bToFree2);
17029 : }
17030 : return NULL;
17031 : }
17032 :
17033 :
17034 660 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList(PyObject *self, PyObject *args) {
17035 660 : Py_ssize_t argc;
17036 660 : PyObject *argv[3] = {
17037 : 0
17038 : };
17039 :
17040 660 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDoubleList", 0, 2, argv))) SWIG_fail;
17041 660 : --argc;
17042 660 : if (argc == 2) {
17043 660 : int _v;
17044 660 : void *vptr = 0;
17045 660 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17046 660 : _v = SWIG_CheckState(res);
17047 660 : if (_v) {
17048 660 : {
17049 660 : int res = SWIG_AsVal_int(argv[1], NULL);
17050 660 : _v = SWIG_CheckState(res);
17051 : }
17052 660 : if (_v) {
17053 660 : return _wrap_Feature_GetFieldAsDoubleList__SWIG_0(self, argc, argv);
17054 : }
17055 : }
17056 : }
17057 0 : if (argc == 2) {
17058 0 : int _v;
17059 0 : void *vptr = 0;
17060 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17061 0 : _v = SWIG_CheckState(res);
17062 0 : if (_v) {
17063 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17064 0 : _v = SWIG_CheckState(res);
17065 0 : if (_v) {
17066 0 : return _wrap_Feature_GetFieldAsDoubleList__SWIG_1(self, argc, argv);
17067 : }
17068 : }
17069 : }
17070 :
17071 0 : fail:
17072 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDoubleList'.\n"
17073 : " Possible C/C++ prototypes are:\n"
17074 : " OGRFeatureShadow::GetFieldAsDoubleList(int,int *,double const **)\n"
17075 : " OGRFeatureShadow::GetFieldAsDoubleList(char const *,int *,double const **)\n");
17076 : return 0;
17077 : }
17078 :
17079 :
17080 343 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17081 343 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17082 343 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17083 343 : int arg2 ;
17084 343 : void *argp1 = 0 ;
17085 343 : int res1 = 0 ;
17086 343 : int val2 ;
17087 343 : int ecode2 = 0 ;
17088 343 : PyObject *swig_obj[2] ;
17089 343 : char **result = 0 ;
17090 :
17091 343 : if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsStringList", 2, 2, swig_obj)) SWIG_fail;
17092 343 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17093 343 : if (!SWIG_IsOK(res1)) {
17094 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17095 : }
17096 343 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17097 343 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17098 343 : if (!SWIG_IsOK(ecode2)) {
17099 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsStringList" "', argument " "2"" of type '" "int""'");
17100 : }
17101 343 : arg2 = static_cast< int >(val2);
17102 343 : {
17103 343 : const int bLocalUseExceptions = GetUseExceptions();
17104 343 : if ( bLocalUseExceptions ) {
17105 282 : pushErrorHandler();
17106 : }
17107 343 : {
17108 343 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17109 343 : result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
17110 343 : SWIG_PYTHON_THREAD_END_ALLOW;
17111 : }
17112 343 : if ( bLocalUseExceptions ) {
17113 282 : popErrorHandler();
17114 : }
17115 : #ifndef SED_HACKS
17116 : if ( bLocalUseExceptions ) {
17117 : CPLErr eclass = CPLGetLastErrorType();
17118 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17119 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17120 : }
17121 : }
17122 : #endif
17123 : }
17124 343 : {
17125 : /* %typemap(out) char **options -> ( string ) */
17126 343 : bool bErr = false;
17127 343 : resultobj = CSLToList(result, &bErr);
17128 343 : if( bErr ) {
17129 0 : SWIG_fail;
17130 : }
17131 : }
17132 343 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17133 : return resultobj;
17134 : fail:
17135 : return NULL;
17136 : }
17137 :
17138 :
17139 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17140 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17141 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17142 : int arg2 ;
17143 : int *arg3 = (int *) 0 ;
17144 : char **arg4 = (char **) 0 ;
17145 : void *argp1 = 0 ;
17146 : int res1 = 0 ;
17147 : int val2 ;
17148 : int ecode2 = 0 ;
17149 : int nLen3 = 0 ;
17150 : char *pBuf3 = 0 ;
17151 : OGRErr result;
17152 :
17153 : {
17154 : /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
17155 : arg3 = &nLen3;
17156 : arg4 = &pBuf3;
17157 : }
17158 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17159 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17160 : if (!SWIG_IsOK(res1)) {
17161 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17162 : }
17163 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17164 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17165 : if (!SWIG_IsOK(ecode2)) {
17166 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsBinary" "', argument " "2"" of type '" "int""'");
17167 : }
17168 : arg2 = static_cast< int >(val2);
17169 : {
17170 : const int bLocalUseExceptions = GetUseExceptions();
17171 : if ( bLocalUseExceptions ) {
17172 : pushErrorHandler();
17173 : }
17174 : {
17175 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17176 : result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_0(arg1,arg2,arg3,arg4);
17177 : SWIG_PYTHON_THREAD_END_ALLOW;
17178 : }
17179 : if ( bLocalUseExceptions ) {
17180 : popErrorHandler();
17181 : }
17182 : #ifndef SED_HACKS
17183 : if ( bLocalUseExceptions ) {
17184 : CPLErr eclass = CPLGetLastErrorType();
17185 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17186 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17187 : }
17188 : }
17189 : #endif
17190 : }
17191 : {
17192 : /* %typemap(out) OGRErr */
17193 : if ( result != 0 && GetUseExceptions()) {
17194 : const char* pszMessage = CPLGetLastErrorMsg();
17195 : if( pszMessage[0] != '\0' )
17196 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
17197 : else
17198 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
17199 : SWIG_fail;
17200 : }
17201 : }
17202 : {
17203 : /* %typemap(argout) (int *nLen, char **pBuf ) */
17204 : Py_XDECREF(resultobj);
17205 : resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
17206 : }
17207 : {
17208 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
17209 : VSIFree( *arg4 );
17210 : }
17211 : {
17212 : /* %typemap(ret) OGRErr */
17213 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
17214 : resultobj = PyInt_FromLong( result );
17215 : }
17216 : }
17217 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17218 : return resultobj;
17219 : fail:
17220 : {
17221 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
17222 : VSIFree( *arg4 );
17223 : }
17224 : return NULL;
17225 : }
17226 :
17227 :
17228 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17229 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17230 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17231 : char *arg2 = (char *) 0 ;
17232 : int *arg3 = (int *) 0 ;
17233 : char **arg4 = (char **) 0 ;
17234 : void *argp1 = 0 ;
17235 : int res1 = 0 ;
17236 : int bToFree2 = 0 ;
17237 : int nLen3 = 0 ;
17238 : char *pBuf3 = 0 ;
17239 : OGRErr result;
17240 :
17241 : {
17242 : /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
17243 : arg3 = &nLen3;
17244 : arg4 = &pBuf3;
17245 : }
17246 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17247 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17248 : if (!SWIG_IsOK(res1)) {
17249 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17250 : }
17251 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17252 : {
17253 : /* %typemap(in) (const char *utf8_path) */
17254 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17255 : {
17256 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17257 : }
17258 : else
17259 : {
17260 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17261 :
17262 : }
17263 : if (arg2 == NULL)
17264 : {
17265 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17266 : SWIG_fail;
17267 : }
17268 : }
17269 : {
17270 : const int bLocalUseExceptions = GetUseExceptions();
17271 : if ( bLocalUseExceptions ) {
17272 : pushErrorHandler();
17273 : }
17274 : {
17275 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17276 : result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
17277 : SWIG_PYTHON_THREAD_END_ALLOW;
17278 : }
17279 : if ( bLocalUseExceptions ) {
17280 : popErrorHandler();
17281 : }
17282 : #ifndef SED_HACKS
17283 : if ( bLocalUseExceptions ) {
17284 : CPLErr eclass = CPLGetLastErrorType();
17285 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17286 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17287 : }
17288 : }
17289 : #endif
17290 : }
17291 : {
17292 : /* %typemap(out) OGRErr */
17293 : if ( result != 0 && GetUseExceptions()) {
17294 : const char* pszMessage = CPLGetLastErrorMsg();
17295 : if( pszMessage[0] != '\0' )
17296 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
17297 : else
17298 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
17299 : SWIG_fail;
17300 : }
17301 : }
17302 : {
17303 : /* %typemap(argout) (int *nLen, char **pBuf ) */
17304 : Py_XDECREF(resultobj);
17305 : resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
17306 : }
17307 : {
17308 : /* %typemap(freearg) (const char *utf8_path) */
17309 : GDALPythonFreeCStr(arg2, bToFree2);
17310 : }
17311 : {
17312 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
17313 : VSIFree( *arg4 );
17314 : }
17315 : {
17316 : /* %typemap(ret) OGRErr */
17317 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
17318 : resultobj = PyInt_FromLong( result );
17319 : }
17320 : }
17321 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17322 : return resultobj;
17323 : fail:
17324 : {
17325 : /* %typemap(freearg) (const char *utf8_path) */
17326 : GDALPythonFreeCStr(arg2, bToFree2);
17327 : }
17328 : {
17329 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
17330 : VSIFree( *arg4 );
17331 : }
17332 : return NULL;
17333 : }
17334 :
17335 :
17336 107 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary(PyObject *self, PyObject *args) {
17337 107 : Py_ssize_t argc;
17338 107 : PyObject *argv[3] = {
17339 : 0
17340 : };
17341 :
17342 107 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsBinary", 0, 2, argv))) SWIG_fail;
17343 107 : --argc;
17344 107 : if (argc == 2) {
17345 107 : int _v;
17346 107 : void *vptr = 0;
17347 107 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17348 175 : _v = SWIG_CheckState(res);
17349 107 : if (_v) {
17350 107 : {
17351 107 : int res = SWIG_AsVal_int(argv[1], NULL);
17352 107 : _v = SWIG_CheckState(res);
17353 : }
17354 39 : if (_v) {
17355 39 : return _wrap_Feature_GetFieldAsBinary__SWIG_0(self, argc, argv);
17356 : }
17357 : }
17358 : }
17359 68 : if (argc == 2) {
17360 68 : int _v;
17361 68 : void *vptr = 0;
17362 68 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17363 68 : _v = SWIG_CheckState(res);
17364 68 : if (_v) {
17365 68 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17366 68 : _v = SWIG_CheckState(res);
17367 68 : if (_v) {
17368 68 : return _wrap_Feature_GetFieldAsBinary__SWIG_1(self, argc, argv);
17369 : }
17370 : }
17371 : }
17372 :
17373 0 : fail:
17374 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsBinary'.\n"
17375 : " Possible C/C++ prototypes are:\n"
17376 : " OGRFeatureShadow::GetFieldAsBinary(int,int *,char **)\n"
17377 : " OGRFeatureShadow::GetFieldAsBinary(char const *,int *,char **)\n");
17378 : return 0;
17379 : }
17380 :
17381 :
17382 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17383 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17384 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17385 : int arg2 ;
17386 : void *argp1 = 0 ;
17387 : int res1 = 0 ;
17388 : int val2 ;
17389 : int ecode2 = 0 ;
17390 : bool result;
17391 :
17392 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17393 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17394 : if (!SWIG_IsOK(res1)) {
17395 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17396 : }
17397 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17398 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17399 : if (!SWIG_IsOK(ecode2)) {
17400 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "int""'");
17401 : }
17402 : arg2 = static_cast< int >(val2);
17403 : {
17404 : const int bLocalUseExceptions = GetUseExceptions();
17405 : if ( bLocalUseExceptions ) {
17406 : pushErrorHandler();
17407 : }
17408 : {
17409 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17410 : result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
17411 : SWIG_PYTHON_THREAD_END_ALLOW;
17412 : }
17413 : if ( bLocalUseExceptions ) {
17414 : popErrorHandler();
17415 : }
17416 : #ifndef SED_HACKS
17417 : if ( bLocalUseExceptions ) {
17418 : CPLErr eclass = CPLGetLastErrorType();
17419 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17420 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17421 : }
17422 : }
17423 : #endif
17424 : }
17425 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17426 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17427 : return resultobj;
17428 : fail:
17429 : return NULL;
17430 : }
17431 :
17432 :
17433 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17434 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17435 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17436 : char *arg2 = (char *) 0 ;
17437 : void *argp1 = 0 ;
17438 : int res1 = 0 ;
17439 : int bToFree2 = 0 ;
17440 : bool result;
17441 :
17442 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17443 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17444 : if (!SWIG_IsOK(res1)) {
17445 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17446 : }
17447 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17448 : {
17449 : /* %typemap(in) (const char *utf8_path) */
17450 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17451 : {
17452 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17453 : }
17454 : else
17455 : {
17456 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17457 :
17458 : }
17459 : if (arg2 == NULL)
17460 : {
17461 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17462 : SWIG_fail;
17463 : }
17464 : }
17465 : {
17466 : const int bLocalUseExceptions = GetUseExceptions();
17467 : if ( bLocalUseExceptions ) {
17468 : pushErrorHandler();
17469 : }
17470 : {
17471 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17472 : result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
17473 : SWIG_PYTHON_THREAD_END_ALLOW;
17474 : }
17475 : if ( bLocalUseExceptions ) {
17476 : popErrorHandler();
17477 : }
17478 : #ifndef SED_HACKS
17479 : if ( bLocalUseExceptions ) {
17480 : CPLErr eclass = CPLGetLastErrorType();
17481 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17482 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17483 : }
17484 : }
17485 : #endif
17486 : }
17487 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17488 : {
17489 : /* %typemap(freearg) (const char *utf8_path) */
17490 : GDALPythonFreeCStr(arg2, bToFree2);
17491 : }
17492 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17493 : return resultobj;
17494 : fail:
17495 : {
17496 : /* %typemap(freearg) (const char *utf8_path) */
17497 : GDALPythonFreeCStr(arg2, bToFree2);
17498 : }
17499 : return NULL;
17500 : }
17501 :
17502 :
17503 102010 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet(PyObject *self, PyObject *args) {
17504 102010 : Py_ssize_t argc;
17505 102010 : PyObject *argv[3] = {
17506 : 0
17507 : };
17508 :
17509 102010 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldSet", 0, 2, argv))) SWIG_fail;
17510 102010 : --argc;
17511 102010 : if (argc == 2) {
17512 102010 : int _v;
17513 102010 : void *vptr = 0;
17514 102010 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17515 102222 : _v = SWIG_CheckState(res);
17516 102010 : if (_v) {
17517 102010 : {
17518 102010 : int res = SWIG_AsVal_int(argv[1], NULL);
17519 102010 : _v = SWIG_CheckState(res);
17520 : }
17521 101798 : if (_v) {
17522 101798 : return _wrap_Feature_IsFieldSet__SWIG_0(self, argc, argv);
17523 : }
17524 : }
17525 : }
17526 212 : if (argc == 2) {
17527 212 : int _v;
17528 212 : void *vptr = 0;
17529 212 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17530 212 : _v = SWIG_CheckState(res);
17531 212 : if (_v) {
17532 212 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17533 212 : _v = SWIG_CheckState(res);
17534 212 : if (_v) {
17535 212 : return _wrap_Feature_IsFieldSet__SWIG_1(self, argc, argv);
17536 : }
17537 : }
17538 : }
17539 :
17540 0 : fail:
17541 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_IsFieldSet'.\n"
17542 : " Possible C/C++ prototypes are:\n"
17543 : " OGRFeatureShadow::IsFieldSet(int)\n"
17544 : " OGRFeatureShadow::IsFieldSet(char const *)\n");
17545 : return 0;
17546 : }
17547 :
17548 :
17549 : SWIGINTERN PyObject *_wrap_Feature_IsFieldNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17550 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17551 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17552 : int arg2 ;
17553 : void *argp1 = 0 ;
17554 : int res1 = 0 ;
17555 : int val2 ;
17556 : int ecode2 = 0 ;
17557 : bool result;
17558 :
17559 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17560 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17561 : if (!SWIG_IsOK(res1)) {
17562 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17563 : }
17564 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17565 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17566 : if (!SWIG_IsOK(ecode2)) {
17567 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldNull" "', argument " "2"" of type '" "int""'");
17568 : }
17569 : arg2 = static_cast< int >(val2);
17570 : {
17571 : const int bLocalUseExceptions = GetUseExceptions();
17572 : if ( bLocalUseExceptions ) {
17573 : pushErrorHandler();
17574 : }
17575 : {
17576 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17577 : result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_0(arg1,arg2);
17578 : SWIG_PYTHON_THREAD_END_ALLOW;
17579 : }
17580 : if ( bLocalUseExceptions ) {
17581 : popErrorHandler();
17582 : }
17583 : #ifndef SED_HACKS
17584 : if ( bLocalUseExceptions ) {
17585 : CPLErr eclass = CPLGetLastErrorType();
17586 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17587 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17588 : }
17589 : }
17590 : #endif
17591 : }
17592 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17593 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17594 : return resultobj;
17595 : fail:
17596 : return NULL;
17597 : }
17598 :
17599 :
17600 : SWIGINTERN PyObject *_wrap_Feature_IsFieldNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17601 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17602 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17603 : char *arg2 = (char *) 0 ;
17604 : void *argp1 = 0 ;
17605 : int res1 = 0 ;
17606 : int bToFree2 = 0 ;
17607 : bool result;
17608 :
17609 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17610 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17611 : if (!SWIG_IsOK(res1)) {
17612 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17613 : }
17614 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17615 : {
17616 : /* %typemap(in) (const char *utf8_path) */
17617 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17618 : {
17619 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17620 : }
17621 : else
17622 : {
17623 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17624 :
17625 : }
17626 : if (arg2 == NULL)
17627 : {
17628 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17629 : SWIG_fail;
17630 : }
17631 : }
17632 : {
17633 : const int bLocalUseExceptions = GetUseExceptions();
17634 : if ( bLocalUseExceptions ) {
17635 : pushErrorHandler();
17636 : }
17637 : {
17638 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17639 : result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_1(arg1,(char const *)arg2);
17640 : SWIG_PYTHON_THREAD_END_ALLOW;
17641 : }
17642 : if ( bLocalUseExceptions ) {
17643 : popErrorHandler();
17644 : }
17645 : #ifndef SED_HACKS
17646 : if ( bLocalUseExceptions ) {
17647 : CPLErr eclass = CPLGetLastErrorType();
17648 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17649 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17650 : }
17651 : }
17652 : #endif
17653 : }
17654 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17655 : {
17656 : /* %typemap(freearg) (const char *utf8_path) */
17657 : GDALPythonFreeCStr(arg2, bToFree2);
17658 : }
17659 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17660 : return resultobj;
17661 : fail:
17662 : {
17663 : /* %typemap(freearg) (const char *utf8_path) */
17664 : GDALPythonFreeCStr(arg2, bToFree2);
17665 : }
17666 : return NULL;
17667 : }
17668 :
17669 :
17670 101200 : SWIGINTERN PyObject *_wrap_Feature_IsFieldNull(PyObject *self, PyObject *args) {
17671 101200 : Py_ssize_t argc;
17672 101200 : PyObject *argv[3] = {
17673 : 0
17674 : };
17675 :
17676 101200 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldNull", 0, 2, argv))) SWIG_fail;
17677 101200 : --argc;
17678 101200 : if (argc == 2) {
17679 101200 : int _v;
17680 101200 : void *vptr = 0;
17681 101200 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17682 101256 : _v = SWIG_CheckState(res);
17683 101200 : if (_v) {
17684 101200 : {
17685 101200 : int res = SWIG_AsVal_int(argv[1], NULL);
17686 101200 : _v = SWIG_CheckState(res);
17687 : }
17688 101144 : if (_v) {
17689 101144 : return _wrap_Feature_IsFieldNull__SWIG_0(self, argc, argv);
17690 : }
17691 : }
17692 : }
17693 56 : if (argc == 2) {
17694 56 : int _v;
17695 56 : void *vptr = 0;
17696 56 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17697 56 : _v = SWIG_CheckState(res);
17698 56 : if (_v) {
17699 56 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17700 56 : _v = SWIG_CheckState(res);
17701 56 : if (_v) {
17702 56 : return _wrap_Feature_IsFieldNull__SWIG_1(self, argc, argv);
17703 : }
17704 : }
17705 : }
17706 :
17707 0 : fail:
17708 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_IsFieldNull'.\n"
17709 : " Possible C/C++ prototypes are:\n"
17710 : " OGRFeatureShadow::IsFieldNull(int)\n"
17711 : " OGRFeatureShadow::IsFieldNull(char const *)\n");
17712 : return 0;
17713 : }
17714 :
17715 :
17716 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17717 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17718 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17719 : int arg2 ;
17720 : void *argp1 = 0 ;
17721 : int res1 = 0 ;
17722 : int val2 ;
17723 : int ecode2 = 0 ;
17724 : bool result;
17725 :
17726 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17727 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17728 : if (!SWIG_IsOK(res1)) {
17729 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17730 : }
17731 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17732 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17733 : if (!SWIG_IsOK(ecode2)) {
17734 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "2"" of type '" "int""'");
17735 : }
17736 : arg2 = static_cast< int >(val2);
17737 : {
17738 : const int bLocalUseExceptions = GetUseExceptions();
17739 : if ( bLocalUseExceptions ) {
17740 : pushErrorHandler();
17741 : }
17742 : {
17743 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17744 : result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(arg1,arg2);
17745 : SWIG_PYTHON_THREAD_END_ALLOW;
17746 : }
17747 : if ( bLocalUseExceptions ) {
17748 : popErrorHandler();
17749 : }
17750 : #ifndef SED_HACKS
17751 : if ( bLocalUseExceptions ) {
17752 : CPLErr eclass = CPLGetLastErrorType();
17753 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17754 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17755 : }
17756 : }
17757 : #endif
17758 : }
17759 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17760 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17761 : return resultobj;
17762 : fail:
17763 : return NULL;
17764 : }
17765 :
17766 :
17767 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17768 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17769 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17770 : char *arg2 = (char *) 0 ;
17771 : void *argp1 = 0 ;
17772 : int res1 = 0 ;
17773 : int bToFree2 = 0 ;
17774 : bool result;
17775 :
17776 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17777 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17778 : if (!SWIG_IsOK(res1)) {
17779 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17780 : }
17781 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17782 : {
17783 : /* %typemap(in) (const char *utf8_path) */
17784 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17785 : {
17786 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17787 : }
17788 : else
17789 : {
17790 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17791 :
17792 : }
17793 : if (arg2 == NULL)
17794 : {
17795 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17796 : SWIG_fail;
17797 : }
17798 : }
17799 : {
17800 : const int bLocalUseExceptions = GetUseExceptions();
17801 : if ( bLocalUseExceptions ) {
17802 : pushErrorHandler();
17803 : }
17804 : {
17805 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17806 : result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_1(arg1,(char const *)arg2);
17807 : SWIG_PYTHON_THREAD_END_ALLOW;
17808 : }
17809 : if ( bLocalUseExceptions ) {
17810 : popErrorHandler();
17811 : }
17812 : #ifndef SED_HACKS
17813 : if ( bLocalUseExceptions ) {
17814 : CPLErr eclass = CPLGetLastErrorType();
17815 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17816 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17817 : }
17818 : }
17819 : #endif
17820 : }
17821 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17822 : {
17823 : /* %typemap(freearg) (const char *utf8_path) */
17824 : GDALPythonFreeCStr(arg2, bToFree2);
17825 : }
17826 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17827 : return resultobj;
17828 : fail:
17829 : {
17830 : /* %typemap(freearg) (const char *utf8_path) */
17831 : GDALPythonFreeCStr(arg2, bToFree2);
17832 : }
17833 : return NULL;
17834 : }
17835 :
17836 :
17837 828 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull(PyObject *self, PyObject *args) {
17838 828 : Py_ssize_t argc;
17839 828 : PyObject *argv[3] = {
17840 : 0
17841 : };
17842 :
17843 828 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldSetAndNotNull", 0, 2, argv))) SWIG_fail;
17844 828 : --argc;
17845 828 : if (argc == 2) {
17846 828 : int _v;
17847 828 : void *vptr = 0;
17848 828 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17849 881 : _v = SWIG_CheckState(res);
17850 828 : if (_v) {
17851 828 : {
17852 828 : int res = SWIG_AsVal_int(argv[1], NULL);
17853 828 : _v = SWIG_CheckState(res);
17854 : }
17855 775 : if (_v) {
17856 775 : return _wrap_Feature_IsFieldSetAndNotNull__SWIG_0(self, argc, argv);
17857 : }
17858 : }
17859 : }
17860 53 : if (argc == 2) {
17861 53 : int _v;
17862 53 : void *vptr = 0;
17863 53 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17864 53 : _v = SWIG_CheckState(res);
17865 53 : if (_v) {
17866 53 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17867 53 : _v = SWIG_CheckState(res);
17868 53 : if (_v) {
17869 53 : return _wrap_Feature_IsFieldSetAndNotNull__SWIG_1(self, argc, argv);
17870 : }
17871 : }
17872 : }
17873 :
17874 0 : fail:
17875 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_IsFieldSetAndNotNull'.\n"
17876 : " Possible C/C++ prototypes are:\n"
17877 : " OGRFeatureShadow::IsFieldSetAndNotNull(int)\n"
17878 : " OGRFeatureShadow::IsFieldSetAndNotNull(char const *)\n");
17879 : return 0;
17880 : }
17881 :
17882 :
17883 302 : SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17884 302 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17885 302 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17886 302 : char *arg2 = (char *) 0 ;
17887 302 : void *argp1 = 0 ;
17888 302 : int res1 = 0 ;
17889 302 : int bToFree2 = 0 ;
17890 302 : PyObject *swig_obj[2] ;
17891 302 : int result;
17892 :
17893 302 : if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldIndex", 2, 2, swig_obj)) SWIG_fail;
17894 302 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17895 302 : if (!SWIG_IsOK(res1)) {
17896 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17897 : }
17898 302 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17899 302 : {
17900 : /* %typemap(in) (const char *utf8_path) */
17901 302 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17902 : {
17903 302 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17904 : }
17905 : else
17906 : {
17907 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17908 :
17909 : }
17910 302 : if (arg2 == NULL)
17911 : {
17912 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17913 0 : SWIG_fail;
17914 : }
17915 : }
17916 302 : {
17917 302 : const int bLocalUseExceptions = GetUseExceptions();
17918 302 : if ( bLocalUseExceptions ) {
17919 72 : pushErrorHandler();
17920 : }
17921 302 : {
17922 302 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17923 302 : result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
17924 302 : SWIG_PYTHON_THREAD_END_ALLOW;
17925 : }
17926 302 : if ( bLocalUseExceptions ) {
17927 72 : popErrorHandler();
17928 : }
17929 : #ifndef SED_HACKS
17930 : if ( bLocalUseExceptions ) {
17931 : CPLErr eclass = CPLGetLastErrorType();
17932 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17933 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17934 : }
17935 : }
17936 : #endif
17937 : }
17938 302 : resultobj = SWIG_From_int(static_cast< int >(result));
17939 302 : {
17940 : /* %typemap(freearg) (const char *utf8_path) */
17941 302 : GDALPythonFreeCStr(arg2, bToFree2);
17942 : }
17943 302 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17944 : return resultobj;
17945 0 : fail:
17946 0 : {
17947 : /* %typemap(freearg) (const char *utf8_path) */
17948 302 : GDALPythonFreeCStr(arg2, bToFree2);
17949 : }
17950 : return NULL;
17951 : }
17952 :
17953 :
17954 73 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17955 73 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17956 73 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17957 73 : char *arg2 = (char *) 0 ;
17958 73 : void *argp1 = 0 ;
17959 73 : int res1 = 0 ;
17960 73 : int bToFree2 = 0 ;
17961 73 : PyObject *swig_obj[2] ;
17962 73 : int result;
17963 :
17964 73 : if (!SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldIndex", 2, 2, swig_obj)) SWIG_fail;
17965 73 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17966 73 : if (!SWIG_IsOK(res1)) {
17967 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17968 : }
17969 73 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17970 73 : {
17971 : /* %typemap(in) (const char *utf8_path) */
17972 73 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17973 : {
17974 73 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17975 : }
17976 : else
17977 : {
17978 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17979 :
17980 : }
17981 73 : if (arg2 == NULL)
17982 : {
17983 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17984 0 : SWIG_fail;
17985 : }
17986 : }
17987 73 : {
17988 73 : const int bLocalUseExceptions = GetUseExceptions();
17989 73 : if ( bLocalUseExceptions ) {
17990 0 : pushErrorHandler();
17991 : }
17992 73 : {
17993 73 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17994 73 : result = (int)OGRFeatureShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
17995 73 : SWIG_PYTHON_THREAD_END_ALLOW;
17996 : }
17997 73 : if ( bLocalUseExceptions ) {
17998 0 : popErrorHandler();
17999 : }
18000 : #ifndef SED_HACKS
18001 : if ( bLocalUseExceptions ) {
18002 : CPLErr eclass = CPLGetLastErrorType();
18003 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18004 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18005 : }
18006 : }
18007 : #endif
18008 : }
18009 73 : resultobj = SWIG_From_int(static_cast< int >(result));
18010 73 : {
18011 : /* %typemap(freearg) (const char *utf8_path) */
18012 73 : GDALPythonFreeCStr(arg2, bToFree2);
18013 : }
18014 73 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18015 : return resultobj;
18016 0 : fail:
18017 0 : {
18018 : /* %typemap(freearg) (const char *utf8_path) */
18019 73 : GDALPythonFreeCStr(arg2, bToFree2);
18020 : }
18021 : return NULL;
18022 : }
18023 :
18024 :
18025 5239 : SWIGINTERN PyObject *_wrap_Feature_GetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18026 5239 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18027 5239 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18028 5239 : void *argp1 = 0 ;
18029 5239 : int res1 = 0 ;
18030 5239 : PyObject *swig_obj[1] ;
18031 5239 : GIntBig result;
18032 :
18033 5239 : if (!args) SWIG_fail;
18034 5239 : swig_obj[0] = args;
18035 5239 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18036 5239 : if (!SWIG_IsOK(res1)) {
18037 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18038 : }
18039 5239 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18040 5239 : {
18041 5239 : const int bLocalUseExceptions = GetUseExceptions();
18042 5239 : if ( bLocalUseExceptions ) {
18043 3508 : pushErrorHandler();
18044 : }
18045 5239 : {
18046 5239 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18047 5239 : result = OGRFeatureShadow_GetFID(arg1);
18048 5239 : SWIG_PYTHON_THREAD_END_ALLOW;
18049 : }
18050 5239 : if ( bLocalUseExceptions ) {
18051 3508 : popErrorHandler();
18052 : }
18053 : #ifndef SED_HACKS
18054 : if ( bLocalUseExceptions ) {
18055 : CPLErr eclass = CPLGetLastErrorType();
18056 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18057 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18058 : }
18059 : }
18060 : #endif
18061 : }
18062 5239 : {
18063 5239 : resultobj = PyLong_FromLongLong(result);
18064 : }
18065 5239 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18066 : return resultobj;
18067 : fail:
18068 : return NULL;
18069 : }
18070 :
18071 :
18072 160523 : SWIGINTERN PyObject *_wrap_Feature_SetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18073 160523 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18074 160523 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18075 160523 : GIntBig arg2 ;
18076 160523 : void *argp1 = 0 ;
18077 160523 : int res1 = 0 ;
18078 160523 : PyObject *swig_obj[2] ;
18079 160523 : OGRErr result;
18080 :
18081 160523 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFID", 2, 2, swig_obj)) SWIG_fail;
18082 160523 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18083 160523 : if (!SWIG_IsOK(res1)) {
18084 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18085 : }
18086 160523 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18087 160523 : {
18088 160523 : arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
18089 : }
18090 160523 : {
18091 160523 : const int bLocalUseExceptions = GetUseExceptions();
18092 160523 : if ( bLocalUseExceptions ) {
18093 160074 : pushErrorHandler();
18094 : }
18095 160523 : {
18096 160523 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18097 160523 : result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
18098 160523 : SWIG_PYTHON_THREAD_END_ALLOW;
18099 : }
18100 160523 : if ( bLocalUseExceptions ) {
18101 160074 : popErrorHandler();
18102 : }
18103 : #ifndef SED_HACKS
18104 : if ( bLocalUseExceptions ) {
18105 : CPLErr eclass = CPLGetLastErrorType();
18106 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18107 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18108 : }
18109 : }
18110 : #endif
18111 : }
18112 160523 : {
18113 : /* %typemap(out) OGRErr */
18114 160523 : if ( result != 0 && GetUseExceptions()) {
18115 0 : const char* pszMessage = CPLGetLastErrorMsg();
18116 0 : if( pszMessage[0] != '\0' )
18117 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
18118 : else
18119 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
18120 0 : SWIG_fail;
18121 : }
18122 : }
18123 160523 : {
18124 : /* %typemap(ret) OGRErr */
18125 160523 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
18126 160523 : resultobj = PyInt_FromLong( result );
18127 : }
18128 : }
18129 160523 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18130 : return resultobj;
18131 : fail:
18132 : return NULL;
18133 : }
18134 :
18135 :
18136 1 : SWIGINTERN PyObject *_wrap_Feature_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18137 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18138 1 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18139 1 : void *argp1 = 0 ;
18140 1 : int res1 = 0 ;
18141 1 : PyObject *swig_obj[1] ;
18142 :
18143 1 : if (!args) SWIG_fail;
18144 1 : swig_obj[0] = args;
18145 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18146 1 : if (!SWIG_IsOK(res1)) {
18147 2 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadable" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18148 : }
18149 0 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18150 0 : {
18151 0 : const int bLocalUseExceptions = GetUseExceptions();
18152 0 : if ( bLocalUseExceptions ) {
18153 0 : pushErrorHandler();
18154 : }
18155 0 : {
18156 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18157 0 : OGRFeatureShadow_DumpReadable(arg1);
18158 0 : SWIG_PYTHON_THREAD_END_ALLOW;
18159 : }
18160 0 : if ( bLocalUseExceptions ) {
18161 0 : popErrorHandler();
18162 : }
18163 : #ifndef SED_HACKS
18164 : if ( bLocalUseExceptions ) {
18165 : CPLErr eclass = CPLGetLastErrorType();
18166 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18167 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18168 : }
18169 : }
18170 : #endif
18171 : }
18172 0 : resultobj = SWIG_Py_Void();
18173 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18174 : return resultobj;
18175 : fail:
18176 : return NULL;
18177 : }
18178 :
18179 :
18180 96 : SWIGINTERN PyObject *_wrap_Feature_DumpReadableAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18181 96 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18182 96 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18183 96 : char **arg2 = (char **) NULL ;
18184 96 : void *argp1 = 0 ;
18185 96 : int res1 = 0 ;
18186 96 : PyObject *swig_obj[2] ;
18187 96 : retStringAndCPLFree *result = 0 ;
18188 :
18189 96 : if (!SWIG_Python_UnpackTuple(args, "Feature_DumpReadableAsString", 1, 2, swig_obj)) SWIG_fail;
18190 96 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18191 96 : if (!SWIG_IsOK(res1)) {
18192 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadableAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18193 : }
18194 96 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18195 96 : if (swig_obj[1]) {
18196 3 : {
18197 : /* %typemap(in) char **dict */
18198 3 : arg2 = NULL;
18199 3 : if ( PySequence_Check( swig_obj[1] ) ) {
18200 0 : int bErr = FALSE;
18201 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
18202 0 : if ( bErr )
18203 : {
18204 0 : SWIG_fail;
18205 : }
18206 : }
18207 3 : else if ( PyMapping_Check( swig_obj[1] ) ) {
18208 3 : int bErr = FALSE;
18209 3 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
18210 3 : if ( bErr )
18211 : {
18212 0 : SWIG_fail;
18213 : }
18214 : }
18215 : else {
18216 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
18217 0 : SWIG_fail;
18218 : }
18219 : }
18220 : }
18221 96 : {
18222 96 : const int bLocalUseExceptions = GetUseExceptions();
18223 96 : if ( bLocalUseExceptions ) {
18224 96 : pushErrorHandler();
18225 : }
18226 96 : {
18227 96 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18228 96 : result = (retStringAndCPLFree *)OGRFeatureShadow_DumpReadableAsString(arg1,arg2);
18229 96 : SWIG_PYTHON_THREAD_END_ALLOW;
18230 : }
18231 96 : if ( bLocalUseExceptions ) {
18232 96 : popErrorHandler();
18233 : }
18234 : #ifndef SED_HACKS
18235 : if ( bLocalUseExceptions ) {
18236 : CPLErr eclass = CPLGetLastErrorType();
18237 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18238 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18239 : }
18240 : }
18241 : #endif
18242 : }
18243 96 : {
18244 : /* %typemap(out) (retStringAndCPLFree*) */
18245 96 : Py_XDECREF(resultobj);
18246 96 : if(result)
18247 : {
18248 96 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
18249 96 : CPLFree(result);
18250 : }
18251 : else
18252 : {
18253 0 : resultobj = Py_None;
18254 0 : Py_INCREF(resultobj);
18255 : }
18256 : }
18257 96 : {
18258 : /* %typemap(freearg) char **dict */
18259 96 : CSLDestroy( arg2 );
18260 : }
18261 96 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18262 : return resultobj;
18263 0 : fail:
18264 0 : {
18265 : /* %typemap(freearg) char **dict */
18266 0 : CSLDestroy( arg2 );
18267 : }
18268 : return NULL;
18269 : }
18270 :
18271 :
18272 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18273 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18274 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18275 : int arg2 ;
18276 : void *argp1 = 0 ;
18277 : int res1 = 0 ;
18278 : int val2 ;
18279 : int ecode2 = 0 ;
18280 :
18281 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
18282 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18283 : if (!SWIG_IsOK(res1)) {
18284 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18285 : }
18286 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18287 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18288 : if (!SWIG_IsOK(ecode2)) {
18289 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "int""'");
18290 : }
18291 : arg2 = static_cast< int >(val2);
18292 : {
18293 : const int bLocalUseExceptions = GetUseExceptions();
18294 : if ( bLocalUseExceptions ) {
18295 : pushErrorHandler();
18296 : }
18297 : {
18298 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18299 : OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
18300 : SWIG_PYTHON_THREAD_END_ALLOW;
18301 : }
18302 : if ( bLocalUseExceptions ) {
18303 : popErrorHandler();
18304 : }
18305 : #ifndef SED_HACKS
18306 : if ( bLocalUseExceptions ) {
18307 : CPLErr eclass = CPLGetLastErrorType();
18308 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18309 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18310 : }
18311 : }
18312 : #endif
18313 : }
18314 : resultobj = SWIG_Py_Void();
18315 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18316 : return resultobj;
18317 : fail:
18318 : return NULL;
18319 : }
18320 :
18321 :
18322 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18323 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18324 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18325 : char *arg2 = (char *) 0 ;
18326 : void *argp1 = 0 ;
18327 : int res1 = 0 ;
18328 : int bToFree2 = 0 ;
18329 :
18330 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
18331 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18332 : if (!SWIG_IsOK(res1)) {
18333 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18334 : }
18335 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18336 : {
18337 : /* %typemap(in) (const char *utf8_path) */
18338 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
18339 : {
18340 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
18341 : }
18342 : else
18343 : {
18344 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
18345 :
18346 : }
18347 : if (arg2 == NULL)
18348 : {
18349 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
18350 : SWIG_fail;
18351 : }
18352 : }
18353 : {
18354 : const int bLocalUseExceptions = GetUseExceptions();
18355 : if ( bLocalUseExceptions ) {
18356 : pushErrorHandler();
18357 : }
18358 : {
18359 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18360 : OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
18361 : SWIG_PYTHON_THREAD_END_ALLOW;
18362 : }
18363 : if ( bLocalUseExceptions ) {
18364 : popErrorHandler();
18365 : }
18366 : #ifndef SED_HACKS
18367 : if ( bLocalUseExceptions ) {
18368 : CPLErr eclass = CPLGetLastErrorType();
18369 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18370 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18371 : }
18372 : }
18373 : #endif
18374 : }
18375 : resultobj = SWIG_Py_Void();
18376 : {
18377 : /* %typemap(freearg) (const char *utf8_path) */
18378 : GDALPythonFreeCStr(arg2, bToFree2);
18379 : }
18380 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18381 : return resultobj;
18382 : fail:
18383 : {
18384 : /* %typemap(freearg) (const char *utf8_path) */
18385 : GDALPythonFreeCStr(arg2, bToFree2);
18386 : }
18387 : return NULL;
18388 : }
18389 :
18390 :
18391 5 : SWIGINTERN PyObject *_wrap_Feature_UnsetField(PyObject *self, PyObject *args) {
18392 5 : Py_ssize_t argc;
18393 5 : PyObject *argv[3] = {
18394 : 0
18395 : };
18396 :
18397 5 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_UnsetField", 0, 2, argv))) SWIG_fail;
18398 5 : --argc;
18399 5 : if (argc == 2) {
18400 5 : int _v;
18401 5 : void *vptr = 0;
18402 5 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
18403 9 : _v = SWIG_CheckState(res);
18404 5 : if (_v) {
18405 5 : {
18406 5 : int res = SWIG_AsVal_int(argv[1], NULL);
18407 5 : _v = SWIG_CheckState(res);
18408 : }
18409 1 : if (_v) {
18410 1 : return _wrap_Feature_UnsetField__SWIG_0(self, argc, argv);
18411 : }
18412 : }
18413 : }
18414 4 : if (argc == 2) {
18415 4 : int _v;
18416 4 : void *vptr = 0;
18417 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
18418 4 : _v = SWIG_CheckState(res);
18419 4 : if (_v) {
18420 4 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
18421 4 : _v = SWIG_CheckState(res);
18422 4 : if (_v) {
18423 4 : return _wrap_Feature_UnsetField__SWIG_1(self, argc, argv);
18424 : }
18425 : }
18426 : }
18427 :
18428 0 : fail:
18429 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_UnsetField'.\n"
18430 : " Possible C/C++ prototypes are:\n"
18431 : " OGRFeatureShadow::UnsetField(int)\n"
18432 : " OGRFeatureShadow::UnsetField(char const *)\n");
18433 : return 0;
18434 : }
18435 :
18436 :
18437 : SWIGINTERN PyObject *_wrap_Feature_SetFieldNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18438 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18439 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18440 : int arg2 ;
18441 : void *argp1 = 0 ;
18442 : int res1 = 0 ;
18443 : int val2 ;
18444 : int ecode2 = 0 ;
18445 :
18446 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
18447 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18448 : if (!SWIG_IsOK(res1)) {
18449 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18450 : }
18451 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18452 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18453 : if (!SWIG_IsOK(ecode2)) {
18454 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldNull" "', argument " "2"" of type '" "int""'");
18455 : }
18456 : arg2 = static_cast< int >(val2);
18457 : {
18458 : const int bLocalUseExceptions = GetUseExceptions();
18459 : if ( bLocalUseExceptions ) {
18460 : pushErrorHandler();
18461 : }
18462 : {
18463 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18464 : OGRFeatureShadow_SetFieldNull__SWIG_0(arg1,arg2);
18465 : SWIG_PYTHON_THREAD_END_ALLOW;
18466 : }
18467 : if ( bLocalUseExceptions ) {
18468 : popErrorHandler();
18469 : }
18470 : #ifndef SED_HACKS
18471 : if ( bLocalUseExceptions ) {
18472 : CPLErr eclass = CPLGetLastErrorType();
18473 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18474 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18475 : }
18476 : }
18477 : #endif
18478 : }
18479 : resultobj = SWIG_Py_Void();
18480 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18481 : return resultobj;
18482 : fail:
18483 : return NULL;
18484 : }
18485 :
18486 :
18487 : SWIGINTERN PyObject *_wrap_Feature_SetFieldNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18488 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18489 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18490 : char *arg2 = (char *) 0 ;
18491 : void *argp1 = 0 ;
18492 : int res1 = 0 ;
18493 : int bToFree2 = 0 ;
18494 :
18495 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
18496 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18497 : if (!SWIG_IsOK(res1)) {
18498 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18499 : }
18500 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18501 : {
18502 : /* %typemap(in) (const char *utf8_path) */
18503 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
18504 : {
18505 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
18506 : }
18507 : else
18508 : {
18509 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
18510 :
18511 : }
18512 : if (arg2 == NULL)
18513 : {
18514 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
18515 : SWIG_fail;
18516 : }
18517 : }
18518 : {
18519 : const int bLocalUseExceptions = GetUseExceptions();
18520 : if ( bLocalUseExceptions ) {
18521 : pushErrorHandler();
18522 : }
18523 : {
18524 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18525 : OGRFeatureShadow_SetFieldNull__SWIG_1(arg1,(char const *)arg2);
18526 : SWIG_PYTHON_THREAD_END_ALLOW;
18527 : }
18528 : if ( bLocalUseExceptions ) {
18529 : popErrorHandler();
18530 : }
18531 : #ifndef SED_HACKS
18532 : if ( bLocalUseExceptions ) {
18533 : CPLErr eclass = CPLGetLastErrorType();
18534 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18535 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18536 : }
18537 : }
18538 : #endif
18539 : }
18540 : resultobj = SWIG_Py_Void();
18541 : {
18542 : /* %typemap(freearg) (const char *utf8_path) */
18543 : GDALPythonFreeCStr(arg2, bToFree2);
18544 : }
18545 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18546 : return resultobj;
18547 : fail:
18548 : {
18549 : /* %typemap(freearg) (const char *utf8_path) */
18550 : GDALPythonFreeCStr(arg2, bToFree2);
18551 : }
18552 : return NULL;
18553 : }
18554 :
18555 :
18556 47 : SWIGINTERN PyObject *_wrap_Feature_SetFieldNull(PyObject *self, PyObject *args) {
18557 47 : Py_ssize_t argc;
18558 47 : PyObject *argv[3] = {
18559 : 0
18560 : };
18561 :
18562 47 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetFieldNull", 0, 2, argv))) SWIG_fail;
18563 47 : --argc;
18564 47 : if (argc == 2) {
18565 47 : int _v;
18566 47 : void *vptr = 0;
18567 47 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
18568 66 : _v = SWIG_CheckState(res);
18569 47 : if (_v) {
18570 47 : {
18571 47 : int res = SWIG_AsVal_int(argv[1], NULL);
18572 47 : _v = SWIG_CheckState(res);
18573 : }
18574 28 : if (_v) {
18575 28 : return _wrap_Feature_SetFieldNull__SWIG_0(self, argc, argv);
18576 : }
18577 : }
18578 : }
18579 19 : if (argc == 2) {
18580 19 : int _v;
18581 19 : void *vptr = 0;
18582 19 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
18583 19 : _v = SWIG_CheckState(res);
18584 19 : if (_v) {
18585 19 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
18586 19 : _v = SWIG_CheckState(res);
18587 19 : if (_v) {
18588 19 : return _wrap_Feature_SetFieldNull__SWIG_1(self, argc, argv);
18589 : }
18590 : }
18591 : }
18592 :
18593 0 : fail:
18594 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetFieldNull'.\n"
18595 : " Possible C/C++ prototypes are:\n"
18596 : " OGRFeatureShadow::SetFieldNull(int)\n"
18597 : " OGRFeatureShadow::SetFieldNull(char const *)\n");
18598 : return 0;
18599 : }
18600 :
18601 :
18602 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18603 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18604 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18605 : int arg2 ;
18606 : char *arg3 = (char *) 0 ;
18607 : void *argp1 = 0 ;
18608 : int res1 = 0 ;
18609 : int val2 ;
18610 : int ecode2 = 0 ;
18611 : PyObject *str3 = 0 ;
18612 : int bToFree3 = 0 ;
18613 :
18614 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
18615 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18616 : if (!SWIG_IsOK(res1)) {
18617 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18618 : }
18619 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18620 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18621 : if (!SWIG_IsOK(ecode2)) {
18622 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
18623 : }
18624 : arg2 = static_cast< int >(val2);
18625 : {
18626 : /* %typemap(in) (tostring argin) */
18627 : str3 = PyObject_Str( swig_obj[2] );
18628 : if ( str3 == 0 ) {
18629 : PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
18630 : SWIG_fail;
18631 : }
18632 :
18633 : arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
18634 : }
18635 : {
18636 : const int bLocalUseExceptions = GetUseExceptions();
18637 : if ( bLocalUseExceptions ) {
18638 : pushErrorHandler();
18639 : }
18640 : {
18641 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18642 : OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
18643 : SWIG_PYTHON_THREAD_END_ALLOW;
18644 : }
18645 : if ( bLocalUseExceptions ) {
18646 : popErrorHandler();
18647 : }
18648 : #ifndef SED_HACKS
18649 : if ( bLocalUseExceptions ) {
18650 : CPLErr eclass = CPLGetLastErrorType();
18651 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18652 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18653 : }
18654 : }
18655 : #endif
18656 : }
18657 : resultobj = SWIG_Py_Void();
18658 : {
18659 : /* %typemap(freearg) (tostring argin) */
18660 : if ( str3 != NULL)
18661 : {
18662 : Py_DECREF(str3);
18663 : }
18664 : GDALPythonFreeCStr(arg3, bToFree3);
18665 : }
18666 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18667 : return resultobj;
18668 : fail:
18669 : {
18670 : /* %typemap(freearg) (tostring argin) */
18671 : if ( str3 != NULL)
18672 : {
18673 : Py_DECREF(str3);
18674 : }
18675 : GDALPythonFreeCStr(arg3, bToFree3);
18676 : }
18677 : return NULL;
18678 : }
18679 :
18680 :
18681 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18682 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18683 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18684 : char *arg2 = (char *) 0 ;
18685 : char *arg3 = (char *) 0 ;
18686 : void *argp1 = 0 ;
18687 : int res1 = 0 ;
18688 : int bToFree2 = 0 ;
18689 : PyObject *str3 = 0 ;
18690 : int bToFree3 = 0 ;
18691 :
18692 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
18693 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18694 : if (!SWIG_IsOK(res1)) {
18695 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18696 : }
18697 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18698 : {
18699 : /* %typemap(in) (const char *utf8_path) */
18700 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
18701 : {
18702 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
18703 : }
18704 : else
18705 : {
18706 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
18707 :
18708 : }
18709 : if (arg2 == NULL)
18710 : {
18711 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
18712 : SWIG_fail;
18713 : }
18714 : }
18715 : {
18716 : /* %typemap(in) (tostring argin) */
18717 : str3 = PyObject_Str( swig_obj[2] );
18718 : if ( str3 == 0 ) {
18719 : PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
18720 : SWIG_fail;
18721 : }
18722 :
18723 : arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
18724 : }
18725 : {
18726 : const int bLocalUseExceptions = GetUseExceptions();
18727 : if ( bLocalUseExceptions ) {
18728 : pushErrorHandler();
18729 : }
18730 : {
18731 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18732 : OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
18733 : SWIG_PYTHON_THREAD_END_ALLOW;
18734 : }
18735 : if ( bLocalUseExceptions ) {
18736 : popErrorHandler();
18737 : }
18738 : #ifndef SED_HACKS
18739 : if ( bLocalUseExceptions ) {
18740 : CPLErr eclass = CPLGetLastErrorType();
18741 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18742 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18743 : }
18744 : }
18745 : #endif
18746 : }
18747 : resultobj = SWIG_Py_Void();
18748 : {
18749 : /* %typemap(freearg) (const char *utf8_path) */
18750 : GDALPythonFreeCStr(arg2, bToFree2);
18751 : }
18752 : {
18753 : /* %typemap(freearg) (tostring argin) */
18754 : if ( str3 != NULL)
18755 : {
18756 : Py_DECREF(str3);
18757 : }
18758 : GDALPythonFreeCStr(arg3, bToFree3);
18759 : }
18760 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18761 : return resultobj;
18762 : fail:
18763 : {
18764 : /* %typemap(freearg) (const char *utf8_path) */
18765 : GDALPythonFreeCStr(arg2, bToFree2);
18766 : }
18767 : {
18768 : /* %typemap(freearg) (tostring argin) */
18769 : if ( str3 != NULL)
18770 : {
18771 : Py_DECREF(str3);
18772 : }
18773 : GDALPythonFreeCStr(arg3, bToFree3);
18774 : }
18775 : return NULL;
18776 : }
18777 :
18778 :
18779 84468 : SWIGINTERN PyObject *_wrap_Feature_SetFieldInteger64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18780 84468 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18781 84468 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18782 84468 : int arg2 ;
18783 84468 : GIntBig arg3 ;
18784 84468 : void *argp1 = 0 ;
18785 84468 : int res1 = 0 ;
18786 84468 : int val2 ;
18787 84468 : int ecode2 = 0 ;
18788 84468 : PyObject *swig_obj[3] ;
18789 :
18790 84468 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldInteger64", 3, 3, swig_obj)) SWIG_fail;
18791 84468 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18792 84468 : if (!SWIG_IsOK(res1)) {
18793 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18794 : }
18795 84468 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18796 84468 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18797 84468 : if (!SWIG_IsOK(ecode2)) {
18798 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldInteger64" "', argument " "2"" of type '" "int""'");
18799 : }
18800 84468 : arg2 = static_cast< int >(val2);
18801 84468 : {
18802 84468 : arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
18803 : }
18804 84468 : {
18805 84468 : const int bLocalUseExceptions = GetUseExceptions();
18806 84468 : if ( bLocalUseExceptions ) {
18807 68463 : pushErrorHandler();
18808 : }
18809 84468 : {
18810 84468 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18811 84468 : OGRFeatureShadow_SetFieldInteger64(arg1,arg2,arg3);
18812 84468 : SWIG_PYTHON_THREAD_END_ALLOW;
18813 : }
18814 84468 : if ( bLocalUseExceptions ) {
18815 68463 : popErrorHandler();
18816 : }
18817 : #ifndef SED_HACKS
18818 : if ( bLocalUseExceptions ) {
18819 : CPLErr eclass = CPLGetLastErrorType();
18820 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18821 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18822 : }
18823 : }
18824 : #endif
18825 : }
18826 84468 : resultobj = SWIG_Py_Void();
18827 84468 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18828 : return resultobj;
18829 : fail:
18830 : return NULL;
18831 : }
18832 :
18833 :
18834 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18835 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18836 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18837 : int arg2 ;
18838 : double arg3 ;
18839 : void *argp1 = 0 ;
18840 : int res1 = 0 ;
18841 : int val2 ;
18842 : int ecode2 = 0 ;
18843 : double val3 ;
18844 : int ecode3 = 0 ;
18845 :
18846 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
18847 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18848 : if (!SWIG_IsOK(res1)) {
18849 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18850 : }
18851 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18852 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18853 : if (!SWIG_IsOK(ecode2)) {
18854 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
18855 : }
18856 : arg2 = static_cast< int >(val2);
18857 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
18858 : if (!SWIG_IsOK(ecode3)) {
18859 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
18860 : }
18861 : arg3 = static_cast< double >(val3);
18862 : {
18863 : const int bLocalUseExceptions = GetUseExceptions();
18864 : if ( bLocalUseExceptions ) {
18865 : pushErrorHandler();
18866 : }
18867 : {
18868 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18869 : OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
18870 : SWIG_PYTHON_THREAD_END_ALLOW;
18871 : }
18872 : if ( bLocalUseExceptions ) {
18873 : popErrorHandler();
18874 : }
18875 : #ifndef SED_HACKS
18876 : if ( bLocalUseExceptions ) {
18877 : CPLErr eclass = CPLGetLastErrorType();
18878 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18879 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18880 : }
18881 : }
18882 : #endif
18883 : }
18884 : resultobj = SWIG_Py_Void();
18885 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18886 : return resultobj;
18887 : fail:
18888 : return NULL;
18889 : }
18890 :
18891 :
18892 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18893 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18894 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18895 : char *arg2 = (char *) 0 ;
18896 : double arg3 ;
18897 : void *argp1 = 0 ;
18898 : int res1 = 0 ;
18899 : int bToFree2 = 0 ;
18900 : double val3 ;
18901 : int ecode3 = 0 ;
18902 :
18903 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
18904 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18905 : if (!SWIG_IsOK(res1)) {
18906 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18907 : }
18908 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18909 : {
18910 : /* %typemap(in) (const char *utf8_path) */
18911 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
18912 : {
18913 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
18914 : }
18915 : else
18916 : {
18917 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
18918 :
18919 : }
18920 : if (arg2 == NULL)
18921 : {
18922 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
18923 : SWIG_fail;
18924 : }
18925 : }
18926 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
18927 : if (!SWIG_IsOK(ecode3)) {
18928 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
18929 : }
18930 : arg3 = static_cast< double >(val3);
18931 : {
18932 : const int bLocalUseExceptions = GetUseExceptions();
18933 : if ( bLocalUseExceptions ) {
18934 : pushErrorHandler();
18935 : }
18936 : {
18937 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18938 : OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
18939 : SWIG_PYTHON_THREAD_END_ALLOW;
18940 : }
18941 : if ( bLocalUseExceptions ) {
18942 : popErrorHandler();
18943 : }
18944 : #ifndef SED_HACKS
18945 : if ( bLocalUseExceptions ) {
18946 : CPLErr eclass = CPLGetLastErrorType();
18947 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18948 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18949 : }
18950 : }
18951 : #endif
18952 : }
18953 : resultobj = SWIG_Py_Void();
18954 : {
18955 : /* %typemap(freearg) (const char *utf8_path) */
18956 : GDALPythonFreeCStr(arg2, bToFree2);
18957 : }
18958 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18959 : return resultobj;
18960 : fail:
18961 : {
18962 : /* %typemap(freearg) (const char *utf8_path) */
18963 : GDALPythonFreeCStr(arg2, bToFree2);
18964 : }
18965 : return NULL;
18966 : }
18967 :
18968 :
18969 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_4(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18970 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18971 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18972 : int arg2 ;
18973 : int arg3 ;
18974 : int arg4 ;
18975 : int arg5 ;
18976 : int arg6 ;
18977 : int arg7 ;
18978 : float arg8 ;
18979 : int arg9 ;
18980 : void *argp1 = 0 ;
18981 : int res1 = 0 ;
18982 : int val2 ;
18983 : int ecode2 = 0 ;
18984 : int val3 ;
18985 : int ecode3 = 0 ;
18986 : int val4 ;
18987 : int ecode4 = 0 ;
18988 : int val5 ;
18989 : int ecode5 = 0 ;
18990 : int val6 ;
18991 : int ecode6 = 0 ;
18992 : int val7 ;
18993 : int ecode7 = 0 ;
18994 : float val8 ;
18995 : int ecode8 = 0 ;
18996 : int val9 ;
18997 : int ecode9 = 0 ;
18998 :
18999 : if ((nobjs < 9) || (nobjs > 9)) SWIG_fail;
19000 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19001 : if (!SWIG_IsOK(res1)) {
19002 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19003 : }
19004 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19005 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19006 : if (!SWIG_IsOK(ecode2)) {
19007 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
19008 : }
19009 : arg2 = static_cast< int >(val2);
19010 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
19011 : if (!SWIG_IsOK(ecode3)) {
19012 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
19013 : }
19014 : arg3 = static_cast< int >(val3);
19015 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
19016 : if (!SWIG_IsOK(ecode4)) {
19017 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
19018 : }
19019 : arg4 = static_cast< int >(val4);
19020 : ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
19021 : if (!SWIG_IsOK(ecode5)) {
19022 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
19023 : }
19024 : arg5 = static_cast< int >(val5);
19025 : ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
19026 : if (!SWIG_IsOK(ecode6)) {
19027 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
19028 : }
19029 : arg6 = static_cast< int >(val6);
19030 : ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
19031 : if (!SWIG_IsOK(ecode7)) {
19032 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
19033 : }
19034 : arg7 = static_cast< int >(val7);
19035 : ecode8 = SWIG_AsVal_float(swig_obj[7], &val8);
19036 : if (!SWIG_IsOK(ecode8)) {
19037 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "float""'");
19038 : }
19039 : arg8 = static_cast< float >(val8);
19040 : ecode9 = SWIG_AsVal_int(swig_obj[8], &val9);
19041 : if (!SWIG_IsOK(ecode9)) {
19042 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
19043 : }
19044 : arg9 = static_cast< int >(val9);
19045 : {
19046 : const int bLocalUseExceptions = GetUseExceptions();
19047 : if ( bLocalUseExceptions ) {
19048 : pushErrorHandler();
19049 : }
19050 : {
19051 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19052 : OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
19053 : SWIG_PYTHON_THREAD_END_ALLOW;
19054 : }
19055 : if ( bLocalUseExceptions ) {
19056 : popErrorHandler();
19057 : }
19058 : #ifndef SED_HACKS
19059 : if ( bLocalUseExceptions ) {
19060 : CPLErr eclass = CPLGetLastErrorType();
19061 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19062 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19063 : }
19064 : }
19065 : #endif
19066 : }
19067 : resultobj = SWIG_Py_Void();
19068 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19069 : return resultobj;
19070 : fail:
19071 : return NULL;
19072 : }
19073 :
19074 :
19075 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_5(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
19076 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19077 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19078 : char *arg2 = (char *) 0 ;
19079 : int arg3 ;
19080 : int arg4 ;
19081 : int arg5 ;
19082 : int arg6 ;
19083 : int arg7 ;
19084 : float arg8 ;
19085 : int arg9 ;
19086 : void *argp1 = 0 ;
19087 : int res1 = 0 ;
19088 : int bToFree2 = 0 ;
19089 : int val3 ;
19090 : int ecode3 = 0 ;
19091 : int val4 ;
19092 : int ecode4 = 0 ;
19093 : int val5 ;
19094 : int ecode5 = 0 ;
19095 : int val6 ;
19096 : int ecode6 = 0 ;
19097 : int val7 ;
19098 : int ecode7 = 0 ;
19099 : float val8 ;
19100 : int ecode8 = 0 ;
19101 : int val9 ;
19102 : int ecode9 = 0 ;
19103 :
19104 : if ((nobjs < 9) || (nobjs > 9)) SWIG_fail;
19105 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19106 : if (!SWIG_IsOK(res1)) {
19107 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19108 : }
19109 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19110 : {
19111 : /* %typemap(in) (const char *utf8_path) */
19112 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
19113 : {
19114 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
19115 : }
19116 : else
19117 : {
19118 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
19119 :
19120 : }
19121 : if (arg2 == NULL)
19122 : {
19123 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19124 : SWIG_fail;
19125 : }
19126 : }
19127 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
19128 : if (!SWIG_IsOK(ecode3)) {
19129 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
19130 : }
19131 : arg3 = static_cast< int >(val3);
19132 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
19133 : if (!SWIG_IsOK(ecode4)) {
19134 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
19135 : }
19136 : arg4 = static_cast< int >(val4);
19137 : ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
19138 : if (!SWIG_IsOK(ecode5)) {
19139 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
19140 : }
19141 : arg5 = static_cast< int >(val5);
19142 : ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
19143 : if (!SWIG_IsOK(ecode6)) {
19144 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
19145 : }
19146 : arg6 = static_cast< int >(val6);
19147 : ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
19148 : if (!SWIG_IsOK(ecode7)) {
19149 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
19150 : }
19151 : arg7 = static_cast< int >(val7);
19152 : ecode8 = SWIG_AsVal_float(swig_obj[7], &val8);
19153 : if (!SWIG_IsOK(ecode8)) {
19154 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "float""'");
19155 : }
19156 : arg8 = static_cast< float >(val8);
19157 : ecode9 = SWIG_AsVal_int(swig_obj[8], &val9);
19158 : if (!SWIG_IsOK(ecode9)) {
19159 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
19160 : }
19161 : arg9 = static_cast< int >(val9);
19162 : {
19163 : const int bLocalUseExceptions = GetUseExceptions();
19164 : if ( bLocalUseExceptions ) {
19165 : pushErrorHandler();
19166 : }
19167 : {
19168 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19169 : OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
19170 : SWIG_PYTHON_THREAD_END_ALLOW;
19171 : }
19172 : if ( bLocalUseExceptions ) {
19173 : popErrorHandler();
19174 : }
19175 : #ifndef SED_HACKS
19176 : if ( bLocalUseExceptions ) {
19177 : CPLErr eclass = CPLGetLastErrorType();
19178 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19179 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19180 : }
19181 : }
19182 : #endif
19183 : }
19184 : resultobj = SWIG_Py_Void();
19185 : {
19186 : /* %typemap(freearg) (const char *utf8_path) */
19187 : GDALPythonFreeCStr(arg2, bToFree2);
19188 : }
19189 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19190 : return resultobj;
19191 : fail:
19192 : {
19193 : /* %typemap(freearg) (const char *utf8_path) */
19194 : GDALPythonFreeCStr(arg2, bToFree2);
19195 : }
19196 : return NULL;
19197 : }
19198 :
19199 :
19200 1599 : SWIGINTERN PyObject *_wrap_Feature_SetField(PyObject *self, PyObject *args) {
19201 1599 : Py_ssize_t argc;
19202 1599 : PyObject *argv[10] = {
19203 : 0
19204 : };
19205 :
19206 1599 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetField", 0, 9, argv))) SWIG_fail;
19207 1599 : --argc;
19208 1599 : if (argc == 3) {
19209 1555 : int _v;
19210 1555 : void *vptr = 0;
19211 1555 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19212 2838 : _v = SWIG_CheckState(res);
19213 1555 : if (_v) {
19214 1555 : {
19215 1555 : int res = SWIG_AsVal_int(argv[1], NULL);
19216 1555 : _v = SWIG_CheckState(res);
19217 : }
19218 272 : if (_v) {
19219 272 : {
19220 272 : int res = SWIG_AsVal_double(argv[2], NULL);
19221 272 : _v = SWIG_CheckState(res);
19222 : }
19223 272 : if (_v) {
19224 272 : return _wrap_Feature_SetField__SWIG_2(self, argc, argv);
19225 : }
19226 : }
19227 : }
19228 : }
19229 1327 : if (argc == 3) {
19230 1283 : int _v;
19231 1283 : void *vptr = 0;
19232 1283 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19233 2566 : _v = SWIG_CheckState(res);
19234 1283 : if (_v) {
19235 1283 : {
19236 1283 : int res = SWIG_AsVal_int(argv[1], NULL);
19237 1283 : _v = SWIG_CheckState(res);
19238 : }
19239 0 : if (_v) {
19240 0 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
19241 0 : _v = SWIG_CheckState(res);
19242 0 : if (_v) {
19243 0 : return _wrap_Feature_SetField__SWIG_0(self, argc, argv);
19244 : }
19245 : }
19246 : }
19247 : }
19248 1327 : if (argc == 3) {
19249 1283 : int _v;
19250 1283 : void *vptr = 0;
19251 1283 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19252 1283 : _v = SWIG_CheckState(res);
19253 1283 : if (_v) {
19254 1283 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
19255 1283 : _v = SWIG_CheckState(res);
19256 1283 : if (_v) {
19257 1283 : {
19258 1283 : int res = SWIG_AsVal_double(argv[2], NULL);
19259 1283 : _v = SWIG_CheckState(res);
19260 : }
19261 1283 : if (_v) {
19262 1283 : return _wrap_Feature_SetField__SWIG_3(self, argc, argv);
19263 : }
19264 : }
19265 : }
19266 : }
19267 44 : if (argc == 3) {
19268 0 : int _v;
19269 0 : void *vptr = 0;
19270 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19271 0 : _v = SWIG_CheckState(res);
19272 0 : if (_v) {
19273 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
19274 0 : _v = SWIG_CheckState(res);
19275 0 : if (_v) {
19276 0 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
19277 0 : _v = SWIG_CheckState(res);
19278 0 : if (_v) {
19279 0 : return _wrap_Feature_SetField__SWIG_1(self, argc, argv);
19280 : }
19281 : }
19282 : }
19283 : }
19284 44 : if (argc == 9) {
19285 44 : int _v;
19286 44 : void *vptr = 0;
19287 44 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19288 64 : _v = SWIG_CheckState(res);
19289 44 : if (_v) {
19290 44 : {
19291 44 : int res = SWIG_AsVal_int(argv[1], NULL);
19292 44 : _v = SWIG_CheckState(res);
19293 : }
19294 24 : if (_v) {
19295 24 : {
19296 24 : int res = SWIG_AsVal_int(argv[2], NULL);
19297 24 : _v = SWIG_CheckState(res);
19298 : }
19299 24 : if (_v) {
19300 24 : {
19301 24 : int res = SWIG_AsVal_int(argv[3], NULL);
19302 24 : _v = SWIG_CheckState(res);
19303 : }
19304 24 : if (_v) {
19305 24 : {
19306 24 : int res = SWIG_AsVal_int(argv[4], NULL);
19307 24 : _v = SWIG_CheckState(res);
19308 : }
19309 24 : if (_v) {
19310 24 : {
19311 24 : int res = SWIG_AsVal_int(argv[5], NULL);
19312 24 : _v = SWIG_CheckState(res);
19313 : }
19314 24 : if (_v) {
19315 24 : {
19316 24 : int res = SWIG_AsVal_int(argv[6], NULL);
19317 24 : _v = SWIG_CheckState(res);
19318 : }
19319 24 : if (_v) {
19320 24 : {
19321 24 : int res = SWIG_AsVal_float(argv[7], NULL);
19322 24 : _v = SWIG_CheckState(res);
19323 : }
19324 24 : if (_v) {
19325 24 : {
19326 24 : int res = SWIG_AsVal_int(argv[8], NULL);
19327 24 : _v = SWIG_CheckState(res);
19328 : }
19329 24 : if (_v) {
19330 24 : return _wrap_Feature_SetField__SWIG_4(self, argc, argv);
19331 : }
19332 : }
19333 : }
19334 : }
19335 : }
19336 : }
19337 : }
19338 : }
19339 : }
19340 : }
19341 20 : if (argc == 9) {
19342 20 : int _v;
19343 20 : void *vptr = 0;
19344 20 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19345 20 : _v = SWIG_CheckState(res);
19346 20 : if (_v) {
19347 20 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
19348 20 : _v = SWIG_CheckState(res);
19349 20 : if (_v) {
19350 20 : {
19351 20 : int res = SWIG_AsVal_int(argv[2], NULL);
19352 20 : _v = SWIG_CheckState(res);
19353 : }
19354 20 : if (_v) {
19355 20 : {
19356 20 : int res = SWIG_AsVal_int(argv[3], NULL);
19357 20 : _v = SWIG_CheckState(res);
19358 : }
19359 20 : if (_v) {
19360 20 : {
19361 20 : int res = SWIG_AsVal_int(argv[4], NULL);
19362 20 : _v = SWIG_CheckState(res);
19363 : }
19364 20 : if (_v) {
19365 20 : {
19366 20 : int res = SWIG_AsVal_int(argv[5], NULL);
19367 20 : _v = SWIG_CheckState(res);
19368 : }
19369 20 : if (_v) {
19370 20 : {
19371 20 : int res = SWIG_AsVal_int(argv[6], NULL);
19372 20 : _v = SWIG_CheckState(res);
19373 : }
19374 20 : if (_v) {
19375 20 : {
19376 20 : int res = SWIG_AsVal_float(argv[7], NULL);
19377 20 : _v = SWIG_CheckState(res);
19378 : }
19379 20 : if (_v) {
19380 20 : {
19381 20 : int res = SWIG_AsVal_int(argv[8], NULL);
19382 20 : _v = SWIG_CheckState(res);
19383 : }
19384 20 : if (_v) {
19385 20 : return _wrap_Feature_SetField__SWIG_5(self, argc, argv);
19386 : }
19387 : }
19388 : }
19389 : }
19390 : }
19391 : }
19392 : }
19393 : }
19394 : }
19395 : }
19396 :
19397 0 : fail:
19398 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetField'.\n"
19399 : " Possible C/C++ prototypes are:\n"
19400 : " OGRFeatureShadow::SetField(int,char const *)\n"
19401 : " OGRFeatureShadow::SetField(char const *,char const *)\n"
19402 : " OGRFeatureShadow::SetField(int,double)\n"
19403 : " OGRFeatureShadow::SetField(char const *,double)\n"
19404 : " OGRFeatureShadow::SetField(int,int,int,int,int,int,float,int)\n"
19405 : " OGRFeatureShadow::SetField(char const *,int,int,int,int,int,float,int)\n");
19406 : return 0;
19407 : }
19408 :
19409 :
19410 9 : SWIGINTERN PyObject *_wrap_Feature_SetFieldIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19411 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19412 9 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19413 9 : int arg2 ;
19414 9 : int arg3 ;
19415 9 : int *arg4 = (int *) 0 ;
19416 9 : void *argp1 = 0 ;
19417 9 : int res1 = 0 ;
19418 9 : int val2 ;
19419 9 : int ecode2 = 0 ;
19420 9 : PyObject *swig_obj[3] ;
19421 :
19422 9 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldIntegerList", 3, 3, swig_obj)) SWIG_fail;
19423 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19424 9 : if (!SWIG_IsOK(res1)) {
19425 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19426 : }
19427 9 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19428 9 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19429 9 : if (!SWIG_IsOK(ecode2)) {
19430 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldIntegerList" "', argument " "2"" of type '" "int""'");
19431 : }
19432 9 : arg2 = static_cast< int >(val2);
19433 9 : {
19434 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
19435 9 : arg4 = CreateCIntListFromSequence(swig_obj[2], &arg3);
19436 9 : if( arg3 < 0 ) {
19437 0 : SWIG_fail;
19438 : }
19439 : }
19440 9 : {
19441 9 : const int bLocalUseExceptions = GetUseExceptions();
19442 9 : if ( bLocalUseExceptions ) {
19443 6 : pushErrorHandler();
19444 : }
19445 9 : {
19446 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19447 9 : OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
19448 9 : SWIG_PYTHON_THREAD_END_ALLOW;
19449 : }
19450 9 : if ( bLocalUseExceptions ) {
19451 6 : popErrorHandler();
19452 : }
19453 : #ifndef SED_HACKS
19454 : if ( bLocalUseExceptions ) {
19455 : CPLErr eclass = CPLGetLastErrorType();
19456 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19457 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19458 : }
19459 : }
19460 : #endif
19461 : }
19462 9 : resultobj = SWIG_Py_Void();
19463 9 : {
19464 : /* %typemap(freearg) (int nList, int* pList) */
19465 9 : free(arg4);
19466 : }
19467 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19468 : return resultobj;
19469 0 : fail:
19470 0 : {
19471 : /* %typemap(freearg) (int nList, int* pList) */
19472 0 : free(arg4);
19473 : }
19474 0 : return NULL;
19475 : }
19476 :
19477 :
19478 122 : SWIGINTERN PyObject *_wrap_Feature_SetFieldInteger64List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19479 122 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19480 122 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19481 122 : int arg2 ;
19482 122 : int arg3 ;
19483 122 : GIntBig *arg4 = (GIntBig *) 0 ;
19484 122 : void *argp1 = 0 ;
19485 122 : int res1 = 0 ;
19486 122 : int val2 ;
19487 122 : int ecode2 = 0 ;
19488 122 : PyObject *swig_obj[3] ;
19489 :
19490 122 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldInteger64List", 3, 3, swig_obj)) SWIG_fail;
19491 122 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19492 122 : if (!SWIG_IsOK(res1)) {
19493 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldInteger64List" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19494 : }
19495 122 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19496 122 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19497 122 : if (!SWIG_IsOK(ecode2)) {
19498 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldInteger64List" "', argument " "2"" of type '" "int""'");
19499 : }
19500 122 : arg2 = static_cast< int >(val2);
19501 122 : {
19502 : /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
19503 122 : arg4 = CreateCGIntBigListFromSequence(swig_obj[2], &arg3);
19504 122 : if( arg3 < 0 ) {
19505 0 : SWIG_fail;
19506 : }
19507 : }
19508 122 : {
19509 122 : const int bLocalUseExceptions = GetUseExceptions();
19510 122 : if ( bLocalUseExceptions ) {
19511 114 : pushErrorHandler();
19512 : }
19513 122 : {
19514 122 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19515 122 : OGRFeatureShadow_SetFieldInteger64List(arg1,arg2,arg3,arg4);
19516 122 : SWIG_PYTHON_THREAD_END_ALLOW;
19517 : }
19518 122 : if ( bLocalUseExceptions ) {
19519 114 : popErrorHandler();
19520 : }
19521 : #ifndef SED_HACKS
19522 : if ( bLocalUseExceptions ) {
19523 : CPLErr eclass = CPLGetLastErrorType();
19524 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19525 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19526 : }
19527 : }
19528 : #endif
19529 : }
19530 122 : resultobj = SWIG_Py_Void();
19531 122 : {
19532 : /* %typemap(freearg) (int nList, GIntBig* pList) */
19533 122 : free(arg4);
19534 : }
19535 122 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19536 : return resultobj;
19537 0 : fail:
19538 0 : {
19539 : /* %typemap(freearg) (int nList, GIntBig* pList) */
19540 0 : free(arg4);
19541 : }
19542 0 : return NULL;
19543 : }
19544 :
19545 :
19546 90 : SWIGINTERN PyObject *_wrap_Feature_SetFieldDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19547 90 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19548 90 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19549 90 : int arg2 ;
19550 90 : int arg3 ;
19551 90 : double *arg4 = (double *) 0 ;
19552 90 : void *argp1 = 0 ;
19553 90 : int res1 = 0 ;
19554 90 : int val2 ;
19555 90 : int ecode2 = 0 ;
19556 90 : PyObject *swig_obj[3] ;
19557 :
19558 90 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldDoubleList", 3, 3, swig_obj)) SWIG_fail;
19559 90 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19560 90 : if (!SWIG_IsOK(res1)) {
19561 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19562 : }
19563 90 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19564 90 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19565 90 : if (!SWIG_IsOK(ecode2)) {
19566 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldDoubleList" "', argument " "2"" of type '" "int""'");
19567 : }
19568 90 : arg2 = static_cast< int >(val2);
19569 90 : {
19570 : /* %typemap(in,numinputs=1) (int nList, double* pList)*/
19571 90 : arg4 = CreateCDoubleListFromSequence(swig_obj[2], &arg3);
19572 90 : if( arg3 < 0 ) {
19573 0 : SWIG_fail;
19574 : }
19575 : }
19576 90 : {
19577 90 : const int bLocalUseExceptions = GetUseExceptions();
19578 90 : if ( bLocalUseExceptions ) {
19579 74 : pushErrorHandler();
19580 : }
19581 90 : {
19582 90 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19583 90 : OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
19584 90 : SWIG_PYTHON_THREAD_END_ALLOW;
19585 : }
19586 90 : if ( bLocalUseExceptions ) {
19587 74 : popErrorHandler();
19588 : }
19589 : #ifndef SED_HACKS
19590 : if ( bLocalUseExceptions ) {
19591 : CPLErr eclass = CPLGetLastErrorType();
19592 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19593 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19594 : }
19595 : }
19596 : #endif
19597 : }
19598 90 : resultobj = SWIG_Py_Void();
19599 90 : {
19600 : /* %typemap(freearg) (int nList, double* pList) */
19601 90 : free(arg4);
19602 : }
19603 90 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19604 : return resultobj;
19605 0 : fail:
19606 0 : {
19607 : /* %typemap(freearg) (int nList, double* pList) */
19608 0 : free(arg4);
19609 : }
19610 0 : return NULL;
19611 : }
19612 :
19613 :
19614 42 : SWIGINTERN PyObject *_wrap_Feature_SetFieldStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19615 42 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19616 42 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19617 42 : int arg2 ;
19618 42 : char **arg3 = (char **) 0 ;
19619 42 : void *argp1 = 0 ;
19620 42 : int res1 = 0 ;
19621 42 : int val2 ;
19622 42 : int ecode2 = 0 ;
19623 42 : PyObject *swig_obj[3] ;
19624 :
19625 42 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldStringList", 3, 3, swig_obj)) SWIG_fail;
19626 42 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19627 42 : if (!SWIG_IsOK(res1)) {
19628 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19629 : }
19630 42 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19631 42 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19632 42 : if (!SWIG_IsOK(ecode2)) {
19633 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
19634 : }
19635 42 : arg2 = static_cast< int >(val2);
19636 42 : {
19637 : /* %typemap(in) char **dict */
19638 42 : arg3 = NULL;
19639 42 : if ( PySequence_Check( swig_obj[2] ) ) {
19640 42 : int bErr = FALSE;
19641 42 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
19642 42 : if ( bErr )
19643 : {
19644 0 : SWIG_fail;
19645 : }
19646 : }
19647 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
19648 0 : int bErr = FALSE;
19649 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
19650 0 : if ( bErr )
19651 : {
19652 0 : SWIG_fail;
19653 : }
19654 : }
19655 : else {
19656 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19657 0 : SWIG_fail;
19658 : }
19659 : }
19660 42 : {
19661 42 : const int bLocalUseExceptions = GetUseExceptions();
19662 42 : if ( bLocalUseExceptions ) {
19663 38 : pushErrorHandler();
19664 : }
19665 42 : {
19666 42 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19667 42 : OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
19668 42 : SWIG_PYTHON_THREAD_END_ALLOW;
19669 : }
19670 42 : if ( bLocalUseExceptions ) {
19671 38 : popErrorHandler();
19672 : }
19673 : #ifndef SED_HACKS
19674 : if ( bLocalUseExceptions ) {
19675 : CPLErr eclass = CPLGetLastErrorType();
19676 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19677 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19678 : }
19679 : }
19680 : #endif
19681 : }
19682 42 : resultobj = SWIG_Py_Void();
19683 42 : {
19684 : /* %typemap(freearg) char **dict */
19685 42 : CSLDestroy( arg3 );
19686 : }
19687 42 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19688 : return resultobj;
19689 0 : fail:
19690 0 : {
19691 : /* %typemap(freearg) char **dict */
19692 0 : CSLDestroy( arg3 );
19693 : }
19694 : return NULL;
19695 : }
19696 :
19697 :
19698 515 : SWIGINTERN PyObject *_wrap_Feature__SetFieldBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19699 515 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19700 515 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19701 515 : int arg2 ;
19702 515 : int arg3 ;
19703 515 : char *arg4 = (char *) 0 ;
19704 515 : void *argp1 = 0 ;
19705 515 : int res1 = 0 ;
19706 515 : int val2 ;
19707 515 : int ecode2 = 0 ;
19708 515 : int alloc3 = 0 ;
19709 515 : bool viewIsValid3 = false ;
19710 515 : Py_buffer view3 ;
19711 515 : PyObject *swig_obj[3] ;
19712 :
19713 515 : if (!SWIG_Python_UnpackTuple(args, "Feature__SetFieldBinary", 3, 3, swig_obj)) SWIG_fail;
19714 515 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19715 515 : if (!SWIG_IsOK(res1)) {
19716 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature__SetFieldBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19717 : }
19718 515 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19719 515 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19720 515 : if (!SWIG_IsOK(ecode2)) {
19721 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature__SetFieldBinary" "', argument " "2"" of type '" "int""'");
19722 : }
19723 515 : arg2 = static_cast< int >(val2);
19724 515 : {
19725 : /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
19726 515 : char* ptr = NULL;
19727 515 : if( !GetBufferAsCharPtrIntSize(swig_obj[2], &arg3, &ptr, &alloc3, &viewIsValid3, &view3) ) {
19728 0 : SWIG_fail;
19729 : }
19730 515 : arg4 = (char *)ptr;
19731 : }
19732 515 : {
19733 515 : const int bLocalUseExceptions = GetUseExceptions();
19734 515 : if ( bLocalUseExceptions ) {
19735 54 : pushErrorHandler();
19736 : }
19737 515 : {
19738 515 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19739 515 : OGRFeatureShadow__SetFieldBinary(arg1,arg2,arg3,arg4);
19740 515 : SWIG_PYTHON_THREAD_END_ALLOW;
19741 : }
19742 515 : if ( bLocalUseExceptions ) {
19743 54 : popErrorHandler();
19744 : }
19745 : #ifndef SED_HACKS
19746 : if ( bLocalUseExceptions ) {
19747 : CPLErr eclass = CPLGetLastErrorType();
19748 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19749 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19750 : }
19751 : }
19752 : #endif
19753 : }
19754 515 : resultobj = SWIG_Py_Void();
19755 515 : {
19756 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
19757 515 : if( viewIsValid3 ) {
19758 515 : PyBuffer_Release(&view3);
19759 : }
19760 0 : else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
19761 0 : delete[] arg4;
19762 : }
19763 : }
19764 515 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19765 : return resultobj;
19766 0 : fail:
19767 0 : {
19768 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
19769 0 : if( viewIsValid3 ) {
19770 0 : PyBuffer_Release(&view3);
19771 : }
19772 515 : else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
19773 : delete[] arg4;
19774 : }
19775 : }
19776 : return NULL;
19777 : }
19778 :
19779 :
19780 : SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
19781 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19782 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19783 : int arg2 ;
19784 : char *arg3 = (char *) 0 ;
19785 : void *argp1 = 0 ;
19786 : int res1 = 0 ;
19787 : int val2 ;
19788 : int ecode2 = 0 ;
19789 : int res3 ;
19790 : char *buf3 = 0 ;
19791 : int alloc3 = 0 ;
19792 :
19793 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
19794 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19795 : if (!SWIG_IsOK(res1)) {
19796 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19797 : }
19798 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19799 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19800 : if (!SWIG_IsOK(ecode2)) {
19801 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "2"" of type '" "int""'");
19802 : }
19803 : arg2 = static_cast< int >(val2);
19804 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
19805 : if (!SWIG_IsOK(res3)) {
19806 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "3"" of type '" "char const *""'");
19807 : }
19808 : arg3 = reinterpret_cast< char * >(buf3);
19809 : {
19810 : const int bLocalUseExceptions = GetUseExceptions();
19811 : if ( bLocalUseExceptions ) {
19812 : pushErrorHandler();
19813 : }
19814 : {
19815 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19816 : OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(arg1,arg2,(char const *)arg3);
19817 : SWIG_PYTHON_THREAD_END_ALLOW;
19818 : }
19819 : if ( bLocalUseExceptions ) {
19820 : popErrorHandler();
19821 : }
19822 : #ifndef SED_HACKS
19823 : if ( bLocalUseExceptions ) {
19824 : CPLErr eclass = CPLGetLastErrorType();
19825 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19826 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19827 : }
19828 : }
19829 : #endif
19830 : }
19831 : resultobj = SWIG_Py_Void();
19832 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
19833 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19834 : return resultobj;
19835 : fail:
19836 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
19837 : return NULL;
19838 : }
19839 :
19840 :
19841 : SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
19842 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19843 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19844 : char *arg2 = (char *) 0 ;
19845 : char *arg3 = (char *) 0 ;
19846 : void *argp1 = 0 ;
19847 : int res1 = 0 ;
19848 : int bToFree2 = 0 ;
19849 : int res3 ;
19850 : char *buf3 = 0 ;
19851 : int alloc3 = 0 ;
19852 :
19853 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
19854 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19855 : if (!SWIG_IsOK(res1)) {
19856 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19857 : }
19858 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19859 : {
19860 : /* %typemap(in) (const char *utf8_path) */
19861 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
19862 : {
19863 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
19864 : }
19865 : else
19866 : {
19867 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
19868 :
19869 : }
19870 : if (arg2 == NULL)
19871 : {
19872 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19873 : SWIG_fail;
19874 : }
19875 : }
19876 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
19877 : if (!SWIG_IsOK(res3)) {
19878 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "3"" of type '" "char const *""'");
19879 : }
19880 : arg3 = reinterpret_cast< char * >(buf3);
19881 : {
19882 : const int bLocalUseExceptions = GetUseExceptions();
19883 : if ( bLocalUseExceptions ) {
19884 : pushErrorHandler();
19885 : }
19886 : {
19887 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19888 : OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
19889 : SWIG_PYTHON_THREAD_END_ALLOW;
19890 : }
19891 : if ( bLocalUseExceptions ) {
19892 : popErrorHandler();
19893 : }
19894 : #ifndef SED_HACKS
19895 : if ( bLocalUseExceptions ) {
19896 : CPLErr eclass = CPLGetLastErrorType();
19897 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19898 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19899 : }
19900 : }
19901 : #endif
19902 : }
19903 : resultobj = SWIG_Py_Void();
19904 : {
19905 : /* %typemap(freearg) (const char *utf8_path) */
19906 : GDALPythonFreeCStr(arg2, bToFree2);
19907 : }
19908 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
19909 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19910 : return resultobj;
19911 : fail:
19912 : {
19913 : /* %typemap(freearg) (const char *utf8_path) */
19914 : GDALPythonFreeCStr(arg2, bToFree2);
19915 : }
19916 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
19917 : return NULL;
19918 : }
19919 :
19920 :
19921 6 : SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString(PyObject *self, PyObject *args) {
19922 6 : Py_ssize_t argc;
19923 6 : PyObject *argv[4] = {
19924 : 0
19925 : };
19926 :
19927 6 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetFieldBinaryFromHexString", 0, 3, argv))) SWIG_fail;
19928 6 : --argc;
19929 6 : if (argc == 3) {
19930 6 : int _v;
19931 6 : void *vptr = 0;
19932 6 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19933 8 : _v = SWIG_CheckState(res);
19934 6 : if (_v) {
19935 6 : {
19936 6 : int res = SWIG_AsVal_int(argv[1], NULL);
19937 6 : _v = SWIG_CheckState(res);
19938 : }
19939 4 : if (_v) {
19940 4 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
19941 4 : _v = SWIG_CheckState(res);
19942 4 : if (_v) {
19943 4 : return _wrap_Feature_SetFieldBinaryFromHexString__SWIG_0(self, argc, argv);
19944 : }
19945 : }
19946 : }
19947 : }
19948 2 : if (argc == 3) {
19949 2 : int _v;
19950 2 : void *vptr = 0;
19951 2 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19952 2 : _v = SWIG_CheckState(res);
19953 2 : if (_v) {
19954 2 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
19955 2 : _v = SWIG_CheckState(res);
19956 2 : if (_v) {
19957 2 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
19958 2 : _v = SWIG_CheckState(res);
19959 2 : if (_v) {
19960 2 : return _wrap_Feature_SetFieldBinaryFromHexString__SWIG_1(self, argc, argv);
19961 : }
19962 : }
19963 : }
19964 : }
19965 :
19966 0 : fail:
19967 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetFieldBinaryFromHexString'.\n"
19968 : " Possible C/C++ prototypes are:\n"
19969 : " OGRFeatureShadow::SetFieldBinaryFromHexString(int,char const *)\n"
19970 : " OGRFeatureShadow::SetFieldBinaryFromHexString(char const *,char const *)\n");
19971 : return 0;
19972 : }
19973 :
19974 :
19975 1732 : SWIGINTERN PyObject *_wrap_Feature_SetFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
19976 1732 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19977 1732 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19978 1732 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
19979 1732 : int arg3 = (int) 1 ;
19980 1732 : void *argp1 = 0 ;
19981 1732 : int res1 = 0 ;
19982 1732 : void *argp2 = 0 ;
19983 1732 : int res2 = 0 ;
19984 1732 : int val3 ;
19985 1732 : int ecode3 = 0 ;
19986 1732 : PyObject * obj0 = 0 ;
19987 1732 : PyObject * obj1 = 0 ;
19988 1732 : PyObject * obj2 = 0 ;
19989 1732 : char * kwnames[] = {
19990 : (char *)"self", (char *)"other", (char *)"forgiving", NULL
19991 : };
19992 1732 : OGRErr result;
19993 :
19994 1732 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Feature_SetFrom", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
19995 1732 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19996 1732 : if (!SWIG_IsOK(res1)) {
19997 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFrom" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19998 : }
19999 1732 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20000 1732 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20001 1732 : if (!SWIG_IsOK(res2)) {
20002 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFrom" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
20003 : }
20004 1732 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
20005 1732 : if (obj2) {
20006 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
20007 0 : if (!SWIG_IsOK(ecode3)) {
20008 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFrom" "', argument " "3"" of type '" "int""'");
20009 : }
20010 : arg3 = static_cast< int >(val3);
20011 : }
20012 1732 : {
20013 1732 : if (!arg2) {
20014 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
20015 : }
20016 : }
20017 1732 : {
20018 1732 : const int bLocalUseExceptions = GetUseExceptions();
20019 1732 : if ( bLocalUseExceptions ) {
20020 73 : pushErrorHandler();
20021 : }
20022 1732 : {
20023 1732 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20024 1732 : result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
20025 1732 : SWIG_PYTHON_THREAD_END_ALLOW;
20026 : }
20027 1732 : if ( bLocalUseExceptions ) {
20028 73 : popErrorHandler();
20029 : }
20030 : #ifndef SED_HACKS
20031 : if ( bLocalUseExceptions ) {
20032 : CPLErr eclass = CPLGetLastErrorType();
20033 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20034 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20035 : }
20036 : }
20037 : #endif
20038 : }
20039 1732 : {
20040 : /* %typemap(out) OGRErr */
20041 1732 : if ( result != 0 && GetUseExceptions()) {
20042 0 : const char* pszMessage = CPLGetLastErrorMsg();
20043 0 : if( pszMessage[0] != '\0' )
20044 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
20045 : else
20046 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
20047 0 : SWIG_fail;
20048 : }
20049 : }
20050 1732 : {
20051 : /* %typemap(ret) OGRErr */
20052 1732 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
20053 1732 : resultobj = PyInt_FromLong( result );
20054 : }
20055 : }
20056 1732 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20057 : return resultobj;
20058 : fail:
20059 : return NULL;
20060 : }
20061 :
20062 :
20063 0 : SWIGINTERN PyObject *_wrap_Feature_SetFromWithMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20064 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20065 0 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20066 0 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
20067 0 : int arg3 ;
20068 0 : int arg4 ;
20069 0 : int *arg5 = (int *) 0 ;
20070 0 : void *argp1 = 0 ;
20071 0 : int res1 = 0 ;
20072 0 : void *argp2 = 0 ;
20073 0 : int res2 = 0 ;
20074 0 : int val3 ;
20075 0 : int ecode3 = 0 ;
20076 0 : PyObject *swig_obj[4] ;
20077 0 : OGRErr result;
20078 :
20079 0 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFromWithMap", 4, 4, swig_obj)) SWIG_fail;
20080 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20081 0 : if (!SWIG_IsOK(res1)) {
20082 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFromWithMap" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20083 : }
20084 0 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20085 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20086 0 : if (!SWIG_IsOK(res2)) {
20087 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFromWithMap" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
20088 : }
20089 0 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
20090 0 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
20091 0 : if (!SWIG_IsOK(ecode3)) {
20092 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFromWithMap" "', argument " "3"" of type '" "int""'");
20093 : }
20094 0 : arg3 = static_cast< int >(val3);
20095 0 : {
20096 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
20097 0 : arg5 = CreateCIntListFromSequence(swig_obj[3], &arg4);
20098 0 : if( arg4 < 0 ) {
20099 0 : SWIG_fail;
20100 : }
20101 : }
20102 0 : {
20103 0 : if (!arg2) {
20104 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
20105 : }
20106 : }
20107 0 : {
20108 0 : const int bLocalUseExceptions = GetUseExceptions();
20109 0 : if ( bLocalUseExceptions ) {
20110 0 : pushErrorHandler();
20111 : }
20112 0 : {
20113 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20114 0 : result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
20115 0 : SWIG_PYTHON_THREAD_END_ALLOW;
20116 : }
20117 0 : if ( bLocalUseExceptions ) {
20118 0 : popErrorHandler();
20119 : }
20120 : #ifndef SED_HACKS
20121 : if ( bLocalUseExceptions ) {
20122 : CPLErr eclass = CPLGetLastErrorType();
20123 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20124 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20125 : }
20126 : }
20127 : #endif
20128 : }
20129 0 : {
20130 : /* %typemap(out) OGRErr */
20131 0 : if ( result != 0 && GetUseExceptions()) {
20132 0 : const char* pszMessage = CPLGetLastErrorMsg();
20133 0 : if( pszMessage[0] != '\0' )
20134 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
20135 : else
20136 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
20137 0 : SWIG_fail;
20138 : }
20139 : }
20140 0 : {
20141 : /* %typemap(freearg) (int nList, int* pList) */
20142 0 : free(arg5);
20143 : }
20144 0 : {
20145 : /* %typemap(ret) OGRErr */
20146 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
20147 0 : resultobj = PyInt_FromLong( result );
20148 : }
20149 : }
20150 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20151 : return resultobj;
20152 0 : fail:
20153 0 : {
20154 : /* %typemap(freearg) (int nList, int* pList) */
20155 0 : free(arg5);
20156 : }
20157 0 : return NULL;
20158 : }
20159 :
20160 :
20161 1582 : SWIGINTERN PyObject *_wrap_Feature_GetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20162 1582 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20163 1582 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20164 1582 : void *argp1 = 0 ;
20165 1582 : int res1 = 0 ;
20166 1582 : PyObject *swig_obj[1] ;
20167 1582 : char *result = 0 ;
20168 :
20169 1582 : if (!args) SWIG_fail;
20170 1582 : swig_obj[0] = args;
20171 1582 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20172 1582 : if (!SWIG_IsOK(res1)) {
20173 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20174 : }
20175 1582 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20176 1582 : {
20177 1582 : const int bLocalUseExceptions = GetUseExceptions();
20178 1582 : if ( bLocalUseExceptions ) {
20179 54 : pushErrorHandler();
20180 : }
20181 1582 : {
20182 1582 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20183 1582 : result = (char *)OGRFeatureShadow_GetStyleString(arg1);
20184 1582 : SWIG_PYTHON_THREAD_END_ALLOW;
20185 : }
20186 1582 : if ( bLocalUseExceptions ) {
20187 54 : popErrorHandler();
20188 : }
20189 : #ifndef SED_HACKS
20190 : if ( bLocalUseExceptions ) {
20191 : CPLErr eclass = CPLGetLastErrorType();
20192 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20193 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20194 : }
20195 : }
20196 : #endif
20197 : }
20198 1582 : resultobj = SWIG_FromCharPtr((const char *)result);
20199 1582 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20200 : return resultobj;
20201 : fail:
20202 : return NULL;
20203 : }
20204 :
20205 :
20206 113 : SWIGINTERN PyObject *_wrap_Feature_SetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20207 113 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20208 113 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20209 113 : char *arg2 = (char *) 0 ;
20210 113 : void *argp1 = 0 ;
20211 113 : int res1 = 0 ;
20212 113 : int res2 ;
20213 113 : char *buf2 = 0 ;
20214 113 : int alloc2 = 0 ;
20215 113 : PyObject *swig_obj[2] ;
20216 :
20217 113 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetStyleString", 2, 2, swig_obj)) SWIG_fail;
20218 113 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20219 113 : if (!SWIG_IsOK(res1)) {
20220 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20221 : }
20222 113 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20223 113 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
20224 113 : if (!SWIG_IsOK(res2)) {
20225 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetStyleString" "', argument " "2"" of type '" "char const *""'");
20226 : }
20227 113 : arg2 = reinterpret_cast< char * >(buf2);
20228 113 : {
20229 113 : const int bLocalUseExceptions = GetUseExceptions();
20230 113 : if ( bLocalUseExceptions ) {
20231 88 : pushErrorHandler();
20232 : }
20233 113 : {
20234 113 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20235 113 : OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
20236 113 : SWIG_PYTHON_THREAD_END_ALLOW;
20237 : }
20238 113 : if ( bLocalUseExceptions ) {
20239 88 : popErrorHandler();
20240 : }
20241 : #ifndef SED_HACKS
20242 : if ( bLocalUseExceptions ) {
20243 : CPLErr eclass = CPLGetLastErrorType();
20244 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20245 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20246 : }
20247 : }
20248 : #endif
20249 : }
20250 113 : resultobj = SWIG_Py_Void();
20251 113 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20252 113 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20253 : return resultobj;
20254 0 : fail:
20255 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20256 : return NULL;
20257 : }
20258 :
20259 :
20260 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
20261 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20262 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20263 : int arg2 ;
20264 : void *argp1 = 0 ;
20265 : int res1 = 0 ;
20266 : int val2 ;
20267 : int ecode2 = 0 ;
20268 : OGRFieldType result;
20269 :
20270 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
20271 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20272 : if (!SWIG_IsOK(res1)) {
20273 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20274 : }
20275 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20276 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
20277 : if (!SWIG_IsOK(ecode2)) {
20278 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "int""'");
20279 : }
20280 : arg2 = static_cast< int >(val2);
20281 : {
20282 : const int bLocalUseExceptions = GetUseExceptions();
20283 : if ( bLocalUseExceptions ) {
20284 : pushErrorHandler();
20285 : }
20286 : {
20287 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20288 : result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
20289 : SWIG_PYTHON_THREAD_END_ALLOW;
20290 : }
20291 : if ( bLocalUseExceptions ) {
20292 : popErrorHandler();
20293 : }
20294 : #ifndef SED_HACKS
20295 : if ( bLocalUseExceptions ) {
20296 : CPLErr eclass = CPLGetLastErrorType();
20297 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20298 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20299 : }
20300 : }
20301 : #endif
20302 : }
20303 : resultobj = SWIG_From_int(static_cast< int >(result));
20304 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20305 : return resultobj;
20306 : fail:
20307 : return NULL;
20308 : }
20309 :
20310 :
20311 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
20312 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20313 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20314 : char *arg2 = (char *) 0 ;
20315 : void *argp1 = 0 ;
20316 : int res1 = 0 ;
20317 : int bToFree2 = 0 ;
20318 : OGRFieldType result;
20319 :
20320 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
20321 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20322 : if (!SWIG_IsOK(res1)) {
20323 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20324 : }
20325 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20326 : {
20327 : /* %typemap(in) (const char *utf8_path) */
20328 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
20329 : {
20330 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
20331 : }
20332 : else
20333 : {
20334 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
20335 :
20336 : }
20337 : if (arg2 == NULL)
20338 : {
20339 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
20340 : SWIG_fail;
20341 : }
20342 : }
20343 : {
20344 : const int bLocalUseExceptions = GetUseExceptions();
20345 : if ( bLocalUseExceptions ) {
20346 : pushErrorHandler();
20347 : }
20348 : {
20349 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20350 : result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
20351 : SWIG_PYTHON_THREAD_END_ALLOW;
20352 : }
20353 : if ( bLocalUseExceptions ) {
20354 : popErrorHandler();
20355 : }
20356 : #ifndef SED_HACKS
20357 : if ( bLocalUseExceptions ) {
20358 : CPLErr eclass = CPLGetLastErrorType();
20359 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20360 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20361 : }
20362 : }
20363 : #endif
20364 : }
20365 : resultobj = SWIG_From_int(static_cast< int >(result));
20366 : {
20367 : /* %typemap(freearg) (const char *utf8_path) */
20368 : GDALPythonFreeCStr(arg2, bToFree2);
20369 : }
20370 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20371 : return resultobj;
20372 : fail:
20373 : {
20374 : /* %typemap(freearg) (const char *utf8_path) */
20375 : GDALPythonFreeCStr(arg2, bToFree2);
20376 : }
20377 : return NULL;
20378 : }
20379 :
20380 :
20381 100838 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType(PyObject *self, PyObject *args) {
20382 100838 : Py_ssize_t argc;
20383 100838 : PyObject *argv[3] = {
20384 : 0
20385 : };
20386 :
20387 100838 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldType", 0, 2, argv))) SWIG_fail;
20388 100838 : --argc;
20389 100838 : if (argc == 2) {
20390 100838 : int _v;
20391 100838 : void *vptr = 0;
20392 100838 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
20393 100838 : _v = SWIG_CheckState(res);
20394 100838 : if (_v) {
20395 100838 : {
20396 100838 : int res = SWIG_AsVal_int(argv[1], NULL);
20397 100838 : _v = SWIG_CheckState(res);
20398 : }
20399 100838 : if (_v) {
20400 100838 : return _wrap_Feature_GetFieldType__SWIG_0(self, argc, argv);
20401 : }
20402 : }
20403 : }
20404 0 : if (argc == 2) {
20405 0 : int _v;
20406 0 : void *vptr = 0;
20407 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
20408 0 : _v = SWIG_CheckState(res);
20409 0 : if (_v) {
20410 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
20411 0 : _v = SWIG_CheckState(res);
20412 0 : if (_v) {
20413 0 : return _wrap_Feature_GetFieldType__SWIG_1(self, argc, argv);
20414 : }
20415 : }
20416 : }
20417 :
20418 0 : fail:
20419 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldType'.\n"
20420 : " Possible C/C++ prototypes are:\n"
20421 : " OGRFeatureShadow::GetFieldType(int)\n"
20422 : " OGRFeatureShadow::GetFieldType(char const *)\n");
20423 : return 0;
20424 : }
20425 :
20426 :
20427 10 : SWIGINTERN PyObject *_wrap_Feature_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20428 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20429 10 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20430 10 : int arg2 = (int) OGR_F_VAL_ALL ;
20431 10 : int arg3 = (int) TRUE ;
20432 10 : void *argp1 = 0 ;
20433 10 : int res1 = 0 ;
20434 10 : int val2 ;
20435 10 : int ecode2 = 0 ;
20436 10 : int val3 ;
20437 10 : int ecode3 = 0 ;
20438 10 : PyObject *swig_obj[3] ;
20439 10 : int result;
20440 :
20441 10 : if (!SWIG_Python_UnpackTuple(args, "Feature_Validate", 1, 3, swig_obj)) SWIG_fail;
20442 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20443 10 : if (!SWIG_IsOK(res1)) {
20444 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Validate" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20445 : }
20446 10 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20447 10 : if (swig_obj[1]) {
20448 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
20449 0 : if (!SWIG_IsOK(ecode2)) {
20450 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_Validate" "', argument " "2"" of type '" "int""'");
20451 : }
20452 : arg2 = static_cast< int >(val2);
20453 : }
20454 10 : if (swig_obj[2]) {
20455 0 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
20456 0 : if (!SWIG_IsOK(ecode3)) {
20457 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_Validate" "', argument " "3"" of type '" "int""'");
20458 : }
20459 : arg3 = static_cast< int >(val3);
20460 : }
20461 10 : {
20462 10 : const int bLocalUseExceptions = GetUseExceptions();
20463 10 : if ( bLocalUseExceptions ) {
20464 10 : pushErrorHandler();
20465 : }
20466 10 : {
20467 10 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20468 10 : result = (int)OGRFeatureShadow_Validate(arg1,arg2,arg3);
20469 10 : SWIG_PYTHON_THREAD_END_ALLOW;
20470 : }
20471 10 : if ( bLocalUseExceptions ) {
20472 10 : popErrorHandler();
20473 : }
20474 : #ifndef SED_HACKS
20475 : if ( bLocalUseExceptions ) {
20476 : CPLErr eclass = CPLGetLastErrorType();
20477 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20478 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20479 : }
20480 : }
20481 : #endif
20482 : }
20483 10 : resultobj = SWIG_From_int(static_cast< int >(result));
20484 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20485 : return resultobj;
20486 : fail:
20487 : return NULL;
20488 : }
20489 :
20490 :
20491 2 : SWIGINTERN PyObject *_wrap_Feature_FillUnsetWithDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20492 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20493 2 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20494 2 : int arg2 = (int) FALSE ;
20495 2 : char **arg3 = (char **) NULL ;
20496 2 : void *argp1 = 0 ;
20497 2 : int res1 = 0 ;
20498 2 : int val2 ;
20499 2 : int ecode2 = 0 ;
20500 2 : PyObject *swig_obj[3] ;
20501 :
20502 2 : if (!SWIG_Python_UnpackTuple(args, "Feature_FillUnsetWithDefault", 1, 3, swig_obj)) SWIG_fail;
20503 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20504 2 : if (!SWIG_IsOK(res1)) {
20505 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_FillUnsetWithDefault" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20506 : }
20507 2 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20508 2 : if (swig_obj[1]) {
20509 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
20510 0 : if (!SWIG_IsOK(ecode2)) {
20511 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_FillUnsetWithDefault" "', argument " "2"" of type '" "int""'");
20512 : }
20513 : arg2 = static_cast< int >(val2);
20514 : }
20515 2 : if (swig_obj[2]) {
20516 0 : {
20517 : /* %typemap(in) char **dict */
20518 0 : arg3 = NULL;
20519 0 : if ( PySequence_Check( swig_obj[2] ) ) {
20520 0 : int bErr = FALSE;
20521 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
20522 0 : if ( bErr )
20523 : {
20524 0 : SWIG_fail;
20525 : }
20526 : }
20527 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
20528 0 : int bErr = FALSE;
20529 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
20530 0 : if ( bErr )
20531 : {
20532 0 : SWIG_fail;
20533 : }
20534 : }
20535 : else {
20536 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
20537 0 : SWIG_fail;
20538 : }
20539 : }
20540 : }
20541 2 : {
20542 2 : const int bLocalUseExceptions = GetUseExceptions();
20543 2 : if ( bLocalUseExceptions ) {
20544 2 : pushErrorHandler();
20545 : }
20546 2 : {
20547 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20548 2 : OGRFeatureShadow_FillUnsetWithDefault(arg1,arg2,arg3);
20549 2 : SWIG_PYTHON_THREAD_END_ALLOW;
20550 : }
20551 2 : if ( bLocalUseExceptions ) {
20552 2 : popErrorHandler();
20553 : }
20554 : #ifndef SED_HACKS
20555 : if ( bLocalUseExceptions ) {
20556 : CPLErr eclass = CPLGetLastErrorType();
20557 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20558 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20559 : }
20560 : }
20561 : #endif
20562 : }
20563 2 : resultobj = SWIG_Py_Void();
20564 2 : {
20565 : /* %typemap(freearg) char **dict */
20566 2 : CSLDestroy( arg3 );
20567 : }
20568 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20569 : return resultobj;
20570 0 : fail:
20571 0 : {
20572 : /* %typemap(freearg) char **dict */
20573 0 : CSLDestroy( arg3 );
20574 : }
20575 : return NULL;
20576 : }
20577 :
20578 :
20579 9 : SWIGINTERN PyObject *_wrap_Feature_GetNativeData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20580 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20581 9 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20582 9 : void *argp1 = 0 ;
20583 9 : int res1 = 0 ;
20584 9 : PyObject *swig_obj[1] ;
20585 9 : char *result = 0 ;
20586 :
20587 9 : if (!args) SWIG_fail;
20588 9 : swig_obj[0] = args;
20589 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20590 9 : if (!SWIG_IsOK(res1)) {
20591 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetNativeData" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20592 : }
20593 9 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20594 9 : {
20595 9 : const int bLocalUseExceptions = GetUseExceptions();
20596 9 : if ( bLocalUseExceptions ) {
20597 9 : pushErrorHandler();
20598 : }
20599 9 : {
20600 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20601 9 : result = (char *)OGRFeatureShadow_GetNativeData(arg1);
20602 9 : SWIG_PYTHON_THREAD_END_ALLOW;
20603 : }
20604 9 : if ( bLocalUseExceptions ) {
20605 9 : popErrorHandler();
20606 : }
20607 : #ifndef SED_HACKS
20608 : if ( bLocalUseExceptions ) {
20609 : CPLErr eclass = CPLGetLastErrorType();
20610 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20611 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20612 : }
20613 : }
20614 : #endif
20615 : }
20616 9 : resultobj = SWIG_FromCharPtr((const char *)result);
20617 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20618 : return resultobj;
20619 : fail:
20620 : return NULL;
20621 : }
20622 :
20623 :
20624 9 : SWIGINTERN PyObject *_wrap_Feature_GetNativeMediaType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20625 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20626 9 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20627 9 : void *argp1 = 0 ;
20628 9 : int res1 = 0 ;
20629 9 : PyObject *swig_obj[1] ;
20630 9 : char *result = 0 ;
20631 :
20632 9 : if (!args) SWIG_fail;
20633 9 : swig_obj[0] = args;
20634 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20635 9 : if (!SWIG_IsOK(res1)) {
20636 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetNativeMediaType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20637 : }
20638 9 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20639 9 : {
20640 9 : const int bLocalUseExceptions = GetUseExceptions();
20641 9 : if ( bLocalUseExceptions ) {
20642 9 : pushErrorHandler();
20643 : }
20644 9 : {
20645 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20646 9 : result = (char *)OGRFeatureShadow_GetNativeMediaType(arg1);
20647 9 : SWIG_PYTHON_THREAD_END_ALLOW;
20648 : }
20649 9 : if ( bLocalUseExceptions ) {
20650 9 : popErrorHandler();
20651 : }
20652 : #ifndef SED_HACKS
20653 : if ( bLocalUseExceptions ) {
20654 : CPLErr eclass = CPLGetLastErrorType();
20655 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20656 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20657 : }
20658 : }
20659 : #endif
20660 : }
20661 9 : resultobj = SWIG_FromCharPtr((const char *)result);
20662 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20663 : return resultobj;
20664 : fail:
20665 : return NULL;
20666 : }
20667 :
20668 :
20669 4 : SWIGINTERN PyObject *_wrap_Feature_SetNativeData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20670 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20671 4 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20672 4 : char *arg2 = (char *) 0 ;
20673 4 : void *argp1 = 0 ;
20674 4 : int res1 = 0 ;
20675 4 : int res2 ;
20676 4 : char *buf2 = 0 ;
20677 4 : int alloc2 = 0 ;
20678 4 : PyObject *swig_obj[2] ;
20679 :
20680 4 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetNativeData", 2, 2, swig_obj)) SWIG_fail;
20681 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20682 4 : if (!SWIG_IsOK(res1)) {
20683 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetNativeData" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20684 : }
20685 4 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20686 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
20687 4 : if (!SWIG_IsOK(res2)) {
20688 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetNativeData" "', argument " "2"" of type '" "char const *""'");
20689 : }
20690 4 : arg2 = reinterpret_cast< char * >(buf2);
20691 4 : {
20692 4 : const int bLocalUseExceptions = GetUseExceptions();
20693 4 : if ( bLocalUseExceptions ) {
20694 4 : pushErrorHandler();
20695 : }
20696 4 : {
20697 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20698 4 : OGRFeatureShadow_SetNativeData(arg1,(char const *)arg2);
20699 4 : SWIG_PYTHON_THREAD_END_ALLOW;
20700 : }
20701 4 : if ( bLocalUseExceptions ) {
20702 4 : popErrorHandler();
20703 : }
20704 : #ifndef SED_HACKS
20705 : if ( bLocalUseExceptions ) {
20706 : CPLErr eclass = CPLGetLastErrorType();
20707 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20708 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20709 : }
20710 : }
20711 : #endif
20712 : }
20713 4 : resultobj = SWIG_Py_Void();
20714 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20715 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20716 : return resultobj;
20717 0 : fail:
20718 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20719 : return NULL;
20720 : }
20721 :
20722 :
20723 4 : SWIGINTERN PyObject *_wrap_Feature_SetNativeMediaType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20724 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20725 4 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20726 4 : char *arg2 = (char *) 0 ;
20727 4 : void *argp1 = 0 ;
20728 4 : int res1 = 0 ;
20729 4 : int res2 ;
20730 4 : char *buf2 = 0 ;
20731 4 : int alloc2 = 0 ;
20732 4 : PyObject *swig_obj[2] ;
20733 :
20734 4 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetNativeMediaType", 2, 2, swig_obj)) SWIG_fail;
20735 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20736 4 : if (!SWIG_IsOK(res1)) {
20737 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetNativeMediaType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20738 : }
20739 4 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20740 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
20741 4 : if (!SWIG_IsOK(res2)) {
20742 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetNativeMediaType" "', argument " "2"" of type '" "char const *""'");
20743 : }
20744 4 : arg2 = reinterpret_cast< char * >(buf2);
20745 4 : {
20746 4 : const int bLocalUseExceptions = GetUseExceptions();
20747 4 : if ( bLocalUseExceptions ) {
20748 4 : pushErrorHandler();
20749 : }
20750 4 : {
20751 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20752 4 : OGRFeatureShadow_SetNativeMediaType(arg1,(char const *)arg2);
20753 4 : SWIG_PYTHON_THREAD_END_ALLOW;
20754 : }
20755 4 : if ( bLocalUseExceptions ) {
20756 4 : popErrorHandler();
20757 : }
20758 : #ifndef SED_HACKS
20759 : if ( bLocalUseExceptions ) {
20760 : CPLErr eclass = CPLGetLastErrorType();
20761 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20762 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20763 : }
20764 : }
20765 : #endif
20766 : }
20767 4 : resultobj = SWIG_Py_Void();
20768 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20769 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20770 : return resultobj;
20771 0 : fail:
20772 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20773 : return NULL;
20774 : }
20775 :
20776 :
20777 12029 : SWIGINTERN PyObject *_wrap_Feature_SetFieldString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20778 12029 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20779 12029 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20780 12029 : int arg2 ;
20781 12029 : char *arg3 = (char *) 0 ;
20782 12029 : void *argp1 = 0 ;
20783 12029 : int res1 = 0 ;
20784 12029 : int val2 ;
20785 12029 : int ecode2 = 0 ;
20786 12029 : int bToFree3 = 0 ;
20787 12029 : PyObject *swig_obj[3] ;
20788 :
20789 12029 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldString", 3, 3, swig_obj)) SWIG_fail;
20790 12029 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20791 12029 : if (!SWIG_IsOK(res1)) {
20792 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20793 : }
20794 12029 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20795 12029 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
20796 12029 : if (!SWIG_IsOK(ecode2)) {
20797 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldString" "', argument " "2"" of type '" "int""'");
20798 : }
20799 12029 : arg2 = static_cast< int >(val2);
20800 12029 : {
20801 : /* %typemap(in) (const char *utf8_path) */
20802 12029 : if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
20803 : {
20804 12029 : arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
20805 : }
20806 : else
20807 : {
20808 0 : arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
20809 :
20810 : }
20811 12029 : if (arg3 == NULL)
20812 : {
20813 1 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
20814 1 : SWIG_fail;
20815 : }
20816 : }
20817 12028 : {
20818 12028 : const int bLocalUseExceptions = GetUseExceptions();
20819 12028 : if ( bLocalUseExceptions ) {
20820 1851 : pushErrorHandler();
20821 : }
20822 12028 : OGRFeatureShadow_SetFieldString(arg1,arg2,(char const *)arg3);
20823 12028 : if ( bLocalUseExceptions ) {
20824 1851 : popErrorHandler();
20825 : }
20826 : #ifndef SED_HACKS
20827 : if ( bLocalUseExceptions ) {
20828 : CPLErr eclass = CPLGetLastErrorType();
20829 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20830 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20831 : }
20832 : }
20833 : #endif
20834 : }
20835 12028 : resultobj = SWIG_Py_Void();
20836 12028 : {
20837 : /* %typemap(freearg) (const char *utf8_path) */
20838 12028 : GDALPythonFreeCStr(arg3, bToFree3);
20839 : }
20840 12028 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20841 : return resultobj;
20842 1 : fail:
20843 1 : {
20844 : /* %typemap(freearg) (const char *utf8_path) */
20845 12029 : GDALPythonFreeCStr(arg3, bToFree3);
20846 : }
20847 : return NULL;
20848 : }
20849 :
20850 :
20851 277 : SWIGINTERN PyObject *Feature_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20852 277 : PyObject *obj;
20853 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
20854 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureShadow, SWIG_NewClientData(obj));
20855 277 : return SWIG_Py_Void();
20856 : }
20857 :
20858 121287 : SWIGINTERN PyObject *Feature_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20859 121287 : return SWIG_Python_InitShadowInstance(args);
20860 : }
20861 :
20862 127556 : SWIGINTERN PyObject *_wrap_delete_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20863 127556 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20864 127556 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
20865 127556 : void *argp1 = 0 ;
20866 127556 : int res1 = 0 ;
20867 127556 : PyObject *swig_obj[1] ;
20868 :
20869 127556 : if (!args) SWIG_fail;
20870 127556 : swig_obj[0] = args;
20871 127556 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_DISOWN | 0 );
20872 127556 : if (!SWIG_IsOK(res1)) {
20873 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FeatureDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
20874 : }
20875 127556 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
20876 127556 : {
20877 127556 : const int bLocalUseExceptions = GetUseExceptions();
20878 127556 : if ( bLocalUseExceptions ) {
20879 65205 : pushErrorHandler();
20880 : }
20881 127556 : {
20882 127556 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20883 127556 : delete_OGRFeatureDefnShadow(arg1);
20884 127556 : SWIG_PYTHON_THREAD_END_ALLOW;
20885 : }
20886 127556 : if ( bLocalUseExceptions ) {
20887 65205 : popErrorHandler();
20888 : }
20889 : #ifndef SED_HACKS
20890 : if ( bLocalUseExceptions ) {
20891 : CPLErr eclass = CPLGetLastErrorType();
20892 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20893 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20894 : }
20895 : }
20896 : #endif
20897 : }
20898 127556 : resultobj = SWIG_Py_Void();
20899 127556 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20900 : return resultobj;
20901 : fail:
20902 : return NULL;
20903 : }
20904 :
20905 :
20906 110 : SWIGINTERN PyObject *_wrap_new_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
20907 110 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20908 110 : char *arg1 = (char *) NULL ;
20909 110 : int res1 ;
20910 110 : char *buf1 = 0 ;
20911 110 : int alloc1 = 0 ;
20912 110 : PyObject * obj0 = 0 ;
20913 110 : char * kwnames[] = {
20914 : (char *)"name_null_ok", NULL
20915 : };
20916 110 : OGRFeatureDefnShadow *result = 0 ;
20917 :
20918 110 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_FeatureDefn", kwnames, &obj0)) SWIG_fail;
20919 110 : if (obj0) {
20920 84 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
20921 84 : if (!SWIG_IsOK(res1)) {
20922 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureDefn" "', argument " "1"" of type '" "char const *""'");
20923 : }
20924 84 : arg1 = reinterpret_cast< char * >(buf1);
20925 : }
20926 110 : {
20927 110 : const int bLocalUseExceptions = GetUseExceptions();
20928 110 : if ( bLocalUseExceptions ) {
20929 99 : pushErrorHandler();
20930 : }
20931 110 : {
20932 110 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20933 110 : result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
20934 110 : SWIG_PYTHON_THREAD_END_ALLOW;
20935 : }
20936 110 : if ( bLocalUseExceptions ) {
20937 99 : popErrorHandler();
20938 : }
20939 : #ifndef SED_HACKS
20940 : if ( bLocalUseExceptions ) {
20941 : CPLErr eclass = CPLGetLastErrorType();
20942 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20943 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20944 : }
20945 : }
20946 : #endif
20947 : }
20948 110 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_NEW | 0 );
20949 110 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
20950 110 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20951 : return resultobj;
20952 0 : fail:
20953 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
20954 : return NULL;
20955 : }
20956 :
20957 :
20958 103 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20959 103 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20960 103 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
20961 103 : void *argp1 = 0 ;
20962 103 : int res1 = 0 ;
20963 103 : PyObject *swig_obj[1] ;
20964 103 : char *result = 0 ;
20965 :
20966 103 : if (!args) SWIG_fail;
20967 103 : swig_obj[0] = args;
20968 103 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
20969 103 : if (!SWIG_IsOK(res1)) {
20970 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetName" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
20971 : }
20972 103 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
20973 103 : {
20974 103 : const int bLocalUseExceptions = GetUseExceptions();
20975 103 : if ( bLocalUseExceptions ) {
20976 9 : pushErrorHandler();
20977 : }
20978 103 : {
20979 103 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20980 103 : result = (char *)OGRFeatureDefnShadow_GetName(arg1);
20981 103 : SWIG_PYTHON_THREAD_END_ALLOW;
20982 : }
20983 103 : if ( bLocalUseExceptions ) {
20984 9 : popErrorHandler();
20985 : }
20986 : #ifndef SED_HACKS
20987 : if ( bLocalUseExceptions ) {
20988 : CPLErr eclass = CPLGetLastErrorType();
20989 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20990 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20991 : }
20992 : }
20993 : #endif
20994 : }
20995 103 : resultobj = SWIG_FromCharPtr((const char *)result);
20996 103 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20997 : return resultobj;
20998 : fail:
20999 : return NULL;
21000 : }
21001 :
21002 :
21003 46567 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21004 46567 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21005 46567 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21006 46567 : void *argp1 = 0 ;
21007 46567 : int res1 = 0 ;
21008 46567 : PyObject *swig_obj[1] ;
21009 46567 : int result;
21010 :
21011 46567 : if (!args) SWIG_fail;
21012 46567 : swig_obj[0] = args;
21013 46567 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21014 46567 : if (!SWIG_IsOK(res1)) {
21015 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21016 : }
21017 46567 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21018 46567 : {
21019 46567 : const int bLocalUseExceptions = GetUseExceptions();
21020 46567 : if ( bLocalUseExceptions ) {
21021 22292 : pushErrorHandler();
21022 : }
21023 46567 : {
21024 46567 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21025 46567 : result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
21026 46567 : SWIG_PYTHON_THREAD_END_ALLOW;
21027 : }
21028 46567 : if ( bLocalUseExceptions ) {
21029 22292 : popErrorHandler();
21030 : }
21031 : #ifndef SED_HACKS
21032 : if ( bLocalUseExceptions ) {
21033 : CPLErr eclass = CPLGetLastErrorType();
21034 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21035 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21036 : }
21037 : }
21038 : #endif
21039 : }
21040 46567 : resultobj = SWIG_From_int(static_cast< int >(result));
21041 46567 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21042 : return resultobj;
21043 : fail:
21044 : return NULL;
21045 : }
21046 :
21047 :
21048 203143 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21049 203143 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21050 203143 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21051 203143 : int arg2 ;
21052 203143 : void *argp1 = 0 ;
21053 203143 : int res1 = 0 ;
21054 203143 : int val2 ;
21055 203143 : int ecode2 = 0 ;
21056 203143 : PyObject *swig_obj[2] ;
21057 203143 : OGRFieldDefnShadow *result = 0 ;
21058 :
21059 203143 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21060 203143 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21061 203143 : if (!SWIG_IsOK(res1)) {
21062 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21063 : }
21064 203143 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21065 203143 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21066 203143 : if (!SWIG_IsOK(ecode2)) {
21067 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "2"" of type '" "int""'");
21068 : }
21069 203143 : arg2 = static_cast< int >(val2);
21070 203143 : {
21071 203143 : const int bLocalUseExceptions = GetUseExceptions();
21072 203143 : if ( bLocalUseExceptions ) {
21073 138672 : pushErrorHandler();
21074 : }
21075 203143 : {
21076 203143 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21077 203143 : result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
21078 203143 : SWIG_PYTHON_THREAD_END_ALLOW;
21079 : }
21080 203143 : if ( bLocalUseExceptions ) {
21081 138672 : popErrorHandler();
21082 : }
21083 : #ifndef SED_HACKS
21084 : if ( bLocalUseExceptions ) {
21085 : CPLErr eclass = CPLGetLastErrorType();
21086 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21087 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21088 : }
21089 : }
21090 : #endif
21091 : }
21092 203143 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
21093 203145 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21094 : return resultobj;
21095 : fail:
21096 : return NULL;
21097 : }
21098 :
21099 :
21100 1728 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21101 1728 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21102 1728 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21103 1728 : char *arg2 = (char *) 0 ;
21104 1728 : void *argp1 = 0 ;
21105 1728 : int res1 = 0 ;
21106 1728 : int bToFree2 = 0 ;
21107 1728 : PyObject *swig_obj[2] ;
21108 1728 : int result;
21109 :
21110 1728 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetFieldIndex", 2, 2, swig_obj)) SWIG_fail;
21111 1728 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21112 1728 : if (!SWIG_IsOK(res1)) {
21113 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21114 : }
21115 1728 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21116 1728 : {
21117 : /* %typemap(in) (const char *utf8_path) */
21118 1728 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
21119 : {
21120 1728 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
21121 : }
21122 : else
21123 : {
21124 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
21125 :
21126 : }
21127 1728 : if (arg2 == NULL)
21128 : {
21129 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
21130 0 : SWIG_fail;
21131 : }
21132 : }
21133 1728 : {
21134 1728 : const int bLocalUseExceptions = GetUseExceptions();
21135 1728 : if ( bLocalUseExceptions ) {
21136 314 : pushErrorHandler();
21137 : }
21138 1728 : {
21139 1728 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21140 1728 : result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
21141 1728 : SWIG_PYTHON_THREAD_END_ALLOW;
21142 : }
21143 1728 : if ( bLocalUseExceptions ) {
21144 314 : popErrorHandler();
21145 : }
21146 : #ifndef SED_HACKS
21147 : if ( bLocalUseExceptions ) {
21148 : CPLErr eclass = CPLGetLastErrorType();
21149 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21150 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21151 : }
21152 : }
21153 : #endif
21154 : }
21155 1728 : resultobj = SWIG_From_int(static_cast< int >(result));
21156 1728 : {
21157 : /* %typemap(freearg) (const char *utf8_path) */
21158 1728 : GDALPythonFreeCStr(arg2, bToFree2);
21159 : }
21160 1728 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21161 : return resultobj;
21162 0 : fail:
21163 0 : {
21164 : /* %typemap(freearg) (const char *utf8_path) */
21165 1728 : GDALPythonFreeCStr(arg2, bToFree2);
21166 : }
21167 : return NULL;
21168 : }
21169 :
21170 :
21171 397 : SWIGINTERN PyObject *_wrap_FeatureDefn_AddFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21172 397 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21173 397 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21174 397 : OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
21175 397 : void *argp1 = 0 ;
21176 397 : int res1 = 0 ;
21177 397 : void *argp2 = 0 ;
21178 397 : int res2 = 0 ;
21179 397 : PyObject *swig_obj[2] ;
21180 :
21181 397 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_AddFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21182 397 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21183 397 : if (!SWIG_IsOK(res1)) {
21184 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21185 : }
21186 397 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21187 397 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
21188 397 : if (!SWIG_IsOK(res2)) {
21189 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'");
21190 : }
21191 397 : arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
21192 397 : {
21193 397 : if (!arg2) {
21194 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
21195 : }
21196 : }
21197 397 : {
21198 397 : const int bLocalUseExceptions = GetUseExceptions();
21199 397 : if ( bLocalUseExceptions ) {
21200 396 : pushErrorHandler();
21201 : }
21202 397 : {
21203 397 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21204 397 : OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
21205 397 : SWIG_PYTHON_THREAD_END_ALLOW;
21206 : }
21207 397 : if ( bLocalUseExceptions ) {
21208 396 : popErrorHandler();
21209 : }
21210 : #ifndef SED_HACKS
21211 : if ( bLocalUseExceptions ) {
21212 : CPLErr eclass = CPLGetLastErrorType();
21213 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21214 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21215 : }
21216 : }
21217 : #endif
21218 : }
21219 397 : resultobj = SWIG_Py_Void();
21220 398 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21221 : return resultobj;
21222 : fail:
21223 : return NULL;
21224 : }
21225 :
21226 :
21227 408 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21228 408 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21229 408 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21230 408 : void *argp1 = 0 ;
21231 408 : int res1 = 0 ;
21232 408 : PyObject *swig_obj[1] ;
21233 408 : int result;
21234 :
21235 408 : if (!args) SWIG_fail;
21236 408 : swig_obj[0] = args;
21237 408 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21238 408 : if (!SWIG_IsOK(res1)) {
21239 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21240 : }
21241 408 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21242 408 : {
21243 408 : const int bLocalUseExceptions = GetUseExceptions();
21244 408 : if ( bLocalUseExceptions ) {
21245 217 : pushErrorHandler();
21246 : }
21247 408 : {
21248 408 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21249 408 : result = (int)OGRFeatureDefnShadow_GetGeomFieldCount(arg1);
21250 408 : SWIG_PYTHON_THREAD_END_ALLOW;
21251 : }
21252 408 : if ( bLocalUseExceptions ) {
21253 217 : popErrorHandler();
21254 : }
21255 : #ifndef SED_HACKS
21256 : if ( bLocalUseExceptions ) {
21257 : CPLErr eclass = CPLGetLastErrorType();
21258 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21259 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21260 : }
21261 : }
21262 : #endif
21263 : }
21264 408 : resultobj = SWIG_From_int(static_cast< int >(result));
21265 408 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21266 : return resultobj;
21267 : fail:
21268 : return NULL;
21269 : }
21270 :
21271 :
21272 589 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21273 589 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21274 589 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21275 589 : int arg2 ;
21276 589 : void *argp1 = 0 ;
21277 589 : int res1 = 0 ;
21278 589 : int val2 ;
21279 589 : int ecode2 = 0 ;
21280 589 : PyObject *swig_obj[2] ;
21281 589 : OGRGeomFieldDefnShadow *result = 0 ;
21282 :
21283 589 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21284 589 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21285 589 : if (!SWIG_IsOK(res1)) {
21286 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21287 : }
21288 589 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21289 589 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21290 589 : if (!SWIG_IsOK(ecode2)) {
21291 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetGeomFieldDefn" "', argument " "2"" of type '" "int""'");
21292 : }
21293 589 : arg2 = static_cast< int >(val2);
21294 589 : {
21295 589 : const int bLocalUseExceptions = GetUseExceptions();
21296 589 : if ( bLocalUseExceptions ) {
21297 265 : pushErrorHandler();
21298 : }
21299 589 : {
21300 589 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21301 589 : result = (OGRGeomFieldDefnShadow *)OGRFeatureDefnShadow_GetGeomFieldDefn(arg1,arg2);
21302 589 : SWIG_PYTHON_THREAD_END_ALLOW;
21303 : }
21304 589 : if ( bLocalUseExceptions ) {
21305 265 : popErrorHandler();
21306 : }
21307 : #ifndef SED_HACKS
21308 : if ( bLocalUseExceptions ) {
21309 : CPLErr eclass = CPLGetLastErrorType();
21310 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21311 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21312 : }
21313 : }
21314 : #endif
21315 : }
21316 589 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
21317 589 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21318 : return resultobj;
21319 : fail:
21320 : return NULL;
21321 : }
21322 :
21323 :
21324 37 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21325 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21326 37 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21327 37 : char *arg2 = (char *) 0 ;
21328 37 : void *argp1 = 0 ;
21329 37 : int res1 = 0 ;
21330 37 : int bToFree2 = 0 ;
21331 37 : PyObject *swig_obj[2] ;
21332 37 : int result;
21333 :
21334 37 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetGeomFieldIndex", 2, 2, swig_obj)) SWIG_fail;
21335 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21336 37 : if (!SWIG_IsOK(res1)) {
21337 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21338 : }
21339 37 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21340 37 : {
21341 : /* %typemap(in) (const char *utf8_path) */
21342 37 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
21343 : {
21344 37 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
21345 : }
21346 : else
21347 : {
21348 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
21349 :
21350 : }
21351 37 : if (arg2 == NULL)
21352 : {
21353 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
21354 0 : SWIG_fail;
21355 : }
21356 : }
21357 37 : {
21358 37 : const int bLocalUseExceptions = GetUseExceptions();
21359 37 : if ( bLocalUseExceptions ) {
21360 0 : pushErrorHandler();
21361 : }
21362 37 : {
21363 37 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21364 37 : result = (int)OGRFeatureDefnShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
21365 37 : SWIG_PYTHON_THREAD_END_ALLOW;
21366 : }
21367 37 : if ( bLocalUseExceptions ) {
21368 0 : popErrorHandler();
21369 : }
21370 : #ifndef SED_HACKS
21371 : if ( bLocalUseExceptions ) {
21372 : CPLErr eclass = CPLGetLastErrorType();
21373 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21374 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21375 : }
21376 : }
21377 : #endif
21378 : }
21379 37 : resultobj = SWIG_From_int(static_cast< int >(result));
21380 37 : {
21381 : /* %typemap(freearg) (const char *utf8_path) */
21382 37 : GDALPythonFreeCStr(arg2, bToFree2);
21383 : }
21384 37 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21385 : return resultobj;
21386 0 : fail:
21387 0 : {
21388 : /* %typemap(freearg) (const char *utf8_path) */
21389 37 : GDALPythonFreeCStr(arg2, bToFree2);
21390 : }
21391 : return NULL;
21392 : }
21393 :
21394 :
21395 11 : SWIGINTERN PyObject *_wrap_FeatureDefn_AddGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21396 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21397 11 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21398 11 : OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
21399 11 : void *argp1 = 0 ;
21400 11 : int res1 = 0 ;
21401 11 : void *argp2 = 0 ;
21402 11 : int res2 = 0 ;
21403 11 : PyObject *swig_obj[2] ;
21404 :
21405 11 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_AddGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21406 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21407 11 : if (!SWIG_IsOK(res1)) {
21408 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21409 : }
21410 11 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21411 11 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
21412 11 : if (!SWIG_IsOK(res2)) {
21413 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddGeomFieldDefn" "', argument " "2"" of type '" "OGRGeomFieldDefnShadow *""'");
21414 : }
21415 11 : arg2 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp2);
21416 11 : {
21417 11 : if (!arg2) {
21418 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
21419 : }
21420 : }
21421 11 : {
21422 11 : const int bLocalUseExceptions = GetUseExceptions();
21423 11 : if ( bLocalUseExceptions ) {
21424 8 : pushErrorHandler();
21425 : }
21426 11 : {
21427 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21428 11 : OGRFeatureDefnShadow_AddGeomFieldDefn(arg1,arg2);
21429 11 : SWIG_PYTHON_THREAD_END_ALLOW;
21430 : }
21431 11 : if ( bLocalUseExceptions ) {
21432 8 : popErrorHandler();
21433 : }
21434 : #ifndef SED_HACKS
21435 : if ( bLocalUseExceptions ) {
21436 : CPLErr eclass = CPLGetLastErrorType();
21437 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21438 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21439 : }
21440 : }
21441 : #endif
21442 : }
21443 11 : resultobj = SWIG_Py_Void();
21444 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21445 : return resultobj;
21446 : fail:
21447 : return NULL;
21448 : }
21449 :
21450 :
21451 4 : SWIGINTERN PyObject *_wrap_FeatureDefn_DeleteGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21452 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21453 4 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21454 4 : int arg2 ;
21455 4 : void *argp1 = 0 ;
21456 4 : int res1 = 0 ;
21457 4 : int val2 ;
21458 4 : int ecode2 = 0 ;
21459 4 : PyObject *swig_obj[2] ;
21460 4 : OGRErr result;
21461 :
21462 4 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_DeleteGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21463 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21464 4 : if (!SWIG_IsOK(res1)) {
21465 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_DeleteGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21466 : }
21467 4 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21468 4 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21469 4 : if (!SWIG_IsOK(ecode2)) {
21470 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_DeleteGeomFieldDefn" "', argument " "2"" of type '" "int""'");
21471 : }
21472 4 : arg2 = static_cast< int >(val2);
21473 4 : {
21474 4 : const int bLocalUseExceptions = GetUseExceptions();
21475 4 : if ( bLocalUseExceptions ) {
21476 0 : pushErrorHandler();
21477 : }
21478 4 : {
21479 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21480 4 : result = (OGRErr)OGRFeatureDefnShadow_DeleteGeomFieldDefn(arg1,arg2);
21481 4 : SWIG_PYTHON_THREAD_END_ALLOW;
21482 : }
21483 4 : if ( bLocalUseExceptions ) {
21484 0 : popErrorHandler();
21485 : }
21486 : #ifndef SED_HACKS
21487 : if ( bLocalUseExceptions ) {
21488 : CPLErr eclass = CPLGetLastErrorType();
21489 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21490 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21491 : }
21492 : }
21493 : #endif
21494 : }
21495 4 : {
21496 : /* %typemap(out) OGRErr */
21497 6 : if ( result != 0 && GetUseExceptions()) {
21498 0 : const char* pszMessage = CPLGetLastErrorMsg();
21499 0 : if( pszMessage[0] != '\0' )
21500 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
21501 : else
21502 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
21503 0 : SWIG_fail;
21504 : }
21505 : }
21506 4 : {
21507 : /* %typemap(ret) OGRErr */
21508 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
21509 4 : resultobj = PyInt_FromLong( result );
21510 : }
21511 : }
21512 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21513 : return resultobj;
21514 : fail:
21515 : return NULL;
21516 : }
21517 :
21518 :
21519 82 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21520 82 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21521 82 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21522 82 : void *argp1 = 0 ;
21523 82 : int res1 = 0 ;
21524 82 : PyObject *swig_obj[1] ;
21525 82 : OGRwkbGeometryType result;
21526 :
21527 82 : if (!args) SWIG_fail;
21528 82 : swig_obj[0] = args;
21529 82 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21530 82 : if (!SWIG_IsOK(res1)) {
21531 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21532 : }
21533 82 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21534 82 : {
21535 82 : const int bLocalUseExceptions = GetUseExceptions();
21536 82 : if ( bLocalUseExceptions ) {
21537 27 : pushErrorHandler();
21538 : }
21539 82 : {
21540 82 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21541 82 : result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
21542 82 : SWIG_PYTHON_THREAD_END_ALLOW;
21543 : }
21544 82 : if ( bLocalUseExceptions ) {
21545 27 : popErrorHandler();
21546 : }
21547 : #ifndef SED_HACKS
21548 : if ( bLocalUseExceptions ) {
21549 : CPLErr eclass = CPLGetLastErrorType();
21550 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21551 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21552 : }
21553 : }
21554 : #endif
21555 : }
21556 82 : resultobj = SWIG_From_int(static_cast< int >(result));
21557 82 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21558 : return resultobj;
21559 : fail:
21560 : return NULL;
21561 : }
21562 :
21563 :
21564 12 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21565 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21566 12 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21567 12 : OGRwkbGeometryType arg2 ;
21568 12 : void *argp1 = 0 ;
21569 12 : int res1 = 0 ;
21570 12 : int val2 ;
21571 12 : int ecode2 = 0 ;
21572 12 : PyObject *swig_obj[2] ;
21573 :
21574 12 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetGeomType", 2, 2, swig_obj)) SWIG_fail;
21575 12 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21576 12 : if (!SWIG_IsOK(res1)) {
21577 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21578 : }
21579 12 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21580 12 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21581 12 : if (!SWIG_IsOK(ecode2)) {
21582 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeomType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
21583 : }
21584 12 : arg2 = static_cast< OGRwkbGeometryType >(val2);
21585 12 : {
21586 12 : const int bLocalUseExceptions = GetUseExceptions();
21587 12 : if ( bLocalUseExceptions ) {
21588 4 : pushErrorHandler();
21589 : }
21590 12 : {
21591 12 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21592 12 : OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
21593 12 : SWIG_PYTHON_THREAD_END_ALLOW;
21594 : }
21595 12 : if ( bLocalUseExceptions ) {
21596 4 : popErrorHandler();
21597 : }
21598 : #ifndef SED_HACKS
21599 : if ( bLocalUseExceptions ) {
21600 : CPLErr eclass = CPLGetLastErrorType();
21601 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21602 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21603 : }
21604 : }
21605 : #endif
21606 : }
21607 12 : resultobj = SWIG_Py_Void();
21608 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21609 : return resultobj;
21610 : fail:
21611 : return NULL;
21612 : }
21613 :
21614 :
21615 3 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetReferenceCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21616 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21617 3 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21618 3 : void *argp1 = 0 ;
21619 3 : int res1 = 0 ;
21620 3 : PyObject *swig_obj[1] ;
21621 3 : int result;
21622 :
21623 3 : if (!args) SWIG_fail;
21624 3 : swig_obj[0] = args;
21625 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21626 3 : if (!SWIG_IsOK(res1)) {
21627 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetReferenceCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21628 : }
21629 3 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21630 3 : {
21631 3 : const int bLocalUseExceptions = GetUseExceptions();
21632 3 : if ( bLocalUseExceptions ) {
21633 3 : pushErrorHandler();
21634 : }
21635 3 : {
21636 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21637 3 : result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
21638 3 : SWIG_PYTHON_THREAD_END_ALLOW;
21639 : }
21640 3 : if ( bLocalUseExceptions ) {
21641 3 : popErrorHandler();
21642 : }
21643 : #ifndef SED_HACKS
21644 : if ( bLocalUseExceptions ) {
21645 : CPLErr eclass = CPLGetLastErrorType();
21646 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21647 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21648 : }
21649 : }
21650 : #endif
21651 : }
21652 3 : resultobj = SWIG_From_int(static_cast< int >(result));
21653 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21654 : return resultobj;
21655 : fail:
21656 : return NULL;
21657 : }
21658 :
21659 :
21660 6 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21661 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21662 6 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21663 6 : void *argp1 = 0 ;
21664 6 : int res1 = 0 ;
21665 6 : PyObject *swig_obj[1] ;
21666 6 : int result;
21667 :
21668 6 : if (!args) SWIG_fail;
21669 6 : swig_obj[0] = args;
21670 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21671 6 : if (!SWIG_IsOK(res1)) {
21672 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21673 : }
21674 6 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21675 6 : {
21676 6 : const int bLocalUseExceptions = GetUseExceptions();
21677 6 : if ( bLocalUseExceptions ) {
21678 0 : pushErrorHandler();
21679 : }
21680 6 : {
21681 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21682 6 : result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
21683 6 : SWIG_PYTHON_THREAD_END_ALLOW;
21684 : }
21685 6 : if ( bLocalUseExceptions ) {
21686 0 : popErrorHandler();
21687 : }
21688 : #ifndef SED_HACKS
21689 : if ( bLocalUseExceptions ) {
21690 : CPLErr eclass = CPLGetLastErrorType();
21691 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21692 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21693 : }
21694 : }
21695 : #endif
21696 : }
21697 6 : resultobj = SWIG_From_int(static_cast< int >(result));
21698 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21699 : return resultobj;
21700 : fail:
21701 : return NULL;
21702 : }
21703 :
21704 :
21705 3 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21706 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21707 3 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21708 3 : int arg2 ;
21709 3 : void *argp1 = 0 ;
21710 3 : int res1 = 0 ;
21711 3 : int val2 ;
21712 3 : int ecode2 = 0 ;
21713 3 : PyObject *swig_obj[2] ;
21714 :
21715 3 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetGeometryIgnored", 2, 2, swig_obj)) SWIG_fail;
21716 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21717 3 : if (!SWIG_IsOK(res1)) {
21718 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21719 : }
21720 3 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21721 3 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21722 3 : if (!SWIG_IsOK(ecode2)) {
21723 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "2"" of type '" "int""'");
21724 : }
21725 3 : arg2 = static_cast< int >(val2);
21726 3 : {
21727 3 : const int bLocalUseExceptions = GetUseExceptions();
21728 3 : if ( bLocalUseExceptions ) {
21729 0 : pushErrorHandler();
21730 : }
21731 3 : {
21732 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21733 3 : OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
21734 3 : SWIG_PYTHON_THREAD_END_ALLOW;
21735 : }
21736 3 : if ( bLocalUseExceptions ) {
21737 0 : popErrorHandler();
21738 : }
21739 : #ifndef SED_HACKS
21740 : if ( bLocalUseExceptions ) {
21741 : CPLErr eclass = CPLGetLastErrorType();
21742 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21743 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21744 : }
21745 : }
21746 : #endif
21747 : }
21748 3 : resultobj = SWIG_Py_Void();
21749 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21750 : return resultobj;
21751 : fail:
21752 : return NULL;
21753 : }
21754 :
21755 :
21756 2 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21757 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21758 2 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21759 2 : void *argp1 = 0 ;
21760 2 : int res1 = 0 ;
21761 2 : PyObject *swig_obj[1] ;
21762 2 : int result;
21763 :
21764 2 : if (!args) SWIG_fail;
21765 2 : swig_obj[0] = args;
21766 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21767 2 : if (!SWIG_IsOK(res1)) {
21768 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21769 : }
21770 2 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21771 2 : {
21772 2 : const int bLocalUseExceptions = GetUseExceptions();
21773 2 : if ( bLocalUseExceptions ) {
21774 0 : pushErrorHandler();
21775 : }
21776 2 : {
21777 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21778 2 : result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
21779 2 : SWIG_PYTHON_THREAD_END_ALLOW;
21780 : }
21781 2 : if ( bLocalUseExceptions ) {
21782 0 : popErrorHandler();
21783 : }
21784 : #ifndef SED_HACKS
21785 : if ( bLocalUseExceptions ) {
21786 : CPLErr eclass = CPLGetLastErrorType();
21787 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21788 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21789 : }
21790 : }
21791 : #endif
21792 : }
21793 2 : resultobj = SWIG_From_int(static_cast< int >(result));
21794 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21795 : return resultobj;
21796 : fail:
21797 : return NULL;
21798 : }
21799 :
21800 :
21801 0 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21802 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21803 0 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21804 0 : int arg2 ;
21805 0 : void *argp1 = 0 ;
21806 0 : int res1 = 0 ;
21807 0 : int val2 ;
21808 0 : int ecode2 = 0 ;
21809 0 : PyObject *swig_obj[2] ;
21810 :
21811 0 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetStyleIgnored", 2, 2, swig_obj)) SWIG_fail;
21812 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21813 0 : if (!SWIG_IsOK(res1)) {
21814 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21815 : }
21816 0 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21817 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21818 0 : if (!SWIG_IsOK(ecode2)) {
21819 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "2"" of type '" "int""'");
21820 : }
21821 0 : arg2 = static_cast< int >(val2);
21822 0 : {
21823 0 : const int bLocalUseExceptions = GetUseExceptions();
21824 0 : if ( bLocalUseExceptions ) {
21825 0 : pushErrorHandler();
21826 : }
21827 0 : {
21828 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21829 0 : OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
21830 0 : SWIG_PYTHON_THREAD_END_ALLOW;
21831 : }
21832 0 : if ( bLocalUseExceptions ) {
21833 0 : popErrorHandler();
21834 : }
21835 : #ifndef SED_HACKS
21836 : if ( bLocalUseExceptions ) {
21837 : CPLErr eclass = CPLGetLastErrorType();
21838 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21839 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21840 : }
21841 : }
21842 : #endif
21843 : }
21844 0 : resultobj = SWIG_Py_Void();
21845 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21846 : return resultobj;
21847 : fail:
21848 : return NULL;
21849 : }
21850 :
21851 :
21852 11 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21853 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21854 11 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21855 11 : OGRFeatureDefnShadow *arg2 = (OGRFeatureDefnShadow *) 0 ;
21856 11 : void *argp1 = 0 ;
21857 11 : int res1 = 0 ;
21858 11 : void *argp2 = 0 ;
21859 11 : int res2 = 0 ;
21860 11 : PyObject *swig_obj[2] ;
21861 11 : int result;
21862 :
21863 11 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_IsSame", 2, 2, swig_obj)) SWIG_fail;
21864 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21865 11 : if (!SWIG_IsOK(res1)) {
21866 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsSame" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21867 : }
21868 11 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21869 11 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21870 11 : if (!SWIG_IsOK(res2)) {
21871 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_IsSame" "', argument " "2"" of type '" "OGRFeatureDefnShadow *""'");
21872 : }
21873 11 : arg2 = reinterpret_cast< OGRFeatureDefnShadow * >(argp2);
21874 11 : {
21875 11 : if (!arg2) {
21876 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
21877 : }
21878 : }
21879 11 : {
21880 11 : const int bLocalUseExceptions = GetUseExceptions();
21881 11 : if ( bLocalUseExceptions ) {
21882 4 : pushErrorHandler();
21883 : }
21884 11 : {
21885 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21886 11 : result = (int)OGRFeatureDefnShadow_IsSame(arg1,arg2);
21887 11 : SWIG_PYTHON_THREAD_END_ALLOW;
21888 : }
21889 11 : if ( bLocalUseExceptions ) {
21890 4 : popErrorHandler();
21891 : }
21892 : #ifndef SED_HACKS
21893 : if ( bLocalUseExceptions ) {
21894 : CPLErr eclass = CPLGetLastErrorType();
21895 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21896 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21897 : }
21898 : }
21899 : #endif
21900 : }
21901 11 : resultobj = SWIG_From_int(static_cast< int >(result));
21902 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21903 : return resultobj;
21904 : fail:
21905 : return NULL;
21906 : }
21907 :
21908 :
21909 277 : SWIGINTERN PyObject *FeatureDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21910 277 : PyObject *obj;
21911 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
21912 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_NewClientData(obj));
21913 277 : return SWIG_Py_Void();
21914 : }
21915 :
21916 110 : SWIGINTERN PyObject *FeatureDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21917 110 : return SWIG_Python_InitShadowInstance(args);
21918 : }
21919 :
21920 77668 : SWIGINTERN PyObject *_wrap_delete_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21921 77668 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21922 77668 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
21923 77668 : void *argp1 = 0 ;
21924 77668 : int res1 = 0 ;
21925 77668 : PyObject *swig_obj[1] ;
21926 :
21927 77668 : if (!args) SWIG_fail;
21928 77668 : swig_obj[0] = args;
21929 77668 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_DISOWN | 0 );
21930 77668 : if (!SWIG_IsOK(res1)) {
21931 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDefn" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
21932 : }
21933 77668 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
21934 77668 : {
21935 77668 : const int bLocalUseExceptions = GetUseExceptions();
21936 77668 : if ( bLocalUseExceptions ) {
21937 69815 : pushErrorHandler();
21938 : }
21939 77668 : {
21940 77668 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21941 77668 : delete_OGRFieldDefnShadow(arg1);
21942 77668 : SWIG_PYTHON_THREAD_END_ALLOW;
21943 : }
21944 77668 : if ( bLocalUseExceptions ) {
21945 69815 : popErrorHandler();
21946 : }
21947 : #ifndef SED_HACKS
21948 : if ( bLocalUseExceptions ) {
21949 : CPLErr eclass = CPLGetLastErrorType();
21950 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21951 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21952 : }
21953 : }
21954 : #endif
21955 : }
21956 77668 : resultobj = SWIG_Py_Void();
21957 77668 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
21958 : return resultobj;
21959 : fail:
21960 : return NULL;
21961 : }
21962 :
21963 :
21964 77681 : SWIGINTERN PyObject *_wrap_new_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
21965 77681 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21966 77681 : char *arg1 = (char *) "unnamed" ;
21967 77681 : OGRFieldType arg2 = (OGRFieldType) OFTString ;
21968 77681 : int res1 ;
21969 77681 : char *buf1 = 0 ;
21970 77681 : int alloc1 = 0 ;
21971 77681 : int val2 ;
21972 77681 : int ecode2 = 0 ;
21973 77681 : PyObject * obj0 = 0 ;
21974 77681 : PyObject * obj1 = 0 ;
21975 77681 : char * kwnames[] = {
21976 : (char *)"name_null_ok", (char *)"field_type", NULL
21977 : };
21978 77681 : OGRFieldDefnShadow *result = 0 ;
21979 :
21980 77681 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_FieldDefn", kwnames, &obj0, &obj1)) SWIG_fail;
21981 77681 : if (obj0) {
21982 77681 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
21983 77681 : if (!SWIG_IsOK(res1)) {
21984 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FieldDefn" "', argument " "1"" of type '" "char const *""'");
21985 : }
21986 77681 : arg1 = reinterpret_cast< char * >(buf1);
21987 : }
21988 77681 : if (obj1) {
21989 74961 : ecode2 = SWIG_AsVal_int(obj1, &val2);
21990 74961 : if (!SWIG_IsOK(ecode2)) {
21991 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FieldDefn" "', argument " "2"" of type '" "OGRFieldType""'");
21992 : }
21993 74961 : arg2 = static_cast< OGRFieldType >(val2);
21994 : }
21995 77681 : {
21996 77681 : const int bLocalUseExceptions = GetUseExceptions();
21997 77681 : if ( bLocalUseExceptions ) {
21998 69828 : pushErrorHandler();
21999 : }
22000 77681 : {
22001 77681 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22002 77681 : result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
22003 77681 : SWIG_PYTHON_THREAD_END_ALLOW;
22004 : }
22005 77681 : if ( bLocalUseExceptions ) {
22006 69828 : popErrorHandler();
22007 : }
22008 : #ifndef SED_HACKS
22009 : if ( bLocalUseExceptions ) {
22010 : CPLErr eclass = CPLGetLastErrorType();
22011 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22012 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22013 : }
22014 : }
22015 : #endif
22016 : }
22017 77681 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_NEW | 0 );
22018 77681 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
22019 77681 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22020 : return resultobj;
22021 0 : fail:
22022 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
22023 : return NULL;
22024 : }
22025 :
22026 :
22027 193560 : SWIGINTERN PyObject *_wrap_FieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22028 193560 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22029 193560 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22030 193560 : void *argp1 = 0 ;
22031 193560 : int res1 = 0 ;
22032 193560 : PyObject *swig_obj[1] ;
22033 193560 : char *result = 0 ;
22034 :
22035 193560 : if (!args) SWIG_fail;
22036 193560 : swig_obj[0] = args;
22037 193560 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22038 193560 : if (!SWIG_IsOK(res1)) {
22039 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22040 : }
22041 193560 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22042 193560 : {
22043 193560 : const int bLocalUseExceptions = GetUseExceptions();
22044 193560 : if ( bLocalUseExceptions ) {
22045 132248 : pushErrorHandler();
22046 : }
22047 193560 : {
22048 193560 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22049 193560 : result = (char *)OGRFieldDefnShadow_GetName(arg1);
22050 193560 : SWIG_PYTHON_THREAD_END_ALLOW;
22051 : }
22052 193560 : if ( bLocalUseExceptions ) {
22053 132248 : popErrorHandler();
22054 : }
22055 : #ifndef SED_HACKS
22056 : if ( bLocalUseExceptions ) {
22057 : CPLErr eclass = CPLGetLastErrorType();
22058 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22059 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22060 : }
22061 : }
22062 : #endif
22063 : }
22064 193560 : resultobj = SWIG_FromCharPtr((const char *)result);
22065 193560 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22066 : return resultobj;
22067 : fail:
22068 : return NULL;
22069 : }
22070 :
22071 :
22072 1537 : SWIGINTERN PyObject *_wrap_FieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22073 1537 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22074 1537 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22075 1537 : void *argp1 = 0 ;
22076 1537 : int res1 = 0 ;
22077 1537 : PyObject *swig_obj[1] ;
22078 1537 : char *result = 0 ;
22079 :
22080 1537 : if (!args) SWIG_fail;
22081 1537 : swig_obj[0] = args;
22082 1537 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22083 1537 : if (!SWIG_IsOK(res1)) {
22084 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22085 : }
22086 1537 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22087 1537 : {
22088 1537 : const int bLocalUseExceptions = GetUseExceptions();
22089 1537 : if ( bLocalUseExceptions ) {
22090 950 : pushErrorHandler();
22091 : }
22092 1537 : {
22093 1537 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22094 1537 : result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
22095 1537 : SWIG_PYTHON_THREAD_END_ALLOW;
22096 : }
22097 1537 : if ( bLocalUseExceptions ) {
22098 950 : popErrorHandler();
22099 : }
22100 : #ifndef SED_HACKS
22101 : if ( bLocalUseExceptions ) {
22102 : CPLErr eclass = CPLGetLastErrorType();
22103 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22104 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22105 : }
22106 : }
22107 : #endif
22108 : }
22109 1537 : resultobj = SWIG_FromCharPtr((const char *)result);
22110 1537 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22111 : return resultobj;
22112 : fail:
22113 : return NULL;
22114 : }
22115 :
22116 :
22117 2 : SWIGINTERN PyObject *_wrap_FieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22118 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22119 2 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22120 2 : char *arg2 = (char *) 0 ;
22121 2 : void *argp1 = 0 ;
22122 2 : int res1 = 0 ;
22123 2 : int res2 ;
22124 2 : char *buf2 = 0 ;
22125 2 : int alloc2 = 0 ;
22126 2 : PyObject *swig_obj[2] ;
22127 :
22128 2 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetName", 2, 2, swig_obj)) SWIG_fail;
22129 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22130 2 : if (!SWIG_IsOK(res1)) {
22131 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22132 : }
22133 2 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22134 2 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
22135 2 : if (!SWIG_IsOK(res2)) {
22136 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
22137 : }
22138 2 : arg2 = reinterpret_cast< char * >(buf2);
22139 2 : {
22140 2 : if (!arg2) {
22141 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
22142 : }
22143 : }
22144 2 : {
22145 2 : const int bLocalUseExceptions = GetUseExceptions();
22146 2 : if ( bLocalUseExceptions ) {
22147 0 : pushErrorHandler();
22148 : }
22149 2 : {
22150 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22151 2 : OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
22152 2 : SWIG_PYTHON_THREAD_END_ALLOW;
22153 : }
22154 2 : if ( bLocalUseExceptions ) {
22155 0 : popErrorHandler();
22156 : }
22157 : #ifndef SED_HACKS
22158 : if ( bLocalUseExceptions ) {
22159 : CPLErr eclass = CPLGetLastErrorType();
22160 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22161 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22162 : }
22163 : }
22164 : #endif
22165 : }
22166 2 : resultobj = SWIG_Py_Void();
22167 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
22168 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22169 : return resultobj;
22170 0 : fail:
22171 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
22172 : return NULL;
22173 : }
22174 :
22175 :
22176 47 : SWIGINTERN PyObject *_wrap_FieldDefn_GetAlternativeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22177 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22178 47 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22179 47 : void *argp1 = 0 ;
22180 47 : int res1 = 0 ;
22181 47 : PyObject *swig_obj[1] ;
22182 47 : char *result = 0 ;
22183 :
22184 47 : if (!args) SWIG_fail;
22185 47 : swig_obj[0] = args;
22186 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22187 47 : if (!SWIG_IsOK(res1)) {
22188 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetAlternativeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22189 : }
22190 47 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22191 47 : {
22192 47 : const int bLocalUseExceptions = GetUseExceptions();
22193 47 : if ( bLocalUseExceptions ) {
22194 18 : pushErrorHandler();
22195 : }
22196 47 : {
22197 47 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22198 47 : result = (char *)OGRFieldDefnShadow_GetAlternativeName(arg1);
22199 47 : SWIG_PYTHON_THREAD_END_ALLOW;
22200 : }
22201 47 : if ( bLocalUseExceptions ) {
22202 18 : popErrorHandler();
22203 : }
22204 : #ifndef SED_HACKS
22205 : if ( bLocalUseExceptions ) {
22206 : CPLErr eclass = CPLGetLastErrorType();
22207 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22208 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22209 : }
22210 : }
22211 : #endif
22212 : }
22213 47 : resultobj = SWIG_FromCharPtr((const char *)result);
22214 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22215 : return resultobj;
22216 : fail:
22217 : return NULL;
22218 : }
22219 :
22220 :
22221 9 : SWIGINTERN PyObject *_wrap_FieldDefn_GetAlternativeNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22222 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22223 9 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22224 9 : void *argp1 = 0 ;
22225 9 : int res1 = 0 ;
22226 9 : PyObject *swig_obj[1] ;
22227 9 : char *result = 0 ;
22228 :
22229 9 : if (!args) SWIG_fail;
22230 9 : swig_obj[0] = args;
22231 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22232 9 : if (!SWIG_IsOK(res1)) {
22233 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetAlternativeNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22234 : }
22235 9 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22236 9 : {
22237 9 : const int bLocalUseExceptions = GetUseExceptions();
22238 9 : if ( bLocalUseExceptions ) {
22239 9 : pushErrorHandler();
22240 : }
22241 9 : {
22242 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22243 9 : result = (char *)OGRFieldDefnShadow_GetAlternativeNameRef(arg1);
22244 9 : SWIG_PYTHON_THREAD_END_ALLOW;
22245 : }
22246 9 : if ( bLocalUseExceptions ) {
22247 9 : popErrorHandler();
22248 : }
22249 : #ifndef SED_HACKS
22250 : if ( bLocalUseExceptions ) {
22251 : CPLErr eclass = CPLGetLastErrorType();
22252 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22253 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22254 : }
22255 : }
22256 : #endif
22257 : }
22258 9 : resultobj = SWIG_FromCharPtr((const char *)result);
22259 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22260 : return resultobj;
22261 : fail:
22262 : return NULL;
22263 : }
22264 :
22265 :
22266 17 : SWIGINTERN PyObject *_wrap_FieldDefn_SetAlternativeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22267 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22268 17 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22269 17 : char *arg2 = (char *) 0 ;
22270 17 : void *argp1 = 0 ;
22271 17 : int res1 = 0 ;
22272 17 : int res2 ;
22273 17 : char *buf2 = 0 ;
22274 17 : int alloc2 = 0 ;
22275 17 : PyObject *swig_obj[2] ;
22276 :
22277 17 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetAlternativeName", 2, 2, swig_obj)) SWIG_fail;
22278 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22279 17 : if (!SWIG_IsOK(res1)) {
22280 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetAlternativeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22281 : }
22282 17 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22283 17 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
22284 17 : if (!SWIG_IsOK(res2)) {
22285 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetAlternativeName" "', argument " "2"" of type '" "char const *""'");
22286 : }
22287 17 : arg2 = reinterpret_cast< char * >(buf2);
22288 17 : {
22289 17 : const int bLocalUseExceptions = GetUseExceptions();
22290 17 : if ( bLocalUseExceptions ) {
22291 6 : pushErrorHandler();
22292 : }
22293 17 : {
22294 17 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22295 17 : OGRFieldDefnShadow_SetAlternativeName(arg1,(char const *)arg2);
22296 17 : SWIG_PYTHON_THREAD_END_ALLOW;
22297 : }
22298 17 : if ( bLocalUseExceptions ) {
22299 6 : popErrorHandler();
22300 : }
22301 : #ifndef SED_HACKS
22302 : if ( bLocalUseExceptions ) {
22303 : CPLErr eclass = CPLGetLastErrorType();
22304 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22305 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22306 : }
22307 : }
22308 : #endif
22309 : }
22310 17 : resultobj = SWIG_Py_Void();
22311 17 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
22312 17 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22313 : return resultobj;
22314 0 : fail:
22315 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
22316 : return NULL;
22317 : }
22318 :
22319 :
22320 4226 : SWIGINTERN PyObject *_wrap_FieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22321 4226 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22322 4226 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22323 4226 : void *argp1 = 0 ;
22324 4226 : int res1 = 0 ;
22325 4226 : PyObject *swig_obj[1] ;
22326 4226 : OGRFieldType result;
22327 :
22328 4226 : if (!args) SWIG_fail;
22329 4226 : swig_obj[0] = args;
22330 4226 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22331 4226 : if (!SWIG_IsOK(res1)) {
22332 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22333 : }
22334 4226 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22335 4226 : {
22336 4226 : const int bLocalUseExceptions = GetUseExceptions();
22337 4226 : if ( bLocalUseExceptions ) {
22338 2775 : pushErrorHandler();
22339 : }
22340 4226 : {
22341 4226 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22342 4226 : result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
22343 4226 : SWIG_PYTHON_THREAD_END_ALLOW;
22344 : }
22345 4226 : if ( bLocalUseExceptions ) {
22346 2775 : popErrorHandler();
22347 : }
22348 : #ifndef SED_HACKS
22349 : if ( bLocalUseExceptions ) {
22350 : CPLErr eclass = CPLGetLastErrorType();
22351 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22352 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22353 : }
22354 : }
22355 : #endif
22356 : }
22357 4226 : resultobj = SWIG_From_int(static_cast< int >(result));
22358 4226 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22359 : return resultobj;
22360 : fail:
22361 : return NULL;
22362 : }
22363 :
22364 :
22365 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22366 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22367 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22368 0 : OGRFieldType arg2 ;
22369 0 : void *argp1 = 0 ;
22370 0 : int res1 = 0 ;
22371 0 : int val2 ;
22372 0 : int ecode2 = 0 ;
22373 0 : PyObject *swig_obj[2] ;
22374 :
22375 0 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetType", 2, 2, swig_obj)) SWIG_fail;
22376 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22377 0 : if (!SWIG_IsOK(res1)) {
22378 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22379 : }
22380 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22381 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22382 0 : if (!SWIG_IsOK(ecode2)) {
22383 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetType" "', argument " "2"" of type '" "OGRFieldType""'");
22384 : }
22385 0 : arg2 = static_cast< OGRFieldType >(val2);
22386 0 : {
22387 0 : const int bLocalUseExceptions = GetUseExceptions();
22388 0 : if ( bLocalUseExceptions ) {
22389 0 : pushErrorHandler();
22390 : }
22391 0 : {
22392 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22393 0 : OGRFieldDefnShadow_SetType(arg1,arg2);
22394 0 : SWIG_PYTHON_THREAD_END_ALLOW;
22395 : }
22396 0 : if ( bLocalUseExceptions ) {
22397 0 : popErrorHandler();
22398 : }
22399 : #ifndef SED_HACKS
22400 : if ( bLocalUseExceptions ) {
22401 : CPLErr eclass = CPLGetLastErrorType();
22402 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22403 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22404 : }
22405 : }
22406 : #endif
22407 : }
22408 0 : resultobj = SWIG_Py_Void();
22409 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22410 : return resultobj;
22411 : fail:
22412 : return NULL;
22413 : }
22414 :
22415 :
22416 88540 : SWIGINTERN PyObject *_wrap_FieldDefn_GetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22417 88540 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22418 88540 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22419 88540 : void *argp1 = 0 ;
22420 88540 : int res1 = 0 ;
22421 88540 : PyObject *swig_obj[1] ;
22422 88540 : OGRFieldSubType result;
22423 :
22424 88540 : if (!args) SWIG_fail;
22425 88540 : swig_obj[0] = args;
22426 88540 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22427 88540 : if (!SWIG_IsOK(res1)) {
22428 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetSubType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22429 : }
22430 88540 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22431 88540 : {
22432 88540 : const int bLocalUseExceptions = GetUseExceptions();
22433 88540 : if ( bLocalUseExceptions ) {
22434 81792 : pushErrorHandler();
22435 : }
22436 88540 : {
22437 88540 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22438 88540 : result = (OGRFieldSubType)OGRFieldDefnShadow_GetSubType(arg1);
22439 88540 : SWIG_PYTHON_THREAD_END_ALLOW;
22440 : }
22441 88540 : if ( bLocalUseExceptions ) {
22442 81792 : popErrorHandler();
22443 : }
22444 : #ifndef SED_HACKS
22445 : if ( bLocalUseExceptions ) {
22446 : CPLErr eclass = CPLGetLastErrorType();
22447 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22448 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22449 : }
22450 : }
22451 : #endif
22452 : }
22453 88540 : resultobj = SWIG_From_int(static_cast< int >(result));
22454 88540 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22455 : return resultobj;
22456 : fail:
22457 : return NULL;
22458 : }
22459 :
22460 :
22461 420 : SWIGINTERN PyObject *_wrap_FieldDefn_SetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22462 420 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22463 420 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22464 420 : OGRFieldSubType arg2 ;
22465 420 : void *argp1 = 0 ;
22466 420 : int res1 = 0 ;
22467 420 : int val2 ;
22468 420 : int ecode2 = 0 ;
22469 420 : PyObject *swig_obj[2] ;
22470 :
22471 420 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetSubType", 2, 2, swig_obj)) SWIG_fail;
22472 420 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22473 420 : if (!SWIG_IsOK(res1)) {
22474 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetSubType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22475 : }
22476 420 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22477 420 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22478 420 : if (!SWIG_IsOK(ecode2)) {
22479 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetSubType" "', argument " "2"" of type '" "OGRFieldSubType""'");
22480 : }
22481 420 : arg2 = static_cast< OGRFieldSubType >(val2);
22482 420 : {
22483 420 : const int bLocalUseExceptions = GetUseExceptions();
22484 420 : if ( bLocalUseExceptions ) {
22485 151 : pushErrorHandler();
22486 : }
22487 420 : {
22488 420 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22489 420 : OGRFieldDefnShadow_SetSubType(arg1,arg2);
22490 420 : SWIG_PYTHON_THREAD_END_ALLOW;
22491 : }
22492 420 : if ( bLocalUseExceptions ) {
22493 151 : popErrorHandler();
22494 : }
22495 : #ifndef SED_HACKS
22496 : if ( bLocalUseExceptions ) {
22497 : CPLErr eclass = CPLGetLastErrorType();
22498 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22499 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22500 : }
22501 : }
22502 : #endif
22503 : }
22504 420 : resultobj = SWIG_Py_Void();
22505 420 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22506 : return resultobj;
22507 : fail:
22508 : return NULL;
22509 : }
22510 :
22511 :
22512 0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22513 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22514 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22515 0 : void *argp1 = 0 ;
22516 0 : int res1 = 0 ;
22517 0 : PyObject *swig_obj[1] ;
22518 0 : OGRJustification result;
22519 :
22520 0 : if (!args) SWIG_fail;
22521 0 : swig_obj[0] = args;
22522 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22523 0 : if (!SWIG_IsOK(res1)) {
22524 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22525 : }
22526 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22527 0 : {
22528 0 : const int bLocalUseExceptions = GetUseExceptions();
22529 0 : if ( bLocalUseExceptions ) {
22530 0 : pushErrorHandler();
22531 : }
22532 0 : {
22533 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22534 0 : result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
22535 0 : SWIG_PYTHON_THREAD_END_ALLOW;
22536 : }
22537 0 : if ( bLocalUseExceptions ) {
22538 0 : popErrorHandler();
22539 : }
22540 : #ifndef SED_HACKS
22541 : if ( bLocalUseExceptions ) {
22542 : CPLErr eclass = CPLGetLastErrorType();
22543 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22544 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22545 : }
22546 : }
22547 : #endif
22548 : }
22549 0 : resultobj = SWIG_From_int(static_cast< int >(result));
22550 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22551 : return resultobj;
22552 : fail:
22553 : return NULL;
22554 : }
22555 :
22556 :
22557 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22558 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22559 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22560 0 : OGRJustification arg2 ;
22561 0 : void *argp1 = 0 ;
22562 0 : int res1 = 0 ;
22563 0 : int val2 ;
22564 0 : int ecode2 = 0 ;
22565 0 : PyObject *swig_obj[2] ;
22566 :
22567 0 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetJustify", 2, 2, swig_obj)) SWIG_fail;
22568 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22569 0 : if (!SWIG_IsOK(res1)) {
22570 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22571 : }
22572 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22573 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22574 0 : if (!SWIG_IsOK(ecode2)) {
22575 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetJustify" "', argument " "2"" of type '" "OGRJustification""'");
22576 : }
22577 0 : arg2 = static_cast< OGRJustification >(val2);
22578 0 : {
22579 0 : const int bLocalUseExceptions = GetUseExceptions();
22580 0 : if ( bLocalUseExceptions ) {
22581 0 : pushErrorHandler();
22582 : }
22583 0 : {
22584 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22585 0 : OGRFieldDefnShadow_SetJustify(arg1,arg2);
22586 0 : SWIG_PYTHON_THREAD_END_ALLOW;
22587 : }
22588 0 : if ( bLocalUseExceptions ) {
22589 0 : popErrorHandler();
22590 : }
22591 : #ifndef SED_HACKS
22592 : if ( bLocalUseExceptions ) {
22593 : CPLErr eclass = CPLGetLastErrorType();
22594 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22595 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22596 : }
22597 : }
22598 : #endif
22599 : }
22600 0 : resultobj = SWIG_Py_Void();
22601 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22602 : return resultobj;
22603 : fail:
22604 : return NULL;
22605 : }
22606 :
22607 :
22608 2732 : SWIGINTERN PyObject *_wrap_FieldDefn_GetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22609 2732 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22610 2732 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22611 2732 : void *argp1 = 0 ;
22612 2732 : int res1 = 0 ;
22613 2732 : PyObject *swig_obj[1] ;
22614 2732 : int result;
22615 :
22616 2732 : if (!args) SWIG_fail;
22617 2732 : swig_obj[0] = args;
22618 2732 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22619 2732 : if (!SWIG_IsOK(res1)) {
22620 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22621 : }
22622 2732 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22623 2732 : {
22624 2732 : const int bLocalUseExceptions = GetUseExceptions();
22625 2732 : if ( bLocalUseExceptions ) {
22626 1492 : pushErrorHandler();
22627 : }
22628 2732 : {
22629 2732 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22630 2732 : result = (int)OGRFieldDefnShadow_GetWidth(arg1);
22631 2732 : SWIG_PYTHON_THREAD_END_ALLOW;
22632 : }
22633 2732 : if ( bLocalUseExceptions ) {
22634 1492 : popErrorHandler();
22635 : }
22636 : #ifndef SED_HACKS
22637 : if ( bLocalUseExceptions ) {
22638 : CPLErr eclass = CPLGetLastErrorType();
22639 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22640 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22641 : }
22642 : }
22643 : #endif
22644 : }
22645 2732 : resultobj = SWIG_From_int(static_cast< int >(result));
22646 2732 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22647 : return resultobj;
22648 : fail:
22649 : return NULL;
22650 : }
22651 :
22652 :
22653 323 : SWIGINTERN PyObject *_wrap_FieldDefn_SetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22654 323 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22655 323 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22656 323 : int arg2 ;
22657 323 : void *argp1 = 0 ;
22658 323 : int res1 = 0 ;
22659 323 : int val2 ;
22660 323 : int ecode2 = 0 ;
22661 323 : PyObject *swig_obj[2] ;
22662 :
22663 323 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetWidth", 2, 2, swig_obj)) SWIG_fail;
22664 323 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22665 323 : if (!SWIG_IsOK(res1)) {
22666 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22667 : }
22668 323 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22669 323 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22670 323 : if (!SWIG_IsOK(ecode2)) {
22671 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetWidth" "', argument " "2"" of type '" "int""'");
22672 : }
22673 323 : arg2 = static_cast< int >(val2);
22674 323 : {
22675 323 : const int bLocalUseExceptions = GetUseExceptions();
22676 323 : if ( bLocalUseExceptions ) {
22677 70 : pushErrorHandler();
22678 : }
22679 323 : {
22680 323 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22681 323 : OGRFieldDefnShadow_SetWidth(arg1,arg2);
22682 323 : SWIG_PYTHON_THREAD_END_ALLOW;
22683 : }
22684 323 : if ( bLocalUseExceptions ) {
22685 70 : popErrorHandler();
22686 : }
22687 : #ifndef SED_HACKS
22688 : if ( bLocalUseExceptions ) {
22689 : CPLErr eclass = CPLGetLastErrorType();
22690 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22691 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22692 : }
22693 : }
22694 : #endif
22695 : }
22696 323 : resultobj = SWIG_Py_Void();
22697 323 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22698 : return resultobj;
22699 : fail:
22700 : return NULL;
22701 : }
22702 :
22703 :
22704 1608 : SWIGINTERN PyObject *_wrap_FieldDefn_GetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22705 1608 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22706 1608 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22707 1608 : void *argp1 = 0 ;
22708 1608 : int res1 = 0 ;
22709 1608 : PyObject *swig_obj[1] ;
22710 1608 : int result;
22711 :
22712 1608 : if (!args) SWIG_fail;
22713 1608 : swig_obj[0] = args;
22714 1608 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22715 1608 : if (!SWIG_IsOK(res1)) {
22716 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22717 : }
22718 1608 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22719 1608 : {
22720 1608 : const int bLocalUseExceptions = GetUseExceptions();
22721 1608 : if ( bLocalUseExceptions ) {
22722 1480 : pushErrorHandler();
22723 : }
22724 1608 : {
22725 1608 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22726 1608 : result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
22727 1608 : SWIG_PYTHON_THREAD_END_ALLOW;
22728 : }
22729 1608 : if ( bLocalUseExceptions ) {
22730 1480 : popErrorHandler();
22731 : }
22732 : #ifndef SED_HACKS
22733 : if ( bLocalUseExceptions ) {
22734 : CPLErr eclass = CPLGetLastErrorType();
22735 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22736 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22737 : }
22738 : }
22739 : #endif
22740 : }
22741 1608 : resultobj = SWIG_From_int(static_cast< int >(result));
22742 1608 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22743 : return resultobj;
22744 : fail:
22745 : return NULL;
22746 : }
22747 :
22748 :
22749 24 : SWIGINTERN PyObject *_wrap_FieldDefn_SetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22750 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22751 24 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22752 24 : int arg2 ;
22753 24 : void *argp1 = 0 ;
22754 24 : int res1 = 0 ;
22755 24 : int val2 ;
22756 24 : int ecode2 = 0 ;
22757 24 : PyObject *swig_obj[2] ;
22758 :
22759 24 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetPrecision", 2, 2, swig_obj)) SWIG_fail;
22760 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22761 24 : if (!SWIG_IsOK(res1)) {
22762 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22763 : }
22764 24 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22765 24 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22766 24 : if (!SWIG_IsOK(ecode2)) {
22767 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetPrecision" "', argument " "2"" of type '" "int""'");
22768 : }
22769 24 : arg2 = static_cast< int >(val2);
22770 24 : {
22771 24 : const int bLocalUseExceptions = GetUseExceptions();
22772 24 : if ( bLocalUseExceptions ) {
22773 13 : pushErrorHandler();
22774 : }
22775 24 : {
22776 24 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22777 24 : OGRFieldDefnShadow_SetPrecision(arg1,arg2);
22778 24 : SWIG_PYTHON_THREAD_END_ALLOW;
22779 : }
22780 24 : if ( bLocalUseExceptions ) {
22781 13 : popErrorHandler();
22782 : }
22783 : #ifndef SED_HACKS
22784 : if ( bLocalUseExceptions ) {
22785 : CPLErr eclass = CPLGetLastErrorType();
22786 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22787 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22788 : }
22789 : }
22790 : #endif
22791 : }
22792 24 : resultobj = SWIG_Py_Void();
22793 24 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22794 : return resultobj;
22795 : fail:
22796 : return NULL;
22797 : }
22798 :
22799 :
22800 0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetTZFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22801 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22802 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22803 0 : void *argp1 = 0 ;
22804 0 : int res1 = 0 ;
22805 0 : PyObject *swig_obj[1] ;
22806 0 : int result;
22807 :
22808 0 : if (!args) SWIG_fail;
22809 0 : swig_obj[0] = args;
22810 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22811 0 : if (!SWIG_IsOK(res1)) {
22812 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTZFlag" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22813 : }
22814 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22815 0 : {
22816 0 : const int bLocalUseExceptions = GetUseExceptions();
22817 0 : if ( bLocalUseExceptions ) {
22818 0 : pushErrorHandler();
22819 : }
22820 0 : {
22821 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22822 0 : result = (int)OGRFieldDefnShadow_GetTZFlag(arg1);
22823 0 : SWIG_PYTHON_THREAD_END_ALLOW;
22824 : }
22825 0 : if ( bLocalUseExceptions ) {
22826 0 : popErrorHandler();
22827 : }
22828 : #ifndef SED_HACKS
22829 : if ( bLocalUseExceptions ) {
22830 : CPLErr eclass = CPLGetLastErrorType();
22831 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22832 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22833 : }
22834 : }
22835 : #endif
22836 : }
22837 0 : resultobj = SWIG_From_int(static_cast< int >(result));
22838 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22839 : return resultobj;
22840 : fail:
22841 : return NULL;
22842 : }
22843 :
22844 :
22845 6 : SWIGINTERN PyObject *_wrap_FieldDefn_SetTZFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22846 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22847 6 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22848 6 : int arg2 ;
22849 6 : void *argp1 = 0 ;
22850 6 : int res1 = 0 ;
22851 6 : int val2 ;
22852 6 : int ecode2 = 0 ;
22853 6 : PyObject *swig_obj[2] ;
22854 :
22855 6 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetTZFlag", 2, 2, swig_obj)) SWIG_fail;
22856 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22857 6 : if (!SWIG_IsOK(res1)) {
22858 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetTZFlag" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22859 : }
22860 6 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22861 6 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22862 6 : if (!SWIG_IsOK(ecode2)) {
22863 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetTZFlag" "', argument " "2"" of type '" "int""'");
22864 : }
22865 6 : arg2 = static_cast< int >(val2);
22866 6 : {
22867 6 : const int bLocalUseExceptions = GetUseExceptions();
22868 6 : if ( bLocalUseExceptions ) {
22869 6 : pushErrorHandler();
22870 : }
22871 6 : {
22872 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22873 6 : OGRFieldDefnShadow_SetTZFlag(arg1,arg2);
22874 6 : SWIG_PYTHON_THREAD_END_ALLOW;
22875 : }
22876 6 : if ( bLocalUseExceptions ) {
22877 6 : popErrorHandler();
22878 : }
22879 : #ifndef SED_HACKS
22880 : if ( bLocalUseExceptions ) {
22881 : CPLErr eclass = CPLGetLastErrorType();
22882 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22883 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22884 : }
22885 : }
22886 : #endif
22887 : }
22888 6 : resultobj = SWIG_Py_Void();
22889 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22890 : return resultobj;
22891 : fail:
22892 : return NULL;
22893 : }
22894 :
22895 :
22896 13 : SWIGINTERN PyObject *_wrap_FieldDefn_GetTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22897 13 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22898 13 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22899 13 : void *argp1 = 0 ;
22900 13 : int res1 = 0 ;
22901 13 : PyObject *swig_obj[1] ;
22902 13 : char *result = 0 ;
22903 :
22904 13 : if (!args) SWIG_fail;
22905 13 : swig_obj[0] = args;
22906 13 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22907 13 : if (!SWIG_IsOK(res1)) {
22908 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22909 : }
22910 13 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22911 13 : {
22912 13 : const int bLocalUseExceptions = GetUseExceptions();
22913 13 : if ( bLocalUseExceptions ) {
22914 13 : pushErrorHandler();
22915 : }
22916 13 : {
22917 13 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22918 13 : result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
22919 13 : SWIG_PYTHON_THREAD_END_ALLOW;
22920 : }
22921 13 : if ( bLocalUseExceptions ) {
22922 13 : popErrorHandler();
22923 : }
22924 : #ifndef SED_HACKS
22925 : if ( bLocalUseExceptions ) {
22926 : CPLErr eclass = CPLGetLastErrorType();
22927 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22928 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22929 : }
22930 : }
22931 : #endif
22932 : }
22933 13 : resultobj = SWIG_FromCharPtr((const char *)result);
22934 13 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22935 : return resultobj;
22936 : fail:
22937 : return NULL;
22938 : }
22939 :
22940 :
22941 36 : SWIGINTERN PyObject *_wrap_FieldDefn_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22942 36 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22943 36 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22944 36 : OGRFieldType arg2 ;
22945 36 : void *argp1 = 0 ;
22946 36 : int res1 = 0 ;
22947 36 : int val2 ;
22948 36 : int ecode2 = 0 ;
22949 36 : PyObject *swig_obj[2] ;
22950 36 : char *result = 0 ;
22951 :
22952 36 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_GetFieldTypeName", 2, 2, swig_obj)) SWIG_fail;
22953 36 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22954 36 : if (!SWIG_IsOK(res1)) {
22955 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22956 : }
22957 36 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22958 36 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22959 36 : if (!SWIG_IsOK(ecode2)) {
22960 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "2"" of type '" "OGRFieldType""'");
22961 : }
22962 36 : arg2 = static_cast< OGRFieldType >(val2);
22963 36 : {
22964 36 : const int bLocalUseExceptions = GetUseExceptions();
22965 36 : if ( bLocalUseExceptions ) {
22966 0 : pushErrorHandler();
22967 : }
22968 36 : {
22969 36 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22970 36 : result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
22971 36 : SWIG_PYTHON_THREAD_END_ALLOW;
22972 : }
22973 36 : if ( bLocalUseExceptions ) {
22974 0 : popErrorHandler();
22975 : }
22976 : #ifndef SED_HACKS
22977 : if ( bLocalUseExceptions ) {
22978 : CPLErr eclass = CPLGetLastErrorType();
22979 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22980 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22981 : }
22982 : }
22983 : #endif
22984 : }
22985 36 : resultobj = SWIG_FromCharPtr((const char *)result);
22986 36 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
22987 : return resultobj;
22988 : fail:
22989 : return NULL;
22990 : }
22991 :
22992 :
22993 6 : SWIGINTERN PyObject *_wrap_FieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22994 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22995 6 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22996 6 : void *argp1 = 0 ;
22997 6 : int res1 = 0 ;
22998 6 : PyObject *swig_obj[1] ;
22999 6 : int result;
23000 :
23001 6 : if (!args) SWIG_fail;
23002 6 : swig_obj[0] = args;
23003 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23004 6 : if (!SWIG_IsOK(res1)) {
23005 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23006 : }
23007 6 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23008 6 : {
23009 6 : const int bLocalUseExceptions = GetUseExceptions();
23010 6 : if ( bLocalUseExceptions ) {
23011 2 : pushErrorHandler();
23012 : }
23013 6 : {
23014 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23015 6 : result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
23016 6 : SWIG_PYTHON_THREAD_END_ALLOW;
23017 : }
23018 6 : if ( bLocalUseExceptions ) {
23019 2 : popErrorHandler();
23020 : }
23021 : #ifndef SED_HACKS
23022 : if ( bLocalUseExceptions ) {
23023 : CPLErr eclass = CPLGetLastErrorType();
23024 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23025 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23026 : }
23027 : }
23028 : #endif
23029 : }
23030 6 : resultobj = SWIG_From_int(static_cast< int >(result));
23031 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23032 : return resultobj;
23033 : fail:
23034 : return NULL;
23035 : }
23036 :
23037 :
23038 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23039 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23040 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23041 0 : int arg2 ;
23042 0 : void *argp1 = 0 ;
23043 0 : int res1 = 0 ;
23044 0 : int val2 ;
23045 0 : int ecode2 = 0 ;
23046 0 : PyObject *swig_obj[2] ;
23047 :
23048 0 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetIgnored", 2, 2, swig_obj)) SWIG_fail;
23049 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23050 0 : if (!SWIG_IsOK(res1)) {
23051 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23052 : }
23053 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23054 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
23055 0 : if (!SWIG_IsOK(ecode2)) {
23056 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
23057 : }
23058 0 : arg2 = static_cast< int >(val2);
23059 0 : {
23060 0 : const int bLocalUseExceptions = GetUseExceptions();
23061 0 : if ( bLocalUseExceptions ) {
23062 0 : pushErrorHandler();
23063 : }
23064 0 : {
23065 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23066 0 : OGRFieldDefnShadow_SetIgnored(arg1,arg2);
23067 0 : SWIG_PYTHON_THREAD_END_ALLOW;
23068 : }
23069 0 : if ( bLocalUseExceptions ) {
23070 0 : popErrorHandler();
23071 : }
23072 : #ifndef SED_HACKS
23073 : if ( bLocalUseExceptions ) {
23074 : CPLErr eclass = CPLGetLastErrorType();
23075 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23076 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23077 : }
23078 : }
23079 : #endif
23080 : }
23081 0 : resultobj = SWIG_Py_Void();
23082 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23083 : return resultobj;
23084 : fail:
23085 : return NULL;
23086 : }
23087 :
23088 :
23089 80 : SWIGINTERN PyObject *_wrap_FieldDefn_IsNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23090 80 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23091 80 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23092 80 : void *argp1 = 0 ;
23093 80 : int res1 = 0 ;
23094 80 : PyObject *swig_obj[1] ;
23095 80 : int result;
23096 :
23097 80 : if (!args) SWIG_fail;
23098 80 : swig_obj[0] = args;
23099 80 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23100 80 : if (!SWIG_IsOK(res1)) {
23101 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsNullable" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23102 : }
23103 80 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23104 80 : {
23105 80 : const int bLocalUseExceptions = GetUseExceptions();
23106 80 : if ( bLocalUseExceptions ) {
23107 45 : pushErrorHandler();
23108 : }
23109 80 : {
23110 80 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23111 80 : result = (int)OGRFieldDefnShadow_IsNullable(arg1);
23112 80 : SWIG_PYTHON_THREAD_END_ALLOW;
23113 : }
23114 80 : if ( bLocalUseExceptions ) {
23115 45 : popErrorHandler();
23116 : }
23117 : #ifndef SED_HACKS
23118 : if ( bLocalUseExceptions ) {
23119 : CPLErr eclass = CPLGetLastErrorType();
23120 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23121 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23122 : }
23123 : }
23124 : #endif
23125 : }
23126 80 : resultobj = SWIG_From_int(static_cast< int >(result));
23127 80 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23128 : return resultobj;
23129 : fail:
23130 : return NULL;
23131 : }
23132 :
23133 :
23134 190 : SWIGINTERN PyObject *_wrap_FieldDefn_SetNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23135 190 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23136 190 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23137 190 : int arg2 ;
23138 190 : void *argp1 = 0 ;
23139 190 : int res1 = 0 ;
23140 190 : int val2 ;
23141 190 : int ecode2 = 0 ;
23142 190 : PyObject *swig_obj[2] ;
23143 :
23144 190 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetNullable", 2, 2, swig_obj)) SWIG_fail;
23145 190 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23146 190 : if (!SWIG_IsOK(res1)) {
23147 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetNullable" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23148 : }
23149 190 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23150 190 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
23151 190 : if (!SWIG_IsOK(ecode2)) {
23152 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetNullable" "', argument " "2"" of type '" "int""'");
23153 : }
23154 190 : arg2 = static_cast< int >(val2);
23155 190 : {
23156 190 : const int bLocalUseExceptions = GetUseExceptions();
23157 190 : if ( bLocalUseExceptions ) {
23158 119 : pushErrorHandler();
23159 : }
23160 190 : {
23161 190 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23162 190 : OGRFieldDefnShadow_SetNullable(arg1,arg2);
23163 190 : SWIG_PYTHON_THREAD_END_ALLOW;
23164 : }
23165 190 : if ( bLocalUseExceptions ) {
23166 119 : popErrorHandler();
23167 : }
23168 : #ifndef SED_HACKS
23169 : if ( bLocalUseExceptions ) {
23170 : CPLErr eclass = CPLGetLastErrorType();
23171 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23172 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23173 : }
23174 : }
23175 : #endif
23176 : }
23177 190 : resultobj = SWIG_Py_Void();
23178 190 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23179 : return resultobj;
23180 : fail:
23181 : return NULL;
23182 : }
23183 :
23184 :
23185 80 : SWIGINTERN PyObject *_wrap_FieldDefn_IsUnique(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23186 80 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23187 80 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23188 80 : void *argp1 = 0 ;
23189 80 : int res1 = 0 ;
23190 80 : PyObject *swig_obj[1] ;
23191 80 : int result;
23192 :
23193 80 : if (!args) SWIG_fail;
23194 80 : swig_obj[0] = args;
23195 80 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23196 80 : if (!SWIG_IsOK(res1)) {
23197 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsUnique" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23198 : }
23199 80 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23200 80 : {
23201 80 : const int bLocalUseExceptions = GetUseExceptions();
23202 80 : if ( bLocalUseExceptions ) {
23203 4 : pushErrorHandler();
23204 : }
23205 80 : {
23206 80 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23207 80 : result = (int)OGRFieldDefnShadow_IsUnique(arg1);
23208 80 : SWIG_PYTHON_THREAD_END_ALLOW;
23209 : }
23210 80 : if ( bLocalUseExceptions ) {
23211 4 : popErrorHandler();
23212 : }
23213 : #ifndef SED_HACKS
23214 : if ( bLocalUseExceptions ) {
23215 : CPLErr eclass = CPLGetLastErrorType();
23216 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23217 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23218 : }
23219 : }
23220 : #endif
23221 : }
23222 80 : resultobj = SWIG_From_int(static_cast< int >(result));
23223 80 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23224 : return resultobj;
23225 : fail:
23226 : return NULL;
23227 : }
23228 :
23229 :
23230 28 : SWIGINTERN PyObject *_wrap_FieldDefn_SetUnique(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23231 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23232 28 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23233 28 : int arg2 ;
23234 28 : void *argp1 = 0 ;
23235 28 : int res1 = 0 ;
23236 28 : int val2 ;
23237 28 : int ecode2 = 0 ;
23238 28 : PyObject *swig_obj[2] ;
23239 :
23240 28 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetUnique", 2, 2, swig_obj)) SWIG_fail;
23241 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23242 28 : if (!SWIG_IsOK(res1)) {
23243 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetUnique" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23244 : }
23245 28 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23246 28 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
23247 28 : if (!SWIG_IsOK(ecode2)) {
23248 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetUnique" "', argument " "2"" of type '" "int""'");
23249 : }
23250 28 : arg2 = static_cast< int >(val2);
23251 28 : {
23252 28 : const int bLocalUseExceptions = GetUseExceptions();
23253 28 : if ( bLocalUseExceptions ) {
23254 5 : pushErrorHandler();
23255 : }
23256 28 : {
23257 28 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23258 28 : OGRFieldDefnShadow_SetUnique(arg1,arg2);
23259 28 : SWIG_PYTHON_THREAD_END_ALLOW;
23260 : }
23261 28 : if ( bLocalUseExceptions ) {
23262 5 : popErrorHandler();
23263 : }
23264 : #ifndef SED_HACKS
23265 : if ( bLocalUseExceptions ) {
23266 : CPLErr eclass = CPLGetLastErrorType();
23267 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23268 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23269 : }
23270 : }
23271 : #endif
23272 : }
23273 28 : resultobj = SWIG_Py_Void();
23274 28 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23275 : return resultobj;
23276 : fail:
23277 : return NULL;
23278 : }
23279 :
23280 :
23281 4 : SWIGINTERN PyObject *_wrap_FieldDefn_IsGenerated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23282 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23283 4 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23284 4 : void *argp1 = 0 ;
23285 4 : int res1 = 0 ;
23286 4 : PyObject *swig_obj[1] ;
23287 4 : int result;
23288 :
23289 4 : if (!args) SWIG_fail;
23290 4 : swig_obj[0] = args;
23291 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23292 4 : if (!SWIG_IsOK(res1)) {
23293 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsGenerated" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23294 : }
23295 4 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23296 4 : {
23297 4 : const int bLocalUseExceptions = GetUseExceptions();
23298 4 : if ( bLocalUseExceptions ) {
23299 0 : pushErrorHandler();
23300 : }
23301 4 : {
23302 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23303 4 : result = (int)OGRFieldDefnShadow_IsGenerated(arg1);
23304 4 : SWIG_PYTHON_THREAD_END_ALLOW;
23305 : }
23306 4 : if ( bLocalUseExceptions ) {
23307 0 : popErrorHandler();
23308 : }
23309 : #ifndef SED_HACKS
23310 : if ( bLocalUseExceptions ) {
23311 : CPLErr eclass = CPLGetLastErrorType();
23312 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23313 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23314 : }
23315 : }
23316 : #endif
23317 : }
23318 4 : resultobj = SWIG_From_int(static_cast< int >(result));
23319 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23320 : return resultobj;
23321 : fail:
23322 : return NULL;
23323 : }
23324 :
23325 :
23326 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetGenerated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23327 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23328 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23329 0 : int arg2 ;
23330 0 : void *argp1 = 0 ;
23331 0 : int res1 = 0 ;
23332 0 : int val2 ;
23333 0 : int ecode2 = 0 ;
23334 0 : PyObject *swig_obj[2] ;
23335 :
23336 0 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetGenerated", 2, 2, swig_obj)) SWIG_fail;
23337 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23338 0 : if (!SWIG_IsOK(res1)) {
23339 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetGenerated" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23340 : }
23341 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23342 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
23343 0 : if (!SWIG_IsOK(ecode2)) {
23344 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetGenerated" "', argument " "2"" of type '" "int""'");
23345 : }
23346 0 : arg2 = static_cast< int >(val2);
23347 0 : {
23348 0 : const int bLocalUseExceptions = GetUseExceptions();
23349 0 : if ( bLocalUseExceptions ) {
23350 0 : pushErrorHandler();
23351 : }
23352 0 : {
23353 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23354 0 : OGRFieldDefnShadow_SetGenerated(arg1,arg2);
23355 0 : SWIG_PYTHON_THREAD_END_ALLOW;
23356 : }
23357 0 : if ( bLocalUseExceptions ) {
23358 0 : popErrorHandler();
23359 : }
23360 : #ifndef SED_HACKS
23361 : if ( bLocalUseExceptions ) {
23362 : CPLErr eclass = CPLGetLastErrorType();
23363 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23364 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23365 : }
23366 : }
23367 : #endif
23368 : }
23369 0 : resultobj = SWIG_Py_Void();
23370 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23371 : return resultobj;
23372 : fail:
23373 : return NULL;
23374 : }
23375 :
23376 :
23377 137 : SWIGINTERN PyObject *_wrap_FieldDefn_GetDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23378 137 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23379 137 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23380 137 : void *argp1 = 0 ;
23381 137 : int res1 = 0 ;
23382 137 : PyObject *swig_obj[1] ;
23383 137 : char *result = 0 ;
23384 :
23385 137 : if (!args) SWIG_fail;
23386 137 : swig_obj[0] = args;
23387 137 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23388 137 : if (!SWIG_IsOK(res1)) {
23389 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetDefault" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23390 : }
23391 137 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23392 137 : {
23393 137 : const int bLocalUseExceptions = GetUseExceptions();
23394 137 : if ( bLocalUseExceptions ) {
23395 27 : pushErrorHandler();
23396 : }
23397 137 : {
23398 137 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23399 137 : result = (char *)OGRFieldDefnShadow_GetDefault(arg1);
23400 137 : SWIG_PYTHON_THREAD_END_ALLOW;
23401 : }
23402 137 : if ( bLocalUseExceptions ) {
23403 27 : popErrorHandler();
23404 : }
23405 : #ifndef SED_HACKS
23406 : if ( bLocalUseExceptions ) {
23407 : CPLErr eclass = CPLGetLastErrorType();
23408 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23409 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23410 : }
23411 : }
23412 : #endif
23413 : }
23414 137 : resultobj = SWIG_FromCharPtr((const char *)result);
23415 137 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23416 : return resultobj;
23417 : fail:
23418 : return NULL;
23419 : }
23420 :
23421 :
23422 149 : SWIGINTERN PyObject *_wrap_FieldDefn_SetDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23423 149 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23424 149 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23425 149 : char *arg2 = (char *) 0 ;
23426 149 : void *argp1 = 0 ;
23427 149 : int res1 = 0 ;
23428 149 : int res2 ;
23429 149 : char *buf2 = 0 ;
23430 149 : int alloc2 = 0 ;
23431 149 : PyObject *swig_obj[2] ;
23432 :
23433 149 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetDefault", 2, 2, swig_obj)) SWIG_fail;
23434 149 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23435 149 : if (!SWIG_IsOK(res1)) {
23436 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetDefault" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23437 : }
23438 149 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23439 149 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
23440 149 : if (!SWIG_IsOK(res2)) {
23441 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetDefault" "', argument " "2"" of type '" "char const *""'");
23442 : }
23443 149 : arg2 = reinterpret_cast< char * >(buf2);
23444 149 : {
23445 149 : const int bLocalUseExceptions = GetUseExceptions();
23446 149 : if ( bLocalUseExceptions ) {
23447 11 : pushErrorHandler();
23448 : }
23449 149 : {
23450 149 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23451 149 : OGRFieldDefnShadow_SetDefault(arg1,(char const *)arg2);
23452 149 : SWIG_PYTHON_THREAD_END_ALLOW;
23453 : }
23454 149 : if ( bLocalUseExceptions ) {
23455 11 : popErrorHandler();
23456 : }
23457 : #ifndef SED_HACKS
23458 : if ( bLocalUseExceptions ) {
23459 : CPLErr eclass = CPLGetLastErrorType();
23460 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23461 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23462 : }
23463 : }
23464 : #endif
23465 : }
23466 149 : resultobj = SWIG_Py_Void();
23467 149 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23468 151 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23469 : return resultobj;
23470 0 : fail:
23471 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23472 : return NULL;
23473 : }
23474 :
23475 :
23476 3 : SWIGINTERN PyObject *_wrap_FieldDefn_IsDefaultDriverSpecific(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23477 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23478 3 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23479 3 : void *argp1 = 0 ;
23480 3 : int res1 = 0 ;
23481 3 : PyObject *swig_obj[1] ;
23482 3 : int result;
23483 :
23484 3 : if (!args) SWIG_fail;
23485 3 : swig_obj[0] = args;
23486 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23487 3 : if (!SWIG_IsOK(res1)) {
23488 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsDefaultDriverSpecific" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23489 : }
23490 3 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23491 3 : {
23492 3 : const int bLocalUseExceptions = GetUseExceptions();
23493 3 : if ( bLocalUseExceptions ) {
23494 3 : pushErrorHandler();
23495 : }
23496 3 : {
23497 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23498 3 : result = (int)OGRFieldDefnShadow_IsDefaultDriverSpecific(arg1);
23499 3 : SWIG_PYTHON_THREAD_END_ALLOW;
23500 : }
23501 3 : if ( bLocalUseExceptions ) {
23502 3 : popErrorHandler();
23503 : }
23504 : #ifndef SED_HACKS
23505 : if ( bLocalUseExceptions ) {
23506 : CPLErr eclass = CPLGetLastErrorType();
23507 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23508 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23509 : }
23510 : }
23511 : #endif
23512 : }
23513 3 : resultobj = SWIG_From_int(static_cast< int >(result));
23514 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23515 : return resultobj;
23516 : fail:
23517 : return NULL;
23518 : }
23519 :
23520 :
23521 32 : SWIGINTERN PyObject *_wrap_FieldDefn_GetDomainName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23522 32 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23523 32 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23524 32 : void *argp1 = 0 ;
23525 32 : int res1 = 0 ;
23526 32 : PyObject *swig_obj[1] ;
23527 32 : char *result = 0 ;
23528 :
23529 32 : if (!args) SWIG_fail;
23530 32 : swig_obj[0] = args;
23531 32 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23532 32 : if (!SWIG_IsOK(res1)) {
23533 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetDomainName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23534 : }
23535 32 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23536 32 : {
23537 32 : const int bLocalUseExceptions = GetUseExceptions();
23538 32 : if ( bLocalUseExceptions ) {
23539 24 : pushErrorHandler();
23540 : }
23541 32 : {
23542 32 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23543 32 : result = (char *)OGRFieldDefnShadow_GetDomainName(arg1);
23544 32 : SWIG_PYTHON_THREAD_END_ALLOW;
23545 : }
23546 32 : if ( bLocalUseExceptions ) {
23547 24 : popErrorHandler();
23548 : }
23549 : #ifndef SED_HACKS
23550 : if ( bLocalUseExceptions ) {
23551 : CPLErr eclass = CPLGetLastErrorType();
23552 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23553 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23554 : }
23555 : }
23556 : #endif
23557 : }
23558 32 : resultobj = SWIG_FromCharPtr((const char *)result);
23559 32 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23560 : return resultobj;
23561 : fail:
23562 : return NULL;
23563 : }
23564 :
23565 :
23566 22 : SWIGINTERN PyObject *_wrap_FieldDefn_SetDomainName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23567 22 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23568 22 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23569 22 : char *arg2 = (char *) 0 ;
23570 22 : void *argp1 = 0 ;
23571 22 : int res1 = 0 ;
23572 22 : int res2 ;
23573 22 : char *buf2 = 0 ;
23574 22 : int alloc2 = 0 ;
23575 22 : PyObject *swig_obj[2] ;
23576 :
23577 22 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetDomainName", 2, 2, swig_obj)) SWIG_fail;
23578 22 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23579 22 : if (!SWIG_IsOK(res1)) {
23580 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetDomainName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23581 : }
23582 22 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23583 22 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
23584 22 : if (!SWIG_IsOK(res2)) {
23585 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetDomainName" "', argument " "2"" of type '" "char const *""'");
23586 : }
23587 22 : arg2 = reinterpret_cast< char * >(buf2);
23588 22 : {
23589 22 : if (!arg2) {
23590 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
23591 : }
23592 : }
23593 22 : {
23594 22 : const int bLocalUseExceptions = GetUseExceptions();
23595 22 : if ( bLocalUseExceptions ) {
23596 13 : pushErrorHandler();
23597 : }
23598 22 : {
23599 22 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23600 22 : OGRFieldDefnShadow_SetDomainName(arg1,(char const *)arg2);
23601 22 : SWIG_PYTHON_THREAD_END_ALLOW;
23602 : }
23603 22 : if ( bLocalUseExceptions ) {
23604 13 : popErrorHandler();
23605 : }
23606 : #ifndef SED_HACKS
23607 : if ( bLocalUseExceptions ) {
23608 : CPLErr eclass = CPLGetLastErrorType();
23609 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23610 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23611 : }
23612 : }
23613 : #endif
23614 : }
23615 22 : resultobj = SWIG_Py_Void();
23616 22 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23617 22 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23618 : return resultobj;
23619 0 : fail:
23620 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23621 : return NULL;
23622 : }
23623 :
23624 :
23625 58 : SWIGINTERN PyObject *_wrap_FieldDefn_GetComment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23626 58 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23627 58 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23628 58 : void *argp1 = 0 ;
23629 58 : int res1 = 0 ;
23630 58 : PyObject *swig_obj[1] ;
23631 58 : char *result = 0 ;
23632 :
23633 58 : if (!args) SWIG_fail;
23634 58 : swig_obj[0] = args;
23635 58 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23636 58 : if (!SWIG_IsOK(res1)) {
23637 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetComment" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23638 : }
23639 58 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23640 58 : {
23641 58 : const int bLocalUseExceptions = GetUseExceptions();
23642 58 : if ( bLocalUseExceptions ) {
23643 5 : pushErrorHandler();
23644 : }
23645 58 : {
23646 58 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23647 58 : result = (char *)OGRFieldDefnShadow_GetComment(arg1);
23648 58 : SWIG_PYTHON_THREAD_END_ALLOW;
23649 : }
23650 58 : if ( bLocalUseExceptions ) {
23651 5 : popErrorHandler();
23652 : }
23653 : #ifndef SED_HACKS
23654 : if ( bLocalUseExceptions ) {
23655 : CPLErr eclass = CPLGetLastErrorType();
23656 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23657 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23658 : }
23659 : }
23660 : #endif
23661 : }
23662 58 : resultobj = SWIG_FromCharPtr((const char *)result);
23663 58 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23664 : return resultobj;
23665 : fail:
23666 : return NULL;
23667 : }
23668 :
23669 :
23670 32 : SWIGINTERN PyObject *_wrap_FieldDefn_SetComment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23671 32 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23672 32 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23673 32 : char *arg2 = (char *) 0 ;
23674 32 : void *argp1 = 0 ;
23675 32 : int res1 = 0 ;
23676 32 : int res2 ;
23677 32 : char *buf2 = 0 ;
23678 32 : int alloc2 = 0 ;
23679 32 : PyObject *swig_obj[2] ;
23680 :
23681 32 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetComment", 2, 2, swig_obj)) SWIG_fail;
23682 32 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23683 32 : if (!SWIG_IsOK(res1)) {
23684 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetComment" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23685 : }
23686 32 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23687 32 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
23688 32 : if (!SWIG_IsOK(res2)) {
23689 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetComment" "', argument " "2"" of type '" "char const *""'");
23690 : }
23691 32 : arg2 = reinterpret_cast< char * >(buf2);
23692 32 : {
23693 32 : const int bLocalUseExceptions = GetUseExceptions();
23694 32 : if ( bLocalUseExceptions ) {
23695 6 : pushErrorHandler();
23696 : }
23697 32 : {
23698 32 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23699 32 : OGRFieldDefnShadow_SetComment(arg1,(char const *)arg2);
23700 32 : SWIG_PYTHON_THREAD_END_ALLOW;
23701 : }
23702 32 : if ( bLocalUseExceptions ) {
23703 6 : popErrorHandler();
23704 : }
23705 : #ifndef SED_HACKS
23706 : if ( bLocalUseExceptions ) {
23707 : CPLErr eclass = CPLGetLastErrorType();
23708 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23709 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23710 : }
23711 : }
23712 : #endif
23713 : }
23714 32 : resultobj = SWIG_Py_Void();
23715 32 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23716 32 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23717 : return resultobj;
23718 0 : fail:
23719 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23720 : return NULL;
23721 : }
23722 :
23723 :
23724 277 : SWIGINTERN PyObject *FieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23725 277 : PyObject *obj;
23726 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
23727 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDefnShadow, SWIG_NewClientData(obj));
23728 277 : return SWIG_Py_Void();
23729 : }
23730 :
23731 77681 : SWIGINTERN PyObject *FieldDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23732 77681 : return SWIG_Python_InitShadowInstance(args);
23733 : }
23734 :
23735 183 : SWIGINTERN PyObject *_wrap_delete_GeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23736 183 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23737 183 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23738 183 : void *argp1 = 0 ;
23739 183 : int res1 = 0 ;
23740 183 : PyObject *swig_obj[1] ;
23741 :
23742 183 : if (!args) SWIG_fail;
23743 183 : swig_obj[0] = args;
23744 183 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_POINTER_DISOWN | 0 );
23745 183 : if (!SWIG_IsOK(res1)) {
23746 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomFieldDefn" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23747 : }
23748 183 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23749 183 : {
23750 183 : const int bLocalUseExceptions = GetUseExceptions();
23751 183 : if ( bLocalUseExceptions ) {
23752 72 : pushErrorHandler();
23753 : }
23754 183 : {
23755 183 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23756 183 : delete_OGRGeomFieldDefnShadow(arg1);
23757 183 : SWIG_PYTHON_THREAD_END_ALLOW;
23758 : }
23759 183 : if ( bLocalUseExceptions ) {
23760 72 : popErrorHandler();
23761 : }
23762 : #ifndef SED_HACKS
23763 : if ( bLocalUseExceptions ) {
23764 : CPLErr eclass = CPLGetLastErrorType();
23765 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23766 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23767 : }
23768 : }
23769 : #endif
23770 : }
23771 183 : resultobj = SWIG_Py_Void();
23772 183 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23773 : return resultobj;
23774 : fail:
23775 : return NULL;
23776 : }
23777 :
23778 :
23779 183 : SWIGINTERN PyObject *_wrap_new_GeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
23780 183 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23781 183 : char *arg1 = (char *) "" ;
23782 183 : OGRwkbGeometryType arg2 = (OGRwkbGeometryType) wkbUnknown ;
23783 183 : int res1 ;
23784 183 : char *buf1 = 0 ;
23785 183 : int alloc1 = 0 ;
23786 183 : int val2 ;
23787 183 : int ecode2 = 0 ;
23788 183 : PyObject * obj0 = 0 ;
23789 183 : PyObject * obj1 = 0 ;
23790 183 : char * kwnames[] = {
23791 : (char *)"name_null_ok", (char *)"field_type", NULL
23792 : };
23793 183 : OGRGeomFieldDefnShadow *result = 0 ;
23794 :
23795 183 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_GeomFieldDefn", kwnames, &obj0, &obj1)) SWIG_fail;
23796 183 : if (obj0) {
23797 180 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
23798 180 : if (!SWIG_IsOK(res1)) {
23799 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GeomFieldDefn" "', argument " "1"" of type '" "char const *""'");
23800 : }
23801 180 : arg1 = reinterpret_cast< char * >(buf1);
23802 : }
23803 183 : if (obj1) {
23804 159 : ecode2 = SWIG_AsVal_int(obj1, &val2);
23805 159 : if (!SWIG_IsOK(ecode2)) {
23806 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GeomFieldDefn" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
23807 : }
23808 159 : arg2 = static_cast< OGRwkbGeometryType >(val2);
23809 : }
23810 183 : {
23811 183 : const int bLocalUseExceptions = GetUseExceptions();
23812 183 : if ( bLocalUseExceptions ) {
23813 72 : pushErrorHandler();
23814 : }
23815 183 : {
23816 183 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23817 183 : result = (OGRGeomFieldDefnShadow *)new_OGRGeomFieldDefnShadow((char const *)arg1,arg2);
23818 183 : SWIG_PYTHON_THREAD_END_ALLOW;
23819 : }
23820 183 : if ( bLocalUseExceptions ) {
23821 72 : popErrorHandler();
23822 : }
23823 : #ifndef SED_HACKS
23824 : if ( bLocalUseExceptions ) {
23825 : CPLErr eclass = CPLGetLastErrorType();
23826 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23827 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23828 : }
23829 : }
23830 : #endif
23831 : }
23832 183 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_POINTER_NEW | 0 );
23833 183 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
23834 183 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23835 : return resultobj;
23836 0 : fail:
23837 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
23838 : return NULL;
23839 : }
23840 :
23841 :
23842 229 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23843 229 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23844 229 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23845 229 : void *argp1 = 0 ;
23846 229 : int res1 = 0 ;
23847 229 : PyObject *swig_obj[1] ;
23848 229 : char *result = 0 ;
23849 :
23850 229 : if (!args) SWIG_fail;
23851 229 : swig_obj[0] = args;
23852 229 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23853 229 : if (!SWIG_IsOK(res1)) {
23854 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetName" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23855 : }
23856 229 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23857 229 : {
23858 229 : const int bLocalUseExceptions = GetUseExceptions();
23859 229 : if ( bLocalUseExceptions ) {
23860 183 : pushErrorHandler();
23861 : }
23862 229 : {
23863 229 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23864 229 : result = (char *)OGRGeomFieldDefnShadow_GetName(arg1);
23865 229 : SWIG_PYTHON_THREAD_END_ALLOW;
23866 : }
23867 229 : if ( bLocalUseExceptions ) {
23868 183 : popErrorHandler();
23869 : }
23870 : #ifndef SED_HACKS
23871 : if ( bLocalUseExceptions ) {
23872 : CPLErr eclass = CPLGetLastErrorType();
23873 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23874 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23875 : }
23876 : }
23877 : #endif
23878 : }
23879 229 : resultobj = SWIG_FromCharPtr((const char *)result);
23880 229 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23881 : return resultobj;
23882 : fail:
23883 : return NULL;
23884 : }
23885 :
23886 :
23887 82 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23888 82 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23889 82 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23890 82 : void *argp1 = 0 ;
23891 82 : int res1 = 0 ;
23892 82 : PyObject *swig_obj[1] ;
23893 82 : char *result = 0 ;
23894 :
23895 82 : if (!args) SWIG_fail;
23896 82 : swig_obj[0] = args;
23897 82 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23898 82 : if (!SWIG_IsOK(res1)) {
23899 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23900 : }
23901 82 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23902 82 : {
23903 82 : const int bLocalUseExceptions = GetUseExceptions();
23904 82 : if ( bLocalUseExceptions ) {
23905 0 : pushErrorHandler();
23906 : }
23907 82 : {
23908 82 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23909 82 : result = (char *)OGRGeomFieldDefnShadow_GetNameRef(arg1);
23910 82 : SWIG_PYTHON_THREAD_END_ALLOW;
23911 : }
23912 82 : if ( bLocalUseExceptions ) {
23913 0 : popErrorHandler();
23914 : }
23915 : #ifndef SED_HACKS
23916 : if ( bLocalUseExceptions ) {
23917 : CPLErr eclass = CPLGetLastErrorType();
23918 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23919 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23920 : }
23921 : }
23922 : #endif
23923 : }
23924 82 : resultobj = SWIG_FromCharPtr((const char *)result);
23925 82 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23926 : return resultobj;
23927 : fail:
23928 : return NULL;
23929 : }
23930 :
23931 :
23932 4 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23933 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23934 4 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23935 4 : char *arg2 = (char *) 0 ;
23936 4 : void *argp1 = 0 ;
23937 4 : int res1 = 0 ;
23938 4 : int res2 ;
23939 4 : char *buf2 = 0 ;
23940 4 : int alloc2 = 0 ;
23941 4 : PyObject *swig_obj[2] ;
23942 :
23943 4 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetName", 2, 2, swig_obj)) SWIG_fail;
23944 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23945 4 : if (!SWIG_IsOK(res1)) {
23946 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetName" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23947 : }
23948 4 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23949 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
23950 4 : if (!SWIG_IsOK(res2)) {
23951 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
23952 : }
23953 4 : arg2 = reinterpret_cast< char * >(buf2);
23954 4 : {
23955 4 : if (!arg2) {
23956 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
23957 : }
23958 : }
23959 4 : {
23960 4 : const int bLocalUseExceptions = GetUseExceptions();
23961 4 : if ( bLocalUseExceptions ) {
23962 2 : pushErrorHandler();
23963 : }
23964 4 : {
23965 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23966 4 : OGRGeomFieldDefnShadow_SetName(arg1,(char const *)arg2);
23967 4 : SWIG_PYTHON_THREAD_END_ALLOW;
23968 : }
23969 4 : if ( bLocalUseExceptions ) {
23970 2 : popErrorHandler();
23971 : }
23972 : #ifndef SED_HACKS
23973 : if ( bLocalUseExceptions ) {
23974 : CPLErr eclass = CPLGetLastErrorType();
23975 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23976 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23977 : }
23978 : }
23979 : #endif
23980 : }
23981 4 : resultobj = SWIG_Py_Void();
23982 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23983 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
23984 : return resultobj;
23985 0 : fail:
23986 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23987 : return NULL;
23988 : }
23989 :
23990 :
23991 97 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23992 97 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23993 97 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23994 97 : void *argp1 = 0 ;
23995 97 : int res1 = 0 ;
23996 97 : PyObject *swig_obj[1] ;
23997 97 : OGRwkbGeometryType result;
23998 :
23999 97 : if (!args) SWIG_fail;
24000 97 : swig_obj[0] = args;
24001 97 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24002 97 : if (!SWIG_IsOK(res1)) {
24003 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetType" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24004 : }
24005 97 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24006 97 : {
24007 97 : const int bLocalUseExceptions = GetUseExceptions();
24008 97 : if ( bLocalUseExceptions ) {
24009 29 : pushErrorHandler();
24010 : }
24011 97 : {
24012 97 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24013 97 : result = (OGRwkbGeometryType)OGRGeomFieldDefnShadow_GetType(arg1);
24014 97 : SWIG_PYTHON_THREAD_END_ALLOW;
24015 : }
24016 97 : if ( bLocalUseExceptions ) {
24017 29 : popErrorHandler();
24018 : }
24019 : #ifndef SED_HACKS
24020 : if ( bLocalUseExceptions ) {
24021 : CPLErr eclass = CPLGetLastErrorType();
24022 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24023 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24024 : }
24025 : }
24026 : #endif
24027 : }
24028 97 : resultobj = SWIG_From_int(static_cast< int >(result));
24029 97 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24030 : return resultobj;
24031 : fail:
24032 : return NULL;
24033 : }
24034 :
24035 :
24036 2 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24037 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24038 2 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24039 2 : OGRwkbGeometryType arg2 ;
24040 2 : void *argp1 = 0 ;
24041 2 : int res1 = 0 ;
24042 2 : int val2 ;
24043 2 : int ecode2 = 0 ;
24044 2 : PyObject *swig_obj[2] ;
24045 :
24046 2 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetType", 2, 2, swig_obj)) SWIG_fail;
24047 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24048 2 : if (!SWIG_IsOK(res1)) {
24049 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetType" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24050 : }
24051 2 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24052 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
24053 2 : if (!SWIG_IsOK(ecode2)) {
24054 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
24055 : }
24056 2 : arg2 = static_cast< OGRwkbGeometryType >(val2);
24057 2 : {
24058 2 : const int bLocalUseExceptions = GetUseExceptions();
24059 2 : if ( bLocalUseExceptions ) {
24060 0 : pushErrorHandler();
24061 : }
24062 2 : {
24063 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24064 2 : OGRGeomFieldDefnShadow_SetType(arg1,arg2);
24065 2 : SWIG_PYTHON_THREAD_END_ALLOW;
24066 : }
24067 2 : if ( bLocalUseExceptions ) {
24068 0 : popErrorHandler();
24069 : }
24070 : #ifndef SED_HACKS
24071 : if ( bLocalUseExceptions ) {
24072 : CPLErr eclass = CPLGetLastErrorType();
24073 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24074 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24075 : }
24076 : }
24077 : #endif
24078 : }
24079 2 : resultobj = SWIG_Py_Void();
24080 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24081 : return resultobj;
24082 : fail:
24083 : return NULL;
24084 : }
24085 :
24086 :
24087 81 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24088 81 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24089 81 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24090 81 : void *argp1 = 0 ;
24091 81 : int res1 = 0 ;
24092 81 : PyObject *swig_obj[1] ;
24093 81 : OSRSpatialReferenceShadow *result = 0 ;
24094 :
24095 81 : if (!args) SWIG_fail;
24096 81 : swig_obj[0] = args;
24097 81 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24098 81 : if (!SWIG_IsOK(res1)) {
24099 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetSpatialRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24100 : }
24101 81 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24102 81 : {
24103 81 : const int bLocalUseExceptions = GetUseExceptions();
24104 81 : if ( bLocalUseExceptions ) {
24105 18 : pushErrorHandler();
24106 : }
24107 81 : {
24108 81 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24109 81 : result = (OSRSpatialReferenceShadow *)OGRGeomFieldDefnShadow_GetSpatialRef(arg1);
24110 81 : SWIG_PYTHON_THREAD_END_ALLOW;
24111 : }
24112 81 : if ( bLocalUseExceptions ) {
24113 18 : popErrorHandler();
24114 : }
24115 : #ifndef SED_HACKS
24116 : if ( bLocalUseExceptions ) {
24117 : CPLErr eclass = CPLGetLastErrorType();
24118 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24119 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24120 : }
24121 : }
24122 : #endif
24123 : }
24124 81 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
24125 81 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24126 : return resultobj;
24127 : fail:
24128 : return NULL;
24129 : }
24130 :
24131 :
24132 48 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24133 48 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24134 48 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24135 48 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
24136 48 : void *argp1 = 0 ;
24137 48 : int res1 = 0 ;
24138 48 : void *argp2 = 0 ;
24139 48 : int res2 = 0 ;
24140 48 : PyObject *swig_obj[2] ;
24141 :
24142 48 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
24143 48 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24144 48 : if (!SWIG_IsOK(res1)) {
24145 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetSpatialRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24146 : }
24147 48 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24148 48 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
24149 48 : if (!SWIG_IsOK(res2)) {
24150 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
24151 : }
24152 48 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
24153 48 : {
24154 48 : const int bLocalUseExceptions = GetUseExceptions();
24155 48 : if ( bLocalUseExceptions ) {
24156 5 : pushErrorHandler();
24157 : }
24158 48 : {
24159 48 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24160 48 : OGRGeomFieldDefnShadow_SetSpatialRef(arg1,arg2);
24161 48 : SWIG_PYTHON_THREAD_END_ALLOW;
24162 : }
24163 48 : if ( bLocalUseExceptions ) {
24164 5 : popErrorHandler();
24165 : }
24166 : #ifndef SED_HACKS
24167 : if ( bLocalUseExceptions ) {
24168 : CPLErr eclass = CPLGetLastErrorType();
24169 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24170 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24171 : }
24172 : }
24173 : #endif
24174 : }
24175 48 : resultobj = SWIG_Py_Void();
24176 48 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24177 : return resultobj;
24178 : fail:
24179 : return NULL;
24180 : }
24181 :
24182 :
24183 6 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24184 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24185 6 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24186 6 : void *argp1 = 0 ;
24187 6 : int res1 = 0 ;
24188 6 : PyObject *swig_obj[1] ;
24189 6 : int result;
24190 :
24191 6 : if (!args) SWIG_fail;
24192 6 : swig_obj[0] = args;
24193 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24194 6 : if (!SWIG_IsOK(res1)) {
24195 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24196 : }
24197 6 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24198 6 : {
24199 6 : const int bLocalUseExceptions = GetUseExceptions();
24200 6 : if ( bLocalUseExceptions ) {
24201 2 : pushErrorHandler();
24202 : }
24203 6 : {
24204 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24205 6 : result = (int)OGRGeomFieldDefnShadow_IsIgnored(arg1);
24206 6 : SWIG_PYTHON_THREAD_END_ALLOW;
24207 : }
24208 6 : if ( bLocalUseExceptions ) {
24209 2 : popErrorHandler();
24210 : }
24211 : #ifndef SED_HACKS
24212 : if ( bLocalUseExceptions ) {
24213 : CPLErr eclass = CPLGetLastErrorType();
24214 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24215 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24216 : }
24217 : }
24218 : #endif
24219 : }
24220 6 : resultobj = SWIG_From_int(static_cast< int >(result));
24221 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24222 : return resultobj;
24223 : fail:
24224 : return NULL;
24225 : }
24226 :
24227 :
24228 1 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24229 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24230 1 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24231 1 : int arg2 ;
24232 1 : void *argp1 = 0 ;
24233 1 : int res1 = 0 ;
24234 1 : int val2 ;
24235 1 : int ecode2 = 0 ;
24236 1 : PyObject *swig_obj[2] ;
24237 :
24238 1 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetIgnored", 2, 2, swig_obj)) SWIG_fail;
24239 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24240 1 : if (!SWIG_IsOK(res1)) {
24241 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24242 : }
24243 1 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24244 1 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
24245 1 : if (!SWIG_IsOK(ecode2)) {
24246 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
24247 : }
24248 1 : arg2 = static_cast< int >(val2);
24249 1 : {
24250 1 : const int bLocalUseExceptions = GetUseExceptions();
24251 1 : if ( bLocalUseExceptions ) {
24252 0 : pushErrorHandler();
24253 : }
24254 1 : {
24255 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24256 1 : OGRGeomFieldDefnShadow_SetIgnored(arg1,arg2);
24257 1 : SWIG_PYTHON_THREAD_END_ALLOW;
24258 : }
24259 1 : if ( bLocalUseExceptions ) {
24260 0 : popErrorHandler();
24261 : }
24262 : #ifndef SED_HACKS
24263 : if ( bLocalUseExceptions ) {
24264 : CPLErr eclass = CPLGetLastErrorType();
24265 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24266 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24267 : }
24268 : }
24269 : #endif
24270 : }
24271 1 : resultobj = SWIG_Py_Void();
24272 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24273 : return resultobj;
24274 : fail:
24275 : return NULL;
24276 : }
24277 :
24278 :
24279 85 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_IsNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24280 85 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24281 85 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24282 85 : void *argp1 = 0 ;
24283 85 : int res1 = 0 ;
24284 85 : PyObject *swig_obj[1] ;
24285 85 : int result;
24286 :
24287 85 : if (!args) SWIG_fail;
24288 85 : swig_obj[0] = args;
24289 85 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24290 85 : if (!SWIG_IsOK(res1)) {
24291 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_IsNullable" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24292 : }
24293 85 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24294 85 : {
24295 85 : const int bLocalUseExceptions = GetUseExceptions();
24296 85 : if ( bLocalUseExceptions ) {
24297 3 : pushErrorHandler();
24298 : }
24299 85 : {
24300 85 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24301 85 : result = (int)OGRGeomFieldDefnShadow_IsNullable(arg1);
24302 85 : SWIG_PYTHON_THREAD_END_ALLOW;
24303 : }
24304 85 : if ( bLocalUseExceptions ) {
24305 3 : popErrorHandler();
24306 : }
24307 : #ifndef SED_HACKS
24308 : if ( bLocalUseExceptions ) {
24309 : CPLErr eclass = CPLGetLastErrorType();
24310 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24311 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24312 : }
24313 : }
24314 : #endif
24315 : }
24316 85 : resultobj = SWIG_From_int(static_cast< int >(result));
24317 85 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24318 : return resultobj;
24319 : fail:
24320 : return NULL;
24321 : }
24322 :
24323 :
24324 23 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24325 23 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24326 23 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24327 23 : int arg2 ;
24328 23 : void *argp1 = 0 ;
24329 23 : int res1 = 0 ;
24330 23 : int val2 ;
24331 23 : int ecode2 = 0 ;
24332 23 : PyObject *swig_obj[2] ;
24333 :
24334 23 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetNullable", 2, 2, swig_obj)) SWIG_fail;
24335 23 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24336 23 : if (!SWIG_IsOK(res1)) {
24337 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetNullable" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24338 : }
24339 23 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24340 23 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
24341 23 : if (!SWIG_IsOK(ecode2)) {
24342 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetNullable" "', argument " "2"" of type '" "int""'");
24343 : }
24344 23 : arg2 = static_cast< int >(val2);
24345 23 : {
24346 23 : const int bLocalUseExceptions = GetUseExceptions();
24347 23 : if ( bLocalUseExceptions ) {
24348 10 : pushErrorHandler();
24349 : }
24350 23 : {
24351 23 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24352 23 : OGRGeomFieldDefnShadow_SetNullable(arg1,arg2);
24353 23 : SWIG_PYTHON_THREAD_END_ALLOW;
24354 : }
24355 23 : if ( bLocalUseExceptions ) {
24356 10 : popErrorHandler();
24357 : }
24358 : #ifndef SED_HACKS
24359 : if ( bLocalUseExceptions ) {
24360 : CPLErr eclass = CPLGetLastErrorType();
24361 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24362 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24363 : }
24364 : }
24365 : #endif
24366 : }
24367 23 : resultobj = SWIG_Py_Void();
24368 23 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24369 : return resultobj;
24370 : fail:
24371 : return NULL;
24372 : }
24373 :
24374 :
24375 42 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetCoordinatePrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24376 42 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24377 42 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24378 42 : void *argp1 = 0 ;
24379 42 : int res1 = 0 ;
24380 42 : PyObject *swig_obj[1] ;
24381 42 : OGRGeomCoordinatePrecisionShadow *result = 0 ;
24382 :
24383 42 : if (!args) SWIG_fail;
24384 42 : swig_obj[0] = args;
24385 42 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24386 42 : if (!SWIG_IsOK(res1)) {
24387 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24388 : }
24389 42 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24390 42 : {
24391 42 : const int bLocalUseExceptions = GetUseExceptions();
24392 42 : if ( bLocalUseExceptions ) {
24393 35 : pushErrorHandler();
24394 : }
24395 42 : {
24396 42 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24397 42 : result = (OGRGeomCoordinatePrecisionShadow *)OGRGeomFieldDefnShadow_GetCoordinatePrecision(arg1);
24398 42 : SWIG_PYTHON_THREAD_END_ALLOW;
24399 : }
24400 42 : if ( bLocalUseExceptions ) {
24401 35 : popErrorHandler();
24402 : }
24403 : #ifndef SED_HACKS
24404 : if ( bLocalUseExceptions ) {
24405 : CPLErr eclass = CPLGetLastErrorType();
24406 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24407 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24408 : }
24409 : }
24410 : #endif
24411 : }
24412 42 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
24413 42 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24414 : return resultobj;
24415 : fail:
24416 : return NULL;
24417 : }
24418 :
24419 :
24420 18 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetCoordinatePrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24421 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24422 18 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24423 18 : OGRGeomCoordinatePrecisionShadow *arg2 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
24424 18 : void *argp1 = 0 ;
24425 18 : int res1 = 0 ;
24426 18 : void *argp2 = 0 ;
24427 18 : int res2 = 0 ;
24428 18 : PyObject *swig_obj[2] ;
24429 :
24430 18 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetCoordinatePrecision", 2, 2, swig_obj)) SWIG_fail;
24431 18 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24432 18 : if (!SWIG_IsOK(res1)) {
24433 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24434 : }
24435 18 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24436 18 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
24437 18 : if (!SWIG_IsOK(res2)) {
24438 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetCoordinatePrecision" "', argument " "2"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
24439 : }
24440 18 : arg2 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp2);
24441 18 : {
24442 18 : const int bLocalUseExceptions = GetUseExceptions();
24443 18 : if ( bLocalUseExceptions ) {
24444 13 : pushErrorHandler();
24445 : }
24446 18 : {
24447 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24448 18 : OGRGeomFieldDefnShadow_SetCoordinatePrecision(arg1,arg2);
24449 18 : SWIG_PYTHON_THREAD_END_ALLOW;
24450 : }
24451 18 : if ( bLocalUseExceptions ) {
24452 13 : popErrorHandler();
24453 : }
24454 : #ifndef SED_HACKS
24455 : if ( bLocalUseExceptions ) {
24456 : CPLErr eclass = CPLGetLastErrorType();
24457 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24458 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24459 : }
24460 : }
24461 : #endif
24462 : }
24463 18 : resultobj = SWIG_Py_Void();
24464 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24465 : return resultobj;
24466 : fail:
24467 : return NULL;
24468 : }
24469 :
24470 :
24471 277 : SWIGINTERN PyObject *GeomFieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24472 277 : PyObject *obj;
24473 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
24474 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_NewClientData(obj));
24475 277 : return SWIG_Py_Void();
24476 : }
24477 :
24478 183 : SWIGINTERN PyObject *GeomFieldDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24479 183 : return SWIG_Python_InitShadowInstance(args);
24480 : }
24481 :
24482 31028 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
24483 31028 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24484 31028 : size_t arg1 ;
24485 31028 : char *arg2 = (char *) 0 ;
24486 31028 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
24487 31028 : int alloc1 = 0 ;
24488 31028 : bool viewIsValid1 = false ;
24489 31028 : Py_buffer view1 ;
24490 31028 : void *argp3 = 0 ;
24491 31028 : int res3 = 0 ;
24492 31028 : PyObject * obj0 = 0 ;
24493 31028 : PyObject * obj1 = 0 ;
24494 31028 : char * kwnames[] = {
24495 : (char *)"len", (char *)"reference", NULL
24496 : };
24497 31028 : OGRGeometryShadow *result = 0 ;
24498 :
24499 31028 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:CreateGeometryFromWkb", kwnames, &obj0, &obj1)) SWIG_fail;
24500 31028 : {
24501 : /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
24502 31028 : char* ptr = NULL;
24503 31028 : if( !GetBufferAsCharPtrSizetSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
24504 0 : SWIG_fail;
24505 : }
24506 31028 : arg2 = (char *)ptr;
24507 : }
24508 31028 : if (obj1) {
24509 0 : res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
24510 0 : if (!SWIG_IsOK(res3)) {
24511 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateGeometryFromWkb" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
24512 : }
24513 0 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
24514 : }
24515 31028 : {
24516 31028 : const int bLocalUseExceptions = GetUseExceptions();
24517 31028 : if ( bLocalUseExceptions ) {
24518 336 : pushErrorHandler();
24519 : }
24520 31028 : {
24521 31028 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24522 31028 : result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
24523 31028 : SWIG_PYTHON_THREAD_END_ALLOW;
24524 : }
24525 31028 : if ( bLocalUseExceptions ) {
24526 336 : popErrorHandler();
24527 : }
24528 : #ifndef SED_HACKS
24529 : if ( bLocalUseExceptions ) {
24530 : CPLErr eclass = CPLGetLastErrorType();
24531 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24532 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24533 : }
24534 : }
24535 : #endif
24536 : }
24537 31028 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24538 31028 : {
24539 : /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
24540 31028 : if( viewIsValid1 ) {
24541 31021 : PyBuffer_Release(&view1);
24542 : }
24543 7 : else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
24544 7 : delete[] arg2;
24545 : }
24546 : }
24547 31030 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24548 : return resultobj;
24549 0 : fail:
24550 0 : {
24551 : /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
24552 0 : if( viewIsValid1 ) {
24553 0 : PyBuffer_Release(&view1);
24554 : }
24555 31028 : else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
24556 0 : delete[] arg2;
24557 : }
24558 : }
24559 : return NULL;
24560 : }
24561 :
24562 :
24563 115832 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
24564 115832 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24565 115832 : char **arg1 = (char **) 0 ;
24566 115832 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
24567 115832 : char *val1 ;
24568 115832 : void *argp2 = 0 ;
24569 115832 : int res2 = 0 ;
24570 115832 : PyObject * obj0 = 0 ;
24571 115832 : PyObject * obj1 = 0 ;
24572 115832 : char * kwnames[] = {
24573 : (char *)"val", (char *)"reference", NULL
24574 : };
24575 115832 : OGRGeometryShadow *result = 0 ;
24576 :
24577 115832 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:CreateGeometryFromWkt", kwnames, &obj0, &obj1)) SWIG_fail;
24578 115832 : {
24579 : /* %typemap(in) (char **ignorechange) */
24580 115832 : if( !PyArg_Parse( obj0, "s", &val1 ) ) {
24581 0 : PyErr_SetString( PyExc_TypeError, "not a string" );
24582 0 : SWIG_fail;
24583 : }
24584 115832 : arg1 = &val1;
24585 : }
24586 115832 : if (obj1) {
24587 187 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
24588 187 : if (!SWIG_IsOK(res2)) {
24589 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGeometryFromWkt" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
24590 : }
24591 187 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
24592 : }
24593 115832 : {
24594 115832 : const int bLocalUseExceptions = GetUseExceptions();
24595 115832 : if ( bLocalUseExceptions ) {
24596 60030 : pushErrorHandler();
24597 : }
24598 115832 : {
24599 115832 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24600 115832 : result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
24601 115832 : SWIG_PYTHON_THREAD_END_ALLOW;
24602 : }
24603 115832 : if ( bLocalUseExceptions ) {
24604 60030 : popErrorHandler();
24605 : }
24606 : #ifndef SED_HACKS
24607 : if ( bLocalUseExceptions ) {
24608 : CPLErr eclass = CPLGetLastErrorType();
24609 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24610 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24611 : }
24612 : }
24613 : #endif
24614 : }
24615 115832 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24616 115834 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24617 : return resultobj;
24618 : fail:
24619 : return NULL;
24620 : }
24621 :
24622 :
24623 286 : SWIGINTERN PyObject *_wrap_CreateGeometryFromGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24624 286 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24625 286 : char *arg1 = (char *) 0 ;
24626 286 : int res1 ;
24627 286 : char *buf1 = 0 ;
24628 286 : int alloc1 = 0 ;
24629 286 : PyObject *swig_obj[1] ;
24630 286 : OGRGeometryShadow *result = 0 ;
24631 :
24632 286 : if (!args) SWIG_fail;
24633 286 : swig_obj[0] = args;
24634 286 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
24635 286 : if (!SWIG_IsOK(res1)) {
24636 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromGML" "', argument " "1"" of type '" "char const *""'");
24637 : }
24638 286 : arg1 = reinterpret_cast< char * >(buf1);
24639 286 : {
24640 286 : const int bLocalUseExceptions = GetUseExceptions();
24641 286 : if ( bLocalUseExceptions ) {
24642 139 : pushErrorHandler();
24643 : }
24644 286 : {
24645 286 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24646 286 : result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
24647 286 : SWIG_PYTHON_THREAD_END_ALLOW;
24648 : }
24649 286 : if ( bLocalUseExceptions ) {
24650 139 : popErrorHandler();
24651 : }
24652 : #ifndef SED_HACKS
24653 : if ( bLocalUseExceptions ) {
24654 : CPLErr eclass = CPLGetLastErrorType();
24655 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24656 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24657 : }
24658 : }
24659 : #endif
24660 : }
24661 286 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24662 286 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24663 288 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24664 : return resultobj;
24665 0 : fail:
24666 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24667 : return NULL;
24668 : }
24669 :
24670 :
24671 42 : SWIGINTERN PyObject *_wrap_CreateGeometryFromJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24672 42 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24673 42 : char *arg1 = (char *) 0 ;
24674 42 : int res1 ;
24675 42 : char *buf1 = 0 ;
24676 42 : int alloc1 = 0 ;
24677 42 : PyObject *swig_obj[1] ;
24678 42 : OGRGeometryShadow *result = 0 ;
24679 :
24680 42 : if (!args) SWIG_fail;
24681 42 : swig_obj[0] = args;
24682 42 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
24683 42 : if (!SWIG_IsOK(res1)) {
24684 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromJson" "', argument " "1"" of type '" "char const *""'");
24685 : }
24686 42 : arg1 = reinterpret_cast< char * >(buf1);
24687 42 : {
24688 42 : const int bLocalUseExceptions = GetUseExceptions();
24689 42 : if ( bLocalUseExceptions ) {
24690 42 : pushErrorHandler();
24691 : }
24692 42 : {
24693 42 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24694 42 : result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
24695 42 : SWIG_PYTHON_THREAD_END_ALLOW;
24696 : }
24697 42 : if ( bLocalUseExceptions ) {
24698 42 : popErrorHandler();
24699 : }
24700 : #ifndef SED_HACKS
24701 : if ( bLocalUseExceptions ) {
24702 : CPLErr eclass = CPLGetLastErrorType();
24703 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24704 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24705 : }
24706 : }
24707 : #endif
24708 : }
24709 42 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24710 42 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24711 42 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24712 : return resultobj;
24713 0 : fail:
24714 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24715 : return NULL;
24716 : }
24717 :
24718 :
24719 2 : SWIGINTERN PyObject *_wrap_CreateGeometryFromEsriJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24720 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24721 2 : char *arg1 = (char *) 0 ;
24722 2 : int res1 ;
24723 2 : char *buf1 = 0 ;
24724 2 : int alloc1 = 0 ;
24725 2 : PyObject *swig_obj[1] ;
24726 2 : OGRGeometryShadow *result = 0 ;
24727 :
24728 2 : if (!args) SWIG_fail;
24729 2 : swig_obj[0] = args;
24730 2 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
24731 2 : if (!SWIG_IsOK(res1)) {
24732 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromEsriJson" "', argument " "1"" of type '" "char const *""'");
24733 : }
24734 2 : arg1 = reinterpret_cast< char * >(buf1);
24735 2 : {
24736 2 : const int bLocalUseExceptions = GetUseExceptions();
24737 2 : if ( bLocalUseExceptions ) {
24738 2 : pushErrorHandler();
24739 : }
24740 2 : {
24741 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24742 2 : result = (OGRGeometryShadow *)CreateGeometryFromEsriJson((char const *)arg1);
24743 2 : SWIG_PYTHON_THREAD_END_ALLOW;
24744 : }
24745 2 : if ( bLocalUseExceptions ) {
24746 2 : popErrorHandler();
24747 : }
24748 : #ifndef SED_HACKS
24749 : if ( bLocalUseExceptions ) {
24750 : CPLErr eclass = CPLGetLastErrorType();
24751 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24752 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24753 : }
24754 : }
24755 : #endif
24756 : }
24757 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24758 2 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24759 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24760 : return resultobj;
24761 0 : fail:
24762 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24763 : return NULL;
24764 : }
24765 :
24766 :
24767 1 : SWIGINTERN PyObject *_wrap_CreateGeometryFromEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24768 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24769 1 : double arg1 ;
24770 1 : double arg2 ;
24771 1 : double arg3 ;
24772 1 : double arg4 ;
24773 1 : OSRSpatialReferenceShadow *arg5 = (OSRSpatialReferenceShadow *) nullptr ;
24774 1 : double val1 ;
24775 1 : int ecode1 = 0 ;
24776 1 : double val2 ;
24777 1 : int ecode2 = 0 ;
24778 1 : double val3 ;
24779 1 : int ecode3 = 0 ;
24780 1 : double val4 ;
24781 1 : int ecode4 = 0 ;
24782 1 : void *argp5 = 0 ;
24783 1 : int res5 = 0 ;
24784 1 : PyObject *swig_obj[5] ;
24785 1 : OGRGeometryShadow *result = 0 ;
24786 :
24787 1 : if (!SWIG_Python_UnpackTuple(args, "CreateGeometryFromEnvelope", 4, 5, swig_obj)) SWIG_fail;
24788 1 : ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
24789 1 : if (!SWIG_IsOK(ecode1)) {
24790 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "CreateGeometryFromEnvelope" "', argument " "1"" of type '" "double""'");
24791 : }
24792 1 : arg1 = static_cast< double >(val1);
24793 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
24794 1 : if (!SWIG_IsOK(ecode2)) {
24795 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CreateGeometryFromEnvelope" "', argument " "2"" of type '" "double""'");
24796 : }
24797 1 : arg2 = static_cast< double >(val2);
24798 1 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
24799 1 : if (!SWIG_IsOK(ecode3)) {
24800 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateGeometryFromEnvelope" "', argument " "3"" of type '" "double""'");
24801 : }
24802 1 : arg3 = static_cast< double >(val3);
24803 1 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
24804 1 : if (!SWIG_IsOK(ecode4)) {
24805 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateGeometryFromEnvelope" "', argument " "4"" of type '" "double""'");
24806 : }
24807 1 : arg4 = static_cast< double >(val4);
24808 1 : if (swig_obj[4]) {
24809 1 : res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
24810 1 : if (!SWIG_IsOK(res5)) {
24811 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CreateGeometryFromEnvelope" "', argument " "5"" of type '" "OSRSpatialReferenceShadow *""'");
24812 : }
24813 1 : arg5 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp5);
24814 : }
24815 1 : {
24816 1 : const int bLocalUseExceptions = GetUseExceptions();
24817 1 : if ( bLocalUseExceptions ) {
24818 0 : pushErrorHandler();
24819 : }
24820 1 : {
24821 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24822 1 : result = (OGRGeometryShadow *)CreateGeometryFromEnvelope(arg1,arg2,arg3,arg4,arg5);
24823 1 : SWIG_PYTHON_THREAD_END_ALLOW;
24824 : }
24825 1 : if ( bLocalUseExceptions ) {
24826 0 : popErrorHandler();
24827 : }
24828 : #ifndef SED_HACKS
24829 : if ( bLocalUseExceptions ) {
24830 : CPLErr eclass = CPLGetLastErrorType();
24831 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24832 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24833 : }
24834 : }
24835 : #endif
24836 : }
24837 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24838 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24839 : return resultobj;
24840 : fail:
24841 : return NULL;
24842 : }
24843 :
24844 :
24845 5 : SWIGINTERN PyObject *_wrap_BuildPolygonFromEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
24846 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24847 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
24848 5 : int arg2 = (int) 0 ;
24849 5 : int arg3 = (int) 0 ;
24850 5 : double arg4 = (double) 0 ;
24851 5 : void *argp1 = 0 ;
24852 5 : int res1 = 0 ;
24853 5 : int val2 ;
24854 5 : int ecode2 = 0 ;
24855 5 : int val3 ;
24856 5 : int ecode3 = 0 ;
24857 5 : double val4 ;
24858 5 : int ecode4 = 0 ;
24859 5 : PyObject * obj0 = 0 ;
24860 5 : PyObject * obj1 = 0 ;
24861 5 : PyObject * obj2 = 0 ;
24862 5 : PyObject * obj3 = 0 ;
24863 5 : char * kwnames[] = {
24864 : (char *)"hLineCollection", (char *)"bBestEffort", (char *)"bAutoClose", (char *)"dfTolerance", NULL
24865 : };
24866 5 : OGRGeometryShadow *result = 0 ;
24867 :
24868 5 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:BuildPolygonFromEdges", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
24869 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
24870 5 : if (!SWIG_IsOK(res1)) {
24871 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BuildPolygonFromEdges" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
24872 : }
24873 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
24874 5 : if (obj1) {
24875 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
24876 0 : if (!SWIG_IsOK(ecode2)) {
24877 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BuildPolygonFromEdges" "', argument " "2"" of type '" "int""'");
24878 : }
24879 : arg2 = static_cast< int >(val2);
24880 : }
24881 5 : if (obj2) {
24882 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
24883 0 : if (!SWIG_IsOK(ecode3)) {
24884 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BuildPolygonFromEdges" "', argument " "3"" of type '" "int""'");
24885 : }
24886 : arg3 = static_cast< int >(val3);
24887 : }
24888 5 : if (obj3) {
24889 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
24890 0 : if (!SWIG_IsOK(ecode4)) {
24891 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BuildPolygonFromEdges" "', argument " "4"" of type '" "double""'");
24892 : }
24893 0 : arg4 = static_cast< double >(val4);
24894 : }
24895 5 : {
24896 5 : const int bLocalUseExceptions = GetUseExceptions();
24897 5 : if ( bLocalUseExceptions ) {
24898 0 : pushErrorHandler();
24899 : }
24900 5 : {
24901 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24902 5 : result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
24903 5 : SWIG_PYTHON_THREAD_END_ALLOW;
24904 : }
24905 5 : if ( bLocalUseExceptions ) {
24906 0 : popErrorHandler();
24907 : }
24908 : #ifndef SED_HACKS
24909 : if ( bLocalUseExceptions ) {
24910 : CPLErr eclass = CPLGetLastErrorType();
24911 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24912 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24913 : }
24914 : }
24915 : #endif
24916 : }
24917 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24918 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
24919 : return resultobj;
24920 : fail:
24921 : return NULL;
24922 : }
24923 :
24924 :
24925 1 : SWIGINTERN PyObject *_wrap_ApproximateArcAngles(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
24926 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24927 1 : double arg1 ;
24928 1 : double arg2 ;
24929 1 : double arg3 ;
24930 1 : double arg4 ;
24931 1 : double arg5 ;
24932 1 : double arg6 ;
24933 1 : double arg7 ;
24934 1 : double arg8 ;
24935 1 : double arg9 ;
24936 1 : double val1 ;
24937 1 : int ecode1 = 0 ;
24938 1 : double val2 ;
24939 1 : int ecode2 = 0 ;
24940 1 : double val3 ;
24941 1 : int ecode3 = 0 ;
24942 1 : double val4 ;
24943 1 : int ecode4 = 0 ;
24944 1 : double val5 ;
24945 1 : int ecode5 = 0 ;
24946 1 : double val6 ;
24947 1 : int ecode6 = 0 ;
24948 1 : double val7 ;
24949 1 : int ecode7 = 0 ;
24950 1 : double val8 ;
24951 1 : int ecode8 = 0 ;
24952 1 : double val9 ;
24953 1 : int ecode9 = 0 ;
24954 1 : PyObject * obj0 = 0 ;
24955 1 : PyObject * obj1 = 0 ;
24956 1 : PyObject * obj2 = 0 ;
24957 1 : PyObject * obj3 = 0 ;
24958 1 : PyObject * obj4 = 0 ;
24959 1 : PyObject * obj5 = 0 ;
24960 1 : PyObject * obj6 = 0 ;
24961 1 : PyObject * obj7 = 0 ;
24962 1 : PyObject * obj8 = 0 ;
24963 1 : char * kwnames[] = {
24964 : (char *)"dfCenterX", (char *)"dfCenterY", (char *)"dfZ", (char *)"dfPrimaryRadius", (char *)"dfSecondaryAxis", (char *)"dfRotation", (char *)"dfStartAngle", (char *)"dfEndAngle", (char *)"dfMaxAngleStepSizeDegrees", NULL
24965 : };
24966 1 : OGRGeometryShadow *result = 0 ;
24967 :
24968 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:ApproximateArcAngles", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
24969 1 : ecode1 = SWIG_AsVal_double(obj0, &val1);
24970 1 : if (!SWIG_IsOK(ecode1)) {
24971 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ApproximateArcAngles" "', argument " "1"" of type '" "double""'");
24972 : }
24973 1 : arg1 = static_cast< double >(val1);
24974 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
24975 1 : if (!SWIG_IsOK(ecode2)) {
24976 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApproximateArcAngles" "', argument " "2"" of type '" "double""'");
24977 : }
24978 1 : arg2 = static_cast< double >(val2);
24979 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
24980 1 : if (!SWIG_IsOK(ecode3)) {
24981 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApproximateArcAngles" "', argument " "3"" of type '" "double""'");
24982 : }
24983 1 : arg3 = static_cast< double >(val3);
24984 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
24985 1 : if (!SWIG_IsOK(ecode4)) {
24986 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ApproximateArcAngles" "', argument " "4"" of type '" "double""'");
24987 : }
24988 1 : arg4 = static_cast< double >(val4);
24989 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
24990 1 : if (!SWIG_IsOK(ecode5)) {
24991 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ApproximateArcAngles" "', argument " "5"" of type '" "double""'");
24992 : }
24993 1 : arg5 = static_cast< double >(val5);
24994 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
24995 1 : if (!SWIG_IsOK(ecode6)) {
24996 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ApproximateArcAngles" "', argument " "6"" of type '" "double""'");
24997 : }
24998 1 : arg6 = static_cast< double >(val6);
24999 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
25000 1 : if (!SWIG_IsOK(ecode7)) {
25001 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ApproximateArcAngles" "', argument " "7"" of type '" "double""'");
25002 : }
25003 1 : arg7 = static_cast< double >(val7);
25004 1 : ecode8 = SWIG_AsVal_double(obj7, &val8);
25005 1 : if (!SWIG_IsOK(ecode8)) {
25006 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ApproximateArcAngles" "', argument " "8"" of type '" "double""'");
25007 : }
25008 1 : arg8 = static_cast< double >(val8);
25009 1 : ecode9 = SWIG_AsVal_double(obj8, &val9);
25010 1 : if (!SWIG_IsOK(ecode9)) {
25011 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ApproximateArcAngles" "', argument " "9"" of type '" "double""'");
25012 : }
25013 1 : arg9 = static_cast< double >(val9);
25014 1 : {
25015 1 : const int bLocalUseExceptions = GetUseExceptions();
25016 1 : if ( bLocalUseExceptions ) {
25017 1 : pushErrorHandler();
25018 : }
25019 1 : {
25020 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25021 1 : result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
25022 1 : SWIG_PYTHON_THREAD_END_ALLOW;
25023 : }
25024 1 : if ( bLocalUseExceptions ) {
25025 1 : popErrorHandler();
25026 : }
25027 : #ifndef SED_HACKS
25028 : if ( bLocalUseExceptions ) {
25029 : CPLErr eclass = CPLGetLastErrorType();
25030 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25031 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25032 : }
25033 : }
25034 : #endif
25035 : }
25036 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25037 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25038 : return resultobj;
25039 : fail:
25040 : return NULL;
25041 : }
25042 :
25043 :
25044 46 : SWIGINTERN PyObject *_wrap_ForceToPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25045 46 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25046 46 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25047 46 : void *argp1 = 0 ;
25048 46 : int res1 = 0 ;
25049 46 : PyObject *swig_obj[1] ;
25050 46 : OGRGeometryShadow *result = 0 ;
25051 :
25052 46 : if (!args) SWIG_fail;
25053 46 : swig_obj[0] = args;
25054 46 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25055 46 : if (!SWIG_IsOK(res1)) {
25056 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25057 : }
25058 46 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25059 46 : {
25060 46 : const int bLocalUseExceptions = GetUseExceptions();
25061 46 : if ( bLocalUseExceptions ) {
25062 4 : pushErrorHandler();
25063 : }
25064 46 : {
25065 46 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25066 46 : result = (OGRGeometryShadow *)ForceToPolygon(arg1);
25067 46 : SWIG_PYTHON_THREAD_END_ALLOW;
25068 : }
25069 46 : if ( bLocalUseExceptions ) {
25070 4 : popErrorHandler();
25071 : }
25072 : #ifndef SED_HACKS
25073 : if ( bLocalUseExceptions ) {
25074 : CPLErr eclass = CPLGetLastErrorType();
25075 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25076 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25077 : }
25078 : }
25079 : #endif
25080 : }
25081 46 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25082 46 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25083 : return resultobj;
25084 : fail:
25085 : return NULL;
25086 : }
25087 :
25088 :
25089 60 : SWIGINTERN PyObject *_wrap_ForceToLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25090 60 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25091 60 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25092 60 : void *argp1 = 0 ;
25093 60 : int res1 = 0 ;
25094 60 : PyObject *swig_obj[1] ;
25095 60 : OGRGeometryShadow *result = 0 ;
25096 :
25097 60 : if (!args) SWIG_fail;
25098 60 : swig_obj[0] = args;
25099 60 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25100 60 : if (!SWIG_IsOK(res1)) {
25101 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25102 : }
25103 60 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25104 60 : {
25105 60 : const int bLocalUseExceptions = GetUseExceptions();
25106 60 : if ( bLocalUseExceptions ) {
25107 16 : pushErrorHandler();
25108 : }
25109 60 : {
25110 60 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25111 60 : result = (OGRGeometryShadow *)ForceToLineString(arg1);
25112 60 : SWIG_PYTHON_THREAD_END_ALLOW;
25113 : }
25114 60 : if ( bLocalUseExceptions ) {
25115 16 : popErrorHandler();
25116 : }
25117 : #ifndef SED_HACKS
25118 : if ( bLocalUseExceptions ) {
25119 : CPLErr eclass = CPLGetLastErrorType();
25120 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25121 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25122 : }
25123 : }
25124 : #endif
25125 : }
25126 60 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25127 60 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25128 : return resultobj;
25129 : fail:
25130 : return NULL;
25131 : }
25132 :
25133 :
25134 47 : SWIGINTERN PyObject *_wrap_ForceToMultiPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25135 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25136 47 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25137 47 : void *argp1 = 0 ;
25138 47 : int res1 = 0 ;
25139 47 : PyObject *swig_obj[1] ;
25140 47 : OGRGeometryShadow *result = 0 ;
25141 :
25142 47 : if (!args) SWIG_fail;
25143 47 : swig_obj[0] = args;
25144 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25145 47 : if (!SWIG_IsOK(res1)) {
25146 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25147 : }
25148 47 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25149 47 : {
25150 47 : const int bLocalUseExceptions = GetUseExceptions();
25151 47 : if ( bLocalUseExceptions ) {
25152 4 : pushErrorHandler();
25153 : }
25154 47 : {
25155 47 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25156 47 : result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
25157 47 : SWIG_PYTHON_THREAD_END_ALLOW;
25158 : }
25159 47 : if ( bLocalUseExceptions ) {
25160 4 : popErrorHandler();
25161 : }
25162 : #ifndef SED_HACKS
25163 : if ( bLocalUseExceptions ) {
25164 : CPLErr eclass = CPLGetLastErrorType();
25165 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25166 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25167 : }
25168 : }
25169 : #endif
25170 : }
25171 47 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25172 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25173 : return resultobj;
25174 : fail:
25175 : return NULL;
25176 : }
25177 :
25178 :
25179 42 : SWIGINTERN PyObject *_wrap_ForceToMultiPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25180 42 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25181 42 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25182 42 : void *argp1 = 0 ;
25183 42 : int res1 = 0 ;
25184 42 : PyObject *swig_obj[1] ;
25185 42 : OGRGeometryShadow *result = 0 ;
25186 :
25187 42 : if (!args) SWIG_fail;
25188 42 : swig_obj[0] = args;
25189 42 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25190 42 : if (!SWIG_IsOK(res1)) {
25191 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25192 : }
25193 42 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25194 42 : {
25195 42 : const int bLocalUseExceptions = GetUseExceptions();
25196 42 : if ( bLocalUseExceptions ) {
25197 2 : pushErrorHandler();
25198 : }
25199 42 : {
25200 42 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25201 42 : result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
25202 42 : SWIG_PYTHON_THREAD_END_ALLOW;
25203 : }
25204 42 : if ( bLocalUseExceptions ) {
25205 2 : popErrorHandler();
25206 : }
25207 : #ifndef SED_HACKS
25208 : if ( bLocalUseExceptions ) {
25209 : CPLErr eclass = CPLGetLastErrorType();
25210 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25211 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25212 : }
25213 : }
25214 : #endif
25215 : }
25216 42 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25217 42 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25218 : return resultobj;
25219 : fail:
25220 : return NULL;
25221 : }
25222 :
25223 :
25224 50 : SWIGINTERN PyObject *_wrap_ForceToMultiLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25225 50 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25226 50 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25227 50 : void *argp1 = 0 ;
25228 50 : int res1 = 0 ;
25229 50 : PyObject *swig_obj[1] ;
25230 50 : OGRGeometryShadow *result = 0 ;
25231 :
25232 50 : if (!args) SWIG_fail;
25233 50 : swig_obj[0] = args;
25234 50 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25235 50 : if (!SWIG_IsOK(res1)) {
25236 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25237 : }
25238 50 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25239 50 : {
25240 50 : const int bLocalUseExceptions = GetUseExceptions();
25241 50 : if ( bLocalUseExceptions ) {
25242 4 : pushErrorHandler();
25243 : }
25244 50 : {
25245 50 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25246 50 : result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
25247 50 : SWIG_PYTHON_THREAD_END_ALLOW;
25248 : }
25249 50 : if ( bLocalUseExceptions ) {
25250 4 : popErrorHandler();
25251 : }
25252 : #ifndef SED_HACKS
25253 : if ( bLocalUseExceptions ) {
25254 : CPLErr eclass = CPLGetLastErrorType();
25255 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25256 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25257 : }
25258 : }
25259 : #endif
25260 : }
25261 50 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25262 50 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25263 : return resultobj;
25264 : fail:
25265 : return NULL;
25266 : }
25267 :
25268 :
25269 831 : SWIGINTERN PyObject *_wrap_ForceTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25270 831 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25271 831 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25272 831 : OGRwkbGeometryType arg2 ;
25273 831 : char **arg3 = (char **) NULL ;
25274 831 : void *argp1 = 0 ;
25275 831 : int res1 = 0 ;
25276 831 : int val2 ;
25277 831 : int ecode2 = 0 ;
25278 831 : PyObject *swig_obj[3] ;
25279 831 : OGRGeometryShadow *result = 0 ;
25280 :
25281 831 : if (!SWIG_Python_UnpackTuple(args, "ForceTo", 2, 3, swig_obj)) SWIG_fail;
25282 831 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25283 831 : if (!SWIG_IsOK(res1)) {
25284 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25285 : }
25286 831 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25287 831 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
25288 831 : if (!SWIG_IsOK(ecode2)) {
25289 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ForceTo" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
25290 : }
25291 831 : arg2 = static_cast< OGRwkbGeometryType >(val2);
25292 831 : if (swig_obj[2]) {
25293 0 : {
25294 : /* %typemap(in) char **dict */
25295 0 : arg3 = NULL;
25296 0 : if ( PySequence_Check( swig_obj[2] ) ) {
25297 0 : int bErr = FALSE;
25298 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
25299 0 : if ( bErr )
25300 : {
25301 0 : SWIG_fail;
25302 : }
25303 : }
25304 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
25305 0 : int bErr = FALSE;
25306 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
25307 0 : if ( bErr )
25308 : {
25309 0 : SWIG_fail;
25310 : }
25311 : }
25312 : else {
25313 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
25314 0 : SWIG_fail;
25315 : }
25316 : }
25317 : }
25318 831 : {
25319 831 : const int bLocalUseExceptions = GetUseExceptions();
25320 831 : if ( bLocalUseExceptions ) {
25321 228 : pushErrorHandler();
25322 : }
25323 831 : {
25324 831 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25325 831 : result = (OGRGeometryShadow *)ForceTo(arg1,arg2,arg3);
25326 831 : SWIG_PYTHON_THREAD_END_ALLOW;
25327 : }
25328 831 : if ( bLocalUseExceptions ) {
25329 228 : popErrorHandler();
25330 : }
25331 : #ifndef SED_HACKS
25332 : if ( bLocalUseExceptions ) {
25333 : CPLErr eclass = CPLGetLastErrorType();
25334 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25335 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25336 : }
25337 : }
25338 : #endif
25339 : }
25340 831 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25341 831 : {
25342 : /* %typemap(freearg) char **dict */
25343 831 : CSLDestroy( arg3 );
25344 : }
25345 831 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25346 : return resultobj;
25347 0 : fail:
25348 0 : {
25349 : /* %typemap(freearg) char **dict */
25350 0 : CSLDestroy( arg3 );
25351 : }
25352 : return NULL;
25353 : }
25354 :
25355 :
25356 288179 : SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25357 288179 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25358 288179 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25359 288179 : void *argp1 = 0 ;
25360 288179 : int res1 = 0 ;
25361 288179 : PyObject *swig_obj[1] ;
25362 :
25363 288179 : if (!args) SWIG_fail;
25364 288179 : swig_obj[0] = args;
25365 288179 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
25366 288179 : if (!SWIG_IsOK(res1)) {
25367 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25368 : }
25369 288179 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25370 288179 : {
25371 288179 : const int bLocalUseExceptions = GetUseExceptions();
25372 288179 : if ( bLocalUseExceptions ) {
25373 232920 : pushErrorHandler();
25374 : }
25375 288179 : {
25376 288179 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25377 288179 : delete_OGRGeometryShadow(arg1);
25378 288179 : SWIG_PYTHON_THREAD_END_ALLOW;
25379 : }
25380 288179 : if ( bLocalUseExceptions ) {
25381 232920 : popErrorHandler();
25382 : }
25383 : #ifndef SED_HACKS
25384 : if ( bLocalUseExceptions ) {
25385 : CPLErr eclass = CPLGetLastErrorType();
25386 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25387 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25388 : }
25389 : }
25390 : #endif
25391 : }
25392 288179 : resultobj = SWIG_Py_Void();
25393 288179 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25394 : return resultobj;
25395 : fail:
25396 : return NULL;
25397 : }
25398 :
25399 :
25400 160979 : SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25401 160979 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25402 160979 : OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
25403 160979 : char *arg2 = (char *) 0 ;
25404 160979 : int arg3 = (int) 0 ;
25405 160979 : char *arg4 = (char *) 0 ;
25406 160979 : char *arg5 = (char *) 0 ;
25407 160979 : int val1 ;
25408 160979 : int ecode1 = 0 ;
25409 160979 : int res2 ;
25410 160979 : char *buf2 = 0 ;
25411 160979 : int alloc2 = 0 ;
25412 160979 : int alloc3 = 0 ;
25413 160979 : bool viewIsValid3 = false ;
25414 160979 : Py_buffer view3 ;
25415 160979 : int res5 ;
25416 160979 : char *buf5 = 0 ;
25417 160979 : int alloc5 = 0 ;
25418 160979 : PyObject * obj0 = 0 ;
25419 160979 : PyObject * obj1 = 0 ;
25420 160979 : PyObject * obj2 = 0 ;
25421 160979 : PyObject * obj3 = 0 ;
25422 160979 : char * kwnames[] = {
25423 : (char *)"type", (char *)"wkt", (char *)"wkb", (char *)"gml", NULL
25424 : };
25425 160979 : OGRGeometryShadow *result = 0 ;
25426 :
25427 160979 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOO:new_Geometry", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
25428 160979 : if (obj0) {
25429 160815 : ecode1 = SWIG_AsVal_int(obj0, &val1);
25430 160815 : if (!SWIG_IsOK(ecode1)) {
25431 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Geometry" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
25432 : }
25433 160815 : arg1 = static_cast< OGRwkbGeometryType >(val1);
25434 : }
25435 160979 : if (obj1) {
25436 163 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
25437 163 : if (!SWIG_IsOK(res2)) {
25438 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'");
25439 : }
25440 163 : arg2 = reinterpret_cast< char * >(buf2);
25441 : }
25442 160979 : if (obj2) {
25443 0 : {
25444 : /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
25445 0 : char* ptr = NULL;
25446 0 : if( !GetBufferAsCharPtrIntSize(obj2, &arg3, &ptr, &alloc3, &viewIsValid3, &view3) ) {
25447 0 : SWIG_fail;
25448 : }
25449 0 : arg4 = (char *)ptr;
25450 : }
25451 : }
25452 160979 : if (obj3) {
25453 0 : res5 = SWIG_AsCharPtrAndSize(obj3, &buf5, NULL, &alloc5);
25454 0 : if (!SWIG_IsOK(res5)) {
25455 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Geometry" "', argument " "5"" of type '" "char *""'");
25456 : }
25457 0 : arg5 = reinterpret_cast< char * >(buf5);
25458 : }
25459 160979 : {
25460 160979 : const int bLocalUseExceptions = GetUseExceptions();
25461 160979 : if ( bLocalUseExceptions ) {
25462 160739 : pushErrorHandler();
25463 : }
25464 160979 : {
25465 160979 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25466 160979 : result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
25467 160979 : SWIG_PYTHON_THREAD_END_ALLOW;
25468 : }
25469 160979 : if ( bLocalUseExceptions ) {
25470 160739 : popErrorHandler();
25471 : }
25472 : #ifndef SED_HACKS
25473 : if ( bLocalUseExceptions ) {
25474 : CPLErr eclass = CPLGetLastErrorType();
25475 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25476 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25477 : }
25478 : }
25479 : #endif
25480 : }
25481 160979 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_NEW | 0 );
25482 160979 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
25483 160979 : {
25484 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
25485 160979 : if( viewIsValid3 ) {
25486 0 : PyBuffer_Release(&view3);
25487 : }
25488 160979 : else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
25489 0 : delete[] arg4;
25490 : }
25491 : }
25492 160979 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
25493 160979 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25494 : return resultobj;
25495 0 : fail:
25496 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
25497 0 : {
25498 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
25499 0 : if( viewIsValid3 ) {
25500 0 : PyBuffer_Release(&view3);
25501 : }
25502 0 : else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
25503 0 : delete[] arg4;
25504 : }
25505 : }
25506 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
25507 : return NULL;
25508 : }
25509 :
25510 :
25511 2474 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25512 2474 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25513 2474 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25514 2474 : char **arg2 = (char **) 0 ;
25515 2474 : void *argp1 = 0 ;
25516 2474 : int res1 = 0 ;
25517 2474 : char *argout2 = 0 ;
25518 2474 : PyObject *swig_obj[1] ;
25519 2474 : OGRErr result;
25520 :
25521 2474 : {
25522 : /* %typemap(in,numinputs=0) (char **argout2) */
25523 2474 : arg2 = &argout2;
25524 : }
25525 2474 : if (!args) SWIG_fail;
25526 2474 : swig_obj[0] = args;
25527 2474 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25528 2474 : if (!SWIG_IsOK(res1)) {
25529 14 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25530 : }
25531 2467 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25532 2467 : {
25533 2467 : const int bLocalUseExceptions = GetUseExceptions();
25534 2467 : if ( bLocalUseExceptions ) {
25535 567 : pushErrorHandler();
25536 : }
25537 2467 : {
25538 2467 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25539 2467 : result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
25540 2467 : SWIG_PYTHON_THREAD_END_ALLOW;
25541 : }
25542 2467 : if ( bLocalUseExceptions ) {
25543 567 : popErrorHandler();
25544 : }
25545 : #ifndef SED_HACKS
25546 : if ( bLocalUseExceptions ) {
25547 : CPLErr eclass = CPLGetLastErrorType();
25548 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25549 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25550 : }
25551 : }
25552 : #endif
25553 : }
25554 2467 : {
25555 : /* %typemap(out) OGRErr */
25556 2467 : if ( result != 0 && GetUseExceptions()) {
25557 0 : const char* pszMessage = CPLGetLastErrorMsg();
25558 0 : if( pszMessage[0] != '\0' )
25559 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
25560 : else
25561 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
25562 0 : SWIG_fail;
25563 : }
25564 : }
25565 2467 : {
25566 : /* %typemap(argout) (char **argout) */
25567 2467 : PyObject *o;
25568 2467 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
25569 2467 : o = GDALPythonObjectFromCStr( *arg2 );
25570 : }
25571 : else {
25572 0 : o = Py_None;
25573 0 : Py_INCREF( o );
25574 : }
25575 : #if SWIG_VERSION >= 0x040300
25576 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
25577 : #else
25578 2467 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
25579 : #endif
25580 : }
25581 2467 : {
25582 : /* %typemap(freearg) (char **argout) */
25583 2467 : if ( *arg2 )
25584 2467 : CPLFree( *arg2 );
25585 : }
25586 2467 : {
25587 : /* %typemap(ret) OGRErr */
25588 4934 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
25589 0 : resultobj = PyInt_FromLong( result );
25590 : }
25591 : }
25592 2474 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25593 : return resultobj;
25594 7 : fail:
25595 7 : {
25596 : /* %typemap(freearg) (char **argout) */
25597 7 : if ( *arg2 )
25598 0 : CPLFree( *arg2 );
25599 : }
25600 : return NULL;
25601 : }
25602 :
25603 :
25604 5414 : SWIGINTERN PyObject *_wrap_Geometry_ExportToIsoWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25605 5414 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25606 5414 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25607 5414 : char **arg2 = (char **) 0 ;
25608 5414 : void *argp1 = 0 ;
25609 5414 : int res1 = 0 ;
25610 5414 : char *argout2 = 0 ;
25611 5414 : PyObject *swig_obj[1] ;
25612 5414 : OGRErr result;
25613 :
25614 5414 : {
25615 : /* %typemap(in,numinputs=0) (char **argout2) */
25616 5414 : arg2 = &argout2;
25617 : }
25618 5414 : if (!args) SWIG_fail;
25619 5414 : swig_obj[0] = args;
25620 5414 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25621 5414 : if (!SWIG_IsOK(res1)) {
25622 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToIsoWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25623 : }
25624 5414 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25625 5414 : {
25626 5414 : const int bLocalUseExceptions = GetUseExceptions();
25627 5414 : if ( bLocalUseExceptions ) {
25628 611 : pushErrorHandler();
25629 : }
25630 5414 : {
25631 5414 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25632 5414 : result = (OGRErr)OGRGeometryShadow_ExportToIsoWkt(arg1,arg2);
25633 5414 : SWIG_PYTHON_THREAD_END_ALLOW;
25634 : }
25635 5414 : if ( bLocalUseExceptions ) {
25636 611 : popErrorHandler();
25637 : }
25638 : #ifndef SED_HACKS
25639 : if ( bLocalUseExceptions ) {
25640 : CPLErr eclass = CPLGetLastErrorType();
25641 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25642 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25643 : }
25644 : }
25645 : #endif
25646 : }
25647 5414 : {
25648 : /* %typemap(out) OGRErr */
25649 5414 : if ( result != 0 && GetUseExceptions()) {
25650 0 : const char* pszMessage = CPLGetLastErrorMsg();
25651 0 : if( pszMessage[0] != '\0' )
25652 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
25653 : else
25654 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
25655 0 : SWIG_fail;
25656 : }
25657 : }
25658 5414 : {
25659 : /* %typemap(argout) (char **argout) */
25660 5414 : PyObject *o;
25661 5414 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
25662 5414 : o = GDALPythonObjectFromCStr( *arg2 );
25663 : }
25664 : else {
25665 0 : o = Py_None;
25666 0 : Py_INCREF( o );
25667 : }
25668 : #if SWIG_VERSION >= 0x040300
25669 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
25670 : #else
25671 5414 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
25672 : #endif
25673 : }
25674 5414 : {
25675 : /* %typemap(freearg) (char **argout) */
25676 5414 : if ( *arg2 )
25677 5414 : CPLFree( *arg2 );
25678 : }
25679 5414 : {
25680 : /* %typemap(ret) OGRErr */
25681 10828 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
25682 0 : resultobj = PyInt_FromLong( result );
25683 : }
25684 : }
25685 5414 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25686 : return resultobj;
25687 0 : fail:
25688 0 : {
25689 : /* %typemap(freearg) (char **argout) */
25690 0 : if ( *arg2 )
25691 0 : CPLFree( *arg2 );
25692 : }
25693 : return NULL;
25694 : }
25695 :
25696 :
25697 103 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25698 103 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25699 103 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25700 103 : size_t *arg2 = (size_t *) 0 ;
25701 103 : char **arg3 = (char **) 0 ;
25702 103 : OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbNDR ;
25703 103 : void *argp1 = 0 ;
25704 103 : int res1 = 0 ;
25705 103 : size_t nLen2 = 0 ;
25706 103 : char *pBuf2 = 0 ;
25707 103 : int val4 ;
25708 103 : int ecode4 = 0 ;
25709 103 : PyObject * obj0 = 0 ;
25710 103 : PyObject * obj1 = 0 ;
25711 103 : char * kwnames[] = {
25712 : (char *)"self", (char *)"byte_order", NULL
25713 : };
25714 103 : OGRErr result;
25715 :
25716 103 : {
25717 : /* %typemap(in,numinputs=0) (size_t *nLen2, char **pBuf2 ) */
25718 103 : arg2 = &nLen2;
25719 103 : arg3 = &pBuf2;
25720 : }
25721 103 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToWkb", kwnames, &obj0, &obj1)) SWIG_fail;
25722 103 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25723 103 : if (!SWIG_IsOK(res1)) {
25724 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25725 : }
25726 103 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25727 103 : if (obj1) {
25728 39 : ecode4 = SWIG_AsVal_int(obj1, &val4);
25729 39 : if (!SWIG_IsOK(ecode4)) {
25730 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
25731 : }
25732 39 : arg4 = static_cast< OGRwkbByteOrder >(val4);
25733 : }
25734 103 : {
25735 103 : const int bLocalUseExceptions = GetUseExceptions();
25736 103 : if ( bLocalUseExceptions ) {
25737 17 : pushErrorHandler();
25738 : }
25739 103 : {
25740 103 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25741 103 : result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
25742 103 : SWIG_PYTHON_THREAD_END_ALLOW;
25743 : }
25744 103 : if ( bLocalUseExceptions ) {
25745 17 : popErrorHandler();
25746 : }
25747 : #ifndef SED_HACKS
25748 : if ( bLocalUseExceptions ) {
25749 : CPLErr eclass = CPLGetLastErrorType();
25750 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25751 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25752 : }
25753 : }
25754 : #endif
25755 : }
25756 103 : {
25757 : /* %typemap(out) OGRErr */
25758 103 : if ( result != 0 && GetUseExceptions()) {
25759 0 : const char* pszMessage = CPLGetLastErrorMsg();
25760 0 : if( pszMessage[0] != '\0' )
25761 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
25762 : else
25763 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
25764 0 : SWIG_fail;
25765 : }
25766 : }
25767 103 : {
25768 : /* %typemap(argout) (size_t *nLen, char **pBuf ) */
25769 103 : Py_XDECREF(resultobj);
25770 103 : if( *arg3 ) {
25771 103 : resultobj = PyByteArray_FromStringAndSize( *arg3, *arg2 );
25772 : }
25773 : else {
25774 0 : resultobj = Py_None;
25775 0 : Py_INCREF(Py_None);
25776 : }
25777 : }
25778 103 : {
25779 : /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
25780 103 : VSIFree( *arg3 );
25781 : }
25782 103 : {
25783 : /* %typemap(ret) OGRErr */
25784 206 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
25785 0 : resultobj = PyInt_FromLong( result );
25786 : }
25787 : }
25788 103 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25789 : return resultobj;
25790 0 : fail:
25791 0 : {
25792 : /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
25793 0 : VSIFree( *arg3 );
25794 : }
25795 : return NULL;
25796 : }
25797 :
25798 :
25799 10570 : SWIGINTERN PyObject *_wrap_Geometry_ExportToIsoWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25800 10570 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25801 10570 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25802 10570 : size_t *arg2 = (size_t *) 0 ;
25803 10570 : char **arg3 = (char **) 0 ;
25804 10570 : OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbNDR ;
25805 10570 : void *argp1 = 0 ;
25806 10570 : int res1 = 0 ;
25807 10570 : size_t nLen2 = 0 ;
25808 10570 : char *pBuf2 = 0 ;
25809 10570 : int val4 ;
25810 10570 : int ecode4 = 0 ;
25811 10570 : PyObject * obj0 = 0 ;
25812 10570 : PyObject * obj1 = 0 ;
25813 10570 : char * kwnames[] = {
25814 : (char *)"self", (char *)"byte_order", NULL
25815 : };
25816 10570 : OGRErr result;
25817 :
25818 10570 : {
25819 : /* %typemap(in,numinputs=0) (size_t *nLen2, char **pBuf2 ) */
25820 10570 : arg2 = &nLen2;
25821 10570 : arg3 = &pBuf2;
25822 : }
25823 10570 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToIsoWkb", kwnames, &obj0, &obj1)) SWIG_fail;
25824 10570 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25825 10570 : if (!SWIG_IsOK(res1)) {
25826 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToIsoWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25827 : }
25828 10570 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25829 10570 : if (obj1) {
25830 0 : ecode4 = SWIG_AsVal_int(obj1, &val4);
25831 0 : if (!SWIG_IsOK(ecode4)) {
25832 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToIsoWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
25833 : }
25834 0 : arg4 = static_cast< OGRwkbByteOrder >(val4);
25835 : }
25836 10570 : {
25837 10570 : const int bLocalUseExceptions = GetUseExceptions();
25838 10570 : if ( bLocalUseExceptions ) {
25839 1 : pushErrorHandler();
25840 : }
25841 10570 : {
25842 10570 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25843 10570 : result = (OGRErr)OGRGeometryShadow_ExportToIsoWkb(arg1,arg2,arg3,arg4);
25844 10570 : SWIG_PYTHON_THREAD_END_ALLOW;
25845 : }
25846 10570 : if ( bLocalUseExceptions ) {
25847 1 : popErrorHandler();
25848 : }
25849 : #ifndef SED_HACKS
25850 : if ( bLocalUseExceptions ) {
25851 : CPLErr eclass = CPLGetLastErrorType();
25852 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25853 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25854 : }
25855 : }
25856 : #endif
25857 : }
25858 10570 : {
25859 : /* %typemap(out) OGRErr */
25860 10570 : if ( result != 0 && GetUseExceptions()) {
25861 0 : const char* pszMessage = CPLGetLastErrorMsg();
25862 0 : if( pszMessage[0] != '\0' )
25863 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
25864 : else
25865 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
25866 0 : SWIG_fail;
25867 : }
25868 : }
25869 10570 : {
25870 : /* %typemap(argout) (size_t *nLen, char **pBuf ) */
25871 10570 : Py_XDECREF(resultobj);
25872 10570 : if( *arg3 ) {
25873 10570 : resultobj = PyByteArray_FromStringAndSize( *arg3, *arg2 );
25874 : }
25875 : else {
25876 0 : resultobj = Py_None;
25877 0 : Py_INCREF(Py_None);
25878 : }
25879 : }
25880 10570 : {
25881 : /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
25882 10570 : VSIFree( *arg3 );
25883 : }
25884 10570 : {
25885 : /* %typemap(ret) OGRErr */
25886 21140 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
25887 0 : resultobj = PyInt_FromLong( result );
25888 : }
25889 : }
25890 10570 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25891 : return resultobj;
25892 0 : fail:
25893 0 : {
25894 : /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
25895 0 : VSIFree( *arg3 );
25896 : }
25897 : return NULL;
25898 : }
25899 :
25900 :
25901 66 : SWIGINTERN PyObject *_wrap_Geometry_ExportToGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25902 66 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25903 66 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25904 66 : char **arg2 = (char **) 0 ;
25905 66 : void *argp1 = 0 ;
25906 66 : int res1 = 0 ;
25907 66 : PyObject * obj0 = 0 ;
25908 66 : PyObject * obj1 = 0 ;
25909 66 : char * kwnames[] = {
25910 : (char *)"self", (char *)"options", NULL
25911 : };
25912 66 : retStringAndCPLFree *result = 0 ;
25913 :
25914 66 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToGML", kwnames, &obj0, &obj1)) SWIG_fail;
25915 66 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25916 66 : if (!SWIG_IsOK(res1)) {
25917 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToGML" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25918 : }
25919 66 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25920 66 : if (obj1) {
25921 42 : {
25922 : /* %typemap(in) char **dict */
25923 42 : arg2 = NULL;
25924 42 : if ( PySequence_Check( obj1 ) ) {
25925 42 : int bErr = FALSE;
25926 42 : arg2 = CSLFromPySequence(obj1, &bErr);
25927 42 : if ( bErr )
25928 : {
25929 0 : SWIG_fail;
25930 : }
25931 : }
25932 0 : else if ( PyMapping_Check( obj1 ) ) {
25933 0 : int bErr = FALSE;
25934 0 : arg2 = CSLFromPyMapping(obj1, &bErr);
25935 0 : if ( bErr )
25936 : {
25937 0 : SWIG_fail;
25938 : }
25939 : }
25940 : else {
25941 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
25942 0 : SWIG_fail;
25943 : }
25944 : }
25945 : }
25946 66 : {
25947 66 : const int bLocalUseExceptions = GetUseExceptions();
25948 66 : if ( bLocalUseExceptions ) {
25949 66 : pushErrorHandler();
25950 : }
25951 66 : {
25952 66 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25953 66 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML(arg1,arg2);
25954 66 : SWIG_PYTHON_THREAD_END_ALLOW;
25955 : }
25956 66 : if ( bLocalUseExceptions ) {
25957 66 : popErrorHandler();
25958 : }
25959 : #ifndef SED_HACKS
25960 : if ( bLocalUseExceptions ) {
25961 : CPLErr eclass = CPLGetLastErrorType();
25962 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25963 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25964 : }
25965 : }
25966 : #endif
25967 : }
25968 66 : {
25969 : /* %typemap(out) (retStringAndCPLFree*) */
25970 66 : Py_XDECREF(resultobj);
25971 66 : if(result)
25972 : {
25973 66 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
25974 66 : CPLFree(result);
25975 : }
25976 : else
25977 : {
25978 0 : resultobj = Py_None;
25979 0 : Py_INCREF(resultobj);
25980 : }
25981 : }
25982 66 : {
25983 : /* %typemap(freearg) char **dict */
25984 66 : CSLDestroy( arg2 );
25985 : }
25986 66 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
25987 : return resultobj;
25988 0 : fail:
25989 0 : {
25990 : /* %typemap(freearg) char **dict */
25991 0 : CSLDestroy( arg2 );
25992 : }
25993 : return NULL;
25994 : }
25995 :
25996 :
25997 0 : SWIGINTERN PyObject *_wrap_Geometry_ExportToKML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25998 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25999 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26000 0 : char *arg2 = (char *) NULL ;
26001 0 : void *argp1 = 0 ;
26002 0 : int res1 = 0 ;
26003 0 : int res2 ;
26004 0 : char *buf2 = 0 ;
26005 0 : int alloc2 = 0 ;
26006 0 : PyObject *swig_obj[2] ;
26007 0 : retStringAndCPLFree *result = 0 ;
26008 :
26009 0 : if (!SWIG_Python_UnpackTuple(args, "Geometry_ExportToKML", 1, 2, swig_obj)) SWIG_fail;
26010 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26011 0 : if (!SWIG_IsOK(res1)) {
26012 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToKML" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26013 : }
26014 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26015 0 : if (swig_obj[1]) {
26016 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
26017 0 : if (!SWIG_IsOK(res2)) {
26018 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_ExportToKML" "', argument " "2"" of type '" "char const *""'");
26019 : }
26020 0 : arg2 = reinterpret_cast< char * >(buf2);
26021 : }
26022 0 : {
26023 0 : const int bLocalUseExceptions = GetUseExceptions();
26024 0 : if ( bLocalUseExceptions ) {
26025 0 : pushErrorHandler();
26026 : }
26027 0 : {
26028 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26029 0 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
26030 0 : SWIG_PYTHON_THREAD_END_ALLOW;
26031 : }
26032 0 : if ( bLocalUseExceptions ) {
26033 0 : popErrorHandler();
26034 : }
26035 : #ifndef SED_HACKS
26036 : if ( bLocalUseExceptions ) {
26037 : CPLErr eclass = CPLGetLastErrorType();
26038 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26039 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26040 : }
26041 : }
26042 : #endif
26043 : }
26044 0 : {
26045 : /* %typemap(out) (retStringAndCPLFree*) */
26046 0 : Py_XDECREF(resultobj);
26047 0 : if(result)
26048 : {
26049 0 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
26050 0 : CPLFree(result);
26051 : }
26052 : else
26053 : {
26054 0 : resultobj = Py_None;
26055 0 : Py_INCREF(resultobj);
26056 : }
26057 : }
26058 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
26059 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26060 : return resultobj;
26061 0 : fail:
26062 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
26063 : return NULL;
26064 : }
26065 :
26066 :
26067 88 : SWIGINTERN PyObject *_wrap_Geometry_ExportToJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
26068 88 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26069 88 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26070 88 : char **arg2 = (char **) 0 ;
26071 88 : void *argp1 = 0 ;
26072 88 : int res1 = 0 ;
26073 88 : PyObject * obj0 = 0 ;
26074 88 : PyObject * obj1 = 0 ;
26075 88 : char * kwnames[] = {
26076 : (char *)"self", (char *)"options", NULL
26077 : };
26078 88 : retStringAndCPLFree *result = 0 ;
26079 :
26080 88 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToJson", kwnames, &obj0, &obj1)) SWIG_fail;
26081 88 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26082 88 : if (!SWIG_IsOK(res1)) {
26083 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToJson" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26084 : }
26085 88 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26086 88 : if (obj1) {
26087 34 : {
26088 : /* %typemap(in) char **dict */
26089 34 : arg2 = NULL;
26090 34 : if ( PySequence_Check( obj1 ) ) {
26091 34 : int bErr = FALSE;
26092 34 : arg2 = CSLFromPySequence(obj1, &bErr);
26093 34 : if ( bErr )
26094 : {
26095 0 : SWIG_fail;
26096 : }
26097 : }
26098 0 : else if ( PyMapping_Check( obj1 ) ) {
26099 0 : int bErr = FALSE;
26100 0 : arg2 = CSLFromPyMapping(obj1, &bErr);
26101 0 : if ( bErr )
26102 : {
26103 0 : SWIG_fail;
26104 : }
26105 : }
26106 : else {
26107 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
26108 0 : SWIG_fail;
26109 : }
26110 : }
26111 : }
26112 88 : {
26113 88 : const int bLocalUseExceptions = GetUseExceptions();
26114 88 : if ( bLocalUseExceptions ) {
26115 71 : pushErrorHandler();
26116 : }
26117 88 : {
26118 88 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26119 88 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
26120 88 : SWIG_PYTHON_THREAD_END_ALLOW;
26121 : }
26122 88 : if ( bLocalUseExceptions ) {
26123 71 : popErrorHandler();
26124 : }
26125 : #ifndef SED_HACKS
26126 : if ( bLocalUseExceptions ) {
26127 : CPLErr eclass = CPLGetLastErrorType();
26128 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26129 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26130 : }
26131 : }
26132 : #endif
26133 : }
26134 88 : {
26135 : /* %typemap(out) (retStringAndCPLFree*) */
26136 88 : Py_XDECREF(resultobj);
26137 88 : if(result)
26138 : {
26139 85 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
26140 85 : CPLFree(result);
26141 : }
26142 : else
26143 : {
26144 3 : resultobj = Py_None;
26145 3 : Py_INCREF(resultobj);
26146 : }
26147 : }
26148 88 : {
26149 : /* %typemap(freearg) char **dict */
26150 88 : CSLDestroy( arg2 );
26151 : }
26152 88 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26153 : return resultobj;
26154 0 : fail:
26155 0 : {
26156 : /* %typemap(freearg) char **dict */
26157 0 : CSLDestroy( arg2 );
26158 : }
26159 : return NULL;
26160 : }
26161 :
26162 :
26163 278 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
26164 278 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26165 278 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26166 278 : double arg2 ;
26167 278 : double arg3 ;
26168 278 : double arg4 = (double) 0 ;
26169 278 : void *argp1 = 0 ;
26170 278 : int res1 = 0 ;
26171 278 : double val2 ;
26172 278 : int ecode2 = 0 ;
26173 278 : double val3 ;
26174 278 : int ecode3 = 0 ;
26175 278 : double val4 ;
26176 278 : int ecode4 = 0 ;
26177 278 : PyObject * obj0 = 0 ;
26178 278 : PyObject * obj1 = 0 ;
26179 278 : PyObject * obj2 = 0 ;
26180 278 : PyObject * obj3 = 0 ;
26181 278 : char * kwnames[] = {
26182 : (char *)"self", (char *)"x", (char *)"y", (char *)"z", NULL
26183 : };
26184 :
26185 278 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Geometry_AddPoint", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
26186 278 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26187 278 : if (!SWIG_IsOK(res1)) {
26188 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26189 : }
26190 278 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26191 278 : ecode2 = SWIG_AsVal_double(obj1, &val2);
26192 278 : if (!SWIG_IsOK(ecode2)) {
26193 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint" "', argument " "2"" of type '" "double""'");
26194 : }
26195 278 : arg2 = static_cast< double >(val2);
26196 278 : ecode3 = SWIG_AsVal_double(obj2, &val3);
26197 278 : if (!SWIG_IsOK(ecode3)) {
26198 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint" "', argument " "3"" of type '" "double""'");
26199 : }
26200 278 : arg3 = static_cast< double >(val3);
26201 278 : if (obj3) {
26202 153 : ecode4 = SWIG_AsVal_double(obj3, &val4);
26203 153 : if (!SWIG_IsOK(ecode4)) {
26204 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPoint" "', argument " "4"" of type '" "double""'");
26205 : }
26206 153 : arg4 = static_cast< double >(val4);
26207 : }
26208 278 : {
26209 278 : const int bLocalUseExceptions = GetUseExceptions();
26210 278 : if ( bLocalUseExceptions ) {
26211 252 : pushErrorHandler();
26212 : }
26213 278 : {
26214 278 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26215 278 : OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
26216 278 : SWIG_PYTHON_THREAD_END_ALLOW;
26217 : }
26218 278 : if ( bLocalUseExceptions ) {
26219 252 : popErrorHandler();
26220 : }
26221 : #ifndef SED_HACKS
26222 : if ( bLocalUseExceptions ) {
26223 : CPLErr eclass = CPLGetLastErrorType();
26224 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26225 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26226 : }
26227 : }
26228 : #endif
26229 : }
26230 278 : resultobj = SWIG_Py_Void();
26231 278 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26232 : return resultobj;
26233 : fail:
26234 : return NULL;
26235 : }
26236 :
26237 :
26238 0 : SWIGINTERN PyObject *_wrap_Geometry_AddPointM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
26239 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26240 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26241 0 : double arg2 ;
26242 0 : double arg3 ;
26243 0 : double arg4 ;
26244 0 : void *argp1 = 0 ;
26245 0 : int res1 = 0 ;
26246 0 : double val2 ;
26247 0 : int ecode2 = 0 ;
26248 0 : double val3 ;
26249 0 : int ecode3 = 0 ;
26250 0 : double val4 ;
26251 0 : int ecode4 = 0 ;
26252 0 : PyObject * obj0 = 0 ;
26253 0 : PyObject * obj1 = 0 ;
26254 0 : PyObject * obj2 = 0 ;
26255 0 : PyObject * obj3 = 0 ;
26256 0 : char * kwnames[] = {
26257 : (char *)"self", (char *)"x", (char *)"y", (char *)"m", NULL
26258 : };
26259 :
26260 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:Geometry_AddPointM", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
26261 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26262 0 : if (!SWIG_IsOK(res1)) {
26263 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPointM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26264 : }
26265 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26266 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
26267 0 : if (!SWIG_IsOK(ecode2)) {
26268 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPointM" "', argument " "2"" of type '" "double""'");
26269 : }
26270 0 : arg2 = static_cast< double >(val2);
26271 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
26272 0 : if (!SWIG_IsOK(ecode3)) {
26273 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPointM" "', argument " "3"" of type '" "double""'");
26274 : }
26275 0 : arg3 = static_cast< double >(val3);
26276 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
26277 0 : if (!SWIG_IsOK(ecode4)) {
26278 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPointM" "', argument " "4"" of type '" "double""'");
26279 : }
26280 0 : arg4 = static_cast< double >(val4);
26281 0 : {
26282 0 : const int bLocalUseExceptions = GetUseExceptions();
26283 0 : if ( bLocalUseExceptions ) {
26284 0 : pushErrorHandler();
26285 : }
26286 0 : {
26287 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26288 0 : OGRGeometryShadow_AddPointM(arg1,arg2,arg3,arg4);
26289 0 : SWIG_PYTHON_THREAD_END_ALLOW;
26290 : }
26291 0 : if ( bLocalUseExceptions ) {
26292 0 : popErrorHandler();
26293 : }
26294 : #ifndef SED_HACKS
26295 : if ( bLocalUseExceptions ) {
26296 : CPLErr eclass = CPLGetLastErrorType();
26297 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26298 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26299 : }
26300 : }
26301 : #endif
26302 : }
26303 0 : resultobj = SWIG_Py_Void();
26304 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26305 : return resultobj;
26306 : fail:
26307 : return NULL;
26308 : }
26309 :
26310 :
26311 0 : SWIGINTERN PyObject *_wrap_Geometry_AddPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
26312 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26313 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26314 0 : double arg2 ;
26315 0 : double arg3 ;
26316 0 : double arg4 ;
26317 0 : double arg5 ;
26318 0 : void *argp1 = 0 ;
26319 0 : int res1 = 0 ;
26320 0 : double val2 ;
26321 0 : int ecode2 = 0 ;
26322 0 : double val3 ;
26323 0 : int ecode3 = 0 ;
26324 0 : double val4 ;
26325 0 : int ecode4 = 0 ;
26326 0 : double val5 ;
26327 0 : int ecode5 = 0 ;
26328 0 : PyObject * obj0 = 0 ;
26329 0 : PyObject * obj1 = 0 ;
26330 0 : PyObject * obj2 = 0 ;
26331 0 : PyObject * obj3 = 0 ;
26332 0 : PyObject * obj4 = 0 ;
26333 0 : char * kwnames[] = {
26334 : (char *)"self", (char *)"x", (char *)"y", (char *)"z", (char *)"m", NULL
26335 : };
26336 :
26337 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:Geometry_AddPointZM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
26338 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26339 0 : if (!SWIG_IsOK(res1)) {
26340 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26341 : }
26342 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26343 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
26344 0 : if (!SWIG_IsOK(ecode2)) {
26345 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPointZM" "', argument " "2"" of type '" "double""'");
26346 : }
26347 0 : arg2 = static_cast< double >(val2);
26348 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
26349 0 : if (!SWIG_IsOK(ecode3)) {
26350 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPointZM" "', argument " "3"" of type '" "double""'");
26351 : }
26352 0 : arg3 = static_cast< double >(val3);
26353 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
26354 0 : if (!SWIG_IsOK(ecode4)) {
26355 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPointZM" "', argument " "4"" of type '" "double""'");
26356 : }
26357 0 : arg4 = static_cast< double >(val4);
26358 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
26359 0 : if (!SWIG_IsOK(ecode5)) {
26360 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_AddPointZM" "', argument " "5"" of type '" "double""'");
26361 : }
26362 0 : arg5 = static_cast< double >(val5);
26363 0 : {
26364 0 : const int bLocalUseExceptions = GetUseExceptions();
26365 0 : if ( bLocalUseExceptions ) {
26366 0 : pushErrorHandler();
26367 : }
26368 0 : {
26369 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26370 0 : OGRGeometryShadow_AddPointZM(arg1,arg2,arg3,arg4,arg5);
26371 0 : SWIG_PYTHON_THREAD_END_ALLOW;
26372 : }
26373 0 : if ( bLocalUseExceptions ) {
26374 0 : popErrorHandler();
26375 : }
26376 : #ifndef SED_HACKS
26377 : if ( bLocalUseExceptions ) {
26378 : CPLErr eclass = CPLGetLastErrorType();
26379 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26380 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26381 : }
26382 : }
26383 : #endif
26384 : }
26385 0 : resultobj = SWIG_Py_Void();
26386 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26387 : return resultobj;
26388 : fail:
26389 : return NULL;
26390 : }
26391 :
26392 :
26393 1249 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26394 1249 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26395 1249 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26396 1249 : double arg2 ;
26397 1249 : double arg3 ;
26398 1249 : void *argp1 = 0 ;
26399 1249 : int res1 = 0 ;
26400 1249 : double val2 ;
26401 1249 : int ecode2 = 0 ;
26402 1249 : double val3 ;
26403 1249 : int ecode3 = 0 ;
26404 1249 : PyObject *swig_obj[3] ;
26405 :
26406 1249 : if (!SWIG_Python_UnpackTuple(args, "Geometry_AddPoint_2D", 3, 3, swig_obj)) SWIG_fail;
26407 1249 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26408 1249 : if (!SWIG_IsOK(res1)) {
26409 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26410 : }
26411 1249 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26412 1249 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
26413 1249 : if (!SWIG_IsOK(ecode2)) {
26414 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint_2D" "', argument " "2"" of type '" "double""'");
26415 : }
26416 1249 : arg2 = static_cast< double >(val2);
26417 1249 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
26418 1249 : if (!SWIG_IsOK(ecode3)) {
26419 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint_2D" "', argument " "3"" of type '" "double""'");
26420 : }
26421 1249 : arg3 = static_cast< double >(val3);
26422 1249 : {
26423 1249 : const int bLocalUseExceptions = GetUseExceptions();
26424 1249 : if ( bLocalUseExceptions ) {
26425 26 : pushErrorHandler();
26426 : }
26427 1249 : {
26428 1249 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26429 1249 : OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
26430 1249 : SWIG_PYTHON_THREAD_END_ALLOW;
26431 : }
26432 1249 : if ( bLocalUseExceptions ) {
26433 26 : popErrorHandler();
26434 : }
26435 : #ifndef SED_HACKS
26436 : if ( bLocalUseExceptions ) {
26437 : CPLErr eclass = CPLGetLastErrorType();
26438 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26439 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26440 : }
26441 : }
26442 : #endif
26443 : }
26444 1249 : resultobj = SWIG_Py_Void();
26445 1249 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26446 : return resultobj;
26447 : fail:
26448 : return NULL;
26449 : }
26450 :
26451 :
26452 9 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26453 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26454 9 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26455 9 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
26456 9 : void *argp1 = 0 ;
26457 9 : int res1 = 0 ;
26458 9 : int res2 = 0 ;
26459 9 : PyObject *swig_obj[2] ;
26460 9 : OGRErr result;
26461 :
26462 9 : if (!SWIG_Python_UnpackTuple(args, "Geometry_AddGeometryDirectly", 2, 2, swig_obj)) SWIG_fail;
26463 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26464 9 : if (!SWIG_IsOK(res1)) {
26465 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometryDirectly" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26466 : }
26467 9 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26468 9 : res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
26469 9 : if (!SWIG_IsOK(res2)) {
26470 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
26471 : }
26472 9 : {
26473 9 : if (!arg2) {
26474 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
26475 : }
26476 : }
26477 9 : {
26478 9 : const int bLocalUseExceptions = GetUseExceptions();
26479 9 : if ( bLocalUseExceptions ) {
26480 1 : pushErrorHandler();
26481 : }
26482 9 : {
26483 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26484 9 : result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
26485 9 : SWIG_PYTHON_THREAD_END_ALLOW;
26486 : }
26487 9 : if ( bLocalUseExceptions ) {
26488 1 : popErrorHandler();
26489 : }
26490 : #ifndef SED_HACKS
26491 : if ( bLocalUseExceptions ) {
26492 : CPLErr eclass = CPLGetLastErrorType();
26493 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26494 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26495 : }
26496 : }
26497 : #endif
26498 : }
26499 9 : {
26500 : /* %typemap(out) OGRErr */
26501 12 : if ( result != 0 && GetUseExceptions()) {
26502 0 : const char* pszMessage = CPLGetLastErrorMsg();
26503 0 : if( pszMessage[0] != '\0' )
26504 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
26505 : else
26506 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
26507 0 : SWIG_fail;
26508 : }
26509 : }
26510 9 : {
26511 : /* %typemap(ret) OGRErr */
26512 9 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
26513 9 : resultobj = PyInt_FromLong( result );
26514 : }
26515 : }
26516 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26517 : return resultobj;
26518 : fail:
26519 : return NULL;
26520 : }
26521 :
26522 :
26523 104 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26524 104 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26525 104 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26526 104 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
26527 104 : void *argp1 = 0 ;
26528 104 : int res1 = 0 ;
26529 104 : void *argp2 = 0 ;
26530 104 : int res2 = 0 ;
26531 104 : PyObject *swig_obj[2] ;
26532 104 : OGRErr result;
26533 :
26534 104 : if (!SWIG_Python_UnpackTuple(args, "Geometry_AddGeometry", 2, 2, swig_obj)) SWIG_fail;
26535 104 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26536 104 : if (!SWIG_IsOK(res1)) {
26537 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26538 : }
26539 104 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26540 104 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26541 104 : if (!SWIG_IsOK(res2)) {
26542 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
26543 : }
26544 104 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
26545 104 : {
26546 104 : if (!arg2) {
26547 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
26548 : }
26549 : }
26550 104 : {
26551 104 : const int bLocalUseExceptions = GetUseExceptions();
26552 104 : if ( bLocalUseExceptions ) {
26553 37 : pushErrorHandler();
26554 : }
26555 104 : {
26556 104 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26557 104 : result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
26558 104 : SWIG_PYTHON_THREAD_END_ALLOW;
26559 : }
26560 104 : if ( bLocalUseExceptions ) {
26561 37 : popErrorHandler();
26562 : }
26563 : #ifndef SED_HACKS
26564 : if ( bLocalUseExceptions ) {
26565 : CPLErr eclass = CPLGetLastErrorType();
26566 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26567 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26568 : }
26569 : }
26570 : #endif
26571 : }
26572 104 : {
26573 : /* %typemap(out) OGRErr */
26574 108 : if ( result != 0 && GetUseExceptions()) {
26575 0 : const char* pszMessage = CPLGetLastErrorMsg();
26576 0 : if( pszMessage[0] != '\0' )
26577 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
26578 : else
26579 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
26580 0 : SWIG_fail;
26581 : }
26582 : }
26583 104 : {
26584 : /* %typemap(ret) OGRErr */
26585 104 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
26586 104 : resultobj = PyInt_FromLong( result );
26587 : }
26588 : }
26589 104 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26590 : return resultobj;
26591 : fail:
26592 : return NULL;
26593 : }
26594 :
26595 :
26596 87 : SWIGINTERN PyObject *_wrap_Geometry_RemoveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26597 87 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26598 87 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26599 87 : int arg2 ;
26600 87 : void *argp1 = 0 ;
26601 87 : int res1 = 0 ;
26602 87 : int val2 ;
26603 87 : int ecode2 = 0 ;
26604 87 : PyObject *swig_obj[2] ;
26605 87 : OGRErr result;
26606 :
26607 87 : if (!SWIG_Python_UnpackTuple(args, "Geometry_RemoveGeometry", 2, 2, swig_obj)) SWIG_fail;
26608 87 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26609 87 : if (!SWIG_IsOK(res1)) {
26610 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_RemoveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26611 : }
26612 87 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26613 87 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
26614 87 : if (!SWIG_IsOK(ecode2)) {
26615 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_RemoveGeometry" "', argument " "2"" of type '" "int""'");
26616 : }
26617 87 : arg2 = static_cast< int >(val2);
26618 87 : {
26619 87 : const int bLocalUseExceptions = GetUseExceptions();
26620 87 : if ( bLocalUseExceptions ) {
26621 70 : pushErrorHandler();
26622 : }
26623 87 : {
26624 87 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26625 87 : result = (OGRErr)OGRGeometryShadow_RemoveGeometry(arg1,arg2);
26626 87 : SWIG_PYTHON_THREAD_END_ALLOW;
26627 : }
26628 87 : if ( bLocalUseExceptions ) {
26629 70 : popErrorHandler();
26630 : }
26631 : #ifndef SED_HACKS
26632 : if ( bLocalUseExceptions ) {
26633 : CPLErr eclass = CPLGetLastErrorType();
26634 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26635 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26636 : }
26637 : }
26638 : #endif
26639 : }
26640 87 : {
26641 : /* %typemap(out) OGRErr */
26642 94 : if ( result != 0 && GetUseExceptions()) {
26643 0 : const char* pszMessage = CPLGetLastErrorMsg();
26644 0 : if( pszMessage[0] != '\0' )
26645 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
26646 : else
26647 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
26648 0 : SWIG_fail;
26649 : }
26650 : }
26651 87 : {
26652 : /* %typemap(ret) OGRErr */
26653 87 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
26654 87 : resultobj = PyInt_FromLong( result );
26655 : }
26656 : }
26657 87 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26658 : return resultobj;
26659 : fail:
26660 : return NULL;
26661 : }
26662 :
26663 :
26664 12445 : SWIGINTERN PyObject *_wrap_Geometry_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26665 12445 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26666 12445 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26667 12445 : void *argp1 = 0 ;
26668 12445 : int res1 = 0 ;
26669 12445 : PyObject *swig_obj[1] ;
26670 12445 : OGRGeometryShadow *result = 0 ;
26671 :
26672 12445 : if (!args) SWIG_fail;
26673 12445 : swig_obj[0] = args;
26674 12445 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26675 12445 : if (!SWIG_IsOK(res1)) {
26676 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Clone" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26677 : }
26678 12445 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26679 12445 : {
26680 12445 : const int bLocalUseExceptions = GetUseExceptions();
26681 12445 : if ( bLocalUseExceptions ) {
26682 12374 : pushErrorHandler();
26683 : }
26684 12445 : {
26685 12445 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26686 12445 : result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
26687 12445 : SWIG_PYTHON_THREAD_END_ALLOW;
26688 : }
26689 12445 : if ( bLocalUseExceptions ) {
26690 12374 : popErrorHandler();
26691 : }
26692 : #ifndef SED_HACKS
26693 : if ( bLocalUseExceptions ) {
26694 : CPLErr eclass = CPLGetLastErrorType();
26695 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26696 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26697 : }
26698 : }
26699 : #endif
26700 : }
26701 12445 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
26702 12445 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26703 : return resultobj;
26704 : fail:
26705 : return NULL;
26706 : }
26707 :
26708 :
26709 3945 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26710 3945 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26711 3945 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26712 3945 : void *argp1 = 0 ;
26713 3945 : int res1 = 0 ;
26714 3945 : PyObject *swig_obj[1] ;
26715 3945 : OGRwkbGeometryType result;
26716 :
26717 3945 : if (!args) SWIG_fail;
26718 3945 : swig_obj[0] = args;
26719 3945 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26720 3945 : if (!SWIG_IsOK(res1)) {
26721 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryType" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26722 : }
26723 3945 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26724 3945 : {
26725 3945 : const int bLocalUseExceptions = GetUseExceptions();
26726 3945 : if ( bLocalUseExceptions ) {
26727 1425 : pushErrorHandler();
26728 : }
26729 3945 : {
26730 3945 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26731 3945 : result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
26732 3945 : SWIG_PYTHON_THREAD_END_ALLOW;
26733 : }
26734 3945 : if ( bLocalUseExceptions ) {
26735 1425 : popErrorHandler();
26736 : }
26737 : #ifndef SED_HACKS
26738 : if ( bLocalUseExceptions ) {
26739 : CPLErr eclass = CPLGetLastErrorType();
26740 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26741 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26742 : }
26743 : }
26744 : #endif
26745 : }
26746 3945 : resultobj = SWIG_From_int(static_cast< int >(result));
26747 3945 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26748 : return resultobj;
26749 : fail:
26750 : return NULL;
26751 : }
26752 :
26753 :
26754 16601 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26755 16601 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26756 16601 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26757 16601 : void *argp1 = 0 ;
26758 16601 : int res1 = 0 ;
26759 16601 : PyObject *swig_obj[1] ;
26760 16601 : char *result = 0 ;
26761 :
26762 16601 : if (!args) SWIG_fail;
26763 16601 : swig_obj[0] = args;
26764 16601 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26765 16601 : if (!SWIG_IsOK(res1)) {
26766 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryName" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26767 : }
26768 16601 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26769 16601 : {
26770 16601 : const int bLocalUseExceptions = GetUseExceptions();
26771 16601 : if ( bLocalUseExceptions ) {
26772 3 : pushErrorHandler();
26773 : }
26774 16601 : {
26775 16601 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26776 16601 : result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
26777 16601 : SWIG_PYTHON_THREAD_END_ALLOW;
26778 : }
26779 16601 : if ( bLocalUseExceptions ) {
26780 3 : popErrorHandler();
26781 : }
26782 : #ifndef SED_HACKS
26783 : if ( bLocalUseExceptions ) {
26784 : CPLErr eclass = CPLGetLastErrorType();
26785 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26786 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26787 : }
26788 : }
26789 : #endif
26790 : }
26791 16601 : resultobj = SWIG_FromCharPtr((const char *)result);
26792 16601 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26793 : return resultobj;
26794 : fail:
26795 : return NULL;
26796 : }
26797 :
26798 :
26799 28 : SWIGINTERN PyObject *_wrap_Geometry_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26800 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26801 28 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26802 28 : void *argp1 = 0 ;
26803 28 : int res1 = 0 ;
26804 28 : PyObject *swig_obj[1] ;
26805 28 : double result;
26806 :
26807 28 : if (!args) SWIG_fail;
26808 28 : swig_obj[0] = args;
26809 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26810 28 : if (!SWIG_IsOK(res1)) {
26811 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Length" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26812 : }
26813 28 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26814 28 : {
26815 28 : const int bLocalUseExceptions = GetUseExceptions();
26816 28 : if ( bLocalUseExceptions ) {
26817 7 : pushErrorHandler();
26818 : }
26819 28 : {
26820 28 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26821 28 : result = (double)OGRGeometryShadow_Length(arg1);
26822 28 : SWIG_PYTHON_THREAD_END_ALLOW;
26823 : }
26824 28 : if ( bLocalUseExceptions ) {
26825 7 : popErrorHandler();
26826 : }
26827 : #ifndef SED_HACKS
26828 : if ( bLocalUseExceptions ) {
26829 : CPLErr eclass = CPLGetLastErrorType();
26830 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26831 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26832 : }
26833 : }
26834 : #endif
26835 : }
26836 28 : resultobj = SWIG_From_double(static_cast< double >(result));
26837 28 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26838 : return resultobj;
26839 : fail:
26840 : return NULL;
26841 : }
26842 :
26843 :
26844 21 : SWIGINTERN PyObject *_wrap_Geometry_Area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26845 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26846 21 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26847 21 : void *argp1 = 0 ;
26848 21 : int res1 = 0 ;
26849 21 : PyObject *swig_obj[1] ;
26850 21 : double result;
26851 :
26852 21 : if (!args) SWIG_fail;
26853 21 : swig_obj[0] = args;
26854 21 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26855 21 : if (!SWIG_IsOK(res1)) {
26856 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Area" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26857 : }
26858 21 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26859 21 : {
26860 21 : const int bLocalUseExceptions = GetUseExceptions();
26861 21 : if ( bLocalUseExceptions ) {
26862 3 : pushErrorHandler();
26863 : }
26864 21 : {
26865 21 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26866 21 : result = (double)OGRGeometryShadow_Area(arg1);
26867 21 : SWIG_PYTHON_THREAD_END_ALLOW;
26868 : }
26869 21 : if ( bLocalUseExceptions ) {
26870 3 : popErrorHandler();
26871 : }
26872 : #ifndef SED_HACKS
26873 : if ( bLocalUseExceptions ) {
26874 : CPLErr eclass = CPLGetLastErrorType();
26875 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26876 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26877 : }
26878 : }
26879 : #endif
26880 : }
26881 21 : resultobj = SWIG_From_double(static_cast< double >(result));
26882 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26883 : return resultobj;
26884 : fail:
26885 : return NULL;
26886 : }
26887 :
26888 :
26889 25 : SWIGINTERN PyObject *_wrap_Geometry_GeodesicLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26890 25 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26891 25 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26892 25 : void *argp1 = 0 ;
26893 25 : int res1 = 0 ;
26894 25 : PyObject *swig_obj[1] ;
26895 25 : double result;
26896 :
26897 25 : if (!args) SWIG_fail;
26898 25 : swig_obj[0] = args;
26899 25 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26900 25 : if (!SWIG_IsOK(res1)) {
26901 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GeodesicLength" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26902 : }
26903 25 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26904 25 : {
26905 25 : const int bLocalUseExceptions = GetUseExceptions();
26906 25 : if ( bLocalUseExceptions ) {
26907 25 : pushErrorHandler();
26908 : }
26909 25 : {
26910 25 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26911 25 : result = (double)OGRGeometryShadow_GeodesicLength(arg1);
26912 25 : SWIG_PYTHON_THREAD_END_ALLOW;
26913 : }
26914 25 : if ( bLocalUseExceptions ) {
26915 25 : popErrorHandler();
26916 : }
26917 : #ifndef SED_HACKS
26918 : if ( bLocalUseExceptions ) {
26919 : CPLErr eclass = CPLGetLastErrorType();
26920 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26921 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26922 : }
26923 : }
26924 : #endif
26925 : }
26926 25 : resultobj = SWIG_From_double(static_cast< double >(result));
26927 35 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26928 : return resultobj;
26929 : fail:
26930 : return NULL;
26931 : }
26932 :
26933 :
26934 24 : SWIGINTERN PyObject *_wrap_Geometry_GeodesicArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26935 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26936 24 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26937 24 : void *argp1 = 0 ;
26938 24 : int res1 = 0 ;
26939 24 : PyObject *swig_obj[1] ;
26940 24 : double result;
26941 :
26942 24 : if (!args) SWIG_fail;
26943 24 : swig_obj[0] = args;
26944 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26945 24 : if (!SWIG_IsOK(res1)) {
26946 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GeodesicArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26947 : }
26948 24 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26949 24 : {
26950 24 : const int bLocalUseExceptions = GetUseExceptions();
26951 24 : if ( bLocalUseExceptions ) {
26952 24 : pushErrorHandler();
26953 : }
26954 24 : {
26955 24 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26956 24 : result = (double)OGRGeometryShadow_GeodesicArea(arg1);
26957 24 : SWIG_PYTHON_THREAD_END_ALLOW;
26958 : }
26959 24 : if ( bLocalUseExceptions ) {
26960 24 : popErrorHandler();
26961 : }
26962 : #ifndef SED_HACKS
26963 : if ( bLocalUseExceptions ) {
26964 : CPLErr eclass = CPLGetLastErrorType();
26965 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26966 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26967 : }
26968 : }
26969 : #endif
26970 : }
26971 24 : resultobj = SWIG_From_double(static_cast< double >(result));
26972 40 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
26973 : return resultobj;
26974 : fail:
26975 : return NULL;
26976 : }
26977 :
26978 :
26979 33 : SWIGINTERN PyObject *_wrap_Geometry_IsClockwise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26980 33 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26981 33 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26982 33 : void *argp1 = 0 ;
26983 33 : int res1 = 0 ;
26984 33 : PyObject *swig_obj[1] ;
26985 33 : bool result;
26986 :
26987 33 : if (!args) SWIG_fail;
26988 33 : swig_obj[0] = args;
26989 33 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26990 33 : if (!SWIG_IsOK(res1)) {
26991 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsClockwise" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26992 : }
26993 33 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26994 33 : {
26995 33 : const int bLocalUseExceptions = GetUseExceptions();
26996 33 : if ( bLocalUseExceptions ) {
26997 33 : pushErrorHandler();
26998 : }
26999 33 : {
27000 33 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27001 33 : result = (bool)OGRGeometryShadow_IsClockwise(arg1);
27002 33 : SWIG_PYTHON_THREAD_END_ALLOW;
27003 : }
27004 33 : if ( bLocalUseExceptions ) {
27005 33 : popErrorHandler();
27006 : }
27007 : #ifndef SED_HACKS
27008 : if ( bLocalUseExceptions ) {
27009 : CPLErr eclass = CPLGetLastErrorType();
27010 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27011 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27012 : }
27013 : }
27014 : #endif
27015 : }
27016 33 : resultobj = SWIG_From_bool(static_cast< bool >(result));
27017 35 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27018 : return resultobj;
27019 : fail:
27020 : return NULL;
27021 : }
27022 :
27023 :
27024 1413 : SWIGINTERN PyObject *_wrap_Geometry_GetArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27025 1413 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27026 1413 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27027 1413 : void *argp1 = 0 ;
27028 1413 : int res1 = 0 ;
27029 1413 : PyObject *swig_obj[1] ;
27030 1413 : double result;
27031 :
27032 1413 : if (!args) SWIG_fail;
27033 1413 : swig_obj[0] = args;
27034 1413 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27035 1413 : if (!SWIG_IsOK(res1)) {
27036 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27037 : }
27038 1413 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27039 1413 : {
27040 1413 : const int bLocalUseExceptions = GetUseExceptions();
27041 1413 : if ( bLocalUseExceptions ) {
27042 1407 : pushErrorHandler();
27043 : }
27044 1413 : {
27045 1413 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27046 1413 : result = (double)OGRGeometryShadow_GetArea(arg1);
27047 1413 : SWIG_PYTHON_THREAD_END_ALLOW;
27048 : }
27049 1413 : if ( bLocalUseExceptions ) {
27050 1407 : popErrorHandler();
27051 : }
27052 : #ifndef SED_HACKS
27053 : if ( bLocalUseExceptions ) {
27054 : CPLErr eclass = CPLGetLastErrorType();
27055 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27056 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27057 : }
27058 : }
27059 : #endif
27060 : }
27061 1413 : resultobj = SWIG_From_double(static_cast< double >(result));
27062 1413 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27063 : return resultobj;
27064 : fail:
27065 : return NULL;
27066 : }
27067 :
27068 :
27069 13175 : SWIGINTERN PyObject *_wrap_Geometry_GetPointCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27070 13175 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27071 13175 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27072 13175 : void *argp1 = 0 ;
27073 13175 : int res1 = 0 ;
27074 13175 : PyObject *swig_obj[1] ;
27075 13175 : int result;
27076 :
27077 13175 : if (!args) SWIG_fail;
27078 13175 : swig_obj[0] = args;
27079 13175 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27080 13175 : if (!SWIG_IsOK(res1)) {
27081 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27082 : }
27083 13175 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27084 13175 : {
27085 13175 : const int bLocalUseExceptions = GetUseExceptions();
27086 13175 : if ( bLocalUseExceptions ) {
27087 56 : pushErrorHandler();
27088 : }
27089 13175 : {
27090 13175 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27091 13175 : result = (int)OGRGeometryShadow_GetPointCount(arg1);
27092 13175 : SWIG_PYTHON_THREAD_END_ALLOW;
27093 : }
27094 13175 : if ( bLocalUseExceptions ) {
27095 56 : popErrorHandler();
27096 : }
27097 : #ifndef SED_HACKS
27098 : if ( bLocalUseExceptions ) {
27099 : CPLErr eclass = CPLGetLastErrorType();
27100 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27101 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27102 : }
27103 : }
27104 : #endif
27105 : }
27106 13175 : resultobj = SWIG_From_int(static_cast< int >(result));
27107 13175 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27108 : return resultobj;
27109 : fail:
27110 : return NULL;
27111 : }
27112 :
27113 :
27114 11 : SWIGINTERN PyObject *_wrap_Geometry_GetPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27115 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27116 11 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27117 11 : int *arg2 = (int *) 0 ;
27118 11 : double **arg3 = (double **) 0 ;
27119 11 : double **arg4 = (double **) 0 ;
27120 11 : int arg5 = (int) 0 ;
27121 11 : void *argp1 = 0 ;
27122 11 : int res1 = 0 ;
27123 11 : int nPoints2 = 0 ;
27124 11 : double *padfXY2 = NULL ;
27125 11 : double *padfZ2 = NULL ;
27126 11 : int val5 ;
27127 11 : int ecode5 = 0 ;
27128 11 : PyObject * obj0 = 0 ;
27129 11 : PyObject * obj1 = 0 ;
27130 11 : char * kwnames[] = {
27131 : (char *)"self", (char *)"nCoordDimension", NULL
27132 : };
27133 :
27134 11 : {
27135 : /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
27136 11 : arg2 = &nPoints2;
27137 11 : arg3 = &padfXY2;
27138 11 : arg4 = &padfZ2;
27139 : }
27140 11 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetPoints", kwnames, &obj0, &obj1)) SWIG_fail;
27141 11 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27142 11 : if (!SWIG_IsOK(res1)) {
27143 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoints" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27144 : }
27145 11 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27146 11 : if (obj1) {
27147 4 : ecode5 = SWIG_AsVal_int(obj1, &val5);
27148 4 : if (!SWIG_IsOK(ecode5)) {
27149 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_GetPoints" "', argument " "5"" of type '" "int""'");
27150 : }
27151 : arg5 = static_cast< int >(val5);
27152 : }
27153 11 : {
27154 11 : const int bLocalUseExceptions = GetUseExceptions();
27155 11 : if ( bLocalUseExceptions ) {
27156 2 : pushErrorHandler();
27157 : }
27158 11 : {
27159 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27160 11 : OGRGeometryShadow_GetPoints(arg1,arg2,arg3,arg4,arg5);
27161 11 : SWIG_PYTHON_THREAD_END_ALLOW;
27162 : }
27163 11 : if ( bLocalUseExceptions ) {
27164 2 : popErrorHandler();
27165 : }
27166 : #ifndef SED_HACKS
27167 : if ( bLocalUseExceptions ) {
27168 : CPLErr eclass = CPLGetLastErrorType();
27169 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27170 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27171 : }
27172 : }
27173 : #endif
27174 : }
27175 11 : resultobj = SWIG_Py_Void();
27176 11 : {
27177 : /* %typemap(argout) (int* pnCount, double** ppadfXY, double** ppadfZ) */
27178 11 : Py_DECREF(resultobj);
27179 11 : int nPointCount = *(arg2);
27180 11 : if (nPointCount == 0)
27181 : {
27182 1 : Py_INCREF(Py_None);
27183 1 : resultobj = Py_None;
27184 : }
27185 : else
27186 : {
27187 10 : PyObject *xyz = PyList_New( nPointCount );
27188 10 : if( !xyz ) {
27189 0 : SWIG_fail;
27190 : }
27191 10 : int nDimensions = (*arg4 != NULL) ? 3 : 2;
27192 184 : for( int i=0; i< nPointCount; i++ ) {
27193 174 : PyObject *tuple = PyTuple_New( nDimensions );
27194 174 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (*arg3)[2*i] ) );
27195 174 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (*arg3)[2*i+1] ) );
27196 174 : if (nDimensions == 3)
27197 6 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (*arg4)[i] ) );
27198 174 : PyList_SetItem( xyz, i, tuple );
27199 : }
27200 : resultobj = xyz;
27201 : }
27202 : }
27203 11 : {
27204 : /* %typemap(freearg) (int* pnCount, double** ppadfXY, double** ppadfZ) */
27205 11 : VSIFree(*arg3);
27206 11 : VSIFree(*arg4);
27207 : }
27208 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27209 : return resultobj;
27210 0 : fail:
27211 0 : {
27212 : /* %typemap(freearg) (int* pnCount, double** ppadfXY, double** ppadfZ) */
27213 0 : VSIFree(*arg3);
27214 0 : VSIFree(*arg4);
27215 : }
27216 : return NULL;
27217 : }
27218 :
27219 :
27220 32244 : SWIGINTERN PyObject *_wrap_Geometry_GetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27221 32244 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27222 32244 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27223 32244 : int arg2 = (int) 0 ;
27224 32244 : void *argp1 = 0 ;
27225 32244 : int res1 = 0 ;
27226 32244 : int val2 ;
27227 32244 : int ecode2 = 0 ;
27228 32244 : PyObject * obj0 = 0 ;
27229 32244 : PyObject * obj1 = 0 ;
27230 32244 : char * kwnames[] = {
27231 : (char *)"self", (char *)"point", NULL
27232 : };
27233 32244 : double result;
27234 :
27235 32244 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetX", kwnames, &obj0, &obj1)) SWIG_fail;
27236 32244 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27237 32244 : if (!SWIG_IsOK(res1)) {
27238 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetX" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27239 : }
27240 32244 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27241 32244 : if (obj1) {
27242 31030 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27243 31030 : if (!SWIG_IsOK(ecode2)) {
27244 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetX" "', argument " "2"" of type '" "int""'");
27245 : }
27246 : arg2 = static_cast< int >(val2);
27247 : }
27248 32244 : {
27249 32244 : const int bLocalUseExceptions = GetUseExceptions();
27250 32244 : if ( bLocalUseExceptions ) {
27251 1410 : pushErrorHandler();
27252 : }
27253 32244 : {
27254 32244 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27255 32244 : result = (double)OGRGeometryShadow_GetX(arg1,arg2);
27256 32244 : SWIG_PYTHON_THREAD_END_ALLOW;
27257 : }
27258 32244 : if ( bLocalUseExceptions ) {
27259 1410 : popErrorHandler();
27260 : }
27261 : #ifndef SED_HACKS
27262 : if ( bLocalUseExceptions ) {
27263 : CPLErr eclass = CPLGetLastErrorType();
27264 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27265 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27266 : }
27267 : }
27268 : #endif
27269 : }
27270 32244 : resultobj = SWIG_From_double(static_cast< double >(result));
27271 32244 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27272 : return resultobj;
27273 : fail:
27274 : return NULL;
27275 : }
27276 :
27277 :
27278 31035 : SWIGINTERN PyObject *_wrap_Geometry_GetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27279 31035 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27280 31035 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27281 31035 : int arg2 = (int) 0 ;
27282 31035 : void *argp1 = 0 ;
27283 31035 : int res1 = 0 ;
27284 31035 : int val2 ;
27285 31035 : int ecode2 = 0 ;
27286 31035 : PyObject * obj0 = 0 ;
27287 31035 : PyObject * obj1 = 0 ;
27288 31035 : char * kwnames[] = {
27289 : (char *)"self", (char *)"point", NULL
27290 : };
27291 31035 : double result;
27292 :
27293 31035 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetY", kwnames, &obj0, &obj1)) SWIG_fail;
27294 31035 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27295 31035 : if (!SWIG_IsOK(res1)) {
27296 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetY" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27297 : }
27298 31035 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27299 31035 : if (obj1) {
27300 31022 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27301 31022 : if (!SWIG_IsOK(ecode2)) {
27302 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetY" "', argument " "2"" of type '" "int""'");
27303 : }
27304 : arg2 = static_cast< int >(val2);
27305 : }
27306 31035 : {
27307 31035 : const int bLocalUseExceptions = GetUseExceptions();
27308 31035 : if ( bLocalUseExceptions ) {
27309 202 : pushErrorHandler();
27310 : }
27311 31035 : {
27312 31035 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27313 31035 : result = (double)OGRGeometryShadow_GetY(arg1,arg2);
27314 31035 : SWIG_PYTHON_THREAD_END_ALLOW;
27315 : }
27316 31035 : if ( bLocalUseExceptions ) {
27317 202 : popErrorHandler();
27318 : }
27319 : #ifndef SED_HACKS
27320 : if ( bLocalUseExceptions ) {
27321 : CPLErr eclass = CPLGetLastErrorType();
27322 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27323 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27324 : }
27325 : }
27326 : #endif
27327 : }
27328 31035 : resultobj = SWIG_From_double(static_cast< double >(result));
27329 31035 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27330 : return resultobj;
27331 : fail:
27332 : return NULL;
27333 : }
27334 :
27335 :
27336 15350 : SWIGINTERN PyObject *_wrap_Geometry_GetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27337 15350 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27338 15350 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27339 15350 : int arg2 = (int) 0 ;
27340 15350 : void *argp1 = 0 ;
27341 15350 : int res1 = 0 ;
27342 15350 : int val2 ;
27343 15350 : int ecode2 = 0 ;
27344 15350 : PyObject * obj0 = 0 ;
27345 15350 : PyObject * obj1 = 0 ;
27346 15350 : char * kwnames[] = {
27347 : (char *)"self", (char *)"point", NULL
27348 : };
27349 15350 : double result;
27350 :
27351 15350 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetZ", kwnames, &obj0, &obj1)) SWIG_fail;
27352 15350 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27353 15350 : if (!SWIG_IsOK(res1)) {
27354 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetZ" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27355 : }
27356 15350 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27357 15350 : if (obj1) {
27358 15333 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27359 15333 : if (!SWIG_IsOK(ecode2)) {
27360 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetZ" "', argument " "2"" of type '" "int""'");
27361 : }
27362 : arg2 = static_cast< int >(val2);
27363 : }
27364 15350 : {
27365 15350 : const int bLocalUseExceptions = GetUseExceptions();
27366 15350 : if ( bLocalUseExceptions ) {
27367 194 : pushErrorHandler();
27368 : }
27369 15350 : {
27370 15350 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27371 15350 : result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
27372 15350 : SWIG_PYTHON_THREAD_END_ALLOW;
27373 : }
27374 15350 : if ( bLocalUseExceptions ) {
27375 194 : popErrorHandler();
27376 : }
27377 : #ifndef SED_HACKS
27378 : if ( bLocalUseExceptions ) {
27379 : CPLErr eclass = CPLGetLastErrorType();
27380 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27381 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27382 : }
27383 : }
27384 : #endif
27385 : }
27386 15350 : resultobj = SWIG_From_double(static_cast< double >(result));
27387 15350 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27388 : return resultobj;
27389 : fail:
27390 : return NULL;
27391 : }
27392 :
27393 :
27394 2276 : SWIGINTERN PyObject *_wrap_Geometry_GetM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27395 2276 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27396 2276 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27397 2276 : int arg2 = (int) 0 ;
27398 2276 : void *argp1 = 0 ;
27399 2276 : int res1 = 0 ;
27400 2276 : int val2 ;
27401 2276 : int ecode2 = 0 ;
27402 2276 : PyObject * obj0 = 0 ;
27403 2276 : PyObject * obj1 = 0 ;
27404 2276 : char * kwnames[] = {
27405 : (char *)"self", (char *)"point", NULL
27406 : };
27407 2276 : double result;
27408 :
27409 2276 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetM", kwnames, &obj0, &obj1)) SWIG_fail;
27410 2276 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27411 2276 : if (!SWIG_IsOK(res1)) {
27412 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27413 : }
27414 2276 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27415 2276 : if (obj1) {
27416 2276 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27417 2276 : if (!SWIG_IsOK(ecode2)) {
27418 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetM" "', argument " "2"" of type '" "int""'");
27419 : }
27420 : arg2 = static_cast< int >(val2);
27421 : }
27422 2276 : {
27423 2276 : const int bLocalUseExceptions = GetUseExceptions();
27424 2276 : if ( bLocalUseExceptions ) {
27425 17 : pushErrorHandler();
27426 : }
27427 2276 : {
27428 2276 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27429 2276 : result = (double)OGRGeometryShadow_GetM(arg1,arg2);
27430 2276 : SWIG_PYTHON_THREAD_END_ALLOW;
27431 : }
27432 2276 : if ( bLocalUseExceptions ) {
27433 17 : popErrorHandler();
27434 : }
27435 : #ifndef SED_HACKS
27436 : if ( bLocalUseExceptions ) {
27437 : CPLErr eclass = CPLGetLastErrorType();
27438 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27439 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27440 : }
27441 : }
27442 : #endif
27443 : }
27444 2276 : resultobj = SWIG_From_double(static_cast< double >(result));
27445 2276 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27446 : return resultobj;
27447 : fail:
27448 : return NULL;
27449 : }
27450 :
27451 :
27452 217 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27453 217 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27454 217 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27455 217 : int arg2 = (int) 0 ;
27456 217 : double *arg3 = (double *) (double *)NULL ;
27457 217 : void *argp1 = 0 ;
27458 217 : int res1 = 0 ;
27459 217 : int val2 ;
27460 217 : int ecode2 = 0 ;
27461 217 : double argout3[3] ;
27462 217 : PyObject *swig_obj[2] ;
27463 :
27464 217 : {
27465 : /* %typemap(in,numinputs=0) (double argout3[ANY]) */
27466 217 : memset(argout3, 0, sizeof(argout3));
27467 217 : arg3 = argout3;
27468 : }
27469 217 : if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPoint", 1, 2, swig_obj)) SWIG_fail;
27470 217 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27471 217 : if (!SWIG_IsOK(res1)) {
27472 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27473 : }
27474 217 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27475 217 : if (swig_obj[1]) {
27476 202 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
27477 202 : if (!SWIG_IsOK(ecode2)) {
27478 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint" "', argument " "2"" of type '" "int""'");
27479 : }
27480 : arg2 = static_cast< int >(val2);
27481 : }
27482 217 : {
27483 217 : const int bLocalUseExceptions = GetUseExceptions();
27484 217 : if ( bLocalUseExceptions ) {
27485 30 : pushErrorHandler();
27486 : }
27487 217 : {
27488 217 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27489 217 : OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
27490 217 : SWIG_PYTHON_THREAD_END_ALLOW;
27491 : }
27492 217 : if ( bLocalUseExceptions ) {
27493 30 : popErrorHandler();
27494 : }
27495 : #ifndef SED_HACKS
27496 : if ( bLocalUseExceptions ) {
27497 : CPLErr eclass = CPLGetLastErrorType();
27498 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27499 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27500 : }
27501 : }
27502 : #endif
27503 : }
27504 217 : resultobj = SWIG_Py_Void();
27505 217 : {
27506 : /* %typemap(argout) (double argout[ANY]) */
27507 217 : PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
27508 : #if SWIG_VERSION >= 0x040300
27509 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
27510 : #else
27511 217 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
27512 : #endif
27513 : }
27514 221 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27515 : return resultobj;
27516 : fail:
27517 : return NULL;
27518 : }
27519 :
27520 :
27521 1 : SWIGINTERN PyObject *_wrap_Geometry_GetPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27522 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27523 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27524 1 : int arg2 = (int) 0 ;
27525 1 : double *arg3 = (double *) (double *)NULL ;
27526 1 : void *argp1 = 0 ;
27527 1 : int res1 = 0 ;
27528 1 : int val2 ;
27529 1 : int ecode2 = 0 ;
27530 1 : double argout3[4] ;
27531 1 : PyObject *swig_obj[2] ;
27532 :
27533 1 : {
27534 : /* %typemap(in,numinputs=0) (double argout3[ANY]) */
27535 1 : memset(argout3, 0, sizeof(argout3));
27536 1 : arg3 = argout3;
27537 : }
27538 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPointZM", 1, 2, swig_obj)) SWIG_fail;
27539 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27540 1 : if (!SWIG_IsOK(res1)) {
27541 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27542 : }
27543 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27544 1 : if (swig_obj[1]) {
27545 1 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
27546 1 : if (!SWIG_IsOK(ecode2)) {
27547 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPointZM" "', argument " "2"" of type '" "int""'");
27548 : }
27549 : arg2 = static_cast< int >(val2);
27550 : }
27551 1 : {
27552 1 : const int bLocalUseExceptions = GetUseExceptions();
27553 1 : if ( bLocalUseExceptions ) {
27554 0 : pushErrorHandler();
27555 : }
27556 1 : {
27557 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27558 1 : OGRGeometryShadow_GetPointZM(arg1,arg2,arg3);
27559 1 : SWIG_PYTHON_THREAD_END_ALLOW;
27560 : }
27561 1 : if ( bLocalUseExceptions ) {
27562 0 : popErrorHandler();
27563 : }
27564 : #ifndef SED_HACKS
27565 : if ( bLocalUseExceptions ) {
27566 : CPLErr eclass = CPLGetLastErrorType();
27567 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27568 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27569 : }
27570 : }
27571 : #endif
27572 : }
27573 1 : resultobj = SWIG_Py_Void();
27574 1 : {
27575 : /* %typemap(argout) (double argout[ANY]) */
27576 1 : PyObject *out = CreateTupleFromDoubleArray( arg3, 4 );
27577 : #if SWIG_VERSION >= 0x040300
27578 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
27579 : #else
27580 1 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
27581 : #endif
27582 : }
27583 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27584 : return resultobj;
27585 : fail:
27586 : return NULL;
27587 : }
27588 :
27589 :
27590 3 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27591 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27592 3 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27593 3 : int arg2 = (int) 0 ;
27594 3 : double *arg3 = (double *) (double *)NULL ;
27595 3 : void *argp1 = 0 ;
27596 3 : int res1 = 0 ;
27597 3 : int val2 ;
27598 3 : int ecode2 = 0 ;
27599 3 : double argout3[2] ;
27600 3 : PyObject *swig_obj[2] ;
27601 :
27602 3 : {
27603 : /* %typemap(in,numinputs=0) (double argout3[ANY]) */
27604 3 : memset(argout3, 0, sizeof(argout3));
27605 3 : arg3 = argout3;
27606 : }
27607 3 : if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPoint_2D", 1, 2, swig_obj)) SWIG_fail;
27608 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27609 3 : if (!SWIG_IsOK(res1)) {
27610 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27611 : }
27612 3 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27613 3 : if (swig_obj[1]) {
27614 3 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
27615 3 : if (!SWIG_IsOK(ecode2)) {
27616 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint_2D" "', argument " "2"" of type '" "int""'");
27617 : }
27618 : arg2 = static_cast< int >(val2);
27619 : }
27620 3 : {
27621 3 : const int bLocalUseExceptions = GetUseExceptions();
27622 3 : if ( bLocalUseExceptions ) {
27623 2 : pushErrorHandler();
27624 : }
27625 3 : {
27626 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27627 3 : OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
27628 3 : SWIG_PYTHON_THREAD_END_ALLOW;
27629 : }
27630 3 : if ( bLocalUseExceptions ) {
27631 2 : popErrorHandler();
27632 : }
27633 : #ifndef SED_HACKS
27634 : if ( bLocalUseExceptions ) {
27635 : CPLErr eclass = CPLGetLastErrorType();
27636 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27637 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27638 : }
27639 : }
27640 : #endif
27641 : }
27642 3 : resultobj = SWIG_Py_Void();
27643 3 : {
27644 : /* %typemap(argout) (double argout[ANY]) */
27645 3 : PyObject *out = CreateTupleFromDoubleArray( arg3, 2 );
27646 : #if SWIG_VERSION >= 0x040300
27647 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
27648 : #else
27649 3 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
27650 : #endif
27651 : }
27652 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27653 : return resultobj;
27654 : fail:
27655 : return NULL;
27656 : }
27657 :
27658 :
27659 12582 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27660 12582 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27661 12582 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27662 12582 : void *argp1 = 0 ;
27663 12582 : int res1 = 0 ;
27664 12582 : PyObject *swig_obj[1] ;
27665 12582 : int result;
27666 :
27667 12582 : if (!args) SWIG_fail;
27668 12582 : swig_obj[0] = args;
27669 12582 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27670 12582 : if (!SWIG_IsOK(res1)) {
27671 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27672 : }
27673 12582 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27674 12582 : {
27675 12582 : const int bLocalUseExceptions = GetUseExceptions();
27676 12582 : if ( bLocalUseExceptions ) {
27677 558 : pushErrorHandler();
27678 : }
27679 12582 : {
27680 12582 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27681 12582 : result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
27682 12582 : SWIG_PYTHON_THREAD_END_ALLOW;
27683 : }
27684 12582 : if ( bLocalUseExceptions ) {
27685 558 : popErrorHandler();
27686 : }
27687 : #ifndef SED_HACKS
27688 : if ( bLocalUseExceptions ) {
27689 : CPLErr eclass = CPLGetLastErrorType();
27690 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27691 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27692 : }
27693 : }
27694 : #endif
27695 : }
27696 12582 : resultobj = SWIG_From_int(static_cast< int >(result));
27697 12582 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27698 : return resultobj;
27699 : fail:
27700 : return NULL;
27701 : }
27702 :
27703 :
27704 168 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27705 168 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27706 168 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27707 168 : int arg2 ;
27708 168 : double arg3 ;
27709 168 : double arg4 ;
27710 168 : double arg5 = (double) 0 ;
27711 168 : void *argp1 = 0 ;
27712 168 : int res1 = 0 ;
27713 168 : int val2 ;
27714 168 : int ecode2 = 0 ;
27715 168 : double val3 ;
27716 168 : int ecode3 = 0 ;
27717 168 : double val4 ;
27718 168 : int ecode4 = 0 ;
27719 168 : double val5 ;
27720 168 : int ecode5 = 0 ;
27721 168 : PyObject * obj0 = 0 ;
27722 168 : PyObject * obj1 = 0 ;
27723 168 : PyObject * obj2 = 0 ;
27724 168 : PyObject * obj3 = 0 ;
27725 168 : PyObject * obj4 = 0 ;
27726 168 : char * kwnames[] = {
27727 : (char *)"self", (char *)"point", (char *)"x", (char *)"y", (char *)"z", NULL
27728 : };
27729 :
27730 168 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|O:Geometry_SetPoint", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
27731 168 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27732 168 : if (!SWIG_IsOK(res1)) {
27733 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27734 : }
27735 168 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27736 168 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27737 168 : if (!SWIG_IsOK(ecode2)) {
27738 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint" "', argument " "2"" of type '" "int""'");
27739 : }
27740 168 : arg2 = static_cast< int >(val2);
27741 168 : ecode3 = SWIG_AsVal_double(obj2, &val3);
27742 168 : if (!SWIG_IsOK(ecode3)) {
27743 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint" "', argument " "3"" of type '" "double""'");
27744 : }
27745 168 : arg3 = static_cast< double >(val3);
27746 168 : ecode4 = SWIG_AsVal_double(obj3, &val4);
27747 168 : if (!SWIG_IsOK(ecode4)) {
27748 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint" "', argument " "4"" of type '" "double""'");
27749 : }
27750 168 : arg4 = static_cast< double >(val4);
27751 168 : if (obj4) {
27752 162 : ecode5 = SWIG_AsVal_double(obj4, &val5);
27753 162 : if (!SWIG_IsOK(ecode5)) {
27754 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPoint" "', argument " "5"" of type '" "double""'");
27755 : }
27756 162 : arg5 = static_cast< double >(val5);
27757 : }
27758 168 : {
27759 168 : const int bLocalUseExceptions = GetUseExceptions();
27760 168 : if ( bLocalUseExceptions ) {
27761 159 : pushErrorHandler();
27762 : }
27763 168 : {
27764 168 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27765 168 : OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
27766 168 : SWIG_PYTHON_THREAD_END_ALLOW;
27767 : }
27768 168 : if ( bLocalUseExceptions ) {
27769 159 : popErrorHandler();
27770 : }
27771 : #ifndef SED_HACKS
27772 : if ( bLocalUseExceptions ) {
27773 : CPLErr eclass = CPLGetLastErrorType();
27774 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27775 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27776 : }
27777 : }
27778 : #endif
27779 : }
27780 168 : resultobj = SWIG_Py_Void();
27781 170 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27782 : return resultobj;
27783 : fail:
27784 : return NULL;
27785 : }
27786 :
27787 :
27788 0 : SWIGINTERN PyObject *_wrap_Geometry_SetPointM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27789 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27790 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27791 0 : int arg2 ;
27792 0 : double arg3 ;
27793 0 : double arg4 ;
27794 0 : double arg5 ;
27795 0 : void *argp1 = 0 ;
27796 0 : int res1 = 0 ;
27797 0 : int val2 ;
27798 0 : int ecode2 = 0 ;
27799 0 : double val3 ;
27800 0 : int ecode3 = 0 ;
27801 0 : double val4 ;
27802 0 : int ecode4 = 0 ;
27803 0 : double val5 ;
27804 0 : int ecode5 = 0 ;
27805 0 : PyObject * obj0 = 0 ;
27806 0 : PyObject * obj1 = 0 ;
27807 0 : PyObject * obj2 = 0 ;
27808 0 : PyObject * obj3 = 0 ;
27809 0 : PyObject * obj4 = 0 ;
27810 0 : char * kwnames[] = {
27811 : (char *)"self", (char *)"point", (char *)"x", (char *)"y", (char *)"m", NULL
27812 : };
27813 :
27814 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:Geometry_SetPointM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
27815 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27816 0 : if (!SWIG_IsOK(res1)) {
27817 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPointM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27818 : }
27819 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27820 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27821 0 : if (!SWIG_IsOK(ecode2)) {
27822 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPointM" "', argument " "2"" of type '" "int""'");
27823 : }
27824 0 : arg2 = static_cast< int >(val2);
27825 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
27826 0 : if (!SWIG_IsOK(ecode3)) {
27827 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPointM" "', argument " "3"" of type '" "double""'");
27828 : }
27829 0 : arg3 = static_cast< double >(val3);
27830 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
27831 0 : if (!SWIG_IsOK(ecode4)) {
27832 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPointM" "', argument " "4"" of type '" "double""'");
27833 : }
27834 0 : arg4 = static_cast< double >(val4);
27835 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
27836 0 : if (!SWIG_IsOK(ecode5)) {
27837 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPointM" "', argument " "5"" of type '" "double""'");
27838 : }
27839 0 : arg5 = static_cast< double >(val5);
27840 0 : {
27841 0 : const int bLocalUseExceptions = GetUseExceptions();
27842 0 : if ( bLocalUseExceptions ) {
27843 0 : pushErrorHandler();
27844 : }
27845 0 : {
27846 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27847 0 : OGRGeometryShadow_SetPointM(arg1,arg2,arg3,arg4,arg5);
27848 0 : SWIG_PYTHON_THREAD_END_ALLOW;
27849 : }
27850 0 : if ( bLocalUseExceptions ) {
27851 0 : popErrorHandler();
27852 : }
27853 : #ifndef SED_HACKS
27854 : if ( bLocalUseExceptions ) {
27855 : CPLErr eclass = CPLGetLastErrorType();
27856 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27857 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27858 : }
27859 : }
27860 : #endif
27861 : }
27862 0 : resultobj = SWIG_Py_Void();
27863 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27864 : return resultobj;
27865 : fail:
27866 : return NULL;
27867 : }
27868 :
27869 :
27870 0 : SWIGINTERN PyObject *_wrap_Geometry_SetPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27871 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27872 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27873 0 : int arg2 ;
27874 0 : double arg3 ;
27875 0 : double arg4 ;
27876 0 : double arg5 ;
27877 0 : double arg6 ;
27878 0 : void *argp1 = 0 ;
27879 0 : int res1 = 0 ;
27880 0 : int val2 ;
27881 0 : int ecode2 = 0 ;
27882 0 : double val3 ;
27883 0 : int ecode3 = 0 ;
27884 0 : double val4 ;
27885 0 : int ecode4 = 0 ;
27886 0 : double val5 ;
27887 0 : int ecode5 = 0 ;
27888 0 : double val6 ;
27889 0 : int ecode6 = 0 ;
27890 0 : PyObject * obj0 = 0 ;
27891 0 : PyObject * obj1 = 0 ;
27892 0 : PyObject * obj2 = 0 ;
27893 0 : PyObject * obj3 = 0 ;
27894 0 : PyObject * obj4 = 0 ;
27895 0 : PyObject * obj5 = 0 ;
27896 0 : char * kwnames[] = {
27897 : (char *)"self", (char *)"point", (char *)"x", (char *)"y", (char *)"z", (char *)"m", NULL
27898 : };
27899 :
27900 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:Geometry_SetPointZM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
27901 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27902 0 : if (!SWIG_IsOK(res1)) {
27903 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27904 : }
27905 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27906 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27907 0 : if (!SWIG_IsOK(ecode2)) {
27908 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPointZM" "', argument " "2"" of type '" "int""'");
27909 : }
27910 0 : arg2 = static_cast< int >(val2);
27911 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
27912 0 : if (!SWIG_IsOK(ecode3)) {
27913 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPointZM" "', argument " "3"" of type '" "double""'");
27914 : }
27915 0 : arg3 = static_cast< double >(val3);
27916 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
27917 0 : if (!SWIG_IsOK(ecode4)) {
27918 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPointZM" "', argument " "4"" of type '" "double""'");
27919 : }
27920 0 : arg4 = static_cast< double >(val4);
27921 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
27922 0 : if (!SWIG_IsOK(ecode5)) {
27923 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPointZM" "', argument " "5"" of type '" "double""'");
27924 : }
27925 0 : arg5 = static_cast< double >(val5);
27926 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
27927 0 : if (!SWIG_IsOK(ecode6)) {
27928 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Geometry_SetPointZM" "', argument " "6"" of type '" "double""'");
27929 : }
27930 0 : arg6 = static_cast< double >(val6);
27931 0 : {
27932 0 : const int bLocalUseExceptions = GetUseExceptions();
27933 0 : if ( bLocalUseExceptions ) {
27934 0 : pushErrorHandler();
27935 : }
27936 0 : {
27937 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27938 0 : OGRGeometryShadow_SetPointZM(arg1,arg2,arg3,arg4,arg5,arg6);
27939 0 : SWIG_PYTHON_THREAD_END_ALLOW;
27940 : }
27941 0 : if ( bLocalUseExceptions ) {
27942 0 : popErrorHandler();
27943 : }
27944 : #ifndef SED_HACKS
27945 : if ( bLocalUseExceptions ) {
27946 : CPLErr eclass = CPLGetLastErrorType();
27947 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27948 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27949 : }
27950 : }
27951 : #endif
27952 : }
27953 0 : resultobj = SWIG_Py_Void();
27954 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
27955 : return resultobj;
27956 : fail:
27957 : return NULL;
27958 : }
27959 :
27960 :
27961 160062 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27962 160062 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27963 160062 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27964 160062 : int arg2 ;
27965 160062 : double arg3 ;
27966 160062 : double arg4 ;
27967 160062 : void *argp1 = 0 ;
27968 160062 : int res1 = 0 ;
27969 160062 : int val2 ;
27970 160062 : int ecode2 = 0 ;
27971 160062 : double val3 ;
27972 160062 : int ecode3 = 0 ;
27973 160062 : double val4 ;
27974 160062 : int ecode4 = 0 ;
27975 160062 : PyObject * obj0 = 0 ;
27976 160062 : PyObject * obj1 = 0 ;
27977 160062 : PyObject * obj2 = 0 ;
27978 160062 : PyObject * obj3 = 0 ;
27979 160062 : char * kwnames[] = {
27980 : (char *)"self", (char *)"point", (char *)"x", (char *)"y", NULL
27981 : };
27982 :
27983 160062 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:Geometry_SetPoint_2D", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
27984 160062 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27985 160062 : if (!SWIG_IsOK(res1)) {
27986 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27987 : }
27988 160062 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27989 160062 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27990 160062 : if (!SWIG_IsOK(ecode2)) {
27991 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint_2D" "', argument " "2"" of type '" "int""'");
27992 : }
27993 160062 : arg2 = static_cast< int >(val2);
27994 160062 : ecode3 = SWIG_AsVal_double(obj2, &val3);
27995 160062 : if (!SWIG_IsOK(ecode3)) {
27996 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint_2D" "', argument " "3"" of type '" "double""'");
27997 : }
27998 160062 : arg3 = static_cast< double >(val3);
27999 160062 : ecode4 = SWIG_AsVal_double(obj3, &val4);
28000 160062 : if (!SWIG_IsOK(ecode4)) {
28001 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint_2D" "', argument " "4"" of type '" "double""'");
28002 : }
28003 160062 : arg4 = static_cast< double >(val4);
28004 160062 : {
28005 160062 : const int bLocalUseExceptions = GetUseExceptions();
28006 160062 : if ( bLocalUseExceptions ) {
28007 160003 : pushErrorHandler();
28008 : }
28009 160062 : {
28010 160062 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28011 160062 : OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
28012 160062 : SWIG_PYTHON_THREAD_END_ALLOW;
28013 : }
28014 160062 : if ( bLocalUseExceptions ) {
28015 160003 : popErrorHandler();
28016 : }
28017 : #ifndef SED_HACKS
28018 : if ( bLocalUseExceptions ) {
28019 : CPLErr eclass = CPLGetLastErrorType();
28020 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28021 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28022 : }
28023 : }
28024 : #endif
28025 : }
28026 160062 : resultobj = SWIG_Py_Void();
28027 160065 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28028 : return resultobj;
28029 : fail:
28030 : return NULL;
28031 : }
28032 :
28033 :
28034 2 : SWIGINTERN PyObject *_wrap_Geometry_SwapXY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28035 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28036 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28037 2 : void *argp1 = 0 ;
28038 2 : int res1 = 0 ;
28039 2 : PyObject *swig_obj[1] ;
28040 :
28041 2 : if (!args) SWIG_fail;
28042 2 : swig_obj[0] = args;
28043 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28044 2 : if (!SWIG_IsOK(res1)) {
28045 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SwapXY" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28046 : }
28047 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28048 2 : {
28049 2 : const int bLocalUseExceptions = GetUseExceptions();
28050 2 : if ( bLocalUseExceptions ) {
28051 1 : pushErrorHandler();
28052 : }
28053 2 : {
28054 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28055 2 : OGRGeometryShadow_SwapXY(arg1);
28056 2 : SWIG_PYTHON_THREAD_END_ALLOW;
28057 : }
28058 2 : if ( bLocalUseExceptions ) {
28059 1 : popErrorHandler();
28060 : }
28061 : #ifndef SED_HACKS
28062 : if ( bLocalUseExceptions ) {
28063 : CPLErr eclass = CPLGetLastErrorType();
28064 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28065 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28066 : }
28067 : }
28068 : #endif
28069 : }
28070 2 : resultobj = SWIG_Py_Void();
28071 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28072 : return resultobj;
28073 : fail:
28074 : return NULL;
28075 : }
28076 :
28077 :
28078 3081 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28079 3081 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28080 3081 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28081 3081 : int arg2 ;
28082 3081 : void *argp1 = 0 ;
28083 3081 : int res1 = 0 ;
28084 3081 : int val2 ;
28085 3081 : int ecode2 = 0 ;
28086 3081 : PyObject *swig_obj[2] ;
28087 3081 : OGRGeometryShadow *result = 0 ;
28088 :
28089 3081 : if (!SWIG_Python_UnpackTuple(args, "Geometry_GetGeometryRef", 2, 2, swig_obj)) SWIG_fail;
28090 3081 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28091 3081 : if (!SWIG_IsOK(res1)) {
28092 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryRef" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28093 : }
28094 3081 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28095 3081 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
28096 3081 : if (!SWIG_IsOK(ecode2)) {
28097 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetGeometryRef" "', argument " "2"" of type '" "int""'");
28098 : }
28099 3081 : arg2 = static_cast< int >(val2);
28100 3081 : {
28101 3081 : const int bLocalUseExceptions = GetUseExceptions();
28102 3081 : if ( bLocalUseExceptions ) {
28103 241 : pushErrorHandler();
28104 : }
28105 3081 : {
28106 3081 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28107 3081 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
28108 3081 : SWIG_PYTHON_THREAD_END_ALLOW;
28109 : }
28110 3081 : if ( bLocalUseExceptions ) {
28111 241 : popErrorHandler();
28112 : }
28113 : #ifndef SED_HACKS
28114 : if ( bLocalUseExceptions ) {
28115 : CPLErr eclass = CPLGetLastErrorType();
28116 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28117 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28118 : }
28119 : }
28120 : #endif
28121 : }
28122 3081 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28123 3081 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28124 : return resultobj;
28125 : fail:
28126 : return NULL;
28127 : }
28128 :
28129 :
28130 1 : SWIGINTERN PyObject *_wrap_Geometry_Simplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28131 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28132 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28133 1 : double arg2 ;
28134 1 : void *argp1 = 0 ;
28135 1 : int res1 = 0 ;
28136 1 : double val2 ;
28137 1 : int ecode2 = 0 ;
28138 1 : PyObject *swig_obj[2] ;
28139 1 : OGRGeometryShadow *result = 0 ;
28140 :
28141 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Simplify", 2, 2, swig_obj)) SWIG_fail;
28142 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28143 1 : if (!SWIG_IsOK(res1)) {
28144 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Simplify" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28145 : }
28146 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28147 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
28148 1 : if (!SWIG_IsOK(ecode2)) {
28149 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Simplify" "', argument " "2"" of type '" "double""'");
28150 : }
28151 1 : arg2 = static_cast< double >(val2);
28152 1 : {
28153 1 : const int bLocalUseExceptions = GetUseExceptions();
28154 1 : if ( bLocalUseExceptions ) {
28155 1 : pushErrorHandler();
28156 : }
28157 1 : {
28158 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28159 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
28160 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28161 : }
28162 1 : if ( bLocalUseExceptions ) {
28163 1 : popErrorHandler();
28164 : }
28165 : #ifndef SED_HACKS
28166 : if ( bLocalUseExceptions ) {
28167 : CPLErr eclass = CPLGetLastErrorType();
28168 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28169 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28170 : }
28171 : }
28172 : #endif
28173 : }
28174 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28175 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28176 : return resultobj;
28177 : fail:
28178 : return NULL;
28179 : }
28180 :
28181 :
28182 1 : SWIGINTERN PyObject *_wrap_Geometry_SimplifyPreserveTopology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28183 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28184 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28185 1 : double arg2 ;
28186 1 : void *argp1 = 0 ;
28187 1 : int res1 = 0 ;
28188 1 : double val2 ;
28189 1 : int ecode2 = 0 ;
28190 1 : PyObject *swig_obj[2] ;
28191 1 : OGRGeometryShadow *result = 0 ;
28192 :
28193 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SimplifyPreserveTopology", 2, 2, swig_obj)) SWIG_fail;
28194 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28195 1 : if (!SWIG_IsOK(res1)) {
28196 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28197 : }
28198 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28199 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
28200 1 : if (!SWIG_IsOK(ecode2)) {
28201 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "2"" of type '" "double""'");
28202 : }
28203 1 : arg2 = static_cast< double >(val2);
28204 1 : {
28205 1 : const int bLocalUseExceptions = GetUseExceptions();
28206 1 : if ( bLocalUseExceptions ) {
28207 1 : pushErrorHandler();
28208 : }
28209 1 : {
28210 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28211 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
28212 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28213 : }
28214 1 : if ( bLocalUseExceptions ) {
28215 1 : popErrorHandler();
28216 : }
28217 : #ifndef SED_HACKS
28218 : if ( bLocalUseExceptions ) {
28219 : CPLErr eclass = CPLGetLastErrorType();
28220 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28221 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28222 : }
28223 : }
28224 : #endif
28225 : }
28226 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28227 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28228 : return resultobj;
28229 : fail:
28230 : return NULL;
28231 : }
28232 :
28233 :
28234 1 : SWIGINTERN PyObject *_wrap_Geometry_DelaunayTriangulation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
28235 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28236 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28237 1 : double arg2 = (double) 0.0 ;
28238 1 : int arg3 = (int) FALSE ;
28239 1 : void *argp1 = 0 ;
28240 1 : int res1 = 0 ;
28241 1 : double val2 ;
28242 1 : int ecode2 = 0 ;
28243 1 : int val3 ;
28244 1 : int ecode3 = 0 ;
28245 1 : PyObject * obj0 = 0 ;
28246 1 : PyObject * obj1 = 0 ;
28247 1 : PyObject * obj2 = 0 ;
28248 1 : char * kwnames[] = {
28249 : (char *)"self", (char *)"dfTolerance", (char *)"bOnlyEdges", NULL
28250 : };
28251 1 : OGRGeometryShadow *result = 0 ;
28252 :
28253 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Geometry_DelaunayTriangulation", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
28254 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28255 1 : if (!SWIG_IsOK(res1)) {
28256 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_DelaunayTriangulation" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28257 : }
28258 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28259 1 : if (obj1) {
28260 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
28261 0 : if (!SWIG_IsOK(ecode2)) {
28262 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_DelaunayTriangulation" "', argument " "2"" of type '" "double""'");
28263 : }
28264 0 : arg2 = static_cast< double >(val2);
28265 : }
28266 1 : if (obj2) {
28267 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
28268 0 : if (!SWIG_IsOK(ecode3)) {
28269 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_DelaunayTriangulation" "', argument " "3"" of type '" "int""'");
28270 : }
28271 : arg3 = static_cast< int >(val3);
28272 : }
28273 1 : {
28274 1 : const int bLocalUseExceptions = GetUseExceptions();
28275 1 : if ( bLocalUseExceptions ) {
28276 1 : pushErrorHandler();
28277 : }
28278 1 : {
28279 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28280 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_DelaunayTriangulation(arg1,arg2,arg3);
28281 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28282 : }
28283 1 : if ( bLocalUseExceptions ) {
28284 1 : popErrorHandler();
28285 : }
28286 : #ifndef SED_HACKS
28287 : if ( bLocalUseExceptions ) {
28288 : CPLErr eclass = CPLGetLastErrorType();
28289 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28290 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28291 : }
28292 : }
28293 : #endif
28294 : }
28295 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28296 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28297 : return resultobj;
28298 : fail:
28299 : return NULL;
28300 : }
28301 :
28302 :
28303 3 : SWIGINTERN PyObject *_wrap_Geometry_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28304 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28305 3 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28306 3 : void *argp1 = 0 ;
28307 3 : int res1 = 0 ;
28308 3 : PyObject *swig_obj[1] ;
28309 3 : OGRGeometryShadow *result = 0 ;
28310 :
28311 3 : if (!args) SWIG_fail;
28312 3 : swig_obj[0] = args;
28313 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28314 3 : if (!SWIG_IsOK(res1)) {
28315 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Polygonize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28316 : }
28317 3 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28318 3 : {
28319 3 : const int bLocalUseExceptions = GetUseExceptions();
28320 3 : if ( bLocalUseExceptions ) {
28321 3 : pushErrorHandler();
28322 : }
28323 3 : {
28324 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28325 3 : result = (OGRGeometryShadow *)OGRGeometryShadow_Polygonize(arg1);
28326 3 : SWIG_PYTHON_THREAD_END_ALLOW;
28327 : }
28328 3 : if ( bLocalUseExceptions ) {
28329 3 : popErrorHandler();
28330 : }
28331 : #ifndef SED_HACKS
28332 : if ( bLocalUseExceptions ) {
28333 : CPLErr eclass = CPLGetLastErrorType();
28334 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28335 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28336 : }
28337 : }
28338 : #endif
28339 : }
28340 3 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28341 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28342 : return resultobj;
28343 : fail:
28344 : return NULL;
28345 : }
28346 :
28347 :
28348 0 : SWIGINTERN PyObject *_wrap_Geometry_BuildArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28349 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28350 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28351 0 : void *argp1 = 0 ;
28352 0 : int res1 = 0 ;
28353 0 : PyObject *swig_obj[1] ;
28354 0 : OGRGeometryShadow *result = 0 ;
28355 :
28356 0 : if (!args) SWIG_fail;
28357 0 : swig_obj[0] = args;
28358 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28359 0 : if (!SWIG_IsOK(res1)) {
28360 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_BuildArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28361 : }
28362 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28363 0 : {
28364 0 : const int bLocalUseExceptions = GetUseExceptions();
28365 0 : if ( bLocalUseExceptions ) {
28366 0 : pushErrorHandler();
28367 : }
28368 0 : {
28369 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28370 0 : result = (OGRGeometryShadow *)OGRGeometryShadow_BuildArea(arg1);
28371 0 : SWIG_PYTHON_THREAD_END_ALLOW;
28372 : }
28373 0 : if ( bLocalUseExceptions ) {
28374 0 : popErrorHandler();
28375 : }
28376 : #ifndef SED_HACKS
28377 : if ( bLocalUseExceptions ) {
28378 : CPLErr eclass = CPLGetLastErrorType();
28379 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28380 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28381 : }
28382 : }
28383 : #endif
28384 : }
28385 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28386 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28387 : return resultobj;
28388 : fail:
28389 : return NULL;
28390 : }
28391 :
28392 :
28393 1 : SWIGINTERN PyObject *_wrap_Geometry_Boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28394 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28395 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28396 1 : void *argp1 = 0 ;
28397 1 : int res1 = 0 ;
28398 1 : PyObject *swig_obj[1] ;
28399 1 : OGRGeometryShadow *result = 0 ;
28400 :
28401 1 : if (!args) SWIG_fail;
28402 1 : swig_obj[0] = args;
28403 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28404 1 : if (!SWIG_IsOK(res1)) {
28405 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Boundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28406 : }
28407 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28408 1 : {
28409 1 : const int bLocalUseExceptions = GetUseExceptions();
28410 1 : if ( bLocalUseExceptions ) {
28411 0 : pushErrorHandler();
28412 : }
28413 1 : {
28414 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28415 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
28416 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28417 : }
28418 1 : if ( bLocalUseExceptions ) {
28419 0 : popErrorHandler();
28420 : }
28421 : #ifndef SED_HACKS
28422 : if ( bLocalUseExceptions ) {
28423 : CPLErr eclass = CPLGetLastErrorType();
28424 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28425 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28426 : }
28427 : }
28428 : #endif
28429 : }
28430 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28431 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28432 : return resultobj;
28433 : fail:
28434 : return NULL;
28435 : }
28436 :
28437 :
28438 5 : SWIGINTERN PyObject *_wrap_Geometry_GetBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28439 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28440 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28441 5 : void *argp1 = 0 ;
28442 5 : int res1 = 0 ;
28443 5 : PyObject *swig_obj[1] ;
28444 5 : OGRGeometryShadow *result = 0 ;
28445 :
28446 5 : if (!args) SWIG_fail;
28447 5 : swig_obj[0] = args;
28448 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28449 5 : if (!SWIG_IsOK(res1)) {
28450 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetBoundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28451 : }
28452 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28453 5 : {
28454 5 : const int bLocalUseExceptions = GetUseExceptions();
28455 5 : if ( bLocalUseExceptions ) {
28456 0 : pushErrorHandler();
28457 : }
28458 5 : {
28459 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28460 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
28461 5 : SWIG_PYTHON_THREAD_END_ALLOW;
28462 : }
28463 5 : if ( bLocalUseExceptions ) {
28464 0 : popErrorHandler();
28465 : }
28466 : #ifndef SED_HACKS
28467 : if ( bLocalUseExceptions ) {
28468 : CPLErr eclass = CPLGetLastErrorType();
28469 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28470 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28471 : }
28472 : }
28473 : #endif
28474 : }
28475 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28476 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28477 : return resultobj;
28478 : fail:
28479 : return NULL;
28480 : }
28481 :
28482 :
28483 1 : SWIGINTERN PyObject *_wrap_Geometry_ConvexHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28484 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28485 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28486 1 : void *argp1 = 0 ;
28487 1 : int res1 = 0 ;
28488 1 : PyObject *swig_obj[1] ;
28489 1 : OGRGeometryShadow *result = 0 ;
28490 :
28491 1 : if (!args) SWIG_fail;
28492 1 : swig_obj[0] = args;
28493 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28494 1 : if (!SWIG_IsOK(res1)) {
28495 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConvexHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28496 : }
28497 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28498 1 : {
28499 1 : const int bLocalUseExceptions = GetUseExceptions();
28500 1 : if ( bLocalUseExceptions ) {
28501 1 : pushErrorHandler();
28502 : }
28503 1 : {
28504 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28505 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
28506 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28507 : }
28508 1 : if ( bLocalUseExceptions ) {
28509 1 : popErrorHandler();
28510 : }
28511 : #ifndef SED_HACKS
28512 : if ( bLocalUseExceptions ) {
28513 : CPLErr eclass = CPLGetLastErrorType();
28514 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28515 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28516 : }
28517 : }
28518 : #endif
28519 : }
28520 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28521 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28522 : return resultobj;
28523 : fail:
28524 : return NULL;
28525 : }
28526 :
28527 :
28528 2 : SWIGINTERN PyObject *_wrap_Geometry_ConcaveHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28529 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28530 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28531 2 : double arg2 ;
28532 2 : bool arg3 ;
28533 2 : void *argp1 = 0 ;
28534 2 : int res1 = 0 ;
28535 2 : double val2 ;
28536 2 : int ecode2 = 0 ;
28537 2 : bool val3 ;
28538 2 : int ecode3 = 0 ;
28539 2 : PyObject *swig_obj[3] ;
28540 2 : OGRGeometryShadow *result = 0 ;
28541 :
28542 2 : if (!SWIG_Python_UnpackTuple(args, "Geometry_ConcaveHull", 3, 3, swig_obj)) SWIG_fail;
28543 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28544 2 : if (!SWIG_IsOK(res1)) {
28545 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConcaveHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28546 : }
28547 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28548 2 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
28549 2 : if (!SWIG_IsOK(ecode2)) {
28550 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_ConcaveHull" "', argument " "2"" of type '" "double""'");
28551 : }
28552 2 : arg2 = static_cast< double >(val2);
28553 2 : ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
28554 2 : if (!SWIG_IsOK(ecode3)) {
28555 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_ConcaveHull" "', argument " "3"" of type '" "bool""'");
28556 : }
28557 2 : arg3 = static_cast< bool >(val3);
28558 2 : {
28559 2 : const int bLocalUseExceptions = GetUseExceptions();
28560 2 : if ( bLocalUseExceptions ) {
28561 0 : pushErrorHandler();
28562 : }
28563 2 : {
28564 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28565 2 : result = (OGRGeometryShadow *)OGRGeometryShadow_ConcaveHull(arg1,arg2,arg3);
28566 2 : SWIG_PYTHON_THREAD_END_ALLOW;
28567 : }
28568 2 : if ( bLocalUseExceptions ) {
28569 0 : popErrorHandler();
28570 : }
28571 : #ifndef SED_HACKS
28572 : if ( bLocalUseExceptions ) {
28573 : CPLErr eclass = CPLGetLastErrorType();
28574 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28575 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28576 : }
28577 : }
28578 : #endif
28579 : }
28580 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28581 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28582 : return resultobj;
28583 : fail:
28584 : return NULL;
28585 : }
28586 :
28587 :
28588 11 : SWIGINTERN PyObject *_wrap_Geometry_MakeValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28589 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28590 11 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28591 11 : char **arg2 = (char **) NULL ;
28592 11 : void *argp1 = 0 ;
28593 11 : int res1 = 0 ;
28594 11 : PyObject *swig_obj[2] ;
28595 11 : OGRGeometryShadow *result = 0 ;
28596 :
28597 11 : if (!SWIG_Python_UnpackTuple(args, "Geometry_MakeValid", 1, 2, swig_obj)) SWIG_fail;
28598 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28599 11 : if (!SWIG_IsOK(res1)) {
28600 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_MakeValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28601 : }
28602 11 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28603 11 : if (swig_obj[1]) {
28604 5 : {
28605 : /* %typemap(in) char **dict */
28606 5 : arg2 = NULL;
28607 5 : if ( PySequence_Check( swig_obj[1] ) ) {
28608 5 : int bErr = FALSE;
28609 5 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
28610 5 : if ( bErr )
28611 : {
28612 0 : SWIG_fail;
28613 : }
28614 : }
28615 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
28616 0 : int bErr = FALSE;
28617 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
28618 0 : if ( bErr )
28619 : {
28620 0 : SWIG_fail;
28621 : }
28622 : }
28623 : else {
28624 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
28625 0 : SWIG_fail;
28626 : }
28627 : }
28628 : }
28629 11 : {
28630 11 : const int bLocalUseExceptions = GetUseExceptions();
28631 11 : if ( bLocalUseExceptions ) {
28632 0 : pushErrorHandler();
28633 : }
28634 11 : {
28635 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28636 11 : result = (OGRGeometryShadow *)OGRGeometryShadow_MakeValid(arg1,arg2);
28637 11 : SWIG_PYTHON_THREAD_END_ALLOW;
28638 : }
28639 11 : if ( bLocalUseExceptions ) {
28640 0 : popErrorHandler();
28641 : }
28642 : #ifndef SED_HACKS
28643 : if ( bLocalUseExceptions ) {
28644 : CPLErr eclass = CPLGetLastErrorType();
28645 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28646 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28647 : }
28648 : }
28649 : #endif
28650 : }
28651 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28652 11 : {
28653 : /* %typemap(freearg) char **dict */
28654 11 : CSLDestroy( arg2 );
28655 : }
28656 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28657 : return resultobj;
28658 0 : fail:
28659 0 : {
28660 : /* %typemap(freearg) char **dict */
28661 0 : CSLDestroy( arg2 );
28662 : }
28663 : return NULL;
28664 : }
28665 :
28666 :
28667 1 : SWIGINTERN PyObject *_wrap_Geometry_SetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28668 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28669 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28670 1 : double arg2 ;
28671 1 : int arg3 = (int) 0 ;
28672 1 : void *argp1 = 0 ;
28673 1 : int res1 = 0 ;
28674 1 : double val2 ;
28675 1 : int ecode2 = 0 ;
28676 1 : int val3 ;
28677 1 : int ecode3 = 0 ;
28678 1 : PyObject *swig_obj[3] ;
28679 1 : OGRGeometryShadow *result = 0 ;
28680 :
28681 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SetPrecision", 2, 3, swig_obj)) SWIG_fail;
28682 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28683 1 : if (!SWIG_IsOK(res1)) {
28684 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPrecision" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28685 : }
28686 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28687 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
28688 1 : if (!SWIG_IsOK(ecode2)) {
28689 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPrecision" "', argument " "2"" of type '" "double""'");
28690 : }
28691 1 : arg2 = static_cast< double >(val2);
28692 1 : if (swig_obj[2]) {
28693 0 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
28694 0 : if (!SWIG_IsOK(ecode3)) {
28695 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPrecision" "', argument " "3"" of type '" "int""'");
28696 : }
28697 : arg3 = static_cast< int >(val3);
28698 : }
28699 1 : {
28700 1 : const int bLocalUseExceptions = GetUseExceptions();
28701 1 : if ( bLocalUseExceptions ) {
28702 1 : pushErrorHandler();
28703 : }
28704 1 : {
28705 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28706 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_SetPrecision(arg1,arg2,arg3);
28707 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28708 : }
28709 1 : if ( bLocalUseExceptions ) {
28710 1 : popErrorHandler();
28711 : }
28712 : #ifndef SED_HACKS
28713 : if ( bLocalUseExceptions ) {
28714 : CPLErr eclass = CPLGetLastErrorType();
28715 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28716 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28717 : }
28718 : }
28719 : #endif
28720 : }
28721 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28722 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28723 : return resultobj;
28724 : fail:
28725 : return NULL;
28726 : }
28727 :
28728 :
28729 1 : SWIGINTERN PyObject *_wrap_Geometry_Normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28730 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28731 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28732 1 : void *argp1 = 0 ;
28733 1 : int res1 = 0 ;
28734 1 : PyObject *swig_obj[1] ;
28735 1 : OGRGeometryShadow *result = 0 ;
28736 :
28737 1 : if (!args) SWIG_fail;
28738 1 : swig_obj[0] = args;
28739 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28740 1 : if (!SWIG_IsOK(res1)) {
28741 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Normalize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28742 : }
28743 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28744 1 : {
28745 1 : const int bLocalUseExceptions = GetUseExceptions();
28746 1 : if ( bLocalUseExceptions ) {
28747 0 : pushErrorHandler();
28748 : }
28749 1 : {
28750 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28751 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_Normalize(arg1);
28752 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28753 : }
28754 1 : if ( bLocalUseExceptions ) {
28755 0 : popErrorHandler();
28756 : }
28757 : #ifndef SED_HACKS
28758 : if ( bLocalUseExceptions ) {
28759 : CPLErr eclass = CPLGetLastErrorType();
28760 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28761 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28762 : }
28763 : }
28764 : #endif
28765 : }
28766 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28767 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28768 : return resultobj;
28769 : fail:
28770 : return NULL;
28771 : }
28772 :
28773 :
28774 18 : SWIGINTERN PyObject *_wrap_Geometry_RemoveLowerDimensionSubGeoms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28775 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28776 18 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28777 18 : void *argp1 = 0 ;
28778 18 : int res1 = 0 ;
28779 18 : PyObject *swig_obj[1] ;
28780 18 : OGRGeometryShadow *result = 0 ;
28781 :
28782 18 : if (!args) SWIG_fail;
28783 18 : swig_obj[0] = args;
28784 18 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28785 18 : if (!SWIG_IsOK(res1)) {
28786 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_RemoveLowerDimensionSubGeoms" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28787 : }
28788 18 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28789 18 : {
28790 18 : const int bLocalUseExceptions = GetUseExceptions();
28791 18 : if ( bLocalUseExceptions ) {
28792 0 : pushErrorHandler();
28793 : }
28794 18 : {
28795 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28796 18 : result = (OGRGeometryShadow *)OGRGeometryShadow_RemoveLowerDimensionSubGeoms(arg1);
28797 18 : SWIG_PYTHON_THREAD_END_ALLOW;
28798 : }
28799 18 : if ( bLocalUseExceptions ) {
28800 0 : popErrorHandler();
28801 : }
28802 : #ifndef SED_HACKS
28803 : if ( bLocalUseExceptions ) {
28804 : CPLErr eclass = CPLGetLastErrorType();
28805 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28806 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28807 : }
28808 : }
28809 : #endif
28810 : }
28811 18 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28812 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28813 : return resultobj;
28814 : fail:
28815 : return NULL;
28816 : }
28817 :
28818 :
28819 : SWIGINTERN PyObject *_wrap_Geometry_Buffer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
28820 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28821 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28822 : double arg2 ;
28823 : int arg3 = (int) 30 ;
28824 : void *argp1 = 0 ;
28825 : int res1 = 0 ;
28826 : double val2 ;
28827 : int ecode2 = 0 ;
28828 : int val3 ;
28829 : int ecode3 = 0 ;
28830 : OGRGeometryShadow *result = 0 ;
28831 :
28832 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
28833 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28834 : if (!SWIG_IsOK(res1)) {
28835 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28836 : }
28837 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28838 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
28839 : if (!SWIG_IsOK(ecode2)) {
28840 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
28841 : }
28842 : arg2 = static_cast< double >(val2);
28843 : if (swig_obj[2]) {
28844 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
28845 : if (!SWIG_IsOK(ecode3)) {
28846 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Buffer" "', argument " "3"" of type '" "int""'");
28847 : }
28848 : arg3 = static_cast< int >(val3);
28849 : }
28850 : {
28851 : const int bLocalUseExceptions = GetUseExceptions();
28852 : if ( bLocalUseExceptions ) {
28853 : pushErrorHandler();
28854 : }
28855 : {
28856 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28857 : result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer__SWIG_0(arg1,arg2,arg3);
28858 : SWIG_PYTHON_THREAD_END_ALLOW;
28859 : }
28860 : if ( bLocalUseExceptions ) {
28861 : popErrorHandler();
28862 : }
28863 : #ifndef SED_HACKS
28864 : if ( bLocalUseExceptions ) {
28865 : CPLErr eclass = CPLGetLastErrorType();
28866 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28867 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28868 : }
28869 : }
28870 : #endif
28871 : }
28872 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28873 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28874 : return resultobj;
28875 : fail:
28876 : return NULL;
28877 : }
28878 :
28879 :
28880 : SWIGINTERN PyObject *_wrap_Geometry_Buffer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
28881 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28882 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28883 : double arg2 ;
28884 : char **arg3 = (char **) 0 ;
28885 : void *argp1 = 0 ;
28886 : int res1 = 0 ;
28887 : double val2 ;
28888 : int ecode2 = 0 ;
28889 : OGRGeometryShadow *result = 0 ;
28890 :
28891 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
28892 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28893 : if (!SWIG_IsOK(res1)) {
28894 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28895 : }
28896 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28897 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
28898 : if (!SWIG_IsOK(ecode2)) {
28899 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
28900 : }
28901 : arg2 = static_cast< double >(val2);
28902 : {
28903 : /* %typemap(in) char **dict */
28904 : arg3 = NULL;
28905 : if ( PySequence_Check( swig_obj[2] ) ) {
28906 : int bErr = FALSE;
28907 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
28908 : if ( bErr )
28909 : {
28910 : SWIG_fail;
28911 : }
28912 : }
28913 : else if ( PyMapping_Check( swig_obj[2] ) ) {
28914 : int bErr = FALSE;
28915 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
28916 : if ( bErr )
28917 : {
28918 : SWIG_fail;
28919 : }
28920 : }
28921 : else {
28922 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
28923 : SWIG_fail;
28924 : }
28925 : }
28926 : {
28927 : const int bLocalUseExceptions = GetUseExceptions();
28928 : if ( bLocalUseExceptions ) {
28929 : pushErrorHandler();
28930 : }
28931 : {
28932 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28933 : result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer__SWIG_1(arg1,arg2,arg3);
28934 : SWIG_PYTHON_THREAD_END_ALLOW;
28935 : }
28936 : if ( bLocalUseExceptions ) {
28937 : popErrorHandler();
28938 : }
28939 : #ifndef SED_HACKS
28940 : if ( bLocalUseExceptions ) {
28941 : CPLErr eclass = CPLGetLastErrorType();
28942 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28943 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28944 : }
28945 : }
28946 : #endif
28947 : }
28948 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28949 : {
28950 : /* %typemap(freearg) char **dict */
28951 : CSLDestroy( arg3 );
28952 : }
28953 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
28954 : return resultobj;
28955 : fail:
28956 : {
28957 : /* %typemap(freearg) char **dict */
28958 : CSLDestroy( arg3 );
28959 : }
28960 : return NULL;
28961 : }
28962 :
28963 :
28964 40 : SWIGINTERN PyObject *_wrap_Geometry_Buffer(PyObject *self, PyObject *args) {
28965 40 : Py_ssize_t argc;
28966 40 : PyObject *argv[4] = {
28967 : 0
28968 : };
28969 :
28970 40 : if (!(argc = SWIG_Python_UnpackTuple(args, "Geometry_Buffer", 0, 3, argv))) SWIG_fail;
28971 40 : --argc;
28972 40 : if ((argc >= 2) && (argc <= 3)) {
28973 40 : int _v;
28974 40 : void *vptr = 0;
28975 40 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
28976 52 : _v = SWIG_CheckState(res);
28977 40 : if (_v) {
28978 40 : {
28979 40 : int res = SWIG_AsVal_double(argv[1], NULL);
28980 40 : _v = SWIG_CheckState(res);
28981 : }
28982 40 : if (_v) {
28983 40 : if (argc <= 2) {
28984 28 : return _wrap_Geometry_Buffer__SWIG_0(self, argc, argv);
28985 : }
28986 14 : {
28987 14 : int res = SWIG_AsVal_int(argv[2], NULL);
28988 14 : _v = SWIG_CheckState(res);
28989 : }
28990 2 : if (_v) {
28991 2 : return _wrap_Geometry_Buffer__SWIG_0(self, argc, argv);
28992 : }
28993 : }
28994 : }
28995 : }
28996 12 : if (argc == 3) {
28997 12 : int _v;
28998 12 : void *vptr = 0;
28999 12 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
29000 12 : _v = SWIG_CheckState(res);
29001 12 : if (_v) {
29002 12 : {
29003 12 : int res = SWIG_AsVal_double(argv[1], NULL);
29004 12 : _v = SWIG_CheckState(res);
29005 : }
29006 12 : if (_v) {
29007 12 : {
29008 : /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
29009 : /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
29010 : /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
29011 : /* (see #4816) */
29012 12 : _v = ((PyMapping_Check(argv[2]) || PySequence_Check(argv[2]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0)) ) ? 1 : 0;
29013 : }
29014 12 : if (_v) {
29015 12 : return _wrap_Geometry_Buffer__SWIG_1(self, argc, argv);
29016 : }
29017 : }
29018 : }
29019 : }
29020 :
29021 0 : fail:
29022 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Geometry_Buffer'.\n"
29023 : " Possible C/C++ prototypes are:\n"
29024 : " OGRGeometryShadow::Buffer(double,int)\n"
29025 : " OGRGeometryShadow::Buffer(double,char **)\n");
29026 : return 0;
29027 : }
29028 :
29029 :
29030 11 : SWIGINTERN PyObject *_wrap_Geometry_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29031 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29032 11 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29033 11 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29034 11 : void *argp1 = 0 ;
29035 11 : int res1 = 0 ;
29036 11 : void *argp2 = 0 ;
29037 11 : int res2 = 0 ;
29038 11 : PyObject *swig_obj[2] ;
29039 11 : OGRGeometryShadow *result = 0 ;
29040 :
29041 11 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersection", 2, 2, swig_obj)) SWIG_fail;
29042 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29043 11 : if (!SWIG_IsOK(res1)) {
29044 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersection" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29045 : }
29046 11 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29047 11 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29048 11 : if (!SWIG_IsOK(res2)) {
29049 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersection" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29050 : }
29051 11 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29052 11 : {
29053 11 : if (!arg2) {
29054 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29055 : }
29056 : }
29057 11 : {
29058 11 : const int bLocalUseExceptions = GetUseExceptions();
29059 11 : if ( bLocalUseExceptions ) {
29060 1 : pushErrorHandler();
29061 : }
29062 11 : {
29063 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29064 11 : result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
29065 11 : SWIG_PYTHON_THREAD_END_ALLOW;
29066 : }
29067 11 : if ( bLocalUseExceptions ) {
29068 1 : popErrorHandler();
29069 : }
29070 : #ifndef SED_HACKS
29071 : if ( bLocalUseExceptions ) {
29072 : CPLErr eclass = CPLGetLastErrorType();
29073 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29074 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29075 : }
29076 : }
29077 : #endif
29078 : }
29079 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
29080 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29081 : return resultobj;
29082 : fail:
29083 : return NULL;
29084 : }
29085 :
29086 :
29087 9 : SWIGINTERN PyObject *_wrap_Geometry_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29088 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29089 9 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29090 9 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29091 9 : void *argp1 = 0 ;
29092 9 : int res1 = 0 ;
29093 9 : void *argp2 = 0 ;
29094 9 : int res2 = 0 ;
29095 9 : PyObject *swig_obj[2] ;
29096 9 : OGRGeometryShadow *result = 0 ;
29097 :
29098 9 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Union", 2, 2, swig_obj)) SWIG_fail;
29099 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29100 9 : if (!SWIG_IsOK(res1)) {
29101 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Union" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29102 : }
29103 9 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29104 9 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29105 9 : if (!SWIG_IsOK(res2)) {
29106 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Union" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29107 : }
29108 9 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29109 9 : {
29110 9 : if (!arg2) {
29111 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29112 : }
29113 : }
29114 9 : {
29115 9 : const int bLocalUseExceptions = GetUseExceptions();
29116 9 : if ( bLocalUseExceptions ) {
29117 3 : pushErrorHandler();
29118 : }
29119 9 : {
29120 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29121 9 : result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
29122 9 : SWIG_PYTHON_THREAD_END_ALLOW;
29123 : }
29124 9 : if ( bLocalUseExceptions ) {
29125 3 : popErrorHandler();
29126 : }
29127 : #ifndef SED_HACKS
29128 : if ( bLocalUseExceptions ) {
29129 : CPLErr eclass = CPLGetLastErrorType();
29130 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29131 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29132 : }
29133 : }
29134 : #endif
29135 : }
29136 9 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
29137 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29138 : return resultobj;
29139 : fail:
29140 : return NULL;
29141 : }
29142 :
29143 :
29144 2 : SWIGINTERN PyObject *_wrap_Geometry_UnionCascaded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29145 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29146 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29147 2 : void *argp1 = 0 ;
29148 2 : int res1 = 0 ;
29149 2 : PyObject *swig_obj[1] ;
29150 2 : OGRGeometryShadow *result = 0 ;
29151 :
29152 2 : if (!args) SWIG_fail;
29153 2 : swig_obj[0] = args;
29154 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29155 2 : if (!SWIG_IsOK(res1)) {
29156 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnionCascaded" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29157 : }
29158 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29159 2 : {
29160 2 : const int bLocalUseExceptions = GetUseExceptions();
29161 2 : if ( bLocalUseExceptions ) {
29162 2 : pushErrorHandler();
29163 : }
29164 2 : {
29165 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29166 2 : result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
29167 2 : SWIG_PYTHON_THREAD_END_ALLOW;
29168 : }
29169 2 : if ( bLocalUseExceptions ) {
29170 2 : popErrorHandler();
29171 : }
29172 : #ifndef SED_HACKS
29173 : if ( bLocalUseExceptions ) {
29174 : CPLErr eclass = CPLGetLastErrorType();
29175 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29176 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29177 : }
29178 : }
29179 : #endif
29180 : }
29181 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
29182 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29183 : return resultobj;
29184 : fail:
29185 : return NULL;
29186 : }
29187 :
29188 :
29189 2 : SWIGINTERN PyObject *_wrap_Geometry_UnaryUnion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29190 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29191 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29192 2 : void *argp1 = 0 ;
29193 2 : int res1 = 0 ;
29194 2 : PyObject *swig_obj[1] ;
29195 2 : OGRGeometryShadow *result = 0 ;
29196 :
29197 2 : if (!args) SWIG_fail;
29198 2 : swig_obj[0] = args;
29199 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29200 2 : if (!SWIG_IsOK(res1)) {
29201 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnaryUnion" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29202 : }
29203 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29204 2 : {
29205 2 : const int bLocalUseExceptions = GetUseExceptions();
29206 2 : if ( bLocalUseExceptions ) {
29207 2 : pushErrorHandler();
29208 : }
29209 2 : {
29210 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29211 2 : result = (OGRGeometryShadow *)OGRGeometryShadow_UnaryUnion(arg1);
29212 2 : SWIG_PYTHON_THREAD_END_ALLOW;
29213 : }
29214 2 : if ( bLocalUseExceptions ) {
29215 2 : popErrorHandler();
29216 : }
29217 : #ifndef SED_HACKS
29218 : if ( bLocalUseExceptions ) {
29219 : CPLErr eclass = CPLGetLastErrorType();
29220 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29221 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29222 : }
29223 : }
29224 : #endif
29225 : }
29226 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
29227 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29228 : return resultobj;
29229 : fail:
29230 : return NULL;
29231 : }
29232 :
29233 :
29234 5 : SWIGINTERN PyObject *_wrap_Geometry_Difference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29235 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29236 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29237 5 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29238 5 : void *argp1 = 0 ;
29239 5 : int res1 = 0 ;
29240 5 : void *argp2 = 0 ;
29241 5 : int res2 = 0 ;
29242 5 : PyObject *swig_obj[2] ;
29243 5 : OGRGeometryShadow *result = 0 ;
29244 :
29245 5 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Difference", 2, 2, swig_obj)) SWIG_fail;
29246 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29247 5 : if (!SWIG_IsOK(res1)) {
29248 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Difference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29249 : }
29250 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29251 5 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29252 5 : if (!SWIG_IsOK(res2)) {
29253 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Difference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29254 : }
29255 5 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29256 5 : {
29257 5 : if (!arg2) {
29258 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29259 : }
29260 : }
29261 5 : {
29262 5 : const int bLocalUseExceptions = GetUseExceptions();
29263 5 : if ( bLocalUseExceptions ) {
29264 1 : pushErrorHandler();
29265 : }
29266 5 : {
29267 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29268 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
29269 5 : SWIG_PYTHON_THREAD_END_ALLOW;
29270 : }
29271 5 : if ( bLocalUseExceptions ) {
29272 1 : popErrorHandler();
29273 : }
29274 : #ifndef SED_HACKS
29275 : if ( bLocalUseExceptions ) {
29276 : CPLErr eclass = CPLGetLastErrorType();
29277 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29278 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29279 : }
29280 : }
29281 : #endif
29282 : }
29283 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
29284 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29285 : return resultobj;
29286 : fail:
29287 : return NULL;
29288 : }
29289 :
29290 :
29291 5 : SWIGINTERN PyObject *_wrap_Geometry_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29292 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29293 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29294 5 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29295 5 : void *argp1 = 0 ;
29296 5 : int res1 = 0 ;
29297 5 : void *argp2 = 0 ;
29298 5 : int res2 = 0 ;
29299 5 : PyObject *swig_obj[2] ;
29300 5 : OGRGeometryShadow *result = 0 ;
29301 :
29302 5 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SymDifference", 2, 2, swig_obj)) SWIG_fail;
29303 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29304 5 : if (!SWIG_IsOK(res1)) {
29305 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29306 : }
29307 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29308 5 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29309 5 : if (!SWIG_IsOK(res2)) {
29310 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29311 : }
29312 5 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29313 5 : {
29314 5 : if (!arg2) {
29315 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29316 : }
29317 : }
29318 5 : {
29319 5 : const int bLocalUseExceptions = GetUseExceptions();
29320 5 : if ( bLocalUseExceptions ) {
29321 1 : pushErrorHandler();
29322 : }
29323 5 : {
29324 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29325 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
29326 5 : SWIG_PYTHON_THREAD_END_ALLOW;
29327 : }
29328 5 : if ( bLocalUseExceptions ) {
29329 1 : popErrorHandler();
29330 : }
29331 : #ifndef SED_HACKS
29332 : if ( bLocalUseExceptions ) {
29333 : CPLErr eclass = CPLGetLastErrorType();
29334 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29335 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29336 : }
29337 : }
29338 : #endif
29339 : }
29340 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
29341 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29342 : return resultobj;
29343 : fail:
29344 : return NULL;
29345 : }
29346 :
29347 :
29348 1 : SWIGINTERN PyObject *_wrap_Geometry_SymmetricDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29349 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29350 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29351 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29352 1 : void *argp1 = 0 ;
29353 1 : int res1 = 0 ;
29354 1 : void *argp2 = 0 ;
29355 1 : int res2 = 0 ;
29356 1 : PyObject *swig_obj[2] ;
29357 1 : OGRGeometryShadow *result = 0 ;
29358 :
29359 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SymmetricDifference", 2, 2, swig_obj)) SWIG_fail;
29360 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29361 1 : if (!SWIG_IsOK(res1)) {
29362 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymmetricDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29363 : }
29364 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29365 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29366 1 : if (!SWIG_IsOK(res2)) {
29367 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymmetricDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29368 : }
29369 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29370 1 : {
29371 1 : if (!arg2) {
29372 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29373 : }
29374 : }
29375 1 : {
29376 1 : const int bLocalUseExceptions = GetUseExceptions();
29377 1 : if ( bLocalUseExceptions ) {
29378 1 : pushErrorHandler();
29379 : }
29380 1 : {
29381 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29382 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
29383 1 : SWIG_PYTHON_THREAD_END_ALLOW;
29384 : }
29385 1 : if ( bLocalUseExceptions ) {
29386 1 : popErrorHandler();
29387 : }
29388 : #ifndef SED_HACKS
29389 : if ( bLocalUseExceptions ) {
29390 : CPLErr eclass = CPLGetLastErrorType();
29391 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29392 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29393 : }
29394 : }
29395 : #endif
29396 : }
29397 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
29398 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29399 : return resultobj;
29400 : fail:
29401 : return NULL;
29402 : }
29403 :
29404 :
29405 1 : SWIGINTERN PyObject *_wrap_Geometry_Distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29406 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29407 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29408 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29409 1 : void *argp1 = 0 ;
29410 1 : int res1 = 0 ;
29411 1 : void *argp2 = 0 ;
29412 1 : int res2 = 0 ;
29413 1 : PyObject *swig_obj[2] ;
29414 1 : double result;
29415 :
29416 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Distance", 2, 2, swig_obj)) SWIG_fail;
29417 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29418 1 : if (!SWIG_IsOK(res1)) {
29419 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29420 : }
29421 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29422 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29423 1 : if (!SWIG_IsOK(res2)) {
29424 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29425 : }
29426 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29427 1 : {
29428 1 : if (!arg2) {
29429 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29430 : }
29431 : }
29432 1 : {
29433 1 : const int bLocalUseExceptions = GetUseExceptions();
29434 1 : if ( bLocalUseExceptions ) {
29435 1 : pushErrorHandler();
29436 : }
29437 1 : {
29438 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29439 1 : result = (double)OGRGeometryShadow_Distance(arg1,arg2);
29440 1 : SWIG_PYTHON_THREAD_END_ALLOW;
29441 : }
29442 1 : if ( bLocalUseExceptions ) {
29443 1 : popErrorHandler();
29444 : }
29445 : #ifndef SED_HACKS
29446 : if ( bLocalUseExceptions ) {
29447 : CPLErr eclass = CPLGetLastErrorType();
29448 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29449 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29450 : }
29451 : }
29452 : #endif
29453 : }
29454 1 : resultobj = SWIG_From_double(static_cast< double >(result));
29455 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29456 : return resultobj;
29457 : fail:
29458 : return NULL;
29459 : }
29460 :
29461 :
29462 1 : SWIGINTERN PyObject *_wrap_Geometry_Distance3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29463 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29464 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29465 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29466 1 : void *argp1 = 0 ;
29467 1 : int res1 = 0 ;
29468 1 : void *argp2 = 0 ;
29469 1 : int res2 = 0 ;
29470 1 : PyObject *swig_obj[2] ;
29471 1 : double result;
29472 :
29473 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Distance3D", 2, 2, swig_obj)) SWIG_fail;
29474 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29475 1 : if (!SWIG_IsOK(res1)) {
29476 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29477 : }
29478 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29479 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29480 1 : if (!SWIG_IsOK(res2)) {
29481 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance3D" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29482 : }
29483 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29484 1 : {
29485 1 : if (!arg2) {
29486 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29487 : }
29488 : }
29489 1 : {
29490 1 : const int bLocalUseExceptions = GetUseExceptions();
29491 1 : if ( bLocalUseExceptions ) {
29492 0 : pushErrorHandler();
29493 : }
29494 1 : {
29495 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29496 1 : result = (double)OGRGeometryShadow_Distance3D(arg1,arg2);
29497 1 : SWIG_PYTHON_THREAD_END_ALLOW;
29498 : }
29499 1 : if ( bLocalUseExceptions ) {
29500 0 : popErrorHandler();
29501 : }
29502 : #ifndef SED_HACKS
29503 : if ( bLocalUseExceptions ) {
29504 : CPLErr eclass = CPLGetLastErrorType();
29505 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29506 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29507 : }
29508 : }
29509 : #endif
29510 : }
29511 1 : resultobj = SWIG_From_double(static_cast< double >(result));
29512 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29513 : return resultobj;
29514 : fail:
29515 : return NULL;
29516 : }
29517 :
29518 :
29519 4 : SWIGINTERN PyObject *_wrap_Geometry_Empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29520 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29521 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29522 4 : void *argp1 = 0 ;
29523 4 : int res1 = 0 ;
29524 4 : PyObject *swig_obj[1] ;
29525 :
29526 4 : if (!args) SWIG_fail;
29527 4 : swig_obj[0] = args;
29528 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29529 4 : if (!SWIG_IsOK(res1)) {
29530 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Empty" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29531 : }
29532 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29533 4 : {
29534 4 : const int bLocalUseExceptions = GetUseExceptions();
29535 4 : if ( bLocalUseExceptions ) {
29536 0 : pushErrorHandler();
29537 : }
29538 4 : {
29539 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29540 4 : OGRGeometryShadow_Empty(arg1);
29541 4 : SWIG_PYTHON_THREAD_END_ALLOW;
29542 : }
29543 4 : if ( bLocalUseExceptions ) {
29544 0 : popErrorHandler();
29545 : }
29546 : #ifndef SED_HACKS
29547 : if ( bLocalUseExceptions ) {
29548 : CPLErr eclass = CPLGetLastErrorType();
29549 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29550 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29551 : }
29552 : }
29553 : #endif
29554 : }
29555 4 : resultobj = SWIG_Py_Void();
29556 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29557 : return resultobj;
29558 : fail:
29559 : return NULL;
29560 : }
29561 :
29562 :
29563 2159 : SWIGINTERN PyObject *_wrap_Geometry_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29564 2159 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29565 2159 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29566 2159 : void *argp1 = 0 ;
29567 2159 : int res1 = 0 ;
29568 2159 : PyObject *swig_obj[1] ;
29569 2159 : bool result;
29570 :
29571 2159 : if (!args) SWIG_fail;
29572 2159 : swig_obj[0] = args;
29573 2159 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29574 2159 : if (!SWIG_IsOK(res1)) {
29575 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsEmpty" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29576 : }
29577 2159 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29578 2159 : {
29579 2159 : const int bLocalUseExceptions = GetUseExceptions();
29580 2159 : if ( bLocalUseExceptions ) {
29581 1011 : pushErrorHandler();
29582 : }
29583 2159 : {
29584 2159 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29585 2159 : result = (bool)OGRGeometryShadow_IsEmpty(arg1);
29586 2159 : SWIG_PYTHON_THREAD_END_ALLOW;
29587 : }
29588 2159 : if ( bLocalUseExceptions ) {
29589 1011 : popErrorHandler();
29590 : }
29591 : #ifndef SED_HACKS
29592 : if ( bLocalUseExceptions ) {
29593 : CPLErr eclass = CPLGetLastErrorType();
29594 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29595 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29596 : }
29597 : }
29598 : #endif
29599 : }
29600 2159 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29601 2159 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29602 : return resultobj;
29603 : fail:
29604 : return NULL;
29605 : }
29606 :
29607 :
29608 19 : SWIGINTERN PyObject *_wrap_Geometry_IsValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29609 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29610 19 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29611 19 : void *argp1 = 0 ;
29612 19 : int res1 = 0 ;
29613 19 : PyObject *swig_obj[1] ;
29614 19 : bool result;
29615 :
29616 19 : if (!args) SWIG_fail;
29617 19 : swig_obj[0] = args;
29618 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29619 19 : if (!SWIG_IsOK(res1)) {
29620 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29621 : }
29622 19 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29623 19 : {
29624 19 : const int bLocalUseExceptions = GetUseExceptions();
29625 19 : if ( bLocalUseExceptions ) {
29626 14 : pushErrorHandler();
29627 : }
29628 19 : {
29629 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29630 19 : result = (bool)OGRGeometryShadow_IsValid(arg1);
29631 19 : SWIG_PYTHON_THREAD_END_ALLOW;
29632 : }
29633 19 : if ( bLocalUseExceptions ) {
29634 14 : popErrorHandler();
29635 : }
29636 : #ifndef SED_HACKS
29637 : if ( bLocalUseExceptions ) {
29638 : CPLErr eclass = CPLGetLastErrorType();
29639 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29640 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29641 : }
29642 : }
29643 : #endif
29644 : }
29645 19 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29646 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29647 : return resultobj;
29648 : fail:
29649 : return NULL;
29650 : }
29651 :
29652 :
29653 5 : SWIGINTERN PyObject *_wrap_Geometry_IsSimple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29654 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29655 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29656 5 : void *argp1 = 0 ;
29657 5 : int res1 = 0 ;
29658 5 : PyObject *swig_obj[1] ;
29659 5 : bool result;
29660 :
29661 5 : if (!args) SWIG_fail;
29662 5 : swig_obj[0] = args;
29663 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29664 5 : if (!SWIG_IsOK(res1)) {
29665 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsSimple" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29666 : }
29667 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29668 5 : {
29669 5 : const int bLocalUseExceptions = GetUseExceptions();
29670 5 : if ( bLocalUseExceptions ) {
29671 2 : pushErrorHandler();
29672 : }
29673 5 : {
29674 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29675 5 : result = (bool)OGRGeometryShadow_IsSimple(arg1);
29676 5 : SWIG_PYTHON_THREAD_END_ALLOW;
29677 : }
29678 5 : if ( bLocalUseExceptions ) {
29679 2 : popErrorHandler();
29680 : }
29681 : #ifndef SED_HACKS
29682 : if ( bLocalUseExceptions ) {
29683 : CPLErr eclass = CPLGetLastErrorType();
29684 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29685 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29686 : }
29687 : }
29688 : #endif
29689 : }
29690 5 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29691 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29692 : return resultobj;
29693 : fail:
29694 : return NULL;
29695 : }
29696 :
29697 :
29698 1 : SWIGINTERN PyObject *_wrap_Geometry_IsRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29699 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29700 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29701 1 : void *argp1 = 0 ;
29702 1 : int res1 = 0 ;
29703 1 : PyObject *swig_obj[1] ;
29704 1 : bool result;
29705 :
29706 1 : if (!args) SWIG_fail;
29707 1 : swig_obj[0] = args;
29708 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29709 1 : if (!SWIG_IsOK(res1)) {
29710 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsRing" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29711 : }
29712 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29713 1 : {
29714 1 : const int bLocalUseExceptions = GetUseExceptions();
29715 1 : if ( bLocalUseExceptions ) {
29716 1 : pushErrorHandler();
29717 : }
29718 1 : {
29719 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29720 1 : result = (bool)OGRGeometryShadow_IsRing(arg1);
29721 1 : SWIG_PYTHON_THREAD_END_ALLOW;
29722 : }
29723 1 : if ( bLocalUseExceptions ) {
29724 1 : popErrorHandler();
29725 : }
29726 : #ifndef SED_HACKS
29727 : if ( bLocalUseExceptions ) {
29728 : CPLErr eclass = CPLGetLastErrorType();
29729 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29730 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29731 : }
29732 : }
29733 : #endif
29734 : }
29735 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29736 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29737 : return resultobj;
29738 : fail:
29739 : return NULL;
29740 : }
29741 :
29742 :
29743 7 : SWIGINTERN PyObject *_wrap_Geometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29744 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29745 7 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29746 7 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29747 7 : void *argp1 = 0 ;
29748 7 : int res1 = 0 ;
29749 7 : void *argp2 = 0 ;
29750 7 : int res2 = 0 ;
29751 7 : PyObject *swig_obj[2] ;
29752 7 : bool result;
29753 :
29754 7 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersects", 2, 2, swig_obj)) SWIG_fail;
29755 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29756 7 : if (!SWIG_IsOK(res1)) {
29757 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersects" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29758 : }
29759 7 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29760 7 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29761 7 : if (!SWIG_IsOK(res2)) {
29762 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29763 : }
29764 7 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29765 7 : {
29766 7 : if (!arg2) {
29767 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29768 : }
29769 : }
29770 7 : {
29771 7 : const int bLocalUseExceptions = GetUseExceptions();
29772 7 : if ( bLocalUseExceptions ) {
29773 0 : pushErrorHandler();
29774 : }
29775 7 : {
29776 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29777 7 : result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
29778 7 : SWIG_PYTHON_THREAD_END_ALLOW;
29779 : }
29780 7 : if ( bLocalUseExceptions ) {
29781 0 : popErrorHandler();
29782 : }
29783 : #ifndef SED_HACKS
29784 : if ( bLocalUseExceptions ) {
29785 : CPLErr eclass = CPLGetLastErrorType();
29786 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29787 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29788 : }
29789 : }
29790 : #endif
29791 : }
29792 7 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29793 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29794 : return resultobj;
29795 : fail:
29796 : return NULL;
29797 : }
29798 :
29799 :
29800 2 : SWIGINTERN PyObject *_wrap_Geometry_Intersect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29801 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29802 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29803 2 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29804 2 : void *argp1 = 0 ;
29805 2 : int res1 = 0 ;
29806 2 : void *argp2 = 0 ;
29807 2 : int res2 = 0 ;
29808 2 : PyObject *swig_obj[2] ;
29809 2 : bool result;
29810 :
29811 2 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersect", 2, 2, swig_obj)) SWIG_fail;
29812 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29813 2 : if (!SWIG_IsOK(res1)) {
29814 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersect" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29815 : }
29816 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29817 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29818 2 : if (!SWIG_IsOK(res2)) {
29819 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersect" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29820 : }
29821 2 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29822 2 : {
29823 2 : if (!arg2) {
29824 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29825 : }
29826 : }
29827 2 : {
29828 2 : const int bLocalUseExceptions = GetUseExceptions();
29829 2 : if ( bLocalUseExceptions ) {
29830 2 : pushErrorHandler();
29831 : }
29832 2 : {
29833 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29834 2 : result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
29835 2 : SWIG_PYTHON_THREAD_END_ALLOW;
29836 : }
29837 2 : if ( bLocalUseExceptions ) {
29838 2 : popErrorHandler();
29839 : }
29840 : #ifndef SED_HACKS
29841 : if ( bLocalUseExceptions ) {
29842 : CPLErr eclass = CPLGetLastErrorType();
29843 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29844 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29845 : }
29846 : }
29847 : #endif
29848 : }
29849 2 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29850 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29851 : return resultobj;
29852 : fail:
29853 : return NULL;
29854 : }
29855 :
29856 :
29857 28011 : SWIGINTERN PyObject *_wrap_Geometry_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29858 28011 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29859 28011 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29860 28011 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29861 28011 : void *argp1 = 0 ;
29862 28011 : int res1 = 0 ;
29863 28011 : void *argp2 = 0 ;
29864 28011 : int res2 = 0 ;
29865 28011 : PyObject *swig_obj[2] ;
29866 28011 : bool result;
29867 :
29868 28011 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Equals", 2, 2, swig_obj)) SWIG_fail;
29869 28011 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29870 28011 : if (!SWIG_IsOK(res1)) {
29871 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equals" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29872 : }
29873 28011 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29874 28011 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29875 28011 : if (!SWIG_IsOK(res2)) {
29876 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equals" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29877 : }
29878 28011 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29879 28011 : {
29880 28011 : if (!arg2) {
29881 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29882 : }
29883 : }
29884 28011 : {
29885 28011 : const int bLocalUseExceptions = GetUseExceptions();
29886 28011 : if ( bLocalUseExceptions ) {
29887 14362 : pushErrorHandler();
29888 : }
29889 28011 : {
29890 28011 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29891 28011 : result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
29892 28011 : SWIG_PYTHON_THREAD_END_ALLOW;
29893 : }
29894 28011 : if ( bLocalUseExceptions ) {
29895 14362 : popErrorHandler();
29896 : }
29897 : #ifndef SED_HACKS
29898 : if ( bLocalUseExceptions ) {
29899 : CPLErr eclass = CPLGetLastErrorType();
29900 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29901 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29902 : }
29903 : }
29904 : #endif
29905 : }
29906 28011 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29907 28011 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29908 : return resultobj;
29909 : fail:
29910 : return NULL;
29911 : }
29912 :
29913 :
29914 170 : SWIGINTERN PyObject *_wrap_Geometry_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29915 170 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29916 170 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29917 170 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29918 170 : void *argp1 = 0 ;
29919 170 : int res1 = 0 ;
29920 170 : void *argp2 = 0 ;
29921 170 : int res2 = 0 ;
29922 170 : PyObject *swig_obj[2] ;
29923 170 : bool result;
29924 :
29925 170 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Equal", 2, 2, swig_obj)) SWIG_fail;
29926 170 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29927 170 : if (!SWIG_IsOK(res1)) {
29928 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equal" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29929 : }
29930 170 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29931 170 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29932 170 : if (!SWIG_IsOK(res2)) {
29933 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equal" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29934 : }
29935 170 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29936 170 : {
29937 170 : if (!arg2) {
29938 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29939 : }
29940 : }
29941 170 : {
29942 170 : const int bLocalUseExceptions = GetUseExceptions();
29943 170 : if ( bLocalUseExceptions ) {
29944 0 : pushErrorHandler();
29945 : }
29946 170 : {
29947 170 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29948 170 : result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
29949 170 : SWIG_PYTHON_THREAD_END_ALLOW;
29950 : }
29951 170 : if ( bLocalUseExceptions ) {
29952 0 : popErrorHandler();
29953 : }
29954 : #ifndef SED_HACKS
29955 : if ( bLocalUseExceptions ) {
29956 : CPLErr eclass = CPLGetLastErrorType();
29957 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29958 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29959 : }
29960 : }
29961 : #endif
29962 : }
29963 170 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29964 170 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
29965 : return resultobj;
29966 : fail:
29967 : return NULL;
29968 : }
29969 :
29970 :
29971 6 : SWIGINTERN PyObject *_wrap_Geometry_Disjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29972 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29973 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29974 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29975 6 : void *argp1 = 0 ;
29976 6 : int res1 = 0 ;
29977 6 : void *argp2 = 0 ;
29978 6 : int res2 = 0 ;
29979 6 : PyObject *swig_obj[2] ;
29980 6 : bool result;
29981 :
29982 6 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Disjoint", 2, 2, swig_obj)) SWIG_fail;
29983 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29984 6 : if (!SWIG_IsOK(res1)) {
29985 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Disjoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29986 : }
29987 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29988 6 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29989 6 : if (!SWIG_IsOK(res2)) {
29990 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Disjoint" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29991 : }
29992 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29993 6 : {
29994 6 : if (!arg2) {
29995 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29996 : }
29997 : }
29998 6 : {
29999 6 : const int bLocalUseExceptions = GetUseExceptions();
30000 6 : if ( bLocalUseExceptions ) {
30001 2 : pushErrorHandler();
30002 : }
30003 6 : {
30004 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30005 6 : result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
30006 6 : SWIG_PYTHON_THREAD_END_ALLOW;
30007 : }
30008 6 : if ( bLocalUseExceptions ) {
30009 2 : popErrorHandler();
30010 : }
30011 : #ifndef SED_HACKS
30012 : if ( bLocalUseExceptions ) {
30013 : CPLErr eclass = CPLGetLastErrorType();
30014 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30015 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30016 : }
30017 : }
30018 : #endif
30019 : }
30020 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
30021 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30022 : return resultobj;
30023 : fail:
30024 : return NULL;
30025 : }
30026 :
30027 :
30028 6 : SWIGINTERN PyObject *_wrap_Geometry_Touches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30029 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30030 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30031 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
30032 6 : void *argp1 = 0 ;
30033 6 : int res1 = 0 ;
30034 6 : void *argp2 = 0 ;
30035 6 : int res2 = 0 ;
30036 6 : PyObject *swig_obj[2] ;
30037 6 : bool result;
30038 :
30039 6 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Touches", 2, 2, swig_obj)) SWIG_fail;
30040 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30041 6 : if (!SWIG_IsOK(res1)) {
30042 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Touches" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30043 : }
30044 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30045 6 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30046 6 : if (!SWIG_IsOK(res2)) {
30047 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Touches" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
30048 : }
30049 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
30050 6 : {
30051 6 : if (!arg2) {
30052 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
30053 : }
30054 : }
30055 6 : {
30056 6 : const int bLocalUseExceptions = GetUseExceptions();
30057 6 : if ( bLocalUseExceptions ) {
30058 2 : pushErrorHandler();
30059 : }
30060 6 : {
30061 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30062 6 : result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
30063 6 : SWIG_PYTHON_THREAD_END_ALLOW;
30064 : }
30065 6 : if ( bLocalUseExceptions ) {
30066 2 : popErrorHandler();
30067 : }
30068 : #ifndef SED_HACKS
30069 : if ( bLocalUseExceptions ) {
30070 : CPLErr eclass = CPLGetLastErrorType();
30071 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30072 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30073 : }
30074 : }
30075 : #endif
30076 : }
30077 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
30078 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30079 : return resultobj;
30080 : fail:
30081 : return NULL;
30082 : }
30083 :
30084 :
30085 6 : SWIGINTERN PyObject *_wrap_Geometry_Crosses(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30086 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30087 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30088 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
30089 6 : void *argp1 = 0 ;
30090 6 : int res1 = 0 ;
30091 6 : void *argp2 = 0 ;
30092 6 : int res2 = 0 ;
30093 6 : PyObject *swig_obj[2] ;
30094 6 : bool result;
30095 :
30096 6 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Crosses", 2, 2, swig_obj)) SWIG_fail;
30097 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30098 6 : if (!SWIG_IsOK(res1)) {
30099 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Crosses" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30100 : }
30101 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30102 6 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30103 6 : if (!SWIG_IsOK(res2)) {
30104 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Crosses" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
30105 : }
30106 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
30107 6 : {
30108 6 : if (!arg2) {
30109 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
30110 : }
30111 : }
30112 6 : {
30113 6 : const int bLocalUseExceptions = GetUseExceptions();
30114 6 : if ( bLocalUseExceptions ) {
30115 2 : pushErrorHandler();
30116 : }
30117 6 : {
30118 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30119 6 : result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
30120 6 : SWIG_PYTHON_THREAD_END_ALLOW;
30121 : }
30122 6 : if ( bLocalUseExceptions ) {
30123 2 : popErrorHandler();
30124 : }
30125 : #ifndef SED_HACKS
30126 : if ( bLocalUseExceptions ) {
30127 : CPLErr eclass = CPLGetLastErrorType();
30128 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30129 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30130 : }
30131 : }
30132 : #endif
30133 : }
30134 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
30135 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30136 : return resultobj;
30137 : fail:
30138 : return NULL;
30139 : }
30140 :
30141 :
30142 6400 : SWIGINTERN PyObject *_wrap_Geometry_Within(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30143 6400 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30144 6400 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30145 6400 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
30146 6400 : void *argp1 = 0 ;
30147 6400 : int res1 = 0 ;
30148 6400 : void *argp2 = 0 ;
30149 6400 : int res2 = 0 ;
30150 6400 : PyObject *swig_obj[2] ;
30151 6400 : bool result;
30152 :
30153 6400 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Within", 2, 2, swig_obj)) SWIG_fail;
30154 6400 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30155 6400 : if (!SWIG_IsOK(res1)) {
30156 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Within" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30157 : }
30158 6400 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30159 6400 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30160 6400 : if (!SWIG_IsOK(res2)) {
30161 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Within" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
30162 : }
30163 6400 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
30164 6400 : {
30165 6400 : if (!arg2) {
30166 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
30167 : }
30168 : }
30169 6400 : {
30170 6400 : const int bLocalUseExceptions = GetUseExceptions();
30171 6400 : if ( bLocalUseExceptions ) {
30172 7 : pushErrorHandler();
30173 : }
30174 6400 : {
30175 6400 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30176 6400 : result = (bool)OGRGeometryShadow_Within(arg1,arg2);
30177 6400 : SWIG_PYTHON_THREAD_END_ALLOW;
30178 : }
30179 6400 : if ( bLocalUseExceptions ) {
30180 7 : popErrorHandler();
30181 : }
30182 : #ifndef SED_HACKS
30183 : if ( bLocalUseExceptions ) {
30184 : CPLErr eclass = CPLGetLastErrorType();
30185 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30186 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30187 : }
30188 : }
30189 : #endif
30190 : }
30191 6400 : resultobj = SWIG_From_bool(static_cast< bool >(result));
30192 6400 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30193 : return resultobj;
30194 : fail:
30195 : return NULL;
30196 : }
30197 :
30198 :
30199 9 : SWIGINTERN PyObject *_wrap_Geometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30200 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30201 9 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30202 9 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
30203 9 : void *argp1 = 0 ;
30204 9 : int res1 = 0 ;
30205 9 : void *argp2 = 0 ;
30206 9 : int res2 = 0 ;
30207 9 : PyObject *swig_obj[2] ;
30208 9 : bool result;
30209 :
30210 9 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Contains", 2, 2, swig_obj)) SWIG_fail;
30211 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30212 9 : if (!SWIG_IsOK(res1)) {
30213 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Contains" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30214 : }
30215 9 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30216 9 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30217 9 : if (!SWIG_IsOK(res2)) {
30218 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
30219 : }
30220 9 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
30221 9 : {
30222 9 : if (!arg2) {
30223 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
30224 : }
30225 : }
30226 9 : {
30227 9 : const int bLocalUseExceptions = GetUseExceptions();
30228 9 : if ( bLocalUseExceptions ) {
30229 2 : pushErrorHandler();
30230 : }
30231 9 : {
30232 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30233 9 : result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
30234 9 : SWIG_PYTHON_THREAD_END_ALLOW;
30235 : }
30236 9 : if ( bLocalUseExceptions ) {
30237 2 : popErrorHandler();
30238 : }
30239 : #ifndef SED_HACKS
30240 : if ( bLocalUseExceptions ) {
30241 : CPLErr eclass = CPLGetLastErrorType();
30242 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30243 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30244 : }
30245 : }
30246 : #endif
30247 : }
30248 9 : resultobj = SWIG_From_bool(static_cast< bool >(result));
30249 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30250 : return resultobj;
30251 : fail:
30252 : return NULL;
30253 : }
30254 :
30255 :
30256 6 : SWIGINTERN PyObject *_wrap_Geometry_Overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30257 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30258 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30259 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
30260 6 : void *argp1 = 0 ;
30261 6 : int res1 = 0 ;
30262 6 : void *argp2 = 0 ;
30263 6 : int res2 = 0 ;
30264 6 : PyObject *swig_obj[2] ;
30265 6 : bool result;
30266 :
30267 6 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Overlaps", 2, 2, swig_obj)) SWIG_fail;
30268 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30269 6 : if (!SWIG_IsOK(res1)) {
30270 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Overlaps" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30271 : }
30272 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30273 6 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30274 6 : if (!SWIG_IsOK(res2)) {
30275 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Overlaps" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
30276 : }
30277 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
30278 6 : {
30279 6 : if (!arg2) {
30280 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
30281 : }
30282 : }
30283 6 : {
30284 6 : const int bLocalUseExceptions = GetUseExceptions();
30285 6 : if ( bLocalUseExceptions ) {
30286 2 : pushErrorHandler();
30287 : }
30288 6 : {
30289 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30290 6 : result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
30291 6 : SWIG_PYTHON_THREAD_END_ALLOW;
30292 : }
30293 6 : if ( bLocalUseExceptions ) {
30294 2 : popErrorHandler();
30295 : }
30296 : #ifndef SED_HACKS
30297 : if ( bLocalUseExceptions ) {
30298 : CPLErr eclass = CPLGetLastErrorType();
30299 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30300 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30301 : }
30302 : }
30303 : #endif
30304 : }
30305 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
30306 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30307 : return resultobj;
30308 : fail:
30309 : return NULL;
30310 : }
30311 :
30312 :
30313 9 : SWIGINTERN PyObject *_wrap_Geometry_TransformTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30314 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30315 9 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30316 9 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
30317 9 : void *argp1 = 0 ;
30318 9 : int res1 = 0 ;
30319 9 : void *argp2 = 0 ;
30320 9 : int res2 = 0 ;
30321 9 : PyObject *swig_obj[2] ;
30322 9 : OGRErr result;
30323 :
30324 9 : if (!SWIG_Python_UnpackTuple(args, "Geometry_TransformTo", 2, 2, swig_obj)) SWIG_fail;
30325 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30326 9 : if (!SWIG_IsOK(res1)) {
30327 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_TransformTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30328 : }
30329 9 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30330 9 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
30331 9 : if (!SWIG_IsOK(res2)) {
30332 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_TransformTo" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
30333 : }
30334 9 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
30335 9 : {
30336 9 : if (!arg2) {
30337 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
30338 : }
30339 : }
30340 9 : {
30341 9 : const int bLocalUseExceptions = GetUseExceptions();
30342 9 : if ( bLocalUseExceptions ) {
30343 2 : pushErrorHandler();
30344 : }
30345 9 : {
30346 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30347 9 : result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
30348 9 : SWIG_PYTHON_THREAD_END_ALLOW;
30349 : }
30350 9 : if ( bLocalUseExceptions ) {
30351 2 : popErrorHandler();
30352 : }
30353 : #ifndef SED_HACKS
30354 : if ( bLocalUseExceptions ) {
30355 : CPLErr eclass = CPLGetLastErrorType();
30356 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30357 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30358 : }
30359 : }
30360 : #endif
30361 : }
30362 9 : {
30363 : /* %typemap(out) OGRErr */
30364 10 : if ( result != 0 && GetUseExceptions()) {
30365 0 : const char* pszMessage = CPLGetLastErrorMsg();
30366 0 : if( pszMessage[0] != '\0' )
30367 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
30368 : else
30369 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
30370 0 : SWIG_fail;
30371 : }
30372 : }
30373 9 : {
30374 : /* %typemap(ret) OGRErr */
30375 9 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
30376 9 : resultobj = PyInt_FromLong( result );
30377 : }
30378 : }
30379 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30380 : return resultobj;
30381 : fail:
30382 : return NULL;
30383 : }
30384 :
30385 :
30386 : SWIGINTERN PyObject *_wrap_Geometry_Transform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
30387 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30388 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30389 : OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
30390 : void *argp1 = 0 ;
30391 : int res1 = 0 ;
30392 : void *argp2 = 0 ;
30393 : int res2 = 0 ;
30394 : OGRErr result;
30395 :
30396 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
30397 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30398 : if (!SWIG_IsOK(res1)) {
30399 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30400 : }
30401 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30402 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
30403 : if (!SWIG_IsOK(res2)) {
30404 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OSRCoordinateTransformationShadow *""'");
30405 : }
30406 : arg2 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp2);
30407 : {
30408 : if (!arg2) {
30409 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
30410 : }
30411 : }
30412 : {
30413 : const int bLocalUseExceptions = GetUseExceptions();
30414 : if ( bLocalUseExceptions ) {
30415 : pushErrorHandler();
30416 : }
30417 : {
30418 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30419 : result = (OGRErr)OGRGeometryShadow_Transform__SWIG_0(arg1,arg2);
30420 : SWIG_PYTHON_THREAD_END_ALLOW;
30421 : }
30422 : if ( bLocalUseExceptions ) {
30423 : popErrorHandler();
30424 : }
30425 : #ifndef SED_HACKS
30426 : if ( bLocalUseExceptions ) {
30427 : CPLErr eclass = CPLGetLastErrorType();
30428 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30429 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30430 : }
30431 : }
30432 : #endif
30433 : }
30434 : {
30435 : /* %typemap(out) OGRErr */
30436 : if ( result != 0 && GetUseExceptions()) {
30437 : const char* pszMessage = CPLGetLastErrorMsg();
30438 : if( pszMessage[0] != '\0' )
30439 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
30440 : else
30441 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
30442 : SWIG_fail;
30443 : }
30444 : }
30445 : {
30446 : /* %typemap(ret) OGRErr */
30447 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
30448 : resultobj = PyInt_FromLong( result );
30449 : }
30450 : }
30451 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30452 : return resultobj;
30453 : fail:
30454 : return NULL;
30455 : }
30456 :
30457 :
30458 62 : SWIGINTERN PyObject *_wrap_Geometry_GetSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30459 62 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30460 62 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30461 62 : void *argp1 = 0 ;
30462 62 : int res1 = 0 ;
30463 62 : PyObject *swig_obj[1] ;
30464 62 : OSRSpatialReferenceShadow *result = 0 ;
30465 :
30466 62 : if (!args) SWIG_fail;
30467 62 : swig_obj[0] = args;
30468 62 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30469 62 : if (!SWIG_IsOK(res1)) {
30470 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30471 : }
30472 62 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30473 62 : {
30474 62 : const int bLocalUseExceptions = GetUseExceptions();
30475 62 : if ( bLocalUseExceptions ) {
30476 38 : pushErrorHandler();
30477 : }
30478 62 : {
30479 62 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30480 62 : result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
30481 62 : SWIG_PYTHON_THREAD_END_ALLOW;
30482 : }
30483 62 : if ( bLocalUseExceptions ) {
30484 38 : popErrorHandler();
30485 : }
30486 : #ifndef SED_HACKS
30487 : if ( bLocalUseExceptions ) {
30488 : CPLErr eclass = CPLGetLastErrorType();
30489 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30490 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30491 : }
30492 : }
30493 : #endif
30494 : }
30495 62 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
30496 62 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30497 : return resultobj;
30498 : fail:
30499 : return NULL;
30500 : }
30501 :
30502 :
30503 74 : SWIGINTERN PyObject *_wrap_Geometry_AssignSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30504 74 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30505 74 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30506 74 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
30507 74 : void *argp1 = 0 ;
30508 74 : int res1 = 0 ;
30509 74 : void *argp2 = 0 ;
30510 74 : int res2 = 0 ;
30511 74 : PyObject *swig_obj[2] ;
30512 :
30513 74 : if (!SWIG_Python_UnpackTuple(args, "Geometry_AssignSpatialReference", 2, 2, swig_obj)) SWIG_fail;
30514 74 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30515 74 : if (!SWIG_IsOK(res1)) {
30516 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AssignSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30517 : }
30518 74 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30519 74 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
30520 74 : if (!SWIG_IsOK(res2)) {
30521 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AssignSpatialReference" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
30522 : }
30523 74 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
30524 74 : {
30525 74 : const int bLocalUseExceptions = GetUseExceptions();
30526 74 : if ( bLocalUseExceptions ) {
30527 63 : pushErrorHandler();
30528 : }
30529 74 : {
30530 74 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30531 74 : OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
30532 74 : SWIG_PYTHON_THREAD_END_ALLOW;
30533 : }
30534 74 : if ( bLocalUseExceptions ) {
30535 63 : popErrorHandler();
30536 : }
30537 : #ifndef SED_HACKS
30538 : if ( bLocalUseExceptions ) {
30539 : CPLErr eclass = CPLGetLastErrorType();
30540 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30541 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30542 : }
30543 : }
30544 : #endif
30545 : }
30546 74 : resultobj = SWIG_Py_Void();
30547 74 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30548 : return resultobj;
30549 : fail:
30550 : return NULL;
30551 : }
30552 :
30553 :
30554 6 : SWIGINTERN PyObject *_wrap_Geometry_CloseRings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30555 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30556 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30557 6 : void *argp1 = 0 ;
30558 6 : int res1 = 0 ;
30559 6 : PyObject *swig_obj[1] ;
30560 :
30561 6 : if (!args) SWIG_fail;
30562 6 : swig_obj[0] = args;
30563 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30564 6 : if (!SWIG_IsOK(res1)) {
30565 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CloseRings" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30566 : }
30567 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30568 6 : {
30569 6 : const int bLocalUseExceptions = GetUseExceptions();
30570 6 : if ( bLocalUseExceptions ) {
30571 0 : pushErrorHandler();
30572 : }
30573 6 : {
30574 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30575 6 : OGRGeometryShadow_CloseRings(arg1);
30576 6 : SWIG_PYTHON_THREAD_END_ALLOW;
30577 : }
30578 6 : if ( bLocalUseExceptions ) {
30579 0 : popErrorHandler();
30580 : }
30581 : #ifndef SED_HACKS
30582 : if ( bLocalUseExceptions ) {
30583 : CPLErr eclass = CPLGetLastErrorType();
30584 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30585 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30586 : }
30587 : }
30588 : #endif
30589 : }
30590 6 : resultobj = SWIG_Py_Void();
30591 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30592 : return resultobj;
30593 : fail:
30594 : return NULL;
30595 : }
30596 :
30597 :
30598 31 : SWIGINTERN PyObject *_wrap_Geometry_FlattenTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30599 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30600 31 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30601 31 : void *argp1 = 0 ;
30602 31 : int res1 = 0 ;
30603 31 : PyObject *swig_obj[1] ;
30604 :
30605 31 : if (!args) SWIG_fail;
30606 31 : swig_obj[0] = args;
30607 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30608 31 : if (!SWIG_IsOK(res1)) {
30609 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FlattenTo2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30610 : }
30611 31 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30612 31 : {
30613 31 : const int bLocalUseExceptions = GetUseExceptions();
30614 31 : if ( bLocalUseExceptions ) {
30615 0 : pushErrorHandler();
30616 : }
30617 31 : {
30618 31 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30619 31 : OGRGeometryShadow_FlattenTo2D(arg1);
30620 31 : SWIG_PYTHON_THREAD_END_ALLOW;
30621 : }
30622 31 : if ( bLocalUseExceptions ) {
30623 0 : popErrorHandler();
30624 : }
30625 : #ifndef SED_HACKS
30626 : if ( bLocalUseExceptions ) {
30627 : CPLErr eclass = CPLGetLastErrorType();
30628 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30629 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30630 : }
30631 : }
30632 : #endif
30633 : }
30634 31 : resultobj = SWIG_Py_Void();
30635 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30636 : return resultobj;
30637 : fail:
30638 : return NULL;
30639 : }
30640 :
30641 :
30642 21 : SWIGINTERN PyObject *_wrap_Geometry_Segmentize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30643 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30644 21 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30645 21 : double arg2 ;
30646 21 : void *argp1 = 0 ;
30647 21 : int res1 = 0 ;
30648 21 : double val2 ;
30649 21 : int ecode2 = 0 ;
30650 21 : PyObject *swig_obj[2] ;
30651 :
30652 21 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Segmentize", 2, 2, swig_obj)) SWIG_fail;
30653 21 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30654 21 : if (!SWIG_IsOK(res1)) {
30655 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Segmentize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30656 : }
30657 21 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30658 21 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
30659 21 : if (!SWIG_IsOK(ecode2)) {
30660 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Segmentize" "', argument " "2"" of type '" "double""'");
30661 : }
30662 21 : arg2 = static_cast< double >(val2);
30663 21 : {
30664 21 : const int bLocalUseExceptions = GetUseExceptions();
30665 21 : if ( bLocalUseExceptions ) {
30666 0 : pushErrorHandler();
30667 : }
30668 21 : {
30669 21 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30670 21 : OGRGeometryShadow_Segmentize(arg1,arg2);
30671 21 : SWIG_PYTHON_THREAD_END_ALLOW;
30672 : }
30673 21 : if ( bLocalUseExceptions ) {
30674 0 : popErrorHandler();
30675 : }
30676 : #ifndef SED_HACKS
30677 : if ( bLocalUseExceptions ) {
30678 : CPLErr eclass = CPLGetLastErrorType();
30679 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30680 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30681 : }
30682 : }
30683 : #endif
30684 : }
30685 21 : resultobj = SWIG_Py_Void();
30686 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30687 : return resultobj;
30688 : fail:
30689 : return NULL;
30690 : }
30691 :
30692 :
30693 13140 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30694 13140 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30695 13140 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30696 13140 : double *arg2 ;
30697 13140 : void *argp1 = 0 ;
30698 13140 : int res1 = 0 ;
30699 13140 : double argout2[4] ;
30700 13140 : PyObject *swig_obj[1] ;
30701 :
30702 13140 : {
30703 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
30704 13140 : memset(argout2, 0, sizeof(argout2));
30705 13140 : arg2 = argout2;
30706 : }
30707 13140 : if (!args) SWIG_fail;
30708 13140 : swig_obj[0] = args;
30709 13140 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30710 13140 : if (!SWIG_IsOK(res1)) {
30711 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30712 : }
30713 13140 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30714 13140 : {
30715 13140 : const int bLocalUseExceptions = GetUseExceptions();
30716 13140 : if ( bLocalUseExceptions ) {
30717 13085 : pushErrorHandler();
30718 : }
30719 13140 : {
30720 13140 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30721 13140 : OGRGeometryShadow_GetEnvelope(arg1,arg2);
30722 13140 : SWIG_PYTHON_THREAD_END_ALLOW;
30723 : }
30724 13140 : if ( bLocalUseExceptions ) {
30725 13085 : popErrorHandler();
30726 : }
30727 : #ifndef SED_HACKS
30728 : if ( bLocalUseExceptions ) {
30729 : CPLErr eclass = CPLGetLastErrorType();
30730 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30731 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30732 : }
30733 : }
30734 : #endif
30735 : }
30736 13140 : resultobj = SWIG_Py_Void();
30737 13140 : {
30738 : /* %typemap(argout) (double argout[ANY]) */
30739 13140 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
30740 : #if SWIG_VERSION >= 0x040300
30741 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
30742 : #else
30743 13140 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
30744 : #endif
30745 : }
30746 13140 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30747 : return resultobj;
30748 : fail:
30749 : return NULL;
30750 : }
30751 :
30752 :
30753 10 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30754 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30755 10 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30756 10 : double *arg2 ;
30757 10 : void *argp1 = 0 ;
30758 10 : int res1 = 0 ;
30759 10 : double argout2[6] ;
30760 10 : PyObject *swig_obj[1] ;
30761 :
30762 10 : {
30763 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
30764 10 : memset(argout2, 0, sizeof(argout2));
30765 10 : arg2 = argout2;
30766 : }
30767 10 : if (!args) SWIG_fail;
30768 10 : swig_obj[0] = args;
30769 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30770 10 : if (!SWIG_IsOK(res1)) {
30771 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30772 : }
30773 10 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30774 10 : {
30775 10 : const int bLocalUseExceptions = GetUseExceptions();
30776 10 : if ( bLocalUseExceptions ) {
30777 0 : pushErrorHandler();
30778 : }
30779 10 : {
30780 10 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30781 10 : OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
30782 10 : SWIG_PYTHON_THREAD_END_ALLOW;
30783 : }
30784 10 : if ( bLocalUseExceptions ) {
30785 0 : popErrorHandler();
30786 : }
30787 : #ifndef SED_HACKS
30788 : if ( bLocalUseExceptions ) {
30789 : CPLErr eclass = CPLGetLastErrorType();
30790 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30791 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30792 : }
30793 : }
30794 : #endif
30795 : }
30796 10 : resultobj = SWIG_Py_Void();
30797 10 : {
30798 : /* %typemap(argout) (double argout[ANY]) */
30799 10 : PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
30800 : #if SWIG_VERSION >= 0x040300
30801 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
30802 : #else
30803 10 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
30804 : #endif
30805 : }
30806 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30807 : return resultobj;
30808 : fail:
30809 : return NULL;
30810 : }
30811 :
30812 :
30813 5 : SWIGINTERN PyObject *_wrap_Geometry_Centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30814 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30815 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30816 5 : void *argp1 = 0 ;
30817 5 : int res1 = 0 ;
30818 5 : PyObject *swig_obj[1] ;
30819 5 : OGRGeometryShadow *result = 0 ;
30820 :
30821 5 : if (!args) SWIG_fail;
30822 5 : swig_obj[0] = args;
30823 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30824 5 : if (!SWIG_IsOK(res1)) {
30825 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Centroid" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30826 : }
30827 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30828 5 : {
30829 5 : const int bLocalUseExceptions = GetUseExceptions();
30830 5 : if ( bLocalUseExceptions ) {
30831 5 : pushErrorHandler();
30832 : }
30833 5 : {
30834 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30835 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
30836 5 : SWIG_PYTHON_THREAD_END_ALLOW;
30837 : }
30838 5 : if ( bLocalUseExceptions ) {
30839 5 : popErrorHandler();
30840 : }
30841 : #ifndef SED_HACKS
30842 : if ( bLocalUseExceptions ) {
30843 : CPLErr eclass = CPLGetLastErrorType();
30844 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30845 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30846 : }
30847 : }
30848 : #endif
30849 : }
30850 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
30851 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30852 : return resultobj;
30853 : fail:
30854 : return NULL;
30855 : }
30856 :
30857 :
30858 4 : SWIGINTERN PyObject *_wrap_Geometry_PointOnSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30859 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30860 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30861 4 : void *argp1 = 0 ;
30862 4 : int res1 = 0 ;
30863 4 : PyObject *swig_obj[1] ;
30864 4 : OGRGeometryShadow *result = 0 ;
30865 :
30866 4 : if (!args) SWIG_fail;
30867 4 : swig_obj[0] = args;
30868 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30869 4 : if (!SWIG_IsOK(res1)) {
30870 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_PointOnSurface" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30871 : }
30872 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30873 4 : {
30874 4 : const int bLocalUseExceptions = GetUseExceptions();
30875 4 : if ( bLocalUseExceptions ) {
30876 1 : pushErrorHandler();
30877 : }
30878 4 : {
30879 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30880 4 : result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
30881 4 : SWIG_PYTHON_THREAD_END_ALLOW;
30882 : }
30883 4 : if ( bLocalUseExceptions ) {
30884 1 : popErrorHandler();
30885 : }
30886 : #ifndef SED_HACKS
30887 : if ( bLocalUseExceptions ) {
30888 : CPLErr eclass = CPLGetLastErrorType();
30889 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30890 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30891 : }
30892 : }
30893 : #endif
30894 : }
30895 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
30896 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30897 : return resultobj;
30898 : fail:
30899 : return NULL;
30900 : }
30901 :
30902 :
30903 2 : SWIGINTERN PyObject *_wrap_Geometry_WkbSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30904 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30905 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30906 2 : void *argp1 = 0 ;
30907 2 : int res1 = 0 ;
30908 2 : PyObject *swig_obj[1] ;
30909 2 : size_t result;
30910 :
30911 2 : if (!args) SWIG_fail;
30912 2 : swig_obj[0] = args;
30913 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30914 2 : if (!SWIG_IsOK(res1)) {
30915 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_WkbSize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30916 : }
30917 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30918 2 : {
30919 2 : const int bLocalUseExceptions = GetUseExceptions();
30920 2 : if ( bLocalUseExceptions ) {
30921 0 : pushErrorHandler();
30922 : }
30923 2 : {
30924 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30925 2 : result = OGRGeometryShadow_WkbSize(arg1);
30926 2 : SWIG_PYTHON_THREAD_END_ALLOW;
30927 : }
30928 2 : if ( bLocalUseExceptions ) {
30929 0 : popErrorHandler();
30930 : }
30931 : #ifndef SED_HACKS
30932 : if ( bLocalUseExceptions ) {
30933 : CPLErr eclass = CPLGetLastErrorType();
30934 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30935 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30936 : }
30937 : }
30938 : #endif
30939 : }
30940 2 : resultobj = SWIG_From_size_t(static_cast< size_t >(result));
30941 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30942 : return resultobj;
30943 : fail:
30944 : return NULL;
30945 : }
30946 :
30947 :
30948 77 : SWIGINTERN PyObject *_wrap_Geometry_GetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30949 77 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30950 77 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30951 77 : void *argp1 = 0 ;
30952 77 : int res1 = 0 ;
30953 77 : PyObject *swig_obj[1] ;
30954 77 : int result;
30955 :
30956 77 : if (!args) SWIG_fail;
30957 77 : swig_obj[0] = args;
30958 77 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30959 77 : if (!SWIG_IsOK(res1)) {
30960 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30961 : }
30962 77 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30963 77 : {
30964 77 : const int bLocalUseExceptions = GetUseExceptions();
30965 77 : if ( bLocalUseExceptions ) {
30966 15 : pushErrorHandler();
30967 : }
30968 77 : {
30969 77 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30970 77 : result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
30971 77 : SWIG_PYTHON_THREAD_END_ALLOW;
30972 : }
30973 77 : if ( bLocalUseExceptions ) {
30974 15 : popErrorHandler();
30975 : }
30976 : #ifndef SED_HACKS
30977 : if ( bLocalUseExceptions ) {
30978 : CPLErr eclass = CPLGetLastErrorType();
30979 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30980 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30981 : }
30982 : }
30983 : #endif
30984 : }
30985 77 : resultobj = SWIG_From_int(static_cast< int >(result));
30986 77 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
30987 : return resultobj;
30988 : fail:
30989 : return NULL;
30990 : }
30991 :
30992 :
30993 4 : SWIGINTERN PyObject *_wrap_Geometry_CoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30994 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30995 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30996 4 : void *argp1 = 0 ;
30997 4 : int res1 = 0 ;
30998 4 : PyObject *swig_obj[1] ;
30999 4 : int result;
31000 :
31001 4 : if (!args) SWIG_fail;
31002 4 : swig_obj[0] = args;
31003 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31004 4 : if (!SWIG_IsOK(res1)) {
31005 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31006 : }
31007 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31008 4 : {
31009 4 : const int bLocalUseExceptions = GetUseExceptions();
31010 4 : if ( bLocalUseExceptions ) {
31011 0 : pushErrorHandler();
31012 : }
31013 4 : {
31014 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31015 4 : result = (int)OGRGeometryShadow_CoordinateDimension(arg1);
31016 4 : SWIG_PYTHON_THREAD_END_ALLOW;
31017 : }
31018 4 : if ( bLocalUseExceptions ) {
31019 0 : popErrorHandler();
31020 : }
31021 : #ifndef SED_HACKS
31022 : if ( bLocalUseExceptions ) {
31023 : CPLErr eclass = CPLGetLastErrorType();
31024 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31025 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31026 : }
31027 : }
31028 : #endif
31029 : }
31030 4 : resultobj = SWIG_From_int(static_cast< int >(result));
31031 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31032 : return resultobj;
31033 : fail:
31034 : return NULL;
31035 : }
31036 :
31037 :
31038 34985 : SWIGINTERN PyObject *_wrap_Geometry_Is3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31039 34985 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31040 34985 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31041 34985 : void *argp1 = 0 ;
31042 34985 : int res1 = 0 ;
31043 34985 : PyObject *swig_obj[1] ;
31044 34985 : int result;
31045 :
31046 34985 : if (!args) SWIG_fail;
31047 34985 : swig_obj[0] = args;
31048 34985 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31049 34985 : if (!SWIG_IsOK(res1)) {
31050 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Is3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31051 : }
31052 34985 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31053 34985 : {
31054 34985 : const int bLocalUseExceptions = GetUseExceptions();
31055 34985 : if ( bLocalUseExceptions ) {
31056 0 : pushErrorHandler();
31057 : }
31058 34985 : {
31059 34985 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31060 34985 : result = (int)OGRGeometryShadow_Is3D(arg1);
31061 34985 : SWIG_PYTHON_THREAD_END_ALLOW;
31062 : }
31063 34985 : if ( bLocalUseExceptions ) {
31064 0 : popErrorHandler();
31065 : }
31066 : #ifndef SED_HACKS
31067 : if ( bLocalUseExceptions ) {
31068 : CPLErr eclass = CPLGetLastErrorType();
31069 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31070 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31071 : }
31072 : }
31073 : #endif
31074 : }
31075 34985 : resultobj = SWIG_From_int(static_cast< int >(result));
31076 34985 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31077 : return resultobj;
31078 : fail:
31079 : return NULL;
31080 : }
31081 :
31082 :
31083 38044 : SWIGINTERN PyObject *_wrap_Geometry_IsMeasured(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31084 38044 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31085 38044 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31086 38044 : void *argp1 = 0 ;
31087 38044 : int res1 = 0 ;
31088 38044 : PyObject *swig_obj[1] ;
31089 38044 : int result;
31090 :
31091 38044 : if (!args) SWIG_fail;
31092 38044 : swig_obj[0] = args;
31093 38044 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31094 38044 : if (!SWIG_IsOK(res1)) {
31095 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsMeasured" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31096 : }
31097 38044 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31098 38044 : {
31099 38044 : const int bLocalUseExceptions = GetUseExceptions();
31100 38044 : if ( bLocalUseExceptions ) {
31101 0 : pushErrorHandler();
31102 : }
31103 38044 : {
31104 38044 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31105 38044 : result = (int)OGRGeometryShadow_IsMeasured(arg1);
31106 38044 : SWIG_PYTHON_THREAD_END_ALLOW;
31107 : }
31108 38044 : if ( bLocalUseExceptions ) {
31109 0 : popErrorHandler();
31110 : }
31111 : #ifndef SED_HACKS
31112 : if ( bLocalUseExceptions ) {
31113 : CPLErr eclass = CPLGetLastErrorType();
31114 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31115 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31116 : }
31117 : }
31118 : #endif
31119 : }
31120 38044 : resultobj = SWIG_From_int(static_cast< int >(result));
31121 38044 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31122 : return resultobj;
31123 : fail:
31124 : return NULL;
31125 : }
31126 :
31127 :
31128 56 : SWIGINTERN PyObject *_wrap_Geometry_SetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31129 56 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31130 56 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31131 56 : int arg2 ;
31132 56 : void *argp1 = 0 ;
31133 56 : int res1 = 0 ;
31134 56 : int val2 ;
31135 56 : int ecode2 = 0 ;
31136 56 : PyObject *swig_obj[2] ;
31137 :
31138 56 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SetCoordinateDimension", 2, 2, swig_obj)) SWIG_fail;
31139 56 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31140 56 : if (!SWIG_IsOK(res1)) {
31141 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31142 : }
31143 56 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31144 56 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
31145 56 : if (!SWIG_IsOK(ecode2)) {
31146 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetCoordinateDimension" "', argument " "2"" of type '" "int""'");
31147 : }
31148 56 : arg2 = static_cast< int >(val2);
31149 56 : {
31150 56 : const int bLocalUseExceptions = GetUseExceptions();
31151 56 : if ( bLocalUseExceptions ) {
31152 0 : pushErrorHandler();
31153 : }
31154 56 : {
31155 56 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31156 56 : OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
31157 56 : SWIG_PYTHON_THREAD_END_ALLOW;
31158 : }
31159 56 : if ( bLocalUseExceptions ) {
31160 0 : popErrorHandler();
31161 : }
31162 : #ifndef SED_HACKS
31163 : if ( bLocalUseExceptions ) {
31164 : CPLErr eclass = CPLGetLastErrorType();
31165 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31166 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31167 : }
31168 : }
31169 : #endif
31170 : }
31171 56 : resultobj = SWIG_Py_Void();
31172 56 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31173 : return resultobj;
31174 : fail:
31175 : return NULL;
31176 : }
31177 :
31178 :
31179 154 : SWIGINTERN PyObject *_wrap_Geometry_Set3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31180 154 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31181 154 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31182 154 : int arg2 ;
31183 154 : void *argp1 = 0 ;
31184 154 : int res1 = 0 ;
31185 154 : int val2 ;
31186 154 : int ecode2 = 0 ;
31187 154 : PyObject *swig_obj[2] ;
31188 :
31189 154 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Set3D", 2, 2, swig_obj)) SWIG_fail;
31190 154 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31191 154 : if (!SWIG_IsOK(res1)) {
31192 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Set3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31193 : }
31194 154 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31195 154 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
31196 154 : if (!SWIG_IsOK(ecode2)) {
31197 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Set3D" "', argument " "2"" of type '" "int""'");
31198 : }
31199 154 : arg2 = static_cast< int >(val2);
31200 154 : {
31201 154 : const int bLocalUseExceptions = GetUseExceptions();
31202 154 : if ( bLocalUseExceptions ) {
31203 42 : pushErrorHandler();
31204 : }
31205 154 : {
31206 154 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31207 154 : OGRGeometryShadow_Set3D(arg1,arg2);
31208 154 : SWIG_PYTHON_THREAD_END_ALLOW;
31209 : }
31210 154 : if ( bLocalUseExceptions ) {
31211 42 : popErrorHandler();
31212 : }
31213 : #ifndef SED_HACKS
31214 : if ( bLocalUseExceptions ) {
31215 : CPLErr eclass = CPLGetLastErrorType();
31216 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31217 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31218 : }
31219 : }
31220 : #endif
31221 : }
31222 154 : resultobj = SWIG_Py_Void();
31223 154 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31224 : return resultobj;
31225 : fail:
31226 : return NULL;
31227 : }
31228 :
31229 :
31230 154 : SWIGINTERN PyObject *_wrap_Geometry_SetMeasured(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31231 154 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31232 154 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31233 154 : int arg2 ;
31234 154 : void *argp1 = 0 ;
31235 154 : int res1 = 0 ;
31236 154 : int val2 ;
31237 154 : int ecode2 = 0 ;
31238 154 : PyObject *swig_obj[2] ;
31239 :
31240 154 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SetMeasured", 2, 2, swig_obj)) SWIG_fail;
31241 154 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31242 154 : if (!SWIG_IsOK(res1)) {
31243 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetMeasured" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31244 : }
31245 154 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31246 154 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
31247 154 : if (!SWIG_IsOK(ecode2)) {
31248 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetMeasured" "', argument " "2"" of type '" "int""'");
31249 : }
31250 154 : arg2 = static_cast< int >(val2);
31251 154 : {
31252 154 : const int bLocalUseExceptions = GetUseExceptions();
31253 154 : if ( bLocalUseExceptions ) {
31254 42 : pushErrorHandler();
31255 : }
31256 154 : {
31257 154 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31258 154 : OGRGeometryShadow_SetMeasured(arg1,arg2);
31259 154 : SWIG_PYTHON_THREAD_END_ALLOW;
31260 : }
31261 154 : if ( bLocalUseExceptions ) {
31262 42 : popErrorHandler();
31263 : }
31264 : #ifndef SED_HACKS
31265 : if ( bLocalUseExceptions ) {
31266 : CPLErr eclass = CPLGetLastErrorType();
31267 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31268 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31269 : }
31270 : }
31271 : #endif
31272 : }
31273 154 : resultobj = SWIG_Py_Void();
31274 154 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31275 : return resultobj;
31276 : fail:
31277 : return NULL;
31278 : }
31279 :
31280 :
31281 21 : SWIGINTERN PyObject *_wrap_Geometry_GetDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31282 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31283 21 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31284 21 : void *argp1 = 0 ;
31285 21 : int res1 = 0 ;
31286 21 : PyObject *swig_obj[1] ;
31287 21 : int result;
31288 :
31289 21 : if (!args) SWIG_fail;
31290 21 : swig_obj[0] = args;
31291 21 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31292 21 : if (!SWIG_IsOK(res1)) {
31293 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31294 : }
31295 21 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31296 21 : {
31297 21 : const int bLocalUseExceptions = GetUseExceptions();
31298 21 : if ( bLocalUseExceptions ) {
31299 0 : pushErrorHandler();
31300 : }
31301 21 : {
31302 21 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31303 21 : result = (int)OGRGeometryShadow_GetDimension(arg1);
31304 21 : SWIG_PYTHON_THREAD_END_ALLOW;
31305 : }
31306 21 : if ( bLocalUseExceptions ) {
31307 0 : popErrorHandler();
31308 : }
31309 : #ifndef SED_HACKS
31310 : if ( bLocalUseExceptions ) {
31311 : CPLErr eclass = CPLGetLastErrorType();
31312 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31313 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31314 : }
31315 : }
31316 : #endif
31317 : }
31318 21 : resultobj = SWIG_From_int(static_cast< int >(result));
31319 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31320 : return resultobj;
31321 : fail:
31322 : return NULL;
31323 : }
31324 :
31325 :
31326 29 : SWIGINTERN PyObject *_wrap_Geometry_HasCurveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31327 29 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31328 29 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31329 29 : int arg2 = (int) FALSE ;
31330 29 : void *argp1 = 0 ;
31331 29 : int res1 = 0 ;
31332 29 : int val2 ;
31333 29 : int ecode2 = 0 ;
31334 29 : PyObject *swig_obj[2] ;
31335 29 : int result;
31336 :
31337 29 : if (!SWIG_Python_UnpackTuple(args, "Geometry_HasCurveGeometry", 1, 2, swig_obj)) SWIG_fail;
31338 29 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31339 29 : if (!SWIG_IsOK(res1)) {
31340 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_HasCurveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31341 : }
31342 29 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31343 29 : if (swig_obj[1]) {
31344 12 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
31345 12 : if (!SWIG_IsOK(ecode2)) {
31346 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_HasCurveGeometry" "', argument " "2"" of type '" "int""'");
31347 : }
31348 : arg2 = static_cast< int >(val2);
31349 : }
31350 29 : {
31351 29 : const int bLocalUseExceptions = GetUseExceptions();
31352 29 : if ( bLocalUseExceptions ) {
31353 0 : pushErrorHandler();
31354 : }
31355 29 : {
31356 29 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31357 29 : result = (int)OGRGeometryShadow_HasCurveGeometry(arg1,arg2);
31358 29 : SWIG_PYTHON_THREAD_END_ALLOW;
31359 : }
31360 29 : if ( bLocalUseExceptions ) {
31361 0 : popErrorHandler();
31362 : }
31363 : #ifndef SED_HACKS
31364 : if ( bLocalUseExceptions ) {
31365 : CPLErr eclass = CPLGetLastErrorType();
31366 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31367 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31368 : }
31369 : }
31370 : #endif
31371 : }
31372 29 : resultobj = SWIG_From_int(static_cast< int >(result));
31373 29 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31374 : return resultobj;
31375 : fail:
31376 : return NULL;
31377 : }
31378 :
31379 :
31380 3084 : SWIGINTERN PyObject *_wrap_Geometry_GetLinearGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
31381 3084 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31382 3084 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31383 3084 : double arg2 = (double) 0.0 ;
31384 3084 : char **arg3 = (char **) NULL ;
31385 3084 : void *argp1 = 0 ;
31386 3084 : int res1 = 0 ;
31387 3084 : double val2 ;
31388 3084 : int ecode2 = 0 ;
31389 3084 : PyObject * obj0 = 0 ;
31390 3084 : PyObject * obj1 = 0 ;
31391 3084 : PyObject * obj2 = 0 ;
31392 3084 : char * kwnames[] = {
31393 : (char *)"self", (char *)"dfMaxAngleStepSizeDegrees", (char *)"options", NULL
31394 : };
31395 3084 : OGRGeometryShadow *result = 0 ;
31396 :
31397 3084 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Geometry_GetLinearGeometry", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
31398 3084 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31399 3084 : if (!SWIG_IsOK(res1)) {
31400 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetLinearGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31401 : }
31402 3084 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31403 3084 : if (obj1) {
31404 17 : ecode2 = SWIG_AsVal_double(obj1, &val2);
31405 17 : if (!SWIG_IsOK(ecode2)) {
31406 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetLinearGeometry" "', argument " "2"" of type '" "double""'");
31407 : }
31408 17 : arg2 = static_cast< double >(val2);
31409 : }
31410 3084 : if (obj2) {
31411 4 : {
31412 : /* %typemap(in) char **dict */
31413 4 : arg3 = NULL;
31414 4 : if ( PySequence_Check( obj2 ) ) {
31415 4 : int bErr = FALSE;
31416 4 : arg3 = CSLFromPySequence(obj2, &bErr);
31417 4 : if ( bErr )
31418 : {
31419 0 : SWIG_fail;
31420 : }
31421 : }
31422 0 : else if ( PyMapping_Check( obj2 ) ) {
31423 0 : int bErr = FALSE;
31424 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
31425 0 : if ( bErr )
31426 : {
31427 0 : SWIG_fail;
31428 : }
31429 : }
31430 : else {
31431 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
31432 0 : SWIG_fail;
31433 : }
31434 : }
31435 : }
31436 3084 : {
31437 3084 : const int bLocalUseExceptions = GetUseExceptions();
31438 3084 : if ( bLocalUseExceptions ) {
31439 0 : pushErrorHandler();
31440 : }
31441 3084 : {
31442 3084 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31443 3084 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetLinearGeometry(arg1,arg2,arg3);
31444 3084 : SWIG_PYTHON_THREAD_END_ALLOW;
31445 : }
31446 3084 : if ( bLocalUseExceptions ) {
31447 0 : popErrorHandler();
31448 : }
31449 : #ifndef SED_HACKS
31450 : if ( bLocalUseExceptions ) {
31451 : CPLErr eclass = CPLGetLastErrorType();
31452 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31453 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31454 : }
31455 : }
31456 : #endif
31457 : }
31458 3084 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
31459 3084 : {
31460 : /* %typemap(freearg) char **dict */
31461 3084 : CSLDestroy( arg3 );
31462 : }
31463 3084 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31464 : return resultobj;
31465 0 : fail:
31466 0 : {
31467 : /* %typemap(freearg) char **dict */
31468 0 : CSLDestroy( arg3 );
31469 : }
31470 : return NULL;
31471 : }
31472 :
31473 :
31474 3066 : SWIGINTERN PyObject *_wrap_Geometry_GetCurveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
31475 3066 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31476 3066 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31477 3066 : char **arg2 = (char **) NULL ;
31478 3066 : void *argp1 = 0 ;
31479 3066 : int res1 = 0 ;
31480 3066 : PyObject * obj0 = 0 ;
31481 3066 : PyObject * obj1 = 0 ;
31482 3066 : char * kwnames[] = {
31483 : (char *)"self", (char *)"options", NULL
31484 : };
31485 3066 : OGRGeometryShadow *result = 0 ;
31486 :
31487 3066 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetCurveGeometry", kwnames, &obj0, &obj1)) SWIG_fail;
31488 3066 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31489 3066 : if (!SWIG_IsOK(res1)) {
31490 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCurveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31491 : }
31492 3066 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31493 3066 : if (obj1) {
31494 0 : {
31495 : /* %typemap(in) char **dict */
31496 0 : arg2 = NULL;
31497 0 : if ( PySequence_Check( obj1 ) ) {
31498 0 : int bErr = FALSE;
31499 0 : arg2 = CSLFromPySequence(obj1, &bErr);
31500 0 : if ( bErr )
31501 : {
31502 0 : SWIG_fail;
31503 : }
31504 : }
31505 0 : else if ( PyMapping_Check( obj1 ) ) {
31506 0 : int bErr = FALSE;
31507 0 : arg2 = CSLFromPyMapping(obj1, &bErr);
31508 0 : if ( bErr )
31509 : {
31510 0 : SWIG_fail;
31511 : }
31512 : }
31513 : else {
31514 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
31515 0 : SWIG_fail;
31516 : }
31517 : }
31518 : }
31519 3066 : {
31520 3066 : const int bLocalUseExceptions = GetUseExceptions();
31521 3066 : if ( bLocalUseExceptions ) {
31522 0 : pushErrorHandler();
31523 : }
31524 3066 : {
31525 3066 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31526 3066 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetCurveGeometry(arg1,arg2);
31527 3066 : SWIG_PYTHON_THREAD_END_ALLOW;
31528 : }
31529 3066 : if ( bLocalUseExceptions ) {
31530 0 : popErrorHandler();
31531 : }
31532 : #ifndef SED_HACKS
31533 : if ( bLocalUseExceptions ) {
31534 : CPLErr eclass = CPLGetLastErrorType();
31535 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31536 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31537 : }
31538 : }
31539 : #endif
31540 : }
31541 3066 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
31542 3066 : {
31543 : /* %typemap(freearg) char **dict */
31544 3066 : CSLDestroy( arg2 );
31545 : }
31546 3066 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31547 : return resultobj;
31548 0 : fail:
31549 0 : {
31550 : /* %typemap(freearg) char **dict */
31551 0 : CSLDestroy( arg2 );
31552 : }
31553 : return NULL;
31554 : }
31555 :
31556 :
31557 22 : SWIGINTERN PyObject *_wrap_Geometry_Value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31558 22 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31559 22 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31560 22 : double arg2 ;
31561 22 : void *argp1 = 0 ;
31562 22 : int res1 = 0 ;
31563 22 : double val2 ;
31564 22 : int ecode2 = 0 ;
31565 22 : PyObject *swig_obj[2] ;
31566 22 : OGRGeometryShadow *result = 0 ;
31567 :
31568 22 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Value", 2, 2, swig_obj)) SWIG_fail;
31569 22 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31570 22 : if (!SWIG_IsOK(res1)) {
31571 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Value" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31572 : }
31573 22 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31574 22 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
31575 22 : if (!SWIG_IsOK(ecode2)) {
31576 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Value" "', argument " "2"" of type '" "double""'");
31577 : }
31578 22 : arg2 = static_cast< double >(val2);
31579 22 : {
31580 22 : const int bLocalUseExceptions = GetUseExceptions();
31581 22 : if ( bLocalUseExceptions ) {
31582 0 : pushErrorHandler();
31583 : }
31584 22 : {
31585 22 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31586 22 : result = (OGRGeometryShadow *)OGRGeometryShadow_Value(arg1,arg2);
31587 22 : SWIG_PYTHON_THREAD_END_ALLOW;
31588 : }
31589 22 : if ( bLocalUseExceptions ) {
31590 0 : popErrorHandler();
31591 : }
31592 : #ifndef SED_HACKS
31593 : if ( bLocalUseExceptions ) {
31594 : CPLErr eclass = CPLGetLastErrorType();
31595 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31596 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31597 : }
31598 : }
31599 : #endif
31600 : }
31601 22 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
31602 22 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31603 : return resultobj;
31604 : fail:
31605 : return NULL;
31606 : }
31607 :
31608 :
31609 : SWIGINTERN PyObject *_wrap_Geometry_Transform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
31610 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31611 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31612 : OGRGeomTransformerShadow *arg2 = (OGRGeomTransformerShadow *) 0 ;
31613 : void *argp1 = 0 ;
31614 : int res1 = 0 ;
31615 : void *argp2 = 0 ;
31616 : int res2 = 0 ;
31617 : OGRGeometryShadow *result = 0 ;
31618 :
31619 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
31620 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31621 : if (!SWIG_IsOK(res1)) {
31622 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31623 : }
31624 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31625 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomTransformerShadow, 0 | 0 );
31626 : if (!SWIG_IsOK(res2)) {
31627 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OGRGeomTransformerShadow *""'");
31628 : }
31629 : arg2 = reinterpret_cast< OGRGeomTransformerShadow * >(argp2);
31630 : {
31631 : if (!arg2) {
31632 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
31633 : }
31634 : }
31635 : {
31636 : const int bLocalUseExceptions = GetUseExceptions();
31637 : if ( bLocalUseExceptions ) {
31638 : pushErrorHandler();
31639 : }
31640 : {
31641 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31642 : result = (OGRGeometryShadow *)OGRGeometryShadow_Transform__SWIG_1(arg1,arg2);
31643 : SWIG_PYTHON_THREAD_END_ALLOW;
31644 : }
31645 : if ( bLocalUseExceptions ) {
31646 : popErrorHandler();
31647 : }
31648 : #ifndef SED_HACKS
31649 : if ( bLocalUseExceptions ) {
31650 : CPLErr eclass = CPLGetLastErrorType();
31651 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31652 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31653 : }
31654 : }
31655 : #endif
31656 : }
31657 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
31658 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31659 : return resultobj;
31660 : fail:
31661 : return NULL;
31662 : }
31663 :
31664 :
31665 7 : SWIGINTERN PyObject *_wrap_Geometry_Transform(PyObject *self, PyObject *args) {
31666 7 : Py_ssize_t argc;
31667 7 : PyObject *argv[3] = {
31668 : 0
31669 : };
31670 :
31671 7 : if (!(argc = SWIG_Python_UnpackTuple(args, "Geometry_Transform", 0, 2, argv))) SWIG_fail;
31672 7 : --argc;
31673 7 : if (argc == 2) {
31674 7 : int _v;
31675 7 : void *vptr = 0;
31676 7 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
31677 11 : _v = SWIG_CheckState(res);
31678 7 : if (_v) {
31679 7 : void *vptr = 0;
31680 7 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
31681 7 : _v = SWIG_CheckState(res);
31682 4 : if (_v) {
31683 3 : return _wrap_Geometry_Transform__SWIG_0(self, argc, argv);
31684 : }
31685 : }
31686 : }
31687 4 : if (argc == 2) {
31688 4 : int _v;
31689 4 : void *vptr = 0;
31690 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
31691 4 : _v = SWIG_CheckState(res);
31692 4 : if (_v) {
31693 4 : void *vptr = 0;
31694 4 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OGRGeomTransformerShadow, 0);
31695 4 : _v = SWIG_CheckState(res);
31696 0 : if (_v) {
31697 4 : return _wrap_Geometry_Transform__SWIG_1(self, argc, argv);
31698 : }
31699 : }
31700 : }
31701 :
31702 0 : fail:
31703 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Geometry_Transform'.\n"
31704 : " Possible C/C++ prototypes are:\n"
31705 : " OGRGeometryShadow::Transform(OSRCoordinateTransformationShadow *)\n"
31706 : " OGRGeometryShadow::Transform(OGRGeomTransformerShadow *)\n");
31707 : return 0;
31708 : }
31709 :
31710 :
31711 1 : SWIGINTERN PyObject *_wrap_Geometry_CreatePreparedGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31712 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31713 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31714 1 : void *argp1 = 0 ;
31715 1 : int res1 = 0 ;
31716 1 : PyObject *swig_obj[1] ;
31717 1 : OGRPreparedGeometryShadow *result = 0 ;
31718 :
31719 1 : if (!args) SWIG_fail;
31720 1 : swig_obj[0] = args;
31721 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31722 1 : if (!SWIG_IsOK(res1)) {
31723 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CreatePreparedGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31724 : }
31725 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31726 1 : {
31727 1 : const int bLocalUseExceptions = GetUseExceptions();
31728 1 : if ( bLocalUseExceptions ) {
31729 1 : pushErrorHandler();
31730 : }
31731 1 : {
31732 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31733 1 : result = (OGRPreparedGeometryShadow *)OGRGeometryShadow_CreatePreparedGeometry(arg1);
31734 1 : SWIG_PYTHON_THREAD_END_ALLOW;
31735 : }
31736 1 : if ( bLocalUseExceptions ) {
31737 1 : popErrorHandler();
31738 : }
31739 : #ifndef SED_HACKS
31740 : if ( bLocalUseExceptions ) {
31741 : CPLErr eclass = CPLGetLastErrorType();
31742 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31743 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31744 : }
31745 : }
31746 : #endif
31747 : }
31748 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_POINTER_OWN | 0 );
31749 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31750 : return resultobj;
31751 : fail:
31752 : return NULL;
31753 : }
31754 :
31755 :
31756 277 : SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31757 277 : PyObject *obj;
31758 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
31759 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeometryShadow, SWIG_NewClientData(obj));
31760 277 : return SWIG_Py_Void();
31761 : }
31762 :
31763 160979 : SWIGINTERN PyObject *Geometry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31764 160979 : return SWIG_Python_InitShadowInstance(args);
31765 : }
31766 :
31767 1 : SWIGINTERN PyObject *_wrap_delete_PreparedGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31768 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31769 1 : OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
31770 1 : void *argp1 = 0 ;
31771 1 : int res1 = 0 ;
31772 1 : PyObject *swig_obj[1] ;
31773 :
31774 1 : if (!args) SWIG_fail;
31775 1 : swig_obj[0] = args;
31776 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_POINTER_DISOWN | 0 );
31777 1 : if (!SWIG_IsOK(res1)) {
31778 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PreparedGeometry" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'");
31779 : }
31780 1 : arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
31781 1 : {
31782 1 : const int bLocalUseExceptions = GetUseExceptions();
31783 1 : if ( bLocalUseExceptions ) {
31784 1 : pushErrorHandler();
31785 : }
31786 1 : {
31787 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31788 1 : delete_OGRPreparedGeometryShadow(arg1);
31789 1 : SWIG_PYTHON_THREAD_END_ALLOW;
31790 : }
31791 1 : if ( bLocalUseExceptions ) {
31792 1 : popErrorHandler();
31793 : }
31794 : #ifndef SED_HACKS
31795 : if ( bLocalUseExceptions ) {
31796 : CPLErr eclass = CPLGetLastErrorType();
31797 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31798 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31799 : }
31800 : }
31801 : #endif
31802 : }
31803 1 : resultobj = SWIG_Py_Void();
31804 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31805 : return resultobj;
31806 : fail:
31807 : return NULL;
31808 : }
31809 :
31810 :
31811 3 : SWIGINTERN PyObject *_wrap_PreparedGeometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31812 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31813 3 : OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
31814 3 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
31815 3 : void *argp1 = 0 ;
31816 3 : int res1 = 0 ;
31817 3 : void *argp2 = 0 ;
31818 3 : int res2 = 0 ;
31819 3 : PyObject *swig_obj[2] ;
31820 3 : bool result;
31821 :
31822 3 : if (!SWIG_Python_UnpackTuple(args, "PreparedGeometry_Intersects", 2, 2, swig_obj)) SWIG_fail;
31823 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, 0 | 0 );
31824 3 : if (!SWIG_IsOK(res1)) {
31825 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreparedGeometry_Intersects" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'");
31826 : }
31827 3 : arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
31828 3 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31829 3 : if (!SWIG_IsOK(res2)) {
31830 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreparedGeometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow const *""'");
31831 : }
31832 3 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
31833 3 : {
31834 3 : if (!arg2) {
31835 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
31836 : }
31837 : }
31838 3 : {
31839 3 : const int bLocalUseExceptions = GetUseExceptions();
31840 3 : if ( bLocalUseExceptions ) {
31841 3 : pushErrorHandler();
31842 : }
31843 3 : {
31844 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31845 3 : result = (bool)OGRPreparedGeometryShadow_Intersects(arg1,(OGRGeometryShadow const *)arg2);
31846 3 : SWIG_PYTHON_THREAD_END_ALLOW;
31847 : }
31848 3 : if ( bLocalUseExceptions ) {
31849 3 : popErrorHandler();
31850 : }
31851 : #ifndef SED_HACKS
31852 : if ( bLocalUseExceptions ) {
31853 : CPLErr eclass = CPLGetLastErrorType();
31854 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31855 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31856 : }
31857 : }
31858 : #endif
31859 : }
31860 3 : resultobj = SWIG_From_bool(static_cast< bool >(result));
31861 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31862 : return resultobj;
31863 : fail:
31864 : return NULL;
31865 : }
31866 :
31867 :
31868 3 : SWIGINTERN PyObject *_wrap_PreparedGeometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31869 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31870 3 : OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
31871 3 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
31872 3 : void *argp1 = 0 ;
31873 3 : int res1 = 0 ;
31874 3 : void *argp2 = 0 ;
31875 3 : int res2 = 0 ;
31876 3 : PyObject *swig_obj[2] ;
31877 3 : bool result;
31878 :
31879 3 : if (!SWIG_Python_UnpackTuple(args, "PreparedGeometry_Contains", 2, 2, swig_obj)) SWIG_fail;
31880 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, 0 | 0 );
31881 3 : if (!SWIG_IsOK(res1)) {
31882 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreparedGeometry_Contains" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'");
31883 : }
31884 3 : arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
31885 3 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31886 3 : if (!SWIG_IsOK(res2)) {
31887 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreparedGeometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow const *""'");
31888 : }
31889 3 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
31890 3 : {
31891 3 : if (!arg2) {
31892 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
31893 : }
31894 : }
31895 3 : {
31896 3 : const int bLocalUseExceptions = GetUseExceptions();
31897 3 : if ( bLocalUseExceptions ) {
31898 3 : pushErrorHandler();
31899 : }
31900 3 : {
31901 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31902 3 : result = (bool)OGRPreparedGeometryShadow_Contains(arg1,(OGRGeometryShadow const *)arg2);
31903 3 : SWIG_PYTHON_THREAD_END_ALLOW;
31904 : }
31905 3 : if ( bLocalUseExceptions ) {
31906 3 : popErrorHandler();
31907 : }
31908 : #ifndef SED_HACKS
31909 : if ( bLocalUseExceptions ) {
31910 : CPLErr eclass = CPLGetLastErrorType();
31911 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31912 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31913 : }
31914 : }
31915 : #endif
31916 : }
31917 3 : resultobj = SWIG_From_bool(static_cast< bool >(result));
31918 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
31919 : return resultobj;
31920 : fail:
31921 : return NULL;
31922 : }
31923 :
31924 :
31925 277 : SWIGINTERN PyObject *PreparedGeometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31926 277 : PyObject *obj;
31927 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
31928 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_NewClientData(obj));
31929 277 : return SWIG_Py_Void();
31930 : }
31931 :
31932 6 : SWIGINTERN PyObject *_wrap_new_GeomTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31933 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31934 6 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
31935 6 : char **arg2 = (char **) NULL ;
31936 6 : void *argp1 = 0 ;
31937 6 : int res1 = 0 ;
31938 6 : PyObject *swig_obj[2] ;
31939 6 : OGRGeomTransformerShadow *result = 0 ;
31940 :
31941 6 : if (!SWIG_Python_UnpackTuple(args, "new_GeomTransformer", 1, 2, swig_obj)) SWIG_fail;
31942 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
31943 6 : if (!SWIG_IsOK(res1)) {
31944 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GeomTransformer" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
31945 : }
31946 6 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
31947 6 : if (swig_obj[1]) {
31948 4 : {
31949 : /* %typemap(in) char **dict */
31950 4 : arg2 = NULL;
31951 4 : if ( PySequence_Check( swig_obj[1] ) ) {
31952 4 : int bErr = FALSE;
31953 4 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
31954 4 : if ( bErr )
31955 : {
31956 0 : SWIG_fail;
31957 : }
31958 : }
31959 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
31960 0 : int bErr = FALSE;
31961 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
31962 0 : if ( bErr )
31963 : {
31964 0 : SWIG_fail;
31965 : }
31966 : }
31967 : else {
31968 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
31969 0 : SWIG_fail;
31970 : }
31971 : }
31972 : }
31973 6 : {
31974 6 : const int bLocalUseExceptions = GetUseExceptions();
31975 6 : if ( bLocalUseExceptions ) {
31976 0 : pushErrorHandler();
31977 : }
31978 6 : {
31979 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31980 6 : result = (OGRGeomTransformerShadow *)new_OGRGeomTransformerShadow(arg1,arg2);
31981 6 : SWIG_PYTHON_THREAD_END_ALLOW;
31982 : }
31983 6 : if ( bLocalUseExceptions ) {
31984 0 : popErrorHandler();
31985 : }
31986 : #ifndef SED_HACKS
31987 : if ( bLocalUseExceptions ) {
31988 : CPLErr eclass = CPLGetLastErrorType();
31989 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31990 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31991 : }
31992 : }
31993 : #endif
31994 : }
31995 6 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_POINTER_NEW | 0 );
31996 6 : {
31997 : /* %typemap(freearg) char **dict */
31998 6 : CSLDestroy( arg2 );
31999 : }
32000 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32001 : return resultobj;
32002 0 : fail:
32003 0 : {
32004 : /* %typemap(freearg) char **dict */
32005 0 : CSLDestroy( arg2 );
32006 : }
32007 : return NULL;
32008 : }
32009 :
32010 :
32011 6 : SWIGINTERN PyObject *_wrap_delete_GeomTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32012 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32013 6 : OGRGeomTransformerShadow *arg1 = (OGRGeomTransformerShadow *) 0 ;
32014 6 : void *argp1 = 0 ;
32015 6 : int res1 = 0 ;
32016 6 : PyObject *swig_obj[1] ;
32017 :
32018 6 : if (!args) SWIG_fail;
32019 6 : swig_obj[0] = args;
32020 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_POINTER_DISOWN | 0 );
32021 6 : if (!SWIG_IsOK(res1)) {
32022 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomTransformer" "', argument " "1"" of type '" "OGRGeomTransformerShadow *""'");
32023 : }
32024 6 : arg1 = reinterpret_cast< OGRGeomTransformerShadow * >(argp1);
32025 6 : {
32026 6 : const int bLocalUseExceptions = GetUseExceptions();
32027 6 : if ( bLocalUseExceptions ) {
32028 0 : pushErrorHandler();
32029 : }
32030 6 : {
32031 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32032 6 : delete_OGRGeomTransformerShadow(arg1);
32033 6 : SWIG_PYTHON_THREAD_END_ALLOW;
32034 : }
32035 6 : if ( bLocalUseExceptions ) {
32036 0 : popErrorHandler();
32037 : }
32038 : #ifndef SED_HACKS
32039 : if ( bLocalUseExceptions ) {
32040 : CPLErr eclass = CPLGetLastErrorType();
32041 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32042 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32043 : }
32044 : }
32045 : #endif
32046 : }
32047 6 : resultobj = SWIG_Py_Void();
32048 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32049 : return resultobj;
32050 : fail:
32051 : return NULL;
32052 : }
32053 :
32054 :
32055 2 : SWIGINTERN PyObject *_wrap_GeomTransformer_Transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32056 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32057 2 : OGRGeomTransformerShadow *arg1 = (OGRGeomTransformerShadow *) 0 ;
32058 2 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
32059 2 : void *argp1 = 0 ;
32060 2 : int res1 = 0 ;
32061 2 : void *argp2 = 0 ;
32062 2 : int res2 = 0 ;
32063 2 : PyObject *swig_obj[2] ;
32064 2 : OGRGeometryShadow *result = 0 ;
32065 :
32066 2 : if (!SWIG_Python_UnpackTuple(args, "GeomTransformer_Transform", 2, 2, swig_obj)) SWIG_fail;
32067 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomTransformerShadow, 0 | 0 );
32068 2 : if (!SWIG_IsOK(res1)) {
32069 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomTransformer_Transform" "', argument " "1"" of type '" "OGRGeomTransformerShadow *""'");
32070 : }
32071 2 : arg1 = reinterpret_cast< OGRGeomTransformerShadow * >(argp1);
32072 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
32073 2 : if (!SWIG_IsOK(res2)) {
32074 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomTransformer_Transform" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
32075 : }
32076 2 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
32077 2 : {
32078 2 : if (!arg2) {
32079 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
32080 : }
32081 : }
32082 2 : {
32083 2 : const int bLocalUseExceptions = GetUseExceptions();
32084 2 : if ( bLocalUseExceptions ) {
32085 0 : pushErrorHandler();
32086 : }
32087 2 : {
32088 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32089 2 : result = (OGRGeometryShadow *)OGRGeomTransformerShadow_Transform(arg1,arg2);
32090 2 : SWIG_PYTHON_THREAD_END_ALLOW;
32091 : }
32092 2 : if ( bLocalUseExceptions ) {
32093 0 : popErrorHandler();
32094 : }
32095 : #ifndef SED_HACKS
32096 : if ( bLocalUseExceptions ) {
32097 : CPLErr eclass = CPLGetLastErrorType();
32098 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32099 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32100 : }
32101 : }
32102 : #endif
32103 : }
32104 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
32105 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32106 : return resultobj;
32107 : fail:
32108 : return NULL;
32109 : }
32110 :
32111 :
32112 277 : SWIGINTERN PyObject *GeomTransformer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32113 277 : PyObject *obj;
32114 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
32115 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_NewClientData(obj));
32116 277 : return SWIG_Py_Void();
32117 : }
32118 :
32119 6 : SWIGINTERN PyObject *GeomTransformer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32120 6 : return SWIG_Python_InitShadowInstance(args);
32121 : }
32122 :
32123 47 : SWIGINTERN PyObject *_wrap_delete_FieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32124 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32125 47 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32126 47 : void *argp1 = 0 ;
32127 47 : int res1 = 0 ;
32128 47 : PyObject *swig_obj[1] ;
32129 :
32130 47 : if (!args) SWIG_fail;
32131 47 : swig_obj[0] = args;
32132 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_DISOWN | 0 );
32133 47 : if (!SWIG_IsOK(res1)) {
32134 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDomain" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32135 : }
32136 47 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32137 47 : {
32138 47 : const int bLocalUseExceptions = GetUseExceptions();
32139 47 : if ( bLocalUseExceptions ) {
32140 29 : pushErrorHandler();
32141 : }
32142 47 : {
32143 47 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32144 47 : delete_OGRFieldDomainShadow(arg1);
32145 47 : SWIG_PYTHON_THREAD_END_ALLOW;
32146 : }
32147 47 : if ( bLocalUseExceptions ) {
32148 29 : popErrorHandler();
32149 : }
32150 : #ifndef SED_HACKS
32151 : if ( bLocalUseExceptions ) {
32152 : CPLErr eclass = CPLGetLastErrorType();
32153 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32154 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32155 : }
32156 : }
32157 : #endif
32158 : }
32159 47 : resultobj = SWIG_Py_Void();
32160 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32161 : return resultobj;
32162 : fail:
32163 : return NULL;
32164 : }
32165 :
32166 :
32167 57 : SWIGINTERN PyObject *_wrap_FieldDomain_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32168 57 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32169 57 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32170 57 : void *argp1 = 0 ;
32171 57 : int res1 = 0 ;
32172 57 : PyObject *swig_obj[1] ;
32173 57 : char *result = 0 ;
32174 :
32175 57 : if (!args) SWIG_fail;
32176 57 : swig_obj[0] = args;
32177 57 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32178 57 : if (!SWIG_IsOK(res1)) {
32179 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetName" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32180 : }
32181 57 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32182 57 : {
32183 57 : const int bLocalUseExceptions = GetUseExceptions();
32184 57 : if ( bLocalUseExceptions ) {
32185 48 : pushErrorHandler();
32186 : }
32187 57 : {
32188 57 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32189 57 : result = (char *)OGRFieldDomainShadow_GetName(arg1);
32190 57 : SWIG_PYTHON_THREAD_END_ALLOW;
32191 : }
32192 57 : if ( bLocalUseExceptions ) {
32193 48 : popErrorHandler();
32194 : }
32195 : #ifndef SED_HACKS
32196 : if ( bLocalUseExceptions ) {
32197 : CPLErr eclass = CPLGetLastErrorType();
32198 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32199 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32200 : }
32201 : }
32202 : #endif
32203 : }
32204 57 : resultobj = SWIG_FromCharPtr((const char *)result);
32205 57 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32206 : return resultobj;
32207 : fail:
32208 : return NULL;
32209 : }
32210 :
32211 :
32212 60 : SWIGINTERN PyObject *_wrap_FieldDomain_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32213 60 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32214 60 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32215 60 : void *argp1 = 0 ;
32216 60 : int res1 = 0 ;
32217 60 : PyObject *swig_obj[1] ;
32218 60 : char *result = 0 ;
32219 :
32220 60 : if (!args) SWIG_fail;
32221 60 : swig_obj[0] = args;
32222 60 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32223 60 : if (!SWIG_IsOK(res1)) {
32224 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetDescription" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32225 : }
32226 60 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32227 60 : {
32228 60 : const int bLocalUseExceptions = GetUseExceptions();
32229 60 : if ( bLocalUseExceptions ) {
32230 50 : pushErrorHandler();
32231 : }
32232 60 : {
32233 60 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32234 60 : result = (char *)OGRFieldDomainShadow_GetDescription(arg1);
32235 60 : SWIG_PYTHON_THREAD_END_ALLOW;
32236 : }
32237 60 : if ( bLocalUseExceptions ) {
32238 50 : popErrorHandler();
32239 : }
32240 : #ifndef SED_HACKS
32241 : if ( bLocalUseExceptions ) {
32242 : CPLErr eclass = CPLGetLastErrorType();
32243 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32244 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32245 : }
32246 : }
32247 : #endif
32248 : }
32249 60 : resultobj = SWIG_FromCharPtr((const char *)result);
32250 60 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32251 : return resultobj;
32252 : fail:
32253 : return NULL;
32254 : }
32255 :
32256 :
32257 62 : SWIGINTERN PyObject *_wrap_FieldDomain_GetFieldType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32258 62 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32259 62 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32260 62 : void *argp1 = 0 ;
32261 62 : int res1 = 0 ;
32262 62 : PyObject *swig_obj[1] ;
32263 62 : OGRFieldType result;
32264 :
32265 62 : if (!args) SWIG_fail;
32266 62 : swig_obj[0] = args;
32267 62 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32268 62 : if (!SWIG_IsOK(res1)) {
32269 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetFieldType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32270 : }
32271 62 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32272 62 : {
32273 62 : const int bLocalUseExceptions = GetUseExceptions();
32274 62 : if ( bLocalUseExceptions ) {
32275 44 : pushErrorHandler();
32276 : }
32277 62 : {
32278 62 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32279 62 : result = (OGRFieldType)OGRFieldDomainShadow_GetFieldType(arg1);
32280 62 : SWIG_PYTHON_THREAD_END_ALLOW;
32281 : }
32282 62 : if ( bLocalUseExceptions ) {
32283 44 : popErrorHandler();
32284 : }
32285 : #ifndef SED_HACKS
32286 : if ( bLocalUseExceptions ) {
32287 : CPLErr eclass = CPLGetLastErrorType();
32288 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32289 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32290 : }
32291 : }
32292 : #endif
32293 : }
32294 62 : resultobj = SWIG_From_int(static_cast< int >(result));
32295 62 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32296 : return resultobj;
32297 : fail:
32298 : return NULL;
32299 : }
32300 :
32301 :
32302 40 : SWIGINTERN PyObject *_wrap_FieldDomain_GetFieldSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32303 40 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32304 40 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32305 40 : void *argp1 = 0 ;
32306 40 : int res1 = 0 ;
32307 40 : PyObject *swig_obj[1] ;
32308 40 : OGRFieldSubType result;
32309 :
32310 40 : if (!args) SWIG_fail;
32311 40 : swig_obj[0] = args;
32312 40 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32313 40 : if (!SWIG_IsOK(res1)) {
32314 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetFieldSubType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32315 : }
32316 40 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32317 40 : {
32318 40 : const int bLocalUseExceptions = GetUseExceptions();
32319 40 : if ( bLocalUseExceptions ) {
32320 38 : pushErrorHandler();
32321 : }
32322 40 : {
32323 40 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32324 40 : result = (OGRFieldSubType)OGRFieldDomainShadow_GetFieldSubType(arg1);
32325 40 : SWIG_PYTHON_THREAD_END_ALLOW;
32326 : }
32327 40 : if ( bLocalUseExceptions ) {
32328 38 : popErrorHandler();
32329 : }
32330 : #ifndef SED_HACKS
32331 : if ( bLocalUseExceptions ) {
32332 : CPLErr eclass = CPLGetLastErrorType();
32333 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32334 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32335 : }
32336 : }
32337 : #endif
32338 : }
32339 40 : resultobj = SWIG_From_int(static_cast< int >(result));
32340 40 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32341 : return resultobj;
32342 : fail:
32343 : return NULL;
32344 : }
32345 :
32346 :
32347 56 : SWIGINTERN PyObject *_wrap_FieldDomain_GetDomainType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32348 56 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32349 56 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32350 56 : void *argp1 = 0 ;
32351 56 : int res1 = 0 ;
32352 56 : PyObject *swig_obj[1] ;
32353 56 : OGRFieldDomainType result;
32354 :
32355 56 : if (!args) SWIG_fail;
32356 56 : swig_obj[0] = args;
32357 56 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32358 56 : if (!SWIG_IsOK(res1)) {
32359 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetDomainType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32360 : }
32361 56 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32362 56 : {
32363 56 : const int bLocalUseExceptions = GetUseExceptions();
32364 56 : if ( bLocalUseExceptions ) {
32365 47 : pushErrorHandler();
32366 : }
32367 56 : {
32368 56 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32369 56 : result = (OGRFieldDomainType)OGRFieldDomainShadow_GetDomainType(arg1);
32370 56 : SWIG_PYTHON_THREAD_END_ALLOW;
32371 : }
32372 56 : if ( bLocalUseExceptions ) {
32373 47 : popErrorHandler();
32374 : }
32375 : #ifndef SED_HACKS
32376 : if ( bLocalUseExceptions ) {
32377 : CPLErr eclass = CPLGetLastErrorType();
32378 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32379 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32380 : }
32381 : }
32382 : #endif
32383 : }
32384 56 : resultobj = SWIG_From_int(static_cast< int >(result));
32385 56 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32386 : return resultobj;
32387 : fail:
32388 : return NULL;
32389 : }
32390 :
32391 :
32392 2 : SWIGINTERN PyObject *_wrap_FieldDomain_GetSplitPolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32393 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32394 2 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32395 2 : void *argp1 = 0 ;
32396 2 : int res1 = 0 ;
32397 2 : PyObject *swig_obj[1] ;
32398 2 : OGRFieldDomainSplitPolicy result;
32399 :
32400 2 : if (!args) SWIG_fail;
32401 2 : swig_obj[0] = args;
32402 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32403 2 : if (!SWIG_IsOK(res1)) {
32404 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetSplitPolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32405 : }
32406 2 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32407 2 : {
32408 2 : const int bLocalUseExceptions = GetUseExceptions();
32409 2 : if ( bLocalUseExceptions ) {
32410 2 : pushErrorHandler();
32411 : }
32412 2 : {
32413 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32414 2 : result = (OGRFieldDomainSplitPolicy)OGRFieldDomainShadow_GetSplitPolicy(arg1);
32415 2 : SWIG_PYTHON_THREAD_END_ALLOW;
32416 : }
32417 2 : if ( bLocalUseExceptions ) {
32418 2 : popErrorHandler();
32419 : }
32420 : #ifndef SED_HACKS
32421 : if ( bLocalUseExceptions ) {
32422 : CPLErr eclass = CPLGetLastErrorType();
32423 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32424 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32425 : }
32426 : }
32427 : #endif
32428 : }
32429 2 : resultobj = SWIG_From_int(static_cast< int >(result));
32430 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32431 : return resultobj;
32432 : fail:
32433 : return NULL;
32434 : }
32435 :
32436 :
32437 1 : SWIGINTERN PyObject *_wrap_FieldDomain_SetSplitPolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32438 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32439 1 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32440 1 : OGRFieldDomainSplitPolicy arg2 ;
32441 1 : void *argp1 = 0 ;
32442 1 : int res1 = 0 ;
32443 1 : int val2 ;
32444 1 : int ecode2 = 0 ;
32445 1 : PyObject *swig_obj[2] ;
32446 :
32447 1 : if (!SWIG_Python_UnpackTuple(args, "FieldDomain_SetSplitPolicy", 2, 2, swig_obj)) SWIG_fail;
32448 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32449 1 : if (!SWIG_IsOK(res1)) {
32450 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_SetSplitPolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32451 : }
32452 1 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32453 1 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
32454 1 : if (!SWIG_IsOK(ecode2)) {
32455 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDomain_SetSplitPolicy" "', argument " "2"" of type '" "OGRFieldDomainSplitPolicy""'");
32456 : }
32457 1 : arg2 = static_cast< OGRFieldDomainSplitPolicy >(val2);
32458 1 : {
32459 1 : const int bLocalUseExceptions = GetUseExceptions();
32460 1 : if ( bLocalUseExceptions ) {
32461 1 : pushErrorHandler();
32462 : }
32463 1 : {
32464 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32465 1 : OGRFieldDomainShadow_SetSplitPolicy(arg1,arg2);
32466 1 : SWIG_PYTHON_THREAD_END_ALLOW;
32467 : }
32468 1 : if ( bLocalUseExceptions ) {
32469 1 : popErrorHandler();
32470 : }
32471 : #ifndef SED_HACKS
32472 : if ( bLocalUseExceptions ) {
32473 : CPLErr eclass = CPLGetLastErrorType();
32474 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32475 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32476 : }
32477 : }
32478 : #endif
32479 : }
32480 1 : resultobj = SWIG_Py_Void();
32481 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32482 : return resultobj;
32483 : fail:
32484 : return NULL;
32485 : }
32486 :
32487 :
32488 2 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMergePolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32489 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32490 2 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32491 2 : void *argp1 = 0 ;
32492 2 : int res1 = 0 ;
32493 2 : PyObject *swig_obj[1] ;
32494 2 : OGRFieldDomainMergePolicy result;
32495 :
32496 2 : if (!args) SWIG_fail;
32497 2 : swig_obj[0] = args;
32498 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32499 2 : if (!SWIG_IsOK(res1)) {
32500 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMergePolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32501 : }
32502 2 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32503 2 : {
32504 2 : const int bLocalUseExceptions = GetUseExceptions();
32505 2 : if ( bLocalUseExceptions ) {
32506 2 : pushErrorHandler();
32507 : }
32508 2 : {
32509 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32510 2 : result = (OGRFieldDomainMergePolicy)OGRFieldDomainShadow_GetMergePolicy(arg1);
32511 2 : SWIG_PYTHON_THREAD_END_ALLOW;
32512 : }
32513 2 : if ( bLocalUseExceptions ) {
32514 2 : popErrorHandler();
32515 : }
32516 : #ifndef SED_HACKS
32517 : if ( bLocalUseExceptions ) {
32518 : CPLErr eclass = CPLGetLastErrorType();
32519 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32520 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32521 : }
32522 : }
32523 : #endif
32524 : }
32525 2 : resultobj = SWIG_From_int(static_cast< int >(result));
32526 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32527 : return resultobj;
32528 : fail:
32529 : return NULL;
32530 : }
32531 :
32532 :
32533 1 : SWIGINTERN PyObject *_wrap_FieldDomain_SetMergePolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32534 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32535 1 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32536 1 : OGRFieldDomainMergePolicy arg2 ;
32537 1 : void *argp1 = 0 ;
32538 1 : int res1 = 0 ;
32539 1 : int val2 ;
32540 1 : int ecode2 = 0 ;
32541 1 : PyObject *swig_obj[2] ;
32542 :
32543 1 : if (!SWIG_Python_UnpackTuple(args, "FieldDomain_SetMergePolicy", 2, 2, swig_obj)) SWIG_fail;
32544 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32545 1 : if (!SWIG_IsOK(res1)) {
32546 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_SetMergePolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32547 : }
32548 1 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32549 1 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
32550 1 : if (!SWIG_IsOK(ecode2)) {
32551 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDomain_SetMergePolicy" "', argument " "2"" of type '" "OGRFieldDomainMergePolicy""'");
32552 : }
32553 1 : arg2 = static_cast< OGRFieldDomainMergePolicy >(val2);
32554 1 : {
32555 1 : const int bLocalUseExceptions = GetUseExceptions();
32556 1 : if ( bLocalUseExceptions ) {
32557 1 : pushErrorHandler();
32558 : }
32559 1 : {
32560 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32561 1 : OGRFieldDomainShadow_SetMergePolicy(arg1,arg2);
32562 1 : SWIG_PYTHON_THREAD_END_ALLOW;
32563 : }
32564 1 : if ( bLocalUseExceptions ) {
32565 1 : popErrorHandler();
32566 : }
32567 : #ifndef SED_HACKS
32568 : if ( bLocalUseExceptions ) {
32569 : CPLErr eclass = CPLGetLastErrorType();
32570 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32571 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32572 : }
32573 : }
32574 : #endif
32575 : }
32576 1 : resultobj = SWIG_Py_Void();
32577 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32578 : return resultobj;
32579 : fail:
32580 : return NULL;
32581 : }
32582 :
32583 :
32584 37 : SWIGINTERN PyObject *_wrap_FieldDomain_GetEnumeration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32585 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32586 37 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32587 37 : void *argp1 = 0 ;
32588 37 : int res1 = 0 ;
32589 37 : PyObject *swig_obj[1] ;
32590 37 : OGRCodedValue *result = 0 ;
32591 :
32592 37 : if (!args) SWIG_fail;
32593 37 : swig_obj[0] = args;
32594 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32595 37 : if (!SWIG_IsOK(res1)) {
32596 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetEnumeration" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32597 : }
32598 37 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32599 37 : {
32600 37 : const int bLocalUseExceptions = GetUseExceptions();
32601 37 : if ( bLocalUseExceptions ) {
32602 35 : pushErrorHandler();
32603 : }
32604 37 : {
32605 37 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32606 37 : result = (OGRCodedValue *)OGRFieldDomainShadow_GetEnumeration(arg1);
32607 37 : SWIG_PYTHON_THREAD_END_ALLOW;
32608 : }
32609 37 : if ( bLocalUseExceptions ) {
32610 35 : popErrorHandler();
32611 : }
32612 : #ifndef SED_HACKS
32613 : if ( bLocalUseExceptions ) {
32614 : CPLErr eclass = CPLGetLastErrorType();
32615 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32616 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32617 : }
32618 : }
32619 : #endif
32620 : }
32621 37 : {
32622 : /* %typemap(out) OGRCodedValue* */
32623 37 : if( result == NULL )
32624 : {
32625 1 : PyErr_SetString( PyExc_RuntimeError, CPLGetLastErrorMsg() );
32626 1 : SWIG_fail;
32627 : }
32628 36 : PyObject *dict = PyDict_New();
32629 136 : for( int i = 0; (result)[i].pszCode != NULL; i++ )
32630 : {
32631 100 : if( (result)[i].pszValue )
32632 : {
32633 98 : PyObject* val = GDALPythonObjectFromCStr((result)[i].pszValue);
32634 98 : PyDict_SetItemString(dict, (result)[i].pszCode, val);
32635 100 : Py_DECREF(val);
32636 : }
32637 : else
32638 : {
32639 2 : PyDict_SetItemString(dict, (result)[i].pszCode, Py_None);
32640 : }
32641 : }
32642 36 : resultobj = dict;
32643 : }
32644 37 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32645 : return resultobj;
32646 : fail:
32647 : return NULL;
32648 : }
32649 :
32650 :
32651 15 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMinAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32652 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32653 15 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32654 15 : void *argp1 = 0 ;
32655 15 : int res1 = 0 ;
32656 15 : PyObject *swig_obj[1] ;
32657 15 : double result;
32658 :
32659 15 : if (!args) SWIG_fail;
32660 15 : swig_obj[0] = args;
32661 15 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32662 15 : if (!SWIG_IsOK(res1)) {
32663 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMinAsDouble" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32664 : }
32665 15 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32666 15 : {
32667 15 : const int bLocalUseExceptions = GetUseExceptions();
32668 15 : if ( bLocalUseExceptions ) {
32669 8 : pushErrorHandler();
32670 : }
32671 15 : {
32672 15 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32673 15 : result = (double)OGRFieldDomainShadow_GetMinAsDouble(arg1);
32674 15 : SWIG_PYTHON_THREAD_END_ALLOW;
32675 : }
32676 15 : if ( bLocalUseExceptions ) {
32677 8 : popErrorHandler();
32678 : }
32679 : #ifndef SED_HACKS
32680 : if ( bLocalUseExceptions ) {
32681 : CPLErr eclass = CPLGetLastErrorType();
32682 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32683 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32684 : }
32685 : }
32686 : #endif
32687 : }
32688 15 : resultobj = SWIG_From_double(static_cast< double >(result));
32689 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32690 : return resultobj;
32691 : fail:
32692 : return NULL;
32693 : }
32694 :
32695 :
32696 4 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMinAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32697 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32698 4 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32699 4 : void *argp1 = 0 ;
32700 4 : int res1 = 0 ;
32701 4 : PyObject *swig_obj[1] ;
32702 4 : char *result = 0 ;
32703 :
32704 4 : if (!args) SWIG_fail;
32705 4 : swig_obj[0] = args;
32706 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32707 4 : if (!SWIG_IsOK(res1)) {
32708 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMinAsString" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32709 : }
32710 4 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32711 4 : {
32712 4 : const int bLocalUseExceptions = GetUseExceptions();
32713 4 : if ( bLocalUseExceptions ) {
32714 4 : pushErrorHandler();
32715 : }
32716 4 : {
32717 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32718 4 : result = (char *)OGRFieldDomainShadow_GetMinAsString(arg1);
32719 4 : SWIG_PYTHON_THREAD_END_ALLOW;
32720 : }
32721 4 : if ( bLocalUseExceptions ) {
32722 4 : popErrorHandler();
32723 : }
32724 : #ifndef SED_HACKS
32725 : if ( bLocalUseExceptions ) {
32726 : CPLErr eclass = CPLGetLastErrorType();
32727 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32728 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32729 : }
32730 : }
32731 : #endif
32732 : }
32733 4 : resultobj = SWIG_FromCharPtr((const char *)result);
32734 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32735 : return resultobj;
32736 : fail:
32737 : return NULL;
32738 : }
32739 :
32740 :
32741 7 : SWIGINTERN PyObject *_wrap_FieldDomain_IsMinInclusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32742 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32743 7 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32744 7 : void *argp1 = 0 ;
32745 7 : int res1 = 0 ;
32746 7 : PyObject *swig_obj[1] ;
32747 7 : bool result;
32748 :
32749 7 : if (!args) SWIG_fail;
32750 7 : swig_obj[0] = args;
32751 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32752 7 : if (!SWIG_IsOK(res1)) {
32753 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_IsMinInclusive" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32754 : }
32755 7 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32756 7 : {
32757 7 : const int bLocalUseExceptions = GetUseExceptions();
32758 7 : if ( bLocalUseExceptions ) {
32759 2 : pushErrorHandler();
32760 : }
32761 7 : {
32762 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32763 7 : result = (bool)OGRFieldDomainShadow_IsMinInclusive(arg1);
32764 7 : SWIG_PYTHON_THREAD_END_ALLOW;
32765 : }
32766 7 : if ( bLocalUseExceptions ) {
32767 2 : popErrorHandler();
32768 : }
32769 : #ifndef SED_HACKS
32770 : if ( bLocalUseExceptions ) {
32771 : CPLErr eclass = CPLGetLastErrorType();
32772 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32773 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32774 : }
32775 : }
32776 : #endif
32777 : }
32778 7 : resultobj = SWIG_From_bool(static_cast< bool >(result));
32779 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32780 : return resultobj;
32781 : fail:
32782 : return NULL;
32783 : }
32784 :
32785 :
32786 15 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMaxAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32787 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32788 15 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32789 15 : void *argp1 = 0 ;
32790 15 : int res1 = 0 ;
32791 15 : PyObject *swig_obj[1] ;
32792 15 : double result;
32793 :
32794 15 : if (!args) SWIG_fail;
32795 15 : swig_obj[0] = args;
32796 15 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32797 15 : if (!SWIG_IsOK(res1)) {
32798 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMaxAsDouble" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32799 : }
32800 15 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32801 15 : {
32802 15 : const int bLocalUseExceptions = GetUseExceptions();
32803 15 : if ( bLocalUseExceptions ) {
32804 8 : pushErrorHandler();
32805 : }
32806 15 : {
32807 15 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32808 15 : result = (double)OGRFieldDomainShadow_GetMaxAsDouble(arg1);
32809 15 : SWIG_PYTHON_THREAD_END_ALLOW;
32810 : }
32811 15 : if ( bLocalUseExceptions ) {
32812 8 : popErrorHandler();
32813 : }
32814 : #ifndef SED_HACKS
32815 : if ( bLocalUseExceptions ) {
32816 : CPLErr eclass = CPLGetLastErrorType();
32817 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32818 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32819 : }
32820 : }
32821 : #endif
32822 : }
32823 15 : resultobj = SWIG_From_double(static_cast< double >(result));
32824 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32825 : return resultobj;
32826 : fail:
32827 : return NULL;
32828 : }
32829 :
32830 :
32831 4 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMaxAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32832 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32833 4 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32834 4 : void *argp1 = 0 ;
32835 4 : int res1 = 0 ;
32836 4 : PyObject *swig_obj[1] ;
32837 4 : char *result = 0 ;
32838 :
32839 4 : if (!args) SWIG_fail;
32840 4 : swig_obj[0] = args;
32841 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32842 4 : if (!SWIG_IsOK(res1)) {
32843 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMaxAsString" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32844 : }
32845 4 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32846 4 : {
32847 4 : const int bLocalUseExceptions = GetUseExceptions();
32848 4 : if ( bLocalUseExceptions ) {
32849 4 : pushErrorHandler();
32850 : }
32851 4 : {
32852 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32853 4 : result = (char *)OGRFieldDomainShadow_GetMaxAsString(arg1);
32854 4 : SWIG_PYTHON_THREAD_END_ALLOW;
32855 : }
32856 4 : if ( bLocalUseExceptions ) {
32857 4 : popErrorHandler();
32858 : }
32859 : #ifndef SED_HACKS
32860 : if ( bLocalUseExceptions ) {
32861 : CPLErr eclass = CPLGetLastErrorType();
32862 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32863 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32864 : }
32865 : }
32866 : #endif
32867 : }
32868 4 : resultobj = SWIG_FromCharPtr((const char *)result);
32869 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32870 : return resultobj;
32871 : fail:
32872 : return NULL;
32873 : }
32874 :
32875 :
32876 7 : SWIGINTERN PyObject *_wrap_FieldDomain_IsMaxInclusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32877 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32878 7 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32879 7 : void *argp1 = 0 ;
32880 7 : int res1 = 0 ;
32881 7 : PyObject *swig_obj[1] ;
32882 7 : bool result;
32883 :
32884 7 : if (!args) SWIG_fail;
32885 7 : swig_obj[0] = args;
32886 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32887 7 : if (!SWIG_IsOK(res1)) {
32888 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_IsMaxInclusive" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32889 : }
32890 7 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32891 7 : {
32892 7 : const int bLocalUseExceptions = GetUseExceptions();
32893 7 : if ( bLocalUseExceptions ) {
32894 2 : pushErrorHandler();
32895 : }
32896 7 : {
32897 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32898 7 : result = (bool)OGRFieldDomainShadow_IsMaxInclusive(arg1);
32899 7 : SWIG_PYTHON_THREAD_END_ALLOW;
32900 : }
32901 7 : if ( bLocalUseExceptions ) {
32902 2 : popErrorHandler();
32903 : }
32904 : #ifndef SED_HACKS
32905 : if ( bLocalUseExceptions ) {
32906 : CPLErr eclass = CPLGetLastErrorType();
32907 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32908 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32909 : }
32910 : }
32911 : #endif
32912 : }
32913 7 : resultobj = SWIG_From_bool(static_cast< bool >(result));
32914 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32915 : return resultobj;
32916 : fail:
32917 : return NULL;
32918 : }
32919 :
32920 :
32921 9 : SWIGINTERN PyObject *_wrap_FieldDomain_GetGlob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32922 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32923 9 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32924 9 : void *argp1 = 0 ;
32925 9 : int res1 = 0 ;
32926 9 : PyObject *swig_obj[1] ;
32927 9 : char *result = 0 ;
32928 :
32929 9 : if (!args) SWIG_fail;
32930 9 : swig_obj[0] = args;
32931 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32932 9 : if (!SWIG_IsOK(res1)) {
32933 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetGlob" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32934 : }
32935 9 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32936 9 : {
32937 9 : const int bLocalUseExceptions = GetUseExceptions();
32938 9 : if ( bLocalUseExceptions ) {
32939 8 : pushErrorHandler();
32940 : }
32941 9 : {
32942 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32943 9 : result = (char *)OGRFieldDomainShadow_GetGlob(arg1);
32944 9 : SWIG_PYTHON_THREAD_END_ALLOW;
32945 : }
32946 9 : if ( bLocalUseExceptions ) {
32947 8 : popErrorHandler();
32948 : }
32949 : #ifndef SED_HACKS
32950 : if ( bLocalUseExceptions ) {
32951 : CPLErr eclass = CPLGetLastErrorType();
32952 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32953 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32954 : }
32955 : }
32956 : #endif
32957 : }
32958 9 : resultobj = SWIG_FromCharPtr((const char *)result);
32959 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
32960 : return resultobj;
32961 : fail:
32962 : return NULL;
32963 : }
32964 :
32965 :
32966 277 : SWIGINTERN PyObject *FieldDomain_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32967 277 : PyObject *obj;
32968 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
32969 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDomainShadow, SWIG_NewClientData(obj));
32970 277 : return SWIG_Py_Void();
32971 : }
32972 :
32973 22 : SWIGINTERN PyObject *_wrap_CreateCodedFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32974 22 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32975 22 : char *arg1 = (char *) 0 ;
32976 22 : char *arg2 = (char *) 0 ;
32977 22 : OGRFieldType arg3 ;
32978 22 : OGRFieldSubType arg4 ;
32979 22 : OGRCodedValue *arg5 = (OGRCodedValue *) 0 ;
32980 22 : int res1 ;
32981 22 : char *buf1 = 0 ;
32982 22 : int alloc1 = 0 ;
32983 22 : int res2 ;
32984 22 : char *buf2 = 0 ;
32985 22 : int alloc2 = 0 ;
32986 22 : int val3 ;
32987 22 : int ecode3 = 0 ;
32988 22 : int val4 ;
32989 22 : int ecode4 = 0 ;
32990 22 : PyObject *swig_obj[5] ;
32991 22 : OGRFieldDomainShadow *result = 0 ;
32992 :
32993 22 : if (!SWIG_Python_UnpackTuple(args, "CreateCodedFieldDomain", 5, 5, swig_obj)) SWIG_fail;
32994 21 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
32995 21 : if (!SWIG_IsOK(res1)) {
32996 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCodedFieldDomain" "', argument " "1"" of type '" "char const *""'");
32997 : }
32998 21 : arg1 = reinterpret_cast< char * >(buf1);
32999 21 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
33000 21 : if (!SWIG_IsOK(res2)) {
33001 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCodedFieldDomain" "', argument " "2"" of type '" "char const *""'");
33002 : }
33003 21 : arg2 = reinterpret_cast< char * >(buf2);
33004 21 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
33005 21 : if (!SWIG_IsOK(ecode3)) {
33006 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateCodedFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
33007 : }
33008 21 : arg3 = static_cast< OGRFieldType >(val3);
33009 21 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
33010 21 : if (!SWIG_IsOK(ecode4)) {
33011 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateCodedFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
33012 : }
33013 21 : arg4 = static_cast< OGRFieldSubType >(val4);
33014 21 : {
33015 : /* %typemap(in) OGRCodedValue* enumeration */
33016 21 : arg5 = NULL;
33017 :
33018 21 : if (swig_obj[4] == NULL || !PyMapping_Check(swig_obj[4])) {
33019 2 : SWIG_exception_fail(SWIG_ValueError,"Expected dict.");
33020 : }
33021 19 : Py_ssize_t size = PyMapping_Length( swig_obj[4] );
33022 19 : arg5 = (OGRCodedValue*)VSICalloc(size+1, sizeof(OGRCodedValue) );
33023 19 : if( !arg5 ) {
33024 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
33025 0 : SWIG_fail;
33026 : }
33027 :
33028 19 : PyObject *item_list = PyMapping_Items( swig_obj[4] );
33029 19 : if( item_list == NULL )
33030 : {
33031 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve items");
33032 0 : SWIG_fail;
33033 : }
33034 :
33035 58 : for( Py_ssize_t i=0; i<size; i++ ) {
33036 39 : PyObject *it = PySequence_GetItem( item_list, i );
33037 39 : if( it == NULL )
33038 : {
33039 0 : Py_DECREF(item_list);
33040 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
33041 0 : SWIG_fail;
33042 : }
33043 :
33044 39 : PyObject *k, *v;
33045 39 : if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
33046 0 : Py_DECREF(it);
33047 0 : Py_DECREF(item_list);
33048 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
33049 0 : SWIG_fail;
33050 : }
33051 :
33052 39 : PyObject* kStr = PyObject_Str(k);
33053 39 : if( PyErr_Occurred() )
33054 : {
33055 0 : Py_DECREF(it);
33056 0 : Py_DECREF(item_list);
33057 0 : SWIG_fail;
33058 : }
33059 :
33060 39 : PyObject* vStr = v != Py_None ? PyObject_Str(v) : Py_None;
33061 39 : if( v == Py_None )
33062 9 : Py_INCREF(Py_None);
33063 39 : if( PyErr_Occurred() )
33064 : {
33065 0 : Py_DECREF(it);
33066 0 : Py_DECREF(kStr);
33067 0 : Py_DECREF(item_list);
33068 0 : SWIG_fail;
33069 : }
33070 :
33071 39 : int bFreeK, bFreeV;
33072 39 : char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
33073 39 : char* pszV = vStr != Py_None ? GDALPythonObjectToCStr(vStr, &bFreeV) : NULL;
33074 39 : if( pszK == NULL || (pszV == NULL && vStr != Py_None) )
33075 : {
33076 0 : GDALPythonFreeCStr(pszK, bFreeK);
33077 0 : if( pszV )
33078 0 : GDALPythonFreeCStr(pszV, bFreeV);
33079 0 : Py_DECREF(kStr);
33080 0 : Py_DECREF(vStr);
33081 0 : Py_DECREF(it);
33082 0 : Py_DECREF(item_list);
33083 0 : PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
33084 0 : SWIG_fail;
33085 : }
33086 39 : (arg5)[i].pszCode = CPLStrdup(pszK);
33087 39 : (arg5)[i].pszValue = pszV ? CPLStrdup(pszV) : NULL;
33088 :
33089 39 : GDALPythonFreeCStr(pszK, bFreeK);
33090 39 : if( pszV )
33091 30 : GDALPythonFreeCStr(pszV, bFreeV);
33092 39 : Py_DECREF(kStr);
33093 39 : Py_DECREF(vStr);
33094 39 : Py_DECREF(it);
33095 : }
33096 19 : Py_DECREF(item_list);
33097 : }
33098 19 : {
33099 19 : if (!arg1) {
33100 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33101 : }
33102 : }
33103 19 : {
33104 19 : const int bLocalUseExceptions = GetUseExceptions();
33105 19 : if ( bLocalUseExceptions ) {
33106 8 : pushErrorHandler();
33107 : }
33108 19 : {
33109 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33110 19 : result = (OGRFieldDomainShadow *)CreateCodedFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,(OGRCodedValue const *)arg5);
33111 19 : SWIG_PYTHON_THREAD_END_ALLOW;
33112 : }
33113 19 : if ( bLocalUseExceptions ) {
33114 8 : popErrorHandler();
33115 : }
33116 : #ifndef SED_HACKS
33117 : if ( bLocalUseExceptions ) {
33118 : CPLErr eclass = CPLGetLastErrorType();
33119 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33120 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33121 : }
33122 : }
33123 : #endif
33124 : }
33125 19 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN | 0 );
33126 19 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
33127 19 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33128 : {
33129 : /* %typemap(freearg) OGRCodedValue* */
33130 : if( arg5 )
33131 : {
33132 58 : for( size_t i = 0; (arg5)[i].pszCode != NULL; ++i )
33133 : {
33134 39 : CPLFree((arg5)[i].pszCode);
33135 39 : CPLFree((arg5)[i].pszValue);
33136 : }
33137 : }
33138 19 : CPLFree( arg5 );
33139 : }
33140 22 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33141 : return resultobj;
33142 3 : fail:
33143 3 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
33144 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33145 3 : {
33146 : /* %typemap(freearg) OGRCodedValue* */
33147 3 : if( arg5 )
33148 : {
33149 0 : for( size_t i = 0; (arg5)[i].pszCode != NULL; ++i )
33150 : {
33151 0 : CPLFree((arg5)[i].pszCode);
33152 0 : CPLFree((arg5)[i].pszValue);
33153 : }
33154 : }
33155 3 : CPLFree( arg5 );
33156 : }
33157 : return NULL;
33158 : }
33159 :
33160 :
33161 16 : SWIGINTERN PyObject *_wrap_CreateRangeFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33162 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33163 16 : char *arg1 = (char *) 0 ;
33164 16 : char *arg2 = (char *) 0 ;
33165 16 : OGRFieldType arg3 ;
33166 16 : OGRFieldSubType arg4 ;
33167 16 : double *arg5 = (double *) 0 ;
33168 16 : bool arg6 ;
33169 16 : double *arg7 = (double *) 0 ;
33170 16 : bool arg8 ;
33171 16 : int res1 ;
33172 16 : char *buf1 = 0 ;
33173 16 : int alloc1 = 0 ;
33174 16 : int res2 ;
33175 16 : char *buf2 = 0 ;
33176 16 : int alloc2 = 0 ;
33177 16 : int val3 ;
33178 16 : int ecode3 = 0 ;
33179 16 : int val4 ;
33180 16 : int ecode4 = 0 ;
33181 16 : double val5 ;
33182 16 : bool val6 ;
33183 16 : int ecode6 = 0 ;
33184 16 : double val7 ;
33185 16 : bool val8 ;
33186 16 : int ecode8 = 0 ;
33187 16 : PyObject *swig_obj[8] ;
33188 16 : OGRFieldDomainShadow *result = 0 ;
33189 :
33190 16 : if (!SWIG_Python_UnpackTuple(args, "CreateRangeFieldDomain", 8, 8, swig_obj)) SWIG_fail;
33191 16 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
33192 16 : if (!SWIG_IsOK(res1)) {
33193 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateRangeFieldDomain" "', argument " "1"" of type '" "char const *""'");
33194 : }
33195 16 : arg1 = reinterpret_cast< char * >(buf1);
33196 16 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
33197 16 : if (!SWIG_IsOK(res2)) {
33198 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateRangeFieldDomain" "', argument " "2"" of type '" "char const *""'");
33199 : }
33200 16 : arg2 = reinterpret_cast< char * >(buf2);
33201 16 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
33202 16 : if (!SWIG_IsOK(ecode3)) {
33203 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateRangeFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
33204 : }
33205 16 : arg3 = static_cast< OGRFieldType >(val3);
33206 16 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
33207 16 : if (!SWIG_IsOK(ecode4)) {
33208 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateRangeFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
33209 : }
33210 16 : arg4 = static_cast< OGRFieldSubType >(val4);
33211 16 : {
33212 : /* %typemap(in) (double *optional_##double) */
33213 16 : if ( swig_obj[4] == Py_None ) {
33214 : arg5 = 0;
33215 : }
33216 14 : else if ( PyArg_Parse( swig_obj[4],"d" ,&val5 ) ) {
33217 : arg5 = (double *) &val5;
33218 : }
33219 : else {
33220 0 : PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
33221 0 : SWIG_fail;
33222 : }
33223 : }
33224 16 : ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
33225 16 : if (!SWIG_IsOK(ecode6)) {
33226 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CreateRangeFieldDomain" "', argument " "6"" of type '" "bool""'");
33227 : }
33228 16 : arg6 = static_cast< bool >(val6);
33229 16 : {
33230 : /* %typemap(in) (double *optional_##double) */
33231 16 : if ( swig_obj[6] == Py_None ) {
33232 : arg7 = 0;
33233 : }
33234 14 : else if ( PyArg_Parse( swig_obj[6],"d" ,&val7 ) ) {
33235 : arg7 = (double *) &val7;
33236 : }
33237 : else {
33238 0 : PyErr_SetString( PyExc_TypeError, "Invalid Parameter" );
33239 0 : SWIG_fail;
33240 : }
33241 : }
33242 16 : ecode8 = SWIG_AsVal_bool(swig_obj[7], &val8);
33243 16 : if (!SWIG_IsOK(ecode8)) {
33244 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CreateRangeFieldDomain" "', argument " "8"" of type '" "bool""'");
33245 : }
33246 16 : arg8 = static_cast< bool >(val8);
33247 16 : {
33248 16 : if (!arg1) {
33249 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33250 : }
33251 : }
33252 15 : {
33253 15 : const int bLocalUseExceptions = GetUseExceptions();
33254 15 : if ( bLocalUseExceptions ) {
33255 9 : pushErrorHandler();
33256 : }
33257 15 : {
33258 15 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33259 15 : result = (OGRFieldDomainShadow *)CreateRangeFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
33260 15 : SWIG_PYTHON_THREAD_END_ALLOW;
33261 : }
33262 15 : if ( bLocalUseExceptions ) {
33263 9 : popErrorHandler();
33264 : }
33265 : #ifndef SED_HACKS
33266 : if ( bLocalUseExceptions ) {
33267 : CPLErr eclass = CPLGetLastErrorType();
33268 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33269 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33270 : }
33271 : }
33272 : #endif
33273 : }
33274 15 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN | 0 );
33275 15 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
33276 15 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33277 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33278 : return resultobj;
33279 1 : fail:
33280 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
33281 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33282 : return NULL;
33283 : }
33284 :
33285 :
33286 4 : SWIGINTERN PyObject *_wrap_CreateRangeFieldDomainDateTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33287 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33288 4 : char *arg1 = (char *) 0 ;
33289 4 : char *arg2 = (char *) 0 ;
33290 4 : char *arg3 = (char *) 0 ;
33291 4 : bool arg4 ;
33292 4 : char *arg5 = (char *) 0 ;
33293 4 : double arg6 ;
33294 4 : int res1 ;
33295 4 : char *buf1 = 0 ;
33296 4 : int alloc1 = 0 ;
33297 4 : int res2 ;
33298 4 : char *buf2 = 0 ;
33299 4 : int alloc2 = 0 ;
33300 4 : int res3 ;
33301 4 : char *buf3 = 0 ;
33302 4 : int alloc3 = 0 ;
33303 4 : bool val4 ;
33304 4 : int ecode4 = 0 ;
33305 4 : int res5 ;
33306 4 : char *buf5 = 0 ;
33307 4 : int alloc5 = 0 ;
33308 4 : double val6 ;
33309 4 : int ecode6 = 0 ;
33310 4 : PyObject *swig_obj[6] ;
33311 4 : OGRFieldDomainShadow *result = 0 ;
33312 :
33313 4 : if (!SWIG_Python_UnpackTuple(args, "CreateRangeFieldDomainDateTime", 6, 6, swig_obj)) SWIG_fail;
33314 4 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
33315 4 : if (!SWIG_IsOK(res1)) {
33316 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "1"" of type '" "char const *""'");
33317 : }
33318 4 : arg1 = reinterpret_cast< char * >(buf1);
33319 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
33320 4 : if (!SWIG_IsOK(res2)) {
33321 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "2"" of type '" "char const *""'");
33322 : }
33323 4 : arg2 = reinterpret_cast< char * >(buf2);
33324 4 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
33325 4 : if (!SWIG_IsOK(res3)) {
33326 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "3"" of type '" "char const *""'");
33327 : }
33328 4 : arg3 = reinterpret_cast< char * >(buf3);
33329 4 : ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4);
33330 4 : if (!SWIG_IsOK(ecode4)) {
33331 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "4"" of type '" "bool""'");
33332 : }
33333 4 : arg4 = static_cast< bool >(val4);
33334 4 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
33335 4 : if (!SWIG_IsOK(res5)) {
33336 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "5"" of type '" "char const *""'");
33337 : }
33338 4 : arg5 = reinterpret_cast< char * >(buf5);
33339 4 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
33340 4 : if (!SWIG_IsOK(ecode6)) {
33341 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "6"" of type '" "double""'");
33342 : }
33343 4 : arg6 = static_cast< double >(val6);
33344 4 : {
33345 4 : if (!arg1) {
33346 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33347 : }
33348 : }
33349 4 : {
33350 4 : const int bLocalUseExceptions = GetUseExceptions();
33351 4 : if ( bLocalUseExceptions ) {
33352 4 : pushErrorHandler();
33353 : }
33354 4 : {
33355 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33356 4 : result = (OGRFieldDomainShadow *)CreateRangeFieldDomainDateTime((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,(char const *)arg5,arg6);
33357 4 : SWIG_PYTHON_THREAD_END_ALLOW;
33358 : }
33359 4 : if ( bLocalUseExceptions ) {
33360 4 : popErrorHandler();
33361 : }
33362 : #ifndef SED_HACKS
33363 : if ( bLocalUseExceptions ) {
33364 : CPLErr eclass = CPLGetLastErrorType();
33365 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33366 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33367 : }
33368 : }
33369 : #endif
33370 : }
33371 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
33372 4 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
33373 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33374 4 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
33375 4 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
33376 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33377 : return resultobj;
33378 0 : fail:
33379 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
33380 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33381 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
33382 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
33383 : return NULL;
33384 : }
33385 :
33386 :
33387 15 : SWIGINTERN PyObject *_wrap_CreateGlobFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33388 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33389 15 : char *arg1 = (char *) 0 ;
33390 15 : char *arg2 = (char *) 0 ;
33391 15 : OGRFieldType arg3 ;
33392 15 : OGRFieldSubType arg4 ;
33393 15 : char *arg5 = (char *) 0 ;
33394 15 : int res1 ;
33395 15 : char *buf1 = 0 ;
33396 15 : int alloc1 = 0 ;
33397 15 : int res2 ;
33398 15 : char *buf2 = 0 ;
33399 15 : int alloc2 = 0 ;
33400 15 : int val3 ;
33401 15 : int ecode3 = 0 ;
33402 15 : int val4 ;
33403 15 : int ecode4 = 0 ;
33404 15 : int res5 ;
33405 15 : char *buf5 = 0 ;
33406 15 : int alloc5 = 0 ;
33407 15 : PyObject *swig_obj[5] ;
33408 15 : OGRFieldDomainShadow *result = 0 ;
33409 :
33410 15 : if (!SWIG_Python_UnpackTuple(args, "CreateGlobFieldDomain", 5, 5, swig_obj)) SWIG_fail;
33411 15 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
33412 15 : if (!SWIG_IsOK(res1)) {
33413 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGlobFieldDomain" "', argument " "1"" of type '" "char const *""'");
33414 : }
33415 15 : arg1 = reinterpret_cast< char * >(buf1);
33416 15 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
33417 15 : if (!SWIG_IsOK(res2)) {
33418 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGlobFieldDomain" "', argument " "2"" of type '" "char const *""'");
33419 : }
33420 15 : arg2 = reinterpret_cast< char * >(buf2);
33421 15 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
33422 15 : if (!SWIG_IsOK(ecode3)) {
33423 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateGlobFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
33424 : }
33425 15 : arg3 = static_cast< OGRFieldType >(val3);
33426 15 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
33427 15 : if (!SWIG_IsOK(ecode4)) {
33428 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateGlobFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
33429 : }
33430 15 : arg4 = static_cast< OGRFieldSubType >(val4);
33431 15 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
33432 15 : if (!SWIG_IsOK(res5)) {
33433 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CreateGlobFieldDomain" "', argument " "5"" of type '" "char const *""'");
33434 : }
33435 15 : arg5 = reinterpret_cast< char * >(buf5);
33436 15 : {
33437 15 : if (!arg1) {
33438 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33439 : }
33440 : }
33441 15 : {
33442 15 : if (!arg5) {
33443 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33444 : }
33445 : }
33446 14 : {
33447 14 : const int bLocalUseExceptions = GetUseExceptions();
33448 14 : if ( bLocalUseExceptions ) {
33449 13 : pushErrorHandler();
33450 : }
33451 14 : {
33452 14 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33453 14 : result = (OGRFieldDomainShadow *)CreateGlobFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,(char const *)arg5);
33454 14 : SWIG_PYTHON_THREAD_END_ALLOW;
33455 : }
33456 14 : if ( bLocalUseExceptions ) {
33457 13 : popErrorHandler();
33458 : }
33459 : #ifndef SED_HACKS
33460 : if ( bLocalUseExceptions ) {
33461 : CPLErr eclass = CPLGetLastErrorType();
33462 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33463 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33464 : }
33465 : }
33466 : #endif
33467 : }
33468 14 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN | 0 );
33469 14 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
33470 14 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33471 14 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
33472 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33473 : return resultobj;
33474 1 : fail:
33475 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
33476 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33477 1 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
33478 : return NULL;
33479 : }
33480 :
33481 :
33482 19 : SWIGINTERN PyObject *_wrap_delete_GeomCoordinatePrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33483 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33484 19 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33485 19 : void *argp1 = 0 ;
33486 19 : int res1 = 0 ;
33487 19 : PyObject *swig_obj[1] ;
33488 :
33489 19 : if (!args) SWIG_fail;
33490 19 : swig_obj[0] = args;
33491 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, SWIG_POINTER_DISOWN | 0 );
33492 19 : if (!SWIG_IsOK(res1)) {
33493 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33494 : }
33495 19 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33496 19 : {
33497 19 : const int bLocalUseExceptions = GetUseExceptions();
33498 19 : if ( bLocalUseExceptions ) {
33499 14 : pushErrorHandler();
33500 : }
33501 19 : {
33502 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33503 19 : delete_OGRGeomCoordinatePrecisionShadow(arg1);
33504 19 : SWIG_PYTHON_THREAD_END_ALLOW;
33505 : }
33506 19 : if ( bLocalUseExceptions ) {
33507 14 : popErrorHandler();
33508 : }
33509 : #ifndef SED_HACKS
33510 : if ( bLocalUseExceptions ) {
33511 : CPLErr eclass = CPLGetLastErrorType();
33512 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33513 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33514 : }
33515 : }
33516 : #endif
33517 : }
33518 19 : resultobj = SWIG_Py_Void();
33519 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33520 : return resultobj;
33521 : fail:
33522 : return NULL;
33523 : }
33524 :
33525 :
33526 19 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_Set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33527 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33528 19 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33529 19 : double arg2 ;
33530 19 : double arg3 ;
33531 19 : double arg4 ;
33532 19 : void *argp1 = 0 ;
33533 19 : int res1 = 0 ;
33534 19 : double val2 ;
33535 19 : int ecode2 = 0 ;
33536 19 : double val3 ;
33537 19 : int ecode3 = 0 ;
33538 19 : double val4 ;
33539 19 : int ecode4 = 0 ;
33540 19 : PyObject *swig_obj[4] ;
33541 :
33542 19 : if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_Set", 4, 4, swig_obj)) SWIG_fail;
33543 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33544 19 : if (!SWIG_IsOK(res1)) {
33545 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_Set" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33546 : }
33547 19 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33548 19 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
33549 19 : if (!SWIG_IsOK(ecode2)) {
33550 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomCoordinatePrecision_Set" "', argument " "2"" of type '" "double""'");
33551 : }
33552 19 : arg2 = static_cast< double >(val2);
33553 19 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
33554 19 : if (!SWIG_IsOK(ecode3)) {
33555 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GeomCoordinatePrecision_Set" "', argument " "3"" of type '" "double""'");
33556 : }
33557 19 : arg3 = static_cast< double >(val3);
33558 19 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
33559 19 : if (!SWIG_IsOK(ecode4)) {
33560 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GeomCoordinatePrecision_Set" "', argument " "4"" of type '" "double""'");
33561 : }
33562 19 : arg4 = static_cast< double >(val4);
33563 19 : {
33564 19 : const int bLocalUseExceptions = GetUseExceptions();
33565 19 : if ( bLocalUseExceptions ) {
33566 14 : pushErrorHandler();
33567 : }
33568 19 : {
33569 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33570 19 : OGRGeomCoordinatePrecisionShadow_Set(arg1,arg2,arg3,arg4);
33571 19 : SWIG_PYTHON_THREAD_END_ALLOW;
33572 : }
33573 19 : if ( bLocalUseExceptions ) {
33574 14 : popErrorHandler();
33575 : }
33576 : #ifndef SED_HACKS
33577 : if ( bLocalUseExceptions ) {
33578 : CPLErr eclass = CPLGetLastErrorType();
33579 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33580 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33581 : }
33582 : }
33583 : #endif
33584 : }
33585 19 : resultobj = SWIG_Py_Void();
33586 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33587 : return resultobj;
33588 : fail:
33589 : return NULL;
33590 : }
33591 :
33592 :
33593 4 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_SetFromMeter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33594 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33595 4 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33596 4 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
33597 4 : double arg3 ;
33598 4 : double arg4 ;
33599 4 : double arg5 ;
33600 4 : void *argp1 = 0 ;
33601 4 : int res1 = 0 ;
33602 4 : void *argp2 = 0 ;
33603 4 : int res2 = 0 ;
33604 4 : double val3 ;
33605 4 : int ecode3 = 0 ;
33606 4 : double val4 ;
33607 4 : int ecode4 = 0 ;
33608 4 : double val5 ;
33609 4 : int ecode5 = 0 ;
33610 4 : PyObject *swig_obj[5] ;
33611 :
33612 4 : if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_SetFromMeter", 5, 5, swig_obj)) SWIG_fail;
33613 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33614 4 : if (!SWIG_IsOK(res1)) {
33615 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33616 : }
33617 4 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33618 4 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
33619 4 : if (!SWIG_IsOK(res2)) {
33620 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
33621 : }
33622 4 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
33623 4 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
33624 4 : if (!SWIG_IsOK(ecode3)) {
33625 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "3"" of type '" "double""'");
33626 : }
33627 4 : arg3 = static_cast< double >(val3);
33628 4 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
33629 4 : if (!SWIG_IsOK(ecode4)) {
33630 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "4"" of type '" "double""'");
33631 : }
33632 4 : arg4 = static_cast< double >(val4);
33633 4 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
33634 4 : if (!SWIG_IsOK(ecode5)) {
33635 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "5"" of type '" "double""'");
33636 : }
33637 4 : arg5 = static_cast< double >(val5);
33638 4 : {
33639 4 : if (!arg2) {
33640 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33641 : }
33642 : }
33643 3 : {
33644 3 : const int bLocalUseExceptions = GetUseExceptions();
33645 3 : if ( bLocalUseExceptions ) {
33646 3 : pushErrorHandler();
33647 : }
33648 3 : {
33649 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33650 3 : OGRGeomCoordinatePrecisionShadow_SetFromMeter(arg1,arg2,arg3,arg4,arg5);
33651 3 : SWIG_PYTHON_THREAD_END_ALLOW;
33652 : }
33653 3 : if ( bLocalUseExceptions ) {
33654 3 : popErrorHandler();
33655 : }
33656 : #ifndef SED_HACKS
33657 : if ( bLocalUseExceptions ) {
33658 : CPLErr eclass = CPLGetLastErrorType();
33659 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33660 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33661 : }
33662 : }
33663 : #endif
33664 : }
33665 3 : resultobj = SWIG_Py_Void();
33666 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33667 : return resultobj;
33668 : fail:
33669 : return NULL;
33670 : }
33671 :
33672 :
33673 45 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetXYResolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33674 45 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33675 45 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33676 45 : void *argp1 = 0 ;
33677 45 : int res1 = 0 ;
33678 45 : PyObject *swig_obj[1] ;
33679 45 : double result;
33680 :
33681 45 : if (!args) SWIG_fail;
33682 45 : swig_obj[0] = args;
33683 45 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33684 45 : if (!SWIG_IsOK(res1)) {
33685 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetXYResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33686 : }
33687 45 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33688 45 : {
33689 45 : const int bLocalUseExceptions = GetUseExceptions();
33690 45 : if ( bLocalUseExceptions ) {
33691 38 : pushErrorHandler();
33692 : }
33693 45 : {
33694 45 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33695 45 : result = (double)OGRGeomCoordinatePrecisionShadow_GetXYResolution(arg1);
33696 45 : SWIG_PYTHON_THREAD_END_ALLOW;
33697 : }
33698 45 : if ( bLocalUseExceptions ) {
33699 38 : popErrorHandler();
33700 : }
33701 : #ifndef SED_HACKS
33702 : if ( bLocalUseExceptions ) {
33703 : CPLErr eclass = CPLGetLastErrorType();
33704 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33705 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33706 : }
33707 : }
33708 : #endif
33709 : }
33710 45 : resultobj = SWIG_From_double(static_cast< double >(result));
33711 45 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33712 : return resultobj;
33713 : fail:
33714 : return NULL;
33715 : }
33716 :
33717 :
33718 42 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetZResolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33719 42 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33720 42 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33721 42 : void *argp1 = 0 ;
33722 42 : int res1 = 0 ;
33723 42 : PyObject *swig_obj[1] ;
33724 42 : double result;
33725 :
33726 42 : if (!args) SWIG_fail;
33727 42 : swig_obj[0] = args;
33728 42 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33729 42 : if (!SWIG_IsOK(res1)) {
33730 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetZResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33731 : }
33732 42 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33733 42 : {
33734 42 : const int bLocalUseExceptions = GetUseExceptions();
33735 42 : if ( bLocalUseExceptions ) {
33736 35 : pushErrorHandler();
33737 : }
33738 42 : {
33739 42 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33740 42 : result = (double)OGRGeomCoordinatePrecisionShadow_GetZResolution(arg1);
33741 42 : SWIG_PYTHON_THREAD_END_ALLOW;
33742 : }
33743 42 : if ( bLocalUseExceptions ) {
33744 35 : popErrorHandler();
33745 : }
33746 : #ifndef SED_HACKS
33747 : if ( bLocalUseExceptions ) {
33748 : CPLErr eclass = CPLGetLastErrorType();
33749 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33750 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33751 : }
33752 : }
33753 : #endif
33754 : }
33755 42 : resultobj = SWIG_From_double(static_cast< double >(result));
33756 42 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33757 : return resultobj;
33758 : fail:
33759 : return NULL;
33760 : }
33761 :
33762 :
33763 27 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetMResolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33764 27 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33765 27 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33766 27 : void *argp1 = 0 ;
33767 27 : int res1 = 0 ;
33768 27 : PyObject *swig_obj[1] ;
33769 27 : double result;
33770 :
33771 27 : if (!args) SWIG_fail;
33772 27 : swig_obj[0] = args;
33773 27 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33774 27 : if (!SWIG_IsOK(res1)) {
33775 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetMResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33776 : }
33777 27 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33778 27 : {
33779 27 : const int bLocalUseExceptions = GetUseExceptions();
33780 27 : if ( bLocalUseExceptions ) {
33781 22 : pushErrorHandler();
33782 : }
33783 27 : {
33784 27 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33785 27 : result = (double)OGRGeomCoordinatePrecisionShadow_GetMResolution(arg1);
33786 27 : SWIG_PYTHON_THREAD_END_ALLOW;
33787 : }
33788 27 : if ( bLocalUseExceptions ) {
33789 22 : popErrorHandler();
33790 : }
33791 : #ifndef SED_HACKS
33792 : if ( bLocalUseExceptions ) {
33793 : CPLErr eclass = CPLGetLastErrorType();
33794 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33795 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33796 : }
33797 : }
33798 : #endif
33799 : }
33800 27 : resultobj = SWIG_From_double(static_cast< double >(result));
33801 27 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33802 : return resultobj;
33803 : fail:
33804 : return NULL;
33805 : }
33806 :
33807 :
33808 4 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetFormats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33809 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33810 4 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33811 4 : void *argp1 = 0 ;
33812 4 : int res1 = 0 ;
33813 4 : PyObject *swig_obj[1] ;
33814 4 : char **result = 0 ;
33815 :
33816 4 : if (!args) SWIG_fail;
33817 4 : swig_obj[0] = args;
33818 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33819 4 : if (!SWIG_IsOK(res1)) {
33820 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetFormats" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33821 : }
33822 4 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33823 4 : {
33824 4 : const int bLocalUseExceptions = GetUseExceptions();
33825 4 : if ( bLocalUseExceptions ) {
33826 2 : pushErrorHandler();
33827 : }
33828 4 : {
33829 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33830 4 : result = (char **)OGRGeomCoordinatePrecisionShadow_GetFormats(arg1);
33831 4 : SWIG_PYTHON_THREAD_END_ALLOW;
33832 : }
33833 4 : if ( bLocalUseExceptions ) {
33834 2 : popErrorHandler();
33835 : }
33836 : #ifndef SED_HACKS
33837 : if ( bLocalUseExceptions ) {
33838 : CPLErr eclass = CPLGetLastErrorType();
33839 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33840 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33841 : }
33842 : }
33843 : #endif
33844 : }
33845 4 : {
33846 : /* %typemap(out) char **CSL -> ( string ) */
33847 4 : bool bErr = false;
33848 4 : resultobj = CSLToList(result, &bErr);
33849 4 : CSLDestroy(result);
33850 4 : if( bErr ) {
33851 0 : SWIG_fail;
33852 : }
33853 : }
33854 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33855 : return resultobj;
33856 : fail:
33857 : return NULL;
33858 : }
33859 :
33860 :
33861 6 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetFormatSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33862 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33863 6 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33864 6 : char *arg2 = (char *) 0 ;
33865 6 : void *argp1 = 0 ;
33866 6 : int res1 = 0 ;
33867 6 : int res2 ;
33868 6 : char *buf2 = 0 ;
33869 6 : int alloc2 = 0 ;
33870 6 : PyObject *swig_obj[2] ;
33871 6 : char **result = 0 ;
33872 :
33873 6 : if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_GetFormatSpecificOptions", 2, 2, swig_obj)) SWIG_fail;
33874 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33875 6 : if (!SWIG_IsOK(res1)) {
33876 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetFormatSpecificOptions" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33877 : }
33878 6 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33879 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
33880 6 : if (!SWIG_IsOK(res2)) {
33881 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_GetFormatSpecificOptions" "', argument " "2"" of type '" "char const *""'");
33882 : }
33883 6 : arg2 = reinterpret_cast< char * >(buf2);
33884 6 : {
33885 6 : if (!arg2) {
33886 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33887 : }
33888 : }
33889 5 : {
33890 5 : const int bLocalUseExceptions = GetUseExceptions();
33891 5 : if ( bLocalUseExceptions ) {
33892 2 : pushErrorHandler();
33893 : }
33894 5 : {
33895 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33896 5 : result = (char **)OGRGeomCoordinatePrecisionShadow_GetFormatSpecificOptions(arg1,(char const *)arg2);
33897 5 : SWIG_PYTHON_THREAD_END_ALLOW;
33898 : }
33899 5 : if ( bLocalUseExceptions ) {
33900 2 : popErrorHandler();
33901 : }
33902 : #ifndef SED_HACKS
33903 : if ( bLocalUseExceptions ) {
33904 : CPLErr eclass = CPLGetLastErrorType();
33905 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33906 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33907 : }
33908 : }
33909 : #endif
33910 : }
33911 5 : {
33912 : /* %typemap(out) char **dict */
33913 5 : resultobj = GetCSLStringAsPyDict(result, false);
33914 : }
33915 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33916 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
33917 : return resultobj;
33918 1 : fail:
33919 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33920 : return NULL;
33921 : }
33922 :
33923 :
33924 1 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_SetFormatSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33925 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33926 1 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33927 1 : char *arg2 = (char *) 0 ;
33928 1 : char **arg3 = (char **) 0 ;
33929 1 : void *argp1 = 0 ;
33930 1 : int res1 = 0 ;
33931 1 : int res2 ;
33932 1 : char *buf2 = 0 ;
33933 1 : int alloc2 = 0 ;
33934 1 : PyObject *swig_obj[3] ;
33935 :
33936 1 : if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_SetFormatSpecificOptions", 3, 3, swig_obj)) SWIG_fail;
33937 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33938 1 : if (!SWIG_IsOK(res1)) {
33939 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_SetFormatSpecificOptions" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33940 : }
33941 1 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33942 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
33943 1 : if (!SWIG_IsOK(res2)) {
33944 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_SetFormatSpecificOptions" "', argument " "2"" of type '" "char const *""'");
33945 : }
33946 1 : arg2 = reinterpret_cast< char * >(buf2);
33947 1 : {
33948 : /* %typemap(in) char **dict */
33949 1 : arg3 = NULL;
33950 1 : if ( PySequence_Check( swig_obj[2] ) ) {
33951 0 : int bErr = FALSE;
33952 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
33953 0 : if ( bErr )
33954 : {
33955 0 : SWIG_fail;
33956 : }
33957 : }
33958 1 : else if ( PyMapping_Check( swig_obj[2] ) ) {
33959 1 : int bErr = FALSE;
33960 1 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
33961 1 : if ( bErr )
33962 : {
33963 0 : SWIG_fail;
33964 : }
33965 : }
33966 : else {
33967 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
33968 0 : SWIG_fail;
33969 : }
33970 : }
33971 1 : {
33972 1 : if (!arg2) {
33973 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33974 : }
33975 : }
33976 1 : {
33977 1 : const int bLocalUseExceptions = GetUseExceptions();
33978 1 : if ( bLocalUseExceptions ) {
33979 1 : pushErrorHandler();
33980 : }
33981 1 : {
33982 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33983 1 : OGRGeomCoordinatePrecisionShadow_SetFormatSpecificOptions(arg1,(char const *)arg2,arg3);
33984 1 : SWIG_PYTHON_THREAD_END_ALLOW;
33985 : }
33986 1 : if ( bLocalUseExceptions ) {
33987 1 : popErrorHandler();
33988 : }
33989 : #ifndef SED_HACKS
33990 : if ( bLocalUseExceptions ) {
33991 : CPLErr eclass = CPLGetLastErrorType();
33992 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33993 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33994 : }
33995 : }
33996 : #endif
33997 : }
33998 1 : resultobj = SWIG_Py_Void();
33999 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
34000 1 : {
34001 : /* %typemap(freearg) char **dict */
34002 1 : CSLDestroy( arg3 );
34003 : }
34004 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34005 : return resultobj;
34006 0 : fail:
34007 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
34008 0 : {
34009 : /* %typemap(freearg) char **dict */
34010 0 : CSLDestroy( arg3 );
34011 : }
34012 : return NULL;
34013 : }
34014 :
34015 :
34016 277 : SWIGINTERN PyObject *GeomCoordinatePrecision_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34017 277 : PyObject *obj;
34018 277 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
34019 277 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, SWIG_NewClientData(obj));
34020 277 : return SWIG_Py_Void();
34021 : }
34022 :
34023 19 : SWIGINTERN PyObject *_wrap_CreateGeomCoordinatePrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34024 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34025 19 : OGRGeomCoordinatePrecisionShadow *result = 0 ;
34026 :
34027 19 : if (!SWIG_Python_UnpackTuple(args, "CreateGeomCoordinatePrecision", 0, 0, 0)) SWIG_fail;
34028 19 : {
34029 19 : const int bLocalUseExceptions = GetUseExceptions();
34030 19 : if ( bLocalUseExceptions ) {
34031 14 : pushErrorHandler();
34032 : }
34033 19 : {
34034 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34035 19 : result = (OGRGeomCoordinatePrecisionShadow *)CreateGeomCoordinatePrecision();
34036 19 : SWIG_PYTHON_THREAD_END_ALLOW;
34037 : }
34038 19 : if ( bLocalUseExceptions ) {
34039 14 : popErrorHandler();
34040 : }
34041 : #ifndef SED_HACKS
34042 : if ( bLocalUseExceptions ) {
34043 : CPLErr eclass = CPLGetLastErrorType();
34044 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34045 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34046 : }
34047 : }
34048 : #endif
34049 : }
34050 19 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, SWIG_POINTER_OWN | 0 );
34051 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34052 : return resultobj;
34053 0 : fail:
34054 0 : return NULL;
34055 : }
34056 :
34057 :
34058 0 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34059 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34060 0 : int result;
34061 :
34062 0 : if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
34063 0 : {
34064 0 : const int bLocalUseExceptions = GetUseExceptions();
34065 0 : if ( bLocalUseExceptions ) {
34066 0 : pushErrorHandler();
34067 : }
34068 0 : {
34069 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34070 0 : result = (int)OGRGetDriverCount();
34071 0 : SWIG_PYTHON_THREAD_END_ALLOW;
34072 : }
34073 0 : if ( bLocalUseExceptions ) {
34074 0 : popErrorHandler();
34075 : }
34076 : #ifndef SED_HACKS
34077 : if ( bLocalUseExceptions ) {
34078 : CPLErr eclass = CPLGetLastErrorType();
34079 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34080 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34081 : }
34082 : }
34083 : #endif
34084 : }
34085 0 : resultobj = SWIG_From_int(static_cast< int >(result));
34086 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34087 : return resultobj;
34088 0 : fail:
34089 0 : return NULL;
34090 : }
34091 :
34092 :
34093 0 : SWIGINTERN PyObject *_wrap_GetOpenDSCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34094 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34095 0 : int result;
34096 :
34097 0 : if (!SWIG_Python_UnpackTuple(args, "GetOpenDSCount", 0, 0, 0)) SWIG_fail;
34098 0 : {
34099 0 : const int bLocalUseExceptions = GetUseExceptions();
34100 0 : if ( bLocalUseExceptions ) {
34101 0 : pushErrorHandler();
34102 : }
34103 0 : {
34104 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34105 0 : result = (int)OGRGetOpenDSCount();
34106 0 : SWIG_PYTHON_THREAD_END_ALLOW;
34107 : }
34108 0 : if ( bLocalUseExceptions ) {
34109 0 : popErrorHandler();
34110 : }
34111 : #ifndef SED_HACKS
34112 : if ( bLocalUseExceptions ) {
34113 : CPLErr eclass = CPLGetLastErrorType();
34114 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34115 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34116 : }
34117 : }
34118 : #endif
34119 : }
34120 0 : resultobj = SWIG_From_int(static_cast< int >(result));
34121 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34122 : return resultobj;
34123 0 : fail:
34124 0 : return NULL;
34125 : }
34126 :
34127 :
34128 4 : SWIGINTERN PyObject *_wrap_SetGenerate_DB2_V72_BYTE_ORDER(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34129 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34130 4 : int arg1 ;
34131 4 : int val1 ;
34132 4 : int ecode1 = 0 ;
34133 4 : PyObject *swig_obj[1] ;
34134 4 : OGRErr result;
34135 :
34136 4 : if (!args) SWIG_fail;
34137 4 : swig_obj[0] = args;
34138 4 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34139 4 : if (!SWIG_IsOK(ecode1)) {
34140 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetGenerate_DB2_V72_BYTE_ORDER" "', argument " "1"" of type '" "int""'");
34141 : }
34142 4 : arg1 = static_cast< int >(val1);
34143 4 : {
34144 4 : const int bLocalUseExceptions = GetUseExceptions();
34145 4 : if ( bLocalUseExceptions ) {
34146 4 : pushErrorHandler();
34147 : }
34148 4 : {
34149 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34150 4 : result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
34151 4 : SWIG_PYTHON_THREAD_END_ALLOW;
34152 : }
34153 4 : if ( bLocalUseExceptions ) {
34154 4 : popErrorHandler();
34155 : }
34156 : #ifndef SED_HACKS
34157 : if ( bLocalUseExceptions ) {
34158 : CPLErr eclass = CPLGetLastErrorType();
34159 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34160 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34161 : }
34162 : }
34163 : #endif
34164 : }
34165 4 : {
34166 : /* %typemap(out) OGRErr */
34167 4 : if ( result != 0 && GetUseExceptions()) {
34168 0 : const char* pszMessage = CPLGetLastErrorMsg();
34169 0 : if( pszMessage[0] != '\0' )
34170 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
34171 : else
34172 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
34173 0 : SWIG_fail;
34174 : }
34175 : }
34176 4 : {
34177 : /* %typemap(ret) OGRErr */
34178 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
34179 4 : resultobj = PyInt_FromLong( result );
34180 : }
34181 : }
34182 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34183 : return resultobj;
34184 : fail:
34185 : return NULL;
34186 : }
34187 :
34188 :
34189 3 : SWIGINTERN PyObject *_wrap_RegisterAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34190 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34191 :
34192 3 : if (!SWIG_Python_UnpackTuple(args, "RegisterAll", 0, 0, 0)) SWIG_fail;
34193 3 : {
34194 3 : const int bLocalUseExceptions = GetUseExceptions();
34195 3 : if ( bLocalUseExceptions ) {
34196 3 : pushErrorHandler();
34197 : }
34198 3 : {
34199 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34200 3 : OGRRegisterAll();
34201 3 : SWIG_PYTHON_THREAD_END_ALLOW;
34202 : }
34203 3 : if ( bLocalUseExceptions ) {
34204 3 : popErrorHandler();
34205 : }
34206 : #ifndef SED_HACKS
34207 : if ( bLocalUseExceptions ) {
34208 : CPLErr eclass = CPLGetLastErrorType();
34209 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34210 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34211 : }
34212 : }
34213 : #endif
34214 : }
34215 3 : resultobj = SWIG_Py_Void();
34216 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34217 : return resultobj;
34218 0 : fail:
34219 0 : return NULL;
34220 : }
34221 :
34222 :
34223 71 : SWIGINTERN PyObject *_wrap_GeometryTypeToName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34224 71 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34225 71 : OGRwkbGeometryType arg1 ;
34226 71 : int val1 ;
34227 71 : int ecode1 = 0 ;
34228 71 : PyObject *swig_obj[1] ;
34229 71 : char *result = 0 ;
34230 :
34231 71 : if (!args) SWIG_fail;
34232 71 : swig_obj[0] = args;
34233 71 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34234 71 : if (!SWIG_IsOK(ecode1)) {
34235 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GeometryTypeToName" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34236 : }
34237 71 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34238 71 : {
34239 71 : const int bLocalUseExceptions = GetUseExceptions();
34240 71 : if ( bLocalUseExceptions ) {
34241 46 : pushErrorHandler();
34242 : }
34243 71 : {
34244 71 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34245 71 : result = (char *)OGRGeometryTypeToName(arg1);
34246 71 : SWIG_PYTHON_THREAD_END_ALLOW;
34247 : }
34248 71 : if ( bLocalUseExceptions ) {
34249 46 : popErrorHandler();
34250 : }
34251 : #ifndef SED_HACKS
34252 : if ( bLocalUseExceptions ) {
34253 : CPLErr eclass = CPLGetLastErrorType();
34254 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34255 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34256 : }
34257 : }
34258 : #endif
34259 : }
34260 71 : resultobj = SWIG_FromCharPtr((const char *)result);
34261 71 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34262 : return resultobj;
34263 : fail:
34264 : return NULL;
34265 : }
34266 :
34267 :
34268 1649 : SWIGINTERN PyObject *_wrap_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34269 1649 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34270 1649 : OGRFieldType arg1 ;
34271 1649 : int val1 ;
34272 1649 : int ecode1 = 0 ;
34273 1649 : PyObject *swig_obj[1] ;
34274 1649 : char *result = 0 ;
34275 :
34276 1649 : if (!args) SWIG_fail;
34277 1649 : swig_obj[0] = args;
34278 1649 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34279 1649 : if (!SWIG_IsOK(ecode1)) {
34280 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldType""'");
34281 : }
34282 1649 : arg1 = static_cast< OGRFieldType >(val1);
34283 1649 : {
34284 1649 : const int bLocalUseExceptions = GetUseExceptions();
34285 1649 : if ( bLocalUseExceptions ) {
34286 1477 : pushErrorHandler();
34287 : }
34288 1649 : {
34289 1649 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34290 1649 : result = (char *)OGR_GetFieldTypeName(arg1);
34291 1649 : SWIG_PYTHON_THREAD_END_ALLOW;
34292 : }
34293 1649 : if ( bLocalUseExceptions ) {
34294 1477 : popErrorHandler();
34295 : }
34296 : #ifndef SED_HACKS
34297 : if ( bLocalUseExceptions ) {
34298 : CPLErr eclass = CPLGetLastErrorType();
34299 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34300 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34301 : }
34302 : }
34303 : #endif
34304 : }
34305 1649 : resultobj = SWIG_FromCharPtr((const char *)result);
34306 1649 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34307 : return resultobj;
34308 : fail:
34309 : return NULL;
34310 : }
34311 :
34312 :
34313 1480 : SWIGINTERN PyObject *_wrap_GetFieldSubTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34314 1480 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34315 1480 : OGRFieldSubType arg1 ;
34316 1480 : int val1 ;
34317 1480 : int ecode1 = 0 ;
34318 1480 : PyObject *swig_obj[1] ;
34319 1480 : char *result = 0 ;
34320 :
34321 1480 : if (!args) SWIG_fail;
34322 1480 : swig_obj[0] = args;
34323 1480 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34324 1480 : if (!SWIG_IsOK(ecode1)) {
34325 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldSubTypeName" "', argument " "1"" of type '" "OGRFieldSubType""'");
34326 : }
34327 1480 : arg1 = static_cast< OGRFieldSubType >(val1);
34328 1480 : {
34329 1480 : const int bLocalUseExceptions = GetUseExceptions();
34330 1480 : if ( bLocalUseExceptions ) {
34331 1480 : pushErrorHandler();
34332 : }
34333 1480 : {
34334 1480 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34335 1480 : result = (char *)OGR_GetFieldSubTypeName(arg1);
34336 1480 : SWIG_PYTHON_THREAD_END_ALLOW;
34337 : }
34338 1480 : if ( bLocalUseExceptions ) {
34339 1480 : popErrorHandler();
34340 : }
34341 : #ifndef SED_HACKS
34342 : if ( bLocalUseExceptions ) {
34343 : CPLErr eclass = CPLGetLastErrorType();
34344 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34345 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34346 : }
34347 : }
34348 : #endif
34349 : }
34350 1480 : resultobj = SWIG_FromCharPtr((const char *)result);
34351 1480 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34352 : return resultobj;
34353 : fail:
34354 : return NULL;
34355 : }
34356 :
34357 :
34358 2112 : SWIGINTERN PyObject *_wrap_GT_Flatten(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34359 2112 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34360 2112 : OGRwkbGeometryType arg1 ;
34361 2112 : int val1 ;
34362 2112 : int ecode1 = 0 ;
34363 2112 : PyObject *swig_obj[1] ;
34364 2112 : OGRwkbGeometryType result;
34365 :
34366 2112 : if (!args) SWIG_fail;
34367 2112 : swig_obj[0] = args;
34368 2112 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34369 2112 : if (!SWIG_IsOK(ecode1)) {
34370 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_Flatten" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34371 : }
34372 2112 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34373 2112 : {
34374 2112 : const int bLocalUseExceptions = GetUseExceptions();
34375 2112 : if ( bLocalUseExceptions ) {
34376 119 : pushErrorHandler();
34377 : }
34378 2112 : {
34379 2112 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34380 2112 : result = (OGRwkbGeometryType)OGR_GT_Flatten(arg1);
34381 2112 : SWIG_PYTHON_THREAD_END_ALLOW;
34382 : }
34383 2112 : if ( bLocalUseExceptions ) {
34384 119 : popErrorHandler();
34385 : }
34386 : #ifndef SED_HACKS
34387 : if ( bLocalUseExceptions ) {
34388 : CPLErr eclass = CPLGetLastErrorType();
34389 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34390 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34391 : }
34392 : }
34393 : #endif
34394 : }
34395 2112 : resultobj = SWIG_From_int(static_cast< int >(result));
34396 2112 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34397 : return resultobj;
34398 : fail:
34399 : return NULL;
34400 : }
34401 :
34402 :
34403 36 : SWIGINTERN PyObject *_wrap_GT_SetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34404 36 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34405 36 : OGRwkbGeometryType arg1 ;
34406 36 : int val1 ;
34407 36 : int ecode1 = 0 ;
34408 36 : PyObject *swig_obj[1] ;
34409 36 : OGRwkbGeometryType result;
34410 :
34411 36 : if (!args) SWIG_fail;
34412 36 : swig_obj[0] = args;
34413 36 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34414 36 : if (!SWIG_IsOK(ecode1)) {
34415 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetZ" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34416 : }
34417 36 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34418 36 : {
34419 36 : const int bLocalUseExceptions = GetUseExceptions();
34420 36 : if ( bLocalUseExceptions ) {
34421 0 : pushErrorHandler();
34422 : }
34423 36 : {
34424 36 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34425 36 : result = (OGRwkbGeometryType)OGR_GT_SetZ(arg1);
34426 36 : SWIG_PYTHON_THREAD_END_ALLOW;
34427 : }
34428 36 : if ( bLocalUseExceptions ) {
34429 0 : popErrorHandler();
34430 : }
34431 : #ifndef SED_HACKS
34432 : if ( bLocalUseExceptions ) {
34433 : CPLErr eclass = CPLGetLastErrorType();
34434 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34435 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34436 : }
34437 : }
34438 : #endif
34439 : }
34440 36 : resultobj = SWIG_From_int(static_cast< int >(result));
34441 36 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34442 : return resultobj;
34443 : fail:
34444 : return NULL;
34445 : }
34446 :
34447 :
34448 36 : SWIGINTERN PyObject *_wrap_GT_SetM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34449 36 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34450 36 : OGRwkbGeometryType arg1 ;
34451 36 : int val1 ;
34452 36 : int ecode1 = 0 ;
34453 36 : PyObject *swig_obj[1] ;
34454 36 : OGRwkbGeometryType result;
34455 :
34456 36 : if (!args) SWIG_fail;
34457 36 : swig_obj[0] = args;
34458 36 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34459 36 : if (!SWIG_IsOK(ecode1)) {
34460 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetM" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34461 : }
34462 36 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34463 36 : {
34464 36 : const int bLocalUseExceptions = GetUseExceptions();
34465 36 : if ( bLocalUseExceptions ) {
34466 0 : pushErrorHandler();
34467 : }
34468 36 : {
34469 36 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34470 36 : result = (OGRwkbGeometryType)OGR_GT_SetM(arg1);
34471 36 : SWIG_PYTHON_THREAD_END_ALLOW;
34472 : }
34473 36 : if ( bLocalUseExceptions ) {
34474 0 : popErrorHandler();
34475 : }
34476 : #ifndef SED_HACKS
34477 : if ( bLocalUseExceptions ) {
34478 : CPLErr eclass = CPLGetLastErrorType();
34479 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34480 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34481 : }
34482 : }
34483 : #endif
34484 : }
34485 36 : resultobj = SWIG_From_int(static_cast< int >(result));
34486 36 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34487 : return resultobj;
34488 : fail:
34489 : return NULL;
34490 : }
34491 :
34492 :
34493 18 : SWIGINTERN PyObject *_wrap_GT_SetModifier(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34494 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34495 18 : OGRwkbGeometryType arg1 ;
34496 18 : int arg2 ;
34497 18 : int arg3 = (int) FALSE ;
34498 18 : int val1 ;
34499 18 : int ecode1 = 0 ;
34500 18 : int val2 ;
34501 18 : int ecode2 = 0 ;
34502 18 : int val3 ;
34503 18 : int ecode3 = 0 ;
34504 18 : PyObject *swig_obj[3] ;
34505 18 : OGRwkbGeometryType result;
34506 :
34507 18 : if (!SWIG_Python_UnpackTuple(args, "GT_SetModifier", 2, 3, swig_obj)) SWIG_fail;
34508 18 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34509 18 : if (!SWIG_IsOK(ecode1)) {
34510 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetModifier" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34511 : }
34512 18 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34513 18 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
34514 18 : if (!SWIG_IsOK(ecode2)) {
34515 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GT_SetModifier" "', argument " "2"" of type '" "int""'");
34516 : }
34517 18 : arg2 = static_cast< int >(val2);
34518 18 : if (swig_obj[2]) {
34519 18 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
34520 18 : if (!SWIG_IsOK(ecode3)) {
34521 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GT_SetModifier" "', argument " "3"" of type '" "int""'");
34522 : }
34523 : arg3 = static_cast< int >(val3);
34524 : }
34525 18 : {
34526 18 : const int bLocalUseExceptions = GetUseExceptions();
34527 18 : if ( bLocalUseExceptions ) {
34528 0 : pushErrorHandler();
34529 : }
34530 18 : {
34531 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34532 18 : result = (OGRwkbGeometryType)GT_SetModifier(arg1,arg2,arg3);
34533 18 : SWIG_PYTHON_THREAD_END_ALLOW;
34534 : }
34535 18 : if ( bLocalUseExceptions ) {
34536 0 : popErrorHandler();
34537 : }
34538 : #ifndef SED_HACKS
34539 : if ( bLocalUseExceptions ) {
34540 : CPLErr eclass = CPLGetLastErrorType();
34541 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34542 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34543 : }
34544 : }
34545 : #endif
34546 : }
34547 18 : resultobj = SWIG_From_int(static_cast< int >(result));
34548 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34549 : return resultobj;
34550 : fail:
34551 : return NULL;
34552 : }
34553 :
34554 :
34555 18 : SWIGINTERN PyObject *_wrap_GT_HasZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34556 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34557 18 : OGRwkbGeometryType arg1 ;
34558 18 : int val1 ;
34559 18 : int ecode1 = 0 ;
34560 18 : PyObject *swig_obj[1] ;
34561 18 : int result;
34562 :
34563 18 : if (!args) SWIG_fail;
34564 18 : swig_obj[0] = args;
34565 18 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34566 18 : if (!SWIG_IsOK(ecode1)) {
34567 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_HasZ" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34568 : }
34569 18 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34570 18 : {
34571 18 : const int bLocalUseExceptions = GetUseExceptions();
34572 18 : if ( bLocalUseExceptions ) {
34573 0 : pushErrorHandler();
34574 : }
34575 18 : {
34576 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34577 18 : result = (int)OGR_GT_HasZ(arg1);
34578 18 : SWIG_PYTHON_THREAD_END_ALLOW;
34579 : }
34580 18 : if ( bLocalUseExceptions ) {
34581 0 : popErrorHandler();
34582 : }
34583 : #ifndef SED_HACKS
34584 : if ( bLocalUseExceptions ) {
34585 : CPLErr eclass = CPLGetLastErrorType();
34586 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34587 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34588 : }
34589 : }
34590 : #endif
34591 : }
34592 18 : resultobj = SWIG_From_int(static_cast< int >(result));
34593 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34594 : return resultobj;
34595 : fail:
34596 : return NULL;
34597 : }
34598 :
34599 :
34600 18 : SWIGINTERN PyObject *_wrap_GT_HasM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34601 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34602 18 : OGRwkbGeometryType arg1 ;
34603 18 : int val1 ;
34604 18 : int ecode1 = 0 ;
34605 18 : PyObject *swig_obj[1] ;
34606 18 : int result;
34607 :
34608 18 : if (!args) SWIG_fail;
34609 18 : swig_obj[0] = args;
34610 18 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34611 18 : if (!SWIG_IsOK(ecode1)) {
34612 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_HasM" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34613 : }
34614 18 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34615 18 : {
34616 18 : const int bLocalUseExceptions = GetUseExceptions();
34617 18 : if ( bLocalUseExceptions ) {
34618 0 : pushErrorHandler();
34619 : }
34620 18 : {
34621 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34622 18 : result = (int)OGR_GT_HasM(arg1);
34623 18 : SWIG_PYTHON_THREAD_END_ALLOW;
34624 : }
34625 18 : if ( bLocalUseExceptions ) {
34626 0 : popErrorHandler();
34627 : }
34628 : #ifndef SED_HACKS
34629 : if ( bLocalUseExceptions ) {
34630 : CPLErr eclass = CPLGetLastErrorType();
34631 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34632 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34633 : }
34634 : }
34635 : #endif
34636 : }
34637 18 : resultobj = SWIG_From_int(static_cast< int >(result));
34638 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34639 : return resultobj;
34640 : fail:
34641 : return NULL;
34642 : }
34643 :
34644 :
34645 14 : SWIGINTERN PyObject *_wrap_GT_IsSubClassOf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34646 14 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34647 14 : OGRwkbGeometryType arg1 ;
34648 14 : OGRwkbGeometryType arg2 ;
34649 14 : int val1 ;
34650 14 : int ecode1 = 0 ;
34651 14 : int val2 ;
34652 14 : int ecode2 = 0 ;
34653 14 : PyObject *swig_obj[2] ;
34654 14 : int result;
34655 :
34656 14 : if (!SWIG_Python_UnpackTuple(args, "GT_IsSubClassOf", 2, 2, swig_obj)) SWIG_fail;
34657 14 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34658 14 : if (!SWIG_IsOK(ecode1)) {
34659 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsSubClassOf" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34660 : }
34661 14 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34662 14 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
34663 14 : if (!SWIG_IsOK(ecode2)) {
34664 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GT_IsSubClassOf" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
34665 : }
34666 14 : arg2 = static_cast< OGRwkbGeometryType >(val2);
34667 14 : {
34668 14 : const int bLocalUseExceptions = GetUseExceptions();
34669 14 : if ( bLocalUseExceptions ) {
34670 0 : pushErrorHandler();
34671 : }
34672 14 : {
34673 14 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34674 14 : result = (int)OGR_GT_IsSubClassOf(arg1,arg2);
34675 14 : SWIG_PYTHON_THREAD_END_ALLOW;
34676 : }
34677 14 : if ( bLocalUseExceptions ) {
34678 0 : popErrorHandler();
34679 : }
34680 : #ifndef SED_HACKS
34681 : if ( bLocalUseExceptions ) {
34682 : CPLErr eclass = CPLGetLastErrorType();
34683 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34684 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34685 : }
34686 : }
34687 : #endif
34688 : }
34689 14 : resultobj = SWIG_From_int(static_cast< int >(result));
34690 14 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34691 : return resultobj;
34692 : fail:
34693 : return NULL;
34694 : }
34695 :
34696 :
34697 15 : SWIGINTERN PyObject *_wrap_GT_IsCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34698 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34699 15 : OGRwkbGeometryType arg1 ;
34700 15 : int val1 ;
34701 15 : int ecode1 = 0 ;
34702 15 : PyObject *swig_obj[1] ;
34703 15 : int result;
34704 :
34705 15 : if (!args) SWIG_fail;
34706 15 : swig_obj[0] = args;
34707 15 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34708 15 : if (!SWIG_IsOK(ecode1)) {
34709 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsCurve" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34710 : }
34711 15 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34712 15 : {
34713 15 : const int bLocalUseExceptions = GetUseExceptions();
34714 15 : if ( bLocalUseExceptions ) {
34715 0 : pushErrorHandler();
34716 : }
34717 15 : {
34718 15 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34719 15 : result = (int)OGR_GT_IsCurve(arg1);
34720 15 : SWIG_PYTHON_THREAD_END_ALLOW;
34721 : }
34722 15 : if ( bLocalUseExceptions ) {
34723 0 : popErrorHandler();
34724 : }
34725 : #ifndef SED_HACKS
34726 : if ( bLocalUseExceptions ) {
34727 : CPLErr eclass = CPLGetLastErrorType();
34728 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34729 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34730 : }
34731 : }
34732 : #endif
34733 : }
34734 15 : resultobj = SWIG_From_int(static_cast< int >(result));
34735 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34736 : return resultobj;
34737 : fail:
34738 : return NULL;
34739 : }
34740 :
34741 :
34742 13 : SWIGINTERN PyObject *_wrap_GT_IsSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34743 13 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34744 13 : OGRwkbGeometryType arg1 ;
34745 13 : int val1 ;
34746 13 : int ecode1 = 0 ;
34747 13 : PyObject *swig_obj[1] ;
34748 13 : int result;
34749 :
34750 13 : if (!args) SWIG_fail;
34751 13 : swig_obj[0] = args;
34752 13 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34753 13 : if (!SWIG_IsOK(ecode1)) {
34754 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsSurface" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34755 : }
34756 13 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34757 13 : {
34758 13 : const int bLocalUseExceptions = GetUseExceptions();
34759 13 : if ( bLocalUseExceptions ) {
34760 0 : pushErrorHandler();
34761 : }
34762 13 : {
34763 13 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34764 13 : result = (int)OGR_GT_IsSurface(arg1);
34765 13 : SWIG_PYTHON_THREAD_END_ALLOW;
34766 : }
34767 13 : if ( bLocalUseExceptions ) {
34768 0 : popErrorHandler();
34769 : }
34770 : #ifndef SED_HACKS
34771 : if ( bLocalUseExceptions ) {
34772 : CPLErr eclass = CPLGetLastErrorType();
34773 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34774 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34775 : }
34776 : }
34777 : #endif
34778 : }
34779 13 : resultobj = SWIG_From_int(static_cast< int >(result));
34780 13 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34781 : return resultobj;
34782 : fail:
34783 : return NULL;
34784 : }
34785 :
34786 :
34787 15 : SWIGINTERN PyObject *_wrap_GT_IsNonLinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34788 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34789 15 : OGRwkbGeometryType arg1 ;
34790 15 : int val1 ;
34791 15 : int ecode1 = 0 ;
34792 15 : PyObject *swig_obj[1] ;
34793 15 : int result;
34794 :
34795 15 : if (!args) SWIG_fail;
34796 15 : swig_obj[0] = args;
34797 15 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34798 15 : if (!SWIG_IsOK(ecode1)) {
34799 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsNonLinear" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34800 : }
34801 15 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34802 15 : {
34803 15 : const int bLocalUseExceptions = GetUseExceptions();
34804 15 : if ( bLocalUseExceptions ) {
34805 0 : pushErrorHandler();
34806 : }
34807 15 : {
34808 15 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34809 15 : result = (int)OGR_GT_IsNonLinear(arg1);
34810 15 : SWIG_PYTHON_THREAD_END_ALLOW;
34811 : }
34812 15 : if ( bLocalUseExceptions ) {
34813 0 : popErrorHandler();
34814 : }
34815 : #ifndef SED_HACKS
34816 : if ( bLocalUseExceptions ) {
34817 : CPLErr eclass = CPLGetLastErrorType();
34818 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34819 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34820 : }
34821 : }
34822 : #endif
34823 : }
34824 15 : resultobj = SWIG_From_int(static_cast< int >(result));
34825 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34826 : return resultobj;
34827 : fail:
34828 : return NULL;
34829 : }
34830 :
34831 :
34832 10 : SWIGINTERN PyObject *_wrap_GT_GetCollection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34833 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34834 10 : OGRwkbGeometryType arg1 ;
34835 10 : int val1 ;
34836 10 : int ecode1 = 0 ;
34837 10 : PyObject *swig_obj[1] ;
34838 10 : OGRwkbGeometryType result;
34839 :
34840 10 : if (!args) SWIG_fail;
34841 10 : swig_obj[0] = args;
34842 10 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34843 10 : if (!SWIG_IsOK(ecode1)) {
34844 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetCollection" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34845 : }
34846 10 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34847 10 : {
34848 10 : const int bLocalUseExceptions = GetUseExceptions();
34849 10 : if ( bLocalUseExceptions ) {
34850 0 : pushErrorHandler();
34851 : }
34852 10 : {
34853 10 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34854 10 : result = (OGRwkbGeometryType)OGR_GT_GetCollection(arg1);
34855 10 : SWIG_PYTHON_THREAD_END_ALLOW;
34856 : }
34857 10 : if ( bLocalUseExceptions ) {
34858 0 : popErrorHandler();
34859 : }
34860 : #ifndef SED_HACKS
34861 : if ( bLocalUseExceptions ) {
34862 : CPLErr eclass = CPLGetLastErrorType();
34863 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34864 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34865 : }
34866 : }
34867 : #endif
34868 : }
34869 10 : resultobj = SWIG_From_int(static_cast< int >(result));
34870 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34871 : return resultobj;
34872 : fail:
34873 : return NULL;
34874 : }
34875 :
34876 :
34877 12 : SWIGINTERN PyObject *_wrap_GT_GetSingle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34878 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34879 12 : OGRwkbGeometryType arg1 ;
34880 12 : int val1 ;
34881 12 : int ecode1 = 0 ;
34882 12 : PyObject *swig_obj[1] ;
34883 12 : OGRwkbGeometryType result;
34884 :
34885 12 : if (!args) SWIG_fail;
34886 12 : swig_obj[0] = args;
34887 12 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34888 12 : if (!SWIG_IsOK(ecode1)) {
34889 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetSingle" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34890 : }
34891 12 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34892 12 : {
34893 12 : const int bLocalUseExceptions = GetUseExceptions();
34894 12 : if ( bLocalUseExceptions ) {
34895 0 : pushErrorHandler();
34896 : }
34897 12 : {
34898 12 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34899 12 : result = (OGRwkbGeometryType)OGR_GT_GetSingle(arg1);
34900 12 : SWIG_PYTHON_THREAD_END_ALLOW;
34901 : }
34902 12 : if ( bLocalUseExceptions ) {
34903 0 : popErrorHandler();
34904 : }
34905 : #ifndef SED_HACKS
34906 : if ( bLocalUseExceptions ) {
34907 : CPLErr eclass = CPLGetLastErrorType();
34908 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34909 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34910 : }
34911 : }
34912 : #endif
34913 : }
34914 12 : resultobj = SWIG_From_int(static_cast< int >(result));
34915 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34916 : return resultobj;
34917 : fail:
34918 : return NULL;
34919 : }
34920 :
34921 :
34922 16 : SWIGINTERN PyObject *_wrap_GT_GetCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34923 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34924 16 : OGRwkbGeometryType arg1 ;
34925 16 : int val1 ;
34926 16 : int ecode1 = 0 ;
34927 16 : PyObject *swig_obj[1] ;
34928 16 : OGRwkbGeometryType result;
34929 :
34930 16 : if (!args) SWIG_fail;
34931 16 : swig_obj[0] = args;
34932 16 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34933 16 : if (!SWIG_IsOK(ecode1)) {
34934 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetCurve" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34935 : }
34936 16 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34937 16 : {
34938 16 : const int bLocalUseExceptions = GetUseExceptions();
34939 16 : if ( bLocalUseExceptions ) {
34940 0 : pushErrorHandler();
34941 : }
34942 16 : {
34943 16 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34944 16 : result = (OGRwkbGeometryType)OGR_GT_GetCurve(arg1);
34945 16 : SWIG_PYTHON_THREAD_END_ALLOW;
34946 : }
34947 16 : if ( bLocalUseExceptions ) {
34948 0 : popErrorHandler();
34949 : }
34950 : #ifndef SED_HACKS
34951 : if ( bLocalUseExceptions ) {
34952 : CPLErr eclass = CPLGetLastErrorType();
34953 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34954 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34955 : }
34956 : }
34957 : #endif
34958 : }
34959 16 : resultobj = SWIG_From_int(static_cast< int >(result));
34960 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
34961 : return resultobj;
34962 : fail:
34963 : return NULL;
34964 : }
34965 :
34966 :
34967 16 : SWIGINTERN PyObject *_wrap_GT_GetLinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34968 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34969 16 : OGRwkbGeometryType arg1 ;
34970 16 : int val1 ;
34971 16 : int ecode1 = 0 ;
34972 16 : PyObject *swig_obj[1] ;
34973 16 : OGRwkbGeometryType result;
34974 :
34975 16 : if (!args) SWIG_fail;
34976 16 : swig_obj[0] = args;
34977 16 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34978 16 : if (!SWIG_IsOK(ecode1)) {
34979 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetLinear" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34980 : }
34981 16 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34982 16 : {
34983 16 : const int bLocalUseExceptions = GetUseExceptions();
34984 16 : if ( bLocalUseExceptions ) {
34985 0 : pushErrorHandler();
34986 : }
34987 16 : {
34988 16 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34989 16 : result = (OGRwkbGeometryType)OGR_GT_GetLinear(arg1);
34990 16 : SWIG_PYTHON_THREAD_END_ALLOW;
34991 : }
34992 16 : if ( bLocalUseExceptions ) {
34993 0 : popErrorHandler();
34994 : }
34995 : #ifndef SED_HACKS
34996 : if ( bLocalUseExceptions ) {
34997 : CPLErr eclass = CPLGetLastErrorType();
34998 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34999 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35000 : }
35001 : }
35002 : #endif
35003 : }
35004 16 : resultobj = SWIG_From_int(static_cast< int >(result));
35005 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35006 : return resultobj;
35007 : fail:
35008 : return NULL;
35009 : }
35010 :
35011 :
35012 2 : SWIGINTERN PyObject *_wrap_SetNonLinearGeometriesEnabledFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35013 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35014 2 : int arg1 ;
35015 2 : int val1 ;
35016 2 : int ecode1 = 0 ;
35017 2 : PyObject *swig_obj[1] ;
35018 :
35019 2 : if (!args) SWIG_fail;
35020 2 : swig_obj[0] = args;
35021 2 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
35022 2 : if (!SWIG_IsOK(ecode1)) {
35023 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetNonLinearGeometriesEnabledFlag" "', argument " "1"" of type '" "int""'");
35024 : }
35025 2 : arg1 = static_cast< int >(val1);
35026 2 : {
35027 2 : const int bLocalUseExceptions = GetUseExceptions();
35028 2 : if ( bLocalUseExceptions ) {
35029 0 : pushErrorHandler();
35030 : }
35031 2 : {
35032 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
35033 2 : OGRSetNonLinearGeometriesEnabledFlag(arg1);
35034 2 : SWIG_PYTHON_THREAD_END_ALLOW;
35035 : }
35036 2 : if ( bLocalUseExceptions ) {
35037 0 : popErrorHandler();
35038 : }
35039 : #ifndef SED_HACKS
35040 : if ( bLocalUseExceptions ) {
35041 : CPLErr eclass = CPLGetLastErrorType();
35042 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35043 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35044 : }
35045 : }
35046 : #endif
35047 : }
35048 2 : resultobj = SWIG_Py_Void();
35049 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35050 : return resultobj;
35051 : fail:
35052 : return NULL;
35053 : }
35054 :
35055 :
35056 1 : SWIGINTERN PyObject *_wrap_GetNonLinearGeometriesEnabledFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35057 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35058 1 : int result;
35059 :
35060 1 : if (!SWIG_Python_UnpackTuple(args, "GetNonLinearGeometriesEnabledFlag", 0, 0, 0)) SWIG_fail;
35061 1 : {
35062 1 : const int bLocalUseExceptions = GetUseExceptions();
35063 1 : if ( bLocalUseExceptions ) {
35064 0 : pushErrorHandler();
35065 : }
35066 1 : {
35067 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
35068 1 : result = (int)OGRGetNonLinearGeometriesEnabledFlag();
35069 1 : SWIG_PYTHON_THREAD_END_ALLOW;
35070 : }
35071 1 : if ( bLocalUseExceptions ) {
35072 0 : popErrorHandler();
35073 : }
35074 : #ifndef SED_HACKS
35075 : if ( bLocalUseExceptions ) {
35076 : CPLErr eclass = CPLGetLastErrorType();
35077 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35078 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35079 : }
35080 : }
35081 : #endif
35082 : }
35083 1 : resultobj = SWIG_From_int(static_cast< int >(result));
35084 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35085 : return resultobj;
35086 0 : fail:
35087 0 : return NULL;
35088 : }
35089 :
35090 :
35091 1 : SWIGINTERN PyObject *_wrap_GetOpenDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35092 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35093 1 : int arg1 ;
35094 1 : int val1 ;
35095 1 : int ecode1 = 0 ;
35096 1 : PyObject *swig_obj[1] ;
35097 1 : OGRDataSourceShadow *result = 0 ;
35098 :
35099 1 : if (!args) SWIG_fail;
35100 1 : swig_obj[0] = args;
35101 1 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
35102 1 : if (!SWIG_IsOK(ecode1)) {
35103 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetOpenDS" "', argument " "1"" of type '" "int""'");
35104 : }
35105 1 : arg1 = static_cast< int >(val1);
35106 1 : {
35107 1 : const int bLocalUseExceptions = GetUseExceptions();
35108 1 : if ( bLocalUseExceptions ) {
35109 0 : pushErrorHandler();
35110 : }
35111 1 : {
35112 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
35113 1 : result = (OGRDataSourceShadow *)GetOpenDS(arg1);
35114 1 : SWIG_PYTHON_THREAD_END_ALLOW;
35115 : }
35116 1 : if ( bLocalUseExceptions ) {
35117 0 : popErrorHandler();
35118 : }
35119 : #ifndef SED_HACKS
35120 : if ( bLocalUseExceptions ) {
35121 : CPLErr eclass = CPLGetLastErrorType();
35122 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35123 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35124 : }
35125 : }
35126 : #endif
35127 : }
35128 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 | 0 );
35129 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35130 : return resultobj;
35131 : fail:
35132 : return NULL;
35133 : }
35134 :
35135 :
35136 7119 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
35137 7119 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35138 7119 : char *arg1 = (char *) 0 ;
35139 7119 : int arg2 = (int) 0 ;
35140 7119 : int bToFree1 = 0 ;
35141 7119 : int val2 ;
35142 7119 : int ecode2 = 0 ;
35143 7119 : PyObject * obj0 = 0 ;
35144 7119 : PyObject * obj1 = 0 ;
35145 7119 : char * kwnames[] = {
35146 : (char *)"utf8_path", (char *)"update", NULL
35147 : };
35148 7119 : OGRDataSourceShadow *result = 0 ;
35149 :
35150 7119 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Open", kwnames, &obj0, &obj1)) SWIG_fail;
35151 7119 : {
35152 : /* %typemap(in) (const char *utf8_path) */
35153 7119 : if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
35154 : {
35155 3908 : arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
35156 : }
35157 : else
35158 : {
35159 3211 : arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
35160 :
35161 : }
35162 7119 : if (arg1 == NULL)
35163 : {
35164 1 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
35165 1 : SWIG_fail;
35166 : }
35167 : }
35168 7118 : if (obj1) {
35169 1666 : ecode2 = SWIG_AsVal_int(obj1, &val2);
35170 1666 : if (!SWIG_IsOK(ecode2)) {
35171 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "int""'");
35172 : }
35173 : arg2 = static_cast< int >(val2);
35174 : }
35175 7118 : {
35176 7118 : const int bLocalUseExceptions = GetUseExceptions();
35177 7118 : if ( bLocalUseExceptions ) {
35178 2680 : pushErrorHandler();
35179 : }
35180 7118 : {
35181 7118 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
35182 7118 : result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
35183 7118 : SWIG_PYTHON_THREAD_END_ALLOW;
35184 : }
35185 7118 : if ( bLocalUseExceptions ) {
35186 2680 : popErrorHandler();
35187 : }
35188 : #ifndef SED_HACKS
35189 : if( result == NULL && bLocalUseExceptions ) {
35190 : CPLErr eclass = CPLGetLastErrorType();
35191 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35192 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35193 : }
35194 : }
35195 : #endif
35196 7118 : if( result != NULL && bLocalUseExceptions ) {
35197 : #ifdef SED_HACKS
35198 2606 : bLocalUseExceptionsCode = FALSE;
35199 : #endif
35200 : }
35201 : }
35202 7118 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN | 0 );
35203 7118 : {
35204 : /* %typemap(freearg) (const char *utf8_path) */
35205 7118 : GDALPythonFreeCStr(arg1, bToFree1);
35206 : }
35207 7266 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35208 : return resultobj;
35209 1 : fail:
35210 1 : {
35211 : /* %typemap(freearg) (const char *utf8_path) */
35212 7119 : GDALPythonFreeCStr(arg1, bToFree1);
35213 : }
35214 : return NULL;
35215 : }
35216 :
35217 :
35218 23 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
35219 23 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35220 23 : char *arg1 = (char *) 0 ;
35221 23 : int arg2 = (int) 0 ;
35222 23 : int bToFree1 = 0 ;
35223 23 : int val2 ;
35224 23 : int ecode2 = 0 ;
35225 23 : PyObject * obj0 = 0 ;
35226 23 : PyObject * obj1 = 0 ;
35227 23 : char * kwnames[] = {
35228 : (char *)"utf8_path", (char *)"update", NULL
35229 : };
35230 23 : OGRDataSourceShadow *result = 0 ;
35231 :
35232 23 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:OpenShared", kwnames, &obj0, &obj1)) SWIG_fail;
35233 23 : {
35234 : /* %typemap(in) (const char *utf8_path) */
35235 23 : if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
35236 : {
35237 23 : arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
35238 : }
35239 : else
35240 : {
35241 0 : arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
35242 :
35243 : }
35244 23 : if (arg1 == NULL)
35245 : {
35246 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
35247 0 : SWIG_fail;
35248 : }
35249 : }
35250 23 : if (obj1) {
35251 14 : ecode2 = SWIG_AsVal_int(obj1, &val2);
35252 14 : if (!SWIG_IsOK(ecode2)) {
35253 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "int""'");
35254 : }
35255 : arg2 = static_cast< int >(val2);
35256 : }
35257 23 : {
35258 23 : const int bLocalUseExceptions = GetUseExceptions();
35259 23 : if ( bLocalUseExceptions ) {
35260 14 : pushErrorHandler();
35261 : }
35262 23 : {
35263 23 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
35264 23 : result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
35265 23 : SWIG_PYTHON_THREAD_END_ALLOW;
35266 : }
35267 23 : if ( bLocalUseExceptions ) {
35268 14 : popErrorHandler();
35269 : }
35270 : #ifndef SED_HACKS
35271 : if( result == NULL && bLocalUseExceptions ) {
35272 : CPLErr eclass = CPLGetLastErrorType();
35273 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35274 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35275 : }
35276 : }
35277 : #endif
35278 23 : if( result != NULL && bLocalUseExceptions ) {
35279 : #ifdef SED_HACKS
35280 14 : bLocalUseExceptionsCode = FALSE;
35281 : #endif
35282 : }
35283 : }
35284 23 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN | 0 );
35285 23 : {
35286 : /* %typemap(freearg) (const char *utf8_path) */
35287 23 : GDALPythonFreeCStr(arg1, bToFree1);
35288 : }
35289 23 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35290 : return resultobj;
35291 0 : fail:
35292 0 : {
35293 : /* %typemap(freearg) (const char *utf8_path) */
35294 23 : GDALPythonFreeCStr(arg1, bToFree1);
35295 : }
35296 : return NULL;
35297 : }
35298 :
35299 :
35300 2738 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35301 2738 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35302 2738 : char *arg1 = (char *) 0 ;
35303 2738 : int res1 ;
35304 2738 : char *buf1 = 0 ;
35305 2738 : int alloc1 = 0 ;
35306 2738 : PyObject *swig_obj[1] ;
35307 2738 : OGRDriverShadow *result = 0 ;
35308 :
35309 2738 : if (!args) SWIG_fail;
35310 2738 : swig_obj[0] = args;
35311 2738 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
35312 2738 : if (!SWIG_IsOK(res1)) {
35313 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
35314 : }
35315 2738 : arg1 = reinterpret_cast< char * >(buf1);
35316 2738 : {
35317 2738 : const int bLocalUseExceptions = GetUseExceptions();
35318 2738 : if ( bLocalUseExceptions ) {
35319 1379 : pushErrorHandler();
35320 : }
35321 2738 : result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
35322 2738 : if ( bLocalUseExceptions ) {
35323 1379 : popErrorHandler();
35324 : }
35325 : #ifndef SED_HACKS
35326 : if ( bLocalUseExceptions ) {
35327 : CPLErr eclass = CPLGetLastErrorType();
35328 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35329 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35330 : }
35331 : }
35332 : #endif
35333 : }
35334 2738 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 | 0 );
35335 2738 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
35336 2738 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35337 : return resultobj;
35338 0 : fail:
35339 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
35340 : return NULL;
35341 : }
35342 :
35343 :
35344 0 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35345 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35346 0 : int arg1 ;
35347 0 : int val1 ;
35348 0 : int ecode1 = 0 ;
35349 0 : PyObject *swig_obj[1] ;
35350 0 : OGRDriverShadow *result = 0 ;
35351 :
35352 0 : if (!args) SWIG_fail;
35353 0 : swig_obj[0] = args;
35354 0 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
35355 0 : if (!SWIG_IsOK(ecode1)) {
35356 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
35357 : }
35358 0 : arg1 = static_cast< int >(val1);
35359 0 : {
35360 0 : const int bLocalUseExceptions = GetUseExceptions();
35361 0 : if ( bLocalUseExceptions ) {
35362 0 : pushErrorHandler();
35363 : }
35364 0 : result = (OGRDriverShadow *)GetDriver(arg1);
35365 0 : if ( bLocalUseExceptions ) {
35366 0 : popErrorHandler();
35367 : }
35368 : #ifndef SED_HACKS
35369 : if ( bLocalUseExceptions ) {
35370 : CPLErr eclass = CPLGetLastErrorType();
35371 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35372 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35373 : }
35374 : }
35375 : #endif
35376 : }
35377 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 | 0 );
35378 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35379 : return resultobj;
35380 : fail:
35381 : return NULL;
35382 : }
35383 :
35384 :
35385 59 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35386 59 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35387 59 : char **arg1 = (char **) 0 ;
35388 59 : int arg2 = (int) 0 ;
35389 59 : int val2 ;
35390 59 : int ecode2 = 0 ;
35391 59 : PyObject *swig_obj[2] ;
35392 59 : char **result = 0 ;
35393 :
35394 59 : if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
35395 59 : {
35396 : /* %typemap(in) char **dict */
35397 59 : arg1 = NULL;
35398 59 : if ( PySequence_Check( swig_obj[0] ) ) {
35399 59 : int bErr = FALSE;
35400 59 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
35401 59 : if ( bErr )
35402 : {
35403 0 : SWIG_fail;
35404 : }
35405 : }
35406 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
35407 0 : int bErr = FALSE;
35408 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
35409 0 : if ( bErr )
35410 : {
35411 0 : SWIG_fail;
35412 : }
35413 : }
35414 : else {
35415 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
35416 0 : SWIG_fail;
35417 : }
35418 : }
35419 59 : if (swig_obj[1]) {
35420 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
35421 0 : if (!SWIG_IsOK(ecode2)) {
35422 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
35423 : }
35424 : arg2 = static_cast< int >(val2);
35425 : }
35426 59 : {
35427 59 : const int bLocalUseExceptions = GetUseExceptions();
35428 59 : if ( bLocalUseExceptions ) {
35429 10 : pushErrorHandler();
35430 : }
35431 59 : result = (char **)GeneralCmdLineProcessor(arg1,arg2);
35432 59 : if ( bLocalUseExceptions ) {
35433 10 : popErrorHandler();
35434 : }
35435 : #ifndef SED_HACKS
35436 : if ( bLocalUseExceptions ) {
35437 : CPLErr eclass = CPLGetLastErrorType();
35438 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35439 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35440 : }
35441 : }
35442 : #endif
35443 : }
35444 59 : {
35445 : /* %typemap(out) char **CSL -> ( string ) */
35446 59 : bool bErr = false;
35447 59 : resultobj = CSLToList(result, &bErr);
35448 59 : CSLDestroy(result);
35449 59 : if( bErr ) {
35450 0 : SWIG_fail;
35451 : }
35452 : }
35453 59 : {
35454 : /* %typemap(freearg) char **dict */
35455 59 : CSLDestroy( arg1 );
35456 : }
35457 59 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35458 : return resultobj;
35459 0 : fail:
35460 0 : {
35461 : /* %typemap(freearg) char **dict */
35462 0 : CSLDestroy( arg1 );
35463 : }
35464 : return NULL;
35465 : }
35466 :
35467 :
35468 11 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
35469 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
35470 11 : double arg1 ;
35471 11 : char *arg2 = (char *) NULL ;
35472 11 : void *arg3 = (void *) NULL ;
35473 11 : double val1 ;
35474 11 : int ecode1 = 0 ;
35475 11 : int res2 ;
35476 11 : char *buf2 = 0 ;
35477 11 : int alloc2 = 0 ;
35478 11 : int res3 ;
35479 11 : PyObject * obj0 = 0 ;
35480 11 : PyObject * obj1 = 0 ;
35481 11 : PyObject * obj2 = 0 ;
35482 11 : char * kwnames[] = {
35483 : (char *)"dfProgress", (char *)"pszMessage", (char *)"pData", NULL
35484 : };
35485 11 : int result;
35486 :
35487 11 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
35488 11 : ecode1 = SWIG_AsVal_double(obj0, &val1);
35489 11 : if (!SWIG_IsOK(ecode1)) {
35490 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
35491 : }
35492 11 : arg1 = static_cast< double >(val1);
35493 11 : if (obj1) {
35494 11 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
35495 11 : if (!SWIG_IsOK(res2)) {
35496 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
35497 : }
35498 11 : arg2 = reinterpret_cast< char * >(buf2);
35499 : }
35500 11 : if (obj2) {
35501 11 : res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
35502 11 : if (!SWIG_IsOK(res3)) {
35503 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'");
35504 : }
35505 : }
35506 11 : {
35507 11 : const int bLocalUseExceptions = GetUseExceptions();
35508 11 : if ( bLocalUseExceptions ) {
35509 5 : pushErrorHandler();
35510 : }
35511 11 : result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
35512 11 : if ( bLocalUseExceptions ) {
35513 5 : popErrorHandler();
35514 : }
35515 : #ifndef SED_HACKS
35516 : if ( bLocalUseExceptions ) {
35517 : CPLErr eclass = CPLGetLastErrorType();
35518 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
35519 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
35520 : }
35521 : }
35522 : #endif
35523 : }
35524 11 : resultobj = SWIG_From_int(static_cast< int >(result));
35525 11 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
35526 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
35527 : return resultobj;
35528 0 : fail:
35529 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
35530 : return NULL;
35531 : }
35532 :
35533 :
35534 : static PyMethodDef SwigMethods[] = {
35535 : { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
35536 : { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
35537 : { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
35538 : { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
35539 : { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
35540 : { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
35541 : { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
35542 : { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
35543 : { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
35544 : { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
35545 : { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
35546 : { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
35547 : { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
35548 : "MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
35549 : "MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
35550 : ""},
35551 : { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
35552 : { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
35553 : { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
35554 : { "GetGEOSVersionMajor", _wrap_GetGEOSVersionMajor, METH_NOARGS, "GetGEOSVersionMajor() -> int"},
35555 : { "GetGEOSVersionMinor", _wrap_GetGEOSVersionMinor, METH_NOARGS, "GetGEOSVersionMinor() -> int"},
35556 : { "GetGEOSVersionMicro", _wrap_GetGEOSVersionMicro, METH_NOARGS, "GetGEOSVersionMicro() -> int"},
35557 : { "new_StyleTable", _wrap_new_StyleTable, METH_NOARGS, "new_StyleTable() -> StyleTable"},
35558 : { "delete_StyleTable", _wrap_delete_StyleTable, METH_O, "delete_StyleTable(StyleTable self)"},
35559 : { "StyleTable_AddStyle", _wrap_StyleTable_AddStyle, METH_VARARGS, "StyleTable_AddStyle(StyleTable self, char const * pszName, char const * pszStyleString) -> int"},
35560 : { "StyleTable_LoadStyleTable", _wrap_StyleTable_LoadStyleTable, METH_VARARGS, "StyleTable_LoadStyleTable(StyleTable self, char const * utf8_path) -> int"},
35561 : { "StyleTable_SaveStyleTable", _wrap_StyleTable_SaveStyleTable, METH_VARARGS, "StyleTable_SaveStyleTable(StyleTable self, char const * utf8_path) -> int"},
35562 : { "StyleTable_Find", _wrap_StyleTable_Find, METH_VARARGS, "StyleTable_Find(StyleTable self, char const * pszName) -> char const *"},
35563 : { "StyleTable_ResetStyleStringReading", _wrap_StyleTable_ResetStyleStringReading, METH_O, "StyleTable_ResetStyleStringReading(StyleTable self)"},
35564 : { "StyleTable_GetNextStyle", _wrap_StyleTable_GetNextStyle, METH_O, "StyleTable_GetNextStyle(StyleTable self) -> char const *"},
35565 : { "StyleTable_GetLastStyleName", _wrap_StyleTable_GetLastStyleName, METH_O, "StyleTable_GetLastStyleName(StyleTable self) -> char const *"},
35566 : { "StyleTable_swigregister", StyleTable_swigregister, METH_O, NULL},
35567 : { "StyleTable_swiginit", StyleTable_swiginit, METH_VARARGS, NULL},
35568 : { "new_ArrowArray", _wrap_new_ArrowArray, METH_NOARGS, "new_ArrowArray() -> ArrowArray"},
35569 : { "delete_ArrowArray", _wrap_delete_ArrowArray, METH_O, "delete_ArrowArray(ArrowArray self)"},
35570 : { "ArrowArray__getPtr", _wrap_ArrowArray__getPtr, METH_O, "ArrowArray__getPtr(ArrowArray self) -> VoidPtrAsLong"},
35571 : { "ArrowArray_GetChildrenCount", _wrap_ArrowArray_GetChildrenCount, METH_O, "ArrowArray_GetChildrenCount(ArrowArray self) -> GIntBig"},
35572 : { "ArrowArray_GetLength", _wrap_ArrowArray_GetLength, METH_O, "ArrowArray_GetLength(ArrowArray self) -> GIntBig"},
35573 : { "ArrowArray_swigregister", ArrowArray_swigregister, METH_O, NULL},
35574 : { "ArrowArray_swiginit", ArrowArray_swiginit, METH_VARARGS, NULL},
35575 : { "new_ArrowSchema", _wrap_new_ArrowSchema, METH_NOARGS, "new_ArrowSchema() -> ArrowSchema"},
35576 : { "delete_ArrowSchema", _wrap_delete_ArrowSchema, METH_O, "delete_ArrowSchema(ArrowSchema self)"},
35577 : { "ArrowSchema__getPtr", _wrap_ArrowSchema__getPtr, METH_O, "ArrowSchema__getPtr(ArrowSchema self) -> VoidPtrAsLong"},
35578 : { "ArrowSchema_GetName", _wrap_ArrowSchema_GetName, METH_O, "ArrowSchema_GetName(ArrowSchema self) -> char const *"},
35579 : { "ArrowSchema_GetChildrenCount", _wrap_ArrowSchema_GetChildrenCount, METH_O, "ArrowSchema_GetChildrenCount(ArrowSchema self) -> GIntBig"},
35580 : { "ArrowSchema_GetChild", _wrap_ArrowSchema_GetChild, METH_VARARGS, "ArrowSchema_GetChild(ArrowSchema self, int iChild) -> ArrowSchema"},
35581 : { "ArrowSchema_swigregister", ArrowSchema_swigregister, METH_O, NULL},
35582 : { "ArrowSchema_swiginit", ArrowSchema_swiginit, METH_VARARGS, NULL},
35583 : { "delete_ArrowArrayStream", _wrap_delete_ArrowArrayStream, METH_O, "delete_ArrowArrayStream(ArrowArrayStream self)"},
35584 : { "ArrowArrayStream_GetSchema", _wrap_ArrowArrayStream_GetSchema, METH_O, "ArrowArrayStream_GetSchema(ArrowArrayStream self) -> ArrowSchema"},
35585 : { "ArrowArrayStream_GetNextRecordBatch", _wrap_ArrowArrayStream_GetNextRecordBatch, METH_VARARGS, "ArrowArrayStream_GetNextRecordBatch(ArrowArrayStream self, char ** options=None) -> ArrowArray"},
35586 : { "ArrowArrayStream_swigregister", ArrowArrayStream_swigregister, METH_O, NULL},
35587 : { "Layer_GetDataset", _wrap_Layer_GetDataset, METH_O, "\n"
35588 : "Layer_GetDataset(Layer self) -> GDALDatasetShadow *\n"
35589 : "\n"
35590 : "Return the dataset associated with this layer.\n"
35591 : "\n"
35592 : "For more details: :cpp:func:`OGR_L_GetDataset`\n"
35593 : "\n"
35594 : "Returns\n"
35595 : "-------\n"
35596 : "Dataset:\n"
35597 : " Dataset or None\n"
35598 : "\n"
35599 : ""},
35600 : { "Layer_Rename", _wrap_Layer_Rename, METH_VARARGS, "Layer_Rename(Layer self, char const * new_name) -> OGRErr"},
35601 : { "Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_O, "\n"
35602 : "Layer_GetRefCount(Layer self) -> int\n"
35603 : "\n"
35604 : "For more details: :cpp:func:`OGR_L_GetRefCount`\n"
35605 : "\n"
35606 : ""},
35607 : { "Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, "\n"
35608 : "Layer_SetSpatialFilter(Layer self, Geometry filter)\n"
35609 : "Layer_SetSpatialFilter(Layer self, int iGeomField, Geometry filter)\n"
35610 : "\n"
35611 : "Set a new spatial filter.\n"
35612 : "\n"
35613 : "For more details:\n"
35614 : "\n"
35615 : "- :cpp:func:`OGR_L_SetSpatialFilter`\n"
35616 : "- :cpp:func:`OGR_L_SetSpatialFilterEx`\n"
35617 : "\n"
35618 : "Parameters\n"
35619 : "-----------\n"
35620 : "iGeomField: int, optional\n"
35621 : " index of the geometry field on which the spatial filter operates.\n"
35622 : "filter: Geometry\n"
35623 : " The geometry to use as a filtering region. None may\n"
35624 : " be passed indicating that the current spatial filter should be\n"
35625 : " cleared, but no new one instituted.\n"
35626 : "\n"
35627 : ""},
35628 : { "Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, "\n"
35629 : "Layer_SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, double maxy)\n"
35630 : "Layer_SetSpatialFilterRect(Layer self, int iGeomField, double minx, double miny, double maxx, double maxy)\n"
35631 : "\n"
35632 : "Set a new rectangular spatial filter.\n"
35633 : "\n"
35634 : "For more details:\n"
35635 : "\n"
35636 : "- :cpp:func:`OGR_L_SetSpatialFilterRect`\n"
35637 : "- :cpp:func:`OGR_L_SetSpatialFilterRectEx`\n"
35638 : "\n"
35639 : "Parameters\n"
35640 : "-----------\n"
35641 : "iGeomField: int, optional\n"
35642 : " index of the geometry field on which the spatial filter operates.\n"
35643 : "minx: float\n"
35644 : " the minimum X coordinate for the rectangular region.\n"
35645 : "miny: float\n"
35646 : " the minimum Y coordinate for the rectangular region.\n"
35647 : "maxx: float\n"
35648 : " the maximum X coordinate for the rectangular region.\n"
35649 : "maxy: float\n"
35650 : " the maximum Y coordinate for the rectangular region.\n"
35651 : "\n"
35652 : ""},
35653 : { "Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_O, "\n"
35654 : "Layer_GetSpatialFilter(Layer self) -> Geometry\n"
35655 : "\n"
35656 : "This function returns the current spatial filter for this layer.\n"
35657 : "\n"
35658 : "For more details: :cpp:func:`OGR_L_GetSpatialFilter`\n"
35659 : "\n"
35660 : "Returns\n"
35661 : "--------\n"
35662 : "Geometry:\n"
35663 : " The spatial filter geometry.\n"
35664 : "\n"
35665 : ""},
35666 : { "Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, "\n"
35667 : "Layer_SetAttributeFilter(Layer self, char * filter_string) -> OGRErr\n"
35668 : "\n"
35669 : "Set a new attribute query.\n"
35670 : "\n"
35671 : "For more details: :cpp:func:`OGR_L_SetAttributeFilter`\n"
35672 : "\n"
35673 : "Parameters\n"
35674 : "-----------\n"
35675 : "filter_string: str\n"
35676 : " query in restricted SQL WHERE format, or None to clear the\n"
35677 : " current query.\n"
35678 : "\n"
35679 : "Returns\n"
35680 : "--------\n"
35681 : "int:\n"
35682 : " :py:const:`osgeo.ogr.OGRERR_NONE` if successfully installed,\n"
35683 : " or an error code if the query expression is in error,\n"
35684 : " or some other failure occurs.\n"
35685 : "\n"
35686 : ""},
35687 : { "Layer_ResetReading", _wrap_Layer_ResetReading, METH_O, "\n"
35688 : "Layer_ResetReading(Layer self)\n"
35689 : "\n"
35690 : "Reset feature reading to start on the first feature.\n"
35691 : "\n"
35692 : "For more details: :cpp:func:`OGR_L_ResetReading`\n"
35693 : "\n"
35694 : ""},
35695 : { "Layer_GetName", _wrap_Layer_GetName, METH_O, "\n"
35696 : "Layer_GetName(Layer self) -> char const *\n"
35697 : "\n"
35698 : "Return the layer name.\n"
35699 : "\n"
35700 : "For more details: :cpp:func:`OGR_L_GetName`\n"
35701 : "\n"
35702 : "Returns\n"
35703 : "--------\n"
35704 : "str:\n"
35705 : " The layer name\n"
35706 : "\n"
35707 : ""},
35708 : { "Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_O, "\n"
35709 : "Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\n"
35710 : "\n"
35711 : "Return the layer geometry type.\n"
35712 : "\n"
35713 : "For more details: :cpp:func:`OGR_L_GetGeomType`\n"
35714 : "\n"
35715 : "Returns\n"
35716 : "--------\n"
35717 : "int:\n"
35718 : " The geometry type code. The types can be found with\n"
35719 : " 'osgeo.ogr.wkb' prefix. For example :py:const:`osgeo.ogr.wkbPolygon`.\n"
35720 : "\n"
35721 : ""},
35722 : { "Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_O, "\n"
35723 : "Layer_GetGeometryColumn(Layer self) -> char const *\n"
35724 : "\n"
35725 : "This method returns the name of the underlying database column being\n"
35726 : "used as the geometry column, or '' if not supported.\n"
35727 : "\n"
35728 : "For more details: :cpp:func:`OGR_L_GetGeometryColumn`\n"
35729 : "\n"
35730 : "Returns\n"
35731 : "--------\n"
35732 : "str:\n"
35733 : " geometry column name.\n"
35734 : "\n"
35735 : ""},
35736 : { "Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_O, "\n"
35737 : "Layer_GetFIDColumn(Layer self) -> char const *\n"
35738 : "\n"
35739 : "This method returns the name of the underlying database column being\n"
35740 : "used as the FID column, or '' if not supported.\n"
35741 : "\n"
35742 : "For more details: :cpp:func:`OGR_L_GetFIDColumn`\n"
35743 : "\n"
35744 : "Returns\n"
35745 : "--------\n"
35746 : "str:\n"
35747 : " fid column name.\n"
35748 : "\n"
35749 : ""},
35750 : { "Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, "\n"
35751 : "Layer_GetFeature(Layer self, GIntBig fid) -> Feature\n"
35752 : "\n"
35753 : "Fetch a feature by its identifier.\n"
35754 : "\n"
35755 : "For more details: :cpp:func:`OGR_L_GetFeature`\n"
35756 : "\n"
35757 : "Use :py:func:`TestCapability` with (:py:const:`osgeo.ogr.OLCRandomRead`)\n"
35758 : "to establish if this layer supports efficient random access reading via\n"
35759 : ":py:func:`GetFeature`; However, the call should always work if the feature exists.\n"
35760 : "\n"
35761 : "Sequential reads (with :py:func:`GetNextFeature`) are generally\n"
35762 : "considered interrupted by a :py:func:`GetFeature` call.\n"
35763 : "\n"
35764 : "Parameters\n"
35765 : "-----------\n"
35766 : "fid: int\n"
35767 : " The feature id of the feature to read.\n"
35768 : "\n"
35769 : "Returns\n"
35770 : "--------\n"
35771 : "Feature:\n"
35772 : " A new feature now owned by the caller, or None on failure.\n"
35773 : " The returned feature should be deleted with :py:func:`Destroy`.\n"
35774 : "\n"
35775 : ""},
35776 : { "Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_O, "\n"
35777 : "Layer_GetNextFeature(Layer self) -> Feature\n"
35778 : "\n"
35779 : "Fetch the next available feature from this layer.\n"
35780 : "\n"
35781 : "For more details: :cpp:func:`OGR_L_GetNextFeature`\n"
35782 : "\n"
35783 : "Returns\n"
35784 : "--------\n"
35785 : "Feature:\n"
35786 : " A feature or None if no more features are available.\n"
35787 : "\n"
35788 : ""},
35789 : { "Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, "\n"
35790 : "Layer_SetNextByIndex(Layer self, GIntBig new_index) -> OGRErr\n"
35791 : "\n"
35792 : "Move read cursor to the nIndex'th feature in the current resultset.\n"
35793 : "\n"
35794 : "For more details: :cpp:func:`OGR_L_SetNextByIndex`\n"
35795 : "\n"
35796 : "Parameters\n"
35797 : "-----------\n"
35798 : "new_index: int\n"
35799 : " The index indicating how many steps into the result set to seek.\n"
35800 : "\n"
35801 : "Returns\n"
35802 : "--------\n"
35803 : "int:\n"
35804 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success or an error code.\n"
35805 : "\n"
35806 : ""},
35807 : { "Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, "\n"
35808 : "Layer_SetFeature(Layer self, Feature feature) -> OGRErr\n"
35809 : "\n"
35810 : "Rewrite an existing feature.\n"
35811 : "\n"
35812 : "For more details: :cpp:func:`OGR_L_SetFeature`\n"
35813 : "\n"
35814 : "To set a feature, but create it if it doesn't exist see :py:meth:`.Layer.UpsertFeature`.\n"
35815 : "\n"
35816 : "Parameters\n"
35817 : "-----------\n"
35818 : "feature: Feature\n"
35819 : " The feature to write.\n"
35820 : "\n"
35821 : "Returns\n"
35822 : "--------\n"
35823 : "int:\n"
35824 : " :py:const:`osgeo.ogr.OGRERR_NONE` if the operation works,\n"
35825 : " otherwise an appropriate error code\n"
35826 : " (e.g :py:const:`osgeo.ogr.OGRERR_NON_EXISTING_FEATURE` if the\n"
35827 : " feature does not exist).\n"
35828 : "\n"
35829 : ""},
35830 : { "Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, "\n"
35831 : "Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\n"
35832 : "\n"
35833 : "Create and write a new feature within a layer.\n"
35834 : "\n"
35835 : "For more details: :cpp:func:`OGR_L_CreateFeature`\n"
35836 : "\n"
35837 : "To create a feature, but set it if it exists see :py:meth:`.Layer.UpsertFeature`.\n"
35838 : "\n"
35839 : "Parameters\n"
35840 : "-----------\n"
35841 : "feature: Feature\n"
35842 : " The feature to write to disk.\n"
35843 : "\n"
35844 : "Returns\n"
35845 : "--------\n"
35846 : "int:\n"
35847 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35848 : "\n"
35849 : ""},
35850 : { "Layer_UpsertFeature", _wrap_Layer_UpsertFeature, METH_VARARGS, "\n"
35851 : "Layer_UpsertFeature(Layer self, Feature feature) -> OGRErr\n"
35852 : "\n"
35853 : "Rewrite an existing feature or create a new feature within a layer.\n"
35854 : "\n"
35855 : "For more details: :cpp:func:`OGR_L_UpsertFeature`\n"
35856 : "\n"
35857 : "Parameters\n"
35858 : "-----------\n"
35859 : "feature: Feature\n"
35860 : " The feature to write to disk.\n"
35861 : "\n"
35862 : "Returns\n"
35863 : "--------\n"
35864 : "int:\n"
35865 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35866 : "\n"
35867 : ""},
35868 : { "Layer_UpdateFeature", _wrap_Layer_UpdateFeature, METH_VARARGS, "Layer_UpdateFeature(Layer self, Feature feature, int nUpdatedFieldsCount, int nUpdatedGeomFieldsCount, bool bUpdateStyleString) -> OGRErr"},
35869 : { "Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, "\n"
35870 : "Layer_DeleteFeature(Layer self, GIntBig fid) -> OGRErr\n"
35871 : "\n"
35872 : "Delete feature from layer.\n"
35873 : "\n"
35874 : "For more details: :cpp:func:`OGR_L_DeleteFeature`\n"
35875 : "\n"
35876 : "Parameters\n"
35877 : "-----------\n"
35878 : "fid: int\n"
35879 : " The feature id to be deleted from the layer\n"
35880 : "\n"
35881 : "Returns\n"
35882 : "--------\n"
35883 : "int:\n"
35884 : " :py:const:`osgeo.ogr.OGRERR_NONE` if the operation works,\n"
35885 : " otherwise an appropriate error code\n"
35886 : " (e.g :py:const:`osgeo.ogr.OGRERR_NON_EXISTING_FEATURE`)\n"
35887 : " if the feature does not exist.\n"
35888 : "\n"
35889 : ""},
35890 : { "Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_O, "\n"
35891 : "Layer_SyncToDisk(Layer self) -> OGRErr\n"
35892 : "\n"
35893 : "Flush pending changes to disk.\n"
35894 : "\n"
35895 : "For more details: :cpp:func:`OGR_L_SyncToDisk`\n"
35896 : "\n"
35897 : "Returns\n"
35898 : "--------\n"
35899 : "int:\n"
35900 : " :py:const:`osgeo.ogr.OGRERR_NONE` if no error occurs\n"
35901 : " (even if nothing is done) or an error code.\n"
35902 : "\n"
35903 : ""},
35904 : { "Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_O, "\n"
35905 : "Layer_GetLayerDefn(Layer self) -> FeatureDefn\n"
35906 : "\n"
35907 : "Fetch the schema information for this layer.\n"
35908 : "\n"
35909 : "For more details: :cpp:func:`OGR_L_GetLayerDefn`\n"
35910 : "\n"
35911 : "Returns\n"
35912 : "--------\n"
35913 : "FeatureDefn:\n"
35914 : " The feature definition.\n"
35915 : "\n"
35916 : ""},
35917 : { "Layer_GetFeatureCount", (PyCFunction)(void(*)(void))_wrap_Layer_GetFeatureCount, METH_VARARGS|METH_KEYWORDS, "\n"
35918 : "Layer_GetFeatureCount(Layer self, int force=1) -> GIntBig\n"
35919 : "\n"
35920 : "Fetch the feature count in this layer.\n"
35921 : "\n"
35922 : "For more details: :cpp:func:`OGR_L_GetFeatureCount`\n"
35923 : "\n"
35924 : "Parameters\n"
35925 : "-----------\n"
35926 : "force: int\n"
35927 : " Flag indicating whether the count should be computed even if\n"
35928 : " it is expensive.\n"
35929 : "\n"
35930 : "Returns\n"
35931 : "--------\n"
35932 : "int:\n"
35933 : " Feature count, -1 if count not known.\n"
35934 : "\n"
35935 : ""},
35936 : { "Layer_GetExtent", (PyCFunction)(void(*)(void))_wrap_Layer_GetExtent, METH_VARARGS|METH_KEYWORDS, "\n"
35937 : "Layer_GetExtent(Layer self, int force=1, int can_return_null=0, int geom_field=0)\n"
35938 : "\n"
35939 : "Fetch the extent of this layer.\n"
35940 : "\n"
35941 : "For more details:\n"
35942 : "\n"
35943 : "- :cpp:func:`OGR_L_GetExtent`\n"
35944 : "- :cpp:func:`OGR_L_GetExtentEx`\n"
35945 : "\n"
35946 : ".. warning:: Check the return order of the bounds.\n"
35947 : "\n"
35948 : "Parameters\n"
35949 : "-----------\n"
35950 : "force: int, default=False\n"
35951 : " Flag indicating whether the extent should be computed even if\n"
35952 : " it is expensive.\n"
35953 : "can_return_null: int, default=False\n"
35954 : " Whether None can be returned in the response.\n"
35955 : "geom_field: int, default=0\n"
35956 : " The index of the geometry field on which to compute the extent.\n"
35957 : " Can be iterated over using :py:func:`range` and :py:func:`GetGeomFieldCount`.\n"
35958 : "\n"
35959 : "Returns\n"
35960 : "--------\n"
35961 : "minx: float\n"
35962 : "maxx: float\n"
35963 : "miny: float\n"
35964 : "maxy: float\n"
35965 : "\n"
35966 : ""},
35967 : { "Layer_GetExtent3D", (PyCFunction)(void(*)(void))_wrap_Layer_GetExtent3D, METH_VARARGS|METH_KEYWORDS, "Layer_GetExtent3D(Layer self, int force=1, int can_return_null=0, int geom_field=0)"},
35968 : { "Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, "\n"
35969 : "Layer_TestCapability(Layer self, char const * cap) -> bool\n"
35970 : "\n"
35971 : "Test if this layer supported the named capability.\n"
35972 : "\n"
35973 : "For more details: :cpp:func:`OGR_L_TestCapability`\n"
35974 : "\n"
35975 : "Parameters\n"
35976 : "-----------\n"
35977 : "cap: str\n"
35978 : " The name of the capability to test. These can\n"
35979 : " be found in the `osgeo.ogr` namespace. For example,\n"
35980 : " :py:const:`osgeo.ogr.OLCRandomRead`.\n"
35981 : "\n"
35982 : "Returns\n"
35983 : "--------\n"
35984 : "int:\n"
35985 : " True if the layer has the requested capability, or False otherwise.\n"
35986 : " Will return False for any unrecognized capabilities.\n"
35987 : "\n"
35988 : ""},
35989 : { "Layer_CreateField", (PyCFunction)(void(*)(void))_wrap_Layer_CreateField, METH_VARARGS|METH_KEYWORDS, "\n"
35990 : "Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok=1) -> OGRErr\n"
35991 : "\n"
35992 : "Create a new field on a layer.\n"
35993 : "\n"
35994 : "For more details: :cpp:func:`OGR_L_CreateField`\n"
35995 : "\n"
35996 : "Parameters\n"
35997 : "-----------\n"
35998 : "field_def: FieldDefn\n"
35999 : " The field definition to write to disk.\n"
36000 : "approx_ok: bool, default=True\n"
36001 : " If True, the field may be created in a slightly different\n"
36002 : " form depending on the limitations of the format driver.\n"
36003 : "\n"
36004 : "Returns\n"
36005 : "--------\n"
36006 : "int:\n"
36007 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36008 : "\n"
36009 : ""},
36010 : { "Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, "\n"
36011 : "Layer_DeleteField(Layer self, int iField) -> OGRErr\n"
36012 : "\n"
36013 : "Delete an existing field on a layer.\n"
36014 : "\n"
36015 : "For more details: :cpp:func:`OGR_L_DeleteField`\n"
36016 : "\n"
36017 : "Parameters\n"
36018 : "-----------\n"
36019 : "iField: int\n"
36020 : " index of the field to delete.\n"
36021 : "\n"
36022 : "Returns\n"
36023 : "--------\n"
36024 : "int:\n"
36025 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36026 : "\n"
36027 : ""},
36028 : { "Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, "\n"
36029 : "Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\n"
36030 : "\n"
36031 : "Reorder an existing field on a layer.\n"
36032 : "\n"
36033 : "For more details: :cpp:func:`OGR_L_ReorderField`\n"
36034 : "\n"
36035 : "Parameters\n"
36036 : "-----------\n"
36037 : "iOldFieldPos: int\n"
36038 : " previous position of the field to move. Must be in the\n"
36039 : " range [0,GetFieldCount()-1].\n"
36040 : "iNewFieldPos: int\n"
36041 : " new position of the field to move. Must be in the range\n"
36042 : " [0,GetFieldCount()-1].\n"
36043 : "\n"
36044 : "Returns\n"
36045 : "--------\n"
36046 : "int:\n"
36047 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36048 : "\n"
36049 : ""},
36050 : { "Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, "\n"
36051 : "Layer_ReorderFields(Layer self, int nList) -> OGRErr\n"
36052 : "\n"
36053 : "Reorder all the fields of a layer.\n"
36054 : "\n"
36055 : "For more details: :cpp:func:`OGR_L_ReorderFields`\n"
36056 : "\n"
36057 : "Parameters\n"
36058 : "-----------\n"
36059 : "nList: list[int]\n"
36060 : " A list of GetLayerDefn().GetFieldCount()\n"
36061 : " elements which is a permutation of\n"
36062 : " [0, GetLayerDefn().GetFieldCount()-1].\n"
36063 : "\n"
36064 : "Returns\n"
36065 : "--------\n"
36066 : "int:\n"
36067 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36068 : "\n"
36069 : ""},
36070 : { "Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, "\n"
36071 : "Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\n"
36072 : "\n"
36073 : "Alter the definition of an existing field on a layer.\n"
36074 : "\n"
36075 : "For more details: :cpp:func:`OGR_L_AlterFieldDefn`\n"
36076 : "\n"
36077 : "Parameters\n"
36078 : "-----------\n"
36079 : "iField: int\n"
36080 : " index of the field whose definition must be altered.\n"
36081 : "field_def: FieldDefn\n"
36082 : " new field definition\n"
36083 : "nFlags: int\n"
36084 : " Combination of\n"
36085 : " :py:const:`osgeo.ogr.ALTER_NAME_FLAG`,\n"
36086 : " :py:const:`osgeo.ogr.ALTER_TYPE_FLAG`,\n"
36087 : " :py:const:`osgeo.ogr.ALTER_WIDTH_PRECISION_FLAG`,\n"
36088 : " :py:const:`osgeo.ogr.ALTER_NULLABLE_FLAG` and\n"
36089 : " :py:const:`osgeo.ogr.ALTER_DEFAULT_FLAG`\n"
36090 : " to indicate which of the name and/or type and/or width and precision\n"
36091 : " fields and/or nullability from the new field definition must be taken\n"
36092 : " into account.\n"
36093 : "\n"
36094 : "Returns\n"
36095 : "--------\n"
36096 : "int:\n"
36097 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36098 : "\n"
36099 : ""},
36100 : { "Layer_AlterGeomFieldDefn", _wrap_Layer_AlterGeomFieldDefn, METH_VARARGS, "Layer_AlterGeomFieldDefn(Layer self, int iGeomField, GeomFieldDefn field_def, int nFlags) -> OGRErr"},
36101 : { "Layer_CreateGeomField", (PyCFunction)(void(*)(void))_wrap_Layer_CreateGeomField, METH_VARARGS|METH_KEYWORDS, "\n"
36102 : "Layer_CreateGeomField(Layer self, GeomFieldDefn field_def, int approx_ok=1) -> OGRErr\n"
36103 : "\n"
36104 : "Create a new geometry field on a layer.\n"
36105 : "\n"
36106 : "For more details: :cpp:func:`OGR_L_CreateGeomField`\n"
36107 : "\n"
36108 : "Parameters\n"
36109 : "-----------\n"
36110 : "field_def: GeomFieldDefn\n"
36111 : " The geometry field definition to write to disk.\n"
36112 : "approx_ok: bool, default=True\n"
36113 : " If True, the field may be created in a slightly different\n"
36114 : " form depending on the limitations of the format driver.\n"
36115 : "\n"
36116 : "Returns\n"
36117 : "--------\n"
36118 : "int:\n"
36119 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36120 : "\n"
36121 : ""},
36122 : { "Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_O, "\n"
36123 : "Layer_StartTransaction(Layer self) -> OGRErr\n"
36124 : "\n"
36125 : "For datasources which support transactions, this creates a transaction.\n"
36126 : "\n"
36127 : "For more details: :cpp:func:`OGR_L_StartTransaction`\n"
36128 : "\n"
36129 : "Returns\n"
36130 : "--------\n"
36131 : "int:\n"
36132 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36133 : "\n"
36134 : ""},
36135 : { "Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_O, "\n"
36136 : "Layer_CommitTransaction(Layer self) -> OGRErr\n"
36137 : "\n"
36138 : "For datasources which support transactions, this commits a transaction.\n"
36139 : "\n"
36140 : "For more details: :cpp:func:`OGR_L_CommitTransaction`\n"
36141 : "\n"
36142 : "Returns\n"
36143 : "--------\n"
36144 : "int:\n"
36145 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36146 : "\n"
36147 : ""},
36148 : { "Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_O, "\n"
36149 : "Layer_RollbackTransaction(Layer self) -> OGRErr\n"
36150 : "\n"
36151 : "Roll back a datasource to its state before the start of the current transaction.\n"
36152 : "\n"
36153 : "For more details: :cpp:func:`OGR_L_RollbackTransaction`\n"
36154 : "\n"
36155 : "Returns\n"
36156 : "--------\n"
36157 : "int:\n"
36158 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
36159 : "\n"
36160 : ""},
36161 : { "Layer_FindFieldIndex", _wrap_Layer_FindFieldIndex, METH_VARARGS, "\n"
36162 : "Layer_FindFieldIndex(Layer self, char const * pszFieldName, int bExactMatch) -> int\n"
36163 : "\n"
36164 : "Find the index of field in a layer.\n"
36165 : "\n"
36166 : "For more details: :cpp:func:`OGR_L_FindFieldIndex`\n"
36167 : "\n"
36168 : "Returns\n"
36169 : "--------\n"
36170 : "int:\n"
36171 : " field index, or -1 if the field doesn't exist\n"
36172 : "\n"
36173 : ""},
36174 : { "Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_O, "\n"
36175 : "Layer_GetSpatialRef(Layer self) -> SpatialReference\n"
36176 : "\n"
36177 : "Fetch the spatial reference system for this layer.\n"
36178 : "\n"
36179 : "For more details: :cpp:func:`OGR_L_GetSpatialRef`\n"
36180 : "\n"
36181 : "Returns\n"
36182 : "--------\n"
36183 : "SpatialReference:\n"
36184 : " spatial reference, or None if there isn't one.\n"
36185 : "\n"
36186 : ""},
36187 : { "Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_O, "\n"
36188 : "Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
36189 : "\n"
36190 : "For more details: :cpp:func:`OGR_L_GetFeaturesRead`\n"
36191 : "\n"
36192 : ""},
36193 : { "Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, "\n"
36194 : "Layer_SetIgnoredFields(Layer self, char const ** options) -> OGRErr\n"
36195 : "\n"
36196 : "Set which fields can be omitted when retrieving features from the\n"
36197 : "layer.\n"
36198 : "\n"
36199 : "For more details: :cpp:func:`OGR_L_SetIgnoredFields`\n"
36200 : "\n"
36201 : "Parameters\n"
36202 : "-----------\n"
36203 : "options: list[str]\n"
36204 : " A list of field names.\n"
36205 : " If an empty list is passed, the ignored list is cleared.\n"
36206 : "\n"
36207 : "Returns\n"
36208 : "-------\n"
36209 : "int:\n"
36210 : " :py:const:`osgeo.ogr.OGRERR_NONE` if all field names have been resolved\n"
36211 : " (even if the driver does not support this method)\n"
36212 : "\n"
36213 : ""},
36214 : { "Layer_Intersection", (PyCFunction)(void(*)(void))_wrap_Layer_Intersection, METH_VARARGS|METH_KEYWORDS, "\n"
36215 : "Layer_Intersection(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
36216 : "\n"
36217 : "Intersection of two layers.\n"
36218 : "\n"
36219 : "For more details: :cpp:func:`OGR_L_Intersection`\n"
36220 : "\n"
36221 : "Parameters\n"
36222 : "-----------\n"
36223 : "method_layer: Layer\n"
36224 : " the method layer. Should not be None.\n"
36225 : "result_layer: Layer\n"
36226 : " the layer where the features resulting from the\n"
36227 : " operation are inserted. Should not be None.\n"
36228 : "options: list[str], optional\n"
36229 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
36230 : "callback: Callable, optional\n"
36231 : " a GDALProgressFunc() compatible callback function for\n"
36232 : " reporting progress or None.\n"
36233 : "callback_data:\n"
36234 : " Argument to be passed to 'callback'. May be None.\n"
36235 : "\n"
36236 : "Returns\n"
36237 : "-------\n"
36238 : "int:\n"
36239 : " An error code if there was an error or the execution was interrupted,\n"
36240 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
36241 : "\n"
36242 : ""},
36243 : { "Layer_Union", (PyCFunction)(void(*)(void))_wrap_Layer_Union, METH_VARARGS|METH_KEYWORDS, "\n"
36244 : "Layer_Union(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
36245 : "\n"
36246 : "Union of two layers.\n"
36247 : "\n"
36248 : "For more details: :cpp:func:`OGR_L_Union`\n"
36249 : "\n"
36250 : "The first geometry field is always used.\n"
36251 : "\n"
36252 : "Parameters\n"
36253 : "-----------\n"
36254 : "method_layer: Layer\n"
36255 : " the method layer. Should not be None.\n"
36256 : "result_layer: Layer\n"
36257 : " the layer where the features resulting from the\n"
36258 : " operation are inserted. Should not be None.\n"
36259 : "options: list[str], optional\n"
36260 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
36261 : "callback: Callable, optional\n"
36262 : " a GDALProgressFunc() compatible callback function for\n"
36263 : " reporting progress or None.\n"
36264 : "callback_data:\n"
36265 : " Argument to be passed to 'callback'. May be None.\n"
36266 : "\n"
36267 : "Returns\n"
36268 : "-------\n"
36269 : "int:\n"
36270 : " An error code if there was an error or the execution was interrupted,\n"
36271 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
36272 : "\n"
36273 : ""},
36274 : { "Layer_SymDifference", (PyCFunction)(void(*)(void))_wrap_Layer_SymDifference, METH_VARARGS|METH_KEYWORDS, "\n"
36275 : "Layer_SymDifference(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
36276 : "\n"
36277 : "Symmetrical difference of two layers.\n"
36278 : "\n"
36279 : "For more details: :cpp:func:`OGR_L_SymDifference`\n"
36280 : "\n"
36281 : "Parameters\n"
36282 : "-----------\n"
36283 : "method_layer: Layer\n"
36284 : " the method layer. Should not be None.\n"
36285 : "result_layer: Layer\n"
36286 : " the layer where the features resulting from the\n"
36287 : " operation are inserted. Should not be None.\n"
36288 : "options: list[str], optional\n"
36289 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
36290 : "callback: Callable, optional\n"
36291 : " a GDALProgressFunc() compatible callback function for\n"
36292 : " reporting progress or None.\n"
36293 : "callback_data:\n"
36294 : " Argument to be passed to 'callback'. May be None.\n"
36295 : "\n"
36296 : "Returns\n"
36297 : "-------\n"
36298 : "int:\n"
36299 : " An error code if there was an error or the execution was interrupted,\n"
36300 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
36301 : "\n"
36302 : ""},
36303 : { "Layer_Identity", (PyCFunction)(void(*)(void))_wrap_Layer_Identity, METH_VARARGS|METH_KEYWORDS, "\n"
36304 : "Layer_Identity(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
36305 : "\n"
36306 : "Identify the features of this layer with the ones from the identity layer.\n"
36307 : "\n"
36308 : "For more details: :cpp:func:`OGR_L_Identity`\n"
36309 : "\n"
36310 : "Parameters\n"
36311 : "-----------\n"
36312 : "method_layer: Layer\n"
36313 : " the method layer. Should not be None.\n"
36314 : "result_layer: Layer\n"
36315 : " the layer where the features resulting from the\n"
36316 : " operation are inserted. Should not be None.\n"
36317 : "options: list[str], optional\n"
36318 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
36319 : "callback: Callable, optional\n"
36320 : " a GDALProgressFunc() compatible callback function for\n"
36321 : " reporting progress or None.\n"
36322 : "callback_data:\n"
36323 : " Argument to be passed to 'callback'. May be None.\n"
36324 : "\n"
36325 : "Returns\n"
36326 : "-------\n"
36327 : "int:\n"
36328 : " An error code if there was an error or the execution was interrupted,\n"
36329 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
36330 : "\n"
36331 : ""},
36332 : { "Layer_Update", (PyCFunction)(void(*)(void))_wrap_Layer_Update, METH_VARARGS|METH_KEYWORDS, "\n"
36333 : "Layer_Update(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
36334 : "\n"
36335 : "Update this layer with features from the update layer.\n"
36336 : "\n"
36337 : "For more details: :cpp:func:`OGR_L_Update`\n"
36338 : "\n"
36339 : "Parameters\n"
36340 : "-----------\n"
36341 : "method_layer: Layer\n"
36342 : " the method layer. Should not be None.\n"
36343 : "result_layer: Layer\n"
36344 : " the layer where the features resulting from the\n"
36345 : " operation are inserted. Should not be None.\n"
36346 : "options: list[str], optional\n"
36347 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
36348 : "callback: Callable, optional\n"
36349 : " a GDALProgressFunc() compatible callback function for\n"
36350 : " reporting progress or None.\n"
36351 : "callback_data:\n"
36352 : " Argument to be passed to 'callback'. May be None.\n"
36353 : "\n"
36354 : "Returns\n"
36355 : "-------\n"
36356 : "int:\n"
36357 : " An error code if there was an error or the execution was interrupted,\n"
36358 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
36359 : "\n"
36360 : ""},
36361 : { "Layer_Clip", (PyCFunction)(void(*)(void))_wrap_Layer_Clip, METH_VARARGS|METH_KEYWORDS, "\n"
36362 : "Layer_Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
36363 : "\n"
36364 : "Clip off areas that are not covered by the method layer.\n"
36365 : "\n"
36366 : "For more details: :cpp:func:`OGR_L_Clip`\n"
36367 : "\n"
36368 : "Parameters\n"
36369 : "-----------\n"
36370 : "method_layer: Layer\n"
36371 : " the method layer. Should not be None.\n"
36372 : "result_layer: Layer\n"
36373 : " the layer where the features resulting from the\n"
36374 : " operation are inserted. Should not be None.\n"
36375 : "options: list[str], optional\n"
36376 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
36377 : "callback: Callable, optional\n"
36378 : " a GDALProgressFunc() compatible callback function for\n"
36379 : " reporting progress or None.\n"
36380 : "callback_data:\n"
36381 : " Argument to be passed to 'callback'. May be None.\n"
36382 : "\n"
36383 : "Returns\n"
36384 : "-------\n"
36385 : "int:\n"
36386 : " An error code if there was an error or the execution was interrupted,\n"
36387 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
36388 : "\n"
36389 : ""},
36390 : { "Layer_Erase", (PyCFunction)(void(*)(void))_wrap_Layer_Erase, METH_VARARGS|METH_KEYWORDS, "\n"
36391 : "Layer_Erase(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
36392 : "\n"
36393 : "Remove areas that are covered by the method layer.\n"
36394 : "\n"
36395 : "For more details: :cpp:func:`OGR_L_Erase`\n"
36396 : "\n"
36397 : "Parameters\n"
36398 : "-----------\n"
36399 : "method_layer: Layer\n"
36400 : " the method layer. Should not be None.\n"
36401 : "result_layer: Layer\n"
36402 : " the layer where the features resulting from the\n"
36403 : " operation are inserted. Should not be None.\n"
36404 : "options: list[str], optional\n"
36405 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
36406 : "callback: Callable, optional\n"
36407 : " a GDALProgressFunc() compatible callback function for\n"
36408 : " reporting progress or None.\n"
36409 : "callback_data:\n"
36410 : " Argument to be passed to 'callback'. May be None.\n"
36411 : "\n"
36412 : "Returns\n"
36413 : "-------\n"
36414 : "int:\n"
36415 : " An error code if there was an error or the execution was interrupted,\n"
36416 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
36417 : "\n"
36418 : ""},
36419 : { "Layer_GetStyleTable", _wrap_Layer_GetStyleTable, METH_O, "\n"
36420 : "Layer_GetStyleTable(Layer self) -> StyleTable\n"
36421 : "\n"
36422 : "Get style table.\n"
36423 : "\n"
36424 : "For more details: :cpp:func:`OGR_L_GetStyleTable`\n"
36425 : "\n"
36426 : ""},
36427 : { "Layer_SetStyleTable", _wrap_Layer_SetStyleTable, METH_VARARGS, "\n"
36428 : "Layer_SetStyleTable(Layer self, StyleTable table)\n"
36429 : "\n"
36430 : "Set style table.\n"
36431 : "\n"
36432 : "For more details: :cpp:func:`OGR_L_SetStyleTable`\n"
36433 : "\n"
36434 : ""},
36435 : { "Layer_ExportArrowArrayStreamPyCapsule", _wrap_Layer_ExportArrowArrayStreamPyCapsule, METH_VARARGS, "Layer_ExportArrowArrayStreamPyCapsule(Layer self, char ** options=None) -> PyObject *"},
36436 : { "Layer_GetArrowStream", _wrap_Layer_GetArrowStream, METH_VARARGS, "Layer_GetArrowStream(Layer self, char ** options=None) -> ArrowArrayStream"},
36437 : { "Layer_IsArrowSchemaSupported", _wrap_Layer_IsArrowSchemaSupported, METH_VARARGS, "Layer_IsArrowSchemaSupported(Layer self, ArrowSchema schema, char ** options=None)"},
36438 : { "Layer_CreateFieldFromArrowSchema", _wrap_Layer_CreateFieldFromArrowSchema, METH_VARARGS, "Layer_CreateFieldFromArrowSchema(Layer self, ArrowSchema schema, char ** options=None) -> OGRErr"},
36439 : { "Layer_WriteArrowBatch", _wrap_Layer_WriteArrowBatch, METH_VARARGS, "Layer_WriteArrowBatch(Layer self, ArrowSchema schema, ArrowArray array, char ** options=None) -> OGRErr"},
36440 : { "Layer_WriteArrowStreamCapsule", _wrap_Layer_WriteArrowStreamCapsule, METH_VARARGS, "Layer_WriteArrowStreamCapsule(Layer self, PyObject * capsule, int createFieldsFromSchema, char ** options=None) -> OGRErr"},
36441 : { "Layer_WriteArrowSchemaAndArrowArrayCapsule", _wrap_Layer_WriteArrowSchemaAndArrowArrayCapsule, METH_VARARGS, "Layer_WriteArrowSchemaAndArrowArrayCapsule(Layer self, PyObject * schemaCapsule, PyObject * arrayCapsule, int createFieldsFromSchema, char ** options=None) -> OGRErr"},
36442 : { "Layer_GetGeometryTypes", (PyCFunction)(void(*)(void))_wrap_Layer_GetGeometryTypes, METH_VARARGS|METH_KEYWORDS, "\n"
36443 : "Layer_GetGeometryTypes(Layer self, int geom_field=0, int flags=0, GDALProgressFunc callback=0, void * callback_data=None)\n"
36444 : "\n"
36445 : "Get actual geometry types found in features.\n"
36446 : "\n"
36447 : "For more details: :cpp:func:`OGR_L_GetGeometryTypes`\n"
36448 : "\n"
36449 : "Parameters\n"
36450 : "-----------\n"
36451 : "geom_field: int, optional\n"
36452 : " index of the geometry field\n"
36453 : "flags: int, optional\n"
36454 : " 0, or a combination of :py:const:`osgeo.ogr.GGT_COUNT_NOT_NEEDED`,\n"
36455 : " :py:const:`osgeo.ogr.GGT_STOP_IF_MIXED` and\n"
36456 : " :py:const:`osgeo.ogr.GGT_GEOMCOLLECTIONZ_TINZ`\n"
36457 : "callback: Callable, optional\n"
36458 : " a GDALProgressFunc() compatible callback function for\n"
36459 : " cancellation or None.\n"
36460 : "callback_data:\n"
36461 : " Argument to be passed to 'callback'. May be None.\n"
36462 : "\n"
36463 : "Returns\n"
36464 : "-------\n"
36465 : "dict:\n"
36466 : " A dictionary whose keys are :py:const:`osgeo.ogr.wkbXXXX` constants and\n"
36467 : " values the corresponding number of geometries of that type in the layer.\n"
36468 : "\n"
36469 : ""},
36470 : { "Layer_GetSupportedSRSList", (PyCFunction)(void(*)(void))_wrap_Layer_GetSupportedSRSList, METH_VARARGS|METH_KEYWORDS, "Layer_GetSupportedSRSList(Layer self, int geom_field=0)"},
36471 : { "Layer_SetActiveSRS", _wrap_Layer_SetActiveSRS, METH_VARARGS, "Layer_SetActiveSRS(Layer self, int geom_field, SpatialReference srs) -> OGRErr"},
36472 : { "Layer_swigregister", Layer_swigregister, METH_O, NULL},
36473 : { "delete_Feature", _wrap_delete_Feature, METH_O, "delete_Feature(Feature self)"},
36474 : { "new_Feature", (PyCFunction)(void(*)(void))_wrap_new_Feature, METH_VARARGS|METH_KEYWORDS, "\n"
36475 : "new_Feature(FeatureDefn feature_def) -> Feature\n"
36476 : "\n"
36477 : "\n"
36478 : "Parameters\n"
36479 : "-----------\n"
36480 : "feature_def:\n"
36481 : " :py:class:`FeatureDefn` to which the feature will adhere.\n"
36482 : "\n"
36483 : ""},
36484 : { "Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_O, "\n"
36485 : "Feature_GetDefnRef(Feature self) -> FeatureDefn\n"
36486 : "\n"
36487 : "\n"
36488 : "Fetch the :py:class:`FeatureDefn` associated with this Feature.\n"
36489 : "\n"
36490 : "See :cpp:func:`OGRFeature::GetDefnRef()`.\n"
36491 : "\n"
36492 : "Returns\n"
36493 : "--------\n"
36494 : "FeatureDefn\n"
36495 : "\n"
36496 : ""},
36497 : { "Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, "\n"
36498 : "Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\n"
36499 : "\n"
36500 : "\n"
36501 : "Set feature geometry.\n"
36502 : "\n"
36503 : "This function updates the features geometry, and operates exactly as\n"
36504 : ":py:meth:`SetGeometryDirectly`, except that this function does not assume\n"
36505 : "ownership of the passed geometry, but instead makes a copy of it.\n"
36506 : "\n"
36507 : "See :cpp:func:`OGRFeature::SetGeometry`.\n"
36508 : "\n"
36509 : "This method has only an effect on the in-memory feature object. If\n"
36510 : "this object comes from a layer and the modifications must be\n"
36511 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
36512 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
36513 : "used afterwards.\n"
36514 : "\n"
36515 : "Parameters\n"
36516 : "-----------\n"
36517 : "geom : Geometry\n"
36518 : " new geometry to apply to feature.\n"
36519 : "\n"
36520 : "Returns\n"
36521 : "--------\n"
36522 : "int:\n"
36523 : " :py:const:`OGRERR_NONE` if successful, or\n"
36524 : " :py:const:`OGR_UNSUPPORTED_GEOMETRY_TYPE` if the geometry type is illegal for\n"
36525 : " the :py:class:`FeatureDefn` (checking not yet implemented).\n"
36526 : "\n"
36527 : ""},
36528 : { "Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, "Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr"},
36529 : { "Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_O, "\n"
36530 : "Feature_GetGeometryRef(Feature self) -> Geometry\n"
36531 : "\n"
36532 : "Return the feature geometry\n"
36533 : "\n"
36534 : "The lifetime of the returned geometry is bound to the one of its belonging\n"
36535 : "feature.\n"
36536 : "\n"
36537 : "See :cpp:func:`OGRFeature::GetGeometryRef`\n"
36538 : "\n"
36539 : "The :py:func:`Feature.geometry` method is also available as an alias of :py:func:`Feature.GetGeometryRef`.\n"
36540 : "\n"
36541 : "Returns\n"
36542 : "--------\n"
36543 : "Geometry:\n"
36544 : " the geometry, or None.\n"
36545 : "\n"
36546 : ""},
36547 : { "Feature_SetGeomField", _wrap_Feature_SetGeomField, METH_VARARGS, "\n"
36548 : "Feature_SetGeomField(Feature self, int iField, Geometry geom) -> OGRErr\n"
36549 : "Feature_SetGeomField(Feature self, char const * field_name, Geometry geom) -> OGRErr\n"
36550 : "\n"
36551 : "\n"
36552 : "Set feature geometry of a specified geometry field.\n"
36553 : "\n"
36554 : "This function updates the features geometry, and operates exactly as\n"
36555 : ":py:meth:`SetGeomFieldDirectly`, except that this function does not assume\n"
36556 : "ownership of the passed geometry, but instead makes a copy of it.\n"
36557 : "\n"
36558 : "See :cpp:func:`OGRFeature::SetGeomField`.\n"
36559 : "\n"
36560 : "Parameters\n"
36561 : "-----------\n"
36562 : "fld_index : int / str\n"
36563 : " Geometry field name or 0-based numeric index. For repeated\n"
36564 : " access, use of the numeric index avoids a lookup\n"
36565 : " step.\n"
36566 : "geom : Geometry\n"
36567 : " handle to the new geometry to apply to feature.\n"
36568 : "\n"
36569 : "Returns\n"
36570 : "--------\n"
36571 : "int:\n"
36572 : " :py:const:`OGRERR_NONE` if successful, or\n"
36573 : " :py:const:`OGR_UNSUPPORTED_GEOMETRY_TYPE` if the geometry type is illegal for\n"
36574 : " the :py:class:`FeatureDefn` (checking not yet implemented).\n"
36575 : "\n"
36576 : ""},
36577 : { "Feature_SetGeomFieldDirectly", _wrap_Feature_SetGeomFieldDirectly, METH_VARARGS, "\n"
36578 : "Feature_SetGeomFieldDirectly(Feature self, int iField, Geometry geom) -> OGRErr\n"
36579 : "Feature_SetGeomFieldDirectly(Feature self, char const * field_name, Geometry geom) -> OGRErr\n"
36580 : ""},
36581 : { "Feature_GetGeomFieldRef", _wrap_Feature_GetGeomFieldRef, METH_VARARGS, "\n"
36582 : "Feature_GetGeomFieldRef(Feature self, int iField) -> Geometry\n"
36583 : "Feature_GetGeomFieldRef(Feature self, char const * field_name) -> Geometry\n"
36584 : "\n"
36585 : "\n"
36586 : "Fetch a feature :py:class:`Geometry`.\n"
36587 : "\n"
36588 : "See :cpp:func:`OGRFeature::GetGeomFieldRef`.\n"
36589 : "\n"
36590 : "Parameters\n"
36591 : "-----------\n"
36592 : "fld_index : int / str\n"
36593 : " Field name or 0-based numeric index. For repeated\n"
36594 : " access, use of the numeric index avoids a lookup\n"
36595 : " step.\n"
36596 : "\n"
36597 : "Returns\n"
36598 : "-------\n"
36599 : "Geometry\n"
36600 : "\n"
36601 : "\n"
36602 : ""},
36603 : { "Feature_Clone", _wrap_Feature_Clone, METH_O, "\n"
36604 : "Feature_Clone(Feature self) -> Feature\n"
36605 : "\n"
36606 : "Duplicate a Feature.\n"
36607 : "See :cpp:func:`OGRFeature::Clone`.\n"
36608 : "\n"
36609 : "Returns\n"
36610 : "--------\n"
36611 : "Feature\n"
36612 : "\n"
36613 : ""},
36614 : { "Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, "\n"
36615 : "Feature_Equal(Feature self, Feature feature) -> bool\n"
36616 : "\n"
36617 : "\n"
36618 : "Test if two features are the same.\n"
36619 : "\n"
36620 : "Two features are considered equal if they reference the\n"
36621 : "same :py:class:`FeatureDefn`, have the same field values, and the same geometry\n"
36622 : "(as tested by :py:func:`Geometry.Equal`) as well as the same feature id.\n"
36623 : "\n"
36624 : "See :cpp:func:`OGRFeature::Equal`.\n"
36625 : "\n"
36626 : "Parameters\n"
36627 : "-----------\n"
36628 : "feature : Feature\n"
36629 : " feature to test this one against\n"
36630 : "\n"
36631 : "Returns\n"
36632 : "--------\n"
36633 : "bool\n"
36634 : "\n"
36635 : ""},
36636 : { "Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_O, "\n"
36637 : "Feature_GetFieldCount(Feature self) -> int\n"
36638 : "\n"
36639 : "\n"
36640 : "Fetch number of fields on this feature This will always be the same as\n"
36641 : "the field count for the :py:class:`FeatureDefn`.\n"
36642 : "\n"
36643 : "See :cpp:func:`OGRFeature::GetFieldCount`.\n"
36644 : "\n"
36645 : "Returns\n"
36646 : "--------\n"
36647 : "int:\n"
36648 : " count of fields.\n"
36649 : "\n"
36650 : ""},
36651 : { "Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, "\n"
36652 : "Feature_GetFieldDefnRef(Feature self, int id) -> FieldDefn\n"
36653 : "Feature_GetFieldDefnRef(Feature self, char const * field_name) -> FieldDefn\n"
36654 : "\n"
36655 : "\n"
36656 : "Fetch definition for this field.\n"
36657 : "\n"
36658 : "See :cpp:func:`OGRFeature::GetFieldDefnRef`.\n"
36659 : "\n"
36660 : "Parameters\n"
36661 : "-----------\n"
36662 : "fld_index : int / str\n"
36663 : " Field name or 0-based numeric index. For repeated\n"
36664 : " access, use of the numeric index avoids a lookup\n"
36665 : " step.\n"
36666 : "\n"
36667 : "Returns\n"
36668 : "--------\n"
36669 : "FieldDefn\n"
36670 : " a reference to the field definition. This reference should\n"
36671 : " not be modified.\n"
36672 : "\n"
36673 : ""},
36674 : { "Feature_GetGeomFieldCount", _wrap_Feature_GetGeomFieldCount, METH_O, "\n"
36675 : "Feature_GetGeomFieldCount(Feature self) -> int\n"
36676 : "\n"
36677 : "\n"
36678 : "Fetch number of geometry fields on this feature This will always be\n"
36679 : "the same as the geometry field count for the :py:class:`FeatureDefn`.\n"
36680 : "\n"
36681 : "See :cpp:func:`OGRFeature::GetGeomFieldCount`.\n"
36682 : "\n"
36683 : "Returns\n"
36684 : "--------\n"
36685 : "int:\n"
36686 : " count of geometry fields.\n"
36687 : "\n"
36688 : ""},
36689 : { "Feature_GetGeomFieldDefnRef", _wrap_Feature_GetGeomFieldDefnRef, METH_VARARGS, "\n"
36690 : "Feature_GetGeomFieldDefnRef(Feature self, int id) -> GeomFieldDefn\n"
36691 : "Feature_GetGeomFieldDefnRef(Feature self, char const * field_name) -> GeomFieldDefn\n"
36692 : "\n"
36693 : "\n"
36694 : "Fetch definition for this geometry field.\n"
36695 : "\n"
36696 : "See :cpp:func:`OGRFeature::GetGeomFieldDefnRef`.\n"
36697 : "\n"
36698 : "Parameters\n"
36699 : "-----------\n"
36700 : "fld_index : int / str\n"
36701 : " Field name or 0-based numeric index. For repeated\n"
36702 : " access, use of the numeric index avoids a lookup\n"
36703 : " step.\n"
36704 : "\n"
36705 : "Returns\n"
36706 : "--------\n"
36707 : "GeomFieldDefn:\n"
36708 : " a reference to the field definition.\n"
36709 : " Should not be deleted or modified.\n"
36710 : "\n"
36711 : ""},
36712 : { "Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, "\n"
36713 : "Feature_GetFieldAsString(Feature self, int id) -> char const\n"
36714 : "Feature_GetFieldAsString(Feature self, char const * field_name) -> char const *\n"
36715 : "\n"
36716 : "\n"
36717 : ":py:const:`OFTReal` and :py:const:`OFTInteger` fields will be translated to string using\n"
36718 : "sprintf(), but not necessarily using the established formatting rules.\n"
36719 : "Other field types, or errors will result in a return value of zero.\n"
36720 : "\n"
36721 : "See :cpp:func:`OGRFeature::GetFieldAsString`.\n"
36722 : "\n"
36723 : "Parameters\n"
36724 : "-----------\n"
36725 : "fld_index : int / str\n"
36726 : " Field name or 0-based numeric index. For repeated\n"
36727 : " access, use of the numeric index avoids a lookup\n"
36728 : " step.\n"
36729 : "\n"
36730 : "Returns\n"
36731 : "--------\n"
36732 : "str:\n"
36733 : " the field value.\n"
36734 : "\n"
36735 : ""},
36736 : { "Feature_GetFieldAsISO8601DateTime", _wrap_Feature_GetFieldAsISO8601DateTime, METH_VARARGS, "\n"
36737 : "Feature_GetFieldAsISO8601DateTime(Feature self, int id, char ** options=None) -> char const\n"
36738 : "Feature_GetFieldAsISO8601DateTime(Feature self, char const * field_name, char ** options=None) -> char const *\n"
36739 : "\n"
36740 : "\n"
36741 : "Fetch :py:const:`OFTDateTime` field value as a ISO8601 representation.\n"
36742 : "\n"
36743 : "Return a string like 'YYYY-MM-DDTHH:MM:SS(.sss)?(Z|([+|-]HH:MM))?'\n"
36744 : "Milliseconds are omitted if equal to zero.\n"
36745 : "Other field types, or errors will result in a return of an empty string.\n"
36746 : "\n"
36747 : "See :cpp:func:`OGRFeature::GetFieldAsISO8601DateTime`.\n"
36748 : "\n"
36749 : ".. versionadded:: 3.7\n"
36750 : "\n"
36751 : "Parameters\n"
36752 : "-----------\n"
36753 : "fld_index : int / str\n"
36754 : " Field name or 0-based numeric index. For repeated\n"
36755 : " access, use of the numeric index avoids a lookup\n"
36756 : " step.\n"
36757 : "options : dict / str\n"
36758 : " Not currently used.\n"
36759 : "\n"
36760 : ""},
36761 : { "Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, "\n"
36762 : "Feature_GetFieldAsInteger(Feature self, int id) -> int\n"
36763 : "Feature_GetFieldAsInteger(Feature self, char const * field_name) -> int\n"
36764 : "\n"
36765 : "\n"
36766 : "Fetch field value as a 32-bit integer.\n"
36767 : "\n"
36768 : ":py:const:`OFTString` features will be translated using atoi().\n"
36769 : ":py:const:`OFTReal` fields will be cast to integer. Other field types, or\n"
36770 : "errors will result in a return value of zero.\n"
36771 : "\n"
36772 : "See :cpp:func:`OGRFeature::GetFieldAsInteger`.\n"
36773 : "\n"
36774 : "Parameters\n"
36775 : "-----------\n"
36776 : "fld_index : int / str\n"
36777 : " Field name or 0-based numeric index. For repeated\n"
36778 : " access, use of the numeric index avoids a lookup\n"
36779 : " step.\n"
36780 : "\n"
36781 : "Returns\n"
36782 : "--------\n"
36783 : "int:\n"
36784 : " the field value.\n"
36785 : "\n"
36786 : "Examples\n"
36787 : "--------\n"
36788 : ">>> defn = ogr.FeatureDefn()\n"
36789 : ">>> defn.AddFieldDefn(ogr.FieldDefn('my_int', ogr.OFTInteger64))\n"
36790 : ">>> feature = ogr.Feature(defn)\n"
36791 : ">>> feature['my_int'] = 2**32 + 1\n"
36792 : ">>> feature.GetFieldAsInteger('my_int')\n"
36793 : "Warning 1: Integer overflow occurred when trying to return 64bit integer. Use GetFieldAsInteger64() instead\n"
36794 : "2147483647\n"
36795 : ">>> feature.GetFieldAsInteger64('my_int')\n"
36796 : "4294967297\n"
36797 : ">>> feature.GetField('my_int')\n"
36798 : "4294967297\n"
36799 : "\n"
36800 : ""},
36801 : { "Feature_GetFieldAsInteger64", _wrap_Feature_GetFieldAsInteger64, METH_VARARGS, "\n"
36802 : "Feature_GetFieldAsInteger64(Feature self, int id) -> GIntBig\n"
36803 : "Feature_GetFieldAsInteger64(Feature self, char const * field_name) -> GIntBig\n"
36804 : "\n"
36805 : "\n"
36806 : "Fetch field value as integer 64 bit.\n"
36807 : "\n"
36808 : ":py:const:`OFTInteger` are promoted to 64 bit. :py:const:`OFTString` features\n"
36809 : "will be translated using :cpp:func:`CPLAtoGIntBig`. :py:const:`OFTReal` fields\n"
36810 : "will be cast to integer. Other field types, or errors will result in a return\n"
36811 : "value of zero.\n"
36812 : "\n"
36813 : "See :cpp:func:`OGRFeature::GetFieldAsInteger64`.\n"
36814 : "\n"
36815 : "Parameters\n"
36816 : "-----------\n"
36817 : "fld_index : int / str\n"
36818 : " Field name or 0-based numeric index. For repeated\n"
36819 : " access, use of the numeric index avoids a lookup\n"
36820 : " step.\n"
36821 : "\n"
36822 : "Returns\n"
36823 : "--------\n"
36824 : "int:\n"
36825 : " the field value.\n"
36826 : "\n"
36827 : ""},
36828 : { "Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, "\n"
36829 : "Feature_GetFieldAsDouble(Feature self, int id) -> double\n"
36830 : "Feature_GetFieldAsDouble(Feature self, char const * field_name) -> double\n"
36831 : "\n"
36832 : "Fetch field value as a double.\n"
36833 : "\n"
36834 : ":py:const:`OFTString` features will be translated using :cpp:func:`CPLAtof`. :py:const:`OFTInteger`\n"
36835 : "fields will be cast to double. Other field types, or errors will\n"
36836 : "result in a return value of zero.\n"
36837 : "\n"
36838 : "See :cpp:func:`OGRFeature::GetFieldAsDouble`.\n"
36839 : "\n"
36840 : "Parameters\n"
36841 : "-----------\n"
36842 : "fld_index : int / str\n"
36843 : " Field name or 0-based numeric index. For repeated\n"
36844 : " access, use of the numeric index avoids a lookup\n"
36845 : " step.\n"
36846 : "\n"
36847 : "Returns\n"
36848 : "--------\n"
36849 : "float:\n"
36850 : " the field value.\n"
36851 : "\n"
36852 : ""},
36853 : { "Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, "\n"
36854 : "Feature_GetFieldAsDateTime(Feature self, int id)\n"
36855 : "Feature_GetFieldAsDateTime(Feature self, char const * field_name)\n"
36856 : "\n"
36857 : "\n"
36858 : "Fetch field value as date and time.\n"
36859 : "\n"
36860 : "Currently this method only works for :py:const:`OFTDate`, :py:const:`OFTTime`\n"
36861 : "and :py:const:`OFTDateTime` fields.\n"
36862 : "\n"
36863 : "See :cpp:func:`OGRFeature::GetFieldAsDateTime`.\n"
36864 : "\n"
36865 : "Parameters\n"
36866 : "-----------\n"
36867 : "fld_index : int / str\n"
36868 : " Field name or 0-based numeric index. For repeated\n"
36869 : " access, use of the numeric index avoids a lookup\n"
36870 : " step.\n"
36871 : "\n"
36872 : "Returns\n"
36873 : "--------\n"
36874 : "list\n"
36875 : " list containing [ year, month, day, hour, minute, second, timezone flag ]\n"
36876 : "\n"
36877 : "Examples\n"
36878 : "--------\n"
36879 : ">>> from datetime import datetime\n"
36880 : ">>> from zoneinfo import ZoneInfo\n"
36881 : ">>> defn = ogr.FeatureDefn()\n"
36882 : ">>> defn.AddFieldDefn(ogr.FieldDefn('unknown', ogr.OFTDateTime))\n"
36883 : ">>> defn.AddFieldDefn(ogr.FieldDefn('local', ogr.OFTDateTime))\n"
36884 : ">>> defn.AddFieldDefn(ogr.FieldDefn('utc', ogr.OFTDateTime))\n"
36885 : ">>> feature = ogr.Feature(defn)\n"
36886 : ">>> feature['unknown'] = datetime.now()\n"
36887 : ">>> feature['local'] = datetime.now(ZoneInfo('Canada/Eastern'))\n"
36888 : ">>> feature['utc'] = datetime.now(ZoneInfo('UTC'))\n"
36889 : ">>> feature.GetFieldAsDateTime('unknown')\n"
36890 : "[2024, 3, 15, 20, 34, 52.594173431396484, 0]\n"
36891 : ">>> feature.GetFieldAsDateTime('local')\n"
36892 : "[2024, 3, 15, 20, 34, 52.59502410888672, 84]\n"
36893 : ">>> feature.GetFieldAsDateTime('utc')\n"
36894 : "[2024, 3, 16, 0, 34, 52.59580993652344, 100]\n"
36895 : "\n"
36896 : "See Also\n"
36897 : "--------\n"
36898 : ":py:func:`Feature.GetFieldAsISO8601DateTime`\n"
36899 : "\n"
36900 : ""},
36901 : { "Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, "\n"
36902 : "Feature_GetFieldAsIntegerList(Feature self, int id)\n"
36903 : "Feature_GetFieldAsIntegerList(Feature self, char const * field_name)\n"
36904 : "\n"
36905 : "\n"
36906 : "Fetch field value as a list of integers.\n"
36907 : "\n"
36908 : "Currently this function only works for :py:const:`OFTIntegerList` fields.\n"
36909 : "\n"
36910 : "This function is the same as the C++ method\n"
36911 : ":cpp:func:`OGRFeature::GetFieldAsIntegerList`.\n"
36912 : "\n"
36913 : "Parameters\n"
36914 : "-----------\n"
36915 : "fld_index : int / str\n"
36916 : " Field name or 0-based numeric index. For repeated\n"
36917 : " access, use of the numeric index avoids a lookup\n"
36918 : " step.\n"
36919 : "\n"
36920 : "Returns\n"
36921 : "--------\n"
36922 : "list:\n"
36923 : " the field value.\n"
36924 : "\n"
36925 : ""},
36926 : { "Feature_GetFieldAsInteger64List", _wrap_Feature_GetFieldAsInteger64List, METH_VARARGS, "\n"
36927 : "Feature_GetFieldAsInteger64List(Feature self, int id)\n"
36928 : "\n"
36929 : "Fetch field value as a list of 64 bit integers.\n"
36930 : "\n"
36931 : "Currently this function only works for :py:const:`OFTInteger64List` fields.\n"
36932 : "\n"
36933 : "See :cpp:func:`OGRFeature::GetFieldAsInteger64List`.\n"
36934 : "\n"
36935 : "Parameters\n"
36936 : "-----------\n"
36937 : "fld_index : int / str\n"
36938 : " Field name or 0-based numeric index. For repeated\n"
36939 : " access, use of the numeric index avoids a lookup\n"
36940 : " step.\n"
36941 : "\n"
36942 : "Returns\n"
36943 : "--------\n"
36944 : "list:\n"
36945 : " the field value.\n"
36946 : "\n"
36947 : ""},
36948 : { "Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, "\n"
36949 : "Feature_GetFieldAsDoubleList(Feature self, int id)\n"
36950 : "Feature_GetFieldAsDoubleList(Feature self, char const * field_name)\n"
36951 : "\n"
36952 : "\n"
36953 : "Fetch field value as a list of doubles.\n"
36954 : "\n"
36955 : "Currently this function only works for :py:const:`OFTRealList` fields.\n"
36956 : "\n"
36957 : "See :cpp:func:`OGRFeature::GetFieldAsDoubleList`.\n"
36958 : "\n"
36959 : "Parameters\n"
36960 : "-----------\n"
36961 : "fld_index : int / str\n"
36962 : " Field name or 0-based numeric index. For repeated\n"
36963 : " access, use of the numeric index avoids a lookup\n"
36964 : " step.\n"
36965 : "\n"
36966 : "Returns\n"
36967 : "-------\n"
36968 : "list\n"
36969 : "\n"
36970 : "Examples\n"
36971 : "--------\n"
36972 : ">>> defn = ogr.FeatureDefn()\n"
36973 : ">>> defn.AddFieldDefn(ogr.FieldDefn('list', ogr.OFTRealList))\n"
36974 : ">>> feature = ogr.Feature(defn)\n"
36975 : ">>> feature['list'] = [1.1, 2.2, 3.3]\n"
36976 : ">>> feature.GetFieldAsDoubleList('list')\n"
36977 : "[1.1, 2.2, 3.3]\n"
36978 : "\n"
36979 : ""},
36980 : { "Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, "\n"
36981 : "Feature_GetFieldAsStringList(Feature self, int id) -> char **\n"
36982 : "\n"
36983 : "\n"
36984 : "Fetch field value as a list of strings.\n"
36985 : "\n"
36986 : "Currently this method only works for :py:const:`OFTStringList` fields.\n"
36987 : "\n"
36988 : "See :cpp:func:`OGRFeature::GetFieldAsStringList`.\n"
36989 : "\n"
36990 : "Parameters\n"
36991 : "-----------\n"
36992 : "fld_index : int / str\n"
36993 : " Field name or 0-based numeric index. For repeated\n"
36994 : " access, use of the numeric index avoids a lookup\n"
36995 : " step.\n"
36996 : "\n"
36997 : "Returns\n"
36998 : "--------\n"
36999 : "list:\n"
37000 : " the field value.\n"
37001 : "\n"
37002 : ""},
37003 : { "Feature_GetFieldAsBinary", _wrap_Feature_GetFieldAsBinary, METH_VARARGS, "\n"
37004 : "Feature_GetFieldAsBinary(Feature self, int id) -> OGRErr\n"
37005 : "Feature_GetFieldAsBinary(Feature self, char const * field_name) -> OGRErr\n"
37006 : "\n"
37007 : "\n"
37008 : "Fetch field value as binary.\n"
37009 : "\n"
37010 : "This method only works for :py:const:`OFTBinary` and :py:const:`OFTString` fields.\n"
37011 : "\n"
37012 : "See :cpp:func:`OGRFeature::GetFieldAsBinary`.\n"
37013 : "\n"
37014 : "Parameters\n"
37015 : "-----------\n"
37016 : "fld_index : int / str\n"
37017 : " Field name or 0-based numeric index. For repeated\n"
37018 : " access, use of the numeric index avoids a lookup\n"
37019 : " step.\n"
37020 : "\n"
37021 : "Returns\n"
37022 : "--------\n"
37023 : "bytearray\n"
37024 : "\n"
37025 : ""},
37026 : { "Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, "\n"
37027 : "Feature_IsFieldSet(Feature self, int id) -> bool\n"
37028 : "Feature_IsFieldSet(Feature self, char const * field_name) -> bool\n"
37029 : "\n"
37030 : "\n"
37031 : "Test if a field has ever been assigned a value or not.\n"
37032 : "\n"
37033 : "See :cpp:func:`OGRFeature::IsFieldSet`.\n"
37034 : "\n"
37035 : "Parameters\n"
37036 : "-----------\n"
37037 : "fld_index : int / str\n"
37038 : " Field name or 0-based numeric index. For repeated\n"
37039 : " access, use of the numeric index avoids a lookup\n"
37040 : " step.\n"
37041 : "\n"
37042 : "Returns\n"
37043 : "--------\n"
37044 : "bool:\n"
37045 : " ``True`` if the field has been set, otherwise ``False``.\n"
37046 : "\n"
37047 : ""},
37048 : { "Feature_IsFieldNull", _wrap_Feature_IsFieldNull, METH_VARARGS, "\n"
37049 : "Feature_IsFieldNull(Feature self, int id) -> bool\n"
37050 : "Feature_IsFieldNull(Feature self, char const * field_name) -> bool\n"
37051 : "\n"
37052 : "\n"
37053 : "Test if a field is null.\n"
37054 : "\n"
37055 : "See :cpp:func:OGRFeature::`IsFieldNull`.\n"
37056 : "\n"
37057 : "Parameters\n"
37058 : "-----------\n"
37059 : "fld_index : int / str\n"
37060 : " Field name or 0-based numeric index. For repeated\n"
37061 : " access, use of the numeric index avoids a lookup\n"
37062 : " step.\n"
37063 : "\n"
37064 : "Returns\n"
37065 : "--------\n"
37066 : "bool:\n"
37067 : " ``True`` if the field is null, otherwise ``False``\n"
37068 : "\n"
37069 : ""},
37070 : { "Feature_IsFieldSetAndNotNull", _wrap_Feature_IsFieldSetAndNotNull, METH_VARARGS, "\n"
37071 : "Feature_IsFieldSetAndNotNull(Feature self, int id) -> bool\n"
37072 : "Feature_IsFieldSetAndNotNull(Feature self, char const * field_name) -> bool\n"
37073 : "\n"
37074 : "\n"
37075 : "Test if a field is set and not null.\n"
37076 : "\n"
37077 : "See :cpp:func:`OGRFeature::IsFieldSetAndNotNull`.\n"
37078 : "\n"
37079 : "Parameters\n"
37080 : "-----------\n"
37081 : "fld_index : int / str\n"
37082 : " Field name or 0-based numeric index. For repeated\n"
37083 : " access, use of the numeric index avoids a lookup\n"
37084 : " step.\n"
37085 : "\n"
37086 : "Returns\n"
37087 : "--------\n"
37088 : "bool:\n"
37089 : " ``True`` if the field is set and not null, otherwise ``False``.\n"
37090 : "\n"
37091 : ""},
37092 : { "Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, "\n"
37093 : "Feature_GetFieldIndex(Feature self, char const * field_name) -> int\n"
37094 : "\n"
37095 : "\n"
37096 : "Fetch the field index given field name.\n"
37097 : "\n"
37098 : "See :cpp:func:`OGRFeature::GetFieldIndex`.\n"
37099 : "\n"
37100 : "Parameters\n"
37101 : "-----------\n"
37102 : "field_name:\n"
37103 : " the name of the field to search for.\n"
37104 : "\n"
37105 : "Returns\n"
37106 : "--------\n"
37107 : "int:\n"
37108 : " the field index, or -1 if no matching field is found.\n"
37109 : "\n"
37110 : ""},
37111 : { "Feature_GetGeomFieldIndex", _wrap_Feature_GetGeomFieldIndex, METH_VARARGS, "\n"
37112 : "Feature_GetGeomFieldIndex(Feature self, char const * field_name) -> int\n"
37113 : "\n"
37114 : "\n"
37115 : "Fetch the geometry field index given geometry field name.\n"
37116 : "\n"
37117 : "See :cpp:func:`OGRFeature::GetGeomFieldIndex`.\n"
37118 : "\n"
37119 : "Parameters\n"
37120 : "-----------\n"
37121 : "field_name:\n"
37122 : " the name of the geometry field to search for.\n"
37123 : "\n"
37124 : "Returns\n"
37125 : "--------\n"
37126 : "int:\n"
37127 : " the geometry field index, or -1 if no matching geometry field is found.\n"
37128 : "\n"
37129 : ""},
37130 : { "Feature_GetFID", _wrap_Feature_GetFID, METH_O, "\n"
37131 : "Feature_GetFID(Feature self) -> GIntBig\n"
37132 : "\n"
37133 : "\n"
37134 : "Get feature identifier.\n"
37135 : "See :cpp:func:`OGRFeature::GetFID`\n"
37136 : "\n"
37137 : "Returns\n"
37138 : "-------\n"
37139 : "int:\n"
37140 : " feature id or :py:const:`NullFID` if none has been assigned.\n"
37141 : "\n"
37142 : ""},
37143 : { "Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, "\n"
37144 : "Feature_SetFID(Feature self, GIntBig fid) -> OGRErr\n"
37145 : "\n"
37146 : "\n"
37147 : "Set the feature identifier.\n"
37148 : "\n"
37149 : "For specific types of features this operation may fail on illegal\n"
37150 : "features ids. Generally it always succeeds. Feature ids should be\n"
37151 : "greater than or equal to zero, with the exception of :py:const:NullFID` (-1)\n"
37152 : "indicating that the feature id is unknown.\n"
37153 : "\n"
37154 : "See :cpp:func:`OGRFeature::SetFID`.\n"
37155 : "\n"
37156 : "Parameters\n"
37157 : "-----------\n"
37158 : "fid:\n"
37159 : " the new feature identifier value to assign.\n"
37160 : "\n"
37161 : "Returns\n"
37162 : "--------\n"
37163 : "int:\n"
37164 : " :py:const:`OGRERR_NONE` on success, or some other value on failure.\n"
37165 : "\n"
37166 : ""},
37167 : { "Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_O, "\n"
37168 : "Feature_DumpReadable(Feature self)\n"
37169 : "\n"
37170 : "\n"
37171 : "Print this feature in a human readable form.\n"
37172 : "\n"
37173 : "This dumps the attributes and geometry. It doesn't include\n"
37174 : "definition information other than field types and names nor does it\n"
37175 : "report the geometry spatial reference system.\n"
37176 : "\n"
37177 : "See :cpp:func:`OGRFeature::DumpReadable`.\n"
37178 : "\n"
37179 : "Examples\n"
37180 : "--------\n"
37181 : ">>> with gdal.OpenEx('data/poly.shp') as ds:\n"
37182 : "... lyr = ds.GetLayer(0)\n"
37183 : "... feature = lyr.GetNextFeature()\n"
37184 : "... feature.DumpReadable()\n"
37185 : "...\n"
37186 : "OGRFeature(poly):0\n"
37187 : " AREA (Real) = 215229.266\n"
37188 : " EAS_ID (Integer64) = 168\n"
37189 : " PRFEDEA (String) = 35043411\n"
37190 : " POLYGON ((479819.84375 4765180.5,479690.1875 4765259.5,479647.0 4765369.5,479730.375 4765400.5,480039.03125 4765539.5,480035.34375 4765558.5,480159.78125 4765610.5,480202.28125 4765482.0,480365.0 4765015.5,480389.6875 4764950.0,480133.96875 4764856.5,480080.28125 4764979.5,480082.96875 4765049.5,480088.8125 4765139.5,480059.90625 4765239.5,480019.71875 4765319.5,479980.21875 4765409.5,479909.875 4765370.0,479859.875 4765270.0,479819.84375 4765180.5))\n"
37191 : "\n"
37192 : ""},
37193 : { "Feature_DumpReadableAsString", _wrap_Feature_DumpReadableAsString, METH_VARARGS, "\n"
37194 : "Feature_DumpReadableAsString(Feature self, char ** options=None) -> retStringAndCPLFree *\n"
37195 : "\n"
37196 : "\n"
37197 : "Return feature information in a human-readable form.\n"
37198 : "Returns the text printed by :py:func:`Feature.DumpReadable`.\n"
37199 : "\n"
37200 : "Returns\n"
37201 : "-------\n"
37202 : "str\n"
37203 : "\n"
37204 : ""},
37205 : { "Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, "\n"
37206 : "Feature_UnsetField(Feature self, int id)\n"
37207 : "Feature_UnsetField(Feature self, char const * field_name)\n"
37208 : "\n"
37209 : "\n"
37210 : "Clear a field, marking it as unset.\n"
37211 : "\n"
37212 : "See :cpp:func:`OGRFeature::UnsetField`.\n"
37213 : "\n"
37214 : "Parameters\n"
37215 : "-----------\n"
37216 : "fld_index : int / str\n"
37217 : " Field name or 0-based numeric index. For repeated\n"
37218 : " access, use of the numeric index avoids a lookup\n"
37219 : " step.\n"
37220 : "\n"
37221 : ""},
37222 : { "Feature_SetFieldNull", _wrap_Feature_SetFieldNull, METH_VARARGS, "\n"
37223 : "Feature_SetFieldNull(Feature self, int id)\n"
37224 : "Feature_SetFieldNull(Feature self, char const * field_name)\n"
37225 : "\n"
37226 : "\n"
37227 : "Clear a field, marking it as null.\n"
37228 : "\n"
37229 : "See :cpp:func:`OGRFeature::SetFieldNull`.\n"
37230 : "\n"
37231 : "Parameters\n"
37232 : "-----------\n"
37233 : "fld_index : int / str\n"
37234 : " Field name or 0-based numeric index. For repeated\n"
37235 : " access, use of the numeric index avoids a lookup\n"
37236 : " step.\n"
37237 : "\n"
37238 : "\n"
37239 : ""},
37240 : { "Feature_SetFieldInteger64", _wrap_Feature_SetFieldInteger64, METH_VARARGS, "Feature_SetFieldInteger64(Feature self, int id, GIntBig value)"},
37241 : { "Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, "\n"
37242 : "Feature_SetField(Feature self, int id, char const * value)\n"
37243 : "Feature_SetField(Feature self, char const * field_name, char const * value)\n"
37244 : "Feature_SetField(Feature self, int id, double value)\n"
37245 : "Feature_SetField(Feature self, char const * field_name, double value)\n"
37246 : "Feature_SetField(Feature self, int id, int year, int month, int day, int hour, int minute, float second, int tzflag)\n"
37247 : "Feature_SetField(Feature self, char const * field_name, int year, int month, int day, int hour, int minute, float second, int tzflag)\n"
37248 : ""},
37249 : { "Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, "\n"
37250 : "Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
37251 : "void\n"
37252 : "\n"
37253 : "Set field to list of integer values.\n"
37254 : "\n"
37255 : "This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
37256 : ":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
37257 : "\n"
37258 : "See :cpp:func:`OGRFeature::SetField`.\n"
37259 : "\n"
37260 : "This method has only an effect on the in-memory feature object. If\n"
37261 : "this object comes from a layer and the modifications must be\n"
37262 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
37263 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
37264 : "used afterwards.\n"
37265 : "\n"
37266 : "Parameters\n"
37267 : "-----------\n"
37268 : "id : int\n"
37269 : " the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
37270 : "nList : list\n"
37271 : " the values to assign.\n"
37272 : "\n"
37273 : ""},
37274 : { "Feature_SetFieldInteger64List", _wrap_Feature_SetFieldInteger64List, METH_VARARGS, "\n"
37275 : "Feature_SetFieldInteger64List(Feature self, int id, int nList)\n"
37276 : "void\n"
37277 : "\n"
37278 : "Set field to list of 64 bit integer values.\n"
37279 : "\n"
37280 : "This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
37281 : ":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
37282 : "\n"
37283 : "See :cpp:func:`OGRFeature::SetField`.\n"
37284 : "\n"
37285 : "This method has only an effect on the in-memory feature object. If\n"
37286 : "this object comes from a layer and the modifications must be\n"
37287 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
37288 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
37289 : "used afterwards.\n"
37290 : "\n"
37291 : "Parameters\n"
37292 : "-----------\n"
37293 : "id : int\n"
37294 : " the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
37295 : "nList : list\n"
37296 : " the values to assign.\n"
37297 : "\n"
37298 : ""},
37299 : { "Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, "\n"
37300 : "Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
37301 : "\n"
37302 : "\n"
37303 : "Set field to list of double values.\n"
37304 : "\n"
37305 : "This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
37306 : ":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
37307 : "\n"
37308 : "See :cpp:func:`OGRFeature::SetField`.\n"
37309 : "\n"
37310 : "This method has only an effect on the in-memory feature object. If\n"
37311 : "this object comes from a layer and the modifications must be\n"
37312 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
37313 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
37314 : "used afterwards.\n"
37315 : "\n"
37316 : "Parameters\n"
37317 : "-----------\n"
37318 : "id : int\n"
37319 : " the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
37320 : "nList : list\n"
37321 : " the values to assign.\n"
37322 : "\n"
37323 : ""},
37324 : { "Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, "\n"
37325 : "Feature_SetFieldStringList(Feature self, int id, char ** pList)\n"
37326 : "\n"
37327 : "\n"
37328 : "Set field to list of strings value.\n"
37329 : "\n"
37330 : "This function currently only has an effect of :py:const:`OFTStringList` fields.\n"
37331 : "\n"
37332 : "See :cpp:func:`OGRFeature::SetField`.\n"
37333 : "\n"
37334 : "This method has only an effect on the in-memory feature object. If\n"
37335 : "this object comes from a layer and the modifications must be\n"
37336 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
37337 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
37338 : "used afterwards.\n"
37339 : "\n"
37340 : "Parameters\n"
37341 : "-----------\n"
37342 : "fld_index : int / str\n"
37343 : " Field name or 0-based numeric index. For repeated\n"
37344 : " access, use of the numeric index avoids a lookup\n"
37345 : " step.\n"
37346 : "value:\n"
37347 : " the value to assign.\n"
37348 : "\n"
37349 : ""},
37350 : { "Feature__SetFieldBinary", _wrap_Feature__SetFieldBinary, METH_VARARGS, "Feature__SetFieldBinary(Feature self, int id, int nLen)"},
37351 : { "Feature_SetFieldBinaryFromHexString", _wrap_Feature_SetFieldBinaryFromHexString, METH_VARARGS, "\n"
37352 : "Feature_SetFieldBinaryFromHexString(Feature self, int id, char const * pszValue)\n"
37353 : "Feature_SetFieldBinaryFromHexString(Feature self, char const * field_name, char const * pszValue)\n"
37354 : ""},
37355 : { "Feature_SetFrom", (PyCFunction)(void(*)(void))_wrap_Feature_SetFrom, METH_VARARGS|METH_KEYWORDS, "\n"
37356 : "Feature_SetFrom(Feature self, Feature other, int forgiving=1) -> OGRErr\n"
37357 : "\n"
37358 : "Set one feature from another.\n"
37359 : "\n"
37360 : "Overwrite the contents of this feature from the geometry and\n"
37361 : "attributes of another. The other feature does not need to have the\n"
37362 : "same :py:class:`FeatureDefn`. Field values are copied by corresponding field\n"
37363 : "names. Field types do not have to exactly match. OGR_F_SetField\\*()\n"
37364 : "function conversion rules will be applied as needed.\n"
37365 : "\n"
37366 : "See :cpp:func:`OGRFeature::SetFrom`.\n"
37367 : "\n"
37368 : "Parameters\n"
37369 : "-----------\n"
37370 : "other : Feature\n"
37371 : " feature from which geometry and field values will be copied.\n"
37372 : "forgiving : bool, default = True\n"
37373 : " ``True`` if the operation should continue despite lacking\n"
37374 : " output fields matching some of the source fields.\n"
37375 : "\n"
37376 : "Returns\n"
37377 : "--------\n"
37378 : "int:\n"
37379 : " :py:const:`OGRERR_NONE` if the operation succeeds, even if some values are not\n"
37380 : " transferred, otherwise an error code.\n"
37381 : "\n"
37382 : ""},
37383 : { "Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, "\n"
37384 : "Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
37385 : "\n"
37386 : "\n"
37387 : "Set one feature from another.\n"
37388 : "\n"
37389 : "Overwrite the contents of this feature from the geometry and\n"
37390 : "attributes of another. The other feature does not need to have the\n"
37391 : "same :py:class:`FeatureDefn`. Field values are copied according to the provided\n"
37392 : "indices map. Field types do not have to exactly match.\n"
37393 : "OGR_F_SetField\\*() function conversion rules will be applied as needed.\n"
37394 : "This is more efficient than :py:meth:SetFrom` in that this doesn't\n"
37395 : "lookup the fields by their names. Particularly useful when the field\n"
37396 : "names don't match.\n"
37397 : "\n"
37398 : "See :cpp:func:`OGRFeature::SetFrom`.\n"
37399 : "\n"
37400 : "Parameters\n"
37401 : "-----------\n"
37402 : "other : Feature\n"
37403 : " handle to the feature from which geometry, and field\n"
37404 : " values will be copied.\n"
37405 : "forgiving : bool\n"
37406 : " ``True`` if the operation should continue despite lacking\n"
37407 : " output fields matching some of the source fields.\n"
37408 : "nList : list\n"
37409 : " Array of the indices of the destination feature's fields\n"
37410 : " stored at the corresponding index of the source feature's fields. A\n"
37411 : " value of -1 should be used to ignore the source's field. The array\n"
37412 : " should not be NULL and be as long as the number of fields in the\n"
37413 : " source feature.\n"
37414 : "\n"
37415 : "Returns\n"
37416 : "--------\n"
37417 : "OGRErr:\n"
37418 : " :py:const:`OGRERR_NONE` if the operation succeeds, even if some values are not\n"
37419 : " transferred, otherwise an error code.\n"
37420 : "\n"
37421 : ""},
37422 : { "Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_O, "\n"
37423 : "Feature_GetStyleString(Feature self) -> char const *\n"
37424 : "\n"
37425 : "\n"
37426 : "Fetch style string for this feature.\n"
37427 : "\n"
37428 : "Set the OGR Feature Style Specification for details on the format of\n"
37429 : "this string, and :source_file:`ogr/ogr_featurestyle.h` for services available to parse\n"
37430 : "it.\n"
37431 : "\n"
37432 : "See :cpp:func:`OGRFeature::GetStyleString`.\n"
37433 : "\n"
37434 : "Returns\n"
37435 : "--------\n"
37436 : "str or None\n"
37437 : "\n"
37438 : ""},
37439 : { "Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, "\n"
37440 : "Feature_SetStyleString(Feature self, char const * the_string)\n"
37441 : "\n"
37442 : "\n"
37443 : "Set feature style string.\n"
37444 : "\n"
37445 : "See :cpp:func:`OGRFeature::SetStyleString`.\n"
37446 : "\n"
37447 : "Parameters\n"
37448 : "-----------\n"
37449 : "the_string : str\n"
37450 : " the style string to apply to this feature\n"
37451 : "\n"
37452 : ""},
37453 : { "Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, "\n"
37454 : "Feature_GetFieldType(Feature self, int id) -> OGRFieldType\n"
37455 : "Feature_GetFieldType(Feature self, char const * field_name) -> OGRFieldType\n"
37456 : "\n"
37457 : "\n"
37458 : "Return the type of the given field.\n"
37459 : "\n"
37460 : "Parameters\n"
37461 : "-----------\n"
37462 : "fld_index : int / str\n"
37463 : " Field name or 0-based numeric index. For repeated\n"
37464 : " access, use of the numeric index avoids a lookup\n"
37465 : " step.\n"
37466 : "\n"
37467 : "Returns\n"
37468 : "--------\n"
37469 : "int\n"
37470 : " field type code (e.g., :py:const:`OFTInteger`)\n"
37471 : "\n"
37472 : ""},
37473 : { "Feature_Validate", _wrap_Feature_Validate, METH_VARARGS, "\n"
37474 : "Feature_Validate(Feature self, int flags=OGR_F_VAL_ALL, int bEmitError=TRUE) -> int\n"
37475 : "\n"
37476 : "\n"
37477 : "Validate that a feature meets constraints of its schema.\n"
37478 : "\n"
37479 : "The scope of test is specified with the ``flags`` parameter.\n"
37480 : "\n"
37481 : "Regarding :py:const:`OGR_F_VAL_WIDTH`, the test is done assuming the string\n"
37482 : "width must be interpreted as the number of UTF-8 characters. Some drivers might\n"
37483 : "interpret the width as the number of bytes instead. So this test is rather\n"
37484 : "conservative (if it fails, then it will fail for all interpretations).\n"
37485 : "\n"
37486 : "See :cpp:func:`OGRFeature::Validate`.\n"
37487 : "\n"
37488 : "Parameters\n"
37489 : "-----------\n"
37490 : "flags : int, default = :py:const:`F_VAL_ALL`\n"
37491 : " One ore more of :py:const:`OGR_F_VAL_NULL`,\n"
37492 : " :py:const:`OGR_F_VAL_GEOM_TYPE`, py:const:`OGR_F_VAL_WIDTH` and\n"
37493 : " :py:const:`OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT` combined with\n"
37494 : " the with ``|`` operator\n"
37495 : "bEmitError : bool, default = True\n"
37496 : " TRUE if a CPLError() must be emitted when a check fails\n"
37497 : "\n"
37498 : "Returns\n"
37499 : "-------\n"
37500 : "int:\n"
37501 : " TRUE if all enabled validation tests pass.\n"
37502 : "\n"
37503 : ""},
37504 : { "Feature_FillUnsetWithDefault", _wrap_Feature_FillUnsetWithDefault, METH_VARARGS, "\n"
37505 : "Feature_FillUnsetWithDefault(Feature self, int bNotNullableOnly=FALSE, char ** options=None)\n"
37506 : "\n"
37507 : "\n"
37508 : "Fill unset fields with default values that might be defined.\n"
37509 : "\n"
37510 : "See :cpp:func:`OGRFeature::FillUnsetWithDefault`.\n"
37511 : "\n"
37512 : "Parameters\n"
37513 : "-----------\n"
37514 : "bNotNullableOnly : bool\n"
37515 : " if we should fill only unset fields with a not-null\n"
37516 : " constraint.\n"
37517 : "options : dict\n"
37518 : " unused currently.\n"
37519 : "\n"
37520 : ""},
37521 : { "Feature_GetNativeData", _wrap_Feature_GetNativeData, METH_O, "\n"
37522 : "Feature_GetNativeData(Feature self) -> char const *\n"
37523 : "\n"
37524 : "\n"
37525 : "Returns the native data for the feature.\n"
37526 : "\n"
37527 : "The native data is the representation in a \"natural\" form that comes\n"
37528 : "from the driver that created this feature, or that is aimed at an\n"
37529 : "output driver. The native data may be in different format, which is\n"
37530 : "indicated by :py:func:`GetNativeMediaType`.\n"
37531 : "\n"
37532 : "Note that most drivers do not support storing the native data in the\n"
37533 : "feature object, and if they do, generally the ``NATIVE_DATA`` open option\n"
37534 : "must be passed at dataset opening.\n"
37535 : "\n"
37536 : "The \"native data\" does not imply it is something more performant or\n"
37537 : "powerful than what can be obtained with the rest of the API, but it\n"
37538 : "may be useful in round-tripping scenarios where some characteristics\n"
37539 : "of the underlying format are not captured otherwise by the OGR\n"
37540 : "abstraction.\n"
37541 : "\n"
37542 : "See :cpp:func:`OGRFeature::GetNativeData` and :ref:`rfc-60`.\n"
37543 : "\n"
37544 : "Returns\n"
37545 : "-------\n"
37546 : "str:\n"
37547 : " a string with the native data, or ``None``.\n"
37548 : "\n"
37549 : ""},
37550 : { "Feature_GetNativeMediaType", _wrap_Feature_GetNativeMediaType, METH_O, "\n"
37551 : "Feature_GetNativeMediaType(Feature self) -> char const *\n"
37552 : "\n"
37553 : "\n"
37554 : "Returns the native media type for the feature.\n"
37555 : "\n"
37556 : "The native media type is the identifier for the format of the native\n"
37557 : "data. It follows the IANA RFC 2045\n"
37558 : "(see https://en.wikipedia.org/wiki/Media_type), e.g.\n"
37559 : "\"application/vnd.geo+json\" for JSon.\n"
37560 : "\n"
37561 : "See :cpp:func:`OGRFeature::GetNativeMediaType` and :ref:`rfc-60`.\n"
37562 : "\n"
37563 : "Returns\n"
37564 : "--------\n"
37565 : "str:\n"
37566 : " a string with the native media type, or ``None``.\n"
37567 : "\n"
37568 : ""},
37569 : { "Feature_SetNativeData", _wrap_Feature_SetNativeData, METH_VARARGS, "\n"
37570 : "Feature_SetNativeData(Feature self, char const * nativeData)\n"
37571 : "\n"
37572 : "\n"
37573 : "Sets the native data for the feature.\n"
37574 : "\n"
37575 : "The native data is the representation in a \"natural\" form that comes\n"
37576 : "from the driver that created this feature, or that is aimed at an\n"
37577 : "output driver. The native data may be in different format, which is\n"
37578 : "indicated by :py:meth:`GetNativeMediaType`.\n"
37579 : "\n"
37580 : "See :cpp:func:`OGRFeature::SetNativeData` and :ref:`rfc-60`.\n"
37581 : "\n"
37582 : "Parameters\n"
37583 : "-----------\n"
37584 : "nativeData : str\n"
37585 : " a string with the native data, or ``None``\n"
37586 : "\n"
37587 : ""},
37588 : { "Feature_SetNativeMediaType", _wrap_Feature_SetNativeMediaType, METH_VARARGS, "\n"
37589 : "Feature_SetNativeMediaType(Feature self, char const * nativeMediaType)\n"
37590 : "\n"
37591 : "\n"
37592 : "Sets the native media type for the feature.\n"
37593 : "\n"
37594 : "The native media type is the identifier for the format of the native\n"
37595 : "data. It follows the IANA RFC 2045\n"
37596 : "(see https://en.wikipedia.org/wiki/Media_type), e.g.\n"
37597 : "\"application/vnd.geo+json\" for JSon.\n"
37598 : "\n"
37599 : "See :cpp:func:`OGRFeature::SetNativeMediaType` and :ref:`rfc-60`.\n"
37600 : "\n"
37601 : "Parameters\n"
37602 : "-----------\n"
37603 : "nativeMediaType : str\n"
37604 : " a string with the native media type, or ``None``\n"
37605 : "\n"
37606 : ""},
37607 : { "Feature_SetFieldString", _wrap_Feature_SetFieldString, METH_VARARGS, "\n"
37608 : "Feature_SetFieldString(Feature self, int id, char const * value)\n"
37609 : "\n"
37610 : "\n"
37611 : "Set field to string value.\n"
37612 : "\n"
37613 : ":py:const:`OFTInteger` fields will be set based on an atoi() conversion of the\n"
37614 : "string. :py:const:`OFTInteger64` fields will be set based on an :cpp:func:`CPLAtoGIntBig`\n"
37615 : "conversion of the string. :py:const:`OFTReal` fields will be set based on an\n"
37616 : ":cpp:func:`CPLAtof` conversion of the string. Other field types may be\n"
37617 : "unaffected.\n"
37618 : "\n"
37619 : "See :cpp:func:`OGRFeature::SetField`.\n"
37620 : "\n"
37621 : "This method has only an effect on the in-memory feature object. If\n"
37622 : "this object comes from a layer and the modifications must be\n"
37623 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
37624 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
37625 : "used afterwards.\n"
37626 : "\n"
37627 : "Parameters\n"
37628 : "-----------\n"
37629 : "fld_index : int / str\n"
37630 : " Field name or 0-based numeric index. For repeated\n"
37631 : " access, use of the numeric index avoids a lookup\n"
37632 : " step.\n"
37633 : "value:\n"
37634 : " the value to assign.\n"
37635 : "\n"
37636 : ""},
37637 : { "Feature_swigregister", Feature_swigregister, METH_O, NULL},
37638 : { "Feature_swiginit", Feature_swiginit, METH_VARARGS, NULL},
37639 : { "delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_O, "delete_FeatureDefn(FeatureDefn self)"},
37640 : { "new_FeatureDefn", (PyCFunction)(void(*)(void))_wrap_new_FeatureDefn, METH_VARARGS|METH_KEYWORDS, "\n"
37641 : "new_FeatureDefn(char const * name_null_ok=None) -> FeatureDefn\n"
37642 : "\n"
37643 : "\n"
37644 : "Create a new feature definition object to hold the field definitions.\n"
37645 : "\n"
37646 : "Parameters\n"
37647 : "----------\n"
37648 : "name_null_ok : str, optional\n"
37649 : " Name for the :py:class:`FeatureDefn`.\n"
37650 : "\n"
37651 : ""},
37652 : { "FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_O, "\n"
37653 : "FeatureDefn_GetName(FeatureDefn self) -> char const *\n"
37654 : "\n"
37655 : "\n"
37656 : "Get name of the :py:class:`FeatureDefn`.\n"
37657 : "\n"
37658 : "See :cpp:func:`OGRFeatureDefn::GetName`.\n"
37659 : "\n"
37660 : "Returns\n"
37661 : "--------\n"
37662 : "str:\n"
37663 : " the name\n"
37664 : "\n"
37665 : ""},
37666 : { "FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_O, "\n"
37667 : "FeatureDefn_GetFieldCount(FeatureDefn self) -> int\n"
37668 : "\n"
37669 : "\n"
37670 : "Fetch number of fields on the passed feature definition.\n"
37671 : "\n"
37672 : "See :cpp:func:`OGRFeatureDefn::GetFieldCount`.\n"
37673 : "\n"
37674 : "Returns\n"
37675 : "--------\n"
37676 : "int:\n"
37677 : " count of fields.\n"
37678 : "\n"
37679 : ""},
37680 : { "FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, "\n"
37681 : "FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\n"
37682 : "\n"
37683 : "\n"
37684 : "Fetch field definition of the passed feature definition.\n"
37685 : "\n"
37686 : "See :cpp:func:`OGRFeatureDefn::GetFieldDefn`.\n"
37687 : "\n"
37688 : "Parameters\n"
37689 : "-----------\n"
37690 : "i : int / str\n"
37691 : " Field name or 0-based numeric index. For repeated\n"
37692 : " access, use of the numeric index avoids a lookup\n"
37693 : " step.\n"
37694 : "\n"
37695 : "Returns\n"
37696 : "--------\n"
37697 : "FieldDefn:\n"
37698 : " internal field definition object or ``None`` if the field does not\n"
37699 : " exist. This object should not be modified by the application.\n"
37700 : "\n"
37701 : ""},
37702 : { "FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, "\n"
37703 : "FeatureDefn_GetFieldIndex(FeatureDefn self, char const * field_name) -> int\n"
37704 : "\n"
37705 : "\n"
37706 : "Find field by name.\n"
37707 : "\n"
37708 : "The field index of the first field matching the passed field name\n"
37709 : "(case insensitively) is returned.\n"
37710 : "\n"
37711 : "See :cpp:func:`OGRFeatureDefn::GetFieldIndex`.\n"
37712 : "\n"
37713 : "Parameters\n"
37714 : "-----------\n"
37715 : "field_name : str\n"
37716 : " the field name to search for.\n"
37717 : "\n"
37718 : "Returns\n"
37719 : "--------\n"
37720 : "int:\n"
37721 : " the field index, or -1 if no match found.\n"
37722 : "\n"
37723 : ""},
37724 : { "FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, "\n"
37725 : "FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\n"
37726 : "\n"
37727 : "\n"
37728 : "Add a new field definition.\n"
37729 : "\n"
37730 : "To add a new field definition to a layer definition, do not use this\n"
37731 : "function directly, but use :py:meth:`Layer.CreateField` instead.\n"
37732 : "\n"
37733 : "This function should only be called while there are no :py:class:`Feature`\n"
37734 : "objects in existence based on this :py:class:`FeatureDefn`. The\n"
37735 : ":py:class:`FieldDefn` passed in is copied.\n"
37736 : "\n"
37737 : "See :cpp:func:`OGRFeatureDefn::AddFieldDefn`.\n"
37738 : "\n"
37739 : "Parameters\n"
37740 : "-----------\n"
37741 : "defn : FieldDefn\n"
37742 : " the new field definition.\n"
37743 : "\n"
37744 : ""},
37745 : { "FeatureDefn_GetGeomFieldCount", _wrap_FeatureDefn_GetGeomFieldCount, METH_O, "\n"
37746 : "FeatureDefn_GetGeomFieldCount(FeatureDefn self) -> int\n"
37747 : "\n"
37748 : "\n"
37749 : "Fetch number of geometry fields on the passed feature definition.\n"
37750 : "\n"
37751 : "See :cpp:func:`OGRFeatureDefn::GetGeomFieldCount`.\n"
37752 : "\n"
37753 : "Returns\n"
37754 : "--------\n"
37755 : "int:\n"
37756 : " count of geometry fields.\n"
37757 : "\n"
37758 : ""},
37759 : { "FeatureDefn_GetGeomFieldDefn", _wrap_FeatureDefn_GetGeomFieldDefn, METH_VARARGS, "\n"
37760 : "FeatureDefn_GetGeomFieldDefn(FeatureDefn self, int i) -> GeomFieldDefn\n"
37761 : "\n"
37762 : "\n"
37763 : "Fetch geometry field definition of the passed feature definition.\n"
37764 : "\n"
37765 : "See :cpp:func:`OGRFeatureDefn::GetGeomFieldDefn`.\n"
37766 : "\n"
37767 : "Parameters\n"
37768 : "-----------\n"
37769 : "i : int\n"
37770 : " the geometry field to fetch, between 0 and GetGeomFieldCount() - 1.\n"
37771 : "\n"
37772 : "Returns\n"
37773 : "--------\n"
37774 : "GeomFieldDefn:\n"
37775 : " an internal field definition object or ``None`` if invalid\n"
37776 : " index. This object should not be modified by the application.\n"
37777 : "\n"
37778 : ""},
37779 : { "FeatureDefn_GetGeomFieldIndex", _wrap_FeatureDefn_GetGeomFieldIndex, METH_VARARGS, "\n"
37780 : "FeatureDefn_GetGeomFieldIndex(FeatureDefn self, char const * field_name) -> int\n"
37781 : "\n"
37782 : "\n"
37783 : "Find geometry field by name.\n"
37784 : "\n"
37785 : "The geometry field index of the first geometry field matching the\n"
37786 : "passed field name (case insensitively) is returned.\n"
37787 : "\n"
37788 : "See :cpp:func:`OGRFeatureDefn::GetGeomFieldIndex`.\n"
37789 : "\n"
37790 : "Parameters\n"
37791 : "-----------\n"
37792 : "field_name : str\n"
37793 : " the geometry field name to search for.\n"
37794 : "\n"
37795 : "Returns\n"
37796 : "--------\n"
37797 : "int:\n"
37798 : " the geometry field index, or -1 if no match found.\n"
37799 : "\n"
37800 : ""},
37801 : { "FeatureDefn_AddGeomFieldDefn", _wrap_FeatureDefn_AddGeomFieldDefn, METH_VARARGS, "\n"
37802 : "FeatureDefn_AddGeomFieldDefn(FeatureDefn self, GeomFieldDefn defn)\n"
37803 : "\n"
37804 : "\n"
37805 : "Add a new geometry field definition.\n"
37806 : "\n"
37807 : "To add a new field definition to a layer definition, do not use this\n"
37808 : "function directly, but use :py:meth:`Layer.CreateGeomField` instead.\n"
37809 : "\n"
37810 : "This function should only be called while there are no :py:class:`Feature`\n"
37811 : "objects in existence based on this :py:class:`FeatureDefn`. The\n"
37812 : ":py:class:`GeomFieldDefn` passed in is copied.\n"
37813 : "\n"
37814 : "See :cpp:Func:`OGRFeatureDefn::AddGeomFieldDefn`.\n"
37815 : "\n"
37816 : "Parameters\n"
37817 : "-----------\n"
37818 : "defn : GeomFieldDefn\n"
37819 : " new geometry field definition.\n"
37820 : "\n"
37821 : ""},
37822 : { "FeatureDefn_DeleteGeomFieldDefn", _wrap_FeatureDefn_DeleteGeomFieldDefn, METH_VARARGS, "\n"
37823 : "FeatureDefn_DeleteGeomFieldDefn(FeatureDefn self, int idx) -> OGRErr\n"
37824 : "\n"
37825 : "\n"
37826 : "Delete an existing geometry field definition.\n"
37827 : "\n"
37828 : "To delete an existing geometry field definition from a layer\n"
37829 : "definition, do not use this function directly, but use\n"
37830 : ":py:meth:`Layer.DeleteGeomField` instead ( not implemented yet).\n"
37831 : "\n"
37832 : "This function should only be called while there are no :py:class:`Feature`\n"
37833 : "objects in existence based on this :py:class:`FeatureDefn`.\n"
37834 : "\n"
37835 : "See :cpp:func:`OGRFeatureDefn::DeleteGeomFieldDefn`.\n"
37836 : "\n"
37837 : "Parameters\n"
37838 : "-----------\n"
37839 : "idx : int\n"
37840 : " the index of the geometry field definition.\n"
37841 : "\n"
37842 : "Returns\n"
37843 : "--------\n"
37844 : "int:\n"
37845 : " :py:const:`OGRERR_NONE` in case of success.\n"
37846 : "\n"
37847 : ""},
37848 : { "FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_O, "\n"
37849 : "FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\n"
37850 : "\n"
37851 : "\n"
37852 : "Fetch the geometry base type of the passed feature definition.\n"
37853 : "\n"
37854 : "This is equivalent to ``GetGeomFieldDefn(0).GetType()``.\n"
37855 : "\n"
37856 : "See :cpp:func:`OGRFeatureDefn::GetGeomType`.\n"
37857 : "\n"
37858 : "Returns\n"
37859 : "--------\n"
37860 : "int :\n"
37861 : " the base type for all geometry related to this definition.\n"
37862 : "\n"
37863 : ""},
37864 : { "FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, "\n"
37865 : "FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\n"
37866 : "\n"
37867 : "\n"
37868 : "Assign the base geometry type for the passed layer (the same as the\n"
37869 : "feature definition).\n"
37870 : "\n"
37871 : "This is equivalent to ``GetGeomFieldDefn(0).SetType()``.\n"
37872 : "\n"
37873 : "All geometry objects using this type must be of the defined type or a\n"
37874 : "derived type. The default upon creation is :py:const:`wkbUnknown` which allows for\n"
37875 : "any geometry type. The geometry type should generally not be changed\n"
37876 : "after any :py:class:`Feature` objects have been created against this definition.\n"
37877 : "\n"
37878 : "See :cpp:func:`OGRFeatureDefn::SetGeomType`.\n"
37879 : "\n"
37880 : "Parameters\n"
37881 : "-----------\n"
37882 : "geom_type : int\n"
37883 : " the new type to assign.\n"
37884 : "\n"
37885 : ""},
37886 : { "FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_O, "\n"
37887 : "FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\n"
37888 : "\n"
37889 : "\n"
37890 : "Fetch current reference count.\n"
37891 : "\n"
37892 : "See :cpp:func:`OGRFeatureDefn::GetReferenceCount`.\n"
37893 : "\n"
37894 : "Returns\n"
37895 : "--------\n"
37896 : "int:\n"
37897 : " the current reference count.\n"
37898 : "\n"
37899 : ""},
37900 : { "FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_O, "\n"
37901 : "FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\n"
37902 : "\n"
37903 : "\n"
37904 : "Determine whether the geometry can be omitted when fetching features.\n"
37905 : "\n"
37906 : "Equivalent to ``GetGeomFieldDefn(0).IsIgnored()``.\n"
37907 : "\n"
37908 : "See :cpp:func:`OGRFeatureDefn::IsGeometryIgnored`.\n"
37909 : "\n"
37910 : "Returns\n"
37911 : "--------\n"
37912 : "int:\n"
37913 : " ignore state\n"
37914 : "\n"
37915 : ""},
37916 : { "FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, "\n"
37917 : "FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\n"
37918 : "\n"
37919 : "\n"
37920 : "Set whether the geometry can be omitted when fetching features.\n"
37921 : "\n"
37922 : "This is equivalent to ``GetGeomFieldDefn(0).SetIgnored()``.\n"
37923 : "\n"
37924 : "See :cpp:func:`OGRFeatureDefn::SetGeometryIgnored`.\n"
37925 : "\n"
37926 : "Parameters\n"
37927 : "-----------\n"
37928 : "bignored : bool\n"
37929 : " ignore state\n"
37930 : "\n"
37931 : ""},
37932 : { "FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_O, "\n"
37933 : "FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\n"
37934 : "\n"
37935 : "\n"
37936 : "Determine whether the style can be omitted when fetching features.\n"
37937 : "\n"
37938 : "See :cpp:func:`OGRFeatureDefn::IsStyleIgnored`.\n"
37939 : "\n"
37940 : "Returns\n"
37941 : "--------\n"
37942 : "int:\n"
37943 : " ignore state\n"
37944 : "\n"
37945 : ""},
37946 : { "FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, "\n"
37947 : "FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\n"
37948 : "\n"
37949 : "\n"
37950 : "Set whether the style can be omitted when fetching features.\n"
37951 : "\n"
37952 : "See :cpp:func:`OGRFeatureDefn::SetStyleIgnored`.\n"
37953 : "\n"
37954 : "Parameters\n"
37955 : "-----------\n"
37956 : "bignored : bool\n"
37957 : " ignore state\n"
37958 : "\n"
37959 : ""},
37960 : { "FeatureDefn_IsSame", _wrap_FeatureDefn_IsSame, METH_VARARGS, "\n"
37961 : "FeatureDefn_IsSame(FeatureDefn self, FeatureDefn other_defn) -> int\n"
37962 : "\n"
37963 : "\n"
37964 : "Test if the feature definition is identical to the other one.\n"
37965 : "\n"
37966 : "Parameters\n"
37967 : "-----------\n"
37968 : "other_defn : FeatureDefn\n"
37969 : " other feature definition to compare to.\n"
37970 : "\n"
37971 : "Returns\n"
37972 : "--------\n"
37973 : "int:\n"
37974 : " 1 if the feature definition is identical to the other one.\n"
37975 : "\n"
37976 : ""},
37977 : { "FeatureDefn_swigregister", FeatureDefn_swigregister, METH_O, NULL},
37978 : { "FeatureDefn_swiginit", FeatureDefn_swiginit, METH_VARARGS, NULL},
37979 : { "delete_FieldDefn", _wrap_delete_FieldDefn, METH_O, "delete_FieldDefn(FieldDefn self)"},
37980 : { "new_FieldDefn", (PyCFunction)(void(*)(void))_wrap_new_FieldDefn, METH_VARARGS|METH_KEYWORDS, "\n"
37981 : "new_FieldDefn(char const * name_null_ok=\"unnamed\", OGRFieldType field_type=OFTString) -> FieldDefn\n"
37982 : "\n"
37983 : "Python proxy of an :cpp:class:`OGRFieldDefn`.\n"
37984 : "\n"
37985 : ""},
37986 : { "FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_O, "FieldDefn_GetName(FieldDefn self) -> char const *"},
37987 : { "FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_O, "\n"
37988 : "FieldDefn_GetNameRef(FieldDefn self) -> char const *\n"
37989 : "\n"
37990 : "\n"
37991 : "Fetch name of this field.\n"
37992 : "\n"
37993 : "See :cpp:func:`OGRFieldDefn::GetNameRef`.\n"
37994 : "\n"
37995 : "Returns\n"
37996 : "--------\n"
37997 : "str:\n"
37998 : " the name of the field definition.\n"
37999 : "\n"
38000 : ""},
38001 : { "FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, "\n"
38002 : "FieldDefn_SetName(FieldDefn self, char const * name)\n"
38003 : "\n"
38004 : "\n"
38005 : "Reset the name of this field.\n"
38006 : "\n"
38007 : "See :cpp:func:`OGRFieldDefn::SetName`.\n"
38008 : "\n"
38009 : "Parameters\n"
38010 : "-----------\n"
38011 : "name : str\n"
38012 : " the new name to apply\n"
38013 : "\n"
38014 : ""},
38015 : { "FieldDefn_GetAlternativeName", _wrap_FieldDefn_GetAlternativeName, METH_O, "FieldDefn_GetAlternativeName(FieldDefn self) -> char const *"},
38016 : { "FieldDefn_GetAlternativeNameRef", _wrap_FieldDefn_GetAlternativeNameRef, METH_O, "\n"
38017 : "FieldDefn_GetAlternativeNameRef(FieldDefn self) -> char const *\n"
38018 : "\n"
38019 : "\n"
38020 : "Fetch the alternative name (or \"alias\") for this field.\n"
38021 : "\n"
38022 : "The alternative name is an optional attribute for a field which can\n"
38023 : "provide a more user-friendly, descriptive name of a field which is not\n"
38024 : "subject to the usual naming constraints defined by the data provider.\n"
38025 : "\n"
38026 : "This is a metadata style attribute only: the alternative name cannot\n"
38027 : "be used in place of the actual field name during SQL queries or other\n"
38028 : "field name dependent API calls.\n"
38029 : "\n"
38030 : "See :cpp:func:`OGRFieldDefn::GetAlternativeNameRef`.\n"
38031 : "\n"
38032 : ".. versionadded:: 3.2\n"
38033 : "\n"
38034 : "Returns\n"
38035 : "--------\n"
38036 : "str:\n"
38037 : " the alternative name of the field definition.\n"
38038 : "\n"
38039 : ""},
38040 : { "FieldDefn_SetAlternativeName", _wrap_FieldDefn_SetAlternativeName, METH_VARARGS, "\n"
38041 : "FieldDefn_SetAlternativeName(FieldDefn self, char const * alternativeName)\n"
38042 : "\n"
38043 : "\n"
38044 : "Reset the alternative name (or \"alias\") for this field.\n"
38045 : "\n"
38046 : "The alternative name is an optional attribute for a field which can\n"
38047 : "provide a more user-friendly, descriptive name of a field which is not\n"
38048 : "subject to the usual naming constraints defined by the data provider.\n"
38049 : "\n"
38050 : "This is a metadata style attribute only: the alternative name cannot\n"
38051 : "be used in place of the actual field name during SQL queries or other\n"
38052 : "field name dependent API calls.\n"
38053 : "\n"
38054 : "See :cpp:func:`OGRFieldDefn::SetAlternativeName`.\n"
38055 : "\n"
38056 : ".. versionadded:: 3.2\n"
38057 : "\n"
38058 : "Parameters\n"
38059 : "-----------\n"
38060 : "alternativeName : str\n"
38061 : " the new alternative name to apply.\n"
38062 : "\n"
38063 : ""},
38064 : { "FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_O, "\n"
38065 : "FieldDefn_GetType(FieldDefn self) -> OGRFieldType\n"
38066 : "\n"
38067 : "\n"
38068 : "Fetch type of this field.\n"
38069 : "\n"
38070 : "See :cpp:func:`OGRFieldDefn::GetType`.\n"
38071 : "\n"
38072 : "Returns\n"
38073 : "--------\n"
38074 : "int\n"
38075 : " field type code, e.g. :py:const:`OFTInteger`\n"
38076 : "\n"
38077 : ""},
38078 : { "FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, "\n"
38079 : "FieldDefn_SetType(FieldDefn self, OGRFieldType type)\n"
38080 : "\n"
38081 : "\n"
38082 : "Set the type of this field.\n"
38083 : "\n"
38084 : "This should never be done to a :py:class:`FieldDefn` that is already part of\n"
38085 : "an :py:class:`FeatureDefn`.\n"
38086 : "\n"
38087 : "See :cpp:func:`OGRFieldDefn::SetType`.\n"
38088 : "\n"
38089 : "Parameters\n"
38090 : "-----------\n"
38091 : "type : int\n"
38092 : " the new field type.\n"
38093 : "\n"
38094 : "Examples\n"
38095 : "--------\n"
38096 : ">>> f = ogr.FieldDefn()\n"
38097 : ">>> f.SetType(ogr.OFTReal)\n"
38098 : "\n"
38099 : ""},
38100 : { "FieldDefn_GetSubType", _wrap_FieldDefn_GetSubType, METH_O, "\n"
38101 : "FieldDefn_GetSubType(FieldDefn self) -> OGRFieldSubType\n"
38102 : "\n"
38103 : "\n"
38104 : "Fetch subtype of this field.\n"
38105 : "\n"
38106 : "See :cpp:func:`OGRFieldDefn::GetSubType`.\n"
38107 : "\n"
38108 : "Returns\n"
38109 : "--------\n"
38110 : "int\n"
38111 : " field subtype code, default = :py:const:`OFSTNone`\n"
38112 : "\n"
38113 : ""},
38114 : { "FieldDefn_SetSubType", _wrap_FieldDefn_SetSubType, METH_VARARGS, "\n"
38115 : "FieldDefn_SetSubType(FieldDefn self, OGRFieldSubType type)\n"
38116 : "\n"
38117 : "\n"
38118 : "Set the subtype of this field.\n"
38119 : "\n"
38120 : "This should never be done to a :py:class:`FieldDefn` that is already part of\n"
38121 : "an :py:class:FeatureDefn`.\n"
38122 : "\n"
38123 : "See :cpp:func:`OGRFieldDefn::SetSubType`.\n"
38124 : "\n"
38125 : "Parameters\n"
38126 : "-----------\n"
38127 : "type :\n"
38128 : " the new field subtype.\n"
38129 : "\n"
38130 : "Examples\n"
38131 : "--------\n"
38132 : ">>> f = ogr.FieldDefn()\n"
38133 : ">>> f.SetType(ogr.OFTReal)\n"
38134 : ">>> f.SetSubType(ogr.OFSTJSON)\n"
38135 : "Warning 1: Type and subtype of field definition are not compatible. Resetting to OFSTNone\n"
38136 : ">>> f.SetSubType(ogr.OFSTFloat32)\n"
38137 : "\n"
38138 : ""},
38139 : { "FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_O, "\n"
38140 : "FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\n"
38141 : "\n"
38142 : "\n"
38143 : "Get the justification for this field.\n"
38144 : "\n"
38145 : "See :cpp:func:`OGRFieldDefn::GetJustify`.\n"
38146 : "\n"
38147 : "Note: no driver is know to use the concept of field justification.\n"
38148 : "\n"
38149 : "Returns\n"
38150 : "--------\n"
38151 : "OGRJustification:\n"
38152 : " the justification.\n"
38153 : "\n"
38154 : ""},
38155 : { "FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, "\n"
38156 : "FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\n"
38157 : "\n"
38158 : "\n"
38159 : "Set the justification for this field.\n"
38160 : "\n"
38161 : "Note: no driver is know to use the concept of field justification.\n"
38162 : "\n"
38163 : "See :cpp:func:`OGRFieldDefn::SetJustify`.\n"
38164 : "\n"
38165 : "Parameters\n"
38166 : "-----------\n"
38167 : "justify : int\n"
38168 : " the new justification\n"
38169 : "\n"
38170 : "Examples\n"
38171 : "--------\n"
38172 : ">>> f = ogr.FieldDefn('desc', ogr.OFTString)\n"
38173 : ">>> f.SetJustify(ogr.OJRight)\n"
38174 : "\n"
38175 : ""},
38176 : { "FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_O, "\n"
38177 : "FieldDefn_GetWidth(FieldDefn self) -> int\n"
38178 : "\n"
38179 : "\n"
38180 : "Get the formatting width for this field.\n"
38181 : "\n"
38182 : "See :cpp:func:`OGRFieldDefn::GetWidth`.\n"
38183 : "\n"
38184 : "Returns\n"
38185 : "--------\n"
38186 : "int:\n"
38187 : " the width, zero means no specified width.\n"
38188 : "\n"
38189 : ""},
38190 : { "FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, "\n"
38191 : "FieldDefn_SetWidth(FieldDefn self, int width)\n"
38192 : "\n"
38193 : "\n"
38194 : "Set the formatting width for this field in characters.\n"
38195 : "\n"
38196 : "See :cpp:func:`OGRFieldDefn::SetWidth`.\n"
38197 : "\n"
38198 : "Parameters\n"
38199 : "-----------\n"
38200 : "width : int\n"
38201 : " the new width\n"
38202 : "\n"
38203 : ""},
38204 : { "FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_O, "\n"
38205 : "FieldDefn_GetPrecision(FieldDefn self) -> int\n"
38206 : "\n"
38207 : "\n"
38208 : "Get the formatting precision for this field.\n"
38209 : "\n"
38210 : "This should normally be zero for fields of types other than :py:const:`OFTReal`.\n"
38211 : "\n"
38212 : "See :cpp:func:`OGRFieldDefn::GetPrecision`.\n"
38213 : "\n"
38214 : "Returns\n"
38215 : "--------\n"
38216 : "int:\n"
38217 : " the precision.\n"
38218 : "\n"
38219 : ""},
38220 : { "FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, "\n"
38221 : "FieldDefn_SetPrecision(FieldDefn self, int precision)\n"
38222 : "\n"
38223 : "\n"
38224 : "Set the formatting precision for this field in characters.\n"
38225 : "\n"
38226 : "This should normally be zero for fields of types other than :py:const:`OFTReal`.\n"
38227 : "\n"
38228 : "See :cpp:func:`OGRFieldDefn::SetPrecision`.\n"
38229 : "\n"
38230 : "Parameters\n"
38231 : "-----------\n"
38232 : "precision : int\n"
38233 : " the new precision.\n"
38234 : "\n"
38235 : ""},
38236 : { "FieldDefn_GetTZFlag", _wrap_FieldDefn_GetTZFlag, METH_O, "FieldDefn_GetTZFlag(FieldDefn self) -> int"},
38237 : { "FieldDefn_SetTZFlag", _wrap_FieldDefn_SetTZFlag, METH_VARARGS, "FieldDefn_SetTZFlag(FieldDefn self, int tzflag)"},
38238 : { "FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_O, "FieldDefn_GetTypeName(FieldDefn self) -> char const *"},
38239 : { "FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, "FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char const *"},
38240 : { "FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_O, "\n"
38241 : "FieldDefn_IsIgnored(FieldDefn self) -> int\n"
38242 : "\n"
38243 : "\n"
38244 : "Return whether this field should be omitted when fetching features.\n"
38245 : "\n"
38246 : "See :cpp:func:`OGRFieldDefn::IsIgnored`.\n"
38247 : "\n"
38248 : "Returns\n"
38249 : "--------\n"
38250 : "int:\n"
38251 : " ignore state\n"
38252 : "\n"
38253 : ""},
38254 : { "FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, "\n"
38255 : "FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\n"
38256 : "\n"
38257 : "\n"
38258 : "Set whether this field should be omitted when fetching features.\n"
38259 : "\n"
38260 : "See :cpp:func:`OGRFieldDefn::SetIgnored`.\n"
38261 : "\n"
38262 : "Parameters\n"
38263 : "-----------\n"
38264 : "bignored : bool\n"
38265 : " ignore state\n"
38266 : "\n"
38267 : ""},
38268 : { "FieldDefn_IsNullable", _wrap_FieldDefn_IsNullable, METH_O, "\n"
38269 : "FieldDefn_IsNullable(FieldDefn self) -> int\n"
38270 : "\n"
38271 : "\n"
38272 : "Return whether this field can receive null values.\n"
38273 : "\n"
38274 : "By default, fields are nullable.\n"
38275 : "\n"
38276 : "Even if this method returns FALSE (i.e not-nullable field), it doesn't\n"
38277 : "mean that :py:meth:`Feature.IsFieldSet` will necessary return TRUE, as\n"
38278 : "fields can be temporary unset and null/not-null validation is usually\n"
38279 : "done when :py:meth:`Layer.CreateFeature`/:py:meth:`Layer.SetFeature` is called.\n"
38280 : "\n"
38281 : "See :cpp:func:`OGRFieldDefn::IsNullable`.\n"
38282 : "\n"
38283 : "Returns\n"
38284 : "--------\n"
38285 : "int:\n"
38286 : " TRUE if the field is authorized to be null.\n"
38287 : "\n"
38288 : ""},
38289 : { "FieldDefn_SetNullable", _wrap_FieldDefn_SetNullable, METH_VARARGS, "\n"
38290 : "FieldDefn_SetNullable(FieldDefn self, int bNullable)\n"
38291 : "\n"
38292 : "\n"
38293 : "Set whether this field can receive null values.\n"
38294 : "\n"
38295 : "By default, fields are nullable, so this method is generally called\n"
38296 : "with ``False`` to set a not-null constraint.\n"
38297 : "\n"
38298 : "Drivers that support writing not-null constraint will advertise the\n"
38299 : "``GDAL_DCAP_NOTNULL_FIELDS`` driver metadata item.\n"
38300 : "\n"
38301 : "See :cpp:func:`OGRFieldDefn::SetNullable`.\n"
38302 : "\n"
38303 : "Parameters\n"
38304 : "-----------\n"
38305 : "bNullable : bool\n"
38306 : " ``False`` if the field must have a not-null constraint.\n"
38307 : "\n"
38308 : ""},
38309 : { "FieldDefn_IsUnique", _wrap_FieldDefn_IsUnique, METH_O, "\n"
38310 : "FieldDefn_IsUnique(FieldDefn self) -> int\n"
38311 : "\n"
38312 : "\n"
38313 : "Return whether this field has a unique constraint.\n"
38314 : "\n"
38315 : "By default, fields have no unique constraint.\n"
38316 : "\n"
38317 : "See :cpp:func:`OGRFieldDefn::IsUnique`.\n"
38318 : "\n"
38319 : ".. versionadded:: 3.2\n"
38320 : "\n"
38321 : "Returns\n"
38322 : "--------\n"
38323 : "int:\n"
38324 : " TRUE if the field has a unique constraint.\n"
38325 : "\n"
38326 : ""},
38327 : { "FieldDefn_SetUnique", _wrap_FieldDefn_SetUnique, METH_VARARGS, "\n"
38328 : "FieldDefn_SetUnique(FieldDefn self, int bUnique)\n"
38329 : "\n"
38330 : "\n"
38331 : "Set whether this field has a unique constraint.\n"
38332 : "\n"
38333 : "By default, fields have no unique constraint, so this method is\n"
38334 : "generally called with TRUE to set a unique constraint.\n"
38335 : "\n"
38336 : "Drivers that support writing unique constraint will advertise the\n"
38337 : "``GDAL_DCAP_UNIQUE_FIELDS`` driver metadata item.\n"
38338 : "\n"
38339 : "Note that once a :py:class:`FieldDefn` has been added to a layer definition with\n"
38340 : ":py:meth:`Layer.AddFieldDefn`, its setter methods should not be called on the\n"
38341 : "object returned with ``GetLayerDefn().GetFieldDefn()``. Instead,\n"
38342 : ":py:meth:`Layer::AlterFieldDefn` should be called on a new instance of\n"
38343 : ":py:class:`FieldDefn`, for drivers that support :py:meth:`Layer.AlterFieldDefn`.\n"
38344 : "\n"
38345 : "See :cpp:func:`OGRFieldDefn::SetUnique`.\n"
38346 : "\n"
38347 : ".. versionadded:: 3.2\n"
38348 : "\n"
38349 : "Parameters\n"
38350 : "-----------\n"
38351 : "bUnique : bool\n"
38352 : " ``True`` if the field must have a unique constraint\n"
38353 : "\n"
38354 : ""},
38355 : { "FieldDefn_IsGenerated", _wrap_FieldDefn_IsGenerated, METH_O, "FieldDefn_IsGenerated(FieldDefn self) -> int"},
38356 : { "FieldDefn_SetGenerated", _wrap_FieldDefn_SetGenerated, METH_VARARGS, "FieldDefn_SetGenerated(FieldDefn self, int bGenerated)"},
38357 : { "FieldDefn_GetDefault", _wrap_FieldDefn_GetDefault, METH_O, "\n"
38358 : "FieldDefn_GetDefault(FieldDefn self) -> char const *\n"
38359 : "\n"
38360 : "\n"
38361 : "Get default field value.\n"
38362 : "\n"
38363 : "See :cpp:func:`OGRFieldDefn::GetDefault`.\n"
38364 : "\n"
38365 : "Returns\n"
38366 : "--------\n"
38367 : "str:\n"
38368 : " default field value or ``None``.\n"
38369 : "\n"
38370 : ""},
38371 : { "FieldDefn_SetDefault", _wrap_FieldDefn_SetDefault, METH_VARARGS, "\n"
38372 : "FieldDefn_SetDefault(FieldDefn self, char const * pszValue)\n"
38373 : "\n"
38374 : "\n"
38375 : "Set default field value.\n"
38376 : "\n"
38377 : "The default field value is taken into account by drivers (generally\n"
38378 : "those with a SQL interface) that support it at field creation time.\n"
38379 : "OGR will generally not automatically set the default field value to\n"
38380 : "null fields by itself when calling OGRFeature::CreateFeature() /\n"
38381 : "OGRFeature::SetFeature(), but will let the low-level layers to do the\n"
38382 : "job. So retrieving the feature from the layer is recommended.\n"
38383 : "\n"
38384 : "The accepted values are NULL, a numeric value, a literal value\n"
38385 : "enclosed between single quote characters (and inner single quote\n"
38386 : "characters escaped by repetition of the single quote character),\n"
38387 : "CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or a driver specific\n"
38388 : "expression (that might be ignored by other drivers). For a datetime\n"
38389 : "literal value, format should be 'YYYY/MM/DD HH:MM:SS[.sss]'\n"
38390 : "(considered as UTC time).\n"
38391 : "\n"
38392 : "Drivers that support writing DEFAULT clauses will advertise the\n"
38393 : "GDAL_DCAP_DEFAULT_FIELDS driver metadata item.\n"
38394 : "\n"
38395 : "See :cpp:func:`OGRFieldDefn::SetDefault`.\n"
38396 : "\n"
38397 : "Parameters\n"
38398 : "-----------\n"
38399 : "pszValue : str\n"
38400 : " new default field value or NULL pointer.\n"
38401 : "\n"
38402 : ""},
38403 : { "FieldDefn_IsDefaultDriverSpecific", _wrap_FieldDefn_IsDefaultDriverSpecific, METH_O, "\n"
38404 : "FieldDefn_IsDefaultDriverSpecific(FieldDefn self) -> int\n"
38405 : "\n"
38406 : "\n"
38407 : "Returns whether the default value is driver specific.\n"
38408 : "\n"
38409 : "Driver specific default values are those that are not NULL, a numeric\n"
38410 : "value, a literal value enclosed between single quote characters,\n"
38411 : "CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or datetime literal\n"
38412 : "value.\n"
38413 : "\n"
38414 : "See :cpp:func:`OGRFieldDefn::IsDefaultDriverSpecific`.\n"
38415 : "\n"
38416 : "Returns\n"
38417 : "--------\n"
38418 : "int:\n"
38419 : " TRUE if the default value is driver specific.\n"
38420 : "\n"
38421 : ""},
38422 : { "FieldDefn_GetDomainName", _wrap_FieldDefn_GetDomainName, METH_O, "\n"
38423 : "FieldDefn_GetDomainName(FieldDefn self) -> char const *\n"
38424 : "\n"
38425 : "\n"
38426 : "Return the name of the field domain for this field.\n"
38427 : "\n"
38428 : "By default an empty string is returned.\n"
38429 : "\n"
38430 : "Field domains ( :py:class:`FieldDomain` class) are attached at the :py:class:`Dataset` level and should be retrieved with :py:meth:`Dataset.GetFieldDomain`.\n"
38431 : "\n"
38432 : "See :cpp:func:`OGRFieldDefn::GetDomainName`.\n"
38433 : "\n"
38434 : ".. versionadded:: 3.3\n"
38435 : "\n"
38436 : "Returns\n"
38437 : "--------\n"
38438 : "str:\n"
38439 : " the field domain name, or an empty string if there is none.\n"
38440 : "\n"
38441 : ""},
38442 : { "FieldDefn_SetDomainName", _wrap_FieldDefn_SetDomainName, METH_VARARGS, "\n"
38443 : "FieldDefn_SetDomainName(FieldDefn self, char const * name)\n"
38444 : "\n"
38445 : "\n"
38446 : "Set the name of the field domain for this field.\n"
38447 : "\n"
38448 : "Field domains ( :py:class:`FieldDomain`) are attached at the :py:class:`Dataset` level.\n"
38449 : "\n"
38450 : "See :cpp:func:`OGRFieldDefn::SetDomainName`.\n"
38451 : "\n"
38452 : ".. versionadded:: 3.3\n"
38453 : "\n"
38454 : "Parameters\n"
38455 : "-----------\n"
38456 : "name : str\n"
38457 : " Field domain name.\n"
38458 : "\n"
38459 : ""},
38460 : { "FieldDefn_GetComment", _wrap_FieldDefn_GetComment, METH_O, "FieldDefn_GetComment(FieldDefn self) -> char const *"},
38461 : { "FieldDefn_SetComment", _wrap_FieldDefn_SetComment, METH_VARARGS, "FieldDefn_SetComment(FieldDefn self, char const * comment)"},
38462 : { "FieldDefn_swigregister", FieldDefn_swigregister, METH_O, NULL},
38463 : { "FieldDefn_swiginit", FieldDefn_swiginit, METH_VARARGS, NULL},
38464 : { "delete_GeomFieldDefn", _wrap_delete_GeomFieldDefn, METH_O, "delete_GeomFieldDefn(GeomFieldDefn self)"},
38465 : { "new_GeomFieldDefn", (PyCFunction)(void(*)(void))_wrap_new_GeomFieldDefn, METH_VARARGS|METH_KEYWORDS, "new_GeomFieldDefn(char const * name_null_ok=\"\", OGRwkbGeometryType field_type=wkbUnknown) -> GeomFieldDefn"},
38466 : { "GeomFieldDefn_GetName", _wrap_GeomFieldDefn_GetName, METH_O, "GeomFieldDefn_GetName(GeomFieldDefn self) -> char const *"},
38467 : { "GeomFieldDefn_GetNameRef", _wrap_GeomFieldDefn_GetNameRef, METH_O, "GeomFieldDefn_GetNameRef(GeomFieldDefn self) -> char const *"},
38468 : { "GeomFieldDefn_SetName", _wrap_GeomFieldDefn_SetName, METH_VARARGS, "GeomFieldDefn_SetName(GeomFieldDefn self, char const * name)"},
38469 : { "GeomFieldDefn_GetType", _wrap_GeomFieldDefn_GetType, METH_O, "GeomFieldDefn_GetType(GeomFieldDefn self) -> OGRwkbGeometryType"},
38470 : { "GeomFieldDefn_SetType", _wrap_GeomFieldDefn_SetType, METH_VARARGS, "GeomFieldDefn_SetType(GeomFieldDefn self, OGRwkbGeometryType type)"},
38471 : { "GeomFieldDefn_GetSpatialRef", _wrap_GeomFieldDefn_GetSpatialRef, METH_O, "GeomFieldDefn_GetSpatialRef(GeomFieldDefn self) -> SpatialReference"},
38472 : { "GeomFieldDefn_SetSpatialRef", _wrap_GeomFieldDefn_SetSpatialRef, METH_VARARGS, "GeomFieldDefn_SetSpatialRef(GeomFieldDefn self, SpatialReference srs)"},
38473 : { "GeomFieldDefn_IsIgnored", _wrap_GeomFieldDefn_IsIgnored, METH_O, "GeomFieldDefn_IsIgnored(GeomFieldDefn self) -> int"},
38474 : { "GeomFieldDefn_SetIgnored", _wrap_GeomFieldDefn_SetIgnored, METH_VARARGS, "GeomFieldDefn_SetIgnored(GeomFieldDefn self, int bIgnored)"},
38475 : { "GeomFieldDefn_IsNullable", _wrap_GeomFieldDefn_IsNullable, METH_O, "GeomFieldDefn_IsNullable(GeomFieldDefn self) -> int"},
38476 : { "GeomFieldDefn_SetNullable", _wrap_GeomFieldDefn_SetNullable, METH_VARARGS, "GeomFieldDefn_SetNullable(GeomFieldDefn self, int bNullable)"},
38477 : { "GeomFieldDefn_GetCoordinatePrecision", _wrap_GeomFieldDefn_GetCoordinatePrecision, METH_O, "GeomFieldDefn_GetCoordinatePrecision(GeomFieldDefn self) -> GeomCoordinatePrecision"},
38478 : { "GeomFieldDefn_SetCoordinatePrecision", _wrap_GeomFieldDefn_SetCoordinatePrecision, METH_VARARGS, "GeomFieldDefn_SetCoordinatePrecision(GeomFieldDefn self, GeomCoordinatePrecision coordPrec)"},
38479 : { "GeomFieldDefn_swigregister", GeomFieldDefn_swigregister, METH_O, NULL},
38480 : { "GeomFieldDefn_swiginit", GeomFieldDefn_swiginit, METH_VARARGS, NULL},
38481 : { "CreateGeometryFromWkb", (PyCFunction)(void(*)(void))_wrap_CreateGeometryFromWkb, METH_VARARGS|METH_KEYWORDS, "CreateGeometryFromWkb(size_t len, SpatialReference reference=None) -> Geometry"},
38482 : { "CreateGeometryFromWkt", (PyCFunction)(void(*)(void))_wrap_CreateGeometryFromWkt, METH_VARARGS|METH_KEYWORDS, "CreateGeometryFromWkt(char ** val, SpatialReference reference=None) -> Geometry"},
38483 : { "CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_O, "CreateGeometryFromGML(char const * input_string) -> Geometry"},
38484 : { "CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_O, "CreateGeometryFromJson(char const * input_string) -> Geometry"},
38485 : { "CreateGeometryFromEsriJson", _wrap_CreateGeometryFromEsriJson, METH_O, "CreateGeometryFromEsriJson(char const * input_string) -> Geometry"},
38486 : { "CreateGeometryFromEnvelope", _wrap_CreateGeometryFromEnvelope, METH_VARARGS, "\n"
38487 : "CreateGeometryFromEnvelope(double xmin, double ymin, double xmax, double ymax, SpatialReference reference=None) -> Geometry\n"
38488 : "\n"
38489 : "\n"
38490 : "Creates a rectangular, axis-aligned Polygon geometry.\n"
38491 : "\n"
38492 : ".. versionadded:: 3.12\n"
38493 : "\n"
38494 : "Parameters\n"
38495 : "----------\n"
38496 : "xmin : float\n"
38497 : " minimum x coordinate value\n"
38498 : "ymin : float\n"
38499 : " minimum y coordinate value\n"
38500 : "xmax : float\n"
38501 : " maximum x coordinate value\n"
38502 : "ymax : float\n"
38503 : " maximum y coordinate value\n"
38504 : "srs : osr.SpatialReference, default = 0\n"
38505 : " optional spatial reference to assign to the geometry\n"
38506 : "\n"
38507 : "Returns\n"
38508 : "-------\n"
38509 : "Geometry\n"
38510 : "\n"
38511 : "Examples\n"
38512 : "--------\n"
38513 : ">>> g = ogr.CreateGeometryFromEnvelope(424788, 25211, 581555, 279799)\n"
38514 : ">>> g.ExportToWkt()\n"
38515 : "'POLYGON ((424788 25211,424788 279799,581555 279799,581555 25211,424788 25211))'\n"
38516 : "\n"
38517 : ""},
38518 : { "BuildPolygonFromEdges", (PyCFunction)(void(*)(void))_wrap_BuildPolygonFromEdges, METH_VARARGS|METH_KEYWORDS, "BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort=0, int bAutoClose=0, double dfTolerance=0) -> Geometry"},
38519 : { "ApproximateArcAngles", (PyCFunction)(void(*)(void))_wrap_ApproximateArcAngles, METH_VARARGS|METH_KEYWORDS, "ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, double dfStartAngle, double dfEndAngle, double dfMaxAngleStepSizeDegrees) -> Geometry"},
38520 : { "ForceToPolygon", _wrap_ForceToPolygon, METH_O, "ForceToPolygon(Geometry geom_in) -> Geometry"},
38521 : { "ForceToLineString", _wrap_ForceToLineString, METH_O, "ForceToLineString(Geometry geom_in) -> Geometry"},
38522 : { "ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_O, "ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
38523 : { "ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_O, "ForceToMultiPoint(Geometry geom_in) -> Geometry"},
38524 : { "ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_O, "ForceToMultiLineString(Geometry geom_in) -> Geometry"},
38525 : { "ForceTo", _wrap_ForceTo, METH_VARARGS, "ForceTo(Geometry geom_in, OGRwkbGeometryType eTargetType, char ** options=None) -> Geometry"},
38526 : { "delete_Geometry", _wrap_delete_Geometry, METH_O, "delete_Geometry(Geometry self)"},
38527 : { "new_Geometry", (PyCFunction)(void(*)(void))_wrap_new_Geometry, METH_VARARGS|METH_KEYWORDS, "new_Geometry(OGRwkbGeometryType type=wkbUnknown, char * wkt=None, int wkb=0, char * gml=None) -> Geometry"},
38528 : { "Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_O, "\n"
38529 : "Geometry_ExportToWkt(Geometry self) -> OGRErr\n"
38530 : "\n"
38531 : "Convert a geometry into well known text format.\n"
38532 : "\n"
38533 : "For more details: :cpp:func:`OGR_G_ExportToWkt`\n"
38534 : "\n"
38535 : "Returns\n"
38536 : "--------\n"
38537 : "str\n"
38538 : "\n"
38539 : ""},
38540 : { "Geometry_ExportToIsoWkt", _wrap_Geometry_ExportToIsoWkt, METH_O, "\n"
38541 : "Geometry_ExportToIsoWkt(Geometry self) -> OGRErr\n"
38542 : "\n"
38543 : "Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known text\n"
38544 : "format.\n"
38545 : "\n"
38546 : "For more details: :cpp:func:`OGR_G_ExportToIsoWkt`\n"
38547 : "\n"
38548 : ".. versionadded:: 2.0\n"
38549 : "\n"
38550 : "Returns\n"
38551 : "--------\n"
38552 : "str\n"
38553 : "\n"
38554 : ""},
38555 : { "Geometry_ExportToWkb", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToWkb, METH_VARARGS|METH_KEYWORDS, "\n"
38556 : "Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr\n"
38557 : "\n"
38558 : "Convert a geometry well known binary format.\n"
38559 : "\n"
38560 : "For more details: :cpp:func:`OGR_G_ExportToWkb`\n"
38561 : "\n"
38562 : "Parameters\n"
38563 : "-----------\n"
38564 : "byte_order: osgeo.ogr.wkbXDR | osgeo.ogr.wkbNDR, default=osgeo.ogr.wkbNDR\n"
38565 : " One of wkbXDR or wkbNDR indicating MSB or LSB byte order respectively.\n"
38566 : "\n"
38567 : "Returns\n"
38568 : "--------\n"
38569 : "bytes\n"
38570 : "\n"
38571 : ""},
38572 : { "Geometry_ExportToIsoWkb", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToIsoWkb, METH_VARARGS|METH_KEYWORDS, "\n"
38573 : "Geometry_ExportToIsoWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr\n"
38574 : "\n"
38575 : "Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known\n"
38576 : "binary format.\n"
38577 : "\n"
38578 : "For more details: :cpp:func:`OGR_G_ExportToIsoWkb`\n"
38579 : "\n"
38580 : ".. versionadded:: 2.0\n"
38581 : "\n"
38582 : "Parameters\n"
38583 : "-----------\n"
38584 : "byte_order: osgeo.ogr.wkbXDR | osgeo.ogr.wkbNDR, default=osgeo.ogr.wkbNDR\n"
38585 : " One of wkbXDR or wkbNDR indicating MSB or LSB byte order respectively.\n"
38586 : "\n"
38587 : "Returns\n"
38588 : "--------\n"
38589 : "bytes\n"
38590 : "\n"
38591 : ""},
38592 : { "Geometry_ExportToGML", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToGML, METH_VARARGS|METH_KEYWORDS, "Geometry_ExportToGML(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
38593 : { "Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, "Geometry_ExportToKML(Geometry self, char const * altitude_mode=None) -> retStringAndCPLFree *"},
38594 : { "Geometry_ExportToJson", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToJson, METH_VARARGS|METH_KEYWORDS, "Geometry_ExportToJson(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
38595 : { "Geometry_AddPoint", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPoint, METH_VARARGS|METH_KEYWORDS, "\n"
38596 : "Geometry_AddPoint(Geometry self, double x, double y, double z=0)\n"
38597 : "\n"
38598 : "Add a point to a geometry (line string or point).\n"
38599 : "\n"
38600 : "The vertex count of the line string is increased by one, and assigned from\n"
38601 : "the passed location value.\n"
38602 : "\n"
38603 : "The geometry is promoted to include a Z component, if it does not already\n"
38604 : "have one, even if the Z parameter is not explicitly specified. To avoid that\n"
38605 : "use AddPoint_2D.\n"
38606 : "\n"
38607 : "This is the same as :cpp:func:`OGR_G_AddPoint`\n"
38608 : "\n"
38609 : "Parameters\n"
38610 : "-----------\n"
38611 : "X: float\n"
38612 : " x coordinate of point to add.\n"
38613 : "Y: float\n"
38614 : " y coordinate of point to add.\n"
38615 : "Z: float\n"
38616 : " z coordinate of point to add. Defaults to 0\n"
38617 : "\n"
38618 : "Examples\n"
38619 : "-------\n"
38620 : ">>> ogr.GeometryTypeToName(pt.GetGeometryType())\n"
38621 : "'Point'\n"
38622 : ">>> pt.AddPoint(3, 7)\n"
38623 : ">>> ogr.GeometryTypeToName(pt.GetGeometryType())\n"
38624 : "'3D Point'\n"
38625 : "\n"
38626 : ""},
38627 : { "Geometry_AddPointM", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPointM, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPointM(Geometry self, double x, double y, double m)"},
38628 : { "Geometry_AddPointZM", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPointZM, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPointZM(Geometry self, double x, double y, double z, double m)"},
38629 : { "Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, "\n"
38630 : "Geometry_AddPoint_2D(Geometry self, double x, double y)\n"
38631 : "\n"
38632 : "Add a point to a geometry (line string or point).\n"
38633 : "\n"
38634 : "The vertex count of the line string is increased by one, and assigned from\n"
38635 : "the passed location value.\n"
38636 : "\n"
38637 : "If the geometry includes a Z or M component, the value for those components\n"
38638 : "for the added point will be 0.\n"
38639 : "\n"
38640 : "This is the same as :cpp:func:`OGR_G_AddPoint_2D`\n"
38641 : "\n"
38642 : "Parameters\n"
38643 : "-----------\n"
38644 : "X: float\n"
38645 : " x coordinate of point to add.\n"
38646 : "Y: float\n"
38647 : " y coordinate of point to add.\n"
38648 : "\n"
38649 : "Examples\n"
38650 : "--------\n"
38651 : ">>> pt = ogr.Geometry(ogr.wkbPoint)\n"
38652 : ">>> ogr.GeometryTypeToName(pt.GetGeometryType())\n"
38653 : "'Point'\n"
38654 : ">>> pt.AddPoint_2D(3, 7)\n"
38655 : ">>> ogr.GeometryTypeToName(pt.GetGeometryType())\n"
38656 : "'Point'\n"
38657 : "\n"
38658 : ""},
38659 : { "Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, "Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
38660 : { "Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, "Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
38661 : { "Geometry_RemoveGeometry", _wrap_Geometry_RemoveGeometry, METH_VARARGS, "Geometry_RemoveGeometry(Geometry self, int iSubGeom) -> OGRErr"},
38662 : { "Geometry_Clone", _wrap_Geometry_Clone, METH_O, "\n"
38663 : "Geometry_Clone(Geometry self) -> Geometry\n"
38664 : "\n"
38665 : "Make a copy of this object.\n"
38666 : "\n"
38667 : "For more details: :cpp:func:`OGR_G_Clone`\n"
38668 : "\n"
38669 : "Returns\n"
38670 : "--------\n"
38671 : "Geometry:\n"
38672 : " The copy of the geometry with the same spatial reference system\n"
38673 : " as the original.\n"
38674 : "\n"
38675 : ""},
38676 : { "Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_O, "\n"
38677 : "Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\n"
38678 : "\n"
38679 : "Fetch geometry type.\n"
38680 : "\n"
38681 : "For more details: :cpp:func:`OGR_G_GetGeometryType`\n"
38682 : "\n"
38683 : "Returns\n"
38684 : "--------\n"
38685 : "int:\n"
38686 : " The geometry type code. The types can be found with\n"
38687 : " 'osgeo.ogr.wkb' prefix. For example :py:const:`osgeo.ogr.wkbPolygon`.\n"
38688 : "\n"
38689 : ""},
38690 : { "Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_O, "\n"
38691 : "Geometry_GetGeometryName(Geometry self) -> char const *\n"
38692 : "\n"
38693 : "Fetch WKT name for geometry type.\n"
38694 : "\n"
38695 : "For more details: :cpp:func:`OGR_G_GetGeometryName`\n"
38696 : "\n"
38697 : "geometry to get name from.\n"
38698 : "\n"
38699 : "Returns\n"
38700 : "--------\n"
38701 : "str\n"
38702 : "\n"
38703 : ""},
38704 : { "Geometry_Length", _wrap_Geometry_Length, METH_O, "\n"
38705 : "Geometry_Length(Geometry self) -> double\n"
38706 : "\n"
38707 : "Compute geometry length.\n"
38708 : "\n"
38709 : "The returned length is a 2D Cartesian (planar) area in units of the\n"
38710 : "spatial reference system in use, so potentially 'degrees' for a\n"
38711 : "geometry expressed in a geographic SRS.\n"
38712 : "\n"
38713 : "For more details: :cpp:func:`OGR_G_Length`\n"
38714 : "\n"
38715 : "Returns\n"
38716 : "--------\n"
38717 : "float:\n"
38718 : " the length of the geometry in units of the spatial reference\n"
38719 : " system in use, or 0.0 for unsupported geometry types.\n"
38720 : "\n"
38721 : "\n"
38722 : ""},
38723 : { "Geometry_Area", _wrap_Geometry_Area, METH_O, "\n"
38724 : "Geometry_Area(Geometry self) -> double\n"
38725 : "\n"
38726 : "Compute geometry area.\n"
38727 : "\n"
38728 : "The returned area is a 2D Cartesian (planar) area in square units of the\n"
38729 : "spatial reference system in use, so potentially 'square degrees' for a\n"
38730 : "geometry expressed in a geographic SRS.\n"
38731 : "\n"
38732 : "For more details: :cpp:func:`OGR_G_Area`\n"
38733 : "\n"
38734 : "Returns\n"
38735 : "--------\n"
38736 : "float:\n"
38737 : " the area of the geometry in square units of the spatial reference\n"
38738 : " system in use, or 0.0 for unsupported geometry types.\n"
38739 : "\n"
38740 : "\n"
38741 : ""},
38742 : { "Geometry_GeodesicLength", _wrap_Geometry_GeodesicLength, METH_O, "\n"
38743 : "Geometry_GeodesicLength(Geometry self) -> double\n"
38744 : "\n"
38745 : "Compute geometry length, considered as a curve on the underlying\n"
38746 : "ellipsoid of the SRS attached to the geometry.\n"
38747 : "\n"
38748 : "For more details: :cpp:func:`OGR_G_GeodesicLength`\n"
38749 : "\n"
38750 : "Returns\n"
38751 : "--------\n"
38752 : "float:\n"
38753 : " the area in meters, or a negative value for unsupported geometry types.\n"
38754 : "\n"
38755 : "\n"
38756 : ""},
38757 : { "Geometry_GeodesicArea", _wrap_Geometry_GeodesicArea, METH_O, "\n"
38758 : "Geometry_GeodesicArea(Geometry self) -> double\n"
38759 : "\n"
38760 : "Compute geometry area, considered as a surface on the underlying\n"
38761 : "ellipsoid of the SRS attached to the geometry.\n"
38762 : "\n"
38763 : "For more details: :cpp:func:`OGR_G_GeodesicArea`\n"
38764 : "\n"
38765 : "Returns\n"
38766 : "--------\n"
38767 : "float:\n"
38768 : " the area in square meters, or a negative value for unsupported geometry types.\n"
38769 : "\n"
38770 : "\n"
38771 : ""},
38772 : { "Geometry_IsClockwise", _wrap_Geometry_IsClockwise, METH_O, "Geometry_IsClockwise(Geometry self) -> bool"},
38773 : { "Geometry_GetArea", _wrap_Geometry_GetArea, METH_O, "Geometry_GetArea(Geometry self) -> double"},
38774 : { "Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_O, "Geometry_GetPointCount(Geometry self) -> int"},
38775 : { "Geometry_GetPoints", (PyCFunction)(void(*)(void))_wrap_Geometry_GetPoints, METH_VARARGS|METH_KEYWORDS, "Geometry_GetPoints(Geometry self, int nCoordDimension=0)"},
38776 : { "Geometry_GetX", (PyCFunction)(void(*)(void))_wrap_Geometry_GetX, METH_VARARGS|METH_KEYWORDS, "Geometry_GetX(Geometry self, int point=0) -> double"},
38777 : { "Geometry_GetY", (PyCFunction)(void(*)(void))_wrap_Geometry_GetY, METH_VARARGS|METH_KEYWORDS, "Geometry_GetY(Geometry self, int point=0) -> double"},
38778 : { "Geometry_GetZ", (PyCFunction)(void(*)(void))_wrap_Geometry_GetZ, METH_VARARGS|METH_KEYWORDS, "Geometry_GetZ(Geometry self, int point=0) -> double"},
38779 : { "Geometry_GetM", (PyCFunction)(void(*)(void))_wrap_Geometry_GetM, METH_VARARGS|METH_KEYWORDS, "Geometry_GetM(Geometry self, int point=0) -> double"},
38780 : { "Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, "Geometry_GetPoint(Geometry self, int iPoint=0)"},
38781 : { "Geometry_GetPointZM", _wrap_Geometry_GetPointZM, METH_VARARGS, "Geometry_GetPointZM(Geometry self, int iPoint=0)"},
38782 : { "Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, "Geometry_GetPoint_2D(Geometry self, int iPoint=0)"},
38783 : { "Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_O, "Geometry_GetGeometryCount(Geometry self) -> int"},
38784 : { "Geometry_SetPoint", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPoint, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPoint(Geometry self, int point, double x, double y, double z=0)"},
38785 : { "Geometry_SetPointM", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPointM, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPointM(Geometry self, int point, double x, double y, double m)"},
38786 : { "Geometry_SetPointZM", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPointZM, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPointZM(Geometry self, int point, double x, double y, double z, double m)"},
38787 : { "Geometry_SetPoint_2D", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPoint_2D, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPoint_2D(Geometry self, int point, double x, double y)"},
38788 : { "Geometry_SwapXY", _wrap_Geometry_SwapXY, METH_O, "\n"
38789 : "Geometry_SwapXY(Geometry self)\n"
38790 : "\n"
38791 : "Swap x and y coordinates.\n"
38792 : "\n"
38793 : "For more details: :cpp:func:`OGR_G_SwapXY`\n"
38794 : "\n"
38795 : ".. versionadded:: 2.3.0\n"
38796 : "\n"
38797 : "\n"
38798 : ""},
38799 : { "Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, "Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
38800 : { "Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, "\n"
38801 : "Geometry_Simplify(Geometry self, double tolerance) -> Geometry\n"
38802 : "\n"
38803 : "Compute a simplified geometry.\n"
38804 : "\n"
38805 : "For more details: :cpp:func:`OGR_G_Simplify`\n"
38806 : "\n"
38807 : "Parameters\n"
38808 : "-----------\n"
38809 : "tolerance: float\n"
38810 : " The distance tolerance for the simplification.\n"
38811 : "\n"
38812 : "Returns\n"
38813 : "--------\n"
38814 : "Geometry:\n"
38815 : " The simplified geometry or None if an error occurs.\n"
38816 : "\n"
38817 : ""},
38818 : { "Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, "\n"
38819 : "Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\n"
38820 : "\n"
38821 : "Simplify the geometry while preserving topology.\n"
38822 : "\n"
38823 : "For more details: :cpp:func:`OGR_G_SimplifyPreserveTopology`\n"
38824 : "\n"
38825 : "Parameters\n"
38826 : "-----------\n"
38827 : "tolerance: float\n"
38828 : " The distance tolerance for the simplification.\n"
38829 : "\n"
38830 : "Returns\n"
38831 : "--------\n"
38832 : "Geometry:\n"
38833 : " The simplified geometry or None if an error occurs.\n"
38834 : "\n"
38835 : ""},
38836 : { "Geometry_DelaunayTriangulation", (PyCFunction)(void(*)(void))_wrap_Geometry_DelaunayTriangulation, METH_VARARGS|METH_KEYWORDS, "\n"
38837 : "Geometry_DelaunayTriangulation(Geometry self, double dfTolerance=0.0, int bOnlyEdges=FALSE) -> Geometry\n"
38838 : "\n"
38839 : "Return a Delaunay triangulation of the vertices of the geometry.\n"
38840 : "\n"
38841 : "For more details: :cpp:func:`OGR_G_DelaunayTriangulation`\n"
38842 : "\n"
38843 : ".. versionadded:: 2.1\n"
38844 : "\n"
38845 : "Parameters\n"
38846 : "-----------\n"
38847 : "dfTolerance: float\n"
38848 : " optional snapping tolerance to use for improved robustness\n"
38849 : "bOnlyEdges: bool\n"
38850 : " If True, will return a MULTILINESTRING, otherwise it will\n"
38851 : " return a GEOMETRYCOLLECTION containing triangular POLYGONs.\n"
38852 : "\n"
38853 : "Returns\n"
38854 : "--------\n"
38855 : "Geometry:\n"
38856 : " The geometry resulting from the Delaunay triangulation or None if an\n"
38857 : " error occurs.\n"
38858 : "\n"
38859 : ""},
38860 : { "Geometry_Polygonize", _wrap_Geometry_Polygonize, METH_O, "\n"
38861 : "Geometry_Polygonize(Geometry self) -> Geometry\n"
38862 : "\n"
38863 : "Polygonizes a set of sparse edges.\n"
38864 : "\n"
38865 : "For more details: :cpp:func:`OGR_G_Polygonize`\n"
38866 : "\n"
38867 : "Returns\n"
38868 : "--------\n"
38869 : "Geometry:\n"
38870 : " A new geometry or None on failure.\n"
38871 : "\n"
38872 : ""},
38873 : { "Geometry_BuildArea", _wrap_Geometry_BuildArea, METH_O, "\n"
38874 : "Geometry_BuildArea(Geometry self) -> Geometry\n"
38875 : "\n"
38876 : "Polygonize a linework assuming inner polygons are holes.\n"
38877 : "\n"
38878 : "For more details: :cpp:func:`OGR_G_BuildArea`\n"
38879 : "\n"
38880 : "Returns\n"
38881 : "--------\n"
38882 : "Geometry:\n"
38883 : " A new geometry or None on failure.\n"
38884 : "\n"
38885 : ""},
38886 : { "Geometry_Boundary", _wrap_Geometry_Boundary, METH_O, "\n"
38887 : "Geometry_Boundary(Geometry self) -> Geometry\n"
38888 : "\n"
38889 : "Compute boundary.\n"
38890 : "\n"
38891 : "For more details: :cpp:func:`OGR_G_Boundary`\n"
38892 : "\n"
38893 : "Returns\n"
38894 : "--------\n"
38895 : "Geometry:\n"
38896 : " A new geometry or None on failure.\n"
38897 : "\n"
38898 : ""},
38899 : { "Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_O, "\n"
38900 : "Geometry_GetBoundary(Geometry self) -> Geometry\n"
38901 : "\n"
38902 : "Compute boundary (deprecated)\n"
38903 : "\n"
38904 : "For more details: :cpp:func:`OGR_G_GetBoundary`\n"
38905 : "\n"
38906 : "..warning:: Deprecated\n"
38907 : "\n"
38908 : "See: :cpp:func:`OGR_G_Boundary`\n"
38909 : "\n"
38910 : ""},
38911 : { "Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_O, "\n"
38912 : "Geometry_ConvexHull(Geometry self) -> Geometry\n"
38913 : "\n"
38914 : "Compute convex hull.\n"
38915 : "\n"
38916 : "For more details: :cpp:func:`OGR_G_ConvexHull`\n"
38917 : "\n"
38918 : "Returns\n"
38919 : "--------\n"
38920 : "Geometry:\n"
38921 : " a handle to A newly allocated geometry now owned by the caller, or\n"
38922 : " None on failure.\n"
38923 : "\n"
38924 : ""},
38925 : { "Geometry_ConcaveHull", _wrap_Geometry_ConcaveHull, METH_VARARGS, "Geometry_ConcaveHull(Geometry self, double ratio, bool allowHoles) -> Geometry"},
38926 : { "Geometry_MakeValid", _wrap_Geometry_MakeValid, METH_VARARGS, "\n"
38927 : "Geometry_MakeValid(Geometry self, char ** options=None) -> Geometry\n"
38928 : "\n"
38929 : "Attempts to make an invalid geometry valid without losing vertices.\n"
38930 : "\n"
38931 : "For more details: :cpp:func:`OGR_G_MakeValidEx`\n"
38932 : "\n"
38933 : ".. versionadded:: 3.0\n"
38934 : ".. versionadded:: 3.4 options\n"
38935 : "\n"
38936 : "Parameters\n"
38937 : "-----------\n"
38938 : "options: list[str], optional\n"
38939 : " papszOptions to be passed in. For example: [\"METHOD=STRUCTURE\"].\n"
38940 : "\n"
38941 : "Returns\n"
38942 : "--------\n"
38943 : "Geometry:\n"
38944 : " A newly allocated geometry now owned by the caller, or None on\n"
38945 : " failure.\n"
38946 : "\n"
38947 : ""},
38948 : { "Geometry_SetPrecision", _wrap_Geometry_SetPrecision, METH_VARARGS, "Geometry_SetPrecision(Geometry self, double gridSize, int flags=0) -> Geometry"},
38949 : { "Geometry_Normalize", _wrap_Geometry_Normalize, METH_O, "\n"
38950 : "Geometry_Normalize(Geometry self) -> Geometry\n"
38951 : "\n"
38952 : "Attempts to bring geometry into normalized/canonical form.\n"
38953 : "\n"
38954 : "For more details: :cpp:func:`OGR_G_Normalize`\n"
38955 : "\n"
38956 : ".. versionadded:: 3.3\n"
38957 : "\n"
38958 : "Returns\n"
38959 : "--------\n"
38960 : "Geometry:\n"
38961 : " A newly allocated geometry now owned by the caller, or None on\n"
38962 : " failure.\n"
38963 : "\n"
38964 : ""},
38965 : { "Geometry_RemoveLowerDimensionSubGeoms", _wrap_Geometry_RemoveLowerDimensionSubGeoms, METH_O, "Geometry_RemoveLowerDimensionSubGeoms(Geometry self) -> Geometry"},
38966 : { "Geometry_Buffer", _wrap_Geometry_Buffer, METH_VARARGS, "\n"
38967 : "Geometry_Buffer(Geometry self, double distance, int quadsecs=30) -> Geometry\n"
38968 : "Geometry_Buffer(Geometry self, double distance, char ** options) -> Geometry\n"
38969 : "\n"
38970 : "Compute buffer of geometry.\n"
38971 : "\n"
38972 : "For more details: :cpp:func:`OGR_G_Buffer`\n"
38973 : "\n"
38974 : "Parameters\n"
38975 : "-----------\n"
38976 : "distance: float\n"
38977 : " The buffer distance to be applied. Should be expressed into\n"
38978 : " the same unit as the coordinates of the geometry.\n"
38979 : "quadsecs: int, default=30\n"
38980 : " The number of segments used to approximate a 90 degree\n"
38981 : " (quadrant) of curvature.\n"
38982 : "options: list/dict\n"
38983 : " An optional list of options to control the buffer output.\n"
38984 : " See :cpp:func:`OGR_G_BufferEx`.\n"
38985 : "\n"
38986 : "Returns\n"
38987 : "--------\n"
38988 : "Geometry:\n"
38989 : " The newly created geometry or None if an error occurs.\n"
38990 : "\n"
38991 : ""},
38992 : { "Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, "\n"
38993 : "Geometry_Intersection(Geometry self, Geometry other) -> Geometry\n"
38994 : "\n"
38995 : "Compute intersection.\n"
38996 : "\n"
38997 : "For more details: :cpp:func:`OGR_G_Intersection`\n"
38998 : "\n"
38999 : "Parameters\n"
39000 : "-----------\n"
39001 : "other: Geometry\n"
39002 : " The other geometry.\n"
39003 : "\n"
39004 : "Returns\n"
39005 : "--------\n"
39006 : "Geometry:\n"
39007 : " A new geometry representing the intersection or None if there is no\n"
39008 : " intersection or an error occurs.\n"
39009 : "\n"
39010 : ""},
39011 : { "Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, "\n"
39012 : "Geometry_Union(Geometry self, Geometry other) -> Geometry\n"
39013 : "\n"
39014 : "Compute union.\n"
39015 : "\n"
39016 : "For more details: :cpp:func:`OGR_G_Union`\n"
39017 : "\n"
39018 : "Parameters\n"
39019 : "-----------\n"
39020 : "other: Geometry\n"
39021 : " The other geometry.\n"
39022 : "\n"
39023 : "Returns\n"
39024 : "--------\n"
39025 : "Geometry:\n"
39026 : " A new geometry representing the union or None if an error occurs.\n"
39027 : "\n"
39028 : ""},
39029 : { "Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_O, "\n"
39030 : "Geometry_UnionCascaded(Geometry self) -> Geometry\n"
39031 : "\n"
39032 : "Compute union using cascading.\n"
39033 : "\n"
39034 : "For more deails: :cpp:func:`OGR_G_UnionCascaded`\n"
39035 : "\n"
39036 : "Returns\n"
39037 : "--------\n"
39038 : "Geometry:\n"
39039 : " A new geometry representing the union or None if an error occurs.\n"
39040 : "\n"
39041 : ""},
39042 : { "Geometry_UnaryUnion", _wrap_Geometry_UnaryUnion, METH_O, "Geometry_UnaryUnion(Geometry self) -> Geometry"},
39043 : { "Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, "\n"
39044 : "Geometry_Difference(Geometry self, Geometry other) -> Geometry\n"
39045 : "\n"
39046 : "Compute difference.\n"
39047 : "\n"
39048 : "For more details: :cpp:func:`OGR_G_Difference`\n"
39049 : "\n"
39050 : "Parameters\n"
39051 : "-----------\n"
39052 : "other: Geometry\n"
39053 : " The other geometry.\n"
39054 : "\n"
39055 : "Returns\n"
39056 : "--------\n"
39057 : "Geometry:\n"
39058 : " A new geometry representing the difference or None if the difference\n"
39059 : " is empty or an error occurs.\n"
39060 : "\n"
39061 : ""},
39062 : { "Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, "\n"
39063 : "Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\n"
39064 : "\n"
39065 : "Compute symmetric difference.\n"
39066 : "\n"
39067 : "For more details: :cpp:func:`OGR_G_SymDifference`\n"
39068 : "\n"
39069 : "Parameters\n"
39070 : "-----------\n"
39071 : "other:\n"
39072 : " the other geometry.\n"
39073 : "\n"
39074 : "Returns\n"
39075 : "--------\n"
39076 : "Geometry:\n"
39077 : " A new geometry representing the symmetric difference or None if the\n"
39078 : " difference is empty or an error occurs.\n"
39079 : "\n"
39080 : ""},
39081 : { "Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, "\n"
39082 : "Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\n"
39083 : "\n"
39084 : "Compute symmetric difference (deprecated)\n"
39085 : "\n"
39086 : "For more details: :cpp:func:`OGR_G_SymmetricDifference`\n"
39087 : "\n"
39088 : ".. warning:: Deprecated\n"
39089 : "\n"
39090 : "\n"
39091 : ""},
39092 : { "Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, "\n"
39093 : "Geometry_Distance(Geometry self, Geometry other) -> double\n"
39094 : "\n"
39095 : "Compute distance between two geometries.\n"
39096 : "\n"
39097 : "For more details: :cpp:func:`OGR_G_Distance`\n"
39098 : "\n"
39099 : "Parameters\n"
39100 : "-----------\n"
39101 : "other: Geometry\n"
39102 : " The other geometry to compare against.\n"
39103 : "\n"
39104 : "Returns\n"
39105 : "--------\n"
39106 : "float:\n"
39107 : " The distance between the geometries or -1 if an error occurs.\n"
39108 : "\n"
39109 : ""},
39110 : { "Geometry_Distance3D", _wrap_Geometry_Distance3D, METH_VARARGS, "\n"
39111 : "Geometry_Distance3D(Geometry self, Geometry other) -> double\n"
39112 : "\n"
39113 : "Returns the 3D distance between two geometries.\n"
39114 : "\n"
39115 : "For more details: :cpp:func:`OGR_G_Distance3D`\n"
39116 : "\n"
39117 : ".. versionadded:: 2.2\n"
39118 : "\n"
39119 : "Parameters\n"
39120 : "-----------\n"
39121 : "other: Geometry\n"
39122 : " The other geometry to compare against.\n"
39123 : "\n"
39124 : "Returns\n"
39125 : "--------\n"
39126 : "float:\n"
39127 : " The distance between the geometries or -1 if an error occurs.\n"
39128 : "\n"
39129 : ""},
39130 : { "Geometry_Empty", _wrap_Geometry_Empty, METH_O, "\n"
39131 : "Geometry_Empty(Geometry self)\n"
39132 : "\n"
39133 : "Clear geometry information.\n"
39134 : "\n"
39135 : "For more details: :cpp:func:`OGR_G_Empty`\n"
39136 : "\n"
39137 : ""},
39138 : { "Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_O, "\n"
39139 : "Geometry_IsEmpty(Geometry self) -> bool\n"
39140 : "\n"
39141 : "Test if the geometry is empty.\n"
39142 : "\n"
39143 : "For more details: :cpp:func:`OGR_G_IsEmpty`\n"
39144 : "\n"
39145 : "Returns\n"
39146 : "--------\n"
39147 : "int:\n"
39148 : " True if the geometry has no points, otherwise False.\n"
39149 : "\n"
39150 : ""},
39151 : { "Geometry_IsValid", _wrap_Geometry_IsValid, METH_O, "\n"
39152 : "Geometry_IsValid(Geometry self) -> bool\n"
39153 : "\n"
39154 : "Test if the geometry is valid.\n"
39155 : "\n"
39156 : "For more details: :cpp:func:`OGR_G_IsValid`\n"
39157 : "\n"
39158 : "Returns\n"
39159 : "--------\n"
39160 : "int:\n"
39161 : " True if the geometry has no points, otherwise False.\n"
39162 : "\n"
39163 : ""},
39164 : { "Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_O, "\n"
39165 : "Geometry_IsSimple(Geometry self) -> bool\n"
39166 : "\n"
39167 : "Returns True if the geometry is simple.\n"
39168 : "\n"
39169 : "For more details: :cpp:func:`OGR_G_IsSimple`\n"
39170 : "\n"
39171 : "Returns\n"
39172 : "--------\n"
39173 : "int:\n"
39174 : " True if object is simple, otherwise False.\n"
39175 : "\n"
39176 : ""},
39177 : { "Geometry_IsRing", _wrap_Geometry_IsRing, METH_O, "\n"
39178 : "Geometry_IsRing(Geometry self) -> bool\n"
39179 : "\n"
39180 : "Test if the geometry is a ring.\n"
39181 : "\n"
39182 : "For more details: :cpp:func:`OGR_G_IsRing`\n"
39183 : "\n"
39184 : "Returns\n"
39185 : "--------\n"
39186 : "int:\n"
39187 : " True if the coordinates of the geometry form a ring, by checking length\n"
39188 : " and closure (self-intersection is not checked), otherwise False.\n"
39189 : "\n"
39190 : ""},
39191 : { "Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, "\n"
39192 : "Geometry_Intersects(Geometry self, Geometry other) -> bool\n"
39193 : "\n"
39194 : "Determines whether two geometries intersect.\n"
39195 : "\n"
39196 : "For more details: :cpp:func:`OGR_G_Intersects`\n"
39197 : "\n"
39198 : "Parameters\n"
39199 : "-----------\n"
39200 : "other: Geometry\n"
39201 : " The other geometry to test against.\n"
39202 : "\n"
39203 : "Returns\n"
39204 : "--------\n"
39205 : "int:\n"
39206 : " True if the geometries intersect, otherwise False.\n"
39207 : "\n"
39208 : ""},
39209 : { "Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, "Geometry_Intersect(Geometry self, Geometry other) -> bool"},
39210 : { "Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, "\n"
39211 : "Geometry_Equals(Geometry self, Geometry other) -> bool\n"
39212 : "\n"
39213 : "Returns True if two geometries are equivalent.\n"
39214 : "\n"
39215 : "For more details: :cpp:func:`OGR_G_Equals`\n"
39216 : "\n"
39217 : "Parameters\n"
39218 : "-----------\n"
39219 : "other: Geometry\n"
39220 : " The other geometry to test against.\n"
39221 : "\n"
39222 : "Returns\n"
39223 : "--------\n"
39224 : "int:\n"
39225 : " True if equivalent or False otherwise.\n"
39226 : "\n"
39227 : ""},
39228 : { "Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, "Geometry_Equal(Geometry self, Geometry other) -> bool"},
39229 : { "Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, "\n"
39230 : "Geometry_Disjoint(Geometry self, Geometry other) -> bool\n"
39231 : "\n"
39232 : "Test for disjointness.\n"
39233 : "\n"
39234 : "For more details: :cpp:func:`OGR_G_Disjoint`\n"
39235 : "\n"
39236 : "Parameters\n"
39237 : "-----------\n"
39238 : "other: Geometry\n"
39239 : " The other geometry to compare.\n"
39240 : "\n"
39241 : "Returns\n"
39242 : "--------\n"
39243 : "int:\n"
39244 : " True if they are disjoint, otherwise False.\n"
39245 : "\n"
39246 : ""},
39247 : { "Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, "\n"
39248 : "Geometry_Touches(Geometry self, Geometry other) -> bool\n"
39249 : "\n"
39250 : "Test for touching.\n"
39251 : "\n"
39252 : "For more details: :cpp:func:`OGR_G_Touches`\n"
39253 : "\n"
39254 : "Parameters\n"
39255 : "-----------\n"
39256 : "other:\n"
39257 : " the other geometry to compare.\n"
39258 : "\n"
39259 : "Returns\n"
39260 : "--------\n"
39261 : "int:\n"
39262 : " True if they are touching, otherwise False.\n"
39263 : "\n"
39264 : ""},
39265 : { "Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, "\n"
39266 : "Geometry_Crosses(Geometry self, Geometry other) -> bool\n"
39267 : "\n"
39268 : "Test for crossing.\n"
39269 : "\n"
39270 : "For more details: :cpp:func:`OGR_G_Crosses`\n"
39271 : "\n"
39272 : "Parameters\n"
39273 : "-----------\n"
39274 : "other: Geometry\n"
39275 : " the other geometry to compare.\n"
39276 : "\n"
39277 : "Returns\n"
39278 : "--------\n"
39279 : "int:\n"
39280 : " True if they are crossing, otherwise False.\n"
39281 : "\n"
39282 : ""},
39283 : { "Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, "\n"
39284 : "Geometry_Within(Geometry self, Geometry other) -> bool\n"
39285 : "\n"
39286 : "Test for containment.\n"
39287 : "\n"
39288 : "For more details: :cpp:func:`OGR_G_Within`\n"
39289 : "\n"
39290 : "Parameters\n"
39291 : "-----------\n"
39292 : "other: Geometry\n"
39293 : " the other geometry to compare.\n"
39294 : "\n"
39295 : "Returns\n"
39296 : "--------\n"
39297 : "int:\n"
39298 : " True if this is within other, otherwise False.\n"
39299 : "\n"
39300 : ""},
39301 : { "Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, "\n"
39302 : "Geometry_Contains(Geometry self, Geometry other) -> bool\n"
39303 : "\n"
39304 : "Test for containment.\n"
39305 : "\n"
39306 : "For more details: :cpp:func:`OGR_G_Contains`\n"
39307 : "\n"
39308 : "Parameters\n"
39309 : "-----------\n"
39310 : "other: Geometry\n"
39311 : " the other geometry to compare.\n"
39312 : "\n"
39313 : "Returns\n"
39314 : "--------\n"
39315 : "int:\n"
39316 : " True if this contains the other geometry, otherwise False.\n"
39317 : "\n"
39318 : ""},
39319 : { "Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, "\n"
39320 : "Geometry_Overlaps(Geometry self, Geometry other) -> bool\n"
39321 : "\n"
39322 : "Test for overlap.\n"
39323 : "\n"
39324 : "For more details: :cpp:func:`OGR_G_Overlaps`\n"
39325 : "\n"
39326 : "Parameters\n"
39327 : "-----------\n"
39328 : "other: Geometry\n"
39329 : " the other geometry to compare.\n"
39330 : "\n"
39331 : "Returns\n"
39332 : "--------\n"
39333 : "int:\n"
39334 : " True if they are overlapping, otherwise False.\n"
39335 : "\n"
39336 : ""},
39337 : { "Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, "\n"
39338 : "Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\n"
39339 : "\n"
39340 : "Transform geometry to new spatial reference system.\n"
39341 : "\n"
39342 : "For more details: :cpp:func:`OGR_G_TransformTo`\n"
39343 : "\n"
39344 : "Parameters\n"
39345 : "-----------\n"
39346 : "reference: SpatialReference\n"
39347 : " The spatial reference system to apply.\n"
39348 : "\n"
39349 : "Returns\n"
39350 : "--------\n"
39351 : "int:\n"
39352 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success, or an error code.\n"
39353 : "\n"
39354 : ""},
39355 : { "Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_O, "\n"
39356 : "Geometry_GetSpatialReference(Geometry self) -> SpatialReference\n"
39357 : "\n"
39358 : "For more details: :cpp:func:`OGR_G_GetSpatialReference`\n"
39359 : "\n"
39360 : "Returns spatial reference system for geometry.\n"
39361 : "\n"
39362 : "Returns\n"
39363 : "--------\n"
39364 : "SpatialReference\n"
39365 : "\n"
39366 : ""},
39367 : { "Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, "\n"
39368 : "Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\n"
39369 : "\n"
39370 : "Assign spatial reference to this object.\n"
39371 : "\n"
39372 : "For more details: :cpp:func:`OGR_G_AssignSpatialReference`\n"
39373 : "\n"
39374 : "Parameters\n"
39375 : "-----------\n"
39376 : "reference: SpatialReference\n"
39377 : " The new spatial reference system to apply.\n"
39378 : "\n"
39379 : ""},
39380 : { "Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_O, "\n"
39381 : "Geometry_CloseRings(Geometry self)\n"
39382 : "\n"
39383 : "Force rings to be closed.\n"
39384 : "\n"
39385 : "For more details: :cpp:func:`OGR_G_CloseRings`\n"
39386 : "\n"
39387 : ""},
39388 : { "Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_O, "\n"
39389 : "Geometry_FlattenTo2D(Geometry self)\n"
39390 : "\n"
39391 : "Convert geometry to strictly 2D.\n"
39392 : "\n"
39393 : "For more details: :cpp:func:`OGR_G_FlattenTo2D`\n"
39394 : "\n"
39395 : ""},
39396 : { "Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, "\n"
39397 : "Geometry_Segmentize(Geometry self, double dfMaxLength)\n"
39398 : "\n"
39399 : "Modify the geometry such it has no segment longer then the given\n"
39400 : "distance.\n"
39401 : "\n"
39402 : "For more details: :cpp:func:`OGR_G_Segmentize`\n"
39403 : "\n"
39404 : "Parameters\n"
39405 : "-----------\n"
39406 : "dfMaxLength: float\n"
39407 : " the maximum distance between 2 points after segmentization\n"
39408 : "\n"
39409 : ""},
39410 : { "Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_O, "\n"
39411 : "Geometry_GetEnvelope(Geometry self)\n"
39412 : "\n"
39413 : "Computes and returns the bounding envelope for this geometry in the\n"
39414 : "passed psEnvelope structure.\n"
39415 : "\n"
39416 : "For more details: :cpp:func:`OGR_G_GetEnvelope`\n"
39417 : "\n"
39418 : ".. warning:: Check the return order of the bounds.\n"
39419 : "\n"
39420 : "Returns\n"
39421 : "--------\n"
39422 : "minx: float\n"
39423 : "maxx: float\n"
39424 : "miny: float\n"
39425 : "maxy: float\n"
39426 : "\n"
39427 : ""},
39428 : { "Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_O, "\n"
39429 : "Geometry_GetEnvelope3D(Geometry self)\n"
39430 : "\n"
39431 : "Computes and returns the bounding envelope (3D) for this geometry in\n"
39432 : "the passed psEnvelope structure.\n"
39433 : "\n"
39434 : "For more details: :cpp:func:`OGR_G_GetEnvelope3D`\n"
39435 : "\n"
39436 : ".. warning:: Check the return order of the bounds.\n"
39437 : "\n"
39438 : "Returns\n"
39439 : "--------\n"
39440 : "minx: float\n"
39441 : "maxx: float\n"
39442 : "miny: float\n"
39443 : "maxy: float\n"
39444 : "minz: float\n"
39445 : "maxz: float\n"
39446 : "\n"
39447 : ""},
39448 : { "Geometry_Centroid", _wrap_Geometry_Centroid, METH_O, "\n"
39449 : "Geometry_Centroid(Geometry self) -> Geometry\n"
39450 : "\n"
39451 : "Compute the geometry centroid.\n"
39452 : "\n"
39453 : "For more details: :cpp:func:`OGR_G_Centroid`\n"
39454 : "\n"
39455 : "Returns\n"
39456 : "--------\n"
39457 : "Geometry\n"
39458 : "\n"
39459 : ""},
39460 : { "Geometry_PointOnSurface", _wrap_Geometry_PointOnSurface, METH_O, "\n"
39461 : "Geometry_PointOnSurface(Geometry self) -> Geometry\n"
39462 : "\n"
39463 : "Returns a point guaranteed to lie on the surface.\n"
39464 : "\n"
39465 : "For more details: :cpp:func:`OGR_G_PointOnSurface`\n"
39466 : "\n"
39467 : "Returns\n"
39468 : "--------\n"
39469 : "Geometry:\n"
39470 : " A point guaranteed to lie on the surface or None if an error occurred.\n"
39471 : "\n"
39472 : ""},
39473 : { "Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_O, "\n"
39474 : "Geometry_WkbSize(Geometry self) -> size_t\n"
39475 : "\n"
39476 : "Returns size of related binary representation.\n"
39477 : "\n"
39478 : "For more details: :cpp:func:`OGR_G_WkbSize`\n"
39479 : "\n"
39480 : "Returns\n"
39481 : "--------\n"
39482 : "int\n"
39483 : "\n"
39484 : ""},
39485 : { "Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_O, "\n"
39486 : "Geometry_GetCoordinateDimension(Geometry self) -> int\n"
39487 : "\n"
39488 : "Get the dimension of the coordinates in this geometry.\n"
39489 : "\n"
39490 : "For more details: :cpp:func:`OGR_G_GetCoordinateDimension`\n"
39491 : "\n"
39492 : ".. warning:: Deprecated. Use :py:func:`CoordinateDimension`,\n"
39493 : " :py:func:`Is3D`, or :py:func:`IsMeasured`.\n"
39494 : "\n"
39495 : "Returns\n"
39496 : "--------\n"
39497 : "int:\n"
39498 : " This will return 2 or 3.\n"
39499 : "\n"
39500 : ""},
39501 : { "Geometry_CoordinateDimension", _wrap_Geometry_CoordinateDimension, METH_O, "\n"
39502 : "Geometry_CoordinateDimension(Geometry self) -> int\n"
39503 : "\n"
39504 : "Get the dimension of the coordinates in this geometry.\n"
39505 : "\n"
39506 : "For more details: :cpp:func:`OGR_G_CoordinateDimension`\n"
39507 : "\n"
39508 : ".. versionadded:: 2.1\n"
39509 : "\n"
39510 : "Returns\n"
39511 : "--------\n"
39512 : "int:\n"
39513 : " This will return 2 for XY, 3 for XYZ and XYM, and 4 for XYZM data.\n"
39514 : "\n"
39515 : ""},
39516 : { "Geometry_Is3D", _wrap_Geometry_Is3D, METH_O, "\n"
39517 : "Geometry_Is3D(Geometry self) -> int\n"
39518 : "\n"
39519 : "See whether this geometry has Z coordinates.\n"
39520 : "\n"
39521 : "For more details: :cpp:func:`OGR_G_Is3D`\n"
39522 : "\n"
39523 : ".. versionadded:: 2.1\n"
39524 : "\n"
39525 : "Returns\n"
39526 : "--------\n"
39527 : "int:\n"
39528 : " True if the geometry has Z coordinates.\n"
39529 : "\n"
39530 : ""},
39531 : { "Geometry_IsMeasured", _wrap_Geometry_IsMeasured, METH_O, "\n"
39532 : "Geometry_IsMeasured(Geometry self) -> int\n"
39533 : "\n"
39534 : "See whether this geometry is measured.\n"
39535 : "\n"
39536 : "For more details: :cpp:func:`OGR_G_IsMeasured`\n"
39537 : "\n"
39538 : ".. versionadded:: 2.1\n"
39539 : "\n"
39540 : "Returns\n"
39541 : "--------\n"
39542 : "int:\n"
39543 : " True if the geometry has M coordinates.\n"
39544 : "\n"
39545 : ""},
39546 : { "Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, "\n"
39547 : "Geometry_SetCoordinateDimension(Geometry self, int dimension)\n"
39548 : "\n"
39549 : "Set the coordinate dimension.\n"
39550 : "\n"
39551 : "For more details: :cpp:func:`OGR_G_SetCoordinateDimension`\n"
39552 : "\n"
39553 : ".. warning:: Deprecated. Use :py:func:`Set3D` or :py:func:`SetMeasured`.\n"
39554 : "\n"
39555 : "Parameters\n"
39556 : "-----------\n"
39557 : "dimension: int\n"
39558 : " New coordinate dimension value, either 2 or 3.\n"
39559 : "\n"
39560 : ""},
39561 : { "Geometry_Set3D", _wrap_Geometry_Set3D, METH_VARARGS, "\n"
39562 : "Geometry_Set3D(Geometry self, int b3D)\n"
39563 : "\n"
39564 : "Add or remove the Z coordinate dimension.\n"
39565 : "\n"
39566 : "For more details: :cpp:func:`OGR_G_Set3D`\n"
39567 : "\n"
39568 : ".. versionadded:: 2.1\n"
39569 : "\n"
39570 : "Parameters\n"
39571 : "-----------\n"
39572 : "bIs3D: bool\n"
39573 : " Should the geometry have a Z dimension, either True or False.\n"
39574 : "\n"
39575 : ""},
39576 : { "Geometry_SetMeasured", _wrap_Geometry_SetMeasured, METH_VARARGS, "\n"
39577 : "Geometry_SetMeasured(Geometry self, int bMeasured)\n"
39578 : "\n"
39579 : "Add or remove the M coordinate dimension.\n"
39580 : "\n"
39581 : "For more details: :cpp:func:`OGR_G_SetMeasured`\n"
39582 : "\n"
39583 : ".. versionadded:: 2.1\n"
39584 : "\n"
39585 : "Parameters\n"
39586 : "-----------\n"
39587 : "bIsMeasured: bool\n"
39588 : " Should the geometry have a M dimension, either True or False.\n"
39589 : "\n"
39590 : ""},
39591 : { "Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_O, "\n"
39592 : "Geometry_GetDimension(Geometry self) -> int\n"
39593 : "\n"
39594 : "Get the dimension of this geometry.\n"
39595 : "\n"
39596 : "For more details: :cpp:func:`OGR_G_GetDimension`\n"
39597 : "\n"
39598 : "Returns\n"
39599 : "--------\n"
39600 : "int:\n"
39601 : " 0 for points, 1 for lines, and 2 for surfaces.\n"
39602 : "\n"
39603 : ""},
39604 : { "Geometry_HasCurveGeometry", _wrap_Geometry_HasCurveGeometry, METH_VARARGS, "Geometry_HasCurveGeometry(Geometry self, int bLookForCircular=FALSE) -> int"},
39605 : { "Geometry_GetLinearGeometry", (PyCFunction)(void(*)(void))_wrap_Geometry_GetLinearGeometry, METH_VARARGS|METH_KEYWORDS, "Geometry_GetLinearGeometry(Geometry self, double dfMaxAngleStepSizeDegrees=0.0, char ** options=None) -> Geometry"},
39606 : { "Geometry_GetCurveGeometry", (PyCFunction)(void(*)(void))_wrap_Geometry_GetCurveGeometry, METH_VARARGS|METH_KEYWORDS, "Geometry_GetCurveGeometry(Geometry self, char ** options=None) -> Geometry"},
39607 : { "Geometry_Value", _wrap_Geometry_Value, METH_VARARGS, "Geometry_Value(Geometry self, double dfDistance) -> Geometry"},
39608 : { "Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, "\n"
39609 : "Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
39610 : "Geometry_Transform(Geometry self, GeomTransformer transformer) -> Geometry\n"
39611 : "\n"
39612 : "Apply arbitrary coordinate transformation to geometry.\n"
39613 : "\n"
39614 : "For more details: :cpp:func:`OGR_G_Transform`\n"
39615 : "\n"
39616 : "Parameters\n"
39617 : "-----------\n"
39618 : "trans: CoordinateTransform\n"
39619 : " The transformation to apply.\n"
39620 : "\n"
39621 : "Returns\n"
39622 : "--------\n"
39623 : "Geometry:\n"
39624 : " The transformed geometry.\n"
39625 : "\n"
39626 : ""},
39627 : { "Geometry_CreatePreparedGeometry", _wrap_Geometry_CreatePreparedGeometry, METH_O, "Geometry_CreatePreparedGeometry(Geometry self) -> PreparedGeometry"},
39628 : { "Geometry_swigregister", Geometry_swigregister, METH_O, NULL},
39629 : { "Geometry_swiginit", Geometry_swiginit, METH_VARARGS, NULL},
39630 : { "delete_PreparedGeometry", _wrap_delete_PreparedGeometry, METH_O, "delete_PreparedGeometry(PreparedGeometry self)"},
39631 : { "PreparedGeometry_Intersects", _wrap_PreparedGeometry_Intersects, METH_VARARGS, "PreparedGeometry_Intersects(PreparedGeometry self, Geometry otherGeom) -> bool"},
39632 : { "PreparedGeometry_Contains", _wrap_PreparedGeometry_Contains, METH_VARARGS, "PreparedGeometry_Contains(PreparedGeometry self, Geometry otherGeom) -> bool"},
39633 : { "PreparedGeometry_swigregister", PreparedGeometry_swigregister, METH_O, NULL},
39634 : { "new_GeomTransformer", _wrap_new_GeomTransformer, METH_VARARGS, "new_GeomTransformer(CoordinateTransformation ct, char ** options=None) -> GeomTransformer"},
39635 : { "delete_GeomTransformer", _wrap_delete_GeomTransformer, METH_O, "delete_GeomTransformer(GeomTransformer self)"},
39636 : { "GeomTransformer_Transform", _wrap_GeomTransformer_Transform, METH_VARARGS, "GeomTransformer_Transform(GeomTransformer self, Geometry src_geom) -> Geometry"},
39637 : { "GeomTransformer_swigregister", GeomTransformer_swigregister, METH_O, NULL},
39638 : { "GeomTransformer_swiginit", GeomTransformer_swiginit, METH_VARARGS, NULL},
39639 : { "delete_FieldDomain", _wrap_delete_FieldDomain, METH_O, "delete_FieldDomain(FieldDomain self)"},
39640 : { "FieldDomain_GetName", _wrap_FieldDomain_GetName, METH_O, "\n"
39641 : "FieldDomain_GetName(FieldDomain self) -> char const *\n"
39642 : "\n"
39643 : "\n"
39644 : "Get the name of the field domain.\n"
39645 : "\n"
39646 : "See :cpp:func:`OGRFieldDomain::GetName`.\n"
39647 : "\n"
39648 : ".. versionadded:: 3.3\n"
39649 : "\n"
39650 : "Returns\n"
39651 : "--------\n"
39652 : "str\n"
39653 : " the field domain name.\n"
39654 : "\n"
39655 : ""},
39656 : { "FieldDomain_GetDescription", _wrap_FieldDomain_GetDescription, METH_O, "\n"
39657 : "FieldDomain_GetDescription(FieldDomain self) -> char const *\n"
39658 : "\n"
39659 : "\n"
39660 : "Get the description of the field domain.\n"
39661 : "\n"
39662 : "See :cpp:func:`OGRFieldDomain::GetDescription`.\n"
39663 : "\n"
39664 : ".. versionadded:: 3.3\n"
39665 : "\n"
39666 : "Returns\n"
39667 : "--------\n"
39668 : "str\n"
39669 : " the field domain description (might be empty string).\n"
39670 : "\n"
39671 : ""},
39672 : { "FieldDomain_GetFieldType", _wrap_FieldDomain_GetFieldType, METH_O, "\n"
39673 : "FieldDomain_GetFieldType(FieldDomain self) -> OGRFieldType\n"
39674 : "\n"
39675 : "\n"
39676 : "Get the field type of the field domain.\n"
39677 : "\n"
39678 : "See :cpp:func:`OGRFieldDomain::GetFieldType`.\n"
39679 : "\n"
39680 : ".. versionadded:: 3.3\n"
39681 : "\n"
39682 : "Returns\n"
39683 : "--------\n"
39684 : "int\n"
39685 : " the field type of the field domain.\n"
39686 : "\n"
39687 : ""},
39688 : { "FieldDomain_GetFieldSubType", _wrap_FieldDomain_GetFieldSubType, METH_O, "\n"
39689 : "FieldDomain_GetFieldSubType(FieldDomain self) -> OGRFieldSubType\n"
39690 : "\n"
39691 : "\n"
39692 : "Get the field subtype of the field domain.\n"
39693 : "\n"
39694 : "See :cpp:func:`OGRFieldDomain::GetFieldSubType`.\n"
39695 : "\n"
39696 : ".. versionadded:: 3.3\n"
39697 : "\n"
39698 : "Returns\n"
39699 : "--------\n"
39700 : "int\n"
39701 : " the field subtype of the field domain.\n"
39702 : "\n"
39703 : ""},
39704 : { "FieldDomain_GetDomainType", _wrap_FieldDomain_GetDomainType, METH_O, "\n"
39705 : "FieldDomain_GetDomainType(FieldDomain self) -> OGRFieldDomainType\n"
39706 : "\n"
39707 : "\n"
39708 : "Get the type of the field domain.\n"
39709 : "\n"
39710 : "See :cpp:func:`OGRFieldDomain::GetDomainType`.\n"
39711 : "\n"
39712 : ".. versionadded:: 3.3\n"
39713 : "\n"
39714 : "Returns\n"
39715 : "--------\n"
39716 : "int\n"
39717 : " the type of the field domain.\n"
39718 : "\n"
39719 : "Examples\n"
39720 : "--------\n"
39721 : ">>> d = ogr.CreateCodedFieldDomain('my_code', None, ogr.OFTInteger, ogr.OFSTNone, { 1 : 'owned', 2 : 'leased' })\n"
39722 : ">>> d.GetDomainType() == ogr.OFDT_CODED\n"
39723 : "True\n"
39724 : "\n"
39725 : "\n"
39726 : ""},
39727 : { "FieldDomain_GetSplitPolicy", _wrap_FieldDomain_GetSplitPolicy, METH_O, "\n"
39728 : "FieldDomain_GetSplitPolicy(FieldDomain self) -> OGRFieldDomainSplitPolicy\n"
39729 : "\n"
39730 : "\n"
39731 : "Get the split policy of the field domain.\n"
39732 : "\n"
39733 : "See :cpp:func:`OGRFieldDomain::GetSplitPolicy`.\n"
39734 : "\n"
39735 : ".. versionadded:: 3.3\n"
39736 : "\n"
39737 : "Returns\n"
39738 : "--------\n"
39739 : "int\n"
39740 : " the split policy of the field domain (default = :py:const:`OFDSP_DEFAULT_VALUE`)\n"
39741 : "\n"
39742 : ""},
39743 : { "FieldDomain_SetSplitPolicy", _wrap_FieldDomain_SetSplitPolicy, METH_VARARGS, "\n"
39744 : "FieldDomain_SetSplitPolicy(FieldDomain self, OGRFieldDomainSplitPolicy policy)\n"
39745 : "\n"
39746 : "\n"
39747 : "Set the split policy of the field domain.\n"
39748 : "\n"
39749 : "See :cpp:func:`OGRFieldDomain::SetSplitPolicy`.\n"
39750 : "\n"
39751 : ".. versionadded:: 3.3\n"
39752 : "\n"
39753 : "policy : int\n"
39754 : " the split policy code of the field domain.\n"
39755 : "\n"
39756 : ""},
39757 : { "FieldDomain_GetMergePolicy", _wrap_FieldDomain_GetMergePolicy, METH_O, "\n"
39758 : "FieldDomain_GetMergePolicy(FieldDomain self) -> OGRFieldDomainMergePolicy\n"
39759 : "\n"
39760 : "\n"
39761 : "Get the merge policy of the field domain.\n"
39762 : "\n"
39763 : "See :cpp:func:`OGRFieldDomain::GetMergePolicy`.\n"
39764 : "\n"
39765 : ".. versionadded:: 3.3\n"
39766 : "\n"
39767 : "Returns\n"
39768 : "--------\n"
39769 : "int\n"
39770 : " the merge policy of the field domain (default = :py:const:`OFDMP_DEFAULT_VALUE`)\n"
39771 : "\n"
39772 : ""},
39773 : { "FieldDomain_SetMergePolicy", _wrap_FieldDomain_SetMergePolicy, METH_VARARGS, "\n"
39774 : "FieldDomain_SetMergePolicy(FieldDomain self, OGRFieldDomainMergePolicy policy)\n"
39775 : "\n"
39776 : "\n"
39777 : "Set the merge policy of the field domain.\n"
39778 : "\n"
39779 : "See :cpp:func:`OGRFieldDomain::SetMergePolicy`.\n"
39780 : "\n"
39781 : ".. versionadded:: 3.3\n"
39782 : "\n"
39783 : "Parameters\n"
39784 : "-----------\n"
39785 : "policy : int\n"
39786 : " the merge policy code of the field domain.\n"
39787 : "\n"
39788 : ""},
39789 : { "FieldDomain_GetEnumeration", _wrap_FieldDomain_GetEnumeration, METH_O, "\n"
39790 : "FieldDomain_GetEnumeration(FieldDomain self) -> OGRCodedValue const *\n"
39791 : "\n"
39792 : "\n"
39793 : "Get the enumeration as a mapping of codes to values.\n"
39794 : "\n"
39795 : "See :cpp:func:`OGRCodedFieldDomain::GetEnumeration`.\n"
39796 : "\n"
39797 : ".. versionadded:: 3.3\n"
39798 : "\n"
39799 : "Returns\n"
39800 : "--------\n"
39801 : "dict\n"
39802 : "\n"
39803 : "Examples\n"
39804 : "--------\n"
39805 : ">>> d = ogr.CreateCodedFieldDomain('my_domain', None, ogr.OFTInteger, ogr.OFSTNone, { 1 : 'owned', 2 : 'leased' })\n"
39806 : ">>> d.GetEnumeration()\n"
39807 : "{'1': 'owned', '2': 'leased'}\n"
39808 : "\n"
39809 : "\n"
39810 : ""},
39811 : { "FieldDomain_GetMinAsDouble", _wrap_FieldDomain_GetMinAsDouble, METH_O, "\n"
39812 : "FieldDomain_GetMinAsDouble(FieldDomain self) -> double\n"
39813 : "\n"
39814 : "\n"
39815 : "Get the minimum value of a range domain.\n"
39816 : "\n"
39817 : "See :cpp:func:`OGRRangeFieldDomain::GetMin()`\n"
39818 : "\n"
39819 : ".. versionadded:: 3.3\n"
39820 : "\n"
39821 : "Returns\n"
39822 : "--------\n"
39823 : "float\n"
39824 : " the minimum value of the range\n"
39825 : "\n"
39826 : ""},
39827 : { "FieldDomain_GetMinAsString", _wrap_FieldDomain_GetMinAsString, METH_O, "\n"
39828 : "FieldDomain_GetMinAsString(FieldDomain self) -> char const *\n"
39829 : "\n"
39830 : "\n"
39831 : "Get the minimum value of a range domain.\n"
39832 : "\n"
39833 : "See :cpp:func:`OGRRangeFieldDomain::GetMin()`\n"
39834 : "\n"
39835 : ".. versionadded:: 3.3\n"
39836 : "\n"
39837 : "Returns\n"
39838 : "--------\n"
39839 : "str\n"
39840 : " the minimum value of the range\n"
39841 : "\n"
39842 : ""},
39843 : { "FieldDomain_IsMinInclusive", _wrap_FieldDomain_IsMinInclusive, METH_O, "FieldDomain_IsMinInclusive(FieldDomain self) -> bool"},
39844 : { "FieldDomain_GetMaxAsDouble", _wrap_FieldDomain_GetMaxAsDouble, METH_O, "\n"
39845 : "FieldDomain_GetMaxAsDouble(FieldDomain self) -> double\n"
39846 : "\n"
39847 : "\n"
39848 : "Get the maximum value of a range domain.\n"
39849 : "\n"
39850 : "See :cpp:func:`OGRRangeFieldDomain::GetMax()`\n"
39851 : "\n"
39852 : ".. versionadded:: 3.3\n"
39853 : "\n"
39854 : "Returns\n"
39855 : "--------\n"
39856 : "float\n"
39857 : " the maximum value of the range\n"
39858 : "\n"
39859 : ""},
39860 : { "FieldDomain_GetMaxAsString", _wrap_FieldDomain_GetMaxAsString, METH_O, "\n"
39861 : "FieldDomain_GetMaxAsString(FieldDomain self) -> char const *\n"
39862 : "\n"
39863 : "\n"
39864 : "Get the maximum value of a range domain.\n"
39865 : "\n"
39866 : "See :cpp:func:`OGRRangeFieldDomain::GetMax()`\n"
39867 : "\n"
39868 : ".. versionadded:: 3.3\n"
39869 : "\n"
39870 : "Returns\n"
39871 : "--------\n"
39872 : "str\n"
39873 : " the maximum value of the range\n"
39874 : "\n"
39875 : ""},
39876 : { "FieldDomain_IsMaxInclusive", _wrap_FieldDomain_IsMaxInclusive, METH_O, "FieldDomain_IsMaxInclusive(FieldDomain self) -> bool"},
39877 : { "FieldDomain_GetGlob", _wrap_FieldDomain_GetGlob, METH_O, "\n"
39878 : "FieldDomain_GetGlob(FieldDomain self) -> char const *\n"
39879 : "\n"
39880 : "\n"
39881 : "Get the glob expression.\n"
39882 : "\n"
39883 : "See :cpp:func:`OGRGlobFieldDomain::GetGlob`.\n"
39884 : "\n"
39885 : ".. versionadded:: 3.3\n"
39886 : "\n"
39887 : "Returns\n"
39888 : "--------\n"
39889 : "str\n"
39890 : " the glob expression, or ``None`` in case of error\n"
39891 : "\n"
39892 : ""},
39893 : { "FieldDomain_swigregister", FieldDomain_swigregister, METH_O, NULL},
39894 : { "CreateCodedFieldDomain", _wrap_CreateCodedFieldDomain, METH_VARARGS, "\n"
39895 : "CreateCodedFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, OGRCodedValue const * enumeration) -> FieldDomain\n"
39896 : "\n"
39897 : "\n"
39898 : "Creates a new coded field domain.\n"
39899 : "\n"
39900 : "See :cpp:func:`OGRCodedFieldDomain::OGRCodedFieldDomain`.\n"
39901 : "\n"
39902 : ".. versionadded:: 3.3\n"
39903 : "\n"
39904 : "Parameters\n"
39905 : "-----------\n"
39906 : "name : str\n"
39907 : " Domain name. Should not be ``None``.\n"
39908 : "description : str, optional\n"
39909 : " Domain description (can be ``None``)\n"
39910 : "type : int\n"
39911 : " Field type.\n"
39912 : "subtype : int\n"
39913 : " Field subtype.\n"
39914 : "enumeration : dict\n"
39915 : " Enumeration as a dictionary of (code : value) pairs. Should not be ``None``.\n"
39916 : "\n"
39917 : "Returns\n"
39918 : "--------\n"
39919 : "FieldDomain\n"
39920 : "\n"
39921 : ""},
39922 : { "CreateRangeFieldDomain", _wrap_CreateRangeFieldDomain, METH_VARARGS, "\n"
39923 : "CreateRangeFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, double * min, bool minIsInclusive, double * max, bool maxIsInclusive) -> FieldDomain\n"
39924 : "\n"
39925 : "Creates a new range field domain.\n"
39926 : "\n"
39927 : "See :cpp:func:`OGRRangeFieldDomain::OGRRangeFieldDomain`.\n"
39928 : "\n"
39929 : ".. versionadded:: 3.3\n"
39930 : "\n"
39931 : "Parameters\n"
39932 : "-----------\n"
39933 : "name : str\n"
39934 : " Domain name. Should not be ``None``.\n"
39935 : "description : str, optional\n"
39936 : " Domain description (can be ``None``)\n"
39937 : "type : int\n"
39938 : " Field type. Generally numeric. Potentially :py:const:`OFTDateTime`.\n"
39939 : "subtype : int\n"
39940 : " Field subtype.\n"
39941 : "min : float, optional\n"
39942 : " Minimum value (can be ``None``).\n"
39943 : "minIsInclusive : bool\n"
39944 : " Whether the minimum value is included in the range.\n"
39945 : "max : float, optional\n"
39946 : " Maximum value (can be ``None``).\n"
39947 : "maxIsInclusive : bool\n"
39948 : " Whether the maximum value is included in the range.\n"
39949 : "\n"
39950 : "Returns\n"
39951 : "--------\n"
39952 : "FieldDomain\n"
39953 : "\n"
39954 : ""},
39955 : { "CreateRangeFieldDomainDateTime", _wrap_CreateRangeFieldDomainDateTime, METH_VARARGS, "CreateRangeFieldDomainDateTime(char const * name, char const * description, char const * min, bool minIsInclusive, char const * max, double maxIsInclusive) -> FieldDomain"},
39956 : { "CreateGlobFieldDomain", _wrap_CreateGlobFieldDomain, METH_VARARGS, "\n"
39957 : "CreateGlobFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, char const * glob) -> FieldDomain\n"
39958 : "\n"
39959 : "\n"
39960 : "Creates a new glob field domain.\n"
39961 : "\n"
39962 : "See :cpp:func:`OGRGlobFieldDomain::OGRGlobFieldDomain`\n"
39963 : "\n"
39964 : ".. versionadded:: 3.3\n"
39965 : "\n"
39966 : "Parameters\n"
39967 : "-----------\n"
39968 : "name : str\n"
39969 : " Domain name. Should not be ``None``.\n"
39970 : "description : str, optional\n"
39971 : " Domain description (can be ``None``)\n"
39972 : "type : int\n"
39973 : " Field type.\n"
39974 : "subtype : int\n"
39975 : " Field subtype.\n"
39976 : "glob : str\n"
39977 : " Glob expression. Should not be ``None``.\n"
39978 : "\n"
39979 : "Returns\n"
39980 : "--------\n"
39981 : "FieldDomain\n"
39982 : "\n"
39983 : ""},
39984 : { "delete_GeomCoordinatePrecision", _wrap_delete_GeomCoordinatePrecision, METH_O, "delete_GeomCoordinatePrecision(GeomCoordinatePrecision self)"},
39985 : { "GeomCoordinatePrecision_Set", _wrap_GeomCoordinatePrecision_Set, METH_VARARGS, "GeomCoordinatePrecision_Set(GeomCoordinatePrecision self, double xyResolution, double zResolution, double mResolution)"},
39986 : { "GeomCoordinatePrecision_SetFromMeter", _wrap_GeomCoordinatePrecision_SetFromMeter, METH_VARARGS, "GeomCoordinatePrecision_SetFromMeter(GeomCoordinatePrecision self, SpatialReference srs, double xyMeterResolution, double zMeterResolution, double mResolution)"},
39987 : { "GeomCoordinatePrecision_GetXYResolution", _wrap_GeomCoordinatePrecision_GetXYResolution, METH_O, "GeomCoordinatePrecision_GetXYResolution(GeomCoordinatePrecision self) -> double"},
39988 : { "GeomCoordinatePrecision_GetZResolution", _wrap_GeomCoordinatePrecision_GetZResolution, METH_O, "GeomCoordinatePrecision_GetZResolution(GeomCoordinatePrecision self) -> double"},
39989 : { "GeomCoordinatePrecision_GetMResolution", _wrap_GeomCoordinatePrecision_GetMResolution, METH_O, "GeomCoordinatePrecision_GetMResolution(GeomCoordinatePrecision self) -> double"},
39990 : { "GeomCoordinatePrecision_GetFormats", _wrap_GeomCoordinatePrecision_GetFormats, METH_O, "GeomCoordinatePrecision_GetFormats(GeomCoordinatePrecision self) -> char **"},
39991 : { "GeomCoordinatePrecision_GetFormatSpecificOptions", _wrap_GeomCoordinatePrecision_GetFormatSpecificOptions, METH_VARARGS, "GeomCoordinatePrecision_GetFormatSpecificOptions(GeomCoordinatePrecision self, char const * formatName) -> char **"},
39992 : { "GeomCoordinatePrecision_SetFormatSpecificOptions", _wrap_GeomCoordinatePrecision_SetFormatSpecificOptions, METH_VARARGS, "GeomCoordinatePrecision_SetFormatSpecificOptions(GeomCoordinatePrecision self, char const * formatName, char ** formatSpecificOptions)"},
39993 : { "GeomCoordinatePrecision_swigregister", GeomCoordinatePrecision_swigregister, METH_O, NULL},
39994 : { "CreateGeomCoordinatePrecision", _wrap_CreateGeomCoordinatePrecision, METH_NOARGS, "CreateGeomCoordinatePrecision() -> GeomCoordinatePrecision"},
39995 : { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "GetDriverCount() -> int"},
39996 : { "GetOpenDSCount", _wrap_GetOpenDSCount, METH_NOARGS, "GetOpenDSCount() -> int"},
39997 : { "SetGenerate_DB2_V72_BYTE_ORDER", _wrap_SetGenerate_DB2_V72_BYTE_ORDER, METH_O, "SetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER) -> OGRErr"},
39998 : { "RegisterAll", _wrap_RegisterAll, METH_NOARGS, "RegisterAll()"},
39999 : { "GeometryTypeToName", _wrap_GeometryTypeToName, METH_O, "GeometryTypeToName(OGRwkbGeometryType eType) -> char const *"},
40000 : { "GetFieldTypeName", _wrap_GetFieldTypeName, METH_O, "\n"
40001 : "GetFieldTypeName(OGRFieldType type) -> char const *\n"
40002 : "\n"
40003 : "Fetch human readable name for a field type.\n"
40004 : "\n"
40005 : "See :cpp:func:`OGRFieldDefn::GetFieldTypeName`.\n"
40006 : "\n"
40007 : "Parameters\n"
40008 : "-----------\n"
40009 : "type : int\n"
40010 : " the field type code to get name for\n"
40011 : "\n"
40012 : "Returns\n"
40013 : "--------\n"
40014 : "str\n"
40015 : " the name\n"
40016 : "\n"
40017 : "Examples\n"
40018 : "--------\n"
40019 : ">>> ogr.GetFieldTypeName(0)\n"
40020 : "'Integer'\n"
40021 : "\n"
40022 : ">>> ogr.GetFieldTypeName(ogr.OFTReal)\n"
40023 : "'Real'\n"
40024 : "\n"
40025 : ""},
40026 : { "GetFieldSubTypeName", _wrap_GetFieldSubTypeName, METH_O, "\n"
40027 : "GetFieldSubTypeName(OGRFieldSubType type) -> char const *\n"
40028 : "\n"
40029 : "\n"
40030 : "Fetch human readable name for a field subtype.\n"
40031 : "\n"
40032 : "See :cpp:func:`OGRFieldDefn::GetFieldSubTypeName`.\n"
40033 : "\n"
40034 : "Parameters\n"
40035 : "-----------\n"
40036 : "type : int\n"
40037 : " the field subtype to get name for.\n"
40038 : "\n"
40039 : "Returns\n"
40040 : "--------\n"
40041 : "str\n"
40042 : " the name.\n"
40043 : "\n"
40044 : "Examples\n"
40045 : "--------\n"
40046 : ">>> ogr.GetFieldSubTypeName(1)\n"
40047 : "'Boolean'\n"
40048 : "\n"
40049 : ">>> ogr.GetFieldSubTypeName(ogr.OFSTInt16)\n"
40050 : "'Int16'\n"
40051 : "\n"
40052 : "\n"
40053 : ""},
40054 : { "GT_Flatten", _wrap_GT_Flatten, METH_O, "GT_Flatten(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
40055 : { "GT_SetZ", _wrap_GT_SetZ, METH_O, "GT_SetZ(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
40056 : { "GT_SetM", _wrap_GT_SetM, METH_O, "GT_SetM(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
40057 : { "GT_SetModifier", _wrap_GT_SetModifier, METH_VARARGS, "GT_SetModifier(OGRwkbGeometryType eType, int bSetZ, int bSetM=FALSE) -> OGRwkbGeometryType"},
40058 : { "GT_HasZ", _wrap_GT_HasZ, METH_O, "GT_HasZ(OGRwkbGeometryType eType) -> int"},
40059 : { "GT_HasM", _wrap_GT_HasM, METH_O, "GT_HasM(OGRwkbGeometryType eType) -> int"},
40060 : { "GT_IsSubClassOf", _wrap_GT_IsSubClassOf, METH_VARARGS, "GT_IsSubClassOf(OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType) -> int"},
40061 : { "GT_IsCurve", _wrap_GT_IsCurve, METH_O, "GT_IsCurve(OGRwkbGeometryType arg1) -> int"},
40062 : { "GT_IsSurface", _wrap_GT_IsSurface, METH_O, "GT_IsSurface(OGRwkbGeometryType arg1) -> int"},
40063 : { "GT_IsNonLinear", _wrap_GT_IsNonLinear, METH_O, "GT_IsNonLinear(OGRwkbGeometryType arg1) -> int"},
40064 : { "GT_GetCollection", _wrap_GT_GetCollection, METH_O, "GT_GetCollection(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
40065 : { "GT_GetSingle", _wrap_GT_GetSingle, METH_O, "GT_GetSingle(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
40066 : { "GT_GetCurve", _wrap_GT_GetCurve, METH_O, "GT_GetCurve(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
40067 : { "GT_GetLinear", _wrap_GT_GetLinear, METH_O, "GT_GetLinear(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
40068 : { "SetNonLinearGeometriesEnabledFlag", _wrap_SetNonLinearGeometriesEnabledFlag, METH_O, "SetNonLinearGeometriesEnabledFlag(int bFlag)"},
40069 : { "GetNonLinearGeometriesEnabledFlag", _wrap_GetNonLinearGeometriesEnabledFlag, METH_NOARGS, "GetNonLinearGeometriesEnabledFlag() -> int"},
40070 : { "GetOpenDS", _wrap_GetOpenDS, METH_O, "GetOpenDS(int ds_number) -> OGRDataSourceShadow *"},
40071 : { "Open", (PyCFunction)(void(*)(void))_wrap_Open, METH_VARARGS|METH_KEYWORDS, "\n"
40072 : "Open(char const * utf8_path, int update=0) -> OGRDataSourceShadow *\n"
40073 : "\n"
40074 : "\n"
40075 : "Open a vector file as a :py:class:`gdal.Dataset`.\n"
40076 : "Equivalent to calling :py:func:`gdal.OpenEx` with the\n"
40077 : ":py:const:`gdal.OF_VECTOR` flag.\n"
40078 : "\n"
40079 : "Parameters\n"
40080 : "----------\n"
40081 : "utf8_path : str\n"
40082 : " name of the file to open\n"
40083 : "\n"
40084 : "Returns\n"
40085 : "-------\n"
40086 : "gdal.Dataset, or ``None`` on failure\n"
40087 : "\n"
40088 : "Examples\n"
40089 : "--------\n"
40090 : ">>> from osgeo import ogr\n"
40091 : ">>> ogr.GetDriverByName('ESRI Shapefile').GetDescription()\n"
40092 : "'ESRI Shapefile'\n"
40093 : ">>> ogr.GetDriverByName('GTiff')\n"
40094 : ">>>\n"
40095 : "\n"
40096 : ""},
40097 : { "OpenShared", (PyCFunction)(void(*)(void))_wrap_OpenShared, METH_VARARGS|METH_KEYWORDS, "\n"
40098 : "OpenShared(char const * utf8_path, int update=0) -> OGRDataSourceShadow *\n"
40099 : "\n"
40100 : "\n"
40101 : "Open a vector file as a :py:class:`gdal.Dataset`. If the file has already been\n"
40102 : "opened in the current thread, return a reference to the already-opened\n"
40103 : ":py:class:`gdal.Dataset`. Equivalent to calling :py:func:`gdal.OpenEx` with the\n"
40104 : ":py:const:`gdal.OF_VECTOR` and :py:const:`gdal.OF_SHARED` flags.\n"
40105 : "\n"
40106 : "Parameters\n"
40107 : "----------\n"
40108 : "utf8_path : str\n"
40109 : " name of the file to open\n"
40110 : "\n"
40111 : "Returns\n"
40112 : "-------\n"
40113 : "gdal.Dataset, or ``None`` on failure\n"
40114 : "\n"
40115 : "\n"
40116 : ""},
40117 : { "GetDriverByName", _wrap_GetDriverByName, METH_O, "\n"
40118 : "GetDriverByName(char const * name) -> OGRDriverShadow *\n"
40119 : "\n"
40120 : "\n"
40121 : "Get a vector driver. Like :py:func:`gdal.GetDriverByName`, but\n"
40122 : "only returns drivers that handle vector data.\n"
40123 : "\n"
40124 : "Parameters\n"
40125 : "----------\n"
40126 : "name : str\n"
40127 : " name of the driver to fetch\n"
40128 : "\n"
40129 : "Returns\n"
40130 : "-------\n"
40131 : "gdal.Driver\n"
40132 : "\n"
40133 : "Examples\n"
40134 : "--------\n"
40135 : ">>> ogr.GetDriverByName('ESRI Shapefile').GetDescription()\n"
40136 : "'ESRI Shapefile'\n"
40137 : "\n"
40138 : ">>> ogr.GetDriverByName('GTiff')\n"
40139 : ">>>\n"
40140 : "\n"
40141 : ""},
40142 : { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int driver_number) -> OGRDriverShadow *"},
40143 : { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
40144 : { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
40145 : { NULL, NULL, 0, NULL }
40146 : };
40147 :
40148 : static PyMethodDef SwigMethods_proxydocs[] = {
40149 : { NULL, NULL, 0, NULL }
40150 : };
40151 :
40152 :
40153 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
40154 :
40155 0 : static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
40156 0 : return (void *)((GDALMajorObjectShadow *) ((OGRLayerShadow *) x));
40157 : }
40158 : static swig_type_info _swigt__p_ArrowArray = {"_p_ArrowArray", "ArrowArray *", 0, 0, (void*)0, 0};
40159 : static swig_type_info _swigt__p_ArrowArrayStream = {"_p_ArrowArrayStream", "ArrowArrayStream *", 0, 0, (void*)0, 0};
40160 : static swig_type_info _swigt__p_ArrowSchema = {"_p_ArrowSchema", "ArrowSchema *", 0, 0, (void*)0, 0};
40161 : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *|OGRDataSourceShadow *", 0, 0, (void*)0, 0};
40162 : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *|OGRDriverShadow *", 0, 0, (void*)0, 0};
40163 : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
40164 : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
40165 : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
40166 : static swig_type_info _swigt__p_OGRCodedValue = {"_p_OGRCodedValue", "OGRCodedValue *", 0, 0, (void*)0, 0};
40167 : static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
40168 : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
40169 : static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
40170 : static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
40171 : static swig_type_info _swigt__p_OGRGeomCoordinatePrecisionShadow = {"_p_OGRGeomCoordinatePrecisionShadow", "OGRGeomCoordinatePrecisionShadow *", 0, 0, (void*)0, 0};
40172 : static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
40173 : static swig_type_info _swigt__p_OGRGeomTransformerShadow = {"_p_OGRGeomTransformerShadow", "OGRGeomTransformerShadow *", 0, 0, (void*)0, 0};
40174 : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
40175 : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
40176 : static swig_type_info _swigt__p_OGRPreparedGeometryShadow = {"_p_OGRPreparedGeometryShadow", "OGRPreparedGeometryShadow *", 0, 0, (void*)0, 0};
40177 : static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
40178 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
40179 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
40180 : static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
40181 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
40182 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
40183 : static swig_type_info _swigt__p_f_double_p_q_const__char_p_void__int = {"_p_f_double_p_q_const__char_p_void__int", "int (*)(double,char const *,void *)", 0, 0, (void*)0, 0};
40184 : static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
40185 : static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldSubType *|OSRAxisMappingStrategy *|OGRFieldDomainType *|OGRFieldType *|CPLErr *|int *|OGRwkbGeometryType *|OGRJustification *|OGRAxisOrientation *|OGRFieldDomainSplitPolicy *|OGRFieldDomainMergePolicy *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0};
40186 : static swig_type_info _swigt__p_p_GIntBig = {"_p_p_GIntBig", "GIntBig **", 0, 0, (void*)0, 0};
40187 : static swig_type_info _swigt__p_p_OGRGeometryTypeCounter = {"_p_p_OGRGeometryTypeCounter", "OGRGeometryTypeCounter **", 0, 0, (void*)0, 0};
40188 : static swig_type_info _swigt__p_p_OGRSpatialReferenceH = {"_p_p_OGRSpatialReferenceH", "OGRSpatialReferenceH **", 0, 0, (void*)0, 0};
40189 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
40190 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
40191 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
40192 : static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
40193 :
40194 : static swig_type_info *swig_type_initial[] = {
40195 : &_swigt__p_ArrowArray,
40196 : &_swigt__p_ArrowArrayStream,
40197 : &_swigt__p_ArrowSchema,
40198 : &_swigt__p_GDALDatasetShadow,
40199 : &_swigt__p_GDALDriverShadow,
40200 : &_swigt__p_GDALMajorObjectShadow,
40201 : &_swigt__p_GDALProgressFunc,
40202 : &_swigt__p_GIntBig,
40203 : &_swigt__p_OGRCodedValue,
40204 : &_swigt__p_OGRFeatureDefnShadow,
40205 : &_swigt__p_OGRFeatureShadow,
40206 : &_swigt__p_OGRFieldDefnShadow,
40207 : &_swigt__p_OGRFieldDomainShadow,
40208 : &_swigt__p_OGRGeomCoordinatePrecisionShadow,
40209 : &_swigt__p_OGRGeomFieldDefnShadow,
40210 : &_swigt__p_OGRGeomTransformerShadow,
40211 : &_swigt__p_OGRGeometryShadow,
40212 : &_swigt__p_OGRLayerShadow,
40213 : &_swigt__p_OGRPreparedGeometryShadow,
40214 : &_swigt__p_OGRStyleTableShadow,
40215 : &_swigt__p_OSRCoordinateTransformationShadow,
40216 : &_swigt__p_OSRSpatialReferenceShadow,
40217 : &_swigt__p_bool,
40218 : &_swigt__p_char,
40219 : &_swigt__p_double,
40220 : &_swigt__p_f_double_p_q_const__char_p_void__int,
40221 : &_swigt__p_float,
40222 : &_swigt__p_int,
40223 : &_swigt__p_p_GIntBig,
40224 : &_swigt__p_p_OGRGeometryTypeCounter,
40225 : &_swigt__p_p_OGRSpatialReferenceH,
40226 : &_swigt__p_p_char,
40227 : &_swigt__p_p_double,
40228 : &_swigt__p_p_int,
40229 : &_swigt__p_size_t,
40230 : };
40231 :
40232 : static swig_cast_info _swigc__p_ArrowArray[] = { {&_swigt__p_ArrowArray, 0, 0, 0},{0, 0, 0, 0}};
40233 : static swig_cast_info _swigc__p_ArrowArrayStream[] = { {&_swigt__p_ArrowArrayStream, 0, 0, 0},{0, 0, 0, 0}};
40234 : static swig_cast_info _swigc__p_ArrowSchema[] = { {&_swigt__p_ArrowSchema, 0, 0, 0},{0, 0, 0, 0}};
40235 : static swig_cast_info _swigc__p_GDALDatasetShadow[] = { {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
40236 : static swig_cast_info _swigc__p_GDALDriverShadow[] = { {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
40237 : static swig_cast_info _swigc__p_GDALMajorObjectShadow[] = { {&_swigt__p_GDALMajorObjectShadow, 0, 0, 0}, {&_swigt__p_OGRLayerShadow, _p_OGRLayerShadowTo_p_GDALMajorObjectShadow, 0, 0},{0, 0, 0, 0}};
40238 : static swig_cast_info _swigc__p_GDALProgressFunc[] = { {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
40239 : static swig_cast_info _swigc__p_GIntBig[] = { {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
40240 : static swig_cast_info _swigc__p_OGRCodedValue[] = { {&_swigt__p_OGRCodedValue, 0, 0, 0},{0, 0, 0, 0}};
40241 : static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = { {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
40242 : static swig_cast_info _swigc__p_OGRFeatureShadow[] = { {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
40243 : static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = { {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
40244 : static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = { {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
40245 : static swig_cast_info _swigc__p_OGRGeomCoordinatePrecisionShadow[] = { {&_swigt__p_OGRGeomCoordinatePrecisionShadow, 0, 0, 0},{0, 0, 0, 0}};
40246 : static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = { {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
40247 : static swig_cast_info _swigc__p_OGRGeomTransformerShadow[] = { {&_swigt__p_OGRGeomTransformerShadow, 0, 0, 0},{0, 0, 0, 0}};
40248 : static swig_cast_info _swigc__p_OGRGeometryShadow[] = { {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
40249 : static swig_cast_info _swigc__p_OGRLayerShadow[] = { {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
40250 : static swig_cast_info _swigc__p_OGRPreparedGeometryShadow[] = { {&_swigt__p_OGRPreparedGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
40251 : static swig_cast_info _swigc__p_OGRStyleTableShadow[] = { {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
40252 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
40253 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
40254 : static swig_cast_info _swigc__p_bool[] = { {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
40255 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
40256 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
40257 : static swig_cast_info _swigc__p_f_double_p_q_const__char_p_void__int[] = { {&_swigt__p_f_double_p_q_const__char_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
40258 : static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
40259 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
40260 : static swig_cast_info _swigc__p_p_GIntBig[] = { {&_swigt__p_p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
40261 : static swig_cast_info _swigc__p_p_OGRGeometryTypeCounter[] = { {&_swigt__p_p_OGRGeometryTypeCounter, 0, 0, 0},{0, 0, 0, 0}};
40262 : static swig_cast_info _swigc__p_p_OGRSpatialReferenceH[] = { {&_swigt__p_p_OGRSpatialReferenceH, 0, 0, 0},{0, 0, 0, 0}};
40263 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
40264 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
40265 : static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
40266 : static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
40267 :
40268 : static swig_cast_info *swig_cast_initial[] = {
40269 : _swigc__p_ArrowArray,
40270 : _swigc__p_ArrowArrayStream,
40271 : _swigc__p_ArrowSchema,
40272 : _swigc__p_GDALDatasetShadow,
40273 : _swigc__p_GDALDriverShadow,
40274 : _swigc__p_GDALMajorObjectShadow,
40275 : _swigc__p_GDALProgressFunc,
40276 : _swigc__p_GIntBig,
40277 : _swigc__p_OGRCodedValue,
40278 : _swigc__p_OGRFeatureDefnShadow,
40279 : _swigc__p_OGRFeatureShadow,
40280 : _swigc__p_OGRFieldDefnShadow,
40281 : _swigc__p_OGRFieldDomainShadow,
40282 : _swigc__p_OGRGeomCoordinatePrecisionShadow,
40283 : _swigc__p_OGRGeomFieldDefnShadow,
40284 : _swigc__p_OGRGeomTransformerShadow,
40285 : _swigc__p_OGRGeometryShadow,
40286 : _swigc__p_OGRLayerShadow,
40287 : _swigc__p_OGRPreparedGeometryShadow,
40288 : _swigc__p_OGRStyleTableShadow,
40289 : _swigc__p_OSRCoordinateTransformationShadow,
40290 : _swigc__p_OSRSpatialReferenceShadow,
40291 : _swigc__p_bool,
40292 : _swigc__p_char,
40293 : _swigc__p_double,
40294 : _swigc__p_f_double_p_q_const__char_p_void__int,
40295 : _swigc__p_float,
40296 : _swigc__p_int,
40297 : _swigc__p_p_GIntBig,
40298 : _swigc__p_p_OGRGeometryTypeCounter,
40299 : _swigc__p_p_OGRSpatialReferenceH,
40300 : _swigc__p_p_char,
40301 : _swigc__p_p_double,
40302 : _swigc__p_p_int,
40303 : _swigc__p_size_t,
40304 : };
40305 :
40306 :
40307 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
40308 :
40309 : static swig_const_info swig_const_table[] = {
40310 : { SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
40311 : {0, 0, 0, 0.0, 0, 0}};
40312 :
40313 : #ifdef __cplusplus
40314 : }
40315 : #endif
40316 : /* -----------------------------------------------------------------------------
40317 : * Type initialization:
40318 : * This problem is tough by the requirement that no dynamic
40319 : * memory is used. Also, since swig_type_info structures store pointers to
40320 : * swig_cast_info structures and swig_cast_info structures store pointers back
40321 : * to swig_type_info structures, we need some lookup code at initialization.
40322 : * The idea is that swig generates all the structures that are needed.
40323 : * The runtime then collects these partially filled structures.
40324 : * The SWIG_InitializeModule function takes these initial arrays out of
40325 : * swig_module, and does all the lookup, filling in the swig_module.types
40326 : * array with the correct data and linking the correct swig_cast_info
40327 : * structures together.
40328 : *
40329 : * The generated swig_type_info structures are assigned statically to an initial
40330 : * array. We just loop through that array, and handle each type individually.
40331 : * First we lookup if this type has been already loaded, and if so, use the
40332 : * loaded structure instead of the generated one. Then we have to fill in the
40333 : * cast linked list. The cast data is initially stored in something like a
40334 : * two-dimensional array. Each row corresponds to a type (there are the same
40335 : * number of rows as there are in the swig_type_initial array). Each entry in
40336 : * a column is one of the swig_cast_info structures for that type.
40337 : * The cast_initial array is actually an array of arrays, because each row has
40338 : * a variable number of columns. So to actually build the cast linked list,
40339 : * we find the array of casts associated with the type, and loop through it
40340 : * adding the casts to the list. The one last trick we need to do is making
40341 : * sure the type pointer in the swig_cast_info struct is correct.
40342 : *
40343 : * First off, we lookup the cast->type name to see if it is already loaded.
40344 : * There are three cases to handle:
40345 : * 1) If the cast->type has already been loaded AND the type we are adding
40346 : * casting info to has not been loaded (it is in this module), THEN we
40347 : * replace the cast->type pointer with the type pointer that has already
40348 : * been loaded.
40349 : * 2) If BOTH types (the one we are adding casting info to, and the
40350 : * cast->type) are loaded, THEN the cast info has already been loaded by
40351 : * the previous module so we just ignore it.
40352 : * 3) Finally, if cast->type has not already been loaded, then we add that
40353 : * swig_cast_info to the linked list (because the cast->type) pointer will
40354 : * be correct.
40355 : * ----------------------------------------------------------------------------- */
40356 :
40357 : #ifdef __cplusplus
40358 : extern "C" {
40359 : #if 0
40360 : } /* c-mode */
40361 : #endif
40362 : #endif
40363 :
40364 : #if 0
40365 : #define SWIGRUNTIME_DEBUG
40366 : #endif
40367 :
40368 :
40369 : SWIGRUNTIME void
40370 : SWIG_InitializeModule(void *clientdata) {
40371 : size_t i;
40372 : swig_module_info *module_head, *iter;
40373 : int init;
40374 :
40375 : /* check to see if the circular list has been setup, if not, set it up */
40376 : if (swig_module.next==0) {
40377 : /* Initialize the swig_module */
40378 : swig_module.type_initial = swig_type_initial;
40379 : swig_module.cast_initial = swig_cast_initial;
40380 : swig_module.next = &swig_module;
40381 : init = 1;
40382 : } else {
40383 : init = 0;
40384 : }
40385 :
40386 : /* Try and load any already created modules */
40387 : module_head = SWIG_GetModule(clientdata);
40388 : if (!module_head) {
40389 : /* This is the first module loaded for this interpreter */
40390 : /* so set the swig module into the interpreter */
40391 : SWIG_SetModule(clientdata, &swig_module);
40392 : } else {
40393 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
40394 : iter=module_head;
40395 : do {
40396 : if (iter==&swig_module) {
40397 : /* Our module is already in the list, so there's nothing more to do. */
40398 : return;
40399 : }
40400 : iter=iter->next;
40401 : } while (iter!= module_head);
40402 :
40403 : /* otherwise we must add our module into the list */
40404 : swig_module.next = module_head->next;
40405 : module_head->next = &swig_module;
40406 : }
40407 :
40408 : /* When multiple interpreters are used, a module could have already been initialized in
40409 : a different interpreter, but not yet have a pointer in this interpreter.
40410 : In this case, we do not want to continue adding types... everything should be
40411 : set up already */
40412 : if (init == 0) return;
40413 :
40414 : /* Now work on filling in swig_module.types */
40415 : #ifdef SWIGRUNTIME_DEBUG
40416 : printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
40417 : #endif
40418 : for (i = 0; i < swig_module.size; ++i) {
40419 : swig_type_info *type = 0;
40420 : swig_type_info *ret;
40421 : swig_cast_info *cast;
40422 :
40423 : #ifdef SWIGRUNTIME_DEBUG
40424 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
40425 : #endif
40426 :
40427 : /* if there is another module already loaded */
40428 : if (swig_module.next != &swig_module) {
40429 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
40430 : }
40431 : if (type) {
40432 : /* Overwrite clientdata field */
40433 : #ifdef SWIGRUNTIME_DEBUG
40434 : printf("SWIG_InitializeModule: found type %s\n", type->name);
40435 : #endif
40436 : if (swig_module.type_initial[i]->clientdata) {
40437 : type->clientdata = swig_module.type_initial[i]->clientdata;
40438 : #ifdef SWIGRUNTIME_DEBUG
40439 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
40440 : #endif
40441 : }
40442 : } else {
40443 : type = swig_module.type_initial[i];
40444 : }
40445 :
40446 : /* Insert casting types */
40447 : cast = swig_module.cast_initial[i];
40448 : while (cast->type) {
40449 : /* Don't need to add information already in the list */
40450 : ret = 0;
40451 : #ifdef SWIGRUNTIME_DEBUG
40452 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
40453 : #endif
40454 : if (swig_module.next != &swig_module) {
40455 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
40456 : #ifdef SWIGRUNTIME_DEBUG
40457 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
40458 : #endif
40459 : }
40460 : if (ret) {
40461 : if (type == swig_module.type_initial[i]) {
40462 : #ifdef SWIGRUNTIME_DEBUG
40463 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
40464 : #endif
40465 : cast->type = ret;
40466 : ret = 0;
40467 : } else {
40468 : /* Check for casting already in the list */
40469 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
40470 : #ifdef SWIGRUNTIME_DEBUG
40471 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
40472 : #endif
40473 : if (!ocast) ret = 0;
40474 : }
40475 : }
40476 :
40477 : if (!ret) {
40478 : #ifdef SWIGRUNTIME_DEBUG
40479 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
40480 : #endif
40481 : if (type->cast) {
40482 : type->cast->prev = cast;
40483 : cast->next = type->cast;
40484 : }
40485 : type->cast = cast;
40486 : }
40487 : cast++;
40488 : }
40489 : /* Set entry in modules->types array equal to the type */
40490 : swig_module.types[i] = type;
40491 : }
40492 : swig_module.types[i] = 0;
40493 :
40494 : #ifdef SWIGRUNTIME_DEBUG
40495 : printf("**** SWIG_InitializeModule: Cast List ******\n");
40496 : for (i = 0; i < swig_module.size; ++i) {
40497 : int j = 0;
40498 : swig_cast_info *cast = swig_module.cast_initial[i];
40499 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
40500 : while (cast->type) {
40501 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
40502 : cast++;
40503 : ++j;
40504 : }
40505 : printf("---- Total casts: %d\n",j);
40506 : }
40507 : printf("**** SWIG_InitializeModule: Cast List ******\n");
40508 : #endif
40509 : }
40510 :
40511 : /* This function will propagate the clientdata field of type to
40512 : * any new swig_type_info structures that have been added into the list
40513 : * of equivalent types. It is like calling
40514 : * SWIG_TypeClientData(type, clientdata) a second time.
40515 : */
40516 : SWIGRUNTIME void
40517 : SWIG_PropagateClientData(void) {
40518 : size_t i;
40519 : swig_cast_info *equiv;
40520 : static int init_run = 0;
40521 :
40522 : if (init_run) return;
40523 : init_run = 1;
40524 :
40525 : for (i = 0; i < swig_module.size; i++) {
40526 : if (swig_module.types[i]->clientdata) {
40527 : equiv = swig_module.types[i]->cast;
40528 : while (equiv) {
40529 : if (!equiv->converter) {
40530 : if (equiv->type && !equiv->type->clientdata)
40531 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
40532 : }
40533 : equiv = equiv->next;
40534 : }
40535 : }
40536 : }
40537 : }
40538 :
40539 : #ifdef __cplusplus
40540 : #if 0
40541 : {
40542 : /* c-mode */
40543 : #endif
40544 : }
40545 : #endif
40546 :
40547 :
40548 :
40549 : #ifdef __cplusplus
40550 : extern "C" {
40551 : #endif
40552 :
40553 : /* Python-specific SWIG API */
40554 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
40555 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
40556 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
40557 :
40558 : /* -----------------------------------------------------------------------------
40559 : * global variable support code.
40560 : * ----------------------------------------------------------------------------- */
40561 :
40562 : typedef struct swig_globalvar {
40563 : char *name; /* Name of global variable */
40564 : PyObject *(*get_attr)(void); /* Return the current value */
40565 : int (*set_attr)(PyObject *); /* Set the value */
40566 : struct swig_globalvar *next;
40567 : } swig_globalvar;
40568 :
40569 : typedef struct swig_varlinkobject {
40570 : PyObject_HEAD
40571 : swig_globalvar *vars;
40572 : } swig_varlinkobject;
40573 :
40574 : SWIGINTERN PyObject *
40575 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
40576 : #if PY_VERSION_HEX >= 0x03000000
40577 : return PyUnicode_InternFromString("<Swig global variables>");
40578 : #else
40579 : return PyString_FromString("<Swig global variables>");
40580 : #endif
40581 : }
40582 :
40583 : SWIGINTERN PyObject *
40584 : swig_varlink_str(swig_varlinkobject *v) {
40585 : #if PY_VERSION_HEX >= 0x03000000
40586 : PyObject *str = PyUnicode_InternFromString("(");
40587 : PyObject *tail;
40588 : PyObject *joined;
40589 : swig_globalvar *var;
40590 : for (var = v->vars; var; var=var->next) {
40591 : tail = PyUnicode_FromString(var->name);
40592 : joined = PyUnicode_Concat(str, tail);
40593 : Py_DecRef(str);
40594 : Py_DecRef(tail);
40595 : str = joined;
40596 : if (var->next) {
40597 : tail = PyUnicode_InternFromString(", ");
40598 : joined = PyUnicode_Concat(str, tail);
40599 : Py_DecRef(str);
40600 : Py_DecRef(tail);
40601 : str = joined;
40602 : }
40603 : }
40604 : tail = PyUnicode_InternFromString(")");
40605 : joined = PyUnicode_Concat(str, tail);
40606 : Py_DecRef(str);
40607 : Py_DecRef(tail);
40608 : str = joined;
40609 : #else
40610 : PyObject *str = PyString_FromString("(");
40611 : swig_globalvar *var;
40612 : for (var = v->vars; var; var=var->next) {
40613 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
40614 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
40615 : }
40616 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
40617 : #endif
40618 : return str;
40619 : }
40620 :
40621 : SWIGINTERN void
40622 : swig_varlink_dealloc(swig_varlinkobject *v) {
40623 : swig_globalvar *var = v->vars;
40624 : while (var) {
40625 : swig_globalvar *n = var->next;
40626 : free(var->name);
40627 : free(var);
40628 : var = n;
40629 : }
40630 : }
40631 :
40632 : SWIGINTERN PyObject *
40633 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
40634 : PyObject *res = NULL;
40635 : swig_globalvar *var = v->vars;
40636 : while (var) {
40637 : if (strcmp(var->name,n) == 0) {
40638 : res = (*var->get_attr)();
40639 : break;
40640 : }
40641 : var = var->next;
40642 : }
40643 : if (res == NULL && !PyErr_Occurred()) {
40644 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
40645 : }
40646 : return res;
40647 : }
40648 :
40649 : SWIGINTERN int
40650 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
40651 : int res = 1;
40652 : swig_globalvar *var = v->vars;
40653 : while (var) {
40654 : if (strcmp(var->name,n) == 0) {
40655 : res = (*var->set_attr)(p);
40656 : break;
40657 : }
40658 : var = var->next;
40659 : }
40660 : if (res == 1 && !PyErr_Occurred()) {
40661 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
40662 : }
40663 : return res;
40664 : }
40665 :
40666 : SWIGINTERN PyTypeObject*
40667 : swig_varlink_type(void) {
40668 : static char varlink__doc__[] = "Swig var link object";
40669 : static PyTypeObject varlink_type;
40670 : static int type_init = 0;
40671 : if (!type_init) {
40672 : const PyTypeObject tmp = {
40673 : #if PY_VERSION_HEX >= 0x03000000
40674 : PyVarObject_HEAD_INIT(NULL, 0)
40675 : #else
40676 : PyObject_HEAD_INIT(NULL)
40677 : 0, /* ob_size */
40678 : #endif
40679 : "swigvarlink", /* tp_name */
40680 : sizeof(swig_varlinkobject), /* tp_basicsize */
40681 : 0, /* tp_itemsize */
40682 : (destructor) swig_varlink_dealloc, /* tp_dealloc */
40683 : 0, /* tp_print */
40684 : (getattrfunc) swig_varlink_getattr, /* tp_getattr */
40685 : (setattrfunc) swig_varlink_setattr, /* tp_setattr */
40686 : 0, /* tp_compare */
40687 : (reprfunc) swig_varlink_repr, /* tp_repr */
40688 : 0, /* tp_as_number */
40689 : 0, /* tp_as_sequence */
40690 : 0, /* tp_as_mapping */
40691 : 0, /* tp_hash */
40692 : 0, /* tp_call */
40693 : (reprfunc) swig_varlink_str, /* tp_str */
40694 : 0, /* tp_getattro */
40695 : 0, /* tp_setattro */
40696 : 0, /* tp_as_buffer */
40697 : 0, /* tp_flags */
40698 : varlink__doc__, /* tp_doc */
40699 : 0, /* tp_traverse */
40700 : 0, /* tp_clear */
40701 : 0, /* tp_richcompare */
40702 : 0, /* tp_weaklistoffset */
40703 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
40704 : 0, /* tp_del */
40705 : 0, /* tp_version_tag */
40706 : #if PY_VERSION_HEX >= 0x03040000
40707 : 0, /* tp_finalize */
40708 : #endif
40709 : #ifdef COUNT_ALLOCS
40710 : 0, /* tp_allocs */
40711 : 0, /* tp_frees */
40712 : 0, /* tp_maxalloc */
40713 : 0, /* tp_prev */
40714 : 0 /* tp_next */
40715 : #endif
40716 : };
40717 : varlink_type = tmp;
40718 : type_init = 1;
40719 : if (PyType_Ready(&varlink_type) < 0)
40720 : return NULL;
40721 : }
40722 : return &varlink_type;
40723 : }
40724 :
40725 : /* Create a variable linking object for use later */
40726 : SWIGINTERN PyObject *
40727 : SWIG_Python_newvarlink(void) {
40728 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
40729 : if (result) {
40730 : result->vars = 0;
40731 : }
40732 : return ((PyObject*) result);
40733 : }
40734 :
40735 : SWIGINTERN void
40736 : SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
40737 : swig_varlinkobject *v = (swig_varlinkobject *) p;
40738 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
40739 : if (gv) {
40740 : size_t size = strlen(name)+1;
40741 : gv->name = (char *)malloc(size);
40742 : if (gv->name) {
40743 : memcpy(gv->name, name, size);
40744 : gv->get_attr = get_attr;
40745 : gv->set_attr = set_attr;
40746 : gv->next = v->vars;
40747 : }
40748 : }
40749 : v->vars = gv;
40750 : }
40751 :
40752 : SWIGINTERN PyObject *
40753 : SWIG_globals(void) {
40754 : static PyObject *globals = 0;
40755 : if (!globals) {
40756 : globals = SWIG_newvarlink();
40757 : }
40758 : return globals;
40759 : }
40760 :
40761 : /* -----------------------------------------------------------------------------
40762 : * constants/methods manipulation
40763 : * ----------------------------------------------------------------------------- */
40764 :
40765 : /* Install Constants */
40766 : SWIGINTERN void
40767 277 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
40768 277 : PyObject *obj = 0;
40769 277 : size_t i;
40770 554 : for (i = 0; constants[i].type; ++i) {
40771 277 : switch(constants[i].type) {
40772 277 : case SWIG_PY_POINTER:
40773 277 : obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
40774 277 : break;
40775 0 : case SWIG_PY_BINARY:
40776 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
40777 : break;
40778 : default:
40779 : obj = 0;
40780 : break;
40781 : }
40782 277 : if (obj) {
40783 277 : PyDict_SetItemString(d, constants[i].name, obj);
40784 277 : Py_DECREF(obj);
40785 : }
40786 : }
40787 277 : }
40788 :
40789 : /* -----------------------------------------------------------------------------*/
40790 : /* Fix SwigMethods to carry the callback ptrs when needed */
40791 : /* -----------------------------------------------------------------------------*/
40792 :
40793 : SWIGINTERN void
40794 277 : SWIG_Python_FixMethods(PyMethodDef *methods,
40795 : swig_const_info *const_table,
40796 : swig_type_info **types,
40797 : swig_type_info **types_initial) {
40798 277 : size_t i;
40799 121880 : for (i = 0; methods[i].ml_name; ++i) {
40800 121603 : const char *c = methods[i].ml_doc;
40801 121603 : if (!c) continue;
40802 114678 : c = strstr(c, "swig_ptr: ");
40803 114678 : if (c) {
40804 0 : int j;
40805 0 : swig_const_info *ci = 0;
40806 0 : const char *name = c + 10;
40807 0 : for (j = 0; const_table[j].type; ++j) {
40808 0 : if (strncmp(const_table[j].name, name,
40809 : strlen(const_table[j].name)) == 0) {
40810 : ci = &(const_table[j]);
40811 : break;
40812 : }
40813 : }
40814 0 : if (ci) {
40815 121603 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
40816 0 : if (ptr) {
40817 0 : size_t shift = (ci->ptype) - types;
40818 0 : swig_type_info *ty = types_initial[shift];
40819 0 : size_t ldoc = (c - methods[i].ml_doc);
40820 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
40821 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
40822 0 : if (ndoc) {
40823 0 : char *buff = ndoc;
40824 0 : memcpy(buff, methods[i].ml_doc, ldoc);
40825 0 : buff += ldoc;
40826 0 : memcpy(buff, "swig_ptr: ", 10);
40827 0 : buff += 10;
40828 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
40829 0 : methods[i].ml_doc = ndoc;
40830 : }
40831 : }
40832 : }
40833 : }
40834 : }
40835 277 : }
40836 :
40837 : /* -----------------------------------------------------------------------------
40838 : * Method creation and docstring support functions
40839 : * ----------------------------------------------------------------------------- */
40840 :
40841 : /* -----------------------------------------------------------------------------
40842 : * Function to find the method definition with the correct docstring for the
40843 : * proxy module as opposed to the low-level API
40844 : * ----------------------------------------------------------------------------- */
40845 :
40846 0 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
40847 : /* Find the function in the modified method table */
40848 0 : size_t offset = 0;
40849 0 : int found = 0;
40850 0 : while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
40851 0 : if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
40852 : found = 1;
40853 : break;
40854 : }
40855 0 : offset++;
40856 : }
40857 : /* Use the copy with the modified docstring if available */
40858 0 : return found ? &SwigMethods_proxydocs[offset] : NULL;
40859 : }
40860 :
40861 : /* -----------------------------------------------------------------------------
40862 : * Wrapper of PyInstanceMethod_New() used in Python 3
40863 : * It is exported to the generated module, used for -fastproxy
40864 : * ----------------------------------------------------------------------------- */
40865 :
40866 0 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
40867 0 : if (PyCFunction_Check(func)) {
40868 0 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
40869 0 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
40870 0 : if (ml)
40871 0 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
40872 : }
40873 : #if PY_VERSION_HEX >= 0x03000000
40874 0 : return PyInstanceMethod_New(func);
40875 : #else
40876 : return PyMethod_New(func, NULL, NULL);
40877 : #endif
40878 : }
40879 :
40880 : /* -----------------------------------------------------------------------------
40881 : * Wrapper of PyStaticMethod_New()
40882 : * It is exported to the generated module, used for -fastproxy
40883 : * ----------------------------------------------------------------------------- */
40884 :
40885 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
40886 : if (PyCFunction_Check(func)) {
40887 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
40888 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
40889 : if (ml)
40890 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
40891 : }
40892 : return PyStaticMethod_New(func);
40893 : }
40894 :
40895 : #ifdef __cplusplus
40896 : }
40897 : #endif
40898 :
40899 : /* -----------------------------------------------------------------------------*
40900 : * Partial Init method
40901 : * -----------------------------------------------------------------------------*/
40902 :
40903 : #ifdef __cplusplus
40904 : extern "C"
40905 : #endif
40906 :
40907 : SWIGEXPORT
40908 : #if PY_VERSION_HEX >= 0x03000000
40909 : PyObject*
40910 : #else
40911 : void
40912 : #endif
40913 277 : SWIG_init(void) {
40914 277 : PyObject *m, *d, *md, *globals;
40915 :
40916 : #if PY_VERSION_HEX >= 0x03000000
40917 277 : static struct PyModuleDef SWIG_module = {
40918 : PyModuleDef_HEAD_INIT,
40919 : SWIG_name,
40920 : NULL,
40921 : -1,
40922 : SwigMethods,
40923 : NULL,
40924 : NULL,
40925 : NULL,
40926 : NULL
40927 : };
40928 : #endif
40929 :
40930 : #if defined(SWIGPYTHON_BUILTIN)
40931 : static SwigPyClientData SwigPyObject_clientdata = {
40932 : 0, 0, 0, 0, 0, 0, 0
40933 : };
40934 : static PyGetSetDef this_getset_def = {
40935 : (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
40936 : };
40937 : static SwigPyGetSet thisown_getset_closure = {
40938 : SwigPyObject_own,
40939 : SwigPyObject_own
40940 : };
40941 : static PyGetSetDef thisown_getset_def = {
40942 : (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
40943 : };
40944 : PyTypeObject *builtin_pytype;
40945 : int builtin_base_count;
40946 : swig_type_info *builtin_basetype;
40947 : PyObject *tuple;
40948 : PyGetSetDescrObject *static_getset;
40949 : PyTypeObject *metatype;
40950 : PyTypeObject *swigpyobject;
40951 : SwigPyClientData *cd;
40952 : PyObject *public_interface, *public_symbol;
40953 : PyObject *this_descr;
40954 : PyObject *thisown_descr;
40955 : PyObject *self = 0;
40956 : int i;
40957 :
40958 : (void)builtin_pytype;
40959 : (void)builtin_base_count;
40960 : (void)builtin_basetype;
40961 : (void)tuple;
40962 : (void)static_getset;
40963 : (void)self;
40964 :
40965 : /* Metaclass is used to implement static member variables */
40966 : metatype = SwigPyObjectType();
40967 : assert(metatype);
40968 : #endif
40969 :
40970 277 : (void)globals;
40971 :
40972 : /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
40973 277 : SWIG_This();
40974 277 : SWIG_Python_TypeCache();
40975 277 : SwigPyPacked_type();
40976 : #ifndef SWIGPYTHON_BUILTIN
40977 277 : SwigPyObject_type();
40978 : #endif
40979 :
40980 : /* Fix SwigMethods to carry the callback ptrs when needed */
40981 277 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
40982 :
40983 : #if PY_VERSION_HEX >= 0x03000000
40984 277 : m = PyModule_Create(&SWIG_module);
40985 : #else
40986 : m = Py_InitModule(SWIG_name, SwigMethods);
40987 : #endif
40988 :
40989 277 : md = d = PyModule_GetDict(m);
40990 277 : (void)md;
40991 :
40992 277 : SWIG_InitializeModule(0);
40993 :
40994 : #ifdef SWIGPYTHON_BUILTIN
40995 : swigpyobject = SwigPyObject_TypeOnce();
40996 :
40997 : SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
40998 : assert(SwigPyObject_stype);
40999 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
41000 : if (!cd) {
41001 : SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
41002 : SwigPyObject_clientdata.pytype = swigpyobject;
41003 : } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
41004 : PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
41005 : # if PY_VERSION_HEX >= 0x03000000
41006 : return NULL;
41007 : # else
41008 : return;
41009 : # endif
41010 : }
41011 :
41012 : /* All objects have a 'this' attribute */
41013 : this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
41014 : (void)this_descr;
41015 :
41016 : /* All objects have a 'thisown' attribute */
41017 : thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
41018 : (void)thisown_descr;
41019 :
41020 : public_interface = PyList_New(0);
41021 : public_symbol = 0;
41022 : (void)public_symbol;
41023 :
41024 : PyDict_SetItemString(md, "__all__", public_interface);
41025 : Py_DECREF(public_interface);
41026 : for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
41027 : SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
41028 : for (i = 0; swig_const_table[i].name != 0; ++i)
41029 : SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
41030 : #endif
41031 :
41032 277 : SWIG_InstallConstants(d,swig_const_table);
41033 :
41034 277 : SWIG_Python_SetConstant(d, "wkb25DBit",SWIG_From_int(static_cast< int >(0x80000000)));
41035 277 : SWIG_Python_SetConstant(d, "wkb25Bit",SWIG_From_int(static_cast< int >(0x80000000)));
41036 277 : SWIG_Python_SetConstant(d, "wkbUnknown",SWIG_From_int(static_cast< int >(0)));
41037 277 : SWIG_Python_SetConstant(d, "wkbPoint",SWIG_From_int(static_cast< int >(1)));
41038 277 : SWIG_Python_SetConstant(d, "wkbLineString",SWIG_From_int(static_cast< int >(2)));
41039 277 : SWIG_Python_SetConstant(d, "wkbPolygon",SWIG_From_int(static_cast< int >(3)));
41040 277 : SWIG_Python_SetConstant(d, "wkbMultiPoint",SWIG_From_int(static_cast< int >(4)));
41041 277 : SWIG_Python_SetConstant(d, "wkbMultiLineString",SWIG_From_int(static_cast< int >(5)));
41042 277 : SWIG_Python_SetConstant(d, "wkbMultiPolygon",SWIG_From_int(static_cast< int >(6)));
41043 277 : SWIG_Python_SetConstant(d, "wkbGeometryCollection",SWIG_From_int(static_cast< int >(7)));
41044 277 : SWIG_Python_SetConstant(d, "wkbCircularString",SWIG_From_int(static_cast< int >(8)));
41045 277 : SWIG_Python_SetConstant(d, "wkbCompoundCurve",SWIG_From_int(static_cast< int >(9)));
41046 277 : SWIG_Python_SetConstant(d, "wkbCurvePolygon",SWIG_From_int(static_cast< int >(10)));
41047 277 : SWIG_Python_SetConstant(d, "wkbMultiCurve",SWIG_From_int(static_cast< int >(11)));
41048 277 : SWIG_Python_SetConstant(d, "wkbMultiSurface",SWIG_From_int(static_cast< int >(12)));
41049 277 : SWIG_Python_SetConstant(d, "wkbCurve",SWIG_From_int(static_cast< int >(13)));
41050 277 : SWIG_Python_SetConstant(d, "wkbSurface",SWIG_From_int(static_cast< int >(14)));
41051 277 : SWIG_Python_SetConstant(d, "wkbPolyhedralSurface",SWIG_From_int(static_cast< int >(15)));
41052 277 : SWIG_Python_SetConstant(d, "wkbTIN",SWIG_From_int(static_cast< int >(16)));
41053 277 : SWIG_Python_SetConstant(d, "wkbTriangle",SWIG_From_int(static_cast< int >(17)));
41054 277 : SWIG_Python_SetConstant(d, "wkbNone",SWIG_From_int(static_cast< int >(100)));
41055 277 : SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
41056 277 : SWIG_Python_SetConstant(d, "wkbCircularStringZ",SWIG_From_int(static_cast< int >(1008)));
41057 277 : SWIG_Python_SetConstant(d, "wkbCompoundCurveZ",SWIG_From_int(static_cast< int >(1009)));
41058 277 : SWIG_Python_SetConstant(d, "wkbCurvePolygonZ",SWIG_From_int(static_cast< int >(1010)));
41059 277 : SWIG_Python_SetConstant(d, "wkbMultiCurveZ",SWIG_From_int(static_cast< int >(1011)));
41060 277 : SWIG_Python_SetConstant(d, "wkbMultiSurfaceZ",SWIG_From_int(static_cast< int >(1012)));
41061 277 : SWIG_Python_SetConstant(d, "wkbCurveZ",SWIG_From_int(static_cast< int >(1013)));
41062 277 : SWIG_Python_SetConstant(d, "wkbSurfaceZ",SWIG_From_int(static_cast< int >(1014)));
41063 277 : SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZ",SWIG_From_int(static_cast< int >(1015)));
41064 277 : SWIG_Python_SetConstant(d, "wkbTINZ",SWIG_From_int(static_cast< int >(1016)));
41065 277 : SWIG_Python_SetConstant(d, "wkbTriangleZ",SWIG_From_int(static_cast< int >(1017)));
41066 277 : SWIG_Python_SetConstant(d, "wkbPointM",SWIG_From_int(static_cast< int >(2001)));
41067 277 : SWIG_Python_SetConstant(d, "wkbLineStringM",SWIG_From_int(static_cast< int >(2002)));
41068 277 : SWIG_Python_SetConstant(d, "wkbPolygonM",SWIG_From_int(static_cast< int >(2003)));
41069 277 : SWIG_Python_SetConstant(d, "wkbMultiPointM",SWIG_From_int(static_cast< int >(2004)));
41070 277 : SWIG_Python_SetConstant(d, "wkbMultiLineStringM",SWIG_From_int(static_cast< int >(2005)));
41071 277 : SWIG_Python_SetConstant(d, "wkbMultiPolygonM",SWIG_From_int(static_cast< int >(2006)));
41072 277 : SWIG_Python_SetConstant(d, "wkbGeometryCollectionM",SWIG_From_int(static_cast< int >(2007)));
41073 277 : SWIG_Python_SetConstant(d, "wkbCircularStringM",SWIG_From_int(static_cast< int >(2008)));
41074 277 : SWIG_Python_SetConstant(d, "wkbCompoundCurveM",SWIG_From_int(static_cast< int >(2009)));
41075 277 : SWIG_Python_SetConstant(d, "wkbCurvePolygonM",SWIG_From_int(static_cast< int >(2010)));
41076 277 : SWIG_Python_SetConstant(d, "wkbMultiCurveM",SWIG_From_int(static_cast< int >(2011)));
41077 277 : SWIG_Python_SetConstant(d, "wkbMultiSurfaceM",SWIG_From_int(static_cast< int >(2012)));
41078 277 : SWIG_Python_SetConstant(d, "wkbCurveM",SWIG_From_int(static_cast< int >(2013)));
41079 277 : SWIG_Python_SetConstant(d, "wkbSurfaceM",SWIG_From_int(static_cast< int >(2014)));
41080 277 : SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceM",SWIG_From_int(static_cast< int >(2015)));
41081 277 : SWIG_Python_SetConstant(d, "wkbTINM",SWIG_From_int(static_cast< int >(2016)));
41082 277 : SWIG_Python_SetConstant(d, "wkbTriangleM",SWIG_From_int(static_cast< int >(2017)));
41083 277 : SWIG_Python_SetConstant(d, "wkbPointZM",SWIG_From_int(static_cast< int >(3001)));
41084 277 : SWIG_Python_SetConstant(d, "wkbLineStringZM",SWIG_From_int(static_cast< int >(3002)));
41085 277 : SWIG_Python_SetConstant(d, "wkbPolygonZM",SWIG_From_int(static_cast< int >(3003)));
41086 277 : SWIG_Python_SetConstant(d, "wkbMultiPointZM",SWIG_From_int(static_cast< int >(3004)));
41087 277 : SWIG_Python_SetConstant(d, "wkbMultiLineStringZM",SWIG_From_int(static_cast< int >(3005)));
41088 277 : SWIG_Python_SetConstant(d, "wkbMultiPolygonZM",SWIG_From_int(static_cast< int >(3006)));
41089 277 : SWIG_Python_SetConstant(d, "wkbGeometryCollectionZM",SWIG_From_int(static_cast< int >(3007)));
41090 277 : SWIG_Python_SetConstant(d, "wkbCircularStringZM",SWIG_From_int(static_cast< int >(3008)));
41091 277 : SWIG_Python_SetConstant(d, "wkbCompoundCurveZM",SWIG_From_int(static_cast< int >(3009)));
41092 277 : SWIG_Python_SetConstant(d, "wkbCurvePolygonZM",SWIG_From_int(static_cast< int >(3010)));
41093 277 : SWIG_Python_SetConstant(d, "wkbMultiCurveZM",SWIG_From_int(static_cast< int >(3011)));
41094 277 : SWIG_Python_SetConstant(d, "wkbMultiSurfaceZM",SWIG_From_int(static_cast< int >(3012)));
41095 277 : SWIG_Python_SetConstant(d, "wkbCurveZM",SWIG_From_int(static_cast< int >(3013)));
41096 277 : SWIG_Python_SetConstant(d, "wkbSurfaceZM",SWIG_From_int(static_cast< int >(3014)));
41097 277 : SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZM",SWIG_From_int(static_cast< int >(3015)));
41098 277 : SWIG_Python_SetConstant(d, "wkbTINZM",SWIG_From_int(static_cast< int >(3016)));
41099 277 : SWIG_Python_SetConstant(d, "wkbTriangleZM",SWIG_From_int(static_cast< int >(3017)));
41100 277 : SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(0x80000001)));
41101 277 : SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(0x80000002)));
41102 277 : SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(0x80000003)));
41103 277 : SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(0x80000004)));
41104 277 : SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(0x80000005)));
41105 277 : SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(0x80000006)));
41106 277 : SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(0x80000007)));
41107 277 : SWIG_Python_SetConstant(d, "OFTInteger",SWIG_From_int(static_cast< int >(0)));
41108 277 : SWIG_Python_SetConstant(d, "OFTIntegerList",SWIG_From_int(static_cast< int >(1)));
41109 277 : SWIG_Python_SetConstant(d, "OFTReal",SWIG_From_int(static_cast< int >(2)));
41110 277 : SWIG_Python_SetConstant(d, "OFTRealList",SWIG_From_int(static_cast< int >(3)));
41111 277 : SWIG_Python_SetConstant(d, "OFTString",SWIG_From_int(static_cast< int >(4)));
41112 277 : SWIG_Python_SetConstant(d, "OFTStringList",SWIG_From_int(static_cast< int >(5)));
41113 277 : SWIG_Python_SetConstant(d, "OFTWideString",SWIG_From_int(static_cast< int >(6)));
41114 277 : SWIG_Python_SetConstant(d, "OFTWideStringList",SWIG_From_int(static_cast< int >(7)));
41115 277 : SWIG_Python_SetConstant(d, "OFTBinary",SWIG_From_int(static_cast< int >(8)));
41116 277 : SWIG_Python_SetConstant(d, "OFTDate",SWIG_From_int(static_cast< int >(9)));
41117 277 : SWIG_Python_SetConstant(d, "OFTTime",SWIG_From_int(static_cast< int >(10)));
41118 277 : SWIG_Python_SetConstant(d, "OFTDateTime",SWIG_From_int(static_cast< int >(11)));
41119 277 : SWIG_Python_SetConstant(d, "OFTInteger64",SWIG_From_int(static_cast< int >(12)));
41120 277 : SWIG_Python_SetConstant(d, "OFTInteger64List",SWIG_From_int(static_cast< int >(13)));
41121 277 : SWIG_Python_SetConstant(d, "OFSTNone",SWIG_From_int(static_cast< int >(0)));
41122 277 : SWIG_Python_SetConstant(d, "OFSTBoolean",SWIG_From_int(static_cast< int >(1)));
41123 277 : SWIG_Python_SetConstant(d, "OFSTInt16",SWIG_From_int(static_cast< int >(2)));
41124 277 : SWIG_Python_SetConstant(d, "OFSTFloat32",SWIG_From_int(static_cast< int >(3)));
41125 277 : SWIG_Python_SetConstant(d, "OFSTJSON",SWIG_From_int(static_cast< int >(4)));
41126 277 : SWIG_Python_SetConstant(d, "OFSTUUID",SWIG_From_int(static_cast< int >(5)));
41127 277 : SWIG_Python_SetConstant(d, "OJUndefined",SWIG_From_int(static_cast< int >(0)));
41128 277 : SWIG_Python_SetConstant(d, "OJLeft",SWIG_From_int(static_cast< int >(1)));
41129 277 : SWIG_Python_SetConstant(d, "OJRight",SWIG_From_int(static_cast< int >(2)));
41130 277 : SWIG_Python_SetConstant(d, "OFDT_CODED",SWIG_From_int(static_cast< int >(0)));
41131 277 : SWIG_Python_SetConstant(d, "OFDT_RANGE",SWIG_From_int(static_cast< int >(1)));
41132 277 : SWIG_Python_SetConstant(d, "OFDT_GLOB",SWIG_From_int(static_cast< int >(2)));
41133 277 : SWIG_Python_SetConstant(d, "OFDSP_DEFAULT_VALUE",SWIG_From_int(static_cast< int >(0)));
41134 277 : SWIG_Python_SetConstant(d, "OFDSP_DUPLICATE",SWIG_From_int(static_cast< int >(1)));
41135 277 : SWIG_Python_SetConstant(d, "OFDSP_GEOMETRY_RATIO",SWIG_From_int(static_cast< int >(2)));
41136 277 : SWIG_Python_SetConstant(d, "OFDMP_DEFAULT_VALUE",SWIG_From_int(static_cast< int >(0)));
41137 277 : SWIG_Python_SetConstant(d, "OFDMP_SUM",SWIG_From_int(static_cast< int >(1)));
41138 277 : SWIG_Python_SetConstant(d, "OFDMP_GEOMETRY_WEIGHTED",SWIG_From_int(static_cast< int >(2)));
41139 277 : SWIG_Python_SetConstant(d, "wkbXDR",SWIG_From_int(static_cast< int >(0)));
41140 277 : SWIG_Python_SetConstant(d, "wkbNDR",SWIG_From_int(static_cast< int >(1)));
41141 277 : SWIG_Python_SetConstant(d, "NullFID",SWIG_From_int(static_cast< int >(-1)));
41142 277 : SWIG_Python_SetConstant(d, "ALTER_NAME_FLAG",SWIG_From_int(static_cast< int >(1)));
41143 277 : SWIG_Python_SetConstant(d, "ALTER_TYPE_FLAG",SWIG_From_int(static_cast< int >(2)));
41144 277 : SWIG_Python_SetConstant(d, "ALTER_WIDTH_PRECISION_FLAG",SWIG_From_int(static_cast< int >(4)));
41145 277 : SWIG_Python_SetConstant(d, "ALTER_NULLABLE_FLAG",SWIG_From_int(static_cast< int >(8)));
41146 277 : SWIG_Python_SetConstant(d, "ALTER__FLAG",SWIG_From_int(static_cast< int >(8)));
41147 277 : SWIG_Python_SetConstant(d, "ALTER_DEFAULT_FLAG",SWIG_From_int(static_cast< int >(16)));
41148 277 : SWIG_Python_SetConstant(d, "ALTER_UNIQUE_FLAG",SWIG_From_int(static_cast< int >(32)));
41149 277 : SWIG_Python_SetConstant(d, "ALTER_DOMAIN_FLAG",SWIG_From_int(static_cast< int >(64)));
41150 277 : SWIG_Python_SetConstant(d, "ALTER_ALTERNATIVE_NAME_FLAG",SWIG_From_int(static_cast< int >(128)));
41151 277 : SWIG_Python_SetConstant(d, "ALTER_COMMENT_FLAG",SWIG_From_int(static_cast< int >(256)));
41152 277 : SWIG_Python_SetConstant(d, "ALTER_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4+8+16+32+64+128+256)));
41153 277 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_NAME_FLAG",SWIG_From_int(static_cast< int >(4096)));
41154 277 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_TYPE_FLAG",SWIG_From_int(static_cast< int >(8192)));
41155 277 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG",SWIG_From_int(static_cast< int >(16384)));
41156 277 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_SRS_FLAG",SWIG_From_int(static_cast< int >(32768)));
41157 277 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG",SWIG_From_int(static_cast< int >(65536)));
41158 277 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_ALL_FLAG",SWIG_From_int(static_cast< int >(4096+8192+16384+32768+65536)));
41159 277 : SWIG_Python_SetConstant(d, "F_VAL_NULL",SWIG_From_int(static_cast< int >(0x00000001)));
41160 277 : SWIG_Python_SetConstant(d, "F_VAL_GEOM_TYPE",SWIG_From_int(static_cast< int >(0x00000002)));
41161 277 : SWIG_Python_SetConstant(d, "F_VAL_WIDTH",SWIG_From_int(static_cast< int >(0x00000004)));
41162 277 : SWIG_Python_SetConstant(d, "F_VAL_ALLOW_NULL_WHEN_DEFAULT",SWIG_From_int(static_cast< int >(0x00000008)));
41163 277 : SWIG_Python_SetConstant(d, "F_VAL_ALL",SWIG_From_int(static_cast< int >(0xFFFFFFFF)));
41164 277 : SWIG_Python_SetConstant(d, "TZFLAG_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
41165 277 : SWIG_Python_SetConstant(d, "TZFLAG_LOCALTIME",SWIG_From_int(static_cast< int >(1)));
41166 277 : SWIG_Python_SetConstant(d, "TZFLAG_MIXED_TZ",SWIG_From_int(static_cast< int >(2)));
41167 277 : SWIG_Python_SetConstant(d, "TZFLAG_UTC",SWIG_From_int(static_cast< int >(100)));
41168 277 : SWIG_Python_SetConstant(d, "GGT_COUNT_NOT_NEEDED",SWIG_From_int(static_cast< int >(0x1)));
41169 277 : SWIG_Python_SetConstant(d, "GGT_STOP_IF_MIXED",SWIG_From_int(static_cast< int >(0x2)));
41170 277 : SWIG_Python_SetConstant(d, "GGT_GEOMCOLLECTIONZ_TINZ",SWIG_From_int(static_cast< int >(0x4)));
41171 277 : SWIG_Python_SetConstant(d, "OLCRandomRead",SWIG_FromCharPtr("RandomRead"));
41172 277 : SWIG_Python_SetConstant(d, "OLCSequentialWrite",SWIG_FromCharPtr("SequentialWrite"));
41173 277 : SWIG_Python_SetConstant(d, "OLCRandomWrite",SWIG_FromCharPtr("RandomWrite"));
41174 277 : SWIG_Python_SetConstant(d, "OLCFastSpatialFilter",SWIG_FromCharPtr("FastSpatialFilter"));
41175 277 : SWIG_Python_SetConstant(d, "OLCFastFeatureCount",SWIG_FromCharPtr("FastFeatureCount"));
41176 277 : SWIG_Python_SetConstant(d, "OLCFastGetExtent",SWIG_FromCharPtr("FastGetExtent"));
41177 277 : SWIG_Python_SetConstant(d, "OLCFastGetExtent3D",SWIG_FromCharPtr("FastGetExtent3D"));
41178 277 : SWIG_Python_SetConstant(d, "OLCCreateField",SWIG_FromCharPtr("CreateField"));
41179 277 : SWIG_Python_SetConstant(d, "OLCDeleteField",SWIG_FromCharPtr("DeleteField"));
41180 277 : SWIG_Python_SetConstant(d, "OLCReorderFields",SWIG_FromCharPtr("ReorderFields"));
41181 277 : SWIG_Python_SetConstant(d, "OLCAlterFieldDefn",SWIG_FromCharPtr("AlterFieldDefn"));
41182 277 : SWIG_Python_SetConstant(d, "OLCAlterGeomFieldDefn",SWIG_FromCharPtr("AlterGeomFieldDefn"));
41183 277 : SWIG_Python_SetConstant(d, "OLCTransactions",SWIG_FromCharPtr("Transactions"));
41184 277 : SWIG_Python_SetConstant(d, "OLCDeleteFeature",SWIG_FromCharPtr("DeleteFeature"));
41185 277 : SWIG_Python_SetConstant(d, "OLCUpsertFeature",SWIG_FromCharPtr("UpsertFeature"));
41186 277 : SWIG_Python_SetConstant(d, "OLCUpdateFeature",SWIG_FromCharPtr("UpdateFeature"));
41187 277 : SWIG_Python_SetConstant(d, "OLCFastSetNextByIndex",SWIG_FromCharPtr("FastSetNextByIndex"));
41188 277 : SWIG_Python_SetConstant(d, "OLCStringsAsUTF8",SWIG_FromCharPtr("StringsAsUTF8"));
41189 277 : SWIG_Python_SetConstant(d, "OLCIgnoreFields",SWIG_FromCharPtr("IgnoreFields"));
41190 277 : SWIG_Python_SetConstant(d, "OLCCreateGeomField",SWIG_FromCharPtr("CreateGeomField"));
41191 277 : SWIG_Python_SetConstant(d, "OLCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
41192 277 : SWIG_Python_SetConstant(d, "OLCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
41193 277 : SWIG_Python_SetConstant(d, "OLCZGeometries",SWIG_FromCharPtr("ZGeometries"));
41194 277 : SWIG_Python_SetConstant(d, "OLCRename",SWIG_FromCharPtr("Rename"));
41195 277 : SWIG_Python_SetConstant(d, "OLCFastGetArrowStream",SWIG_FromCharPtr("FastGetArrowStream"));
41196 277 : SWIG_Python_SetConstant(d, "OLCFastWriteArrowBatch",SWIG_FromCharPtr("FastWriteArrowBatch"));
41197 277 : SWIG_Python_SetConstant(d, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
41198 277 : SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
41199 277 : SWIG_Python_SetConstant(d, "ODsCCreateGeomFieldAfterCreateLayer",SWIG_FromCharPtr("CreateGeomFieldAfterCreateLayer"));
41200 277 : SWIG_Python_SetConstant(d, "ODsCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
41201 277 : SWIG_Python_SetConstant(d, "ODsCTransactions",SWIG_FromCharPtr("Transactions"));
41202 277 : SWIG_Python_SetConstant(d, "ODsCEmulatedTransactions",SWIG_FromCharPtr("EmulatedTransactions"));
41203 277 : SWIG_Python_SetConstant(d, "ODsCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
41204 277 : SWIG_Python_SetConstant(d, "ODsCZGeometries",SWIG_FromCharPtr("ZGeometries"));
41205 277 : SWIG_Python_SetConstant(d, "ODsCRandomLayerRead",SWIG_FromCharPtr("RandomLayerRead"));
41206 277 : SWIG_Python_SetConstant(d, "ODsCRandomLayerWrite",SWIG_FromCharPtr("RandomLayerWrite "));
41207 277 : SWIG_Python_SetConstant(d, "ODsCAddFieldDomain",SWIG_FromCharPtr("AddFieldDomain"));
41208 277 : SWIG_Python_SetConstant(d, "ODsCDeleteFieldDomain",SWIG_FromCharPtr("DeleteFieldDomain"));
41209 277 : SWIG_Python_SetConstant(d, "ODsCUpdateFieldDomain",SWIG_FromCharPtr("UpdateFieldDomain"));
41210 277 : SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
41211 277 : SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
41212 277 : SWIG_Python_SetConstant(d, "OLMD_FID64",SWIG_FromCharPtr("OLMD_FID64"));
41213 277 : SWIG_Python_SetConstant(d, "GEOS_PREC_NO_TOPO",SWIG_From_int(static_cast< int >(1)));
41214 277 : SWIG_Python_SetConstant(d, "GEOS_PREC_KEEP_COLLAPSED",SWIG_From_int(static_cast< int >(2)));
41215 277 : SWIG_Python_SetConstant(d, "OGRERR_NONE",SWIG_From_int(static_cast< int >(0)));
41216 277 : SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_DATA",SWIG_From_int(static_cast< int >(1)));
41217 277 : SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_MEMORY",SWIG_From_int(static_cast< int >(2)));
41218 277 : SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_GEOMETRY_TYPE",SWIG_From_int(static_cast< int >(3)));
41219 277 : SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_OPERATION",SWIG_From_int(static_cast< int >(4)));
41220 277 : SWIG_Python_SetConstant(d, "OGRERR_CORRUPT_DATA",SWIG_From_int(static_cast< int >(5)));
41221 277 : SWIG_Python_SetConstant(d, "OGRERR_FAILURE",SWIG_From_int(static_cast< int >(6)));
41222 277 : SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_SRS",SWIG_From_int(static_cast< int >(7)));
41223 277 : SWIG_Python_SetConstant(d, "OGRERR_INVALID_HANDLE",SWIG_From_int(static_cast< int >(8)));
41224 277 : SWIG_Python_SetConstant(d, "OGRERR_NON_EXISTING_FEATURE",SWIG_From_int(static_cast< int >(9)));
41225 :
41226 :
41227 277 : if ( OGRGetDriverCount() == 0 ) {
41228 0 : OGRRegisterAll();
41229 : }
41230 : // Will be turned on for GDAL 4.0
41231 : // UseExceptions();
41232 :
41233 :
41234 :
41235 :
41236 : /* Initialize threading */
41237 277 : SWIG_PYTHON_INITIALIZE_THREADS;
41238 : #if PY_VERSION_HEX >= 0x03000000
41239 277 : return m;
41240 : #else
41241 : return;
41242 : #endif
41243 : }
41244 :
|