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 6845 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
449 6845 : if (ty) {
450 6845 : swig_cast_info *iter = ty->cast;
451 9004 : while (iter) {
452 9000 : if (strcmp(iter->type->name, c) == 0) {
453 6841 : if (iter == ty->cast)
454 : return iter;
455 : /* Move iter to the top of the linked list */
456 735 : iter->prev->next = iter->next;
457 735 : if (iter->next)
458 464 : iter->next->prev = iter->prev;
459 735 : iter->next = ty->cast;
460 735 : iter->prev = 0;
461 735 : if (ty->cast) ty->cast->prev = iter;
462 735 : ty->cast = iter;
463 735 : return iter;
464 : }
465 2159 : 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 878 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
503 878 : 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 53 : 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 53 : if (!type) return NULL;
539 53 : if (type->str != NULL) {
540 : const char *last_name = type->str;
541 : const char *s;
542 1060 : for (s = type->str; *s; s++)
543 1007 : 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 4065 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
571 4065 : SWIG_TypeClientData(ti, clientdata);
572 4065 : 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 19263 : SWIG_MangledTypeQueryModule(swig_module_info *start,
585 : swig_module_info *end,
586 : const char *name) {
587 19263 : swig_module_info *iter = start;
588 37948 : do {
589 37948 : if (iter->size) {
590 37948 : size_t l = 0;
591 37948 : size_t r = iter->size - 1;
592 131660 : do {
593 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
594 131660 : size_t i = (l + r) >> 1;
595 131660 : const char *iname = iter->types[i]->name;
596 131660 : if (iname) {
597 131660 : int compare = strcmp(name, iname);
598 131660 : if (compare == 0) {
599 11677 : return iter->types[i];
600 119983 : } else if (compare < 0) {
601 58933 : if (i) {
602 44599 : r = i - 1;
603 : } else {
604 : break;
605 : }
606 61050 : } else if (compare > 0) {
607 61050 : l = i + 1;
608 : }
609 : } else {
610 : break; /* should never happen */
611 : }
612 105649 : } while (l <= r);
613 : }
614 26271 : iter = iter->next;
615 26271 : } 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 22 : 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 22 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
634 22 : 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 293 : SWIG_Python_str_FromChar(const char *c)
839 : {
840 : #if PY_VERSION_HEX >= 0x03000000
841 293 : 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 205 : SWIG_Python_ErrorType(int code) {
868 205 : 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 177 : case SWIG_RuntimeError:
877 177 : 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 205 : 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 500 : void end() { if (status) { PyGILState_Release(state); status = false;} }
986 476 : 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 7123270 : void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
994 7123270 : 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 206 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1143 206 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1144 206 : PyErr_SetString(errtype, msg);
1145 206 : SWIG_PYTHON_THREAD_END_BLOCK;
1146 206 : }
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 51761 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1173 51761 : PyDict_SetItemString(d, name, obj);
1174 51761 : Py_DECREF(obj);
1175 51761 : }
1176 :
1177 : #endif
1178 :
1179 : /* Append a value to the result obj */
1180 :
1181 : SWIGINTERN PyObject*
1182 21918 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1183 21918 : if (!result) {
1184 : result = obj;
1185 14315 : } else if (result == Py_None) {
1186 13799 : Py_DECREF(result);
1187 : result = obj;
1188 : } else {
1189 516 : if (!PyList_Check(result)) {
1190 86 : PyObject *o2 = result;
1191 86 : result = PyList_New(1);
1192 86 : PyList_SetItem(result, 0, o2);
1193 : }
1194 516 : PyList_Append(result,obj);
1195 516 : Py_DECREF(obj);
1196 : }
1197 21918 : return result;
1198 : }
1199 :
1200 : /* Unpack the argument tuple */
1201 :
1202 : SWIGINTERN Py_ssize_t
1203 2017720 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1204 : {
1205 2017720 : if (!args) {
1206 30081 : 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 1987640 : if (!PyTuple_Check(args)) {
1215 4065 : if (min <= 1 && max >= 1) {
1216 4065 : Py_ssize_t i;
1217 4065 : objs[0] = args;
1218 4065 : 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 1983570 : Py_ssize_t l = PyTuple_GET_SIZE(args);
1227 1983570 : 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 1983570 : } 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 6198640 : for (i = 0; i < l; ++i) {
1238 4215070 : objs[i] = PyTuple_GET_ITEM(args, i);
1239 : }
1240 2049520 : for (; l < max; ++l) {
1241 65952 : objs[l] = 0;
1242 : }
1243 1983570 : 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 1377310 : SWIG_Py_Void(void)
1282 : {
1283 1377310 : PyObject *none = Py_None;
1284 0 : Py_INCREF(none);
1285 373918 : 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 4065 : SwigPyClientData_New(PyObject* obj)
1320 : {
1321 4065 : if (!obj) {
1322 : return 0;
1323 : } else {
1324 4065 : SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1325 : /* the klass element */
1326 4065 : data->klass = obj;
1327 4065 : Py_INCREF(data->klass);
1328 : /* the newraw method and newargs arguments used to create a new raw instance */
1329 4065 : if (PyClass_Check(obj)) {
1330 4065 : data->newraw = 0;
1331 4065 : data->newargs = obj;
1332 4065 : 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 4065 : data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1346 4065 : if (PyErr_Occurred()) {
1347 542 : PyErr_Clear();
1348 542 : data->destroy = 0;
1349 : }
1350 4065 : if (data->destroy) {
1351 3523 : int flags;
1352 3523 : Py_INCREF(data->destroy);
1353 3523 : flags = PyCFunction_GET_FLAGS(data->destroy);
1354 3523 : data->delargs = !(flags & (METH_O));
1355 : } else {
1356 542 : data->delargs = 0;
1357 : }
1358 4065 : data->implicitconv = 0;
1359 4065 : data->pytype = 0;
1360 4065 : 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 53 : SwigPyObject_repr(SwigPyObject *v)
1443 : {
1444 53 : const char *name = SWIG_TypePrettyName(v->ty);
1445 53 : PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1446 53 : 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 53 : 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 11773000 : SwigPyObject_type(void) {
1506 11773000 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1507 11773000 : 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 1115170 : SwigPyObject_dealloc(PyObject *v)
1529 : {
1530 1115170 : SwigPyObject *sobj = (SwigPyObject *) v;
1531 1115170 : PyObject *next = sobj->next;
1532 1115170 : if (sobj->own == SWIG_POINTER_OWN) {
1533 694909 : swig_type_info *ty = sobj->ty;
1534 694909 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1535 694909 : PyObject *destroy = data ? data->destroy : 0;
1536 694909 : if (destroy) {
1537 : /* destroy is always a VARARGS method */
1538 694909 : 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 694909 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
1548 694909 : PyErr_Fetch(&type, &value, &traceback);
1549 :
1550 694909 : 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 694909 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1557 694909 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1558 694909 : res = ((*meth)(mself, v));
1559 : }
1560 694909 : if (!res)
1561 0 : PyErr_WriteUnraisable(destroy);
1562 :
1563 694909 : PyErr_Restore(type, value, traceback);
1564 :
1565 1389820 : Py_XDECREF(res);
1566 : }
1567 : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1568 : else {
1569 0 : const char *name = SWIG_TypePrettyName(ty);
1570 0 : printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1571 : }
1572 : #endif
1573 : }
1574 1115170 : Py_XDECREF(next);
1575 1115170 : PyObject_DEL(v);
1576 1115170 : }
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 482 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1605 : {
1606 482 : SwigPyObject *sobj = (SwigPyObject *)v;
1607 482 : sobj->own = 0;
1608 482 : 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 482 : SwigPyObject_own(PyObject *v, PyObject *args)
1621 : {
1622 482 : PyObject *val = 0;
1623 482 : if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1624 : return NULL;
1625 : } else {
1626 482 : SwigPyObject *sobj = (SwigPyObject *)v;
1627 482 : PyObject *obj = PyBool_FromLong(sobj->own);
1628 482 : if (val) {
1629 482 : if (PyObject_IsTrue(val)) {
1630 0 : SwigPyObject_acquire(v,args);
1631 : } else {
1632 482 : SwigPyObject_disown(v,args);
1633 : }
1634 : }
1635 482 : return obj;
1636 : }
1637 : }
1638 :
1639 : static PyMethodDef
1640 : swigobject_methods[] = {
1641 : {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1642 : {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1643 : {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1644 : {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1645 : {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1646 : {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1647 : {0, 0, 0, 0}
1648 : };
1649 :
1650 : SWIGRUNTIME PyTypeObject*
1651 271 : SwigPyObject_TypeOnce(void) {
1652 271 : static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1653 :
1654 271 : static PyNumberMethods SwigPyObject_as_number = {
1655 : (binaryfunc)0, /*nb_add*/
1656 : (binaryfunc)0, /*nb_subtract*/
1657 : (binaryfunc)0, /*nb_multiply*/
1658 : /* nb_divide removed in Python 3 */
1659 : #if PY_VERSION_HEX < 0x03000000
1660 : (binaryfunc)0, /*nb_divide*/
1661 : #endif
1662 : (binaryfunc)0, /*nb_remainder*/
1663 : (binaryfunc)0, /*nb_divmod*/
1664 : (ternaryfunc)0,/*nb_power*/
1665 : (unaryfunc)0, /*nb_negative*/
1666 : (unaryfunc)0, /*nb_positive*/
1667 : (unaryfunc)0, /*nb_absolute*/
1668 : (inquiry)0, /*nb_nonzero*/
1669 : 0, /*nb_invert*/
1670 : 0, /*nb_lshift*/
1671 : 0, /*nb_rshift*/
1672 : 0, /*nb_and*/
1673 : 0, /*nb_xor*/
1674 : 0, /*nb_or*/
1675 : #if PY_VERSION_HEX < 0x03000000
1676 : 0, /*nb_coerce*/
1677 : #endif
1678 : (unaryfunc)SwigPyObject_long, /*nb_int*/
1679 : #if PY_VERSION_HEX < 0x03000000
1680 : (unaryfunc)SwigPyObject_long, /*nb_long*/
1681 : #else
1682 : 0, /*nb_reserved*/
1683 : #endif
1684 : (unaryfunc)0, /*nb_float*/
1685 : #if PY_VERSION_HEX < 0x03000000
1686 : (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1687 : (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1688 : #endif
1689 : #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1690 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1691 : #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1692 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1693 : #else
1694 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1695 : #endif
1696 : };
1697 :
1698 271 : static PyTypeObject swigpyobject_type;
1699 271 : static int type_init = 0;
1700 271 : if (!type_init) {
1701 271 : const PyTypeObject tmp = {
1702 : #if PY_VERSION_HEX >= 0x03000000
1703 : PyVarObject_HEAD_INIT(NULL, 0)
1704 : #else
1705 : PyObject_HEAD_INIT(NULL)
1706 : 0, /* ob_size */
1707 : #endif
1708 : "SwigPyObject", /* tp_name */
1709 : sizeof(SwigPyObject), /* tp_basicsize */
1710 : 0, /* tp_itemsize */
1711 : (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1712 : 0, /* tp_print */
1713 : (getattrfunc)0, /* tp_getattr */
1714 : (setattrfunc)0, /* tp_setattr */
1715 : #if PY_VERSION_HEX >= 0x03000000
1716 : 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1717 : #else
1718 : (cmpfunc)SwigPyObject_compare, /* tp_compare */
1719 : #endif
1720 : (reprfunc)SwigPyObject_repr, /* tp_repr */
1721 : &SwigPyObject_as_number, /* tp_as_number */
1722 : 0, /* tp_as_sequence */
1723 : 0, /* tp_as_mapping */
1724 : (hashfunc)0, /* tp_hash */
1725 : (ternaryfunc)0, /* tp_call */
1726 : 0, /* tp_str */
1727 : PyObject_GenericGetAttr, /* tp_getattro */
1728 : 0, /* tp_setattro */
1729 : 0, /* tp_as_buffer */
1730 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1731 : swigobject_doc, /* tp_doc */
1732 : 0, /* tp_traverse */
1733 : 0, /* tp_clear */
1734 : (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1735 : 0, /* tp_weaklistoffset */
1736 : 0, /* tp_iter */
1737 : 0, /* tp_iternext */
1738 : swigobject_methods, /* tp_methods */
1739 : 0, /* tp_members */
1740 : 0, /* tp_getset */
1741 : 0, /* tp_base */
1742 : 0, /* tp_dict */
1743 : 0, /* tp_descr_get */
1744 : 0, /* tp_descr_set */
1745 : 0, /* tp_dictoffset */
1746 : 0, /* tp_init */
1747 : 0, /* tp_alloc */
1748 : 0, /* tp_new */
1749 : 0, /* tp_free */
1750 : 0, /* tp_is_gc */
1751 : 0, /* tp_bases */
1752 : 0, /* tp_mro */
1753 : 0, /* tp_cache */
1754 : 0, /* tp_subclasses */
1755 : 0, /* tp_weaklist */
1756 : 0, /* tp_del */
1757 : 0, /* tp_version_tag */
1758 : #if PY_VERSION_HEX >= 0x03040000
1759 : 0, /* tp_finalize */
1760 : #endif
1761 : #ifdef COUNT_ALLOCS
1762 : 0, /* tp_allocs */
1763 : 0, /* tp_frees */
1764 : 0, /* tp_maxalloc */
1765 : 0, /* tp_prev */
1766 : 0 /* tp_next */
1767 : #endif
1768 : };
1769 271 : swigpyobject_type = tmp;
1770 271 : type_init = 1;
1771 271 : if (PyType_Ready(&swigpyobject_type) < 0)
1772 0 : return NULL;
1773 : }
1774 : return &swigpyobject_type;
1775 : }
1776 :
1777 : SWIGRUNTIME PyObject *
1778 1115180 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1779 : {
1780 1115180 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1781 1115180 : if (sobj) {
1782 1115180 : sobj->ptr = ptr;
1783 1115180 : sobj->ty = ty;
1784 1115180 : sobj->own = own;
1785 1115180 : sobj->next = 0;
1786 : }
1787 1115180 : return (PyObject *)sobj;
1788 : }
1789 :
1790 : /* -----------------------------------------------------------------------------
1791 : * Implements a simple Swig Packed type, and use it instead of string
1792 : * ----------------------------------------------------------------------------- */
1793 :
1794 : typedef struct {
1795 : PyObject_HEAD
1796 : void *pack;
1797 : swig_type_info *ty;
1798 : size_t size;
1799 : } SwigPyPacked;
1800 :
1801 : SWIGRUNTIME PyObject *
1802 0 : SwigPyPacked_repr(SwigPyPacked *v)
1803 : {
1804 0 : char result[SWIG_BUFFER_SIZE];
1805 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1806 0 : return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1807 : } else {
1808 0 : return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1809 : }
1810 : }
1811 :
1812 : SWIGRUNTIME PyObject *
1813 0 : SwigPyPacked_str(SwigPyPacked *v)
1814 : {
1815 0 : char result[SWIG_BUFFER_SIZE];
1816 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1817 0 : return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1818 : } else {
1819 0 : return SWIG_Python_str_FromChar(v->ty->name);
1820 : }
1821 : }
1822 :
1823 : SWIGRUNTIME int
1824 : SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
1825 : {
1826 : size_t i = v->size;
1827 : size_t j = w->size;
1828 : int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1829 : return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
1830 : }
1831 :
1832 : SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1833 :
1834 : SWIGRUNTIME PyTypeObject*
1835 271 : SwigPyPacked_type(void) {
1836 271 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1837 271 : return type;
1838 : }
1839 :
1840 : SWIGRUNTIMEINLINE int
1841 : SwigPyPacked_Check(PyObject *op) {
1842 : return ((op)->ob_type == SwigPyPacked_TypeOnce())
1843 : || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1844 : }
1845 :
1846 : SWIGRUNTIME void
1847 0 : SwigPyPacked_dealloc(PyObject *v)
1848 : {
1849 0 : if (SwigPyPacked_Check(v)) {
1850 0 : SwigPyPacked *sobj = (SwigPyPacked *) v;
1851 0 : free(sobj->pack);
1852 : }
1853 0 : PyObject_DEL(v);
1854 0 : }
1855 :
1856 : SWIGRUNTIME PyTypeObject*
1857 271 : SwigPyPacked_TypeOnce(void) {
1858 271 : static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1859 271 : static PyTypeObject swigpypacked_type;
1860 271 : static int type_init = 0;
1861 271 : if (!type_init) {
1862 271 : const PyTypeObject tmp = {
1863 : #if PY_VERSION_HEX>=0x03000000
1864 : PyVarObject_HEAD_INIT(NULL, 0)
1865 : #else
1866 : PyObject_HEAD_INIT(NULL)
1867 : 0, /* ob_size */
1868 : #endif
1869 : "SwigPyPacked", /* tp_name */
1870 : sizeof(SwigPyPacked), /* tp_basicsize */
1871 : 0, /* tp_itemsize */
1872 : (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1873 : 0, /* tp_print */
1874 : (getattrfunc)0, /* tp_getattr */
1875 : (setattrfunc)0, /* tp_setattr */
1876 : #if PY_VERSION_HEX>=0x03000000
1877 : 0, /* tp_reserved in 3.0.1 */
1878 : #else
1879 : (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1880 : #endif
1881 : (reprfunc)SwigPyPacked_repr, /* tp_repr */
1882 : 0, /* tp_as_number */
1883 : 0, /* tp_as_sequence */
1884 : 0, /* tp_as_mapping */
1885 : (hashfunc)0, /* tp_hash */
1886 : (ternaryfunc)0, /* tp_call */
1887 : (reprfunc)SwigPyPacked_str, /* tp_str */
1888 : PyObject_GenericGetAttr, /* tp_getattro */
1889 : 0, /* tp_setattro */
1890 : 0, /* tp_as_buffer */
1891 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1892 : swigpacked_doc, /* tp_doc */
1893 : 0, /* tp_traverse */
1894 : 0, /* tp_clear */
1895 : 0, /* tp_richcompare */
1896 : 0, /* tp_weaklistoffset */
1897 : 0, /* tp_iter */
1898 : 0, /* tp_iternext */
1899 : 0, /* tp_methods */
1900 : 0, /* tp_members */
1901 : 0, /* tp_getset */
1902 : 0, /* tp_base */
1903 : 0, /* tp_dict */
1904 : 0, /* tp_descr_get */
1905 : 0, /* tp_descr_set */
1906 : 0, /* tp_dictoffset */
1907 : 0, /* tp_init */
1908 : 0, /* tp_alloc */
1909 : 0, /* tp_new */
1910 : 0, /* tp_free */
1911 : 0, /* tp_is_gc */
1912 : 0, /* tp_bases */
1913 : 0, /* tp_mro */
1914 : 0, /* tp_cache */
1915 : 0, /* tp_subclasses */
1916 : 0, /* tp_weaklist */
1917 : 0, /* tp_del */
1918 : 0, /* tp_version_tag */
1919 : #if PY_VERSION_HEX >= 0x03040000
1920 : 0, /* tp_finalize */
1921 : #endif
1922 : #ifdef COUNT_ALLOCS
1923 : 0, /* tp_allocs */
1924 : 0, /* tp_frees */
1925 : 0, /* tp_maxalloc */
1926 : 0, /* tp_prev */
1927 : 0 /* tp_next */
1928 : #endif
1929 : };
1930 271 : swigpypacked_type = tmp;
1931 271 : type_init = 1;
1932 271 : if (PyType_Ready(&swigpypacked_type) < 0)
1933 0 : return NULL;
1934 : }
1935 : return &swigpypacked_type;
1936 : }
1937 :
1938 : SWIGRUNTIME PyObject *
1939 0 : SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1940 : {
1941 0 : SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1942 0 : if (sobj) {
1943 0 : void *pack = malloc(size);
1944 0 : if (pack) {
1945 0 : memcpy(pack, ptr, size);
1946 0 : sobj->pack = pack;
1947 0 : sobj->ty = ty;
1948 0 : sobj->size = size;
1949 : } else {
1950 0 : PyObject_DEL((PyObject *) sobj);
1951 0 : sobj = 0;
1952 : }
1953 : }
1954 0 : return (PyObject *) sobj;
1955 : }
1956 :
1957 : SWIGRUNTIME swig_type_info *
1958 : SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1959 : {
1960 : if (SwigPyPacked_Check(obj)) {
1961 : SwigPyPacked *sobj = (SwigPyPacked *)obj;
1962 : if (sobj->size != size) return 0;
1963 : memcpy(ptr, sobj->pack, size);
1964 : return sobj->ty;
1965 : } else {
1966 : return 0;
1967 : }
1968 : }
1969 :
1970 : /* -----------------------------------------------------------------------------
1971 : * pointers/data manipulation
1972 : * ----------------------------------------------------------------------------- */
1973 :
1974 : static PyObject *Swig_This_global = NULL;
1975 :
1976 : SWIGRUNTIME PyObject *
1977 4963670 : SWIG_This(void)
1978 : {
1979 4963670 : if (Swig_This_global == NULL)
1980 271 : Swig_This_global = SWIG_Python_str_FromChar("this");
1981 4963670 : 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 5295120 : SWIG_Python_GetSwigThis(PyObject *pyobj)
1993 : {
1994 5295150 : PyObject *obj;
1995 :
1996 5295150 : 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 4605340 : 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 4605340 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2039 4605340 : if (obj) {
2040 4247220 : Py_DECREF(obj);
2041 : } else {
2042 358119 : if (PyErr_Occurred()) PyErr_Clear();
2043 358119 : return 0;
2044 : }
2045 : #endif
2046 4247220 : 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 4938060 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2074 4938060 : int res;
2075 4938060 : SwigPyObject *sobj;
2076 4938060 : int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2077 :
2078 4938060 : if (!obj)
2079 : return SWIG_ERROR;
2080 4938060 : if (obj == Py_None && !implicit_conv) {
2081 994 : if (ptr)
2082 994 : *ptr = 0;
2083 1988 : return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2084 : }
2085 :
2086 4937070 : res = SWIG_ERROR;
2087 :
2088 4937070 : sobj = SWIG_Python_GetSwigThis(obj);
2089 4937070 : if (own)
2090 0 : *own = 0;
2091 4937070 : while (sobj) {
2092 4937000 : void *vptr = sobj->ptr;
2093 4937000 : if (ty) {
2094 4937000 : swig_type_info *to = sobj->ty;
2095 4937000 : if (to == ty) {
2096 : /* no type cast needed */
2097 4936120 : if (ptr) *ptr = vptr;
2098 : break;
2099 : } else {
2100 882 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2101 882 : if (!tc) {
2102 4 : sobj = (SwigPyObject *)sobj->next;
2103 : } else {
2104 878 : if (ptr) {
2105 878 : int newmemory = 0;
2106 878 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2107 878 : 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 4937070 : if (sobj) {
2122 4937000 : if (own)
2123 0 : *own = *own | sobj->own;
2124 4937000 : if (flags & SWIG_POINTER_DISOWN) {
2125 724066 : sobj->own = 0;
2126 : }
2127 : res = SWIG_OK;
2128 : } else {
2129 66 : 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 358057 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2281 : {
2282 358057 : 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 358057 : dict = PyObject_GetAttrString(inst, "__dict__");
2296 358057 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2297 358057 : Py_DECREF(dict);
2298 358057 : }
2299 :
2300 :
2301 : SWIGINTERN PyObject *
2302 358057 : SWIG_Python_InitShadowInstance(PyObject *args) {
2303 358057 : PyObject *obj[2];
2304 358057 : if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2305 : return NULL;
2306 : } else {
2307 358057 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2308 358057 : if (sthis) {
2309 0 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2310 : } else {
2311 358057 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2312 : }
2313 358057 : return SWIG_Py_Void();
2314 : }
2315 : }
2316 :
2317 : /* Create a new pointer object */
2318 :
2319 : SWIGRUNTIME PyObject *
2320 1126380 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2321 1126380 : SwigPyClientData *clientdata;
2322 1126380 : PyObject * robj;
2323 1126380 : int own;
2324 :
2325 1126380 : if (!ptr)
2326 11200 : return SWIG_Py_Void();
2327 :
2328 1115180 : clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2329 1115180 : own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2330 1115180 : 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 1115180 : assert(!(flags & SWIG_BUILTIN_TP_INIT));
2361 :
2362 1115180 : robj = SwigPyObject_New(ptr, type, own);
2363 1115180 : if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2364 756858 : PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2365 756858 : 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 293 : SWIG_Python_TypeCache(void) {
2441 293 : static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2442 293 : return cache;
2443 : }
2444 :
2445 : SWIGRUNTIME swig_type_info *
2446 22 : SWIG_Python_TypeQuery(const char *type)
2447 : {
2448 22 : PyObject *cache = SWIG_Python_TypeCache();
2449 22 : PyObject *key = SWIG_Python_str_FromChar(type);
2450 22 : PyObject *obj = PyDict_GetItem(cache, key);
2451 22 : swig_type_info *descriptor;
2452 22 : if (obj) {
2453 0 : descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2454 : } else {
2455 22 : swig_module_info *swig_module = SWIG_GetModule(0);
2456 22 : descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2457 22 : if (descriptor) {
2458 22 : obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2459 22 : PyDict_SetItem(cache, key, obj);
2460 22 : Py_DECREF(obj);
2461 : }
2462 : }
2463 22 : Py_DECREF(key);
2464 22 : 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 420798 : SWIG_From_int (int value)
2863 : {
2864 420798 : return PyInt_FromLong((long) value);
2865 : }
2866 :
2867 :
2868 : SWIGINTERN swig_type_info*
2869 226 : SWIG_pchar_descriptor(void)
2870 : {
2871 226 : static int init = 0;
2872 226 : static swig_type_info* info = 0;
2873 226 : if (!init) {
2874 22 : info = SWIG_TypeQuery("_p_char");
2875 22 : init = 1;
2876 : }
2877 226 : return info;
2878 : }
2879 :
2880 :
2881 : SWIGINTERNINLINE PyObject *
2882 244174 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2883 : {
2884 244174 : if (carray) {
2885 244060 : 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 244060 : 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 114 : return SWIG_Py_Void();
2902 : }
2903 : }
2904 :
2905 :
2906 : SWIGINTERNINLINE PyObject *
2907 244174 : SWIG_FromCharPtr(const char *cptr)
2908 : {
2909 232792 : 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 2086260 : struct PythonBindingErrorHandlerContext
2924 : {
2925 : std::string osInitialMsg{};
2926 : std::string osFailureMsg{};
2927 : CPLErrorNum nLastCode = CPLE_None;
2928 : };
2929 :
2930 : static void CPL_STDCALL
2931 554 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
2932 : {
2933 554 : PythonBindingErrorHandlerContext* ctxt = static_cast<
2934 554 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
2935 :
2936 : /*
2937 : ** Generally we want to suppress error reporting if we have exceptions
2938 : ** enabled as the error message will be in the exception thrown in
2939 : ** Python.
2940 : */
2941 :
2942 : /* If the error class is CE_Fatal, we want to have a message issued
2943 : because the CPL support code does an abort() before any exception
2944 : can be generated */
2945 554 : if (eclass == CE_Fatal ) {
2946 0 : CPLCallPreviousHandler(eclass, err_no, msg );
2947 : }
2948 :
2949 : /*
2950 : ** We do not want to interfere with non-failure messages since
2951 : ** they won't be translated into exceptions.
2952 : */
2953 554 : else if (eclass != CE_Failure ) {
2954 155 : CPLCallPreviousHandler(eclass, err_no, msg );
2955 : }
2956 : else {
2957 399 : ctxt->nLastCode = err_no;
2958 399 : if( ctxt->osFailureMsg.empty() ) {
2959 255 : ctxt->osFailureMsg = msg;
2960 255 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2961 : } else {
2962 144 : if( ctxt->osFailureMsg.size() < 10000 ) {
2963 288 : ctxt->osFailureMsg = std::string(msg) + "\nMay be caused by: " + ctxt->osFailureMsg;
2964 144 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2965 : }
2966 : else
2967 0 : ctxt->osFailureMsg = std::string(msg) + "\n[...]\nMay be caused by: " + ctxt->osInitialMsg;
2968 : }
2969 : }
2970 554 : }
2971 :
2972 :
2973 :
2974 :
2975 : static
2976 7202360 : int GetUseExceptions() {
2977 3712130 : return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
2978 : }
2979 :
2980 8189 : static int _GetExceptionsLocal()
2981 : {
2982 8189 : return bUseExceptionsLocal;
2983 : }
2984 :
2985 16378 : static void _SetExceptionsLocal(int bVal)
2986 : {
2987 16378 : bUseExceptionsLocal = bVal;
2988 : }
2989 :
2990 : static
2991 274 : void _UseExceptions() {
2992 274 : CPLErrorReset();
2993 274 : bUserHasSpecifiedIfUsingExceptions = TRUE;
2994 274 : if( !bUseExceptions )
2995 : {
2996 225 : bUseExceptions = 1;
2997 : }
2998 : }
2999 :
3000 : static
3001 5 : void _DontUseExceptions() {
3002 5 : CPLErrorReset();
3003 5 : bUserHasSpecifiedIfUsingExceptions = TRUE;
3004 5 : if( bUseExceptions )
3005 : {
3006 0 : bUseExceptions = 0;
3007 : }
3008 : }
3009 :
3010 17230 : static int _UserHasSpecifiedIfUsingExceptions()
3011 : {
3012 17230 : return bUserHasSpecifiedIfUsingExceptions;
3013 : }
3014 :
3015 :
3016 :
3017 : #include <limits.h>
3018 : #if !defined(SWIG_NO_LLONG_MAX)
3019 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3020 : # define LLONG_MAX __LONG_LONG_MAX__
3021 : # define LLONG_MIN (-LLONG_MAX - 1LL)
3022 : # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3023 : # endif
3024 : #endif
3025 :
3026 :
3027 : SWIGINTERN int
3028 708679 : SWIG_AsVal_double (PyObject *obj, double *val)
3029 : {
3030 708679 : int res = SWIG_TypeError;
3031 708679 : if (PyFloat_Check(obj)) {
3032 384167 : if (val) *val = PyFloat_AsDouble(obj);
3033 384167 : return SWIG_OK;
3034 : #if PY_VERSION_HEX < 0x03000000
3035 : } else if (PyInt_Check(obj)) {
3036 : if (val) *val = (double) PyInt_AsLong(obj);
3037 : return SWIG_OK;
3038 : #endif
3039 324512 : } else if (PyLong_Check(obj)) {
3040 324512 : double v = PyLong_AsDouble(obj);
3041 324512 : if (!PyErr_Occurred()) {
3042 324512 : if (val) *val = v;
3043 324512 : return SWIG_OK;
3044 : } else {
3045 0 : PyErr_Clear();
3046 : }
3047 : }
3048 : #ifdef SWIG_PYTHON_CAST_MODE
3049 : {
3050 : int dispatch = 0;
3051 : double d = PyFloat_AsDouble(obj);
3052 : if (!PyErr_Occurred()) {
3053 : if (val) *val = d;
3054 : return SWIG_AddCast(SWIG_OK);
3055 : } else {
3056 : PyErr_Clear();
3057 : }
3058 : if (!dispatch) {
3059 : long v = PyLong_AsLong(obj);
3060 : if (!PyErr_Occurred()) {
3061 : if (val) *val = v;
3062 : return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3063 : } else {
3064 : PyErr_Clear();
3065 : }
3066 : }
3067 : }
3068 : #endif
3069 : return res;
3070 : }
3071 :
3072 :
3073 : #include <float.h>
3074 :
3075 :
3076 : #include <math.h>
3077 :
3078 :
3079 : SWIGINTERNINLINE int
3080 : SWIG_CanCastAsInteger(double *d, double min, double max) {
3081 : double x = *d;
3082 : if ((min <= x && x <= max)) {
3083 : double fx = floor(x);
3084 : double cx = ceil(x);
3085 : double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3086 : if ((errno == EDOM) || (errno == ERANGE)) {
3087 : errno = 0;
3088 : } else {
3089 : double summ, reps, diff;
3090 : if (rd < x) {
3091 : diff = x - rd;
3092 : } else if (rd > x) {
3093 : diff = rd - x;
3094 : } else {
3095 : return 1;
3096 : }
3097 : summ = rd + x;
3098 : reps = diff/summ;
3099 : if (reps < 8*DBL_EPSILON) {
3100 : *d = rd;
3101 : return 1;
3102 : }
3103 : }
3104 : }
3105 : return 0;
3106 : }
3107 :
3108 :
3109 : SWIGINTERN int
3110 1802640 : SWIG_AsVal_long (PyObject *obj, long* val)
3111 : {
3112 : #if PY_VERSION_HEX < 0x03000000
3113 : if (PyInt_Check(obj)) {
3114 : if (val) *val = PyInt_AsLong(obj);
3115 : return SWIG_OK;
3116 : } else
3117 : #endif
3118 1802640 : if (PyLong_Check(obj)) {
3119 1796560 : long v = PyLong_AsLong(obj);
3120 1796560 : if (!PyErr_Occurred()) {
3121 1796560 : if (val) *val = v;
3122 1796560 : return SWIG_OK;
3123 : } else {
3124 0 : PyErr_Clear();
3125 0 : return SWIG_OverflowError;
3126 : }
3127 : }
3128 : #ifdef SWIG_PYTHON_CAST_MODE
3129 : {
3130 : int dispatch = 0;
3131 : long v = PyInt_AsLong(obj);
3132 : if (!PyErr_Occurred()) {
3133 : if (val) *val = v;
3134 : return SWIG_AddCast(SWIG_OK);
3135 : } else {
3136 : PyErr_Clear();
3137 : }
3138 : if (!dispatch) {
3139 : double d;
3140 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3141 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3142 : if (val) *val = (long)(d);
3143 : return res;
3144 : }
3145 : }
3146 : }
3147 : #endif
3148 : return SWIG_TypeError;
3149 : }
3150 :
3151 :
3152 : SWIGINTERN int
3153 1310000 : SWIG_AsVal_int (PyObject * obj, int *val)
3154 : {
3155 1310000 : long v;
3156 2620000 : int res = SWIG_AsVal_long (obj, &v);
3157 1310000 : if (SWIG_IsOK(res)) {
3158 1303920 : if ((v < INT_MIN || v > INT_MAX)) {
3159 : return SWIG_OverflowError;
3160 : } else {
3161 811283 : if (val) *val = static_cast< int >(v);
3162 : }
3163 : }
3164 : return res;
3165 : }
3166 :
3167 :
3168 : /* Completely unrelated: just to avoid Coverity warnings */
3169 :
3170 : static int bReturnSame = 1;
3171 :
3172 0 : void NeverCallMePlease() {
3173 0 : bReturnSame = 0;
3174 0 : }
3175 :
3176 : /* Some SWIG code generates dead code, which Coverity warns about */
3177 4604440 : template<class T> static T ReturnSame(T x)
3178 : {
3179 18274 : if( bReturnSame )
3180 : return x;
3181 : return 0;
3182 : }
3183 :
3184 2086260 : static void pushErrorHandler()
3185 : {
3186 2086260 : CPLErrorReset();
3187 2086260 : PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
3188 2086260 : CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
3189 2086260 : }
3190 :
3191 2086260 : static void popErrorHandler()
3192 : {
3193 2086260 : PythonBindingErrorHandlerContext* ctxt = static_cast<
3194 2086260 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
3195 2086260 : CPLPopErrorHandler();
3196 2086260 : if( !ctxt->osFailureMsg.empty() )
3197 : {
3198 283 : CPLErrorSetState(
3199 255 : CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
3200 : ctxt->nLastCode, ctxt->osFailureMsg.c_str());
3201 : }
3202 2086260 : delete ctxt;
3203 2086260 : }
3204 :
3205 :
3206 :
3207 :
3208 : /* Return a PyObject* from a NULL terminated C String */
3209 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
3210 9239 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
3211 : {
3212 9239 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3213 417341 : while(*pszIter != 0)
3214 : {
3215 408102 : if (*pszIter > 127)
3216 : {
3217 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
3218 0 : if (pyObj != NULL && !PyErr_Occurred())
3219 : return pyObj;
3220 0 : PyErr_Clear();
3221 0 : return PyBytes_FromString(pszStr);
3222 : }
3223 408102 : pszIter ++;
3224 : }
3225 9239 : return PyUnicode_FromString(pszStr);
3226 : }
3227 :
3228 : /* Return a NULL terminated c String from a PyObject */
3229 : /* Result must be freed with GDALPythonFreeCStr */
3230 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3231 25049 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
3232 : {
3233 25049 : *pbToFree = 0;
3234 25049 : if (PyUnicode_Check(pyObject))
3235 : {
3236 25049 : char *pszStr;
3237 25049 : char *pszNewStr;
3238 25049 : Py_ssize_t nLen;
3239 25049 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
3240 25049 : if( pyUTF8Str == NULL )
3241 : return NULL;
3242 25047 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3243 25047 : pszNewStr = (char *) malloc(nLen+1);
3244 25047 : if( pszNewStr == NULL )
3245 : {
3246 0 : CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
3247 : (unsigned long long)(nLen + 1));
3248 0 : Py_XDECREF(pyUTF8Str);
3249 0 : return NULL;
3250 : }
3251 25047 : memcpy(pszNewStr, pszStr, nLen+1);
3252 25047 : Py_XDECREF(pyUTF8Str);
3253 25047 : *pbToFree = 1;
3254 25047 : return pszNewStr;
3255 : }
3256 0 : else if( PyBytes_Check(pyObject) )
3257 : {
3258 0 : char* ret = PyBytes_AsString(pyObject);
3259 :
3260 : // Check if there are \0 bytes inside the string
3261 0 : const Py_ssize_t size = PyBytes_Size(pyObject);
3262 0 : for( Py_ssize_t i = 0; i < size; i++ )
3263 : {
3264 0 : if( ret[i] == 0 )
3265 : {
3266 0 : CPLError(CE_Failure, CPLE_AppDefined,
3267 : "bytes object cast as string contains a zero-byte.");
3268 0 : return NULL;
3269 : }
3270 : }
3271 :
3272 : return ret;
3273 : }
3274 : else
3275 : {
3276 0 : CPLError(CE_Failure, CPLE_AppDefined,
3277 : "Passed object is neither of type string nor bytes");
3278 0 : return NULL;
3279 : }
3280 : }
3281 :
3282 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3283 3160 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
3284 : {
3285 3160 : PyObject* os = PyImport_ImportModule("os");
3286 3160 : if (os == NULL)
3287 : {
3288 : return NULL;
3289 : }
3290 :
3291 3160 : PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
3292 3160 : if (pathLike == NULL)
3293 : {
3294 0 : Py_DECREF(os);
3295 0 : return NULL;
3296 : }
3297 :
3298 3160 : if (!PyObject_IsInstance(pyObject, pathLike))
3299 : {
3300 0 : Py_DECREF(pathLike);
3301 0 : Py_DECREF(os);
3302 0 : return NULL;
3303 : }
3304 :
3305 3160 : PyObject* str = PyObject_Str(pyObject);
3306 3160 : char* ret = NULL;
3307 3160 : if (str != NULL)
3308 : {
3309 3160 : ret = GDALPythonObjectToCStr(str, pbToFree);
3310 3160 : Py_DECREF(str);
3311 : }
3312 :
3313 3160 : Py_DECREF(pathLike);
3314 3160 : Py_DECREF(os);
3315 :
3316 : return ret;
3317 : }
3318 :
3319 :
3320 : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
3321 21261 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
3322 : {
3323 21261 : if (bToFree)
3324 21259 : free(ptr);
3325 : }
3326 :
3327 :
3328 :
3329 :
3330 : typedef struct {
3331 : PyObject *psPyCallback;
3332 : PyObject *psPyCallbackData;
3333 : int nLastReported;
3334 : } PyProgressData;
3335 :
3336 : /************************************************************************/
3337 : /* PyProgressProxy() */
3338 : /************************************************************************/
3339 :
3340 :
3341 : static int CPL_STDCALL
3342 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData ) CPL_UNUSED;
3343 :
3344 : static int CPL_STDCALL
3345 24 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
3346 :
3347 : {
3348 24 : PyProgressData *psInfo = (PyProgressData *) pData;
3349 24 : PyObject *psArgs, *psResult;
3350 24 : int bContinue = TRUE;
3351 :
3352 24 : if( dfComplete > 0 && psInfo->nLastReported == (int) (100.0 * dfComplete) )
3353 : return TRUE;
3354 :
3355 24 : if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
3356 : return TRUE;
3357 :
3358 24 : psInfo->nLastReported = (int) (100.0 * dfComplete);
3359 :
3360 24 : if( pszMessage == NULL )
3361 0 : pszMessage = "";
3362 :
3363 48 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3364 :
3365 24 : if( psInfo->psPyCallbackData == NULL )
3366 24 : psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
3367 : else
3368 0 : psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
3369 : psInfo->psPyCallbackData );
3370 :
3371 24 : psResult = PyObject_CallObject( psInfo->psPyCallback, psArgs);
3372 24 : Py_XDECREF(psArgs);
3373 :
3374 24 : if( PyErr_Occurred() != NULL )
3375 : {
3376 0 : PyErr_Print();
3377 0 : PyErr_Clear();
3378 0 : SWIG_PYTHON_THREAD_END_BLOCK;
3379 : return FALSE;
3380 : }
3381 :
3382 24 : if( psResult == NULL )
3383 : {
3384 0 : SWIG_PYTHON_THREAD_END_BLOCK;
3385 : return TRUE;
3386 : }
3387 :
3388 24 : if( psResult == Py_None )
3389 : {
3390 0 : SWIG_PYTHON_THREAD_END_BLOCK;
3391 : return TRUE;
3392 : }
3393 :
3394 24 : if( !PyArg_Parse( psResult, "i", &bContinue ) )
3395 : {
3396 0 : PyErr_Clear();
3397 0 : CPLError(CE_Failure, CPLE_AppDefined, "bad progress return value");
3398 0 : Py_XDECREF(psResult);
3399 0 : SWIG_PYTHON_THREAD_END_BLOCK;
3400 : return FALSE;
3401 : }
3402 :
3403 24 : Py_XDECREF(psResult);
3404 24 : SWIG_PYTHON_THREAD_END_BLOCK;
3405 :
3406 24 : return bContinue;
3407 : }
3408 :
3409 :
3410 : #include "gdal.h"
3411 :
3412 19 : SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
3413 19 : return GDALGetDescription( self );
3414 : }
3415 :
3416 : SWIGINTERN int
3417 86474 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3418 : {
3419 : #if PY_VERSION_HEX>=0x03000000
3420 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3421 : if (PyBytes_Check(obj))
3422 : #else
3423 86474 : if (PyUnicode_Check(obj))
3424 : #endif
3425 : #else
3426 : if (PyString_Check(obj))
3427 : #endif
3428 : {
3429 86248 : char *cstr; Py_ssize_t len;
3430 86248 : int ret = SWIG_OK;
3431 : #if PY_VERSION_HEX>=0x03000000
3432 : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3433 86248 : if (!alloc && cptr) {
3434 : /* We can't allow converting without allocation, since the internal
3435 : representation of string in Python 3 is UCS-2/UCS-4 but we require
3436 : a UTF-8 representation.
3437 : TODO(bhy) More detailed explanation */
3438 : return SWIG_RuntimeError;
3439 : }
3440 86248 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3441 86248 : if (!obj)
3442 : return SWIG_TypeError;
3443 86248 : if (alloc)
3444 82450 : *alloc = SWIG_NEWOBJ;
3445 : #endif
3446 86248 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3447 : #else
3448 : PyString_AsStringAndSize(obj, &cstr, &len);
3449 : #endif
3450 86248 : if (cptr) {
3451 82450 : if (alloc) {
3452 82450 : if (*alloc == SWIG_NEWOBJ) {
3453 82450 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3454 82450 : *alloc = SWIG_NEWOBJ;
3455 : } else {
3456 0 : *cptr = cstr;
3457 0 : *alloc = SWIG_OLDOBJ;
3458 : }
3459 : } else {
3460 : #if PY_VERSION_HEX>=0x03000000
3461 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3462 : *cptr = PyBytes_AsString(obj);
3463 : #else
3464 : assert(0); /* Should never reach here with Unicode strings in Python 3 */
3465 : #endif
3466 : #else
3467 : *cptr = SWIG_Python_str_AsChar(obj);
3468 : if (!*cptr)
3469 : ret = SWIG_TypeError;
3470 : #endif
3471 : }
3472 : }
3473 86248 : if (psize) *psize = len + 1;
3474 : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3475 86248 : Py_XDECREF(obj);
3476 : #endif
3477 86248 : return ret;
3478 : } else {
3479 : #if defined(SWIG_PYTHON_2_UNICODE)
3480 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3481 : #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3482 : #endif
3483 : #if PY_VERSION_HEX<0x03000000
3484 : if (PyUnicode_Check(obj)) {
3485 : char *cstr; Py_ssize_t len;
3486 : if (!alloc && cptr) {
3487 : return SWIG_RuntimeError;
3488 : }
3489 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3490 : if (!obj)
3491 : return SWIG_TypeError;
3492 : if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3493 : if (cptr) {
3494 : if (alloc) *alloc = SWIG_NEWOBJ;
3495 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3496 : }
3497 : if (psize) *psize = len + 1;
3498 :
3499 : Py_XDECREF(obj);
3500 : return SWIG_OK;
3501 : } else {
3502 : Py_XDECREF(obj);
3503 : }
3504 : }
3505 : #endif
3506 : #endif
3507 :
3508 226 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3509 226 : if (pchar_descriptor) {
3510 226 : void* vptr = 0;
3511 226 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3512 199 : if (cptr) *cptr = (char *) vptr;
3513 199 : if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3514 199 : if (alloc) *alloc = SWIG_OLDOBJ;
3515 199 : return SWIG_OK;
3516 : }
3517 : }
3518 : }
3519 : return SWIG_TypeError;
3520 : }
3521 :
3522 :
3523 :
3524 :
3525 0 : SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
3526 0 : GDALSetDescription( self, pszNewDesc );
3527 0 : }
3528 8 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
3529 8 : return GDALGetMetadataDomainList( self );
3530 : }
3531 :
3532 401 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
3533 : {
3534 401 : PyObject* res;
3535 401 : if ( stringarray == NULL ) {
3536 41 : res = Py_None;
3537 41 : Py_INCREF( res );
3538 : }
3539 : else {
3540 360 : int len = CSLCount( stringarray );
3541 360 : res = PyList_New( len );
3542 360 : if( !res ) {
3543 0 : *pbErr = true;
3544 0 : return res;
3545 : }
3546 1257 : for ( int i = 0; i < len; ++i ) {
3547 897 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
3548 897 : PyList_SetItem(res, i, o );
3549 : }
3550 : }
3551 401 : *pbErr = false;
3552 401 : return res;
3553 : }
3554 :
3555 69 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
3556 69 : return GDALGetMetadata( self, pszDomain );
3557 : }
3558 :
3559 : /* Return a PyObject* from a C String */
3560 416 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
3561 : {
3562 416 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3563 3832 : for( size_t i = 0; i < nLen; ++i)
3564 : {
3565 3416 : if (pszIter[i] > 127)
3566 : {
3567 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
3568 0 : if (pyObj != NULL && !PyErr_Occurred())
3569 : return pyObj;
3570 0 : PyErr_Clear();
3571 0 : return PyBytes_FromStringAndSize(pszStr, nLen);
3572 : }
3573 : }
3574 416 : return PyUnicode_FromStringAndSize(pszStr, nLen);
3575 : }
3576 :
3577 :
3578 : static PyObject*
3579 76 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
3580 76 : PyObject* dict = PyDict_New();
3581 76 : if ( stringarray != NULL ) {
3582 479 : for (char** iter = stringarray; *iter; ++iter ) {
3583 416 : const char* pszSep = strchr( *iter, '=' );
3584 416 : if ( pszSep != NULL) {
3585 416 : const char* keyptr = *iter;
3586 416 : const char* valptr = pszSep + 1;
3587 416 : PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
3588 416 : PyObject *val = GDALPythonObjectFromCStr( valptr );
3589 416 : PyDict_SetItem(dict, nm, val );
3590 416 : Py_DECREF(nm);
3591 416 : Py_DECREF(val);
3592 : }
3593 : }
3594 : }
3595 76 : if( bFreeCSL )
3596 0 : CSLDestroy(stringarray);
3597 76 : return dict;
3598 : }
3599 :
3600 9 : SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
3601 9 : return GDALGetMetadata( self, pszDomain );
3602 : }
3603 :
3604 : /************************************************************************/
3605 : /* CSLFromPySequence() */
3606 : /************************************************************************/
3607 866 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
3608 :
3609 : {
3610 866 : *pbErr = FALSE;
3611 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
3612 866 : if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
3613 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
3614 0 : *pbErr = TRUE;
3615 0 : return NULL;
3616 : }
3617 :
3618 866 : Py_ssize_t size = PySequence_Size(pySeq);
3619 866 : if( size > (Py_ssize_t)(INT_MAX - 1) ) {
3620 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
3621 0 : *pbErr = TRUE;
3622 0 : return NULL;
3623 : }
3624 866 : if( size == 0 ) {
3625 : return NULL;
3626 : }
3627 618 : char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
3628 618 : if( !papszRet ) {
3629 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3630 0 : *pbErr = TRUE;
3631 0 : return NULL;
3632 : }
3633 2822 : for (int i = 0; i < (int)size; i++) {
3634 2204 : PyObject* pyObj = PySequence_GetItem(pySeq,i);
3635 2204 : if (PyUnicode_Check(pyObj))
3636 : {
3637 2204 : char *pszStr;
3638 2204 : Py_ssize_t nLen;
3639 2204 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
3640 2204 : if( !pyUTF8Str )
3641 : {
3642 0 : Py_DECREF(pyObj);
3643 0 : PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
3644 0 : CSLDestroy(papszRet);
3645 0 : *pbErr = TRUE;
3646 0 : return NULL;
3647 : }
3648 2204 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3649 2204 : papszRet[i] = VSIStrdup(pszStr);
3650 4384 : Py_XDECREF(pyUTF8Str);
3651 : }
3652 0 : else if (PyBytes_Check(pyObj))
3653 0 : papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
3654 : else
3655 : {
3656 0 : Py_DECREF(pyObj);
3657 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
3658 0 : CSLDestroy(papszRet);
3659 0 : *pbErr = TRUE;
3660 0 : return NULL;
3661 : }
3662 2204 : Py_DECREF(pyObj);
3663 2204 : if( !papszRet[i] )
3664 : {
3665 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3666 0 : CSLDestroy(papszRet);
3667 0 : *pbErr = TRUE;
3668 0 : return NULL;
3669 : }
3670 : }
3671 : return papszRet;
3672 : }
3673 :
3674 :
3675 39 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
3676 :
3677 : {
3678 39 : char** retCSL = NULL;
3679 39 : Py_ssize_t size = PyMapping_Length( pyObj );
3680 39 : if ( size > 0 && size == (int)size) {
3681 39 : PyObject *item_list = PyMapping_Items( pyObj );
3682 80 : for( int i=0; i<(int)size; i++ ) {
3683 41 : PyObject *it = PySequence_GetItem( item_list, i );
3684 :
3685 41 : PyObject *k, *v;
3686 41 : if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
3687 0 : Py_DECREF(it);
3688 0 : Py_DECREF(item_list);
3689 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
3690 0 : CSLDestroy(retCSL);
3691 0 : *pbErr = TRUE;
3692 0 : return NULL;
3693 : }
3694 :
3695 41 : PyObject* kStr = PyObject_Str(k);
3696 41 : if( PyErr_Occurred() )
3697 : {
3698 0 : Py_DECREF(it);
3699 0 : Py_DECREF(item_list);
3700 0 : CSLDestroy(retCSL);
3701 0 : *pbErr = TRUE;
3702 0 : return NULL;
3703 : }
3704 :
3705 41 : PyObject* vStr;
3706 41 : if( PyBytes_Check(v) )
3707 : {
3708 0 : vStr = v;
3709 0 : Py_INCREF(vStr);
3710 : }
3711 : else
3712 : {
3713 41 : vStr = PyObject_Str(v);
3714 41 : if( PyErr_Occurred() )
3715 : {
3716 0 : Py_DECREF(it);
3717 0 : Py_DECREF(kStr);
3718 0 : Py_DECREF(item_list);
3719 0 : CSLDestroy(retCSL);
3720 0 : *pbErr = TRUE;
3721 0 : return NULL;
3722 : }
3723 : }
3724 :
3725 41 : int bFreeK, bFreeV;
3726 41 : char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
3727 41 : char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
3728 41 : if( pszK == NULL || pszV == NULL )
3729 : {
3730 0 : GDALPythonFreeCStr(pszK, bFreeK);
3731 0 : GDALPythonFreeCStr(pszV, bFreeV);
3732 0 : Py_DECREF(kStr);
3733 0 : Py_DECREF(vStr);
3734 0 : Py_DECREF(it);
3735 0 : Py_DECREF(item_list);
3736 0 : PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
3737 0 : CSLDestroy(retCSL);
3738 0 : *pbErr = TRUE;
3739 0 : return NULL;
3740 : }
3741 41 : retCSL = CSLAddNameValue( retCSL, pszK, pszV );
3742 :
3743 41 : GDALPythonFreeCStr(pszK, bFreeK);
3744 41 : GDALPythonFreeCStr(pszV, bFreeV);
3745 41 : Py_DECREF(kStr);
3746 41 : Py_DECREF(vStr);
3747 41 : Py_DECREF(it);
3748 : }
3749 39 : Py_DECREF(item_list);
3750 : }
3751 39 : *pbErr = FALSE;
3752 39 : return retCSL;
3753 : }
3754 :
3755 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
3756 : return GDALSetMetadata( self, papszMetadata, pszDomain );
3757 : }
3758 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
3759 : char *tmpList[2];
3760 : tmpList[0] = pszMetadataString;
3761 : tmpList[1] = 0;
3762 : return GDALSetMetadata( self, tmpList, pszDomain );
3763 : }
3764 421 : SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
3765 421 : return GDALGetMetadataItem( self, pszName, pszDomain);
3766 : }
3767 289 : SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
3768 289 : return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
3769 : }
3770 :
3771 3820 : int GetGEOSVersionMajor() {
3772 3820 : int num;
3773 3820 : OGRGetGEOSVersion(&num, NULL, NULL);
3774 3820 : return num;
3775 : }
3776 :
3777 203 : int GetGEOSVersionMinor() {
3778 203 : int num;
3779 203 : OGRGetGEOSVersion(NULL, &num, NULL);
3780 203 : return num;
3781 : }
3782 :
3783 203 : int GetGEOSVersionMicro() {
3784 203 : int num;
3785 203 : OGRGetGEOSVersion(NULL, NULL, &num);
3786 203 : return num;
3787 : }
3788 :
3789 3 : SWIGINTERN OGRStyleTableShadow *new_OGRStyleTableShadow(){
3790 3 : return (OGRStyleTableShadow*) OGR_STBL_Create();
3791 : }
3792 3 : SWIGINTERN void delete_OGRStyleTableShadow(OGRStyleTableShadow *self){
3793 3 : OGR_STBL_Destroy( (OGRStyleTableH) self );
3794 3 : }
3795 3 : SWIGINTERN int OGRStyleTableShadow_AddStyle(OGRStyleTableShadow *self,char const *pszName,char const *pszStyleString){
3796 3 : return OGR_STBL_AddStyle( (OGRStyleTableH) self, pszName, pszStyleString);
3797 : }
3798 2 : SWIGINTERN int OGRStyleTableShadow_LoadStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
3799 2 : return OGR_STBL_LoadStyleTable( (OGRStyleTableH) self, utf8_path );
3800 : }
3801 2 : SWIGINTERN int OGRStyleTableShadow_SaveStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
3802 2 : return OGR_STBL_SaveStyleTable( (OGRStyleTableH) self, utf8_path );
3803 : }
3804 2 : SWIGINTERN char const *OGRStyleTableShadow_Find(OGRStyleTableShadow *self,char const *pszName){
3805 2 : return OGR_STBL_Find( (OGRStyleTableH) self, pszName );
3806 : }
3807 1 : SWIGINTERN void OGRStyleTableShadow_ResetStyleStringReading(OGRStyleTableShadow *self){
3808 1 : OGR_STBL_ResetStyleStringReading( (OGRStyleTableH) self );
3809 1 : }
3810 5 : SWIGINTERN char const *OGRStyleTableShadow_GetNextStyle(OGRStyleTableShadow *self){
3811 5 : return OGR_STBL_GetNextStyle( (OGRStyleTableH) self );
3812 : }
3813 1 : SWIGINTERN char const *OGRStyleTableShadow_GetLastStyleName(OGRStyleTableShadow *self){
3814 1 : return OGR_STBL_GetLastStyleName( (OGRStyleTableH) self );
3815 : }
3816 4 : SWIGINTERN ArrowArray *new_ArrowArray(){
3817 4 : return (struct ArrowArray* )calloc(1, sizeof(struct ArrowArray));
3818 : }
3819 565 : SWIGINTERN void delete_ArrowArray(ArrowArray *self){
3820 565 : if( self->release )
3821 507 : self->release(self);
3822 565 : free(self);
3823 : }
3824 521 : SWIGINTERN VoidPtrAsLong ArrowArray__getPtr(ArrowArray *self){
3825 521 : return self;
3826 : }
3827 1 : SWIGINTERN GIntBig ArrowArray_GetChildrenCount(ArrowArray *self){
3828 1 : return self->n_children;
3829 : }
3830 0 : SWIGINTERN GIntBig ArrowArray_GetLength(ArrowArray *self){
3831 0 : return self->length;
3832 : }
3833 126 : SWIGINTERN ArrowSchema *new_ArrowSchema(){
3834 126 : return (struct ArrowSchema* )calloc(1, sizeof(struct ArrowSchema));
3835 : }
3836 496 : SWIGINTERN void delete_ArrowSchema(ArrowSchema *self){
3837 496 : if( self->release )
3838 416 : self->release(self);
3839 496 : free(self);
3840 : }
3841 675 : SWIGINTERN VoidPtrAsLong ArrowSchema__getPtr(ArrowSchema *self){
3842 675 : return self;
3843 : }
3844 427 : SWIGINTERN char const *ArrowSchema_GetName(ArrowSchema *self){
3845 427 : return self->name;
3846 : }
3847 26 : SWIGINTERN GIntBig ArrowSchema_GetChildrenCount(ArrowSchema *self){
3848 26 : return self->n_children;
3849 : }
3850 832 : SWIGINTERN ArrowSchema const *ArrowSchema_GetChild(ArrowSchema *self,int iChild){
3851 832 : if( iChild < 0 || iChild >= self->n_children )
3852 : {
3853 0 : CPLError(CE_Failure, CPLE_AppDefined, "Wrong index");
3854 0 : return NULL;
3855 : }
3856 832 : return self->children[iChild];
3857 : }
3858 340 : SWIGINTERN void delete_ArrowArrayStream(ArrowArrayStream *self){
3859 340 : if( self->release )
3860 340 : self->release(self);
3861 340 : free(self);
3862 : }
3863 370 : SWIGINTERN ArrowSchema *ArrowArrayStream_GetSchema(ArrowArrayStream *self){
3864 370 : struct ArrowSchema* schema = (struct ArrowSchema* )malloc(sizeof(struct ArrowSchema));
3865 370 : if( self->get_schema(self, schema) == 0 )
3866 : {
3867 : return schema;
3868 : }
3869 : else
3870 : {
3871 0 : free(schema);
3872 0 : return NULL;
3873 : }
3874 : }
3875 : SWIGINTERN ArrowArray *ArrowArrayStream_GetNextRecordBatch(ArrowArrayStream *self,char **options=NULL){
3876 : struct ArrowArray* array = (struct ArrowArray* )malloc(sizeof(struct ArrowArray));
3877 : if( self->get_next(self, array) == 0 && array->release != NULL )
3878 : {
3879 : return array;
3880 : }
3881 : else
3882 : {
3883 : free(array);
3884 : return NULL;
3885 : }
3886 : }
3887 :
3888 7 : static void ReleaseArrowArrayStreamPyCapsule(PyObject* capsule) {
3889 7 : struct ArrowArrayStream* stream =
3890 7 : (struct ArrowArrayStream*)PyCapsule_GetPointer(capsule, "arrow_array_stream");
3891 7 : if (stream->release != NULL) {
3892 3 : stream->release(stream);
3893 : }
3894 7 : CPLFree(stream);
3895 7 : }
3896 :
3897 4 : static char** ParseArrowMetadata(const char *pabyMetadata)
3898 : {
3899 4 : char** ret = NULL;
3900 4 : int32_t nKVP;
3901 4 : memcpy(&nKVP, pabyMetadata, sizeof(int32_t));
3902 4 : pabyMetadata += sizeof(int32_t);
3903 8 : for (int i = 0; i < nKVP; ++i)
3904 : {
3905 4 : int32_t nSizeKey;
3906 4 : memcpy(&nSizeKey, pabyMetadata, sizeof(int32_t));
3907 4 : pabyMetadata += sizeof(int32_t);
3908 8 : std::string osKey;
3909 4 : osKey.assign(pabyMetadata, nSizeKey);
3910 4 : pabyMetadata += nSizeKey;
3911 :
3912 4 : int32_t nSizeValue;
3913 4 : memcpy(&nSizeValue, pabyMetadata, sizeof(int32_t));
3914 4 : pabyMetadata += sizeof(int32_t);
3915 8 : std::string osValue;
3916 4 : osValue.assign(pabyMetadata, nSizeValue);
3917 4 : pabyMetadata += nSizeValue;
3918 :
3919 4 : ret = CSLSetNameValue(ret, osKey.c_str(), osValue.c_str());
3920 : }
3921 :
3922 4 : return ret;
3923 : }
3924 :
3925 : // Create output fields using CreateFieldFromArrowSchema()
3926 : static bool CreateFieldsFromArrowSchema(OGRLayerH hDstLayer,
3927 : const struct ArrowSchema* schemaSrc,
3928 : char** options)
3929 : {
3930 : for (int i = 0; i < schemaSrc->n_children; ++i)
3931 : {
3932 : const char *metadata =
3933 : schemaSrc->children[i]->metadata;
3934 : if( metadata )
3935 : {
3936 : char** keyValues = ParseArrowMetadata(metadata);
3937 : const char *ARROW_EXTENSION_NAME_KEY = "ARROW:extension:name";
3938 : const char *EXTENSION_NAME_OGC_WKB = "ogc.wkb";
3939 : const char *EXTENSION_NAME_GEOARROW_WKB = "geoarrow.wkb";
3940 : const char* value = CSLFetchNameValue(keyValues, ARROW_EXTENSION_NAME_KEY);
3941 : const bool bSkip = ( value && (EQUAL(value, EXTENSION_NAME_OGC_WKB) || EQUAL(value, EXTENSION_NAME_GEOARROW_WKB)) );
3942 : CSLDestroy(keyValues);
3943 : if( bSkip )
3944 : continue;
3945 : }
3946 :
3947 : const char *pszFieldName =
3948 : schemaSrc->children[i]->name;
3949 : if (!EQUAL(pszFieldName, "OGC_FID") &&
3950 : !EQUAL(pszFieldName, "wkb_geometry") &&
3951 : !OGR_L_CreateFieldFromArrowSchema(
3952 : hDstLayer, schemaSrc->children[i], options))
3953 : {
3954 : CPLError(CE_Failure, CPLE_AppDefined,
3955 : "Cannot create field %s",
3956 : pszFieldName);
3957 : return false;
3958 : }
3959 : }
3960 : return true;
3961 : }
3962 :
3963 :
3964 263 : SWIGINTERN GDALDatasetShadow *OGRLayerShadow_GetDataset(OGRLayerShadow *self){
3965 263 : return OGR_L_GetDataset(self);
3966 : }
3967 37 : SWIGINTERN OGRErr OGRLayerShadow_Rename(OGRLayerShadow *self,char const *new_name){
3968 37 : return OGR_L_Rename( self, new_name);
3969 : }
3970 :
3971 :
3972 : #include "ogr_core.h"
3973 : static char const *
3974 5712 : OGRErrMessages( int rc ) {
3975 5712 : switch( rc ) {
3976 : case OGRERR_NONE:
3977 : return "OGR Error: None";
3978 2172 : case OGRERR_NOT_ENOUGH_DATA:
3979 2172 : return "OGR Error: Not enough data to deserialize";
3980 0 : case OGRERR_NOT_ENOUGH_MEMORY:
3981 0 : return "OGR Error: Not enough memory";
3982 1098 : case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
3983 1098 : return "OGR Error: Unsupported geometry type";
3984 0 : case OGRERR_UNSUPPORTED_OPERATION:
3985 0 : return "OGR Error: Unsupported operation";
3986 2371 : case OGRERR_CORRUPT_DATA:
3987 2371 : return "OGR Error: Corrupt data";
3988 71 : case OGRERR_FAILURE:
3989 71 : return "OGR Error: General Error";
3990 0 : case OGRERR_UNSUPPORTED_SRS:
3991 0 : return "OGR Error: Unsupported SRS";
3992 0 : case OGRERR_INVALID_HANDLE:
3993 0 : return "OGR Error: Invalid handle";
3994 0 : case OGRERR_NON_EXISTING_FEATURE:
3995 0 : return "OGR Error: Non existing feature";
3996 0 : default:
3997 0 : return "OGR Error: Unknown";
3998 : }
3999 : }
4000 :
4001 0 : SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
4002 0 : return OGR_L_GetRefCount(self);
4003 : }
4004 : SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_0(OGRLayerShadow *self,OGRGeometryShadow *filter){
4005 : OGR_L_SetSpatialFilter (self, filter);
4006 : }
4007 : SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_0(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
4008 : OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);
4009 : }
4010 : SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_1(OGRLayerShadow *self,int iGeomField,OGRGeometryShadow *filter){
4011 : OGR_L_SetSpatialFilterEx (self, iGeomField, filter);
4012 : }
4013 : SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_1(OGRLayerShadow *self,int iGeomField,double minx,double miny,double maxx,double maxy){
4014 : OGR_L_SetSpatialFilterRectEx(self, iGeomField, minx, miny, maxx, maxy);
4015 : }
4016 5 : SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
4017 5 : return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
4018 : }
4019 1232 : SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
4020 1232 : return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
4021 : }
4022 17570 : SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
4023 17570 : OGR_L_ResetReading(self);
4024 17570 : }
4025 1231 : SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
4026 1231 : return OGR_L_GetName(self);
4027 : }
4028 951 : SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
4029 951 : return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
4030 : }
4031 574 : SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
4032 574 : return OGR_L_GetGeometryColumn(self);
4033 : }
4034 383 : SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
4035 383 : return OGR_L_GetFIDColumn(self);
4036 : }
4037 2525 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,GIntBig fid){
4038 2525 : return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
4039 : }
4040 77985 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
4041 77985 : return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
4042 : }
4043 39 : SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,GIntBig new_index){
4044 39 : return OGR_L_SetNextByIndex(self, new_index);
4045 : }
4046 2476 : SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
4047 2476 : return OGR_L_SetFeature(self, feature);
4048 : }
4049 282346 : SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
4050 282346 : return OGR_L_CreateFeature(self, feature);
4051 : }
4052 31 : SWIGINTERN OGRErr OGRLayerShadow_UpsertFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
4053 31 : return OGR_L_UpsertFeature(self, feature);
4054 : }
4055 :
4056 : static int*
4057 106 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
4058 : /* check if is List */
4059 106 : if ( !PySequence_Check(pySeq) ) {
4060 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4061 0 : *pnSize = -1;
4062 0 : return NULL;
4063 : }
4064 106 : Py_ssize_t size = PySequence_Size(pySeq);
4065 106 : if( size > (Py_ssize_t)INT_MAX ) {
4066 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4067 0 : *pnSize = -1;
4068 0 : return NULL;
4069 : }
4070 106 : if( (size_t)size > SIZE_MAX / sizeof(int) ) {
4071 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4072 0 : *pnSize = -1;
4073 0 : return NULL;
4074 : }
4075 106 : *pnSize = (int)size;
4076 106 : int* ret = (int*) malloc((*pnSize)*sizeof(int));
4077 106 : if( !ret ) {
4078 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
4079 0 : *pnSize = -1;
4080 0 : return NULL;
4081 : }
4082 229 : for( int i = 0; i<*pnSize; i++ ) {
4083 123 : PyObject *o = PySequence_GetItem(pySeq,i);
4084 123 : if ( !PyArg_Parse(o,"i",&ret[i]) ) {
4085 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
4086 0 : Py_DECREF(o);
4087 0 : free(ret);
4088 0 : *pnSize = -1;
4089 0 : return NULL;
4090 : }
4091 123 : Py_DECREF(o);
4092 : }
4093 : return ret;
4094 : }
4095 :
4096 :
4097 : SWIGINTERN int
4098 43 : SWIG_AsVal_bool (PyObject *obj, bool *val)
4099 : {
4100 43 : int r;
4101 43 : if (!PyBool_Check(obj))
4102 : return SWIG_ERROR;
4103 43 : r = PyObject_IsTrue(obj);
4104 43 : if (r == -1)
4105 : return SWIG_ERROR;
4106 43 : if (val) *val = r ? true : false;
4107 : return SWIG_OK;
4108 : }
4109 :
4110 27 : SWIGINTERN OGRErr OGRLayerShadow_UpdateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature,int nUpdatedFieldsCount,int const *panUpdatedFieldsIdx,int nUpdatedGeomFieldsCount,int const *panUpdatedGeomFieldsIdx,bool bUpdateStyleString){
4111 27 : return OGR_L_UpdateFeature(self, feature,
4112 : nUpdatedFieldsCount,
4113 : panUpdatedFieldsIdx,
4114 : nUpdatedGeomFieldsCount,
4115 : panUpdatedGeomFieldsIdx,
4116 : bUpdateStyleString);
4117 : }
4118 3329 : SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,GIntBig fid){
4119 3329 : return OGR_L_DeleteFeature(self, fid);
4120 : }
4121 243 : SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
4122 243 : return OGR_L_SyncToDisk(self);
4123 : }
4124 124377 : SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
4125 248754 : auto defn = (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
4126 124377 : if (defn)
4127 124377 : OGR_FD_Reference(defn);
4128 124377 : return defn;
4129 : }
4130 35816 : SWIGINTERN GIntBig OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
4131 35816 : return OGR_L_GetFeatureCount(self, force);
4132 : }
4133 354 : SWIGINTERN void OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int *isvalid=NULL,int force=1,int can_return_null=0,int geom_field=0){
4134 708 : OGRErr eErr = OGR_L_GetExtentEx(self, geom_field, (OGREnvelope*)argout, force);
4135 354 : if (can_return_null)
4136 35 : *isvalid = (eErr == 0);
4137 : else
4138 : *isvalid = TRUE;
4139 354 : return;
4140 : }
4141 58 : SWIGINTERN void OGRLayerShadow_GetExtent3D(OGRLayerShadow *self,double argout[6],int *isvalid=NULL,int force=1,int can_return_null=0,int geom_field=0){
4142 116 : OGRErr eErr = OGR_L_GetExtent3D(self, geom_field, (OGREnvelope3D*)argout, force);
4143 58 : if (can_return_null)
4144 1 : *isvalid = (eErr == 0);
4145 : else
4146 : *isvalid = TRUE;
4147 58 : return;
4148 : }
4149 589 : SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
4150 1178 : return (OGR_L_TestCapability(self, cap) > 0);
4151 : }
4152 :
4153 : SWIGINTERNINLINE PyObject*
4154 36061 : SWIG_From_bool (bool value)
4155 : {
4156 36061 : return PyBool_FromLong(value ? 1 : 0);
4157 : }
4158 :
4159 75497 : SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
4160 75497 : return OGR_L_CreateField(self, field_def, approx_ok);
4161 : }
4162 69 : SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
4163 69 : return OGR_L_DeleteField(self, iField);
4164 : }
4165 34 : SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
4166 34 : return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
4167 : }
4168 43 : SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
4169 43 : if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
4170 : {
4171 0 : CPLError(CE_Failure, CPLE_IllegalArg,
4172 : "List should have %d elements",
4173 : OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
4174 0 : return 6;
4175 : }
4176 43 : return OGR_L_ReorderFields(self, pList);
4177 : }
4178 118 : SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
4179 118 : return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
4180 : }
4181 33 : SWIGINTERN OGRErr OGRLayerShadow_AlterGeomFieldDefn(OGRLayerShadow *self,int iGeomField,OGRGeomFieldDefnShadow const *field_def,int nFlags){
4182 33 : return OGR_L_AlterGeomFieldDefn(self, iGeomField, const_cast<OGRGeomFieldDefnShadow*>(field_def), nFlags);
4183 : }
4184 116 : SWIGINTERN OGRErr OGRLayerShadow_CreateGeomField(OGRLayerShadow *self,OGRGeomFieldDefnShadow *field_def,int approx_ok=1){
4185 116 : return OGR_L_CreateGeomField(self, field_def, approx_ok);
4186 : }
4187 149 : SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
4188 149 : return OGR_L_StartTransaction(self);
4189 : }
4190 129 : SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
4191 129 : return OGR_L_CommitTransaction(self);
4192 : }
4193 26 : SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
4194 26 : return OGR_L_RollbackTransaction(self);
4195 : }
4196 2 : SWIGINTERN int OGRLayerShadow_FindFieldIndex(OGRLayerShadow *self,char const *pszFieldName,int bExactMatch){
4197 2 : return OGR_L_FindFieldIndex(self, pszFieldName, bExactMatch );
4198 : }
4199 896 : SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
4200 1792 : OGRSpatialReferenceH ref = OGR_L_GetSpatialRef(self);
4201 896 : if( ref )
4202 780 : OSRReference(ref);
4203 896 : return (OSRSpatialReferenceShadow*) ref;
4204 : }
4205 0 : SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
4206 0 : return OGR_L_GetFeaturesRead(self);
4207 : }
4208 198 : SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
4209 198 : return OGR_L_SetIgnoredFields( self, options );
4210 : }
4211 6 : SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4212 6 : return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data );
4213 : }
4214 7 : SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4215 7 : return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data );
4216 : }
4217 4 : SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4218 4 : return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data );
4219 : }
4220 6 : SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4221 6 : return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data );
4222 : }
4223 5 : SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4224 5 : return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data );
4225 : }
4226 3 : SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4227 3 : return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data );
4228 : }
4229 6 : SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
4230 6 : return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data );
4231 : }
4232 3 : SWIGINTERN OGRStyleTableShadow *OGRLayerShadow_GetStyleTable(OGRLayerShadow *self){
4233 3 : return (OGRStyleTableShadow*) OGR_L_GetStyleTable(self);
4234 : }
4235 2 : SWIGINTERN void OGRLayerShadow_SetStyleTable(OGRLayerShadow *self,OGRStyleTableShadow *table){
4236 2 : if( table != NULL )
4237 1 : OGR_L_SetStyleTable(self, (OGRStyleTableH) table);
4238 : }
4239 8 : SWIGINTERN PyObject *OGRLayerShadow_ExportArrowArrayStreamPyCapsule(OGRLayerShadow *self,char **options=NULL){
4240 8 : struct ArrowArrayStream* stream =
4241 8 : (struct ArrowArrayStream*)CPLMalloc(sizeof(struct ArrowArrayStream));
4242 :
4243 8 : const int success = OGR_L_GetArrowStream(self, stream, options);
4244 :
4245 8 : PyObject* ret;
4246 8 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
4247 8 : if( success )
4248 : {
4249 7 : ret = PyCapsule_New(stream, "arrow_array_stream", ReleaseArrowArrayStreamPyCapsule);
4250 : }
4251 : else
4252 : {
4253 1 : CPLFree(stream);
4254 1 : Py_INCREF(Py_None);
4255 1 : ret = Py_None;
4256 : }
4257 :
4258 8 : SWIG_PYTHON_THREAD_END_BLOCK;
4259 :
4260 8 : return ret;
4261 : }
4262 342 : SWIGINTERN ArrowArrayStream *OGRLayerShadow_GetArrowStream(OGRLayerShadow *self,char **options=NULL){
4263 342 : struct ArrowArrayStream* stream = (struct ArrowArrayStream* )malloc(sizeof(struct ArrowArrayStream));
4264 342 : if( OGR_L_GetArrowStream(self, stream, options) )
4265 : return stream;
4266 : else
4267 : {
4268 2 : free(stream);
4269 2 : return NULL;
4270 : }
4271 : }
4272 18 : SWIGINTERN void OGRLayerShadow_IsArrowSchemaSupported(OGRLayerShadow *self,ArrowSchema const *schema,bool *pbRet,char **errorMsg,char **options=NULL){
4273 36 : *pbRet = OGR_L_IsArrowSchemaSupported(self, schema, options, errorMsg);
4274 : }
4275 524 : SWIGINTERN OGRErr OGRLayerShadow_CreateFieldFromArrowSchema(OGRLayerShadow *self,ArrowSchema const *schema,char **options=NULL){
4276 524 : return OGR_L_CreateFieldFromArrowSchema(self, schema, options) ? 0 : 6;
4277 : }
4278 47 : SWIGINTERN OGRErr OGRLayerShadow_WriteArrowBatch(OGRLayerShadow *self,ArrowSchema const *schema,ArrowArray *array,char **options=NULL){
4279 47 : return OGR_L_WriteArrowBatch(self, schema, array, options) ? 0 : 6;
4280 : }
4281 4 : SWIGINTERN OGRErr OGRLayerShadow_WriteArrowStreamCapsule(OGRLayerShadow *self,PyObject *capsule,int createFieldsFromSchema,char **options=NULL){
4282 4 : ArrowArrayStream* stream = (ArrowArrayStream*)PyCapsule_GetPointer(capsule, "arrow_array_stream");
4283 4 : if( !stream )
4284 : {
4285 0 : CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(capsule, \"arrow_array_stream\") failed");
4286 0 : return 6;
4287 : }
4288 4 : if( stream->release == NULL )
4289 : {
4290 0 : CPLError(CE_Failure, CPLE_AppDefined, "stream->release == NULL");
4291 0 : return 6;
4292 : }
4293 :
4294 4 : ArrowSchema schema;
4295 4 : if( stream->get_schema(stream, &schema) != 0 )
4296 : {
4297 0 : stream->release(stream);
4298 0 : return 6;
4299 : }
4300 :
4301 4 : if( createFieldsFromSchema == TRUE ||
4302 4 : (createFieldsFromSchema == -1 && OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)) == 0) )
4303 : {
4304 4 : if( !CreateFieldsFromArrowSchema(self, &schema, options) )
4305 : {
4306 0 : schema.release(&schema);
4307 0 : stream->release(stream);
4308 0 : return 6;
4309 : }
4310 : }
4311 :
4312 12 : while( true )
4313 : {
4314 8 : ArrowArray array;
4315 8 : if( stream->get_next(stream, &array) == 0 )
4316 : {
4317 8 : if( array.release == NULL )
4318 : break;
4319 4 : if( !OGR_L_WriteArrowBatch(self, &schema, &array, options) )
4320 : {
4321 0 : if( array.release )
4322 0 : array.release(&array);
4323 0 : schema.release(&schema);
4324 0 : stream->release(stream);
4325 0 : return 6;
4326 : }
4327 4 : if( array.release )
4328 4 : array.release(&array);
4329 : }
4330 : else
4331 : {
4332 0 : CPLError(CE_Failure, CPLE_AppDefined, "stream->get_next(stream, &array) failed");
4333 0 : schema.release(&schema);
4334 0 : stream->release(stream);
4335 0 : return 6;
4336 : }
4337 4 : }
4338 4 : schema.release(&schema);
4339 4 : stream->release(stream);
4340 : return 0;
4341 : }
4342 0 : SWIGINTERN OGRErr OGRLayerShadow_WriteArrowSchemaAndArrowArrayCapsule(OGRLayerShadow *self,PyObject *schemaCapsule,PyObject *arrayCapsule,int createFieldsFromSchema,char **options=NULL){
4343 0 : ArrowSchema* schema = (ArrowSchema*)PyCapsule_GetPointer(schemaCapsule, "arrow_schema");
4344 0 : if( !schema )
4345 : {
4346 0 : CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(schemaCapsule, \"arrow_schema\") failed");
4347 0 : return 6;
4348 : }
4349 0 : if( schema->release == NULL )
4350 : {
4351 0 : CPLError(CE_Failure, CPLE_AppDefined, "schema->release == NULL");
4352 0 : return 6;
4353 : }
4354 :
4355 0 : if( createFieldsFromSchema == TRUE ||
4356 0 : (createFieldsFromSchema == -1 && OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)) == 0) )
4357 : {
4358 0 : if( !CreateFieldsFromArrowSchema(self, schema, options) )
4359 : {
4360 0 : schema->release(schema);
4361 0 : return 6;
4362 : }
4363 : }
4364 :
4365 0 : ArrowArray* array = (ArrowArray*)PyCapsule_GetPointer(arrayCapsule, "arrow_array");
4366 0 : if( !array )
4367 : {
4368 0 : CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(arrayCapsule, \"arrow_array\") failed");
4369 0 : schema->release(schema);
4370 0 : return 6;
4371 : }
4372 0 : if( array->release == NULL )
4373 : {
4374 0 : CPLError(CE_Failure, CPLE_AppDefined, "array->release == NULL");
4375 0 : schema->release(schema);
4376 0 : return 6;
4377 : }
4378 :
4379 0 : OGRErr eErr = 0;
4380 0 : if( !OGR_L_WriteArrowBatch(self, schema, array, options) )
4381 : {
4382 0 : eErr = 6;
4383 : }
4384 :
4385 0 : if( schema->release )
4386 0 : schema->release(schema);
4387 0 : if( array->release )
4388 0 : array->release(array);
4389 : return eErr;
4390 : }
4391 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){
4392 108 : *ppRet = OGR_L_GetGeometryTypes(self, geom_field, flags, pnEntryCount, callback, callback_data);
4393 : }
4394 4 : SWIGINTERN void OGRLayerShadow_GetSupportedSRSList(OGRLayerShadow *self,OGRSpatialReferenceH **ppRet,int *pnEntryCount,int geom_field=0){
4395 8 : *ppRet = OGR_L_GetSupportedSRSList(self, geom_field, pnEntryCount);
4396 : }
4397 9 : SWIGINTERN OGRErr OGRLayerShadow_SetActiveSRS(OGRLayerShadow *self,int geom_field,OSRSpatialReferenceShadow *srs){
4398 9 : return OGR_L_SetActiveSRS(self, geom_field, srs);
4399 : }
4400 200458 : SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
4401 200458 : OGR_F_Destroy(self);
4402 200458 : }
4403 121101 : SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
4404 121101 : return (OGRFeatureShadow*) OGR_F_Create( feature_def );
4405 : }
4406 46868 : SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
4407 46868 : return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
4408 : }
4409 236056 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
4410 236056 : return OGR_F_SetGeometry(self, geom);
4411 : }
4412 33895 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
4413 33895 : return OGR_F_SetGeometryDirectly(self, geom);
4414 : }
4415 37542 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
4416 37542 : return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
4417 : }
4418 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
4419 : return OGR_F_SetGeomField(self, iField, geom);
4420 : }
4421 1 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
4422 1 : int iField = OGR_F_GetGeomFieldIndex(self, field_name);
4423 1 : if (iField == -1)
4424 : {
4425 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4426 0 : return 6;
4427 : }
4428 : else
4429 1 : return OGR_F_SetGeomField(self, iField, geom);
4430 : }
4431 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
4432 : return OGR_F_SetGeomFieldDirectly(self, iField, geom);
4433 : }
4434 16 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
4435 16 : int iField = OGR_F_GetGeomFieldIndex(self, field_name);
4436 16 : if (iField == -1)
4437 : {
4438 1 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4439 1 : return 6;
4440 : }
4441 : else
4442 15 : return OGR_F_SetGeomFieldDirectly(self, iField, geom);
4443 : }
4444 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_0(OGRFeatureShadow *self,int iField){
4445 : return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, iField);
4446 : }
4447 56 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4448 56 : int i = OGR_F_GetGeomFieldIndex(self, field_name);
4449 56 : if (i == -1)
4450 : {
4451 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4452 0 : return NULL;
4453 : }
4454 : else
4455 56 : return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, i);
4456 : }
4457 49 : SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
4458 49 : return (OGRFeatureShadow*) OGR_F_Clone(self);
4459 : }
4460 109 : SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
4461 218 : return (OGR_F_Equal(self, feature) > 0);
4462 : }
4463 108850 : SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
4464 108850 : return OGR_F_GetFieldCount(self);
4465 : }
4466 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
4467 : return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
4468 : }
4469 0 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4470 0 : int i = OGR_F_GetFieldIndex(self, field_name);
4471 0 : if (i == -1)
4472 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4473 : else
4474 0 : return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
4475 0 : return NULL;
4476 : }
4477 121 : SWIGINTERN int OGRFeatureShadow_GetGeomFieldCount(OGRFeatureShadow *self){
4478 121 : return OGR_F_GetGeomFieldCount(self);
4479 : }
4480 : SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
4481 : return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, id);
4482 : }
4483 0 : SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4484 0 : int i = OGR_F_GetGeomFieldIndex(self, field_name);
4485 0 : if (i == -1)
4486 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4487 : else
4488 0 : return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, i);
4489 0 : return NULL;
4490 : }
4491 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
4492 : return (const char *) OGR_F_GetFieldAsString(self, id);
4493 : }
4494 789 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4495 789 : int i = OGR_F_GetFieldIndex(self, field_name);
4496 789 : if (i == -1)
4497 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4498 : else
4499 789 : return (const char *) OGR_F_GetFieldAsString(self, i);
4500 0 : return NULL;
4501 : }
4502 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_0(OGRFeatureShadow *self,int id,char **options=0){
4503 : return OGR_F_GetFieldAsISO8601DateTime(self, id, options);
4504 : }
4505 6 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_1(OGRFeatureShadow *self,char const *field_name,char **options=0){
4506 6 : int i = OGR_F_GetFieldIndex(self, field_name);
4507 6 : if (i == -1)
4508 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4509 : else
4510 6 : return OGR_F_GetFieldAsISO8601DateTime(self, i, options);
4511 0 : return NULL;
4512 : }
4513 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
4514 : return OGR_F_GetFieldAsInteger(self, id);
4515 : }
4516 186 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4517 186 : int i = OGR_F_GetFieldIndex(self, field_name);
4518 186 : if (i == -1)
4519 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4520 : else
4521 186 : return OGR_F_GetFieldAsInteger(self, i);
4522 0 : return 0;
4523 : }
4524 : SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(OGRFeatureShadow *self,int id){
4525 : return OGR_F_GetFieldAsInteger64(self, id);
4526 : }
4527 0 : SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4528 0 : int i = OGR_F_GetFieldIndex(self, field_name);
4529 0 : if (i == -1)
4530 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4531 : else
4532 0 : return OGR_F_GetFieldAsInteger64(self, i);
4533 0 : return 0;
4534 : }
4535 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
4536 : return OGR_F_GetFieldAsDouble(self, id);
4537 : }
4538 :
4539 : #define SWIG_From_double PyFloat_FromDouble
4540 :
4541 17 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4542 17 : int i = OGR_F_GetFieldIndex(self, field_name);
4543 17 : if (i == -1)
4544 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4545 : else
4546 17 : return OGR_F_GetFieldAsDouble(self, i);
4547 0 : return 0;
4548 : }
4549 :
4550 : SWIGINTERNINLINE PyObject *
4551 : SWIG_From_float (float value)
4552 : {
4553 : return SWIG_From_double (value);
4554 : }
4555 :
4556 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,float *pfSecond,int *pnTZFlag){
4557 : OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
4558 : pnHour, pnMinute, pfSecond,
4559 : pnTZFlag);
4560 : }
4561 0 : 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){
4562 0 : int id = OGR_F_GetFieldIndex(self, field_name);
4563 0 : if (id == -1)
4564 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4565 : else
4566 0 : OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
4567 : pnHour, pnMinute, pfSecond,
4568 : pnTZFlag);
4569 0 : }
4570 : SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
4571 : *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
4572 : }
4573 0 : SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,int const **pList){
4574 0 : int id = OGR_F_GetFieldIndex(self, field_name);
4575 0 : if (id == -1)
4576 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4577 : else
4578 0 : *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
4579 0 : }
4580 313 : SWIGINTERN void OGRFeatureShadow_GetFieldAsInteger64List(OGRFeatureShadow *self,int id,int *nLen,GIntBig const **pList){
4581 626 : *pList = OGR_F_GetFieldAsInteger64List(self, id, nLen);
4582 : }
4583 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
4584 : *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
4585 : }
4586 0 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,double const **pList){
4587 0 : int id = OGR_F_GetFieldIndex(self, field_name);
4588 0 : if (id == -1)
4589 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4590 : else
4591 0 : *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
4592 0 : }
4593 319 : SWIGINTERN char **OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id){
4594 319 : return OGR_F_GetFieldAsStringList(self, id);
4595 : }
4596 39 : SWIGINTERN OGRErr OGRFeatureShadow_GetFieldAsBinary__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,char **pBuf){
4597 39 : GByte* pabyBlob = OGR_F_GetFieldAsBinary(self, id, nLen);
4598 39 : *pBuf = (char*)VSIMalloc(*nLen);
4599 39 : memcpy(*pBuf, pabyBlob, *nLen);
4600 39 : return 0;
4601 : }
4602 61 : SWIGINTERN OGRErr OGRFeatureShadow_GetFieldAsBinary__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,char **pBuf){
4603 61 : int id = OGR_F_GetFieldIndex(self, field_name);
4604 61 : if (id == -1)
4605 : {
4606 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4607 0 : return 6;
4608 : }
4609 : else
4610 : {
4611 61 : GByte* pabyBlob = OGR_F_GetFieldAsBinary(self, id, nLen);
4612 61 : *pBuf = (char*)VSIMalloc(*nLen);
4613 61 : memcpy(*pBuf, pabyBlob, *nLen);
4614 61 : return 0;
4615 : }
4616 : }
4617 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
4618 : return (OGR_F_IsFieldSet(self, id) > 0);
4619 : }
4620 212 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4621 212 : int i = OGR_F_GetFieldIndex(self, field_name);
4622 212 : if (i == -1)
4623 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4624 : else
4625 212 : return (OGR_F_IsFieldSet(self, i) > 0);
4626 0 : return false;
4627 : }
4628 : SWIGINTERN bool OGRFeatureShadow_IsFieldNull__SWIG_0(OGRFeatureShadow *self,int id){
4629 : return (OGR_F_IsFieldNull(self, id) > 0);
4630 : }
4631 56 : SWIGINTERN bool OGRFeatureShadow_IsFieldNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4632 56 : int i = OGR_F_GetFieldIndex(self, field_name);
4633 56 : if (i == -1)
4634 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4635 : else
4636 56 : return (OGR_F_IsFieldNull(self, i) > 0);
4637 0 : return false;
4638 : }
4639 : SWIGINTERN bool OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(OGRFeatureShadow *self,int id){
4640 : return (OGR_F_IsFieldSetAndNotNull(self, id) > 0);
4641 : }
4642 52 : SWIGINTERN bool OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4643 52 : int i = OGR_F_GetFieldIndex(self, field_name);
4644 52 : if (i == -1)
4645 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4646 : else
4647 52 : return (OGR_F_IsFieldSetAndNotNull(self, i) > 0);
4648 0 : return false;
4649 : }
4650 302 : SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *field_name){
4651 : // Do not issue an error if the field doesn't exist. It is intended to be silent
4652 302 : return OGR_F_GetFieldIndex(self, field_name);
4653 : }
4654 72 : SWIGINTERN int OGRFeatureShadow_GetGeomFieldIndex(OGRFeatureShadow *self,char const *field_name){
4655 : // Do not issue an error if the field doesn't exist. It is intended to be silent
4656 72 : return OGR_F_GetGeomFieldIndex(self, field_name);
4657 : }
4658 5175 : SWIGINTERN GIntBig OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
4659 5175 : return OGR_F_GetFID(self);
4660 : }
4661 160507 : SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,GIntBig fid){
4662 160507 : return OGR_F_SetFID(self, fid);
4663 : }
4664 0 : SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
4665 0 : OGR_F_DumpReadable(self, NULL);
4666 0 : }
4667 72 : SWIGINTERN retStringAndCPLFree *OGRFeatureShadow_DumpReadableAsString(OGRFeatureShadow *self,char **options=NULL){
4668 72 : return OGR_F_DumpReadableAsString(self, options);
4669 : }
4670 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
4671 : OGR_F_UnsetField(self, id);
4672 : }
4673 4 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4674 4 : int i = OGR_F_GetFieldIndex(self, field_name);
4675 4 : if (i == -1)
4676 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4677 : else
4678 4 : OGR_F_UnsetField(self, i);
4679 4 : }
4680 : SWIGINTERN void OGRFeatureShadow_SetFieldNull__SWIG_0(OGRFeatureShadow *self,int id){
4681 : OGR_F_SetFieldNull(self, id);
4682 : }
4683 19 : SWIGINTERN void OGRFeatureShadow_SetFieldNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4684 19 : int i = OGR_F_GetFieldIndex(self, field_name);
4685 19 : if (i == -1)
4686 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4687 : else
4688 19 : OGR_F_SetFieldNull(self, i);
4689 19 : }
4690 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
4691 : OGR_F_SetFieldString(self, id, value);
4692 : }
4693 0 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *field_name,char const *value){
4694 0 : int i = OGR_F_GetFieldIndex(self, field_name);
4695 0 : if (i == -1)
4696 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4697 : else
4698 0 : OGR_F_SetFieldString(self, i, value);
4699 0 : }
4700 86764 : SWIGINTERN void OGRFeatureShadow_SetFieldInteger64(OGRFeatureShadow *self,int id,GIntBig value){
4701 86764 : OGR_F_SetFieldInteger64(self, id, value);
4702 86764 : }
4703 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,double value){
4704 : OGR_F_SetFieldDouble(self, id, value);
4705 : }
4706 2291 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *field_name,double value){
4707 2291 : int i = OGR_F_GetFieldIndex(self, field_name);
4708 2291 : if (i == -1)
4709 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4710 : else
4711 2291 : OGR_F_SetFieldDouble(self, i, value);
4712 2291 : }
4713 :
4714 : /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
4715 : #ifndef SWIG_isfinite
4716 : /* isfinite() is a macro for C99 */
4717 : # if defined(isfinite)
4718 : # define SWIG_isfinite(X) (isfinite(X))
4719 : # elif defined(__cplusplus) && __cplusplus >= 201103L
4720 : /* Use a template so that this works whether isfinite() is std::isfinite() or
4721 : * in the global namespace. The reality seems to vary between compiler
4722 : * versions.
4723 : *
4724 : * Make sure namespace std exists to avoid compiler warnings.
4725 : *
4726 : * extern "C++" is required as this fragment can end up inside an extern "C" { } block
4727 : */
4728 : namespace std { }
4729 : extern "C++" template<typename T>
4730 0 : inline int SWIG_isfinite_func(T x) {
4731 : using namespace std;
4732 0 : return isfinite(x);
4733 : }
4734 : # define SWIG_isfinite(X) (SWIG_isfinite_func(X))
4735 : # elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
4736 : # define SWIG_isfinite(X) (__builtin_isfinite(X))
4737 : # elif defined(__clang__) && defined(__has_builtin)
4738 : # if __has_builtin(__builtin_isfinite)
4739 : # define SWIG_isfinite(X) (__builtin_isfinite(X))
4740 : # endif
4741 : # elif defined(_MSC_VER)
4742 : # define SWIG_isfinite(X) (_finite(X))
4743 : # elif defined(__sun) && defined(__SVR4)
4744 : # include <ieeefp.h>
4745 : # define SWIG_isfinite(X) (finite(X))
4746 : # endif
4747 : #endif
4748 :
4749 :
4750 : /* Accept infinite as a valid float value unless we are unable to check if a value is finite */
4751 : #ifdef SWIG_isfinite
4752 : # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
4753 : #else
4754 : # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
4755 : #endif
4756 :
4757 :
4758 : SWIGINTERN int
4759 88 : SWIG_AsVal_float (PyObject * obj, float *val)
4760 : {
4761 88 : double v;
4762 88 : int res = SWIG_AsVal_double (obj, &v);
4763 88 : if (SWIG_IsOK(res)) {
4764 88 : if (SWIG_Float_Overflow_Check(v)) {
4765 : return SWIG_OverflowError;
4766 : } else {
4767 88 : if (val) *val = static_cast< float >(v);
4768 : }
4769 : }
4770 : return res;
4771 : }
4772 :
4773 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,float second,int tzflag){
4774 : OGR_F_SetFieldDateTimeEx(self, id, year, month, day,
4775 : hour, minute, second,
4776 : tzflag);
4777 : }
4778 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){
4779 20 : int i = OGR_F_GetFieldIndex(self, field_name);
4780 20 : if (i == -1)
4781 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4782 : else
4783 20 : OGR_F_SetFieldDateTimeEx(self, i, year, month, day,
4784 : hour, minute, second,
4785 : tzflag);
4786 20 : }
4787 9 : SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
4788 9 : OGR_F_SetFieldIntegerList(self, id, nList, pList);
4789 9 : }
4790 :
4791 : static GIntBig*
4792 112 : CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
4793 : /* check if is List */
4794 112 : if ( !PySequence_Check(pySeq) ) {
4795 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4796 0 : *pnSize = -1;
4797 0 : return NULL;
4798 : }
4799 112 : Py_ssize_t size = PySequence_Size(pySeq);
4800 112 : if( size > (Py_ssize_t)INT_MAX ) {
4801 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4802 0 : *pnSize = -1;
4803 0 : return NULL;
4804 : }
4805 112 : if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
4806 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4807 0 : *pnSize = -1;
4808 0 : return NULL;
4809 : }
4810 112 : *pnSize = (int)size;
4811 112 : GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
4812 112 : if( !ret ) {
4813 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
4814 0 : *pnSize = -1;
4815 0 : return NULL;
4816 : }
4817 684 : for( int i = 0; i<*pnSize; i++ ) {
4818 572 : PyObject *o = PySequence_GetItem(pySeq,i);
4819 572 : if ( !PyArg_Parse(o,"L",&ret[i]) ) {
4820 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
4821 0 : Py_DECREF(o);
4822 0 : free(ret);
4823 0 : *pnSize = -1;
4824 0 : return NULL;
4825 : }
4826 572 : Py_DECREF(o);
4827 : }
4828 : return ret;
4829 : }
4830 :
4831 112 : SWIGINTERN void OGRFeatureShadow_SetFieldInteger64List(OGRFeatureShadow *self,int id,int nList,GIntBig *pList){
4832 112 : OGR_F_SetFieldInteger64List(self, id, nList, pList);
4833 112 : }
4834 :
4835 : static double*
4836 89 : CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
4837 : /* check if is List */
4838 89 : if ( !PySequence_Check(pySeq) ) {
4839 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4840 0 : *pnSize = -1;
4841 0 : return NULL;
4842 : }
4843 89 : Py_ssize_t size = PySequence_Size(pySeq);
4844 89 : if( size > (Py_ssize_t)INT_MAX ) {
4845 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4846 0 : *pnSize = -1;
4847 0 : return NULL;
4848 : }
4849 89 : if( (size_t)size > SIZE_MAX / sizeof(double) ) {
4850 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
4851 0 : *pnSize = -1;
4852 0 : return NULL;
4853 : }
4854 89 : *pnSize = (int)size;
4855 89 : double* ret = (double*) malloc((*pnSize)*sizeof(double));
4856 89 : if( !ret ) {
4857 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
4858 0 : *pnSize = -1;
4859 0 : return NULL;
4860 : }
4861 288 : for( int i = 0; i<*pnSize; i++ ) {
4862 199 : PyObject *o = PySequence_GetItem(pySeq,i);
4863 199 : if ( !PyArg_Parse(o,"d",&ret[i]) ) {
4864 0 : PyErr_SetString(PyExc_TypeError, "not an number");
4865 0 : Py_DECREF(o);
4866 0 : free(ret);
4867 0 : *pnSize = -1;
4868 0 : return NULL;
4869 : }
4870 199 : Py_DECREF(o);
4871 : }
4872 : return ret;
4873 : }
4874 :
4875 89 : SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList(OGRFeatureShadow *self,int id,int nList,double *pList){
4876 89 : OGR_F_SetFieldDoubleList(self, id, nList, pList);
4877 89 : }
4878 41 : SWIGINTERN void OGRFeatureShadow_SetFieldStringList(OGRFeatureShadow *self,int id,char **pList){
4879 41 : OGR_F_SetFieldStringList(self, id, pList);
4880 41 : }
4881 :
4882 : static bool
4883 1193 : GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
4884 1193 : {
4885 1193 : if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
4886 : {
4887 1193 : if( view->len > INT_MAX ) {
4888 0 : PyBuffer_Release(view);
4889 0 : PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
4890 0 : return false;
4891 : }
4892 1193 : *viewIsValid = true;
4893 1193 : *nLen = (int) view->len;
4894 1193 : *pBuf = (char*) view->buf;
4895 1193 : return true;
4896 : }
4897 : else
4898 : {
4899 0 : PyErr_Clear();
4900 : }
4901 : }
4902 0 : if (PyUnicode_Check(input))
4903 : {
4904 0 : size_t safeLen = 0;
4905 0 : int ret;
4906 0 : try {
4907 0 : ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
4908 : }
4909 0 : catch( const std::exception& )
4910 : {
4911 0 : PyErr_SetString(PyExc_MemoryError, "out of memory");
4912 0 : return false;
4913 : }
4914 0 : if (!SWIG_IsOK(ret)) {
4915 0 : PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
4916 0 : return false;
4917 : }
4918 :
4919 0 : if (safeLen) safeLen--;
4920 0 : if( safeLen > INT_MAX ) {
4921 0 : PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
4922 0 : return false;
4923 : }
4924 0 : *nLen = (int) safeLen;
4925 0 : return true;
4926 : }
4927 : else
4928 : {
4929 0 : PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
4930 0 : return false;
4931 : }
4932 : }
4933 :
4934 1193 : SWIGINTERN void OGRFeatureShadow__SetFieldBinary(OGRFeatureShadow *self,int id,int nLen,char *pBuf){
4935 1193 : OGR_F_SetFieldBinary(self, id, nLen, pBuf);
4936 1193 : }
4937 4 : SWIGINTERN void OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(OGRFeatureShadow *self,int id,char const *pszValue){
4938 4 : int nBytes;
4939 4 : GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
4940 4 : OGR_F_SetFieldBinary(self, id, nBytes, pabyBuf);
4941 4 : CPLFree(pabyBuf);
4942 4 : }
4943 2 : SWIGINTERN void OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(OGRFeatureShadow *self,char const *field_name,char const *pszValue){
4944 2 : int i = OGR_F_GetFieldIndex(self, field_name);
4945 2 : if (i == -1)
4946 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4947 : else
4948 : {
4949 2 : int nBytes;
4950 2 : GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
4951 2 : OGR_F_SetFieldBinary(self, i, nBytes, pabyBuf);
4952 2 : CPLFree(pabyBuf);
4953 : }
4954 2 : }
4955 1708 : SWIGINTERN OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
4956 1708 : return OGR_F_SetFrom(self, other, forgiving);
4957 : }
4958 0 : SWIGINTERN OGRErr OGRFeatureShadow_SetFromWithMap(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving,int nList,int *pList){
4959 0 : if (nList != OGR_F_GetFieldCount(other))
4960 : {
4961 0 : CPLError(CE_Failure, CPLE_AppDefined,
4962 : "The size of map doesn't match with the field count of the source feature");
4963 0 : return 6;
4964 : }
4965 0 : return OGR_F_SetFromWithMap(self, other, forgiving, pList);
4966 : }
4967 513 : SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
4968 513 : return (const char*) OGR_F_GetStyleString(self);
4969 : }
4970 51 : SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
4971 51 : OGR_F_SetStyleString(self, the_string);
4972 51 : }
4973 100759 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
4974 100759 : OGRFieldDefnH fd = OGR_F_GetFieldDefnRef( self, id );
4975 100759 : if (fd)
4976 100759 : return (OGRFieldType) OGR_Fld_GetType( fd );
4977 : else
4978 : return (OGRFieldType)0;
4979 : }
4980 0 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *field_name){
4981 0 : int i = OGR_F_GetFieldIndex(self, field_name);
4982 0 : if (i == -1) {
4983 0 : CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
4984 0 : return (OGRFieldType)0;
4985 : } else
4986 0 : return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, i ) );
4987 : }
4988 10 : SWIGINTERN int OGRFeatureShadow_Validate(OGRFeatureShadow *self,int flags=OGR_F_VAL_ALL,int bEmitError=TRUE){
4989 10 : return OGR_F_Validate(self, flags, bEmitError);
4990 : }
4991 2 : SWIGINTERN void OGRFeatureShadow_FillUnsetWithDefault(OGRFeatureShadow *self,int bNotNullableOnly=FALSE,char **options=NULL){
4992 2 : OGR_F_FillUnsetWithDefault(self, bNotNullableOnly, options );
4993 2 : }
4994 9 : SWIGINTERN char const *OGRFeatureShadow_GetNativeData(OGRFeatureShadow *self){
4995 9 : return OGR_F_GetNativeData(self);
4996 : }
4997 9 : SWIGINTERN char const *OGRFeatureShadow_GetNativeMediaType(OGRFeatureShadow *self){
4998 9 : return OGR_F_GetNativeMediaType(self);
4999 : }
5000 4 : SWIGINTERN void OGRFeatureShadow_SetNativeData(OGRFeatureShadow *self,char const *nativeData){
5001 4 : OGR_F_SetNativeData(self, nativeData);
5002 4 : }
5003 4 : SWIGINTERN void OGRFeatureShadow_SetNativeMediaType(OGRFeatureShadow *self,char const *nativeMediaType){
5004 4 : OGR_F_SetNativeMediaType(self, nativeMediaType);
5005 4 : }
5006 12544 : SWIGINTERN void OGRFeatureShadow_SetFieldString(OGRFeatureShadow *self,int id,char const *value){
5007 12544 : OGR_F_SetFieldString(self, id, value);
5008 : }
5009 :
5010 182 : static int ValidateOGRGeometryType(OGRwkbGeometryType field_type)
5011 : {
5012 182 : switch(field_type)
5013 : {
5014 : case wkbUnknown:
5015 : case wkbPoint:
5016 : case wkbLineString:
5017 : case wkbPolygon:
5018 : case wkbMultiPoint:
5019 : case wkbMultiLineString:
5020 : case wkbMultiPolygon:
5021 : case wkbGeometryCollection:
5022 : case wkbCircularString:
5023 : case wkbCompoundCurve:
5024 : case wkbCurvePolygon:
5025 : case wkbMultiCurve:
5026 : case wkbMultiSurface:
5027 : case wkbCurve:
5028 : case wkbSurface:
5029 : case wkbTriangle:
5030 : case wkbTIN:
5031 : case wkbPolyhedralSurface:
5032 : case wkbNone:
5033 : /*case wkbLinearRing:*/
5034 : case wkbCircularStringZ:
5035 : case wkbCompoundCurveZ:
5036 : case wkbCurvePolygonZ:
5037 : case wkbMultiCurveZ:
5038 : case wkbMultiSurfaceZ:
5039 : case wkbCurveZ:
5040 : case wkbSurfaceZ:
5041 : case wkbTriangleZ:
5042 : case wkbTINZ:
5043 : case wkbPolyhedralSurfaceZ:
5044 : case wkbPoint25D:
5045 : case wkbLineString25D:
5046 : case wkbPolygon25D:
5047 : case wkbMultiPoint25D:
5048 : case wkbMultiLineString25D:
5049 : case wkbMultiPolygon25D:
5050 : case wkbGeometryCollection25D:
5051 : case wkbPointM:
5052 : case wkbLineStringM:
5053 : case wkbPolygonM:
5054 : case wkbMultiPointM:
5055 : case wkbMultiLineStringM:
5056 : case wkbMultiPolygonM:
5057 : case wkbGeometryCollectionM:
5058 : case wkbCircularStringM:
5059 : case wkbCompoundCurveM:
5060 : case wkbCurvePolygonM:
5061 : case wkbMultiCurveM:
5062 : case wkbMultiSurfaceM:
5063 : case wkbCurveM:
5064 : case wkbSurfaceM:
5065 : case wkbTriangleM:
5066 : case wkbTINM:
5067 : case wkbPolyhedralSurfaceM:
5068 : case wkbPointZM:
5069 : case wkbLineStringZM:
5070 : case wkbPolygonZM:
5071 : case wkbMultiPointZM:
5072 : case wkbMultiLineStringZM:
5073 : case wkbMultiPolygonZM:
5074 : case wkbGeometryCollectionZM:
5075 : case wkbCircularStringZM:
5076 : case wkbCompoundCurveZM:
5077 : case wkbCurvePolygonZM:
5078 : case wkbMultiCurveZM:
5079 : case wkbMultiSurfaceZM:
5080 : case wkbCurveZM:
5081 : case wkbSurfaceZM:
5082 : case wkbTriangleZM:
5083 : case wkbTINZM:
5084 : case wkbPolyhedralSurfaceZM:
5085 : return TRUE;
5086 2 : default:
5087 2 : CPLError(CE_Failure, CPLE_IllegalArg, "Illegal geometry type value");
5088 2 : return FALSE;
5089 : }
5090 : }
5091 :
5092 124487 : SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
5093 : /*OGR_FD_Destroy(self);*/
5094 124487 : OGR_FD_Release( OGRFeatureDefnH(self) );
5095 124487 : }
5096 110 : SWIGINTERN OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name_null_ok=NULL){
5097 220 : OGRFeatureDefnH h = OGR_FD_Create(name_null_ok);
5098 110 : OGR_FD_Reference(h);
5099 110 : return (OGRFeatureDefnShadow* )h;
5100 : }
5101 107 : SWIGINTERN char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
5102 107 : return OGR_FD_GetName(self);
5103 : }
5104 47379 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
5105 47379 : return OGR_FD_GetFieldCount(self);
5106 : }
5107 208907 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
5108 208907 : return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
5109 : }
5110 1734 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *field_name){
5111 : // Do not issue an error if the field doesn't exist. It is intended to be silent
5112 1734 : return OGR_FD_GetFieldIndex(self, field_name);
5113 : }
5114 397 : SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
5115 397 : OGR_FD_AddFieldDefn(self, defn);
5116 397 : }
5117 235 : SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldCount(OGRFeatureDefnShadow *self){
5118 235 : return OGR_FD_GetGeomFieldCount(self);
5119 : }
5120 518 : SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureDefnShadow_GetGeomFieldDefn(OGRFeatureDefnShadow *self,int i){
5121 518 : return (OGRGeomFieldDefnShadow*) OGR_FD_GetGeomFieldDefn(self, i);
5122 : }
5123 37 : SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldIndex(OGRFeatureDefnShadow *self,char const *field_name){
5124 : // Do not issue an error if the field doesn't exist. It is intended to be silent
5125 37 : return OGR_FD_GetGeomFieldIndex(self, field_name);
5126 : }
5127 11 : SWIGINTERN void OGRFeatureDefnShadow_AddGeomFieldDefn(OGRFeatureDefnShadow *self,OGRGeomFieldDefnShadow *defn){
5128 11 : OGR_FD_AddGeomFieldDefn(self, defn);
5129 11 : }
5130 4 : SWIGINTERN OGRErr OGRFeatureDefnShadow_DeleteGeomFieldDefn(OGRFeatureDefnShadow *self,int idx){
5131 4 : return OGR_FD_DeleteGeomFieldDefn(self, idx);
5132 : }
5133 91 : SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
5134 91 : return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
5135 : }
5136 12 : SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
5137 12 : if( ValidateOGRGeometryType(geom_type) )
5138 11 : OGR_FD_SetGeomType(self, geom_type);
5139 12 : }
5140 3 : SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
5141 3 : return OGR_FD_GetReferenceCount(self);
5142 : }
5143 6 : SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
5144 6 : return OGR_FD_IsGeometryIgnored(self);
5145 : }
5146 3 : SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
5147 3 : return OGR_FD_SetGeometryIgnored(self,bIgnored);
5148 : }
5149 2 : SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
5150 2 : return OGR_FD_IsStyleIgnored(self);
5151 : }
5152 0 : SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
5153 0 : return OGR_FD_SetStyleIgnored(self,bIgnored);
5154 : }
5155 11 : SWIGINTERN int OGRFeatureDefnShadow_IsSame(OGRFeatureDefnShadow *self,OGRFeatureDefnShadow *other_defn){
5156 11 : return OGR_FD_IsSame(self, other_defn);
5157 : }
5158 :
5159 75751 : static int ValidateOGRFieldType(OGRFieldType field_type)
5160 : {
5161 75751 : switch(field_type)
5162 : {
5163 : case OFTInteger:
5164 : case OFTIntegerList:
5165 : case OFTReal:
5166 : case OFTRealList:
5167 : case OFTString:
5168 : case OFTStringList:
5169 : case OFTBinary:
5170 : case OFTDate:
5171 : case OFTTime:
5172 : case OFTDateTime:
5173 : case OFTInteger64:
5174 : case OFTInteger64List:
5175 : return TRUE;
5176 0 : default:
5177 0 : CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
5178 0 : return FALSE;
5179 : }
5180 : }
5181 :
5182 :
5183 550 : static int ValidateOGRFieldSubType(OGRFieldSubType field_subtype)
5184 : {
5185 550 : switch(field_subtype)
5186 : {
5187 : case OFSTNone:
5188 : case OFSTBoolean:
5189 : case OFSTInt16:
5190 : case OFSTFloat32:
5191 : case OFSTJSON:
5192 : case OFSTUUID:
5193 : return TRUE;
5194 0 : default:
5195 0 : CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field subtype value");
5196 0 : return FALSE;
5197 : }
5198 : }
5199 :
5200 75738 : SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
5201 75738 : OGR_Fld_Destroy(self);
5202 75738 : }
5203 75751 : SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
5204 75751 : if (ValidateOGRFieldType(field_type))
5205 75751 : return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
5206 : else
5207 0 : return NULL;
5208 : }
5209 199920 : SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
5210 199920 : return (const char *) OGR_Fld_GetNameRef(self);
5211 : }
5212 1537 : SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
5213 1537 : return (const char *) OGR_Fld_GetNameRef(self);
5214 : }
5215 2 : SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
5216 2 : OGR_Fld_SetName(self, name);
5217 2 : }
5218 50 : SWIGINTERN char const *OGRFieldDefnShadow_GetAlternativeName(OGRFieldDefnShadow *self){
5219 50 : return OGR_Fld_GetAlternativeNameRef(self);
5220 : }
5221 9 : SWIGINTERN char const *OGRFieldDefnShadow_GetAlternativeNameRef(OGRFieldDefnShadow *self){
5222 9 : return OGR_Fld_GetAlternativeNameRef(self);
5223 : }
5224 19 : SWIGINTERN void OGRFieldDefnShadow_SetAlternativeName(OGRFieldDefnShadow *self,char const *alternativeName){
5225 19 : OGR_Fld_SetAlternativeName(self, alternativeName);
5226 19 : }
5227 3711 : SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
5228 3711 : return OGR_Fld_GetType(self);
5229 : }
5230 0 : SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
5231 0 : if (ValidateOGRFieldType(type))
5232 0 : OGR_Fld_SetType(self, type);
5233 0 : }
5234 88252 : SWIGINTERN OGRFieldSubType OGRFieldDefnShadow_GetSubType(OGRFieldDefnShadow *self){
5235 88252 : return OGR_Fld_GetSubType(self);
5236 : }
5237 550 : SWIGINTERN void OGRFieldDefnShadow_SetSubType(OGRFieldDefnShadow *self,OGRFieldSubType type){
5238 550 : if (ValidateOGRFieldSubType(type))
5239 550 : OGR_Fld_SetSubType(self, type);
5240 550 : }
5241 0 : SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
5242 0 : return OGR_Fld_GetJustify(self);
5243 : }
5244 0 : SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
5245 0 : OGR_Fld_SetJustify(self, justify);
5246 0 : }
5247 2559 : SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
5248 2559 : return OGR_Fld_GetWidth(self);
5249 : }
5250 314 : SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
5251 314 : OGR_Fld_SetWidth(self, width);
5252 314 : }
5253 1438 : SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
5254 1438 : return OGR_Fld_GetPrecision(self);
5255 : }
5256 24 : SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
5257 24 : OGR_Fld_SetPrecision(self, precision);
5258 24 : }
5259 0 : SWIGINTERN int OGRFieldDefnShadow_GetTZFlag(OGRFieldDefnShadow *self){
5260 0 : return OGR_Fld_GetTZFlag(self);
5261 : }
5262 6 : SWIGINTERN void OGRFieldDefnShadow_SetTZFlag(OGRFieldDefnShadow *self,int tzflag){
5263 6 : OGR_Fld_SetTZFlag(self, tzflag);
5264 6 : }
5265 13 : SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
5266 13 : return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
5267 : }
5268 36 : SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
5269 36 : return OGR_GetFieldTypeName(type);
5270 : }
5271 6 : SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
5272 6 : return OGR_Fld_IsIgnored( self );
5273 : }
5274 0 : SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
5275 0 : OGR_Fld_SetIgnored( self, bIgnored );
5276 0 : }
5277 80 : SWIGINTERN int OGRFieldDefnShadow_IsNullable(OGRFieldDefnShadow *self){
5278 80 : return OGR_Fld_IsNullable( self );
5279 : }
5280 190 : SWIGINTERN void OGRFieldDefnShadow_SetNullable(OGRFieldDefnShadow *self,int bNullable){
5281 190 : OGR_Fld_SetNullable( self, bNullable );
5282 190 : }
5283 78 : SWIGINTERN int OGRFieldDefnShadow_IsUnique(OGRFieldDefnShadow *self){
5284 78 : return OGR_Fld_IsUnique( self );
5285 : }
5286 28 : SWIGINTERN void OGRFieldDefnShadow_SetUnique(OGRFieldDefnShadow *self,int bUnique){
5287 28 : OGR_Fld_SetUnique( self, bUnique );
5288 28 : }
5289 141 : SWIGINTERN char const *OGRFieldDefnShadow_GetDefault(OGRFieldDefnShadow *self){
5290 141 : return OGR_Fld_GetDefault( self );
5291 : }
5292 154 : SWIGINTERN void OGRFieldDefnShadow_SetDefault(OGRFieldDefnShadow *self,char const *pszValue){
5293 154 : OGR_Fld_SetDefault( self, pszValue );
5294 154 : }
5295 3 : SWIGINTERN int OGRFieldDefnShadow_IsDefaultDriverSpecific(OGRFieldDefnShadow *self){
5296 3 : return OGR_Fld_IsDefaultDriverSpecific( self );
5297 : }
5298 34 : SWIGINTERN char const *OGRFieldDefnShadow_GetDomainName(OGRFieldDefnShadow *self){
5299 34 : return OGR_Fld_GetDomainName(self);
5300 : }
5301 21 : SWIGINTERN void OGRFieldDefnShadow_SetDomainName(OGRFieldDefnShadow *self,char const *name){
5302 21 : OGR_Fld_SetDomainName( self, name );
5303 21 : }
5304 58 : SWIGINTERN char const *OGRFieldDefnShadow_GetComment(OGRFieldDefnShadow *self){
5305 58 : return OGR_Fld_GetComment(self);
5306 : }
5307 31 : SWIGINTERN void OGRFieldDefnShadow_SetComment(OGRFieldDefnShadow *self,char const *comment){
5308 31 : OGR_Fld_SetComment( self, comment );
5309 31 : }
5310 168 : SWIGINTERN void delete_OGRGeomFieldDefnShadow(OGRGeomFieldDefnShadow *self){
5311 168 : OGR_GFld_Destroy(self);
5312 168 : }
5313 168 : SWIGINTERN OGRGeomFieldDefnShadow *new_OGRGeomFieldDefnShadow(char const *name_null_ok="",OGRwkbGeometryType field_type=wkbUnknown){
5314 168 : if( ValidateOGRGeometryType(field_type) )
5315 168 : return (OGRGeomFieldDefnShadow*) OGR_GFld_Create(name_null_ok, field_type);
5316 : else
5317 : return NULL;
5318 : }
5319 170 : SWIGINTERN char const *OGRGeomFieldDefnShadow_GetName(OGRGeomFieldDefnShadow *self){
5320 170 : return (const char *) OGR_GFld_GetNameRef(self);
5321 : }
5322 82 : SWIGINTERN char const *OGRGeomFieldDefnShadow_GetNameRef(OGRGeomFieldDefnShadow *self){
5323 82 : return (const char *) OGR_GFld_GetNameRef(self);
5324 : }
5325 4 : SWIGINTERN void OGRGeomFieldDefnShadow_SetName(OGRGeomFieldDefnShadow *self,char const *name){
5326 4 : OGR_GFld_SetName(self, name);
5327 4 : }
5328 85 : SWIGINTERN OGRwkbGeometryType OGRGeomFieldDefnShadow_GetType(OGRGeomFieldDefnShadow *self){
5329 85 : return OGR_GFld_GetType(self);
5330 : }
5331 2 : SWIGINTERN void OGRGeomFieldDefnShadow_SetType(OGRGeomFieldDefnShadow *self,OGRwkbGeometryType type){
5332 2 : if( ValidateOGRGeometryType(type) )
5333 1 : OGR_GFld_SetType(self, type);
5334 2 : }
5335 79 : SWIGINTERN OSRSpatialReferenceShadow *OGRGeomFieldDefnShadow_GetSpatialRef(OGRGeomFieldDefnShadow *self){
5336 158 : OGRSpatialReferenceH ref = OGR_GFld_GetSpatialRef(self);
5337 79 : if( ref )
5338 68 : OSRReference(ref);
5339 79 : return (OSRSpatialReferenceShadow*) ref;
5340 : }
5341 46 : SWIGINTERN void OGRGeomFieldDefnShadow_SetSpatialRef(OGRGeomFieldDefnShadow *self,OSRSpatialReferenceShadow *srs){
5342 46 : OGR_GFld_SetSpatialRef( self, (OGRSpatialReferenceH)srs );
5343 46 : }
5344 6 : SWIGINTERN int OGRGeomFieldDefnShadow_IsIgnored(OGRGeomFieldDefnShadow *self){
5345 6 : return OGR_GFld_IsIgnored( self );
5346 : }
5347 1 : SWIGINTERN void OGRGeomFieldDefnShadow_SetIgnored(OGRGeomFieldDefnShadow *self,int bIgnored){
5348 1 : OGR_GFld_SetIgnored( self, bIgnored );
5349 1 : }
5350 85 : SWIGINTERN int OGRGeomFieldDefnShadow_IsNullable(OGRGeomFieldDefnShadow *self){
5351 85 : return OGR_GFld_IsNullable( self );
5352 : }
5353 23 : SWIGINTERN void OGRGeomFieldDefnShadow_SetNullable(OGRGeomFieldDefnShadow *self,int bNullable){
5354 23 : return OGR_GFld_SetNullable( self, bNullable );
5355 : }
5356 44 : SWIGINTERN OGRGeomCoordinatePrecisionShadow *OGRGeomFieldDefnShadow_GetCoordinatePrecision(OGRGeomFieldDefnShadow *self){
5357 44 : return OGR_GFld_GetCoordinatePrecision(self);
5358 : }
5359 19 : SWIGINTERN void OGRGeomFieldDefnShadow_SetCoordinatePrecision(OGRGeomFieldDefnShadow *self,OGRGeomCoordinatePrecisionShadow *coordPrec){
5360 19 : OGR_GFld_SetCoordinatePrecision(self, coordPrec);
5361 19 : }
5362 :
5363 31028 : OGRGeometryShadow* CreateGeometryFromWkb( size_t len, char *bin_string,
5364 : OSRSpatialReferenceShadow *reference=NULL ) {
5365 31028 : OGRGeometryH geom = NULL;
5366 31028 : OGRErr err = OGR_G_CreateFromWkbEx( (unsigned char *) bin_string,
5367 : reference,
5368 : &geom,
5369 : len );
5370 31028 : if (err != 0 ) {
5371 5472 : CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
5372 5472 : return NULL;
5373 : }
5374 25556 : return (OGRGeometryShadow*) geom;
5375 : }
5376 :
5377 :
5378 :
5379 : static bool
5380 31028 : GetBufferAsCharPtrSizetSize( PyObject* input, size_t *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
5381 31028 : {
5382 31028 : if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
5383 : {
5384 31021 : *viewIsValid = true;
5385 31021 : *nLen = view->len;
5386 31021 : *pBuf = (char*) view->buf;
5387 31021 : return true;
5388 : }
5389 : else
5390 : {
5391 7 : PyErr_Clear();
5392 : }
5393 : }
5394 7 : if (PyUnicode_Check(input))
5395 : {
5396 7 : size_t safeLen = 0;
5397 7 : int ret;
5398 7 : try {
5399 7 : ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
5400 : }
5401 0 : catch( const std::exception& )
5402 : {
5403 0 : PyErr_SetString(PyExc_MemoryError, "out of memory");
5404 0 : return false;
5405 : }
5406 7 : if (!SWIG_IsOK(ret)) {
5407 0 : PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
5408 0 : return false;
5409 : }
5410 :
5411 7 : if (safeLen) safeLen--;
5412 7 : *nLen = safeLen;
5413 7 : return true;
5414 : }
5415 : else
5416 : {
5417 0 : PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
5418 0 : return false;
5419 : }
5420 : }
5421 :
5422 :
5423 : SWIGINTERN int
5424 : SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
5425 : {
5426 : #if PY_VERSION_HEX < 0x03000000
5427 : if (PyInt_Check(obj)) {
5428 : long v = PyInt_AsLong(obj);
5429 : if (v >= 0) {
5430 : if (val) *val = v;
5431 : return SWIG_OK;
5432 : } else {
5433 : return SWIG_OverflowError;
5434 : }
5435 : } else
5436 : #endif
5437 : if (PyLong_Check(obj)) {
5438 : unsigned long v = PyLong_AsUnsignedLong(obj);
5439 : if (!PyErr_Occurred()) {
5440 : if (val) *val = v;
5441 : return SWIG_OK;
5442 : } else {
5443 : PyErr_Clear();
5444 : return SWIG_OverflowError;
5445 : }
5446 : }
5447 : #ifdef SWIG_PYTHON_CAST_MODE
5448 : {
5449 : int dispatch = 0;
5450 : unsigned long v = PyLong_AsUnsignedLong(obj);
5451 : if (!PyErr_Occurred()) {
5452 : if (val) *val = v;
5453 : return SWIG_AddCast(SWIG_OK);
5454 : } else {
5455 : PyErr_Clear();
5456 : }
5457 : if (!dispatch) {
5458 : double d;
5459 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
5460 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
5461 : if (val) *val = (unsigned long)(d);
5462 : return res;
5463 : }
5464 : }
5465 : }
5466 : #endif
5467 : return SWIG_TypeError;
5468 : }
5469 :
5470 :
5471 : #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
5472 : # define SWIG_LONG_LONG_AVAILABLE
5473 : #endif
5474 :
5475 :
5476 : #ifdef SWIG_LONG_LONG_AVAILABLE
5477 : SWIGINTERN int
5478 : SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
5479 : {
5480 : int res = SWIG_TypeError;
5481 : if (PyLong_Check(obj)) {
5482 : unsigned long long v = PyLong_AsUnsignedLongLong(obj);
5483 : if (!PyErr_Occurred()) {
5484 : if (val) *val = v;
5485 : return SWIG_OK;
5486 : } else {
5487 : PyErr_Clear();
5488 : res = SWIG_OverflowError;
5489 : }
5490 : } else {
5491 : unsigned long v;
5492 : res = SWIG_AsVal_unsigned_SS_long (obj,&v);
5493 : if (SWIG_IsOK(res)) {
5494 : if (val) *val = v;
5495 : return res;
5496 : }
5497 : }
5498 : #ifdef SWIG_PYTHON_CAST_MODE
5499 : {
5500 : const double mant_max = 1LL << DBL_MANT_DIG;
5501 : double d;
5502 : res = SWIG_AsVal_double (obj,&d);
5503 : if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
5504 : return SWIG_OverflowError;
5505 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
5506 : if (val) *val = (unsigned long long)(d);
5507 : return SWIG_AddCast(res);
5508 : }
5509 : res = SWIG_TypeError;
5510 : }
5511 : #endif
5512 : return res;
5513 : }
5514 : #endif
5515 :
5516 :
5517 : SWIGINTERNINLINE int
5518 : SWIG_AsVal_size_t (PyObject * obj, size_t *val)
5519 : {
5520 : int res = SWIG_TypeError;
5521 : #ifdef SWIG_LONG_LONG_AVAILABLE
5522 : if (sizeof(size_t) <= sizeof(unsigned long)) {
5523 : #endif
5524 : unsigned long v;
5525 : res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
5526 : if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
5527 : #ifdef SWIG_LONG_LONG_AVAILABLE
5528 : } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
5529 : unsigned long long v;
5530 : res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
5531 : if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
5532 : }
5533 : #endif
5534 : return res;
5535 : }
5536 :
5537 :
5538 115849 : OGRGeometryShadow* CreateGeometryFromWkt( char **val,
5539 : OSRSpatialReferenceShadow *reference=NULL ) {
5540 115849 : OGRGeometryH geom = NULL;
5541 115849 : OGRErr err = OGR_G_CreateFromWkt(val,
5542 : reference,
5543 : &geom);
5544 115849 : if (err != 0 ) {
5545 236 : CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
5546 236 : return NULL;
5547 : }
5548 115613 : return (OGRGeometryShadow*) geom;
5549 : }
5550 :
5551 :
5552 :
5553 273 : OGRGeometryShadow *CreateGeometryFromGML( const char * input_string ) {
5554 273 : OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateFromGML(input_string);
5555 273 : return geom;
5556 : }
5557 :
5558 :
5559 :
5560 42 : OGRGeometryShadow *CreateGeometryFromJson( const char * input_string ) {
5561 42 : OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromJson(input_string);
5562 42 : return geom;
5563 : }
5564 :
5565 :
5566 :
5567 2 : OGRGeometryShadow *CreateGeometryFromEsriJson( const char * input_string ) {
5568 2 : OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromEsriJson(input_string);
5569 2 : return geom;
5570 : }
5571 :
5572 :
5573 :
5574 5 : OGRGeometryShadow* BuildPolygonFromEdges( OGRGeometryShadow* hLineCollection,
5575 : int bBestEffort = 0,
5576 : int bAutoClose = 0,
5577 : double dfTolerance=0) {
5578 :
5579 5 : OGRGeometryH hPolygon = NULL;
5580 :
5581 5 : OGRErr eErr;
5582 :
5583 5 : hPolygon = OGRBuildPolygonFromEdges( hLineCollection, bBestEffort,
5584 : bAutoClose, dfTolerance, &eErr );
5585 :
5586 5 : if (eErr != OGRERR_NONE ) {
5587 2 : CPLError(CE_Failure, eErr, "%s", OGRErrMessages(eErr));
5588 2 : return NULL;
5589 : }
5590 :
5591 : return (OGRGeometryShadow* )hPolygon;
5592 : }
5593 :
5594 :
5595 1 : OGRGeometryShadow* ApproximateArcAngles(
5596 : double dfCenterX, double dfCenterY, double dfZ,
5597 : double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation,
5598 : double dfStartAngle, double dfEndAngle,
5599 : double dfMaxAngleStepSizeDegrees ) {
5600 :
5601 1 : return (OGRGeometryShadow* )OGR_G_ApproximateArcAngles(
5602 : dfCenterX, dfCenterY, dfZ,
5603 : dfPrimaryRadius, dfSecondaryAxis, dfRotation,
5604 1 : dfStartAngle, dfEndAngle, dfMaxAngleStepSizeDegrees );
5605 : }
5606 :
5607 :
5608 46 : OGRGeometryShadow* ForceToPolygon( OGRGeometryShadow *geom_in ) {
5609 46 : if (geom_in == NULL)
5610 : return NULL;
5611 45 : return (OGRGeometryShadow* )OGR_G_ForceToPolygon( OGR_G_Clone(geom_in) );
5612 : }
5613 :
5614 :
5615 58 : OGRGeometryShadow* ForceToLineString( OGRGeometryShadow *geom_in ) {
5616 58 : if (geom_in == NULL)
5617 : return NULL;
5618 57 : return (OGRGeometryShadow* )OGR_G_ForceToLineString( OGR_G_Clone(geom_in) );
5619 : }
5620 :
5621 :
5622 47 : OGRGeometryShadow* ForceToMultiPolygon( OGRGeometryShadow *geom_in ) {
5623 47 : if (geom_in == NULL)
5624 : return NULL;
5625 46 : return (OGRGeometryShadow* )OGR_G_ForceToMultiPolygon( OGR_G_Clone(geom_in) );
5626 : }
5627 :
5628 :
5629 42 : OGRGeometryShadow* ForceToMultiPoint( OGRGeometryShadow *geom_in ) {
5630 42 : if (geom_in == NULL)
5631 : return NULL;
5632 41 : return (OGRGeometryShadow* )OGR_G_ForceToMultiPoint( OGR_G_Clone(geom_in) );
5633 : }
5634 :
5635 :
5636 50 : OGRGeometryShadow* ForceToMultiLineString( OGRGeometryShadow *geom_in ) {
5637 50 : if (geom_in == NULL)
5638 : return NULL;
5639 49 : return (OGRGeometryShadow* )OGR_G_ForceToMultiLineString( OGR_G_Clone(geom_in) );
5640 : }
5641 :
5642 :
5643 831 : OGRGeometryShadow* ForceTo( OGRGeometryShadow *geom_in, OGRwkbGeometryType eTargetType, char** options = NULL ) {
5644 831 : if (geom_in == NULL)
5645 : return NULL;
5646 819 : return (OGRGeometryShadow* )OGR_G_ForceTo( OGR_G_Clone(geom_in), eTargetType, options );
5647 : }
5648 :
5649 287806 : SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){
5650 287806 : OGR_G_DestroyGeometry( self );
5651 287806 : }
5652 160788 : SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow(OGRwkbGeometryType type=wkbUnknown,char *wkt=0,int wkb=0,char *wkb_buf=0,char *gml=0){
5653 160788 : if (type != wkbUnknown ) {
5654 160625 : return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
5655 : }
5656 163 : else if ( wkt != 0 ) {
5657 162 : return CreateGeometryFromWkt( &wkt );
5658 : }
5659 1 : else if ( wkb != 0 ) {
5660 0 : return CreateGeometryFromWkb( wkb, wkb_buf );
5661 : }
5662 1 : else if ( gml != 0 ) {
5663 0 : return CreateGeometryFromGML( gml );
5664 : }
5665 : // throw?
5666 : else {
5667 1 : CPLError(CE_Failure, 1, "Empty geometries cannot be constructed");
5668 1 : return NULL;}
5669 :
5670 : }
5671 :
5672 : #define t_output_helper SWIG_Python_AppendOutput
5673 :
5674 2425 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
5675 2425 : return OGR_G_ExportToWkt(self, argout);
5676 : }
5677 5178 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkt(OGRGeometryShadow *self,char **argout){
5678 5178 : return OGR_G_ExportToIsoWkt(self, argout);
5679 : }
5680 101 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,size_t *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbNDR){
5681 101 : *nLen = OGR_G_WkbSizeEx( self );
5682 101 : *pBuf = (char *) VSI_MALLOC_VERBOSE( *nLen );
5683 101 : if( *pBuf == NULL )
5684 : return 6;
5685 101 : return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
5686 : }
5687 10570 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkb(OGRGeometryShadow *self,size_t *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbNDR){
5688 10570 : *nLen = OGR_G_WkbSizeEx( self );
5689 10570 : *pBuf = (char *) VSI_MALLOC_VERBOSE( *nLen );
5690 10570 : if( *pBuf == NULL )
5691 : return 6;
5692 10570 : return OGR_G_ExportToIsoWkb(self, byte_order, (unsigned char*) *pBuf );
5693 : }
5694 66 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self,char **options=0){
5695 66 : return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
5696 : }
5697 0 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
5698 0 : return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
5699 : }
5700 88 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self,char **options=0){
5701 88 : return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
5702 : }
5703 254 : SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
5704 254 : OGR_G_AddPoint( self, x, y, z );
5705 254 : }
5706 0 : SWIGINTERN void OGRGeometryShadow_AddPointM(OGRGeometryShadow *self,double x,double y,double m){
5707 0 : OGR_G_AddPointM( self, x, y, m );
5708 0 : }
5709 0 : SWIGINTERN void OGRGeometryShadow_AddPointZM(OGRGeometryShadow *self,double x,double y,double z,double m){
5710 0 : OGR_G_AddPointZM( self, x, y, z, m );
5711 0 : }
5712 1259 : SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
5713 1259 : OGR_G_AddPoint_2D( self, x, y );
5714 1259 : }
5715 9 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
5716 9 : return OGR_G_AddGeometryDirectly( self, other_disown );
5717 : }
5718 105 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
5719 105 : return OGR_G_AddGeometry( self, other );
5720 : }
5721 59 : SWIGINTERN OGRErr OGRGeometryShadow_RemoveGeometry(OGRGeometryShadow *self,int iSubGeom){
5722 59 : return OGR_G_RemoveGeometry( self, iSubGeom, TRUE );
5723 : }
5724 12417 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
5725 12417 : return (OGRGeometryShadow*) OGR_G_Clone(self);
5726 : }
5727 3177 : SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
5728 3177 : return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
5729 : }
5730 13641 : SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
5731 13641 : return (const char *) OGR_G_GetGeometryName(self);
5732 : }
5733 27 : SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
5734 27 : return OGR_G_Length(self);
5735 : }
5736 21 : SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
5737 21 : return OGR_G_Area(self);
5738 : }
5739 24 : SWIGINTERN double OGRGeometryShadow_GeodesicArea(OGRGeometryShadow *self){
5740 24 : return OGR_G_GeodesicArea(self);
5741 : }
5742 33 : SWIGINTERN bool OGRGeometryShadow_IsClockwise(OGRGeometryShadow *self){
5743 33 : return OGR_G_IsClockwise(self);
5744 : }
5745 1384 : SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
5746 1384 : return OGR_G_Area(self);
5747 : }
5748 11321 : SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
5749 11321 : return OGR_G_GetPointCount(self);
5750 : }
5751 11 : SWIGINTERN void OGRGeometryShadow_GetPoints(OGRGeometryShadow *self,int *pnCount,double **ppadfXY,double **ppadfZ,int nCoordDimension=0){
5752 11 : int nPoints = OGR_G_GetPointCount(self);
5753 11 : *pnCount = nPoints;
5754 11 : if (nPoints == 0)
5755 : {
5756 1 : *ppadfXY = NULL;
5757 1 : *ppadfZ = NULL;
5758 : }
5759 11 : *ppadfXY = (double*)VSIMalloc(2 * sizeof(double) * nPoints);
5760 11 : if (*ppadfXY == NULL)
5761 : {
5762 0 : CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate resulting array");
5763 0 : *pnCount = 0;
5764 0 : return;
5765 : }
5766 11 : if (nCoordDimension <= 0)
5767 7 : nCoordDimension = OGR_G_GetCoordinateDimension(self);
5768 11 : *ppadfZ = (nCoordDimension == 3) ? (double*)VSIMalloc(sizeof(double) * nPoints) : NULL;
5769 11 : OGR_G_GetPoints(self,
5770 : *ppadfXY, 2 * sizeof(double),
5771 11 : (*ppadfXY) + 1, 2 * sizeof(double),
5772 : *ppadfZ, sizeof(double));
5773 : }
5774 30960 : SWIGINTERN double OGRGeometryShadow_GetX(OGRGeometryShadow *self,int point=0){
5775 30960 : return OGR_G_GetX(self, point);
5776 : }
5777 29750 : SWIGINTERN double OGRGeometryShadow_GetY(OGRGeometryShadow *self,int point=0){
5778 29750 : return OGR_G_GetY(self, point);
5779 : }
5780 12560 : SWIGINTERN double OGRGeometryShadow_GetZ(OGRGeometryShadow *self,int point=0){
5781 12560 : return OGR_G_GetZ(self, point);
5782 : }
5783 2254 : SWIGINTERN double OGRGeometryShadow_GetM(OGRGeometryShadow *self,int point=0){
5784 2254 : return OGR_G_GetM(self, point);
5785 : }
5786 :
5787 : static PyObject *
5788 13704 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
5789 13704 : PyObject *out = PyTuple_New( size );
5790 68431 : for( unsigned int i=0; i<size; i++ ) {
5791 54727 : PyObject *val = PyFloat_FromDouble( *first );
5792 54727 : ++first;
5793 54727 : PyTuple_SetItem( out, i, val );
5794 : }
5795 13704 : return out;
5796 : }
5797 :
5798 217 : SWIGINTERN void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint=0,double argout[3]=NULL){
5799 :
5800 217 : OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
5801 217 : }
5802 1 : SWIGINTERN void OGRGeometryShadow_GetPointZM(OGRGeometryShadow *self,int iPoint=0,double argout[4]=NULL){
5803 :
5804 1 : OGR_G_GetPointZM( self, iPoint, argout+0, argout+1, argout+2, argout+3 );
5805 1 : }
5806 3 : SWIGINTERN void OGRGeometryShadow_GetPoint_2D(OGRGeometryShadow *self,int iPoint=0,double argout[2]=NULL){
5807 :
5808 3 : OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
5809 3 : }
5810 10188 : SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
5811 10188 : return OGR_G_GetGeometryCount(self);
5812 : }
5813 168 : SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
5814 168 : OGR_G_SetPoint(self, point, x, y, z);
5815 168 : }
5816 0 : SWIGINTERN void OGRGeometryShadow_SetPointM(OGRGeometryShadow *self,int point,double x,double y,double m){
5817 0 : OGR_G_SetPointM(self, point, x, y, m);
5818 0 : }
5819 0 : SWIGINTERN void OGRGeometryShadow_SetPointZM(OGRGeometryShadow *self,int point,double x,double y,double z,double m){
5820 0 : OGR_G_SetPointZM(self, point, x, y, z, m);
5821 0 : }
5822 160060 : SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
5823 160060 : OGR_G_SetPoint_2D(self, point, x, y);
5824 160060 : }
5825 2 : SWIGINTERN void OGRGeometryShadow_SwapXY(OGRGeometryShadow *self){
5826 2 : OGR_G_SwapXY(self);
5827 2 : }
5828 2700 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
5829 2700 : return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
5830 : }
5831 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
5832 1 : return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
5833 : }
5834 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SimplifyPreserveTopology(OGRGeometryShadow *self,double tolerance){
5835 1 : return (OGRGeometryShadow*) OGR_G_SimplifyPreserveTopology(self, tolerance);
5836 : }
5837 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_DelaunayTriangulation(OGRGeometryShadow *self,double dfTolerance=0.0,int bOnlyEdges=FALSE){
5838 1 : return (OGRGeometryShadow*) OGR_G_DelaunayTriangulation(self, dfTolerance, bOnlyEdges);
5839 : }
5840 3 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Polygonize(OGRGeometryShadow *self){
5841 3 : return (OGRGeometryShadow*) OGR_G_Polygonize(self);
5842 : }
5843 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Boundary(OGRGeometryShadow *self){
5844 1 : return (OGRGeometryShadow*) OGR_G_Boundary(self);
5845 : }
5846 5 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
5847 5 : return (OGRGeometryShadow*) OGR_G_Boundary(self);
5848 : }
5849 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
5850 1 : return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
5851 : }
5852 2 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConcaveHull(OGRGeometryShadow *self,double ratio,bool allowHoles){
5853 2 : return (OGRGeometryShadow*) OGR_G_ConcaveHull(self, ratio, allowHoles);
5854 : }
5855 7 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_MakeValid(OGRGeometryShadow *self,char **options=NULL){
5856 7 : return (OGRGeometryShadow*) OGR_G_MakeValidEx(self, options);
5857 : }
5858 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SetPrecision(OGRGeometryShadow *self,double gridSize,int flags=0){
5859 1 : return (OGRGeometryShadow*) OGR_G_SetPrecision(self, gridSize, flags);
5860 : }
5861 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Normalize(OGRGeometryShadow *self){
5862 1 : return (OGRGeometryShadow*) OGR_G_Normalize(self);
5863 : }
5864 18 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_RemoveLowerDimensionSubGeoms(OGRGeometryShadow *self){
5865 18 : return (OGRGeometryShadow*) OGR_G_RemoveLowerDimensionSubGeoms(self);
5866 : }
5867 3 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
5868 3 : return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
5869 : }
5870 11 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
5871 11 : return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
5872 : }
5873 7 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
5874 7 : return (OGRGeometryShadow*) OGR_G_Union( self, other );
5875 : }
5876 2 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
5877 2 : return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
5878 : }
5879 2 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnaryUnion(OGRGeometryShadow *self){
5880 2 : return (OGRGeometryShadow*) OGR_G_UnaryUnion( self );
5881 : }
5882 5 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
5883 5 : return (OGRGeometryShadow*) OGR_G_Difference( self, other );
5884 : }
5885 5 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
5886 5 : return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
5887 : }
5888 1 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
5889 1 : return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
5890 : }
5891 1 : SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
5892 1 : return OGR_G_Distance(self, other);
5893 : }
5894 1 : SWIGINTERN double OGRGeometryShadow_Distance3D(OGRGeometryShadow *self,OGRGeometryShadow *other){
5895 1 : return OGR_G_Distance3D(self, other);
5896 : }
5897 4 : SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
5898 4 : OGR_G_Empty(self);
5899 4 : }
5900 1930 : SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
5901 3860 : return (OGR_G_IsEmpty(self) > 0);
5902 : }
5903 19 : SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
5904 38 : return (OGR_G_IsValid(self) > 0);
5905 : }
5906 5 : SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
5907 10 : return (OGR_G_IsSimple(self) > 0);
5908 : }
5909 1 : SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
5910 2 : return (OGR_G_IsRing(self) > 0);
5911 : }
5912 7 : SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
5913 14 : return (OGR_G_Intersects(self, other) > 0);
5914 : }
5915 2 : SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
5916 4 : return (OGR_G_Intersects(self, other) > 0);
5917 : }
5918 28011 : SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
5919 56022 : return (OGR_G_Equals(self, other) > 0);
5920 : }
5921 170 : SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
5922 340 : return (OGR_G_Equals(self, other) > 0);
5923 : }
5924 6 : SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
5925 12 : return (OGR_G_Disjoint(self, other) > 0);
5926 : }
5927 6 : SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
5928 12 : return (OGR_G_Touches(self, other) > 0);
5929 : }
5930 6 : SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
5931 12 : return (OGR_G_Crosses(self, other) > 0);
5932 : }
5933 5132 : SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
5934 10264 : return (OGR_G_Within(self, other) > 0);
5935 : }
5936 9 : SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
5937 18 : return (OGR_G_Contains(self, other) > 0);
5938 : }
5939 6 : SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
5940 12 : return (OGR_G_Overlaps(self, other) > 0);
5941 : }
5942 4 : SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
5943 4 : return OGR_G_TransformTo(self, reference);
5944 : }
5945 : SWIGINTERN OGRErr OGRGeometryShadow_Transform__SWIG_0(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
5946 : return OGR_G_Transform(self, trans);
5947 : }
5948 47 : SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
5949 94 : OGRSpatialReferenceH ref = OGR_G_GetSpatialReference(self);
5950 47 : if( ref )
5951 46 : OSRReference(ref);
5952 47 : return (OSRSpatialReferenceShadow*) ref;
5953 : }
5954 48 : SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
5955 48 : OGR_G_AssignSpatialReference(self, reference);
5956 48 : }
5957 6 : SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
5958 6 : OGR_G_CloseRings(self);
5959 6 : }
5960 31 : SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
5961 31 : OGR_G_FlattenTo2D(self);
5962 31 : }
5963 21 : SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
5964 21 : OGR_G_Segmentize(self, dfMaxLength);
5965 21 : }
5966 13070 : SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
5967 13070 : OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
5968 13070 : }
5969 10 : SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
5970 10 : OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
5971 10 : }
5972 4 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
5973 8 : OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
5974 4 : OGR_G_Centroid( self, pt );
5975 4 : return pt;
5976 : }
5977 4 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){
5978 4 : return (OGRGeometryShadow*) OGR_G_PointOnSurface( self );
5979 : }
5980 2 : SWIGINTERN size_t OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
5981 2 : return OGR_G_WkbSizeEx(self);
5982 : }
5983 :
5984 : #define SWIG_From_long PyInt_FromLong
5985 :
5986 :
5987 : SWIGINTERNINLINE PyObject*
5988 2 : SWIG_From_unsigned_SS_long (unsigned long value)
5989 : {
5990 2 : return (value > LONG_MAX) ?
5991 2 : PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
5992 : }
5993 :
5994 :
5995 : #ifdef SWIG_LONG_LONG_AVAILABLE
5996 : SWIGINTERNINLINE PyObject*
5997 : SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
5998 : {
5999 : return (value > LONG_MAX) ?
6000 : PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
6001 : }
6002 : #endif
6003 :
6004 :
6005 : SWIGINTERNINLINE PyObject *
6006 2 : SWIG_From_size_t (size_t value)
6007 : {
6008 : #ifdef SWIG_LONG_LONG_AVAILABLE
6009 2 : if (sizeof(size_t) <= sizeof(unsigned long)) {
6010 : #endif
6011 2 : return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
6012 : #ifdef SWIG_LONG_LONG_AVAILABLE
6013 : } else {
6014 : /* assume sizeof(size_t) <= sizeof(unsigned long long) */
6015 : return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value));
6016 : }
6017 : #endif
6018 : }
6019 :
6020 77 : SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
6021 77 : return OGR_G_GetCoordinateDimension(self);
6022 : }
6023 4 : SWIGINTERN int OGRGeometryShadow_CoordinateDimension(OGRGeometryShadow *self){
6024 4 : return OGR_G_CoordinateDimension(self);
6025 : }
6026 32434 : SWIGINTERN int OGRGeometryShadow_Is3D(OGRGeometryShadow *self){
6027 32434 : return OGR_G_Is3D(self);
6028 : }
6029 34987 : SWIGINTERN int OGRGeometryShadow_IsMeasured(OGRGeometryShadow *self){
6030 34987 : return OGR_G_IsMeasured(self);
6031 : }
6032 56 : SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
6033 56 : OGR_G_SetCoordinateDimension(self, dimension);
6034 56 : }
6035 154 : SWIGINTERN void OGRGeometryShadow_Set3D(OGRGeometryShadow *self,int b3D){
6036 154 : OGR_G_Set3D(self, b3D);
6037 154 : }
6038 154 : SWIGINTERN void OGRGeometryShadow_SetMeasured(OGRGeometryShadow *self,int bMeasured){
6039 154 : OGR_G_SetMeasured(self, bMeasured);
6040 154 : }
6041 21 : SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
6042 21 : return OGR_G_GetDimension(self);
6043 : }
6044 29 : SWIGINTERN int OGRGeometryShadow_HasCurveGeometry(OGRGeometryShadow *self,int bLookForCircular=FALSE){
6045 29 : return OGR_G_HasCurveGeometry(self, bLookForCircular);
6046 : }
6047 3086 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetLinearGeometry(OGRGeometryShadow *self,double dfMaxAngleStepSizeDegrees=0.0,char **options=NULL){
6048 3086 : return (OGRGeometryShadow* )OGR_G_GetLinearGeometry(self, dfMaxAngleStepSizeDegrees, options);
6049 : }
6050 3062 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetCurveGeometry(OGRGeometryShadow *self,char **options=NULL){
6051 3062 : return (OGRGeometryShadow* )OGR_G_GetCurveGeometry(self, options);
6052 : }
6053 22 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Value(OGRGeometryShadow *self,double dfDistance){
6054 22 : return OGR_G_Value(self, dfDistance);
6055 : }
6056 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Transform__SWIG_1(OGRGeometryShadow *self,OGRGeomTransformerShadow *transformer){
6057 : return (OGRGeometryShadow*)OGR_GeomTransformer_Transform(transformer, self);
6058 : }
6059 1 : SWIGINTERN OGRPreparedGeometryShadow *OGRGeometryShadow_CreatePreparedGeometry(OGRGeometryShadow *self){
6060 1 : return (OGRPreparedGeometryShadow*)OGRCreatePreparedGeometry(self);
6061 : }
6062 1 : SWIGINTERN void delete_OGRPreparedGeometryShadow(OGRPreparedGeometryShadow *self){
6063 1 : OGRDestroyPreparedGeometry( self );
6064 1 : }
6065 3 : SWIGINTERN bool OGRPreparedGeometryShadow_Intersects(OGRPreparedGeometryShadow *self,OGRGeometryShadow const *otherGeom){
6066 6 : return OGRPreparedGeometryIntersects(self, (OGRGeometryH)otherGeom);
6067 : }
6068 3 : SWIGINTERN bool OGRPreparedGeometryShadow_Contains(OGRPreparedGeometryShadow *self,OGRGeometryShadow const *otherGeom){
6069 6 : return OGRPreparedGeometryContains(self, (OGRGeometryH)otherGeom);
6070 : }
6071 6 : SWIGINTERN OGRGeomTransformerShadow *new_OGRGeomTransformerShadow(OSRCoordinateTransformationShadow *ct,char **options=NULL){
6072 6 : return OGR_GeomTransformer_Create(ct, options);
6073 : }
6074 6 : SWIGINTERN void delete_OGRGeomTransformerShadow(OGRGeomTransformerShadow *self){
6075 6 : OGR_GeomTransformer_Destroy( self );
6076 6 : }
6077 2 : SWIGINTERN OGRGeometryShadow *OGRGeomTransformerShadow_Transform(OGRGeomTransformerShadow *self,OGRGeometryShadow *src_geom){
6078 2 : return (OGRGeometryShadow*)OGR_GeomTransformer_Transform(self, src_geom);
6079 : }
6080 44 : SWIGINTERN void delete_OGRFieldDomainShadow(OGRFieldDomainShadow *self){
6081 44 : OGR_FldDomain_Destroy(self);
6082 44 : }
6083 57 : SWIGINTERN char const *OGRFieldDomainShadow_GetName(OGRFieldDomainShadow *self){
6084 57 : return OGR_FldDomain_GetName(self);
6085 : }
6086 61 : SWIGINTERN char const *OGRFieldDomainShadow_GetDescription(OGRFieldDomainShadow *self){
6087 61 : return OGR_FldDomain_GetDescription(self);
6088 : }
6089 60 : SWIGINTERN OGRFieldType OGRFieldDomainShadow_GetFieldType(OGRFieldDomainShadow *self){
6090 60 : return OGR_FldDomain_GetFieldType(self);
6091 : }
6092 40 : SWIGINTERN OGRFieldSubType OGRFieldDomainShadow_GetFieldSubType(OGRFieldDomainShadow *self){
6093 40 : return OGR_FldDomain_GetFieldSubType(self);
6094 : }
6095 54 : SWIGINTERN OGRFieldDomainType OGRFieldDomainShadow_GetDomainType(OGRFieldDomainShadow *self){
6096 54 : return OGR_FldDomain_GetDomainType(self);
6097 : }
6098 2 : SWIGINTERN OGRFieldDomainSplitPolicy OGRFieldDomainShadow_GetSplitPolicy(OGRFieldDomainShadow *self){
6099 2 : return OGR_FldDomain_GetSplitPolicy(self);
6100 : }
6101 1 : SWIGINTERN void OGRFieldDomainShadow_SetSplitPolicy(OGRFieldDomainShadow *self,OGRFieldDomainSplitPolicy policy){
6102 1 : OGR_FldDomain_SetSplitPolicy(self, policy);
6103 1 : }
6104 2 : SWIGINTERN OGRFieldDomainMergePolicy OGRFieldDomainShadow_GetMergePolicy(OGRFieldDomainShadow *self){
6105 2 : return OGR_FldDomain_GetMergePolicy(self);
6106 : }
6107 1 : SWIGINTERN void OGRFieldDomainShadow_SetMergePolicy(OGRFieldDomainShadow *self,OGRFieldDomainMergePolicy policy){
6108 1 : OGR_FldDomain_SetMergePolicy(self, policy);
6109 1 : }
6110 38 : SWIGINTERN OGRCodedValue const *OGRFieldDomainShadow_GetEnumeration(OGRFieldDomainShadow *self){
6111 38 : return OGR_CodedFldDomain_GetEnumeration(self);
6112 : }
6113 12 : SWIGINTERN double OGRFieldDomainShadow_GetMinAsDouble(OGRFieldDomainShadow *self){
6114 12 : const OGRField* psVal = OGR_RangeFldDomain_GetMin(self, NULL);
6115 12 : if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
6116 2 : return CPLAtof("-inf");
6117 10 : const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
6118 10 : if( eType == OFTInteger )
6119 6 : return psVal->Integer;
6120 4 : if( eType == OFTInteger64 )
6121 2 : return (double)psVal->Integer64;
6122 2 : if( eType == OFTReal )
6123 2 : return psVal->Real;
6124 0 : return CPLAtof("-inf");
6125 : }
6126 2 : SWIGINTERN char const *OGRFieldDomainShadow_GetMinAsString(OGRFieldDomainShadow *self){
6127 2 : const OGRField* psVal = OGR_RangeFldDomain_GetMin(self, NULL);
6128 2 : if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
6129 0 : return NULL;
6130 2 : const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
6131 2 : if( eType == OFTInteger )
6132 0 : return CPLSPrintf("%d", psVal->Integer);
6133 2 : if( eType == OFTInteger64 )
6134 0 : return CPLSPrintf(CPL_FRMT_GIB, psVal->Integer64);
6135 2 : if( eType == OFTReal )
6136 0 : return CPLSPrintf("%.18g", psVal->Real);
6137 2 : if( eType == OFTDateTime )
6138 2 : return CPLSPrintf("%04d-%02d-%02dT%02d:%02d:%02d",
6139 2 : psVal->Date.Year,
6140 2 : psVal->Date.Month,
6141 2 : psVal->Date.Day,
6142 2 : psVal->Date.Hour,
6143 2 : psVal->Date.Minute,
6144 2 : static_cast<int>(psVal->Date.Second + 0.5));
6145 : return NULL;
6146 : }
6147 7 : SWIGINTERN bool OGRFieldDomainShadow_IsMinInclusive(OGRFieldDomainShadow *self){
6148 7 : bool isInclusive = false;
6149 7 : (void)OGR_RangeFldDomain_GetMin(self, &isInclusive);
6150 7 : return isInclusive;
6151 : }
6152 12 : SWIGINTERN double OGRFieldDomainShadow_GetMaxAsDouble(OGRFieldDomainShadow *self){
6153 12 : const OGRField* psVal = OGR_RangeFldDomain_GetMax(self, NULL);
6154 12 : if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
6155 2 : return CPLAtof("inf");
6156 10 : const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
6157 10 : if( eType == OFTInteger )
6158 6 : return psVal->Integer;
6159 4 : if( eType == OFTInteger64 )
6160 2 : return (double)psVal->Integer64;
6161 2 : if( eType == OFTReal )
6162 2 : return psVal->Real;
6163 0 : return CPLAtof("inf");
6164 : }
6165 2 : SWIGINTERN char const *OGRFieldDomainShadow_GetMaxAsString(OGRFieldDomainShadow *self){
6166 2 : const OGRField* psVal = OGR_RangeFldDomain_GetMax(self, NULL);
6167 2 : if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
6168 0 : return NULL;
6169 2 : const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
6170 2 : if( eType == OFTInteger )
6171 0 : return CPLSPrintf("%d", psVal->Integer);
6172 2 : if( eType == OFTInteger64 )
6173 0 : return CPLSPrintf(CPL_FRMT_GIB, psVal->Integer64);
6174 2 : if( eType == OFTReal )
6175 0 : return CPLSPrintf("%.18g", psVal->Real);
6176 2 : if( eType == OFTDateTime )
6177 2 : return CPLSPrintf("%04d-%02d-%02dT%02d:%02d:%02d",
6178 2 : psVal->Date.Year,
6179 2 : psVal->Date.Month,
6180 2 : psVal->Date.Day,
6181 2 : psVal->Date.Hour,
6182 2 : psVal->Date.Minute,
6183 2 : static_cast<int>(psVal->Date.Second + 0.5));
6184 : return NULL;
6185 : }
6186 7 : SWIGINTERN bool OGRFieldDomainShadow_IsMaxInclusive(OGRFieldDomainShadow *self){
6187 7 : bool isInclusive = false;
6188 7 : (void)OGR_RangeFldDomain_GetMax(self, &isInclusive);
6189 7 : return isInclusive;
6190 : }
6191 9 : SWIGINTERN char const *OGRFieldDomainShadow_GetGlob(OGRFieldDomainShadow *self){
6192 9 : return OGR_GlobFldDomain_GetGlob(self);
6193 : }
6194 :
6195 : static
6196 20 : OGRFieldDomainShadow* CreateCodedFieldDomain( const char *name,
6197 : const char* description,
6198 : OGRFieldType type,
6199 : OGRFieldSubType subtype,
6200 : const OGRCodedValue* enumeration) {
6201 20 : return (OGRFieldDomainShadow*) OGR_CodedFldDomain_Create( name,
6202 : description,
6203 : type,
6204 : subtype,
6205 : enumeration );
6206 : }
6207 :
6208 :
6209 : static
6210 11 : OGRFieldDomainShadow* CreateRangeFieldDomain( const char *name,
6211 : const char* description,
6212 : OGRFieldType type,
6213 : OGRFieldSubType subtype,
6214 : double min,
6215 : bool minIsInclusive,
6216 : double max,
6217 : double maxIsInclusive) {
6218 11 : OGRField sMin;
6219 11 : if( type == OFTInteger )
6220 5 : sMin.Integer = static_cast<int>(min);
6221 6 : else if( type == OFTInteger64 )
6222 2 : sMin.Integer64 = static_cast<GIntBig>(min);
6223 4 : else if( type == OFTReal )
6224 3 : sMin.Real = min;
6225 : else
6226 : return NULL;
6227 10 : OGRField sMax;
6228 10 : if( type == OFTInteger )
6229 5 : sMax.Integer = static_cast<int>(max);
6230 5 : else if( type == OFTInteger64 )
6231 2 : sMax.Integer64 = static_cast<GIntBig>(max);
6232 3 : else if( type == OFTReal )
6233 3 : sMax.Real = max;
6234 : else
6235 : return NULL;
6236 10 : return (OGRFieldDomainShadow*) OGR_RangeFldDomain_Create( name,
6237 : description,
6238 : type,
6239 : subtype,
6240 : &sMin,
6241 : minIsInclusive,
6242 : &sMax,
6243 : maxIsInclusive );
6244 : }
6245 :
6246 :
6247 : static
6248 2 : OGRFieldDomainShadow* CreateRangeFieldDomainDateTime( const char *name,
6249 : const char* description,
6250 : const char* min,
6251 : bool minIsInclusive,
6252 : const char* max,
6253 : double maxIsInclusive) {
6254 2 : OGRField sMin;
6255 2 : OGRField sMax;
6256 2 : if( !OGRParseXMLDateTime(min, &sMin))
6257 : {
6258 0 : CPLError(CE_Failure, CPLE_AppDefined,
6259 : "Invalid min: %s",
6260 : min);
6261 0 : return NULL;
6262 : }
6263 2 : if( !OGRParseXMLDateTime(max, &sMax))
6264 : {
6265 0 : CPLError(CE_Failure, CPLE_AppDefined,
6266 : "Invalid max: %s",
6267 : max);
6268 0 : return NULL;
6269 : }
6270 2 : return (OGRFieldDomainShadow*) OGR_RangeFldDomain_Create( name,
6271 : description,
6272 : OFTDateTime,
6273 : OFSTNone,
6274 : &sMin,
6275 : minIsInclusive,
6276 : &sMax,
6277 : maxIsInclusive );
6278 : }
6279 :
6280 :
6281 : static
6282 14 : OGRFieldDomainShadow* CreateGlobFieldDomain( const char *name,
6283 : const char* description,
6284 : OGRFieldType type,
6285 : OGRFieldSubType subtype,
6286 : const char* glob ) {
6287 14 : return (OGRFieldDomainShadow*) OGR_GlobFldDomain_Create( name,
6288 : description,
6289 : type,
6290 : subtype,
6291 : glob );
6292 : }
6293 :
6294 20 : SWIGINTERN void delete_OGRGeomCoordinatePrecisionShadow(OGRGeomCoordinatePrecisionShadow *self){
6295 20 : OGRGeomCoordinatePrecisionDestroy(self);
6296 20 : }
6297 20 : SWIGINTERN void OGRGeomCoordinatePrecisionShadow_Set(OGRGeomCoordinatePrecisionShadow *self,double xyResolution,double zResolution,double mResolution){
6298 20 : OGRGeomCoordinatePrecisionSet(self, xyResolution, zResolution, mResolution);
6299 20 : }
6300 3 : SWIGINTERN void OGRGeomCoordinatePrecisionShadow_SetFromMeter(OGRGeomCoordinatePrecisionShadow *self,OSRSpatialReferenceShadow *srs,double xyMeterResolution,double zMeterResolution,double mResolution){
6301 3 : OGRGeomCoordinatePrecisionSetFromMeter(self, srs, xyMeterResolution, zMeterResolution, mResolution);
6302 3 : }
6303 47 : SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetXYResolution(OGRGeomCoordinatePrecisionShadow *self){
6304 47 : return OGRGeomCoordinatePrecisionGetXYResolution(self);
6305 : }
6306 44 : SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetZResolution(OGRGeomCoordinatePrecisionShadow *self){
6307 44 : return OGRGeomCoordinatePrecisionGetZResolution(self);
6308 : }
6309 29 : SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetMResolution(OGRGeomCoordinatePrecisionShadow *self){
6310 29 : return OGRGeomCoordinatePrecisionGetMResolution(self);
6311 : }
6312 6 : SWIGINTERN char **OGRGeomCoordinatePrecisionShadow_GetFormats(OGRGeomCoordinatePrecisionShadow *self){
6313 6 : return OGRGeomCoordinatePrecisionGetFormats(self);
6314 : }
6315 7 : SWIGINTERN char **OGRGeomCoordinatePrecisionShadow_GetFormatSpecificOptions(OGRGeomCoordinatePrecisionShadow *self,char const *formatName){
6316 7 : return OGRGeomCoordinatePrecisionGetFormatSpecificOptions(self, formatName);
6317 : }
6318 1 : SWIGINTERN void OGRGeomCoordinatePrecisionShadow_SetFormatSpecificOptions(OGRGeomCoordinatePrecisionShadow *self,char const *formatName,char **formatSpecificOptions){
6319 1 : OGRGeomCoordinatePrecisionSetFormatSpecificOptions(self, formatName, formatSpecificOptions);
6320 1 : }
6321 :
6322 : static
6323 20 : OGRGeomCoordinatePrecisionShadow* CreateGeomCoordinatePrecision() {
6324 20 : return OGRGeomCoordinatePrecisionCreate();
6325 : }
6326 :
6327 :
6328 0 : char const *OGRDriverShadow_get_name( OGRDriverShadow *h ) {
6329 0 : return OGR_Dr_GetName( h );
6330 : }
6331 :
6332 0 : char const *OGRDataSourceShadow_get_name( OGRDataSourceShadow *h ) {
6333 0 : return OGR_DS_GetName( h );
6334 : }
6335 :
6336 0 : char const *OGRDriverShadow_name_get( OGRDriverShadow *h ) {
6337 0 : return OGR_Dr_GetName( h );
6338 : }
6339 :
6340 0 : char const *OGRDataSourceShadow_name_get( OGRDataSourceShadow *h ) {
6341 0 : return OGR_DS_GetName( h );
6342 : }
6343 :
6344 :
6345 18 : OGRwkbGeometryType GT_SetModifier( OGRwkbGeometryType eType, int bSetZ, int bSetM = FALSE)
6346 : {
6347 18 : return OGR_GT_SetModifier(eType, bSetZ, bSetM);
6348 : }
6349 :
6350 :
6351 1 : OGRDataSourceShadow* GetOpenDS(int ds_number) {
6352 1 : OGRDataSourceShadow* layer = (OGRDataSourceShadow*) OGRGetOpenDS(ds_number);
6353 1 : return layer;
6354 : }
6355 :
6356 :
6357 6389 : OGRDataSourceShadow* Open( const char *utf8_path, int update =0 ) {
6358 6389 : CPLErrorReset();
6359 6389 : int nOpenFlags = GDAL_OF_VECTOR;
6360 6389 : if( update )
6361 1608 : nOpenFlags |= GDAL_OF_UPDATE;
6362 : #ifdef SWIGPYTHON
6363 8024 : if( GetUseExceptions() )
6364 1917 : nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
6365 : #endif
6366 6389 : OGRDataSourceShadow* ds = (OGRDataSourceShadow*)GDALOpenEx( utf8_path, nOpenFlags, NULL,
6367 : NULL, NULL );
6368 : #ifndef SWIGPYTHON
6369 : if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
6370 : {
6371 : CPLDebug( "SWIG",
6372 : "OGROpen() succeeded, but an error is posted, so we destroy"
6373 : " the datasource and fail at swig level." );
6374 : OGRReleaseDataSource(ds);
6375 : ds = NULL;
6376 : }
6377 : #endif
6378 6389 : return ds;
6379 : }
6380 :
6381 :
6382 23 : OGRDataSourceShadow* OpenShared( const char *utf8_path, int update =0 ) {
6383 23 : CPLErrorReset();
6384 23 : int nOpenFlags = GDAL_OF_VECTOR | GDAL_OF_SHARED;
6385 23 : if( update )
6386 12 : nOpenFlags |= GDAL_OF_UPDATE;
6387 : #ifdef SWIGPYTHON
6388 37 : if( GetUseExceptions() )
6389 14 : nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
6390 : #endif
6391 23 : OGRDataSourceShadow* ds = (OGRDataSourceShadow*)GDALOpenEx( utf8_path, nOpenFlags, NULL,
6392 : NULL, NULL );
6393 : #ifndef SWIGPYTHON
6394 : if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
6395 : {
6396 : OGRReleaseDataSource(ds);
6397 : ds = NULL;
6398 : }
6399 : #endif
6400 23 : return ds;
6401 : }
6402 :
6403 :
6404 : static
6405 2410 : OGRDriverShadow* GetDriverByName( char const *name ) {
6406 2410 : return (OGRDriverShadow*) OGRGetDriverByName( name );
6407 : }
6408 :
6409 : static
6410 0 : OGRDriverShadow* GetDriver(int driver_number) {
6411 0 : return (OGRDriverShadow*) OGRGetDriver(driver_number);
6412 : }
6413 :
6414 :
6415 59 : char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
6416 59 : int nResArgCount;
6417 :
6418 59 : if( papszArgv == NULL )
6419 : return NULL;
6420 :
6421 118 : bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
6422 59 : CSLFindString(papszArgv, "OGR_SKIP") >= 0 );
6423 :
6424 59 : nResArgCount =
6425 59 : GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, GDAL_OF_VECTOR | nOptions );
6426 :
6427 59 : if( bReloadDrivers )
6428 : {
6429 0 : GDALAllRegister();
6430 : }
6431 :
6432 59 : if( nResArgCount <= 0 )
6433 : return NULL;
6434 : else
6435 57 : return papszArgv;
6436 : }
6437 :
6438 :
6439 : static
6440 11 : int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
6441 11 : return GDALTermProgress( dfProgress, pszMessage, pData);
6442 : }
6443 :
6444 : #ifdef __cplusplus
6445 : extern "C" {
6446 : #endif
6447 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6448 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6449 0 : int result;
6450 :
6451 0 : if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
6452 0 : {
6453 : #ifdef SED_HACKS
6454 0 : if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
6455 : #endif
6456 0 : result = GetUseExceptions();
6457 : }
6458 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6459 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6460 : return resultobj;
6461 0 : fail:
6462 0 : return NULL;
6463 : }
6464 :
6465 :
6466 8189 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6467 8189 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6468 8189 : int result;
6469 :
6470 8189 : if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
6471 8189 : {
6472 : #ifdef SED_HACKS
6473 8189 : if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
6474 : #endif
6475 8189 : result = (int)_GetExceptionsLocal();
6476 : }
6477 8189 : resultobj = SWIG_From_int(static_cast< int >(result));
6478 8189 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6479 : return resultobj;
6480 0 : fail:
6481 0 : return NULL;
6482 : }
6483 :
6484 :
6485 16378 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6486 16378 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6487 16378 : int arg1 ;
6488 16378 : int val1 ;
6489 16378 : int ecode1 = 0 ;
6490 16378 : PyObject *swig_obj[1] ;
6491 :
6492 16378 : if (!args) SWIG_fail;
6493 16378 : swig_obj[0] = args;
6494 16378 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
6495 16378 : if (!SWIG_IsOK(ecode1)) {
6496 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
6497 : }
6498 16378 : arg1 = static_cast< int >(val1);
6499 16378 : {
6500 : #ifdef SED_HACKS
6501 16378 : if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
6502 : #endif
6503 16378 : _SetExceptionsLocal(arg1);
6504 : }
6505 16378 : resultobj = SWIG_Py_Void();
6506 16378 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6507 : return resultobj;
6508 : fail:
6509 : return NULL;
6510 : }
6511 :
6512 :
6513 274 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6514 274 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6515 :
6516 274 : if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
6517 274 : _UseExceptions();
6518 274 : resultobj = SWIG_Py_Void();
6519 274 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6520 : return resultobj;
6521 0 : fail:
6522 0 : return NULL;
6523 : }
6524 :
6525 :
6526 5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6527 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6528 :
6529 5 : if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
6530 5 : _DontUseExceptions();
6531 5 : resultobj = SWIG_Py_Void();
6532 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6533 : return resultobj;
6534 0 : fail:
6535 0 : return NULL;
6536 : }
6537 :
6538 :
6539 17230 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6540 17230 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6541 17230 : int result;
6542 :
6543 17230 : if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
6544 17230 : {
6545 : #ifdef SED_HACKS
6546 17230 : if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
6547 : #endif
6548 17230 : result = (int)_UserHasSpecifiedIfUsingExceptions();
6549 : }
6550 17230 : resultobj = SWIG_From_int(static_cast< int >(result));
6551 17230 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6552 : return resultobj;
6553 0 : fail:
6554 0 : return NULL;
6555 : }
6556 :
6557 :
6558 19 : SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6559 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6560 19 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6561 19 : void *argp1 = 0 ;
6562 19 : int res1 = 0 ;
6563 19 : PyObject *swig_obj[1] ;
6564 19 : char *result = 0 ;
6565 :
6566 19 : if (!args) SWIG_fail;
6567 19 : swig_obj[0] = args;
6568 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6569 19 : if (!SWIG_IsOK(res1)) {
6570 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6571 : }
6572 19 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6573 19 : {
6574 19 : const int bLocalUseExceptions = GetUseExceptions();
6575 19 : if ( bLocalUseExceptions ) {
6576 2 : pushErrorHandler();
6577 : }
6578 19 : {
6579 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6580 19 : result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
6581 19 : SWIG_PYTHON_THREAD_END_ALLOW;
6582 : }
6583 19 : if ( bLocalUseExceptions ) {
6584 2 : popErrorHandler();
6585 : }
6586 : #ifndef SED_HACKS
6587 : if ( bLocalUseExceptions ) {
6588 : CPLErr eclass = CPLGetLastErrorType();
6589 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6590 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6591 : }
6592 : }
6593 : #endif
6594 : }
6595 19 : resultobj = SWIG_FromCharPtr((const char *)result);
6596 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6597 : return resultobj;
6598 : fail:
6599 : return NULL;
6600 : }
6601 :
6602 :
6603 0 : SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6604 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6605 0 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6606 0 : char *arg2 = (char *) 0 ;
6607 0 : void *argp1 = 0 ;
6608 0 : int res1 = 0 ;
6609 0 : int res2 ;
6610 0 : char *buf2 = 0 ;
6611 0 : int alloc2 = 0 ;
6612 0 : PyObject *swig_obj[2] ;
6613 :
6614 0 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
6615 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6616 0 : if (!SWIG_IsOK(res1)) {
6617 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6618 : }
6619 0 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6620 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6621 0 : if (!SWIG_IsOK(res2)) {
6622 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
6623 : }
6624 0 : arg2 = reinterpret_cast< char * >(buf2);
6625 0 : {
6626 0 : if (!arg2) {
6627 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6628 : }
6629 : }
6630 0 : {
6631 0 : const int bLocalUseExceptions = GetUseExceptions();
6632 0 : if ( bLocalUseExceptions ) {
6633 0 : pushErrorHandler();
6634 : }
6635 0 : {
6636 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6637 0 : GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
6638 0 : SWIG_PYTHON_THREAD_END_ALLOW;
6639 : }
6640 0 : if ( bLocalUseExceptions ) {
6641 0 : popErrorHandler();
6642 : }
6643 : #ifndef SED_HACKS
6644 : if ( bLocalUseExceptions ) {
6645 : CPLErr eclass = CPLGetLastErrorType();
6646 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6647 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6648 : }
6649 : }
6650 : #endif
6651 : }
6652 0 : resultobj = SWIG_Py_Void();
6653 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6654 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6655 : return resultobj;
6656 0 : fail:
6657 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6658 : return NULL;
6659 : }
6660 :
6661 :
6662 8 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6663 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6664 8 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6665 8 : void *argp1 = 0 ;
6666 8 : int res1 = 0 ;
6667 8 : PyObject *swig_obj[1] ;
6668 8 : char **result = 0 ;
6669 :
6670 8 : if (!args) SWIG_fail;
6671 8 : swig_obj[0] = args;
6672 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6673 8 : if (!SWIG_IsOK(res1)) {
6674 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6675 : }
6676 8 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6677 8 : {
6678 8 : const int bLocalUseExceptions = GetUseExceptions();
6679 8 : if ( bLocalUseExceptions ) {
6680 0 : pushErrorHandler();
6681 : }
6682 8 : {
6683 8 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6684 8 : result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
6685 8 : SWIG_PYTHON_THREAD_END_ALLOW;
6686 : }
6687 8 : if ( bLocalUseExceptions ) {
6688 0 : popErrorHandler();
6689 : }
6690 : #ifndef SED_HACKS
6691 : if ( bLocalUseExceptions ) {
6692 : CPLErr eclass = CPLGetLastErrorType();
6693 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6694 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6695 : }
6696 : }
6697 : #endif
6698 : }
6699 8 : {
6700 : /* %typemap(out) char **CSL -> ( string ) */
6701 8 : bool bErr = false;
6702 8 : resultobj = CSLToList(result, &bErr);
6703 8 : CSLDestroy(result);
6704 8 : if( bErr ) {
6705 0 : SWIG_fail;
6706 : }
6707 : }
6708 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6709 : return resultobj;
6710 : fail:
6711 : return NULL;
6712 : }
6713 :
6714 :
6715 69 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6716 69 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6717 69 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6718 69 : char *arg2 = (char *) "" ;
6719 69 : void *argp1 = 0 ;
6720 69 : int res1 = 0 ;
6721 69 : int res2 ;
6722 69 : char *buf2 = 0 ;
6723 69 : int alloc2 = 0 ;
6724 69 : PyObject *swig_obj[2] ;
6725 69 : char **result = 0 ;
6726 :
6727 69 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
6728 69 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6729 69 : if (!SWIG_IsOK(res1)) {
6730 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6731 : }
6732 69 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6733 69 : if (swig_obj[1]) {
6734 61 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6735 61 : if (!SWIG_IsOK(res2)) {
6736 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
6737 : }
6738 61 : arg2 = reinterpret_cast< char * >(buf2);
6739 : }
6740 69 : {
6741 69 : const int bLocalUseExceptions = GetUseExceptions();
6742 69 : if ( bLocalUseExceptions ) {
6743 42 : pushErrorHandler();
6744 : }
6745 69 : {
6746 69 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6747 69 : result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
6748 69 : SWIG_PYTHON_THREAD_END_ALLOW;
6749 : }
6750 69 : if ( bLocalUseExceptions ) {
6751 42 : popErrorHandler();
6752 : }
6753 : #ifndef SED_HACKS
6754 : if ( bLocalUseExceptions ) {
6755 : CPLErr eclass = CPLGetLastErrorType();
6756 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6757 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6758 : }
6759 : }
6760 : #endif
6761 : }
6762 69 : {
6763 : /* %typemap(out) char **dict */
6764 69 : resultobj = GetCSLStringAsPyDict(result, false);
6765 : }
6766 69 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6767 69 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6768 : return resultobj;
6769 0 : fail:
6770 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6771 : return NULL;
6772 : }
6773 :
6774 :
6775 9 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6776 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6777 9 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6778 9 : char *arg2 = (char *) "" ;
6779 9 : void *argp1 = 0 ;
6780 9 : int res1 = 0 ;
6781 9 : int res2 ;
6782 9 : char *buf2 = 0 ;
6783 9 : int alloc2 = 0 ;
6784 9 : PyObject *swig_obj[2] ;
6785 9 : char **result = 0 ;
6786 :
6787 9 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
6788 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6789 9 : if (!SWIG_IsOK(res1)) {
6790 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6791 : }
6792 9 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6793 9 : if (swig_obj[1]) {
6794 5 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6795 5 : if (!SWIG_IsOK(res2)) {
6796 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
6797 : }
6798 5 : arg2 = reinterpret_cast< char * >(buf2);
6799 : }
6800 9 : {
6801 9 : const int bLocalUseExceptions = GetUseExceptions();
6802 9 : if ( bLocalUseExceptions ) {
6803 5 : pushErrorHandler();
6804 : }
6805 9 : {
6806 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6807 9 : result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
6808 9 : SWIG_PYTHON_THREAD_END_ALLOW;
6809 : }
6810 9 : if ( bLocalUseExceptions ) {
6811 5 : popErrorHandler();
6812 : }
6813 : #ifndef SED_HACKS
6814 : if ( bLocalUseExceptions ) {
6815 : CPLErr eclass = CPLGetLastErrorType();
6816 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6817 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6818 : }
6819 : }
6820 : #endif
6821 : }
6822 9 : {
6823 : /* %typemap(out) char **options -> ( string ) */
6824 9 : bool bErr = false;
6825 9 : resultobj = CSLToList(result, &bErr);
6826 9 : if( bErr ) {
6827 0 : SWIG_fail;
6828 : }
6829 : }
6830 9 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6831 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6832 : return resultobj;
6833 0 : fail:
6834 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6835 : return NULL;
6836 : }
6837 :
6838 :
6839 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
6840 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6841 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6842 : char **arg2 = (char **) 0 ;
6843 : char *arg3 = (char *) "" ;
6844 : void *argp1 = 0 ;
6845 : int res1 = 0 ;
6846 : int res3 ;
6847 : char *buf3 = 0 ;
6848 : int alloc3 = 0 ;
6849 : CPLErr result;
6850 :
6851 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
6852 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6853 : if (!SWIG_IsOK(res1)) {
6854 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6855 : }
6856 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6857 : {
6858 : /* %typemap(in) char **dict */
6859 : arg2 = NULL;
6860 : if ( PySequence_Check( swig_obj[1] ) ) {
6861 : int bErr = FALSE;
6862 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
6863 : if ( bErr )
6864 : {
6865 : SWIG_fail;
6866 : }
6867 : }
6868 : else if ( PyMapping_Check( swig_obj[1] ) ) {
6869 : int bErr = FALSE;
6870 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
6871 : if ( bErr )
6872 : {
6873 : SWIG_fail;
6874 : }
6875 : }
6876 : else {
6877 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
6878 : SWIG_fail;
6879 : }
6880 : }
6881 : if (swig_obj[2]) {
6882 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6883 : if (!SWIG_IsOK(res3)) {
6884 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
6885 : }
6886 : arg3 = reinterpret_cast< char * >(buf3);
6887 : }
6888 : {
6889 : const int bLocalUseExceptions = GetUseExceptions();
6890 : if ( bLocalUseExceptions ) {
6891 : pushErrorHandler();
6892 : }
6893 : {
6894 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6895 : result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
6896 : SWIG_PYTHON_THREAD_END_ALLOW;
6897 : }
6898 : if ( bLocalUseExceptions ) {
6899 : popErrorHandler();
6900 : }
6901 : #ifndef SED_HACKS
6902 : if ( bLocalUseExceptions ) {
6903 : CPLErr eclass = CPLGetLastErrorType();
6904 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6905 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6906 : }
6907 : }
6908 : #endif
6909 : }
6910 : resultobj = SWIG_From_int(static_cast< int >(result));
6911 : {
6912 : /* %typemap(freearg) char **dict */
6913 : CSLDestroy( arg2 );
6914 : }
6915 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6916 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6917 : return resultobj;
6918 : fail:
6919 : {
6920 : /* %typemap(freearg) char **dict */
6921 : CSLDestroy( arg2 );
6922 : }
6923 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6924 : return NULL;
6925 : }
6926 :
6927 :
6928 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
6929 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6930 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
6931 : char *arg2 = (char *) 0 ;
6932 : char *arg3 = (char *) "" ;
6933 : void *argp1 = 0 ;
6934 : int res1 = 0 ;
6935 : int res2 ;
6936 : char *buf2 = 0 ;
6937 : int alloc2 = 0 ;
6938 : int res3 ;
6939 : char *buf3 = 0 ;
6940 : int alloc3 = 0 ;
6941 : CPLErr result;
6942 :
6943 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
6944 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
6945 : if (!SWIG_IsOK(res1)) {
6946 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
6947 : }
6948 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
6949 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6950 : if (!SWIG_IsOK(res2)) {
6951 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
6952 : }
6953 : arg2 = reinterpret_cast< char * >(buf2);
6954 : if (swig_obj[2]) {
6955 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6956 : if (!SWIG_IsOK(res3)) {
6957 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
6958 : }
6959 : arg3 = reinterpret_cast< char * >(buf3);
6960 : }
6961 : {
6962 : const int bLocalUseExceptions = GetUseExceptions();
6963 : if ( bLocalUseExceptions ) {
6964 : pushErrorHandler();
6965 : }
6966 : {
6967 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
6968 : result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
6969 : SWIG_PYTHON_THREAD_END_ALLOW;
6970 : }
6971 : if ( bLocalUseExceptions ) {
6972 : popErrorHandler();
6973 : }
6974 : #ifndef SED_HACKS
6975 : if ( bLocalUseExceptions ) {
6976 : CPLErr eclass = CPLGetLastErrorType();
6977 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6978 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6979 : }
6980 : }
6981 : #endif
6982 : }
6983 : resultobj = SWIG_From_int(static_cast< int >(result));
6984 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6985 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6986 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
6987 : return resultobj;
6988 : fail:
6989 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6990 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6991 : return NULL;
6992 : }
6993 :
6994 :
6995 30 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
6996 30 : Py_ssize_t argc;
6997 30 : PyObject *argv[4] = {
6998 : 0
6999 : };
7000 :
7001 30 : if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
7002 30 : --argc;
7003 30 : if ((argc >= 2) && (argc <= 3)) {
7004 30 : int _v;
7005 30 : void *vptr = 0;
7006 30 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
7007 33 : _v = SWIG_CheckState(res);
7008 30 : if (_v) {
7009 30 : {
7010 : /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
7011 : /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
7012 : /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
7013 : /* (see #4816) */
7014 30 : _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
7015 : }
7016 27 : if (_v) {
7017 27 : if (argc <= 2) {
7018 27 : return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
7019 : }
7020 3 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
7021 3 : _v = SWIG_CheckState(res);
7022 3 : if (_v) {
7023 3 : return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
7024 : }
7025 : }
7026 : }
7027 : }
7028 3 : if ((argc >= 2) && (argc <= 3)) {
7029 3 : int _v;
7030 3 : void *vptr = 0;
7031 3 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
7032 3 : _v = SWIG_CheckState(res);
7033 3 : if (_v) {
7034 3 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
7035 3 : _v = SWIG_CheckState(res);
7036 3 : if (_v) {
7037 3 : if (argc <= 2) {
7038 3 : return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
7039 : }
7040 1 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
7041 1 : _v = SWIG_CheckState(res);
7042 1 : if (_v) {
7043 1 : return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
7044 : }
7045 : }
7046 : }
7047 : }
7048 :
7049 0 : fail:
7050 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
7051 : " Possible C/C++ prototypes are:\n"
7052 : " GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
7053 : " GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
7054 : return 0;
7055 : }
7056 :
7057 :
7058 421 : SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7059 421 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7060 421 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
7061 421 : char *arg2 = (char *) 0 ;
7062 421 : char *arg3 = (char *) "" ;
7063 421 : void *argp1 = 0 ;
7064 421 : int res1 = 0 ;
7065 421 : int res2 ;
7066 421 : char *buf2 = 0 ;
7067 421 : int alloc2 = 0 ;
7068 421 : int res3 ;
7069 421 : char *buf3 = 0 ;
7070 421 : int alloc3 = 0 ;
7071 421 : PyObject *swig_obj[3] ;
7072 421 : char *result = 0 ;
7073 :
7074 421 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
7075 421 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
7076 421 : if (!SWIG_IsOK(res1)) {
7077 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
7078 : }
7079 421 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
7080 421 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7081 421 : if (!SWIG_IsOK(res2)) {
7082 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
7083 : }
7084 421 : arg2 = reinterpret_cast< char * >(buf2);
7085 421 : if (swig_obj[2]) {
7086 368 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
7087 368 : if (!SWIG_IsOK(res3)) {
7088 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
7089 : }
7090 368 : arg3 = reinterpret_cast< char * >(buf3);
7091 : }
7092 421 : {
7093 421 : if (!arg2) {
7094 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7095 : }
7096 : }
7097 421 : {
7098 421 : const int bLocalUseExceptions = GetUseExceptions();
7099 421 : if ( bLocalUseExceptions ) {
7100 375 : pushErrorHandler();
7101 : }
7102 421 : {
7103 421 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7104 421 : result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
7105 421 : SWIG_PYTHON_THREAD_END_ALLOW;
7106 : }
7107 421 : if ( bLocalUseExceptions ) {
7108 375 : popErrorHandler();
7109 : }
7110 : #ifndef SED_HACKS
7111 : if ( bLocalUseExceptions ) {
7112 : CPLErr eclass = CPLGetLastErrorType();
7113 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7114 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7115 : }
7116 : }
7117 : #endif
7118 : }
7119 421 : resultobj = SWIG_FromCharPtr((const char *)result);
7120 421 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7121 421 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7122 421 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7123 : return resultobj;
7124 0 : fail:
7125 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7126 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7127 : return NULL;
7128 : }
7129 :
7130 :
7131 289 : SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7132 289 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7133 289 : GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
7134 289 : char *arg2 = (char *) 0 ;
7135 289 : char *arg3 = (char *) 0 ;
7136 289 : char *arg4 = (char *) "" ;
7137 289 : void *argp1 = 0 ;
7138 289 : int res1 = 0 ;
7139 289 : int res2 ;
7140 289 : char *buf2 = 0 ;
7141 289 : int alloc2 = 0 ;
7142 289 : int res3 ;
7143 289 : char *buf3 = 0 ;
7144 289 : int alloc3 = 0 ;
7145 289 : int res4 ;
7146 289 : char *buf4 = 0 ;
7147 289 : int alloc4 = 0 ;
7148 289 : PyObject *swig_obj[4] ;
7149 289 : CPLErr result;
7150 :
7151 289 : if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
7152 289 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 | 0 );
7153 289 : if (!SWIG_IsOK(res1)) {
7154 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'");
7155 : }
7156 289 : arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
7157 289 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7158 289 : if (!SWIG_IsOK(res2)) {
7159 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
7160 : }
7161 289 : arg2 = reinterpret_cast< char * >(buf2);
7162 289 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
7163 289 : if (!SWIG_IsOK(res3)) {
7164 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
7165 : }
7166 289 : arg3 = reinterpret_cast< char * >(buf3);
7167 289 : if (swig_obj[3]) {
7168 5 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
7169 5 : if (!SWIG_IsOK(res4)) {
7170 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
7171 : }
7172 5 : arg4 = reinterpret_cast< char * >(buf4);
7173 : }
7174 289 : {
7175 289 : if (!arg2) {
7176 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7177 : }
7178 : }
7179 289 : {
7180 289 : const int bLocalUseExceptions = GetUseExceptions();
7181 289 : if ( bLocalUseExceptions ) {
7182 265 : pushErrorHandler();
7183 : }
7184 289 : {
7185 289 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7186 289 : result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
7187 289 : SWIG_PYTHON_THREAD_END_ALLOW;
7188 : }
7189 289 : if ( bLocalUseExceptions ) {
7190 265 : popErrorHandler();
7191 : }
7192 : #ifndef SED_HACKS
7193 : if ( bLocalUseExceptions ) {
7194 : CPLErr eclass = CPLGetLastErrorType();
7195 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7196 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7197 : }
7198 : }
7199 : #endif
7200 : }
7201 289 : resultobj = SWIG_From_int(static_cast< int >(result));
7202 289 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7203 289 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7204 289 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
7205 289 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7206 : return resultobj;
7207 0 : fail:
7208 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7209 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7210 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
7211 : return NULL;
7212 : }
7213 :
7214 :
7215 271 : SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7216 271 : PyObject *obj;
7217 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
7218 271 : SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
7219 271 : return SWIG_Py_Void();
7220 : }
7221 :
7222 3820 : SWIGINTERN PyObject *_wrap_GetGEOSVersionMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7223 3820 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7224 3820 : int result;
7225 :
7226 3820 : if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMajor", 0, 0, 0)) SWIG_fail;
7227 3820 : {
7228 3820 : const int bLocalUseExceptions = GetUseExceptions();
7229 3820 : if ( bLocalUseExceptions ) {
7230 421 : pushErrorHandler();
7231 : }
7232 3820 : {
7233 3820 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7234 3820 : result = (int)GetGEOSVersionMajor();
7235 3820 : SWIG_PYTHON_THREAD_END_ALLOW;
7236 : }
7237 3820 : if ( bLocalUseExceptions ) {
7238 421 : popErrorHandler();
7239 : }
7240 : #ifndef SED_HACKS
7241 : if ( bLocalUseExceptions ) {
7242 : CPLErr eclass = CPLGetLastErrorType();
7243 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7244 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7245 : }
7246 : }
7247 : #endif
7248 : }
7249 3820 : resultobj = SWIG_From_int(static_cast< int >(result));
7250 3820 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7251 : return resultobj;
7252 0 : fail:
7253 0 : return NULL;
7254 : }
7255 :
7256 :
7257 203 : SWIGINTERN PyObject *_wrap_GetGEOSVersionMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7258 203 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7259 203 : int result;
7260 :
7261 203 : if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMinor", 0, 0, 0)) SWIG_fail;
7262 203 : {
7263 203 : const int bLocalUseExceptions = GetUseExceptions();
7264 203 : if ( bLocalUseExceptions ) {
7265 201 : pushErrorHandler();
7266 : }
7267 203 : {
7268 203 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7269 203 : result = (int)GetGEOSVersionMinor();
7270 203 : SWIG_PYTHON_THREAD_END_ALLOW;
7271 : }
7272 203 : if ( bLocalUseExceptions ) {
7273 201 : popErrorHandler();
7274 : }
7275 : #ifndef SED_HACKS
7276 : if ( bLocalUseExceptions ) {
7277 : CPLErr eclass = CPLGetLastErrorType();
7278 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7279 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7280 : }
7281 : }
7282 : #endif
7283 : }
7284 203 : resultobj = SWIG_From_int(static_cast< int >(result));
7285 203 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7286 : return resultobj;
7287 0 : fail:
7288 0 : return NULL;
7289 : }
7290 :
7291 :
7292 203 : SWIGINTERN PyObject *_wrap_GetGEOSVersionMicro(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7293 203 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7294 203 : int result;
7295 :
7296 203 : if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMicro", 0, 0, 0)) SWIG_fail;
7297 203 : {
7298 203 : const int bLocalUseExceptions = GetUseExceptions();
7299 203 : if ( bLocalUseExceptions ) {
7300 201 : pushErrorHandler();
7301 : }
7302 203 : {
7303 203 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7304 203 : result = (int)GetGEOSVersionMicro();
7305 203 : SWIG_PYTHON_THREAD_END_ALLOW;
7306 : }
7307 203 : if ( bLocalUseExceptions ) {
7308 201 : popErrorHandler();
7309 : }
7310 : #ifndef SED_HACKS
7311 : if ( bLocalUseExceptions ) {
7312 : CPLErr eclass = CPLGetLastErrorType();
7313 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7314 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7315 : }
7316 : }
7317 : #endif
7318 : }
7319 203 : resultobj = SWIG_From_int(static_cast< int >(result));
7320 203 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7321 : return resultobj;
7322 0 : fail:
7323 0 : return NULL;
7324 : }
7325 :
7326 :
7327 3 : SWIGINTERN PyObject *_wrap_new_StyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7328 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7329 3 : OGRStyleTableShadow *result = 0 ;
7330 :
7331 3 : if (!SWIG_Python_UnpackTuple(args, "new_StyleTable", 0, 0, 0)) SWIG_fail;
7332 3 : {
7333 3 : const int bLocalUseExceptions = GetUseExceptions();
7334 3 : if ( bLocalUseExceptions ) {
7335 3 : pushErrorHandler();
7336 : }
7337 3 : {
7338 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7339 3 : result = (OGRStyleTableShadow *)new_OGRStyleTableShadow();
7340 3 : SWIG_PYTHON_THREAD_END_ALLOW;
7341 : }
7342 3 : if ( bLocalUseExceptions ) {
7343 3 : popErrorHandler();
7344 : }
7345 : #ifndef SED_HACKS
7346 : if ( bLocalUseExceptions ) {
7347 : CPLErr eclass = CPLGetLastErrorType();
7348 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7349 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7350 : }
7351 : }
7352 : #endif
7353 : }
7354 3 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, SWIG_POINTER_NEW | 0 );
7355 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7356 : return resultobj;
7357 0 : fail:
7358 0 : return NULL;
7359 : }
7360 :
7361 :
7362 3 : SWIGINTERN PyObject *_wrap_delete_StyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7363 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7364 3 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7365 3 : void *argp1 = 0 ;
7366 3 : int res1 = 0 ;
7367 3 : PyObject *swig_obj[1] ;
7368 :
7369 3 : if (!args) SWIG_fail;
7370 3 : swig_obj[0] = args;
7371 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, SWIG_POINTER_DISOWN | 0 );
7372 3 : if (!SWIG_IsOK(res1)) {
7373 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7374 : }
7375 3 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7376 3 : {
7377 3 : const int bLocalUseExceptions = GetUseExceptions();
7378 3 : if ( bLocalUseExceptions ) {
7379 3 : pushErrorHandler();
7380 : }
7381 3 : {
7382 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7383 3 : delete_OGRStyleTableShadow(arg1);
7384 3 : SWIG_PYTHON_THREAD_END_ALLOW;
7385 : }
7386 3 : if ( bLocalUseExceptions ) {
7387 3 : popErrorHandler();
7388 : }
7389 : #ifndef SED_HACKS
7390 : if ( bLocalUseExceptions ) {
7391 : CPLErr eclass = CPLGetLastErrorType();
7392 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7393 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7394 : }
7395 : }
7396 : #endif
7397 : }
7398 3 : resultobj = SWIG_Py_Void();
7399 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7400 : return resultobj;
7401 : fail:
7402 : return NULL;
7403 : }
7404 :
7405 :
7406 3 : SWIGINTERN PyObject *_wrap_StyleTable_AddStyle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7407 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7408 3 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7409 3 : char *arg2 = (char *) 0 ;
7410 3 : char *arg3 = (char *) 0 ;
7411 3 : void *argp1 = 0 ;
7412 3 : int res1 = 0 ;
7413 3 : int res2 ;
7414 3 : char *buf2 = 0 ;
7415 3 : int alloc2 = 0 ;
7416 3 : int res3 ;
7417 3 : char *buf3 = 0 ;
7418 3 : int alloc3 = 0 ;
7419 3 : PyObject *swig_obj[3] ;
7420 3 : int result;
7421 :
7422 3 : if (!SWIG_Python_UnpackTuple(args, "StyleTable_AddStyle", 3, 3, swig_obj)) SWIG_fail;
7423 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7424 3 : if (!SWIG_IsOK(res1)) {
7425 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_AddStyle" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7426 : }
7427 3 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7428 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7429 3 : if (!SWIG_IsOK(res2)) {
7430 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StyleTable_AddStyle" "', argument " "2"" of type '" "char const *""'");
7431 : }
7432 3 : arg2 = reinterpret_cast< char * >(buf2);
7433 3 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
7434 3 : if (!SWIG_IsOK(res3)) {
7435 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StyleTable_AddStyle" "', argument " "3"" of type '" "char const *""'");
7436 : }
7437 3 : arg3 = reinterpret_cast< char * >(buf3);
7438 3 : {
7439 3 : const int bLocalUseExceptions = GetUseExceptions();
7440 3 : if ( bLocalUseExceptions ) {
7441 3 : pushErrorHandler();
7442 : }
7443 3 : {
7444 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7445 3 : result = (int)OGRStyleTableShadow_AddStyle(arg1,(char const *)arg2,(char const *)arg3);
7446 3 : SWIG_PYTHON_THREAD_END_ALLOW;
7447 : }
7448 3 : if ( bLocalUseExceptions ) {
7449 3 : popErrorHandler();
7450 : }
7451 : #ifndef SED_HACKS
7452 : if ( bLocalUseExceptions ) {
7453 : CPLErr eclass = CPLGetLastErrorType();
7454 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7455 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7456 : }
7457 : }
7458 : #endif
7459 : }
7460 3 : resultobj = SWIG_From_int(static_cast< int >(result));
7461 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7462 3 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7463 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7464 : return resultobj;
7465 0 : fail:
7466 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7467 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7468 : return NULL;
7469 : }
7470 :
7471 :
7472 2 : SWIGINTERN PyObject *_wrap_StyleTable_LoadStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7473 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7474 2 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7475 2 : char *arg2 = (char *) 0 ;
7476 2 : void *argp1 = 0 ;
7477 2 : int res1 = 0 ;
7478 2 : int bToFree2 = 0 ;
7479 2 : PyObject *swig_obj[2] ;
7480 2 : int result;
7481 :
7482 2 : if (!SWIG_Python_UnpackTuple(args, "StyleTable_LoadStyleTable", 2, 2, swig_obj)) SWIG_fail;
7483 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7484 2 : if (!SWIG_IsOK(res1)) {
7485 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_LoadStyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7486 : }
7487 2 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7488 2 : {
7489 : /* %typemap(in) (const char *utf8_path) */
7490 2 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
7491 : {
7492 2 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
7493 : }
7494 : else
7495 : {
7496 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
7497 :
7498 : }
7499 2 : if (arg2 == NULL)
7500 : {
7501 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
7502 0 : SWIG_fail;
7503 : }
7504 : }
7505 2 : {
7506 2 : const int bLocalUseExceptions = GetUseExceptions();
7507 2 : if ( bLocalUseExceptions ) {
7508 2 : pushErrorHandler();
7509 : }
7510 2 : {
7511 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7512 2 : result = (int)OGRStyleTableShadow_LoadStyleTable(arg1,(char const *)arg2);
7513 2 : SWIG_PYTHON_THREAD_END_ALLOW;
7514 : }
7515 2 : if ( bLocalUseExceptions ) {
7516 2 : popErrorHandler();
7517 : }
7518 : #ifndef SED_HACKS
7519 : if ( bLocalUseExceptions ) {
7520 : CPLErr eclass = CPLGetLastErrorType();
7521 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7522 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7523 : }
7524 : }
7525 : #endif
7526 : }
7527 2 : resultobj = SWIG_From_int(static_cast< int >(result));
7528 2 : {
7529 : /* %typemap(freearg) (const char *utf8_path) */
7530 2 : GDALPythonFreeCStr(arg2, bToFree2);
7531 : }
7532 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7533 : return resultobj;
7534 0 : fail:
7535 0 : {
7536 : /* %typemap(freearg) (const char *utf8_path) */
7537 2 : GDALPythonFreeCStr(arg2, bToFree2);
7538 : }
7539 : return NULL;
7540 : }
7541 :
7542 :
7543 2 : SWIGINTERN PyObject *_wrap_StyleTable_SaveStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7544 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7545 2 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7546 2 : char *arg2 = (char *) 0 ;
7547 2 : void *argp1 = 0 ;
7548 2 : int res1 = 0 ;
7549 2 : int bToFree2 = 0 ;
7550 2 : PyObject *swig_obj[2] ;
7551 2 : int result;
7552 :
7553 2 : if (!SWIG_Python_UnpackTuple(args, "StyleTable_SaveStyleTable", 2, 2, swig_obj)) SWIG_fail;
7554 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7555 2 : if (!SWIG_IsOK(res1)) {
7556 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_SaveStyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7557 : }
7558 2 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7559 2 : {
7560 : /* %typemap(in) (const char *utf8_path) */
7561 2 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
7562 : {
7563 2 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
7564 : }
7565 : else
7566 : {
7567 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
7568 :
7569 : }
7570 2 : if (arg2 == NULL)
7571 : {
7572 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
7573 0 : SWIG_fail;
7574 : }
7575 : }
7576 2 : {
7577 2 : const int bLocalUseExceptions = GetUseExceptions();
7578 2 : if ( bLocalUseExceptions ) {
7579 2 : pushErrorHandler();
7580 : }
7581 2 : {
7582 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7583 2 : result = (int)OGRStyleTableShadow_SaveStyleTable(arg1,(char const *)arg2);
7584 2 : SWIG_PYTHON_THREAD_END_ALLOW;
7585 : }
7586 2 : if ( bLocalUseExceptions ) {
7587 2 : popErrorHandler();
7588 : }
7589 : #ifndef SED_HACKS
7590 : if ( bLocalUseExceptions ) {
7591 : CPLErr eclass = CPLGetLastErrorType();
7592 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7593 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7594 : }
7595 : }
7596 : #endif
7597 : }
7598 2 : resultobj = SWIG_From_int(static_cast< int >(result));
7599 2 : {
7600 : /* %typemap(freearg) (const char *utf8_path) */
7601 2 : GDALPythonFreeCStr(arg2, bToFree2);
7602 : }
7603 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7604 : return resultobj;
7605 0 : fail:
7606 0 : {
7607 : /* %typemap(freearg) (const char *utf8_path) */
7608 2 : GDALPythonFreeCStr(arg2, bToFree2);
7609 : }
7610 : return NULL;
7611 : }
7612 :
7613 :
7614 2 : SWIGINTERN PyObject *_wrap_StyleTable_Find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7615 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7616 2 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7617 2 : char *arg2 = (char *) 0 ;
7618 2 : void *argp1 = 0 ;
7619 2 : int res1 = 0 ;
7620 2 : int res2 ;
7621 2 : char *buf2 = 0 ;
7622 2 : int alloc2 = 0 ;
7623 2 : PyObject *swig_obj[2] ;
7624 2 : char *result = 0 ;
7625 :
7626 2 : if (!SWIG_Python_UnpackTuple(args, "StyleTable_Find", 2, 2, swig_obj)) SWIG_fail;
7627 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7628 2 : if (!SWIG_IsOK(res1)) {
7629 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_Find" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7630 : }
7631 2 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7632 2 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7633 2 : if (!SWIG_IsOK(res2)) {
7634 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StyleTable_Find" "', argument " "2"" of type '" "char const *""'");
7635 : }
7636 2 : arg2 = reinterpret_cast< char * >(buf2);
7637 2 : {
7638 2 : const int bLocalUseExceptions = GetUseExceptions();
7639 2 : if ( bLocalUseExceptions ) {
7640 2 : pushErrorHandler();
7641 : }
7642 2 : {
7643 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7644 2 : result = (char *)OGRStyleTableShadow_Find(arg1,(char const *)arg2);
7645 2 : SWIG_PYTHON_THREAD_END_ALLOW;
7646 : }
7647 2 : if ( bLocalUseExceptions ) {
7648 2 : popErrorHandler();
7649 : }
7650 : #ifndef SED_HACKS
7651 : if ( bLocalUseExceptions ) {
7652 : CPLErr eclass = CPLGetLastErrorType();
7653 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7654 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7655 : }
7656 : }
7657 : #endif
7658 : }
7659 2 : resultobj = SWIG_FromCharPtr((const char *)result);
7660 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7661 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7662 : return resultobj;
7663 0 : fail:
7664 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7665 : return NULL;
7666 : }
7667 :
7668 :
7669 1 : SWIGINTERN PyObject *_wrap_StyleTable_ResetStyleStringReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7670 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7671 1 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7672 1 : void *argp1 = 0 ;
7673 1 : int res1 = 0 ;
7674 1 : PyObject *swig_obj[1] ;
7675 :
7676 1 : if (!args) SWIG_fail;
7677 1 : swig_obj[0] = args;
7678 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7679 1 : if (!SWIG_IsOK(res1)) {
7680 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_ResetStyleStringReading" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7681 : }
7682 1 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7683 1 : {
7684 1 : const int bLocalUseExceptions = GetUseExceptions();
7685 1 : if ( bLocalUseExceptions ) {
7686 1 : pushErrorHandler();
7687 : }
7688 1 : {
7689 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7690 1 : OGRStyleTableShadow_ResetStyleStringReading(arg1);
7691 1 : SWIG_PYTHON_THREAD_END_ALLOW;
7692 : }
7693 1 : if ( bLocalUseExceptions ) {
7694 1 : popErrorHandler();
7695 : }
7696 : #ifndef SED_HACKS
7697 : if ( bLocalUseExceptions ) {
7698 : CPLErr eclass = CPLGetLastErrorType();
7699 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7700 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7701 : }
7702 : }
7703 : #endif
7704 : }
7705 1 : resultobj = SWIG_Py_Void();
7706 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7707 : return resultobj;
7708 : fail:
7709 : return NULL;
7710 : }
7711 :
7712 :
7713 5 : SWIGINTERN PyObject *_wrap_StyleTable_GetNextStyle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7714 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7715 5 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7716 5 : void *argp1 = 0 ;
7717 5 : int res1 = 0 ;
7718 5 : PyObject *swig_obj[1] ;
7719 5 : char *result = 0 ;
7720 :
7721 5 : if (!args) SWIG_fail;
7722 5 : swig_obj[0] = args;
7723 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7724 5 : if (!SWIG_IsOK(res1)) {
7725 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_GetNextStyle" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7726 : }
7727 5 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7728 5 : {
7729 5 : const int bLocalUseExceptions = GetUseExceptions();
7730 5 : if ( bLocalUseExceptions ) {
7731 5 : pushErrorHandler();
7732 : }
7733 5 : {
7734 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7735 5 : result = (char *)OGRStyleTableShadow_GetNextStyle(arg1);
7736 5 : SWIG_PYTHON_THREAD_END_ALLOW;
7737 : }
7738 5 : if ( bLocalUseExceptions ) {
7739 5 : popErrorHandler();
7740 : }
7741 : #ifndef SED_HACKS
7742 : if ( bLocalUseExceptions ) {
7743 : CPLErr eclass = CPLGetLastErrorType();
7744 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7745 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7746 : }
7747 : }
7748 : #endif
7749 : }
7750 5 : resultobj = SWIG_FromCharPtr((const char *)result);
7751 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7752 : return resultobj;
7753 : fail:
7754 : return NULL;
7755 : }
7756 :
7757 :
7758 1 : SWIGINTERN PyObject *_wrap_StyleTable_GetLastStyleName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7759 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7760 1 : OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
7761 1 : void *argp1 = 0 ;
7762 1 : int res1 = 0 ;
7763 1 : PyObject *swig_obj[1] ;
7764 1 : char *result = 0 ;
7765 :
7766 1 : if (!args) SWIG_fail;
7767 1 : swig_obj[0] = args;
7768 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
7769 1 : if (!SWIG_IsOK(res1)) {
7770 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_GetLastStyleName" "', argument " "1"" of type '" "OGRStyleTableShadow *""'");
7771 : }
7772 1 : arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
7773 1 : {
7774 1 : const int bLocalUseExceptions = GetUseExceptions();
7775 1 : if ( bLocalUseExceptions ) {
7776 1 : pushErrorHandler();
7777 : }
7778 1 : {
7779 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7780 1 : result = (char *)OGRStyleTableShadow_GetLastStyleName(arg1);
7781 1 : SWIG_PYTHON_THREAD_END_ALLOW;
7782 : }
7783 1 : if ( bLocalUseExceptions ) {
7784 1 : popErrorHandler();
7785 : }
7786 : #ifndef SED_HACKS
7787 : if ( bLocalUseExceptions ) {
7788 : CPLErr eclass = CPLGetLastErrorType();
7789 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7790 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7791 : }
7792 : }
7793 : #endif
7794 : }
7795 1 : resultobj = SWIG_FromCharPtr((const char *)result);
7796 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7797 : return resultobj;
7798 : fail:
7799 : return NULL;
7800 : }
7801 :
7802 :
7803 271 : SWIGINTERN PyObject *StyleTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7804 271 : PyObject *obj;
7805 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
7806 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRStyleTableShadow, SWIG_NewClientData(obj));
7807 271 : return SWIG_Py_Void();
7808 : }
7809 :
7810 3 : SWIGINTERN PyObject *StyleTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7811 3 : return SWIG_Python_InitShadowInstance(args);
7812 : }
7813 :
7814 4 : SWIGINTERN PyObject *_wrap_new_ArrowArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7815 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7816 4 : ArrowArray *result = 0 ;
7817 :
7818 4 : if (!SWIG_Python_UnpackTuple(args, "new_ArrowArray", 0, 0, 0)) SWIG_fail;
7819 4 : {
7820 4 : const int bLocalUseExceptions = GetUseExceptions();
7821 4 : if ( bLocalUseExceptions ) {
7822 4 : pushErrorHandler();
7823 : }
7824 4 : {
7825 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7826 4 : result = (ArrowArray *)new_ArrowArray();
7827 4 : SWIG_PYTHON_THREAD_END_ALLOW;
7828 : }
7829 4 : if ( bLocalUseExceptions ) {
7830 4 : popErrorHandler();
7831 : }
7832 : #ifndef SED_HACKS
7833 : if ( bLocalUseExceptions ) {
7834 : CPLErr eclass = CPLGetLastErrorType();
7835 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7836 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7837 : }
7838 : }
7839 : #endif
7840 : }
7841 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArray, SWIG_POINTER_NEW | 0 );
7842 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7843 : return resultobj;
7844 0 : fail:
7845 0 : return NULL;
7846 : }
7847 :
7848 :
7849 565 : SWIGINTERN PyObject *_wrap_delete_ArrowArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7850 565 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7851 565 : ArrowArray *arg1 = (ArrowArray *) 0 ;
7852 565 : void *argp1 = 0 ;
7853 565 : int res1 = 0 ;
7854 565 : PyObject *swig_obj[1] ;
7855 :
7856 565 : if (!args) SWIG_fail;
7857 565 : swig_obj[0] = args;
7858 565 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, SWIG_POINTER_DISOWN | 0 );
7859 565 : if (!SWIG_IsOK(res1)) {
7860 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowArray" "', argument " "1"" of type '" "ArrowArray *""'");
7861 : }
7862 565 : arg1 = reinterpret_cast< ArrowArray * >(argp1);
7863 565 : {
7864 565 : const int bLocalUseExceptions = GetUseExceptions();
7865 565 : if ( bLocalUseExceptions ) {
7866 229 : pushErrorHandler();
7867 : }
7868 565 : {
7869 565 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7870 565 : delete_ArrowArray(arg1);
7871 565 : SWIG_PYTHON_THREAD_END_ALLOW;
7872 : }
7873 565 : if ( bLocalUseExceptions ) {
7874 229 : popErrorHandler();
7875 : }
7876 : #ifndef SED_HACKS
7877 : if ( bLocalUseExceptions ) {
7878 : CPLErr eclass = CPLGetLastErrorType();
7879 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7880 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7881 : }
7882 : }
7883 : #endif
7884 : }
7885 565 : resultobj = SWIG_Py_Void();
7886 565 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7887 : return resultobj;
7888 : fail:
7889 : return NULL;
7890 : }
7891 :
7892 :
7893 521 : SWIGINTERN PyObject *_wrap_ArrowArray__getPtr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7894 521 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7895 521 : ArrowArray *arg1 = (ArrowArray *) 0 ;
7896 521 : void *argp1 = 0 ;
7897 521 : int res1 = 0 ;
7898 521 : PyObject *swig_obj[1] ;
7899 521 : VoidPtrAsLong result;
7900 :
7901 521 : if (!args) SWIG_fail;
7902 521 : swig_obj[0] = args;
7903 521 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 | 0 );
7904 521 : if (!SWIG_IsOK(res1)) {
7905 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray__getPtr" "', argument " "1"" of type '" "ArrowArray *""'");
7906 : }
7907 521 : arg1 = reinterpret_cast< ArrowArray * >(argp1);
7908 521 : {
7909 521 : const int bLocalUseExceptions = GetUseExceptions();
7910 521 : if ( bLocalUseExceptions ) {
7911 186 : pushErrorHandler();
7912 : }
7913 521 : {
7914 521 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7915 521 : result = (VoidPtrAsLong)ArrowArray__getPtr(arg1);
7916 521 : SWIG_PYTHON_THREAD_END_ALLOW;
7917 : }
7918 521 : if ( bLocalUseExceptions ) {
7919 186 : popErrorHandler();
7920 : }
7921 : #ifndef SED_HACKS
7922 : if ( bLocalUseExceptions ) {
7923 : CPLErr eclass = CPLGetLastErrorType();
7924 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7925 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7926 : }
7927 : }
7928 : #endif
7929 : }
7930 521 : {
7931 521 : resultobj = PyLong_FromVoidPtr(result);
7932 : }
7933 521 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7934 : return resultobj;
7935 : fail:
7936 : return NULL;
7937 : }
7938 :
7939 :
7940 1 : SWIGINTERN PyObject *_wrap_ArrowArray_GetChildrenCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7941 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7942 1 : ArrowArray *arg1 = (ArrowArray *) 0 ;
7943 1 : void *argp1 = 0 ;
7944 1 : int res1 = 0 ;
7945 1 : PyObject *swig_obj[1] ;
7946 1 : GIntBig result;
7947 :
7948 1 : if (!args) SWIG_fail;
7949 1 : swig_obj[0] = args;
7950 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 | 0 );
7951 1 : if (!SWIG_IsOK(res1)) {
7952 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray_GetChildrenCount" "', argument " "1"" of type '" "ArrowArray *""'");
7953 : }
7954 1 : arg1 = reinterpret_cast< ArrowArray * >(argp1);
7955 1 : {
7956 1 : const int bLocalUseExceptions = GetUseExceptions();
7957 1 : if ( bLocalUseExceptions ) {
7958 0 : pushErrorHandler();
7959 : }
7960 1 : {
7961 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
7962 1 : result = ArrowArray_GetChildrenCount(arg1);
7963 1 : SWIG_PYTHON_THREAD_END_ALLOW;
7964 : }
7965 1 : if ( bLocalUseExceptions ) {
7966 0 : popErrorHandler();
7967 : }
7968 : #ifndef SED_HACKS
7969 : if ( bLocalUseExceptions ) {
7970 : CPLErr eclass = CPLGetLastErrorType();
7971 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7972 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7973 : }
7974 : }
7975 : #endif
7976 : }
7977 1 : {
7978 1 : resultobj = PyLong_FromLongLong(result);
7979 : }
7980 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
7981 : return resultobj;
7982 : fail:
7983 : return NULL;
7984 : }
7985 :
7986 :
7987 0 : SWIGINTERN PyObject *_wrap_ArrowArray_GetLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7988 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7989 0 : ArrowArray *arg1 = (ArrowArray *) 0 ;
7990 0 : void *argp1 = 0 ;
7991 0 : int res1 = 0 ;
7992 0 : PyObject *swig_obj[1] ;
7993 0 : GIntBig result;
7994 :
7995 0 : if (!args) SWIG_fail;
7996 0 : swig_obj[0] = args;
7997 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 | 0 );
7998 0 : if (!SWIG_IsOK(res1)) {
7999 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray_GetLength" "', argument " "1"" of type '" "ArrowArray *""'");
8000 : }
8001 0 : arg1 = reinterpret_cast< ArrowArray * >(argp1);
8002 0 : {
8003 0 : const int bLocalUseExceptions = GetUseExceptions();
8004 0 : if ( bLocalUseExceptions ) {
8005 0 : pushErrorHandler();
8006 : }
8007 0 : {
8008 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8009 0 : result = ArrowArray_GetLength(arg1);
8010 0 : SWIG_PYTHON_THREAD_END_ALLOW;
8011 : }
8012 0 : if ( bLocalUseExceptions ) {
8013 0 : popErrorHandler();
8014 : }
8015 : #ifndef SED_HACKS
8016 : if ( bLocalUseExceptions ) {
8017 : CPLErr eclass = CPLGetLastErrorType();
8018 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8019 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8020 : }
8021 : }
8022 : #endif
8023 : }
8024 0 : {
8025 0 : resultobj = PyLong_FromLongLong(result);
8026 : }
8027 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8028 : return resultobj;
8029 : fail:
8030 : return NULL;
8031 : }
8032 :
8033 :
8034 271 : SWIGINTERN PyObject *ArrowArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8035 271 : PyObject *obj;
8036 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
8037 271 : SWIG_TypeNewClientData(SWIGTYPE_p_ArrowArray, SWIG_NewClientData(obj));
8038 271 : return SWIG_Py_Void();
8039 : }
8040 :
8041 4 : SWIGINTERN PyObject *ArrowArray_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8042 4 : return SWIG_Python_InitShadowInstance(args);
8043 : }
8044 :
8045 126 : SWIGINTERN PyObject *_wrap_new_ArrowSchema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8046 126 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8047 126 : ArrowSchema *result = 0 ;
8048 :
8049 126 : if (!SWIG_Python_UnpackTuple(args, "new_ArrowSchema", 0, 0, 0)) SWIG_fail;
8050 126 : {
8051 126 : const int bLocalUseExceptions = GetUseExceptions();
8052 126 : if ( bLocalUseExceptions ) {
8053 126 : pushErrorHandler();
8054 : }
8055 126 : {
8056 126 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8057 126 : result = (ArrowSchema *)new_ArrowSchema();
8058 126 : SWIG_PYTHON_THREAD_END_ALLOW;
8059 : }
8060 126 : if ( bLocalUseExceptions ) {
8061 126 : popErrorHandler();
8062 : }
8063 : #ifndef SED_HACKS
8064 : if ( bLocalUseExceptions ) {
8065 : CPLErr eclass = CPLGetLastErrorType();
8066 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8067 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8068 : }
8069 : }
8070 : #endif
8071 : }
8072 126 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, SWIG_POINTER_NEW | 0 );
8073 126 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8074 : return resultobj;
8075 0 : fail:
8076 0 : return NULL;
8077 : }
8078 :
8079 :
8080 496 : SWIGINTERN PyObject *_wrap_delete_ArrowSchema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8081 496 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8082 496 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8083 496 : void *argp1 = 0 ;
8084 496 : int res1 = 0 ;
8085 496 : PyObject *swig_obj[1] ;
8086 :
8087 496 : if (!args) SWIG_fail;
8088 496 : swig_obj[0] = args;
8089 496 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, SWIG_POINTER_DISOWN | 0 );
8090 496 : if (!SWIG_IsOK(res1)) {
8091 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowSchema" "', argument " "1"" of type '" "ArrowSchema *""'");
8092 : }
8093 496 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8094 496 : {
8095 496 : const int bLocalUseExceptions = GetUseExceptions();
8096 496 : if ( bLocalUseExceptions ) {
8097 358 : pushErrorHandler();
8098 : }
8099 496 : {
8100 496 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8101 496 : delete_ArrowSchema(arg1);
8102 496 : SWIG_PYTHON_THREAD_END_ALLOW;
8103 : }
8104 496 : if ( bLocalUseExceptions ) {
8105 358 : popErrorHandler();
8106 : }
8107 : #ifndef SED_HACKS
8108 : if ( bLocalUseExceptions ) {
8109 : CPLErr eclass = CPLGetLastErrorType();
8110 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8111 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8112 : }
8113 : }
8114 : #endif
8115 : }
8116 496 : resultobj = SWIG_Py_Void();
8117 496 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8118 : return resultobj;
8119 : fail:
8120 : return NULL;
8121 : }
8122 :
8123 :
8124 675 : SWIGINTERN PyObject *_wrap_ArrowSchema__getPtr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8125 675 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8126 675 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8127 675 : void *argp1 = 0 ;
8128 675 : int res1 = 0 ;
8129 675 : PyObject *swig_obj[1] ;
8130 675 : VoidPtrAsLong result;
8131 :
8132 675 : if (!args) SWIG_fail;
8133 675 : swig_obj[0] = args;
8134 675 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 | 0 );
8135 675 : if (!SWIG_IsOK(res1)) {
8136 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema__getPtr" "', argument " "1"" of type '" "ArrowSchema *""'");
8137 : }
8138 675 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8139 675 : {
8140 675 : const int bLocalUseExceptions = GetUseExceptions();
8141 675 : if ( bLocalUseExceptions ) {
8142 332 : pushErrorHandler();
8143 : }
8144 675 : {
8145 675 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8146 675 : result = (VoidPtrAsLong)ArrowSchema__getPtr(arg1);
8147 675 : SWIG_PYTHON_THREAD_END_ALLOW;
8148 : }
8149 675 : if ( bLocalUseExceptions ) {
8150 332 : popErrorHandler();
8151 : }
8152 : #ifndef SED_HACKS
8153 : if ( bLocalUseExceptions ) {
8154 : CPLErr eclass = CPLGetLastErrorType();
8155 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8156 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8157 : }
8158 : }
8159 : #endif
8160 : }
8161 675 : {
8162 675 : resultobj = PyLong_FromVoidPtr(result);
8163 : }
8164 675 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8165 : return resultobj;
8166 : fail:
8167 : return NULL;
8168 : }
8169 :
8170 :
8171 427 : SWIGINTERN PyObject *_wrap_ArrowSchema_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8172 427 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8173 427 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8174 427 : void *argp1 = 0 ;
8175 427 : int res1 = 0 ;
8176 427 : PyObject *swig_obj[1] ;
8177 427 : char *result = 0 ;
8178 :
8179 427 : if (!args) SWIG_fail;
8180 427 : swig_obj[0] = args;
8181 427 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 | 0 );
8182 427 : if (!SWIG_IsOK(res1)) {
8183 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetName" "', argument " "1"" of type '" "ArrowSchema *""'");
8184 : }
8185 427 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8186 427 : {
8187 427 : const int bLocalUseExceptions = GetUseExceptions();
8188 427 : if ( bLocalUseExceptions ) {
8189 427 : pushErrorHandler();
8190 : }
8191 427 : {
8192 427 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8193 427 : result = (char *)ArrowSchema_GetName(arg1);
8194 427 : SWIG_PYTHON_THREAD_END_ALLOW;
8195 : }
8196 427 : if ( bLocalUseExceptions ) {
8197 427 : popErrorHandler();
8198 : }
8199 : #ifndef SED_HACKS
8200 : if ( bLocalUseExceptions ) {
8201 : CPLErr eclass = CPLGetLastErrorType();
8202 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8203 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8204 : }
8205 : }
8206 : #endif
8207 : }
8208 427 : resultobj = SWIG_FromCharPtr((const char *)result);
8209 427 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8210 : return resultobj;
8211 : fail:
8212 : return NULL;
8213 : }
8214 :
8215 :
8216 26 : SWIGINTERN PyObject *_wrap_ArrowSchema_GetChildrenCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8217 26 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8218 26 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8219 26 : void *argp1 = 0 ;
8220 26 : int res1 = 0 ;
8221 26 : PyObject *swig_obj[1] ;
8222 26 : GIntBig result;
8223 :
8224 26 : if (!args) SWIG_fail;
8225 26 : swig_obj[0] = args;
8226 26 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 | 0 );
8227 26 : if (!SWIG_IsOK(res1)) {
8228 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetChildrenCount" "', argument " "1"" of type '" "ArrowSchema *""'");
8229 : }
8230 26 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8231 26 : {
8232 26 : const int bLocalUseExceptions = GetUseExceptions();
8233 26 : if ( bLocalUseExceptions ) {
8234 26 : pushErrorHandler();
8235 : }
8236 26 : {
8237 26 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8238 26 : result = ArrowSchema_GetChildrenCount(arg1);
8239 26 : SWIG_PYTHON_THREAD_END_ALLOW;
8240 : }
8241 26 : if ( bLocalUseExceptions ) {
8242 26 : popErrorHandler();
8243 : }
8244 : #ifndef SED_HACKS
8245 : if ( bLocalUseExceptions ) {
8246 : CPLErr eclass = CPLGetLastErrorType();
8247 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8248 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8249 : }
8250 : }
8251 : #endif
8252 : }
8253 26 : {
8254 26 : resultobj = PyLong_FromLongLong(result);
8255 : }
8256 26 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8257 : return resultobj;
8258 : fail:
8259 : return NULL;
8260 : }
8261 :
8262 :
8263 832 : SWIGINTERN PyObject *_wrap_ArrowSchema_GetChild(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8264 832 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8265 832 : ArrowSchema *arg1 = (ArrowSchema *) 0 ;
8266 832 : int arg2 ;
8267 832 : void *argp1 = 0 ;
8268 832 : int res1 = 0 ;
8269 832 : int val2 ;
8270 832 : int ecode2 = 0 ;
8271 832 : PyObject *swig_obj[2] ;
8272 832 : ArrowSchema *result = 0 ;
8273 :
8274 832 : if (!SWIG_Python_UnpackTuple(args, "ArrowSchema_GetChild", 2, 2, swig_obj)) SWIG_fail;
8275 832 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 | 0 );
8276 832 : if (!SWIG_IsOK(res1)) {
8277 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetChild" "', argument " "1"" of type '" "ArrowSchema *""'");
8278 : }
8279 832 : arg1 = reinterpret_cast< ArrowSchema * >(argp1);
8280 832 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8281 832 : if (!SWIG_IsOK(ecode2)) {
8282 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrowSchema_GetChild" "', argument " "2"" of type '" "int""'");
8283 : }
8284 832 : arg2 = static_cast< int >(val2);
8285 832 : {
8286 832 : const int bLocalUseExceptions = GetUseExceptions();
8287 832 : if ( bLocalUseExceptions ) {
8288 832 : pushErrorHandler();
8289 : }
8290 832 : {
8291 832 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8292 832 : result = (ArrowSchema *)ArrowSchema_GetChild(arg1,arg2);
8293 832 : SWIG_PYTHON_THREAD_END_ALLOW;
8294 : }
8295 832 : if ( bLocalUseExceptions ) {
8296 832 : 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 832 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, 0 | 0 );
8308 832 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8309 : return resultobj;
8310 : fail:
8311 : return NULL;
8312 : }
8313 :
8314 :
8315 271 : SWIGINTERN PyObject *ArrowSchema_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8316 271 : PyObject *obj;
8317 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
8318 271 : SWIG_TypeNewClientData(SWIGTYPE_p_ArrowSchema, SWIG_NewClientData(obj));
8319 271 : return SWIG_Py_Void();
8320 : }
8321 :
8322 126 : SWIGINTERN PyObject *ArrowSchema_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8323 126 : return SWIG_Python_InitShadowInstance(args);
8324 : }
8325 :
8326 340 : SWIGINTERN PyObject *_wrap_delete_ArrowArrayStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8327 340 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8328 340 : ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
8329 340 : void *argp1 = 0 ;
8330 340 : int res1 = 0 ;
8331 340 : PyObject *swig_obj[1] ;
8332 :
8333 340 : if (!args) SWIG_fail;
8334 340 : swig_obj[0] = args;
8335 340 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, SWIG_POINTER_DISOWN | 0 );
8336 340 : if (!SWIG_IsOK(res1)) {
8337 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowArrayStream" "', argument " "1"" of type '" "ArrowArrayStream *""'");
8338 : }
8339 340 : arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
8340 340 : {
8341 340 : const int bLocalUseExceptions = GetUseExceptions();
8342 340 : if ( bLocalUseExceptions ) {
8343 218 : pushErrorHandler();
8344 : }
8345 340 : {
8346 340 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8347 340 : delete_ArrowArrayStream(arg1);
8348 340 : SWIG_PYTHON_THREAD_END_ALLOW;
8349 : }
8350 340 : if ( bLocalUseExceptions ) {
8351 218 : popErrorHandler();
8352 : }
8353 : #ifndef SED_HACKS
8354 : if ( bLocalUseExceptions ) {
8355 : CPLErr eclass = CPLGetLastErrorType();
8356 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8357 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8358 : }
8359 : }
8360 : #endif
8361 : }
8362 340 : resultobj = SWIG_Py_Void();
8363 340 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8364 : return resultobj;
8365 : fail:
8366 : return NULL;
8367 : }
8368 :
8369 :
8370 370 : SWIGINTERN PyObject *_wrap_ArrowArrayStream_GetSchema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8371 370 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8372 370 : ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
8373 370 : void *argp1 = 0 ;
8374 370 : int res1 = 0 ;
8375 370 : PyObject *swig_obj[1] ;
8376 370 : ArrowSchema *result = 0 ;
8377 :
8378 370 : if (!args) SWIG_fail;
8379 370 : swig_obj[0] = args;
8380 370 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, 0 | 0 );
8381 370 : if (!SWIG_IsOK(res1)) {
8382 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArrayStream_GetSchema" "', argument " "1"" of type '" "ArrowArrayStream *""'");
8383 : }
8384 370 : arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
8385 370 : {
8386 370 : const int bLocalUseExceptions = GetUseExceptions();
8387 370 : if ( bLocalUseExceptions ) {
8388 232 : pushErrorHandler();
8389 : }
8390 370 : {
8391 370 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8392 370 : result = (ArrowSchema *)ArrowArrayStream_GetSchema(arg1);
8393 370 : SWIG_PYTHON_THREAD_END_ALLOW;
8394 : }
8395 370 : if ( bLocalUseExceptions ) {
8396 232 : popErrorHandler();
8397 : }
8398 : #ifndef SED_HACKS
8399 : if ( bLocalUseExceptions ) {
8400 : CPLErr eclass = CPLGetLastErrorType();
8401 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8402 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8403 : }
8404 : }
8405 : #endif
8406 : }
8407 370 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, SWIG_POINTER_OWN | 0 );
8408 370 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8409 : return resultobj;
8410 : fail:
8411 : return NULL;
8412 : }
8413 :
8414 :
8415 875 : SWIGINTERN PyObject *_wrap_ArrowArrayStream_GetNextRecordBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8416 875 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8417 875 : ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
8418 875 : char **arg2 = (char **) NULL ;
8419 875 : void *argp1 = 0 ;
8420 875 : int res1 = 0 ;
8421 875 : PyObject *swig_obj[2] ;
8422 875 : ArrowArray *result = 0 ;
8423 :
8424 875 : if (!SWIG_Python_UnpackTuple(args, "ArrowArrayStream_GetNextRecordBatch", 1, 2, swig_obj)) SWIG_fail;
8425 875 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, 0 | 0 );
8426 875 : if (!SWIG_IsOK(res1)) {
8427 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArrayStream_GetNextRecordBatch" "', argument " "1"" of type '" "ArrowArrayStream *""'");
8428 : }
8429 875 : arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
8430 875 : if (swig_obj[1]) {
8431 0 : {
8432 : /* %typemap(in) char **dict */
8433 0 : arg2 = NULL;
8434 0 : if ( PySequence_Check( swig_obj[1] ) ) {
8435 0 : int bErr = FALSE;
8436 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
8437 0 : if ( bErr )
8438 : {
8439 0 : SWIG_fail;
8440 : }
8441 : }
8442 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
8443 0 : int bErr = FALSE;
8444 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
8445 0 : if ( bErr )
8446 : {
8447 0 : SWIG_fail;
8448 : }
8449 : }
8450 : else {
8451 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
8452 0 : SWIG_fail;
8453 : }
8454 : }
8455 : }
8456 875 : {
8457 875 : const int bLocalUseExceptions = GetUseExceptions();
8458 875 : if ( bLocalUseExceptions ) {
8459 426 : pushErrorHandler();
8460 : }
8461 875 : {
8462 875 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8463 875 : result = (ArrowArray *)ArrowArrayStream_GetNextRecordBatch(arg1,arg2);
8464 875 : SWIG_PYTHON_THREAD_END_ALLOW;
8465 : }
8466 875 : if ( bLocalUseExceptions ) {
8467 426 : popErrorHandler();
8468 : }
8469 : #ifndef SED_HACKS
8470 : if ( bLocalUseExceptions ) {
8471 : CPLErr eclass = CPLGetLastErrorType();
8472 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8473 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8474 : }
8475 : }
8476 : #endif
8477 : }
8478 875 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArray, SWIG_POINTER_OWN | 0 );
8479 875 : {
8480 : /* %typemap(freearg) char **dict */
8481 875 : CSLDestroy( arg2 );
8482 : }
8483 892 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8484 : return resultobj;
8485 0 : fail:
8486 0 : {
8487 : /* %typemap(freearg) char **dict */
8488 0 : CSLDestroy( arg2 );
8489 : }
8490 : return NULL;
8491 : }
8492 :
8493 :
8494 271 : SWIGINTERN PyObject *ArrowArrayStream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8495 271 : PyObject *obj;
8496 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
8497 271 : SWIG_TypeNewClientData(SWIGTYPE_p_ArrowArrayStream, SWIG_NewClientData(obj));
8498 271 : return SWIG_Py_Void();
8499 : }
8500 :
8501 263 : SWIGINTERN PyObject *_wrap_Layer_GetDataset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8502 263 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8503 263 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8504 263 : void *argp1 = 0 ;
8505 263 : int res1 = 0 ;
8506 263 : PyObject *swig_obj[1] ;
8507 263 : GDALDatasetShadow *result = 0 ;
8508 :
8509 263 : if (!args) SWIG_fail;
8510 263 : swig_obj[0] = args;
8511 263 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8512 263 : if (!SWIG_IsOK(res1)) {
8513 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetDataset" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8514 : }
8515 263 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8516 263 : {
8517 263 : const int bLocalUseExceptions = GetUseExceptions();
8518 263 : if ( bLocalUseExceptions ) {
8519 119 : pushErrorHandler();
8520 : }
8521 263 : {
8522 263 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8523 263 : result = (GDALDatasetShadow *)OGRLayerShadow_GetDataset(arg1);
8524 263 : SWIG_PYTHON_THREAD_END_ALLOW;
8525 : }
8526 263 : if ( bLocalUseExceptions ) {
8527 119 : popErrorHandler();
8528 : }
8529 : #ifndef SED_HACKS
8530 : if ( bLocalUseExceptions ) {
8531 : CPLErr eclass = CPLGetLastErrorType();
8532 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8533 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8534 : }
8535 : }
8536 : #endif
8537 : }
8538 263 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 | 0 );
8539 263 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8540 : return resultobj;
8541 : fail:
8542 : return NULL;
8543 : }
8544 :
8545 :
8546 37 : SWIGINTERN PyObject *_wrap_Layer_Rename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8547 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8548 37 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8549 37 : char *arg2 = (char *) 0 ;
8550 37 : void *argp1 = 0 ;
8551 37 : int res1 = 0 ;
8552 37 : int res2 ;
8553 37 : char *buf2 = 0 ;
8554 37 : int alloc2 = 0 ;
8555 37 : PyObject *swig_obj[2] ;
8556 37 : OGRErr result;
8557 :
8558 37 : if (!SWIG_Python_UnpackTuple(args, "Layer_Rename", 2, 2, swig_obj)) SWIG_fail;
8559 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8560 37 : if (!SWIG_IsOK(res1)) {
8561 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Rename" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8562 : }
8563 37 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8564 37 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8565 37 : if (!SWIG_IsOK(res2)) {
8566 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Rename" "', argument " "2"" of type '" "char const *""'");
8567 : }
8568 37 : arg2 = reinterpret_cast< char * >(buf2);
8569 37 : {
8570 37 : if (!arg2) {
8571 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8572 : }
8573 : }
8574 37 : {
8575 37 : const int bLocalUseExceptions = GetUseExceptions();
8576 37 : if ( bLocalUseExceptions ) {
8577 3 : pushErrorHandler();
8578 : }
8579 37 : {
8580 37 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8581 37 : result = (OGRErr)OGRLayerShadow_Rename(arg1,(char const *)arg2);
8582 37 : SWIG_PYTHON_THREAD_END_ALLOW;
8583 : }
8584 37 : if ( bLocalUseExceptions ) {
8585 3 : popErrorHandler();
8586 : }
8587 : #ifndef SED_HACKS
8588 : if ( bLocalUseExceptions ) {
8589 : CPLErr eclass = CPLGetLastErrorType();
8590 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8591 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8592 : }
8593 : }
8594 : #endif
8595 : }
8596 37 : {
8597 : /* %typemap(out) OGRErr */
8598 53 : if ( result != 0 && GetUseExceptions()) {
8599 0 : const char* pszMessage = CPLGetLastErrorMsg();
8600 0 : if( pszMessage[0] != '\0' )
8601 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8602 : else
8603 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8604 0 : SWIG_fail;
8605 : }
8606 : }
8607 37 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8608 37 : {
8609 : /* %typemap(ret) OGRErr */
8610 37 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8611 37 : resultobj = PyInt_FromLong( result );
8612 : }
8613 : }
8614 37 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8615 : return resultobj;
8616 0 : fail:
8617 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8618 : return NULL;
8619 : }
8620 :
8621 :
8622 0 : SWIGINTERN PyObject *_wrap_Layer_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8623 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8624 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8625 0 : void *argp1 = 0 ;
8626 0 : int res1 = 0 ;
8627 0 : PyObject *swig_obj[1] ;
8628 0 : int result;
8629 :
8630 0 : if (!args) SWIG_fail;
8631 0 : swig_obj[0] = args;
8632 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8633 0 : if (!SWIG_IsOK(res1)) {
8634 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetRefCount" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8635 : }
8636 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8637 0 : {
8638 0 : const int bLocalUseExceptions = GetUseExceptions();
8639 0 : if ( bLocalUseExceptions ) {
8640 0 : pushErrorHandler();
8641 : }
8642 0 : {
8643 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8644 0 : result = (int)OGRLayerShadow_GetRefCount(arg1);
8645 0 : SWIG_PYTHON_THREAD_END_ALLOW;
8646 : }
8647 0 : if ( bLocalUseExceptions ) {
8648 0 : popErrorHandler();
8649 : }
8650 : #ifndef SED_HACKS
8651 : if ( bLocalUseExceptions ) {
8652 : CPLErr eclass = CPLGetLastErrorType();
8653 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8654 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8655 : }
8656 : }
8657 : #endif
8658 : }
8659 0 : resultobj = SWIG_From_int(static_cast< int >(result));
8660 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8661 : return resultobj;
8662 : fail:
8663 : return NULL;
8664 : }
8665 :
8666 :
8667 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
8668 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8669 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8670 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
8671 : void *argp1 = 0 ;
8672 : int res1 = 0 ;
8673 : void *argp2 = 0 ;
8674 : int res2 = 0 ;
8675 :
8676 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
8677 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8678 : if (!SWIG_IsOK(res1)) {
8679 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8680 : }
8681 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8682 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
8683 : if (!SWIG_IsOK(res2)) {
8684 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
8685 : }
8686 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
8687 : {
8688 : const int bLocalUseExceptions = GetUseExceptions();
8689 : if ( bLocalUseExceptions ) {
8690 : pushErrorHandler();
8691 : }
8692 : {
8693 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8694 : OGRLayerShadow_SetSpatialFilter__SWIG_0(arg1,arg2);
8695 : SWIG_PYTHON_THREAD_END_ALLOW;
8696 : }
8697 : if ( bLocalUseExceptions ) {
8698 : popErrorHandler();
8699 : }
8700 : #ifndef SED_HACKS
8701 : if ( bLocalUseExceptions ) {
8702 : CPLErr eclass = CPLGetLastErrorType();
8703 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8704 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8705 : }
8706 : }
8707 : #endif
8708 : }
8709 : resultobj = SWIG_Py_Void();
8710 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8711 : return resultobj;
8712 : fail:
8713 : return NULL;
8714 : }
8715 :
8716 :
8717 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
8718 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8719 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8720 : double arg2 ;
8721 : double arg3 ;
8722 : double arg4 ;
8723 : double arg5 ;
8724 : void *argp1 = 0 ;
8725 : int res1 = 0 ;
8726 : double val2 ;
8727 : int ecode2 = 0 ;
8728 : double val3 ;
8729 : int ecode3 = 0 ;
8730 : double val4 ;
8731 : int ecode4 = 0 ;
8732 : double val5 ;
8733 : int ecode5 = 0 ;
8734 :
8735 : if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
8736 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8737 : if (!SWIG_IsOK(res1)) {
8738 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8739 : }
8740 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8741 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
8742 : if (!SWIG_IsOK(ecode2)) {
8743 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "double""'");
8744 : }
8745 : arg2 = static_cast< double >(val2);
8746 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8747 : if (!SWIG_IsOK(ecode3)) {
8748 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
8749 : }
8750 : arg3 = static_cast< double >(val3);
8751 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
8752 : if (!SWIG_IsOK(ecode4)) {
8753 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
8754 : }
8755 : arg4 = static_cast< double >(val4);
8756 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
8757 : if (!SWIG_IsOK(ecode5)) {
8758 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
8759 : }
8760 : arg5 = static_cast< double >(val5);
8761 : {
8762 : const int bLocalUseExceptions = GetUseExceptions();
8763 : if ( bLocalUseExceptions ) {
8764 : pushErrorHandler();
8765 : }
8766 : {
8767 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8768 : OGRLayerShadow_SetSpatialFilterRect__SWIG_0(arg1,arg2,arg3,arg4,arg5);
8769 : SWIG_PYTHON_THREAD_END_ALLOW;
8770 : }
8771 : if ( bLocalUseExceptions ) {
8772 : popErrorHandler();
8773 : }
8774 : #ifndef SED_HACKS
8775 : if ( bLocalUseExceptions ) {
8776 : CPLErr eclass = CPLGetLastErrorType();
8777 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8778 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8779 : }
8780 : }
8781 : #endif
8782 : }
8783 : resultobj = SWIG_Py_Void();
8784 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8785 : return resultobj;
8786 : fail:
8787 : return NULL;
8788 : }
8789 :
8790 :
8791 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
8792 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8793 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8794 : int arg2 ;
8795 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
8796 : void *argp1 = 0 ;
8797 : int res1 = 0 ;
8798 : int val2 ;
8799 : int ecode2 = 0 ;
8800 : void *argp3 = 0 ;
8801 : int res3 = 0 ;
8802 :
8803 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
8804 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8805 : if (!SWIG_IsOK(res1)) {
8806 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8807 : }
8808 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8809 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8810 : if (!SWIG_IsOK(ecode2)) {
8811 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "int""'");
8812 : }
8813 : arg2 = static_cast< int >(val2);
8814 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
8815 : if (!SWIG_IsOK(res3)) {
8816 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SetSpatialFilter" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
8817 : }
8818 : arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
8819 : {
8820 : const int bLocalUseExceptions = GetUseExceptions();
8821 : if ( bLocalUseExceptions ) {
8822 : pushErrorHandler();
8823 : }
8824 : {
8825 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8826 : OGRLayerShadow_SetSpatialFilter__SWIG_1(arg1,arg2,arg3);
8827 : SWIG_PYTHON_THREAD_END_ALLOW;
8828 : }
8829 : if ( bLocalUseExceptions ) {
8830 : popErrorHandler();
8831 : }
8832 : #ifndef SED_HACKS
8833 : if ( bLocalUseExceptions ) {
8834 : CPLErr eclass = CPLGetLastErrorType();
8835 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8836 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8837 : }
8838 : }
8839 : #endif
8840 : }
8841 : resultobj = SWIG_Py_Void();
8842 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8843 : return resultobj;
8844 : fail:
8845 : return NULL;
8846 : }
8847 :
8848 :
8849 484 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter(PyObject *self, PyObject *args) {
8850 484 : Py_ssize_t argc;
8851 484 : PyObject *argv[4] = {
8852 : 0
8853 : };
8854 :
8855 484 : if (!(argc = SWIG_Python_UnpackTuple(args, "Layer_SetSpatialFilter", 0, 3, argv))) SWIG_fail;
8856 484 : --argc;
8857 484 : if (argc == 2) {
8858 472 : int _v;
8859 472 : void *vptr = 0;
8860 472 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
8861 472 : _v = SWIG_CheckState(res);
8862 472 : if (_v) {
8863 472 : void *vptr = 0;
8864 472 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
8865 472 : _v = SWIG_CheckState(res);
8866 0 : if (_v) {
8867 472 : return _wrap_Layer_SetSpatialFilter__SWIG_0(self, argc, argv);
8868 : }
8869 : }
8870 : }
8871 12 : if (argc == 3) {
8872 12 : int _v;
8873 12 : void *vptr = 0;
8874 12 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
8875 12 : _v = SWIG_CheckState(res);
8876 12 : if (_v) {
8877 12 : {
8878 12 : int res = SWIG_AsVal_int(argv[1], NULL);
8879 12 : _v = SWIG_CheckState(res);
8880 : }
8881 12 : if (_v) {
8882 12 : void *vptr = 0;
8883 12 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
8884 12 : _v = SWIG_CheckState(res);
8885 0 : if (_v) {
8886 12 : return _wrap_Layer_SetSpatialFilter__SWIG_1(self, argc, argv);
8887 : }
8888 : }
8889 : }
8890 : }
8891 :
8892 0 : fail:
8893 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Layer_SetSpatialFilter'.\n"
8894 : " Possible C/C++ prototypes are:\n"
8895 : " OGRLayerShadow::SetSpatialFilter(OGRGeometryShadow *)\n"
8896 : " OGRLayerShadow::SetSpatialFilter(int,OGRGeometryShadow *)\n");
8897 : return 0;
8898 : }
8899 :
8900 :
8901 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
8902 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8903 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8904 : int arg2 ;
8905 : double arg3 ;
8906 : double arg4 ;
8907 : double arg5 ;
8908 : double arg6 ;
8909 : void *argp1 = 0 ;
8910 : int res1 = 0 ;
8911 : int val2 ;
8912 : int ecode2 = 0 ;
8913 : double val3 ;
8914 : int ecode3 = 0 ;
8915 : double val4 ;
8916 : int ecode4 = 0 ;
8917 : double val5 ;
8918 : int ecode5 = 0 ;
8919 : double val6 ;
8920 : int ecode6 = 0 ;
8921 :
8922 : if ((nobjs < 6) || (nobjs > 6)) SWIG_fail;
8923 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8924 : if (!SWIG_IsOK(res1)) {
8925 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8926 : }
8927 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8928 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8929 : if (!SWIG_IsOK(ecode2)) {
8930 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "int""'");
8931 : }
8932 : arg2 = static_cast< int >(val2);
8933 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8934 : if (!SWIG_IsOK(ecode3)) {
8935 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
8936 : }
8937 : arg3 = static_cast< double >(val3);
8938 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
8939 : if (!SWIG_IsOK(ecode4)) {
8940 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
8941 : }
8942 : arg4 = static_cast< double >(val4);
8943 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
8944 : if (!SWIG_IsOK(ecode5)) {
8945 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
8946 : }
8947 : arg5 = static_cast< double >(val5);
8948 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
8949 : if (!SWIG_IsOK(ecode6)) {
8950 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_SetSpatialFilterRect" "', argument " "6"" of type '" "double""'");
8951 : }
8952 : arg6 = static_cast< double >(val6);
8953 : {
8954 : const int bLocalUseExceptions = GetUseExceptions();
8955 : if ( bLocalUseExceptions ) {
8956 : pushErrorHandler();
8957 : }
8958 : {
8959 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
8960 : OGRLayerShadow_SetSpatialFilterRect__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
8961 : SWIG_PYTHON_THREAD_END_ALLOW;
8962 : }
8963 : if ( bLocalUseExceptions ) {
8964 : popErrorHandler();
8965 : }
8966 : #ifndef SED_HACKS
8967 : if ( bLocalUseExceptions ) {
8968 : CPLErr eclass = CPLGetLastErrorType();
8969 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8970 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8971 : }
8972 : }
8973 : #endif
8974 : }
8975 : resultobj = SWIG_Py_Void();
8976 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
8977 : return resultobj;
8978 : fail:
8979 : return NULL;
8980 : }
8981 :
8982 :
8983 47437 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect(PyObject *self, PyObject *args) {
8984 47437 : Py_ssize_t argc;
8985 47437 : PyObject *argv[7] = {
8986 : 0
8987 : };
8988 :
8989 47437 : if (!(argc = SWIG_Python_UnpackTuple(args, "Layer_SetSpatialFilterRect", 0, 6, argv))) SWIG_fail;
8990 47437 : --argc;
8991 47437 : if (argc == 5) {
8992 47422 : int _v;
8993 47422 : void *vptr = 0;
8994 47422 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
8995 47422 : _v = SWIG_CheckState(res);
8996 47422 : if (_v) {
8997 47422 : {
8998 47422 : int res = SWIG_AsVal_double(argv[1], NULL);
8999 47422 : _v = SWIG_CheckState(res);
9000 : }
9001 47422 : if (_v) {
9002 47422 : {
9003 47422 : int res = SWIG_AsVal_double(argv[2], NULL);
9004 47422 : _v = SWIG_CheckState(res);
9005 : }
9006 47422 : if (_v) {
9007 47422 : {
9008 47422 : int res = SWIG_AsVal_double(argv[3], NULL);
9009 47422 : _v = SWIG_CheckState(res);
9010 : }
9011 47422 : if (_v) {
9012 47422 : {
9013 47422 : int res = SWIG_AsVal_double(argv[4], NULL);
9014 47422 : _v = SWIG_CheckState(res);
9015 : }
9016 47422 : if (_v) {
9017 47422 : return _wrap_Layer_SetSpatialFilterRect__SWIG_0(self, argc, argv);
9018 : }
9019 : }
9020 : }
9021 : }
9022 : }
9023 : }
9024 15 : if (argc == 6) {
9025 15 : int _v;
9026 15 : void *vptr = 0;
9027 15 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
9028 15 : _v = SWIG_CheckState(res);
9029 15 : if (_v) {
9030 15 : {
9031 15 : int res = SWIG_AsVal_int(argv[1], NULL);
9032 15 : _v = SWIG_CheckState(res);
9033 : }
9034 15 : if (_v) {
9035 15 : {
9036 15 : int res = SWIG_AsVal_double(argv[2], NULL);
9037 15 : _v = SWIG_CheckState(res);
9038 : }
9039 15 : if (_v) {
9040 15 : {
9041 15 : int res = SWIG_AsVal_double(argv[3], NULL);
9042 15 : _v = SWIG_CheckState(res);
9043 : }
9044 15 : if (_v) {
9045 15 : {
9046 15 : int res = SWIG_AsVal_double(argv[4], NULL);
9047 15 : _v = SWIG_CheckState(res);
9048 : }
9049 15 : if (_v) {
9050 15 : {
9051 15 : int res = SWIG_AsVal_double(argv[5], NULL);
9052 15 : _v = SWIG_CheckState(res);
9053 : }
9054 15 : if (_v) {
9055 15 : return _wrap_Layer_SetSpatialFilterRect__SWIG_1(self, argc, argv);
9056 : }
9057 : }
9058 : }
9059 : }
9060 : }
9061 : }
9062 : }
9063 :
9064 0 : fail:
9065 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Layer_SetSpatialFilterRect'.\n"
9066 : " Possible C/C++ prototypes are:\n"
9067 : " OGRLayerShadow::SetSpatialFilterRect(double,double,double,double)\n"
9068 : " OGRLayerShadow::SetSpatialFilterRect(int,double,double,double,double)\n");
9069 : return 0;
9070 : }
9071 :
9072 :
9073 5 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9074 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9075 5 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9076 5 : void *argp1 = 0 ;
9077 5 : int res1 = 0 ;
9078 5 : PyObject *swig_obj[1] ;
9079 5 : OGRGeometryShadow *result = 0 ;
9080 :
9081 5 : if (!args) SWIG_fail;
9082 5 : swig_obj[0] = args;
9083 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9084 5 : if (!SWIG_IsOK(res1)) {
9085 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9086 : }
9087 5 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9088 5 : {
9089 5 : const int bLocalUseExceptions = GetUseExceptions();
9090 5 : if ( bLocalUseExceptions ) {
9091 1 : pushErrorHandler();
9092 : }
9093 5 : {
9094 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9095 5 : result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
9096 5 : SWIG_PYTHON_THREAD_END_ALLOW;
9097 : }
9098 5 : if ( bLocalUseExceptions ) {
9099 1 : popErrorHandler();
9100 : }
9101 : #ifndef SED_HACKS
9102 : if ( bLocalUseExceptions ) {
9103 : CPLErr eclass = CPLGetLastErrorType();
9104 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9105 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9106 : }
9107 : }
9108 : #endif
9109 : }
9110 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
9111 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9112 : return resultobj;
9113 : fail:
9114 : return NULL;
9115 : }
9116 :
9117 :
9118 1232 : SWIGINTERN PyObject *_wrap_Layer_SetAttributeFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9119 1232 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9120 1232 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9121 1232 : char *arg2 = (char *) 0 ;
9122 1232 : void *argp1 = 0 ;
9123 1232 : int res1 = 0 ;
9124 1232 : int res2 ;
9125 1232 : char *buf2 = 0 ;
9126 1232 : int alloc2 = 0 ;
9127 1232 : PyObject *swig_obj[2] ;
9128 1232 : OGRErr result;
9129 :
9130 1232 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetAttributeFilter", 2, 2, swig_obj)) SWIG_fail;
9131 1232 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9132 1232 : if (!SWIG_IsOK(res1)) {
9133 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetAttributeFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9134 : }
9135 1232 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9136 1232 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
9137 1232 : if (!SWIG_IsOK(res2)) {
9138 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetAttributeFilter" "', argument " "2"" of type '" "char *""'");
9139 : }
9140 1232 : arg2 = reinterpret_cast< char * >(buf2);
9141 1232 : {
9142 1232 : const int bLocalUseExceptions = GetUseExceptions();
9143 1232 : if ( bLocalUseExceptions ) {
9144 554 : pushErrorHandler();
9145 : }
9146 1232 : {
9147 1232 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9148 1232 : result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
9149 1232 : SWIG_PYTHON_THREAD_END_ALLOW;
9150 : }
9151 1232 : if ( bLocalUseExceptions ) {
9152 554 : popErrorHandler();
9153 : }
9154 : #ifndef SED_HACKS
9155 : if ( bLocalUseExceptions ) {
9156 : CPLErr eclass = CPLGetLastErrorType();
9157 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9158 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9159 : }
9160 : }
9161 : #endif
9162 : }
9163 1232 : {
9164 : /* %typemap(out) OGRErr */
9165 1268 : if ( result != 0 && GetUseExceptions()) {
9166 4 : const char* pszMessage = CPLGetLastErrorMsg();
9167 4 : if( pszMessage[0] != '\0' )
9168 4 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9169 : else
9170 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9171 4 : SWIG_fail;
9172 : }
9173 : }
9174 1228 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9175 1228 : {
9176 : /* %typemap(ret) OGRErr */
9177 1228 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9178 1228 : resultobj = PyInt_FromLong( result );
9179 : }
9180 : }
9181 1232 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9182 : return resultobj;
9183 4 : fail:
9184 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9185 : return NULL;
9186 : }
9187 :
9188 :
9189 17570 : SWIGINTERN PyObject *_wrap_Layer_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9190 17570 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9191 17570 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9192 17570 : void *argp1 = 0 ;
9193 17570 : int res1 = 0 ;
9194 17570 : PyObject *swig_obj[1] ;
9195 :
9196 17570 : if (!args) SWIG_fail;
9197 17570 : swig_obj[0] = args;
9198 17570 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9199 17570 : if (!SWIG_IsOK(res1)) {
9200 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ResetReading" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9201 : }
9202 17570 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9203 17570 : {
9204 17570 : const int bLocalUseExceptions = GetUseExceptions();
9205 17570 : if ( bLocalUseExceptions ) {
9206 13216 : pushErrorHandler();
9207 : }
9208 17570 : {
9209 17570 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9210 17570 : OGRLayerShadow_ResetReading(arg1);
9211 17570 : SWIG_PYTHON_THREAD_END_ALLOW;
9212 : }
9213 17570 : if ( bLocalUseExceptions ) {
9214 13216 : popErrorHandler();
9215 : }
9216 : #ifndef SED_HACKS
9217 : if ( bLocalUseExceptions ) {
9218 : CPLErr eclass = CPLGetLastErrorType();
9219 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9220 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9221 : }
9222 : }
9223 : #endif
9224 : }
9225 17570 : resultobj = SWIG_Py_Void();
9226 17570 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9227 : return resultobj;
9228 : fail:
9229 : return NULL;
9230 : }
9231 :
9232 :
9233 1237 : SWIGINTERN PyObject *_wrap_Layer_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9234 1237 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9235 1237 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9236 1237 : void *argp1 = 0 ;
9237 1237 : int res1 = 0 ;
9238 1237 : PyObject *swig_obj[1] ;
9239 1237 : char *result = 0 ;
9240 :
9241 1237 : if (!args) SWIG_fail;
9242 1237 : swig_obj[0] = args;
9243 1237 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9244 1237 : if (!SWIG_IsOK(res1)) {
9245 12 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetName" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9246 : }
9247 1231 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9248 1231 : {
9249 1231 : const int bLocalUseExceptions = GetUseExceptions();
9250 1231 : if ( bLocalUseExceptions ) {
9251 804 : pushErrorHandler();
9252 : }
9253 1231 : {
9254 1231 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9255 1231 : result = (char *)OGRLayerShadow_GetName(arg1);
9256 1231 : SWIG_PYTHON_THREAD_END_ALLOW;
9257 : }
9258 1231 : if ( bLocalUseExceptions ) {
9259 804 : popErrorHandler();
9260 : }
9261 : #ifndef SED_HACKS
9262 : if ( bLocalUseExceptions ) {
9263 : CPLErr eclass = CPLGetLastErrorType();
9264 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9265 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9266 : }
9267 : }
9268 : #endif
9269 : }
9270 1231 : resultobj = SWIG_FromCharPtr((const char *)result);
9271 1238 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9272 : return resultobj;
9273 : fail:
9274 : return NULL;
9275 : }
9276 :
9277 :
9278 951 : SWIGINTERN PyObject *_wrap_Layer_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9279 951 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9280 951 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9281 951 : void *argp1 = 0 ;
9282 951 : int res1 = 0 ;
9283 951 : PyObject *swig_obj[1] ;
9284 951 : OGRwkbGeometryType result;
9285 :
9286 951 : if (!args) SWIG_fail;
9287 951 : swig_obj[0] = args;
9288 951 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9289 951 : if (!SWIG_IsOK(res1)) {
9290 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeomType" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9291 : }
9292 951 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9293 951 : {
9294 951 : const int bLocalUseExceptions = GetUseExceptions();
9295 951 : if ( bLocalUseExceptions ) {
9296 461 : pushErrorHandler();
9297 : }
9298 951 : {
9299 951 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9300 951 : result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
9301 951 : SWIG_PYTHON_THREAD_END_ALLOW;
9302 : }
9303 951 : if ( bLocalUseExceptions ) {
9304 461 : popErrorHandler();
9305 : }
9306 : #ifndef SED_HACKS
9307 : if ( bLocalUseExceptions ) {
9308 : CPLErr eclass = CPLGetLastErrorType();
9309 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9310 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9311 : }
9312 : }
9313 : #endif
9314 : }
9315 951 : resultobj = SWIG_From_int(static_cast< int >(result));
9316 951 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9317 : return resultobj;
9318 : fail:
9319 : return NULL;
9320 : }
9321 :
9322 :
9323 574 : SWIGINTERN PyObject *_wrap_Layer_GetGeometryColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9324 574 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9325 574 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9326 574 : void *argp1 = 0 ;
9327 574 : int res1 = 0 ;
9328 574 : PyObject *swig_obj[1] ;
9329 574 : char *result = 0 ;
9330 :
9331 574 : if (!args) SWIG_fail;
9332 574 : swig_obj[0] = args;
9333 574 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9334 574 : if (!SWIG_IsOK(res1)) {
9335 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeometryColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9336 : }
9337 574 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9338 574 : {
9339 574 : const int bLocalUseExceptions = GetUseExceptions();
9340 574 : if ( bLocalUseExceptions ) {
9341 510 : pushErrorHandler();
9342 : }
9343 574 : {
9344 574 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9345 574 : result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
9346 574 : SWIG_PYTHON_THREAD_END_ALLOW;
9347 : }
9348 574 : if ( bLocalUseExceptions ) {
9349 510 : popErrorHandler();
9350 : }
9351 : #ifndef SED_HACKS
9352 : if ( bLocalUseExceptions ) {
9353 : CPLErr eclass = CPLGetLastErrorType();
9354 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9355 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9356 : }
9357 : }
9358 : #endif
9359 : }
9360 574 : resultobj = SWIG_FromCharPtr((const char *)result);
9361 574 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9362 : return resultobj;
9363 : fail:
9364 : return NULL;
9365 : }
9366 :
9367 :
9368 383 : SWIGINTERN PyObject *_wrap_Layer_GetFIDColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9369 383 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9370 383 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9371 383 : void *argp1 = 0 ;
9372 383 : int res1 = 0 ;
9373 383 : PyObject *swig_obj[1] ;
9374 383 : char *result = 0 ;
9375 :
9376 383 : if (!args) SWIG_fail;
9377 383 : swig_obj[0] = args;
9378 383 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9379 383 : if (!SWIG_IsOK(res1)) {
9380 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFIDColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9381 : }
9382 383 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9383 383 : {
9384 383 : const int bLocalUseExceptions = GetUseExceptions();
9385 383 : if ( bLocalUseExceptions ) {
9386 121 : pushErrorHandler();
9387 : }
9388 383 : {
9389 383 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9390 383 : result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
9391 383 : SWIG_PYTHON_THREAD_END_ALLOW;
9392 : }
9393 383 : if ( bLocalUseExceptions ) {
9394 121 : popErrorHandler();
9395 : }
9396 : #ifndef SED_HACKS
9397 : if ( bLocalUseExceptions ) {
9398 : CPLErr eclass = CPLGetLastErrorType();
9399 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9400 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9401 : }
9402 : }
9403 : #endif
9404 : }
9405 383 : resultobj = SWIG_FromCharPtr((const char *)result);
9406 383 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9407 : return resultobj;
9408 : fail:
9409 : return NULL;
9410 : }
9411 :
9412 :
9413 2525 : SWIGINTERN PyObject *_wrap_Layer_GetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9414 2525 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9415 2525 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9416 2525 : GIntBig arg2 ;
9417 2525 : void *argp1 = 0 ;
9418 2525 : int res1 = 0 ;
9419 2525 : PyObject *swig_obj[2] ;
9420 2525 : OGRFeatureShadow *result = 0 ;
9421 :
9422 2525 : if (!SWIG_Python_UnpackTuple(args, "Layer_GetFeature", 2, 2, swig_obj)) SWIG_fail;
9423 2525 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9424 2525 : if (!SWIG_IsOK(res1)) {
9425 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9426 : }
9427 2525 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9428 2525 : {
9429 2525 : arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
9430 : }
9431 2525 : {
9432 2525 : const int bLocalUseExceptions = GetUseExceptions();
9433 2525 : if ( bLocalUseExceptions ) {
9434 87 : pushErrorHandler();
9435 : }
9436 2525 : {
9437 2525 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9438 2525 : result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
9439 2525 : SWIG_PYTHON_THREAD_END_ALLOW;
9440 : }
9441 2525 : if ( bLocalUseExceptions ) {
9442 87 : popErrorHandler();
9443 : }
9444 : #ifndef SED_HACKS
9445 : if ( bLocalUseExceptions ) {
9446 : CPLErr eclass = CPLGetLastErrorType();
9447 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9448 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9449 : }
9450 : }
9451 : #endif
9452 : }
9453 2525 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
9454 2529 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9455 : return resultobj;
9456 : fail:
9457 : return NULL;
9458 : }
9459 :
9460 :
9461 77985 : SWIGINTERN PyObject *_wrap_Layer_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9462 77985 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9463 77985 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9464 77985 : void *argp1 = 0 ;
9465 77985 : int res1 = 0 ;
9466 77985 : PyObject *swig_obj[1] ;
9467 77985 : OGRFeatureShadow *result = 0 ;
9468 :
9469 77985 : if (!args) SWIG_fail;
9470 77985 : swig_obj[0] = args;
9471 77985 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9472 77985 : if (!SWIG_IsOK(res1)) {
9473 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetNextFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9474 : }
9475 77985 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9476 77985 : {
9477 77985 : const int bLocalUseExceptions = GetUseExceptions();
9478 77985 : if ( bLocalUseExceptions ) {
9479 47882 : pushErrorHandler();
9480 : }
9481 77985 : {
9482 77985 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9483 77985 : result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
9484 77985 : SWIG_PYTHON_THREAD_END_ALLOW;
9485 : }
9486 77985 : if ( bLocalUseExceptions ) {
9487 47882 : popErrorHandler();
9488 : }
9489 : #ifndef SED_HACKS
9490 : if ( bLocalUseExceptions ) {
9491 : CPLErr eclass = CPLGetLastErrorType();
9492 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9493 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9494 : }
9495 : }
9496 : #endif
9497 : }
9498 77985 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
9499 77996 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9500 : return resultobj;
9501 : fail:
9502 : return NULL;
9503 : }
9504 :
9505 :
9506 39 : SWIGINTERN PyObject *_wrap_Layer_SetNextByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9507 39 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9508 39 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9509 39 : GIntBig arg2 ;
9510 39 : void *argp1 = 0 ;
9511 39 : int res1 = 0 ;
9512 39 : PyObject *swig_obj[2] ;
9513 39 : OGRErr result;
9514 :
9515 39 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetNextByIndex", 2, 2, swig_obj)) SWIG_fail;
9516 39 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9517 39 : if (!SWIG_IsOK(res1)) {
9518 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetNextByIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9519 : }
9520 39 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9521 39 : {
9522 39 : arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
9523 : }
9524 39 : {
9525 39 : const int bLocalUseExceptions = GetUseExceptions();
9526 39 : if ( bLocalUseExceptions ) {
9527 0 : pushErrorHandler();
9528 : }
9529 39 : {
9530 39 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9531 39 : result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
9532 39 : SWIG_PYTHON_THREAD_END_ALLOW;
9533 : }
9534 39 : if ( bLocalUseExceptions ) {
9535 0 : popErrorHandler();
9536 : }
9537 : #ifndef SED_HACKS
9538 : if ( bLocalUseExceptions ) {
9539 : CPLErr eclass = CPLGetLastErrorType();
9540 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9541 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9542 : }
9543 : }
9544 : #endif
9545 : }
9546 39 : {
9547 : /* %typemap(out) OGRErr */
9548 49 : if ( result != 0 && GetUseExceptions()) {
9549 0 : const char* pszMessage = CPLGetLastErrorMsg();
9550 0 : if( pszMessage[0] != '\0' )
9551 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9552 : else
9553 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9554 0 : SWIG_fail;
9555 : }
9556 : }
9557 39 : {
9558 : /* %typemap(ret) OGRErr */
9559 39 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9560 39 : resultobj = PyInt_FromLong( result );
9561 : }
9562 : }
9563 39 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9564 : return resultobj;
9565 : fail:
9566 : return NULL;
9567 : }
9568 :
9569 :
9570 2476 : SWIGINTERN PyObject *_wrap_Layer_SetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9571 2476 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9572 2476 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9573 2476 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9574 2476 : void *argp1 = 0 ;
9575 2476 : int res1 = 0 ;
9576 2476 : void *argp2 = 0 ;
9577 2476 : int res2 = 0 ;
9578 2476 : PyObject *swig_obj[2] ;
9579 2476 : OGRErr result;
9580 :
9581 2476 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetFeature", 2, 2, swig_obj)) SWIG_fail;
9582 2476 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9583 2476 : if (!SWIG_IsOK(res1)) {
9584 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9585 : }
9586 2476 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9587 2476 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9588 2476 : if (!SWIG_IsOK(res2)) {
9589 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9590 : }
9591 2476 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9592 2476 : {
9593 2476 : if (!arg2) {
9594 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9595 : }
9596 : }
9597 2476 : {
9598 2476 : const int bLocalUseExceptions = GetUseExceptions();
9599 2476 : if ( bLocalUseExceptions ) {
9600 20 : pushErrorHandler();
9601 : }
9602 2476 : {
9603 2476 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9604 2476 : result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
9605 2476 : SWIG_PYTHON_THREAD_END_ALLOW;
9606 : }
9607 2476 : if ( bLocalUseExceptions ) {
9608 20 : popErrorHandler();
9609 : }
9610 : #ifndef SED_HACKS
9611 : if ( bLocalUseExceptions ) {
9612 : CPLErr eclass = CPLGetLastErrorType();
9613 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9614 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9615 : }
9616 : }
9617 : #endif
9618 : }
9619 2476 : {
9620 : /* %typemap(out) OGRErr */
9621 2531 : if ( result != 0 && GetUseExceptions()) {
9622 3 : const char* pszMessage = CPLGetLastErrorMsg();
9623 3 : if( pszMessage[0] != '\0' )
9624 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9625 : else
9626 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9627 3 : SWIG_fail;
9628 : }
9629 : }
9630 2473 : {
9631 : /* %typemap(ret) OGRErr */
9632 2473 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9633 2473 : resultobj = PyInt_FromLong( result );
9634 : }
9635 : }
9636 2476 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9637 : return resultobj;
9638 : fail:
9639 : return NULL;
9640 : }
9641 :
9642 :
9643 282346 : SWIGINTERN PyObject *_wrap_Layer_CreateFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9644 282346 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9645 282346 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9646 282346 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9647 282346 : void *argp1 = 0 ;
9648 282346 : int res1 = 0 ;
9649 282346 : void *argp2 = 0 ;
9650 282346 : int res2 = 0 ;
9651 282346 : PyObject *swig_obj[2] ;
9652 282346 : OGRErr result;
9653 :
9654 282346 : if (!SWIG_Python_UnpackTuple(args, "Layer_CreateFeature", 2, 2, swig_obj)) SWIG_fail;
9655 282346 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9656 282346 : if (!SWIG_IsOK(res1)) {
9657 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9658 : }
9659 282346 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9660 282346 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9661 282346 : if (!SWIG_IsOK(res2)) {
9662 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9663 : }
9664 282346 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9665 282346 : {
9666 282346 : if (!arg2) {
9667 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9668 : }
9669 : }
9670 282346 : {
9671 282346 : const int bLocalUseExceptions = GetUseExceptions();
9672 282346 : if ( bLocalUseExceptions ) {
9673 219516 : pushErrorHandler();
9674 : }
9675 282346 : {
9676 282346 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9677 282346 : result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
9678 282346 : SWIG_PYTHON_THREAD_END_ALLOW;
9679 : }
9680 282346 : if ( bLocalUseExceptions ) {
9681 219516 : popErrorHandler();
9682 : }
9683 : #ifndef SED_HACKS
9684 : if ( bLocalUseExceptions ) {
9685 : CPLErr eclass = CPLGetLastErrorType();
9686 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9687 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9688 : }
9689 : }
9690 : #endif
9691 : }
9692 282346 : {
9693 : /* %typemap(out) OGRErr */
9694 282491 : if ( result != 0 && GetUseExceptions()) {
9695 13 : const char* pszMessage = CPLGetLastErrorMsg();
9696 13 : if( pszMessage[0] != '\0' )
9697 13 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9698 : else
9699 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9700 13 : SWIG_fail;
9701 : }
9702 : }
9703 282333 : {
9704 : /* %typemap(ret) OGRErr */
9705 282333 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9706 282333 : resultobj = PyInt_FromLong( result );
9707 : }
9708 : }
9709 282346 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9710 : return resultobj;
9711 : fail:
9712 : return NULL;
9713 : }
9714 :
9715 :
9716 31 : SWIGINTERN PyObject *_wrap_Layer_UpsertFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9717 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9718 31 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9719 31 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9720 31 : void *argp1 = 0 ;
9721 31 : int res1 = 0 ;
9722 31 : void *argp2 = 0 ;
9723 31 : int res2 = 0 ;
9724 31 : PyObject *swig_obj[2] ;
9725 31 : OGRErr result;
9726 :
9727 31 : if (!SWIG_Python_UnpackTuple(args, "Layer_UpsertFeature", 2, 2, swig_obj)) SWIG_fail;
9728 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9729 31 : if (!SWIG_IsOK(res1)) {
9730 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_UpsertFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9731 : }
9732 31 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9733 31 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9734 31 : if (!SWIG_IsOK(res2)) {
9735 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_UpsertFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9736 : }
9737 31 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9738 31 : {
9739 31 : if (!arg2) {
9740 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9741 : }
9742 : }
9743 31 : {
9744 31 : const int bLocalUseExceptions = GetUseExceptions();
9745 31 : if ( bLocalUseExceptions ) {
9746 0 : pushErrorHandler();
9747 : }
9748 31 : {
9749 31 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9750 31 : result = (OGRErr)OGRLayerShadow_UpsertFeature(arg1,arg2);
9751 31 : SWIG_PYTHON_THREAD_END_ALLOW;
9752 : }
9753 31 : if ( bLocalUseExceptions ) {
9754 0 : popErrorHandler();
9755 : }
9756 : #ifndef SED_HACKS
9757 : if ( bLocalUseExceptions ) {
9758 : CPLErr eclass = CPLGetLastErrorType();
9759 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9760 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9761 : }
9762 : }
9763 : #endif
9764 : }
9765 31 : {
9766 : /* %typemap(out) OGRErr */
9767 32 : if ( result != 0 && GetUseExceptions()) {
9768 0 : const char* pszMessage = CPLGetLastErrorMsg();
9769 0 : if( pszMessage[0] != '\0' )
9770 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9771 : else
9772 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9773 0 : SWIG_fail;
9774 : }
9775 : }
9776 31 : {
9777 : /* %typemap(ret) OGRErr */
9778 31 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9779 31 : resultobj = PyInt_FromLong( result );
9780 : }
9781 : }
9782 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9783 : return resultobj;
9784 : fail:
9785 : return NULL;
9786 : }
9787 :
9788 :
9789 27 : SWIGINTERN PyObject *_wrap_Layer_UpdateFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9790 27 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9791 27 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9792 27 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9793 27 : int arg3 ;
9794 27 : int *arg4 = (int *) 0 ;
9795 27 : int arg5 ;
9796 27 : int *arg6 = (int *) 0 ;
9797 27 : bool arg7 ;
9798 27 : void *argp1 = 0 ;
9799 27 : int res1 = 0 ;
9800 27 : void *argp2 = 0 ;
9801 27 : int res2 = 0 ;
9802 27 : bool val7 ;
9803 27 : int ecode7 = 0 ;
9804 27 : PyObject *swig_obj[5] ;
9805 27 : OGRErr result;
9806 :
9807 27 : if (!SWIG_Python_UnpackTuple(args, "Layer_UpdateFeature", 5, 5, swig_obj)) SWIG_fail;
9808 27 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9809 27 : if (!SWIG_IsOK(res1)) {
9810 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_UpdateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9811 : }
9812 27 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9813 27 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9814 27 : if (!SWIG_IsOK(res2)) {
9815 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_UpdateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9816 : }
9817 27 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9818 27 : {
9819 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
9820 27 : arg4 = CreateCIntListFromSequence(swig_obj[2], &arg3);
9821 27 : if( arg3 < 0 ) {
9822 0 : SWIG_fail;
9823 : }
9824 : }
9825 27 : {
9826 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
9827 27 : arg6 = CreateCIntListFromSequence(swig_obj[3], &arg5);
9828 27 : if( arg5 < 0 ) {
9829 0 : SWIG_fail;
9830 : }
9831 : }
9832 27 : ecode7 = SWIG_AsVal_bool(swig_obj[4], &val7);
9833 27 : if (!SWIG_IsOK(ecode7)) {
9834 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Layer_UpdateFeature" "', argument " "7"" of type '" "bool""'");
9835 : }
9836 27 : arg7 = static_cast< bool >(val7);
9837 27 : {
9838 27 : if (!arg2) {
9839 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9840 : }
9841 : }
9842 27 : {
9843 27 : const int bLocalUseExceptions = GetUseExceptions();
9844 27 : if ( bLocalUseExceptions ) {
9845 0 : pushErrorHandler();
9846 : }
9847 27 : {
9848 27 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9849 27 : result = (OGRErr)OGRLayerShadow_UpdateFeature(arg1,arg2,arg3,(int const *)arg4,arg5,(int const *)arg6,arg7);
9850 27 : SWIG_PYTHON_THREAD_END_ALLOW;
9851 : }
9852 27 : if ( bLocalUseExceptions ) {
9853 0 : popErrorHandler();
9854 : }
9855 : #ifndef SED_HACKS
9856 : if ( bLocalUseExceptions ) {
9857 : CPLErr eclass = CPLGetLastErrorType();
9858 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9859 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9860 : }
9861 : }
9862 : #endif
9863 : }
9864 27 : {
9865 : /* %typemap(out) OGRErr */
9866 39 : if ( result != 0 && GetUseExceptions()) {
9867 0 : const char* pszMessage = CPLGetLastErrorMsg();
9868 0 : if( pszMessage[0] != '\0' )
9869 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9870 : else
9871 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9872 0 : SWIG_fail;
9873 : }
9874 : }
9875 27 : {
9876 : /* %typemap(freearg) (int nList, int* pList) */
9877 27 : free(arg4);
9878 : }
9879 27 : {
9880 : /* %typemap(freearg) (int nList, int* pList) */
9881 27 : free(arg6);
9882 : }
9883 27 : {
9884 : /* %typemap(ret) OGRErr */
9885 27 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9886 27 : resultobj = PyInt_FromLong( result );
9887 : }
9888 : }
9889 27 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9890 : return resultobj;
9891 0 : fail:
9892 0 : {
9893 : /* %typemap(freearg) (int nList, int* pList) */
9894 0 : free(arg4);
9895 : }
9896 0 : {
9897 : /* %typemap(freearg) (int nList, int* pList) */
9898 0 : free(arg6);
9899 : }
9900 0 : return NULL;
9901 : }
9902 :
9903 :
9904 3329 : SWIGINTERN PyObject *_wrap_Layer_DeleteFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9905 3329 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9906 3329 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9907 3329 : GIntBig arg2 ;
9908 3329 : void *argp1 = 0 ;
9909 3329 : int res1 = 0 ;
9910 3329 : PyObject *swig_obj[2] ;
9911 3329 : OGRErr result;
9912 :
9913 3329 : if (!SWIG_Python_UnpackTuple(args, "Layer_DeleteFeature", 2, 2, swig_obj)) SWIG_fail;
9914 3329 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9915 3329 : if (!SWIG_IsOK(res1)) {
9916 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9917 : }
9918 3329 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9919 3329 : {
9920 3329 : arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
9921 : }
9922 3329 : {
9923 3329 : const int bLocalUseExceptions = GetUseExceptions();
9924 3329 : if ( bLocalUseExceptions ) {
9925 7 : pushErrorHandler();
9926 : }
9927 3329 : {
9928 3329 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9929 3329 : result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
9930 3329 : SWIG_PYTHON_THREAD_END_ALLOW;
9931 : }
9932 3329 : if ( bLocalUseExceptions ) {
9933 7 : popErrorHandler();
9934 : }
9935 : #ifndef SED_HACKS
9936 : if ( bLocalUseExceptions ) {
9937 : CPLErr eclass = CPLGetLastErrorType();
9938 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9939 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9940 : }
9941 : }
9942 : #endif
9943 : }
9944 3329 : {
9945 : /* %typemap(out) OGRErr */
9946 3374 : if ( result != 0 && GetUseExceptions()) {
9947 2 : const char* pszMessage = CPLGetLastErrorMsg();
9948 2 : if( pszMessage[0] != '\0' )
9949 2 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9950 : else
9951 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9952 2 : SWIG_fail;
9953 : }
9954 : }
9955 3327 : {
9956 : /* %typemap(ret) OGRErr */
9957 3327 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9958 3327 : resultobj = PyInt_FromLong( result );
9959 : }
9960 : }
9961 3329 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
9962 : return resultobj;
9963 : fail:
9964 : return NULL;
9965 : }
9966 :
9967 :
9968 243 : SWIGINTERN PyObject *_wrap_Layer_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9969 243 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9970 243 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
9971 243 : void *argp1 = 0 ;
9972 243 : int res1 = 0 ;
9973 243 : PyObject *swig_obj[1] ;
9974 243 : OGRErr result;
9975 :
9976 243 : if (!args) SWIG_fail;
9977 243 : swig_obj[0] = args;
9978 243 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
9979 243 : if (!SWIG_IsOK(res1)) {
9980 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SyncToDisk" "', argument " "1"" of type '" "OGRLayerShadow *""'");
9981 : }
9982 243 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
9983 243 : {
9984 243 : const int bLocalUseExceptions = GetUseExceptions();
9985 243 : if ( bLocalUseExceptions ) {
9986 17 : pushErrorHandler();
9987 : }
9988 243 : {
9989 243 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
9990 243 : result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
9991 243 : SWIG_PYTHON_THREAD_END_ALLOW;
9992 : }
9993 243 : if ( bLocalUseExceptions ) {
9994 17 : popErrorHandler();
9995 : }
9996 : #ifndef SED_HACKS
9997 : if ( bLocalUseExceptions ) {
9998 : CPLErr eclass = CPLGetLastErrorType();
9999 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10000 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10001 : }
10002 : }
10003 : #endif
10004 : }
10005 243 : {
10006 : /* %typemap(out) OGRErr */
10007 245 : if ( result != 0 && GetUseExceptions()) {
10008 0 : const char* pszMessage = CPLGetLastErrorMsg();
10009 0 : if( pszMessage[0] != '\0' )
10010 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10011 : else
10012 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10013 0 : SWIG_fail;
10014 : }
10015 : }
10016 243 : {
10017 : /* %typemap(ret) OGRErr */
10018 243 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10019 243 : resultobj = PyInt_FromLong( result );
10020 : }
10021 : }
10022 243 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10023 : return resultobj;
10024 : fail:
10025 : return NULL;
10026 : }
10027 :
10028 :
10029 124377 : SWIGINTERN PyObject *_wrap_Layer_GetLayerDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10030 124377 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10031 124377 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10032 124377 : void *argp1 = 0 ;
10033 124377 : int res1 = 0 ;
10034 124377 : PyObject *swig_obj[1] ;
10035 124377 : OGRFeatureDefnShadow *result = 0 ;
10036 :
10037 124377 : if (!args) SWIG_fail;
10038 124377 : swig_obj[0] = args;
10039 124377 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10040 124377 : if (!SWIG_IsOK(res1)) {
10041 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetLayerDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10042 : }
10043 124377 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10044 124377 : {
10045 124377 : const int bLocalUseExceptions = GetUseExceptions();
10046 124377 : if ( bLocalUseExceptions ) {
10047 62118 : pushErrorHandler();
10048 : }
10049 124377 : {
10050 124377 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10051 124377 : result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
10052 124377 : SWIG_PYTHON_THREAD_END_ALLOW;
10053 : }
10054 124377 : if ( bLocalUseExceptions ) {
10055 62118 : popErrorHandler();
10056 : }
10057 : #ifndef SED_HACKS
10058 : if ( bLocalUseExceptions ) {
10059 : CPLErr eclass = CPLGetLastErrorType();
10060 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10061 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10062 : }
10063 : }
10064 : #endif
10065 : }
10066 124377 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_OWN | 0 );
10067 124381 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10068 : return resultobj;
10069 : fail:
10070 : return NULL;
10071 : }
10072 :
10073 :
10074 35824 : SWIGINTERN PyObject *_wrap_Layer_GetFeatureCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10075 35824 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10076 35824 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10077 35824 : int arg2 = (int) 1 ;
10078 35824 : void *argp1 = 0 ;
10079 35824 : int res1 = 0 ;
10080 35824 : int val2 ;
10081 35824 : int ecode2 = 0 ;
10082 35824 : PyObject * obj0 = 0 ;
10083 35824 : PyObject * obj1 = 0 ;
10084 35824 : char * kwnames[] = {
10085 : (char *)"self", (char *)"force", NULL
10086 : };
10087 35824 : GIntBig result;
10088 :
10089 35824 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Layer_GetFeatureCount", kwnames, &obj0, &obj1)) SWIG_fail;
10090 35824 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10091 35824 : if (!SWIG_IsOK(res1)) {
10092 16 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeatureCount" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10093 : }
10094 35816 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10095 35816 : if (obj1) {
10096 54 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10097 54 : if (!SWIG_IsOK(ecode2)) {
10098 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeatureCount" "', argument " "2"" of type '" "int""'");
10099 : }
10100 : arg2 = static_cast< int >(val2);
10101 : }
10102 35816 : {
10103 35816 : const int bLocalUseExceptions = GetUseExceptions();
10104 35816 : if ( bLocalUseExceptions ) {
10105 1698 : pushErrorHandler();
10106 : }
10107 35816 : {
10108 35816 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10109 35816 : result = OGRLayerShadow_GetFeatureCount(arg1,arg2);
10110 35816 : SWIG_PYTHON_THREAD_END_ALLOW;
10111 : }
10112 35816 : if ( bLocalUseExceptions ) {
10113 1698 : popErrorHandler();
10114 : }
10115 : #ifndef SED_HACKS
10116 : if ( bLocalUseExceptions ) {
10117 : CPLErr eclass = CPLGetLastErrorType();
10118 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10119 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10120 : }
10121 : }
10122 : #endif
10123 : }
10124 35816 : {
10125 35816 : resultobj = PyLong_FromLongLong(result);
10126 : }
10127 35832 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10128 : return resultobj;
10129 : fail:
10130 : return NULL;
10131 : }
10132 :
10133 :
10134 354 : SWIGINTERN PyObject *_wrap_Layer_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10135 354 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10136 354 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10137 354 : double *arg2 ;
10138 354 : int *arg3 = (int *) NULL ;
10139 354 : int arg4 = (int) 1 ;
10140 354 : int arg5 = (int) 0 ;
10141 354 : int arg6 = (int) 0 ;
10142 354 : void *argp1 = 0 ;
10143 354 : int res1 = 0 ;
10144 354 : double argout2[4] ;
10145 354 : int isvalid2 ;
10146 354 : int val4 ;
10147 354 : int ecode4 = 0 ;
10148 354 : int val5 ;
10149 354 : int ecode5 = 0 ;
10150 354 : int val6 ;
10151 354 : int ecode6 = 0 ;
10152 354 : PyObject * obj0 = 0 ;
10153 354 : PyObject * obj1 = 0 ;
10154 354 : PyObject * obj2 = 0 ;
10155 354 : PyObject * obj3 = 0 ;
10156 354 : char * kwnames[] = {
10157 : (char *)"self", (char *)"force", (char *)"can_return_null", (char *)"geom_field", NULL
10158 : };
10159 :
10160 354 : {
10161 : /* %typemap(in,numinputs=0) (double argout2[4], int* isvalid2) */
10162 354 : arg2 = argout2;
10163 354 : arg3 = &isvalid2;
10164 : }
10165 354 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:Layer_GetExtent", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
10166 354 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10167 354 : if (!SWIG_IsOK(res1)) {
10168 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10169 : }
10170 354 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10171 354 : if (obj1) {
10172 48 : ecode4 = SWIG_AsVal_int(obj1, &val4);
10173 48 : if (!SWIG_IsOK(ecode4)) {
10174 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetExtent" "', argument " "4"" of type '" "int""'");
10175 : }
10176 : arg4 = static_cast< int >(val4);
10177 : }
10178 354 : if (obj2) {
10179 35 : ecode5 = SWIG_AsVal_int(obj2, &val5);
10180 35 : if (!SWIG_IsOK(ecode5)) {
10181 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetExtent" "', argument " "5"" of type '" "int""'");
10182 : }
10183 : arg5 = static_cast< int >(val5);
10184 : }
10185 354 : if (obj3) {
10186 72 : ecode6 = SWIG_AsVal_int(obj3, &val6);
10187 72 : if (!SWIG_IsOK(ecode6)) {
10188 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_GetExtent" "', argument " "6"" of type '" "int""'");
10189 : }
10190 : arg6 = static_cast< int >(val6);
10191 : }
10192 354 : {
10193 354 : const int bLocalUseExceptions = GetUseExceptions();
10194 354 : if ( bLocalUseExceptions ) {
10195 214 : pushErrorHandler();
10196 : }
10197 354 : {
10198 354 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10199 354 : OGRLayerShadow_GetExtent(arg1,arg2,arg3,arg4,arg5,arg6);
10200 354 : SWIG_PYTHON_THREAD_END_ALLOW;
10201 : }
10202 354 : if ( bLocalUseExceptions ) {
10203 214 : popErrorHandler();
10204 : }
10205 : #ifndef SED_HACKS
10206 : if ( bLocalUseExceptions ) {
10207 : CPLErr eclass = CPLGetLastErrorType();
10208 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10209 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10210 : }
10211 : }
10212 : #endif
10213 : }
10214 354 : resultobj = SWIG_Py_Void();
10215 354 : {
10216 : /* %typemap(argout) (double argout[4], int* isvalid) */
10217 354 : PyObject *r;
10218 354 : if ( !*arg3 ) {
10219 8 : Py_INCREF(Py_None);
10220 8 : r = Py_None;
10221 : }
10222 : else {
10223 346 : r = CreateTupleFromDoubleArray(arg2, 4);
10224 : }
10225 354 : resultobj = t_output_helper(resultobj,r);
10226 : }
10227 389 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10228 : return resultobj;
10229 : fail:
10230 : return NULL;
10231 : }
10232 :
10233 :
10234 58 : SWIGINTERN PyObject *_wrap_Layer_GetExtent3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10235 58 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10236 58 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10237 58 : double *arg2 ;
10238 58 : int *arg3 = (int *) NULL ;
10239 58 : int arg4 = (int) 1 ;
10240 58 : int arg5 = (int) 0 ;
10241 58 : int arg6 = (int) 0 ;
10242 58 : void *argp1 = 0 ;
10243 58 : int res1 = 0 ;
10244 58 : double argout2[6] ;
10245 58 : int isvalid2 ;
10246 58 : int val4 ;
10247 58 : int ecode4 = 0 ;
10248 58 : int val5 ;
10249 58 : int ecode5 = 0 ;
10250 58 : int val6 ;
10251 58 : int ecode6 = 0 ;
10252 58 : PyObject * obj0 = 0 ;
10253 58 : PyObject * obj1 = 0 ;
10254 58 : PyObject * obj2 = 0 ;
10255 58 : PyObject * obj3 = 0 ;
10256 58 : char * kwnames[] = {
10257 : (char *)"self", (char *)"force", (char *)"can_return_null", (char *)"geom_field", NULL
10258 : };
10259 :
10260 58 : {
10261 : /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
10262 58 : arg2 = argout2;
10263 58 : arg3 = &isvalid2;
10264 : }
10265 58 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:Layer_GetExtent3D", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
10266 58 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10267 58 : if (!SWIG_IsOK(res1)) {
10268 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent3D" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10269 : }
10270 58 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10271 58 : if (obj1) {
10272 0 : ecode4 = SWIG_AsVal_int(obj1, &val4);
10273 0 : if (!SWIG_IsOK(ecode4)) {
10274 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetExtent3D" "', argument " "4"" of type '" "int""'");
10275 : }
10276 : arg4 = static_cast< int >(val4);
10277 : }
10278 58 : if (obj2) {
10279 1 : ecode5 = SWIG_AsVal_int(obj2, &val5);
10280 1 : if (!SWIG_IsOK(ecode5)) {
10281 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetExtent3D" "', argument " "5"" of type '" "int""'");
10282 : }
10283 : arg5 = static_cast< int >(val5);
10284 : }
10285 58 : if (obj3) {
10286 0 : ecode6 = SWIG_AsVal_int(obj3, &val6);
10287 0 : if (!SWIG_IsOK(ecode6)) {
10288 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_GetExtent3D" "', argument " "6"" of type '" "int""'");
10289 : }
10290 : arg6 = static_cast< int >(val6);
10291 : }
10292 58 : {
10293 58 : const int bLocalUseExceptions = GetUseExceptions();
10294 58 : if ( bLocalUseExceptions ) {
10295 33 : pushErrorHandler();
10296 : }
10297 58 : {
10298 58 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10299 58 : OGRLayerShadow_GetExtent3D(arg1,arg2,arg3,arg4,arg5,arg6);
10300 58 : SWIG_PYTHON_THREAD_END_ALLOW;
10301 : }
10302 58 : if ( bLocalUseExceptions ) {
10303 33 : popErrorHandler();
10304 : }
10305 : #ifndef SED_HACKS
10306 : if ( bLocalUseExceptions ) {
10307 : CPLErr eclass = CPLGetLastErrorType();
10308 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10309 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10310 : }
10311 : }
10312 : #endif
10313 : }
10314 58 : resultobj = SWIG_Py_Void();
10315 58 : {
10316 : /* %typemap(argout) (double argout[6], int* isvalid) */
10317 58 : PyObject *r;
10318 58 : if ( !*arg3 ) {
10319 1 : Py_INCREF(Py_None);
10320 1 : r = Py_None;
10321 : }
10322 : else {
10323 57 : r = CreateTupleFromDoubleArray(arg2, 6);
10324 : }
10325 58 : resultobj = t_output_helper(resultobj,r);
10326 : }
10327 58 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10328 : return resultobj;
10329 : fail:
10330 : return NULL;
10331 : }
10332 :
10333 :
10334 589 : SWIGINTERN PyObject *_wrap_Layer_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10335 589 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10336 589 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10337 589 : char *arg2 = (char *) 0 ;
10338 589 : void *argp1 = 0 ;
10339 589 : int res1 = 0 ;
10340 589 : int res2 ;
10341 589 : char *buf2 = 0 ;
10342 589 : int alloc2 = 0 ;
10343 589 : PyObject *swig_obj[2] ;
10344 589 : bool result;
10345 :
10346 589 : if (!SWIG_Python_UnpackTuple(args, "Layer_TestCapability", 2, 2, swig_obj)) SWIG_fail;
10347 589 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10348 589 : if (!SWIG_IsOK(res1)) {
10349 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_TestCapability" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10350 : }
10351 589 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10352 589 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
10353 589 : if (!SWIG_IsOK(res2)) {
10354 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_TestCapability" "', argument " "2"" of type '" "char const *""'");
10355 : }
10356 589 : arg2 = reinterpret_cast< char * >(buf2);
10357 589 : {
10358 589 : const int bLocalUseExceptions = GetUseExceptions();
10359 589 : if ( bLocalUseExceptions ) {
10360 214 : pushErrorHandler();
10361 : }
10362 589 : {
10363 589 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10364 589 : result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
10365 589 : SWIG_PYTHON_THREAD_END_ALLOW;
10366 : }
10367 589 : if ( bLocalUseExceptions ) {
10368 214 : popErrorHandler();
10369 : }
10370 : #ifndef SED_HACKS
10371 : if ( bLocalUseExceptions ) {
10372 : CPLErr eclass = CPLGetLastErrorType();
10373 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10374 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10375 : }
10376 : }
10377 : #endif
10378 : }
10379 589 : resultobj = SWIG_From_bool(static_cast< bool >(result));
10380 589 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10381 590 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10382 : return resultobj;
10383 0 : fail:
10384 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10385 : return NULL;
10386 : }
10387 :
10388 :
10389 75497 : SWIGINTERN PyObject *_wrap_Layer_CreateField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10390 75497 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10391 75497 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10392 75497 : OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
10393 75497 : int arg3 = (int) 1 ;
10394 75497 : void *argp1 = 0 ;
10395 75497 : int res1 = 0 ;
10396 75497 : void *argp2 = 0 ;
10397 75497 : int res2 = 0 ;
10398 75497 : int val3 ;
10399 75497 : int ecode3 = 0 ;
10400 75497 : PyObject * obj0 = 0 ;
10401 75497 : PyObject * obj1 = 0 ;
10402 75497 : PyObject * obj2 = 0 ;
10403 75497 : char * kwnames[] = {
10404 : (char *)"self", (char *)"field_def", (char *)"approx_ok", NULL
10405 : };
10406 75497 : OGRErr result;
10407 :
10408 75497 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Layer_CreateField", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
10409 75497 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10410 75497 : if (!SWIG_IsOK(res1)) {
10411 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10412 : }
10413 75497 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10414 75497 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
10415 75497 : if (!SWIG_IsOK(res2)) {
10416 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateField" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'");
10417 : }
10418 75497 : arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
10419 75497 : if (obj2) {
10420 24 : ecode3 = SWIG_AsVal_int(obj2, &val3);
10421 24 : if (!SWIG_IsOK(ecode3)) {
10422 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateField" "', argument " "3"" of type '" "int""'");
10423 : }
10424 : arg3 = static_cast< int >(val3);
10425 : }
10426 75497 : {
10427 75497 : if (!arg2) {
10428 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10429 : }
10430 : }
10431 75497 : {
10432 75497 : const int bLocalUseExceptions = GetUseExceptions();
10433 75497 : if ( bLocalUseExceptions ) {
10434 1477 : pushErrorHandler();
10435 : }
10436 75497 : {
10437 75497 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10438 75497 : result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
10439 75497 : SWIG_PYTHON_THREAD_END_ALLOW;
10440 : }
10441 75497 : if ( bLocalUseExceptions ) {
10442 1477 : popErrorHandler();
10443 : }
10444 : #ifndef SED_HACKS
10445 : if ( bLocalUseExceptions ) {
10446 : CPLErr eclass = CPLGetLastErrorType();
10447 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10448 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10449 : }
10450 : }
10451 : #endif
10452 : }
10453 75497 : {
10454 : /* %typemap(out) OGRErr */
10455 75553 : if ( result != 0 && GetUseExceptions()) {
10456 11 : const char* pszMessage = CPLGetLastErrorMsg();
10457 11 : if( pszMessage[0] != '\0' )
10458 11 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10459 : else
10460 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10461 11 : SWIG_fail;
10462 : }
10463 : }
10464 75486 : {
10465 : /* %typemap(ret) OGRErr */
10466 75486 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10467 75486 : resultobj = PyInt_FromLong( result );
10468 : }
10469 : }
10470 75497 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10471 : return resultobj;
10472 : fail:
10473 : return NULL;
10474 : }
10475 :
10476 :
10477 69 : SWIGINTERN PyObject *_wrap_Layer_DeleteField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10478 69 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10479 69 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10480 69 : int arg2 ;
10481 69 : void *argp1 = 0 ;
10482 69 : int res1 = 0 ;
10483 69 : int val2 ;
10484 69 : int ecode2 = 0 ;
10485 69 : PyObject *swig_obj[2] ;
10486 69 : OGRErr result;
10487 :
10488 69 : if (!SWIG_Python_UnpackTuple(args, "Layer_DeleteField", 2, 2, swig_obj)) SWIG_fail;
10489 69 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10490 69 : if (!SWIG_IsOK(res1)) {
10491 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10492 : }
10493 69 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10494 69 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
10495 69 : if (!SWIG_IsOK(ecode2)) {
10496 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteField" "', argument " "2"" of type '" "int""'");
10497 : }
10498 69 : arg2 = static_cast< int >(val2);
10499 69 : {
10500 69 : const int bLocalUseExceptions = GetUseExceptions();
10501 69 : if ( bLocalUseExceptions ) {
10502 4 : pushErrorHandler();
10503 : }
10504 69 : {
10505 69 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10506 69 : result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
10507 69 : SWIG_PYTHON_THREAD_END_ALLOW;
10508 : }
10509 69 : if ( bLocalUseExceptions ) {
10510 4 : popErrorHandler();
10511 : }
10512 : #ifndef SED_HACKS
10513 : if ( bLocalUseExceptions ) {
10514 : CPLErr eclass = CPLGetLastErrorType();
10515 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10516 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10517 : }
10518 : }
10519 : #endif
10520 : }
10521 69 : {
10522 : /* %typemap(out) OGRErr */
10523 90 : if ( result != 0 && GetUseExceptions()) {
10524 3 : const char* pszMessage = CPLGetLastErrorMsg();
10525 3 : if( pszMessage[0] != '\0' )
10526 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10527 : else
10528 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10529 3 : SWIG_fail;
10530 : }
10531 : }
10532 66 : {
10533 : /* %typemap(ret) OGRErr */
10534 66 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10535 66 : resultobj = PyInt_FromLong( result );
10536 : }
10537 : }
10538 69 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10539 : return resultobj;
10540 : fail:
10541 : return NULL;
10542 : }
10543 :
10544 :
10545 34 : SWIGINTERN PyObject *_wrap_Layer_ReorderField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10546 34 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10547 34 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10548 34 : int arg2 ;
10549 34 : int arg3 ;
10550 34 : void *argp1 = 0 ;
10551 34 : int res1 = 0 ;
10552 34 : int val2 ;
10553 34 : int ecode2 = 0 ;
10554 34 : int val3 ;
10555 34 : int ecode3 = 0 ;
10556 34 : PyObject *swig_obj[3] ;
10557 34 : OGRErr result;
10558 :
10559 34 : if (!SWIG_Python_UnpackTuple(args, "Layer_ReorderField", 3, 3, swig_obj)) SWIG_fail;
10560 34 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10561 34 : if (!SWIG_IsOK(res1)) {
10562 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10563 : }
10564 34 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10565 34 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
10566 34 : if (!SWIG_IsOK(ecode2)) {
10567 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_ReorderField" "', argument " "2"" of type '" "int""'");
10568 : }
10569 34 : arg2 = static_cast< int >(val2);
10570 34 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
10571 34 : if (!SWIG_IsOK(ecode3)) {
10572 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_ReorderField" "', argument " "3"" of type '" "int""'");
10573 : }
10574 34 : arg3 = static_cast< int >(val3);
10575 34 : {
10576 34 : const int bLocalUseExceptions = GetUseExceptions();
10577 34 : if ( bLocalUseExceptions ) {
10578 0 : pushErrorHandler();
10579 : }
10580 34 : {
10581 34 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10582 34 : result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
10583 34 : SWIG_PYTHON_THREAD_END_ALLOW;
10584 : }
10585 34 : if ( bLocalUseExceptions ) {
10586 0 : popErrorHandler();
10587 : }
10588 : #ifndef SED_HACKS
10589 : if ( bLocalUseExceptions ) {
10590 : CPLErr eclass = CPLGetLastErrorType();
10591 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10592 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10593 : }
10594 : }
10595 : #endif
10596 : }
10597 34 : {
10598 : /* %typemap(out) OGRErr */
10599 34 : if ( result != 0 && GetUseExceptions()) {
10600 0 : const char* pszMessage = CPLGetLastErrorMsg();
10601 0 : if( pszMessage[0] != '\0' )
10602 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10603 : else
10604 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10605 0 : SWIG_fail;
10606 : }
10607 : }
10608 34 : {
10609 : /* %typemap(ret) OGRErr */
10610 34 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10611 34 : resultobj = PyInt_FromLong( result );
10612 : }
10613 : }
10614 34 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10615 : return resultobj;
10616 : fail:
10617 : return NULL;
10618 : }
10619 :
10620 :
10621 43 : SWIGINTERN PyObject *_wrap_Layer_ReorderFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10622 43 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10623 43 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10624 43 : int arg2 ;
10625 43 : int *arg3 = (int *) 0 ;
10626 43 : void *argp1 = 0 ;
10627 43 : int res1 = 0 ;
10628 43 : PyObject *swig_obj[2] ;
10629 43 : OGRErr result;
10630 :
10631 43 : if (!SWIG_Python_UnpackTuple(args, "Layer_ReorderFields", 2, 2, swig_obj)) SWIG_fail;
10632 43 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10633 43 : if (!SWIG_IsOK(res1)) {
10634 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderFields" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10635 : }
10636 43 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10637 43 : {
10638 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
10639 43 : arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
10640 43 : if( arg2 < 0 ) {
10641 0 : SWIG_fail;
10642 : }
10643 : }
10644 43 : {
10645 43 : const int bLocalUseExceptions = GetUseExceptions();
10646 43 : if ( bLocalUseExceptions ) {
10647 0 : pushErrorHandler();
10648 : }
10649 43 : {
10650 43 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10651 43 : result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
10652 43 : SWIG_PYTHON_THREAD_END_ALLOW;
10653 : }
10654 43 : if ( bLocalUseExceptions ) {
10655 0 : popErrorHandler();
10656 : }
10657 : #ifndef SED_HACKS
10658 : if ( bLocalUseExceptions ) {
10659 : CPLErr eclass = CPLGetLastErrorType();
10660 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10661 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10662 : }
10663 : }
10664 : #endif
10665 : }
10666 43 : {
10667 : /* %typemap(out) OGRErr */
10668 53 : if ( result != 0 && GetUseExceptions()) {
10669 0 : const char* pszMessage = CPLGetLastErrorMsg();
10670 0 : if( pszMessage[0] != '\0' )
10671 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10672 : else
10673 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10674 0 : SWIG_fail;
10675 : }
10676 : }
10677 43 : {
10678 : /* %typemap(freearg) (int nList, int* pList) */
10679 43 : free(arg3);
10680 : }
10681 43 : {
10682 : /* %typemap(ret) OGRErr */
10683 43 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10684 43 : resultobj = PyInt_FromLong( result );
10685 : }
10686 : }
10687 43 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10688 : return resultobj;
10689 0 : fail:
10690 0 : {
10691 : /* %typemap(freearg) (int nList, int* pList) */
10692 0 : free(arg3);
10693 : }
10694 0 : return NULL;
10695 : }
10696 :
10697 :
10698 118 : SWIGINTERN PyObject *_wrap_Layer_AlterFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10699 118 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10700 118 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10701 118 : int arg2 ;
10702 118 : OGRFieldDefnShadow *arg3 = (OGRFieldDefnShadow *) 0 ;
10703 118 : int arg4 ;
10704 118 : void *argp1 = 0 ;
10705 118 : int res1 = 0 ;
10706 118 : int val2 ;
10707 118 : int ecode2 = 0 ;
10708 118 : void *argp3 = 0 ;
10709 118 : int res3 = 0 ;
10710 118 : int val4 ;
10711 118 : int ecode4 = 0 ;
10712 118 : PyObject *swig_obj[4] ;
10713 118 : OGRErr result;
10714 :
10715 118 : if (!SWIG_Python_UnpackTuple(args, "Layer_AlterFieldDefn", 4, 4, swig_obj)) SWIG_fail;
10716 118 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10717 118 : if (!SWIG_IsOK(res1)) {
10718 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_AlterFieldDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10719 : }
10720 118 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10721 118 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
10722 118 : if (!SWIG_IsOK(ecode2)) {
10723 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_AlterFieldDefn" "', argument " "2"" of type '" "int""'");
10724 : }
10725 118 : arg2 = static_cast< int >(val2);
10726 118 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
10727 118 : if (!SWIG_IsOK(res3)) {
10728 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_AlterFieldDefn" "', argument " "3"" of type '" "OGRFieldDefnShadow *""'");
10729 : }
10730 118 : arg3 = reinterpret_cast< OGRFieldDefnShadow * >(argp3);
10731 118 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
10732 118 : if (!SWIG_IsOK(ecode4)) {
10733 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_AlterFieldDefn" "', argument " "4"" of type '" "int""'");
10734 : }
10735 118 : arg4 = static_cast< int >(val4);
10736 118 : {
10737 118 : if (!arg3) {
10738 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10739 : }
10740 : }
10741 118 : {
10742 118 : const int bLocalUseExceptions = GetUseExceptions();
10743 118 : if ( bLocalUseExceptions ) {
10744 0 : pushErrorHandler();
10745 : }
10746 118 : {
10747 118 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10748 118 : result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
10749 118 : SWIG_PYTHON_THREAD_END_ALLOW;
10750 : }
10751 118 : if ( bLocalUseExceptions ) {
10752 0 : popErrorHandler();
10753 : }
10754 : #ifndef SED_HACKS
10755 : if ( bLocalUseExceptions ) {
10756 : CPLErr eclass = CPLGetLastErrorType();
10757 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10758 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10759 : }
10760 : }
10761 : #endif
10762 : }
10763 118 : {
10764 : /* %typemap(out) OGRErr */
10765 152 : if ( result != 0 && GetUseExceptions()) {
10766 0 : const char* pszMessage = CPLGetLastErrorMsg();
10767 0 : if( pszMessage[0] != '\0' )
10768 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10769 : else
10770 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10771 0 : SWIG_fail;
10772 : }
10773 : }
10774 118 : {
10775 : /* %typemap(ret) OGRErr */
10776 118 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10777 118 : resultobj = PyInt_FromLong( result );
10778 : }
10779 : }
10780 118 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10781 : return resultobj;
10782 : fail:
10783 : return NULL;
10784 : }
10785 :
10786 :
10787 33 : SWIGINTERN PyObject *_wrap_Layer_AlterGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10788 33 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10789 33 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10790 33 : int arg2 ;
10791 33 : OGRGeomFieldDefnShadow *arg3 = (OGRGeomFieldDefnShadow *) 0 ;
10792 33 : int arg4 ;
10793 33 : void *argp1 = 0 ;
10794 33 : int res1 = 0 ;
10795 33 : int val2 ;
10796 33 : int ecode2 = 0 ;
10797 33 : void *argp3 = 0 ;
10798 33 : int res3 = 0 ;
10799 33 : int val4 ;
10800 33 : int ecode4 = 0 ;
10801 33 : PyObject *swig_obj[4] ;
10802 33 : OGRErr result;
10803 :
10804 33 : if (!SWIG_Python_UnpackTuple(args, "Layer_AlterGeomFieldDefn", 4, 4, swig_obj)) SWIG_fail;
10805 33 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10806 33 : if (!SWIG_IsOK(res1)) {
10807 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_AlterGeomFieldDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10808 : }
10809 33 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10810 33 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
10811 33 : if (!SWIG_IsOK(ecode2)) {
10812 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_AlterGeomFieldDefn" "', argument " "2"" of type '" "int""'");
10813 : }
10814 33 : arg2 = static_cast< int >(val2);
10815 33 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
10816 33 : if (!SWIG_IsOK(res3)) {
10817 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_AlterGeomFieldDefn" "', argument " "3"" of type '" "OGRGeomFieldDefnShadow const *""'");
10818 : }
10819 33 : arg3 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp3);
10820 33 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
10821 33 : if (!SWIG_IsOK(ecode4)) {
10822 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_AlterGeomFieldDefn" "', argument " "4"" of type '" "int""'");
10823 : }
10824 33 : arg4 = static_cast< int >(val4);
10825 33 : {
10826 33 : if (!arg3) {
10827 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10828 : }
10829 : }
10830 33 : {
10831 33 : const int bLocalUseExceptions = GetUseExceptions();
10832 33 : if ( bLocalUseExceptions ) {
10833 3 : pushErrorHandler();
10834 : }
10835 33 : {
10836 33 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10837 33 : result = (OGRErr)OGRLayerShadow_AlterGeomFieldDefn(arg1,arg2,(OGRGeomFieldDefnShadow const *)arg3,arg4);
10838 33 : SWIG_PYTHON_THREAD_END_ALLOW;
10839 : }
10840 33 : if ( bLocalUseExceptions ) {
10841 3 : popErrorHandler();
10842 : }
10843 : #ifndef SED_HACKS
10844 : if ( bLocalUseExceptions ) {
10845 : CPLErr eclass = CPLGetLastErrorType();
10846 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10847 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10848 : }
10849 : }
10850 : #endif
10851 : }
10852 33 : {
10853 : /* %typemap(out) OGRErr */
10854 41 : if ( result != 0 && GetUseExceptions()) {
10855 0 : const char* pszMessage = CPLGetLastErrorMsg();
10856 0 : if( pszMessage[0] != '\0' )
10857 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10858 : else
10859 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10860 0 : SWIG_fail;
10861 : }
10862 : }
10863 33 : {
10864 : /* %typemap(ret) OGRErr */
10865 33 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10866 33 : resultobj = PyInt_FromLong( result );
10867 : }
10868 : }
10869 33 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10870 : return resultobj;
10871 : fail:
10872 : return NULL;
10873 : }
10874 :
10875 :
10876 116 : SWIGINTERN PyObject *_wrap_Layer_CreateGeomField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10877 116 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10878 116 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10879 116 : OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
10880 116 : int arg3 = (int) 1 ;
10881 116 : void *argp1 = 0 ;
10882 116 : int res1 = 0 ;
10883 116 : void *argp2 = 0 ;
10884 116 : int res2 = 0 ;
10885 116 : int val3 ;
10886 116 : int ecode3 = 0 ;
10887 116 : PyObject * obj0 = 0 ;
10888 116 : PyObject * obj1 = 0 ;
10889 116 : PyObject * obj2 = 0 ;
10890 116 : char * kwnames[] = {
10891 : (char *)"self", (char *)"field_def", (char *)"approx_ok", NULL
10892 : };
10893 116 : OGRErr result;
10894 :
10895 116 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Layer_CreateGeomField", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
10896 116 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10897 116 : if (!SWIG_IsOK(res1)) {
10898 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateGeomField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10899 : }
10900 116 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10901 116 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
10902 116 : if (!SWIG_IsOK(res2)) {
10903 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateGeomField" "', argument " "2"" of type '" "OGRGeomFieldDefnShadow *""'");
10904 : }
10905 116 : arg2 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp2);
10906 116 : if (obj2) {
10907 2 : ecode3 = SWIG_AsVal_int(obj2, &val3);
10908 2 : if (!SWIG_IsOK(ecode3)) {
10909 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateGeomField" "', argument " "3"" of type '" "int""'");
10910 : }
10911 : arg3 = static_cast< int >(val3);
10912 : }
10913 116 : {
10914 116 : if (!arg2) {
10915 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10916 : }
10917 : }
10918 116 : {
10919 116 : const int bLocalUseExceptions = GetUseExceptions();
10920 116 : if ( bLocalUseExceptions ) {
10921 36 : pushErrorHandler();
10922 : }
10923 116 : {
10924 116 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10925 116 : result = (OGRErr)OGRLayerShadow_CreateGeomField(arg1,arg2,arg3);
10926 116 : SWIG_PYTHON_THREAD_END_ALLOW;
10927 : }
10928 116 : if ( bLocalUseExceptions ) {
10929 36 : popErrorHandler();
10930 : }
10931 : #ifndef SED_HACKS
10932 : if ( bLocalUseExceptions ) {
10933 : CPLErr eclass = CPLGetLastErrorType();
10934 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10935 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10936 : }
10937 : }
10938 : #endif
10939 : }
10940 116 : {
10941 : /* %typemap(out) OGRErr */
10942 126 : if ( result != 0 && GetUseExceptions()) {
10943 1 : const char* pszMessage = CPLGetLastErrorMsg();
10944 1 : if( pszMessage[0] != '\0' )
10945 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10946 : else
10947 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10948 1 : SWIG_fail;
10949 : }
10950 : }
10951 115 : {
10952 : /* %typemap(ret) OGRErr */
10953 115 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10954 115 : resultobj = PyInt_FromLong( result );
10955 : }
10956 : }
10957 116 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
10958 : return resultobj;
10959 : fail:
10960 : return NULL;
10961 : }
10962 :
10963 :
10964 149 : SWIGINTERN PyObject *_wrap_Layer_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10965 149 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10966 149 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
10967 149 : void *argp1 = 0 ;
10968 149 : int res1 = 0 ;
10969 149 : PyObject *swig_obj[1] ;
10970 149 : OGRErr result;
10971 :
10972 149 : if (!args) SWIG_fail;
10973 149 : swig_obj[0] = args;
10974 149 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
10975 149 : if (!SWIG_IsOK(res1)) {
10976 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_StartTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
10977 : }
10978 149 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
10979 149 : {
10980 149 : const int bLocalUseExceptions = GetUseExceptions();
10981 149 : if ( bLocalUseExceptions ) {
10982 16 : pushErrorHandler();
10983 : }
10984 149 : {
10985 149 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
10986 149 : result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
10987 149 : SWIG_PYTHON_THREAD_END_ALLOW;
10988 : }
10989 149 : if ( bLocalUseExceptions ) {
10990 16 : popErrorHandler();
10991 : }
10992 : #ifndef SED_HACKS
10993 : if ( bLocalUseExceptions ) {
10994 : CPLErr eclass = CPLGetLastErrorType();
10995 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10996 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10997 : }
10998 : }
10999 : #endif
11000 : }
11001 149 : {
11002 : /* %typemap(out) OGRErr */
11003 153 : if ( result != 0 && GetUseExceptions()) {
11004 0 : const char* pszMessage = CPLGetLastErrorMsg();
11005 0 : if( pszMessage[0] != '\0' )
11006 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11007 : else
11008 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11009 0 : SWIG_fail;
11010 : }
11011 : }
11012 149 : {
11013 : /* %typemap(ret) OGRErr */
11014 149 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11015 149 : resultobj = PyInt_FromLong( result );
11016 : }
11017 : }
11018 149 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11019 : return resultobj;
11020 : fail:
11021 : return NULL;
11022 : }
11023 :
11024 :
11025 129 : SWIGINTERN PyObject *_wrap_Layer_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11026 129 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11027 129 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11028 129 : void *argp1 = 0 ;
11029 129 : int res1 = 0 ;
11030 129 : PyObject *swig_obj[1] ;
11031 129 : OGRErr result;
11032 :
11033 129 : if (!args) SWIG_fail;
11034 129 : swig_obj[0] = args;
11035 129 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11036 129 : if (!SWIG_IsOK(res1)) {
11037 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CommitTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11038 : }
11039 129 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11040 129 : {
11041 129 : const int bLocalUseExceptions = GetUseExceptions();
11042 129 : if ( bLocalUseExceptions ) {
11043 16 : pushErrorHandler();
11044 : }
11045 129 : {
11046 129 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11047 129 : result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
11048 129 : SWIG_PYTHON_THREAD_END_ALLOW;
11049 : }
11050 129 : if ( bLocalUseExceptions ) {
11051 16 : popErrorHandler();
11052 : }
11053 : #ifndef SED_HACKS
11054 : if ( bLocalUseExceptions ) {
11055 : CPLErr eclass = CPLGetLastErrorType();
11056 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11057 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11058 : }
11059 : }
11060 : #endif
11061 : }
11062 129 : {
11063 : /* %typemap(out) OGRErr */
11064 147 : if ( result != 0 && GetUseExceptions()) {
11065 0 : const char* pszMessage = CPLGetLastErrorMsg();
11066 0 : if( pszMessage[0] != '\0' )
11067 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11068 : else
11069 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11070 0 : SWIG_fail;
11071 : }
11072 : }
11073 129 : {
11074 : /* %typemap(ret) OGRErr */
11075 129 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11076 129 : resultobj = PyInt_FromLong( result );
11077 : }
11078 : }
11079 129 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11080 : return resultobj;
11081 : fail:
11082 : return NULL;
11083 : }
11084 :
11085 :
11086 26 : SWIGINTERN PyObject *_wrap_Layer_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11087 26 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11088 26 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11089 26 : void *argp1 = 0 ;
11090 26 : int res1 = 0 ;
11091 26 : PyObject *swig_obj[1] ;
11092 26 : OGRErr result;
11093 :
11094 26 : if (!args) SWIG_fail;
11095 26 : swig_obj[0] = args;
11096 26 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11097 26 : if (!SWIG_IsOK(res1)) {
11098 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_RollbackTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11099 : }
11100 26 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11101 26 : {
11102 26 : const int bLocalUseExceptions = GetUseExceptions();
11103 26 : if ( bLocalUseExceptions ) {
11104 0 : pushErrorHandler();
11105 : }
11106 26 : {
11107 26 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11108 26 : result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
11109 26 : SWIG_PYTHON_THREAD_END_ALLOW;
11110 : }
11111 26 : if ( bLocalUseExceptions ) {
11112 0 : popErrorHandler();
11113 : }
11114 : #ifndef SED_HACKS
11115 : if ( bLocalUseExceptions ) {
11116 : CPLErr eclass = CPLGetLastErrorType();
11117 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11118 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11119 : }
11120 : }
11121 : #endif
11122 : }
11123 26 : {
11124 : /* %typemap(out) OGRErr */
11125 33 : if ( result != 0 && GetUseExceptions()) {
11126 0 : const char* pszMessage = CPLGetLastErrorMsg();
11127 0 : if( pszMessage[0] != '\0' )
11128 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11129 : else
11130 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11131 0 : SWIG_fail;
11132 : }
11133 : }
11134 26 : {
11135 : /* %typemap(ret) OGRErr */
11136 26 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11137 26 : resultobj = PyInt_FromLong( result );
11138 : }
11139 : }
11140 26 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11141 : return resultobj;
11142 : fail:
11143 : return NULL;
11144 : }
11145 :
11146 :
11147 2 : SWIGINTERN PyObject *_wrap_Layer_FindFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11148 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11149 2 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11150 2 : char *arg2 = (char *) 0 ;
11151 2 : int arg3 ;
11152 2 : void *argp1 = 0 ;
11153 2 : int res1 = 0 ;
11154 2 : int res2 ;
11155 2 : char *buf2 = 0 ;
11156 2 : int alloc2 = 0 ;
11157 2 : int val3 ;
11158 2 : int ecode3 = 0 ;
11159 2 : PyObject *swig_obj[3] ;
11160 2 : int result;
11161 :
11162 2 : if (!SWIG_Python_UnpackTuple(args, "Layer_FindFieldIndex", 3, 3, swig_obj)) SWIG_fail;
11163 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11164 2 : if (!SWIG_IsOK(res1)) {
11165 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_FindFieldIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11166 : }
11167 2 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11168 2 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
11169 2 : if (!SWIG_IsOK(res2)) {
11170 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_FindFieldIndex" "', argument " "2"" of type '" "char const *""'");
11171 : }
11172 2 : arg2 = reinterpret_cast< char * >(buf2);
11173 2 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
11174 2 : if (!SWIG_IsOK(ecode3)) {
11175 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_FindFieldIndex" "', argument " "3"" of type '" "int""'");
11176 : }
11177 2 : arg3 = static_cast< int >(val3);
11178 2 : {
11179 2 : const int bLocalUseExceptions = GetUseExceptions();
11180 2 : if ( bLocalUseExceptions ) {
11181 0 : pushErrorHandler();
11182 : }
11183 2 : {
11184 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11185 2 : result = (int)OGRLayerShadow_FindFieldIndex(arg1,(char const *)arg2,arg3);
11186 2 : SWIG_PYTHON_THREAD_END_ALLOW;
11187 : }
11188 2 : if ( bLocalUseExceptions ) {
11189 0 : popErrorHandler();
11190 : }
11191 : #ifndef SED_HACKS
11192 : if ( bLocalUseExceptions ) {
11193 : CPLErr eclass = CPLGetLastErrorType();
11194 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11195 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11196 : }
11197 : }
11198 : #endif
11199 : }
11200 2 : resultobj = SWIG_From_int(static_cast< int >(result));
11201 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11202 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11203 : return resultobj;
11204 0 : fail:
11205 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11206 : return NULL;
11207 : }
11208 :
11209 :
11210 896 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11211 896 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11212 896 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11213 896 : void *argp1 = 0 ;
11214 896 : int res1 = 0 ;
11215 896 : PyObject *swig_obj[1] ;
11216 896 : OSRSpatialReferenceShadow *result = 0 ;
11217 :
11218 896 : if (!args) SWIG_fail;
11219 896 : swig_obj[0] = args;
11220 896 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11221 896 : if (!SWIG_IsOK(res1)) {
11222 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialRef" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11223 : }
11224 896 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11225 896 : {
11226 896 : const int bLocalUseExceptions = GetUseExceptions();
11227 896 : if ( bLocalUseExceptions ) {
11228 473 : pushErrorHandler();
11229 : }
11230 896 : {
11231 896 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11232 896 : result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
11233 896 : SWIG_PYTHON_THREAD_END_ALLOW;
11234 : }
11235 896 : if ( bLocalUseExceptions ) {
11236 473 : popErrorHandler();
11237 : }
11238 : #ifndef SED_HACKS
11239 : if ( bLocalUseExceptions ) {
11240 : CPLErr eclass = CPLGetLastErrorType();
11241 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11242 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11243 : }
11244 : }
11245 : #endif
11246 : }
11247 896 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
11248 896 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11249 : return resultobj;
11250 : fail:
11251 : return NULL;
11252 : }
11253 :
11254 :
11255 0 : SWIGINTERN PyObject *_wrap_Layer_GetFeaturesRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11256 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11257 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11258 0 : void *argp1 = 0 ;
11259 0 : int res1 = 0 ;
11260 0 : PyObject *swig_obj[1] ;
11261 0 : GIntBig result;
11262 :
11263 0 : if (!args) SWIG_fail;
11264 0 : swig_obj[0] = args;
11265 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11266 0 : if (!SWIG_IsOK(res1)) {
11267 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeaturesRead" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11268 : }
11269 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11270 0 : {
11271 0 : const int bLocalUseExceptions = GetUseExceptions();
11272 0 : if ( bLocalUseExceptions ) {
11273 0 : pushErrorHandler();
11274 : }
11275 0 : {
11276 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11277 0 : result = OGRLayerShadow_GetFeaturesRead(arg1);
11278 0 : SWIG_PYTHON_THREAD_END_ALLOW;
11279 : }
11280 0 : if ( bLocalUseExceptions ) {
11281 0 : popErrorHandler();
11282 : }
11283 : #ifndef SED_HACKS
11284 : if ( bLocalUseExceptions ) {
11285 : CPLErr eclass = CPLGetLastErrorType();
11286 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11287 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11288 : }
11289 : }
11290 : #endif
11291 : }
11292 0 : {
11293 0 : resultobj = PyLong_FromLongLong(result);
11294 : }
11295 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11296 : return resultobj;
11297 : fail:
11298 : return NULL;
11299 : }
11300 :
11301 :
11302 198 : SWIGINTERN PyObject *_wrap_Layer_SetIgnoredFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11303 198 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11304 198 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11305 198 : char **arg2 = (char **) 0 ;
11306 198 : void *argp1 = 0 ;
11307 198 : int res1 = 0 ;
11308 198 : PyObject *swig_obj[2] ;
11309 198 : OGRErr result;
11310 :
11311 198 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetIgnoredFields", 2, 2, swig_obj)) SWIG_fail;
11312 198 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11313 198 : if (!SWIG_IsOK(res1)) {
11314 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetIgnoredFields" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11315 : }
11316 198 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11317 198 : {
11318 : /* %typemap(in) char **dict */
11319 198 : arg2 = NULL;
11320 198 : if ( PySequence_Check( swig_obj[1] ) ) {
11321 198 : int bErr = FALSE;
11322 198 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
11323 198 : if ( bErr )
11324 : {
11325 0 : SWIG_fail;
11326 : }
11327 : }
11328 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
11329 0 : int bErr = FALSE;
11330 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
11331 0 : if ( bErr )
11332 : {
11333 0 : SWIG_fail;
11334 : }
11335 : }
11336 : else {
11337 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
11338 0 : SWIG_fail;
11339 : }
11340 : }
11341 198 : {
11342 198 : const int bLocalUseExceptions = GetUseExceptions();
11343 198 : if ( bLocalUseExceptions ) {
11344 175 : pushErrorHandler();
11345 : }
11346 198 : {
11347 198 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11348 198 : result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
11349 198 : SWIG_PYTHON_THREAD_END_ALLOW;
11350 : }
11351 198 : if ( bLocalUseExceptions ) {
11352 175 : popErrorHandler();
11353 : }
11354 : #ifndef SED_HACKS
11355 : if ( bLocalUseExceptions ) {
11356 : CPLErr eclass = CPLGetLastErrorType();
11357 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11358 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11359 : }
11360 : }
11361 : #endif
11362 : }
11363 198 : {
11364 : /* %typemap(out) OGRErr */
11365 198 : if ( result != 0 && GetUseExceptions()) {
11366 0 : const char* pszMessage = CPLGetLastErrorMsg();
11367 0 : if( pszMessage[0] != '\0' )
11368 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11369 : else
11370 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11371 0 : SWIG_fail;
11372 : }
11373 : }
11374 198 : {
11375 : /* %typemap(freearg) char **dict */
11376 198 : CSLDestroy( arg2 );
11377 : }
11378 198 : {
11379 : /* %typemap(ret) OGRErr */
11380 198 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11381 198 : resultobj = PyInt_FromLong( result );
11382 : }
11383 : }
11384 199 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11385 : return resultobj;
11386 0 : fail:
11387 0 : {
11388 : /* %typemap(freearg) char **dict */
11389 0 : CSLDestroy( arg2 );
11390 : }
11391 : return NULL;
11392 : }
11393 :
11394 :
11395 6 : SWIGINTERN PyObject *_wrap_Layer_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11396 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11397 6 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11398 6 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
11399 6 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
11400 6 : char **arg4 = (char **) NULL ;
11401 6 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
11402 6 : void *arg6 = (void *) NULL ;
11403 6 : void *argp1 = 0 ;
11404 6 : int res1 = 0 ;
11405 6 : void *argp2 = 0 ;
11406 6 : int res2 = 0 ;
11407 6 : void *argp3 = 0 ;
11408 6 : int res3 = 0 ;
11409 6 : PyObject * obj0 = 0 ;
11410 6 : PyObject * obj1 = 0 ;
11411 6 : PyObject * obj2 = 0 ;
11412 6 : PyObject * obj3 = 0 ;
11413 6 : PyObject * obj4 = 0 ;
11414 6 : PyObject * obj5 = 0 ;
11415 6 : char * kwnames[] = {
11416 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
11417 : };
11418 6 : OGRErr result;
11419 :
11420 : /* %typemap(arginit) ( const char* callback_data=NULL) */
11421 6 : PyProgressData *psProgressInfo;
11422 6 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
11423 6 : psProgressInfo->nLastReported = -1;
11424 6 : psProgressInfo->psPyCallback = NULL;
11425 6 : psProgressInfo->psPyCallbackData = NULL;
11426 6 : arg6 = psProgressInfo;
11427 6 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Intersection", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11428 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11429 6 : if (!SWIG_IsOK(res1)) {
11430 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Intersection" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11431 : }
11432 6 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11433 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11434 6 : if (!SWIG_IsOK(res2)) {
11435 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Intersection" "', argument " "2"" of type '" "OGRLayerShadow *""'");
11436 : }
11437 6 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
11438 6 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11439 6 : if (!SWIG_IsOK(res3)) {
11440 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Intersection" "', argument " "3"" of type '" "OGRLayerShadow *""'");
11441 : }
11442 6 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
11443 6 : if (obj3) {
11444 5 : {
11445 : /* %typemap(in) char **dict */
11446 5 : arg4 = NULL;
11447 5 : if ( PySequence_Check( obj3 ) ) {
11448 5 : int bErr = FALSE;
11449 5 : arg4 = CSLFromPySequence(obj3, &bErr);
11450 5 : if ( bErr )
11451 : {
11452 0 : SWIG_fail;
11453 : }
11454 : }
11455 0 : else if ( PyMapping_Check( obj3 ) ) {
11456 0 : int bErr = FALSE;
11457 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
11458 0 : if ( bErr )
11459 : {
11460 0 : SWIG_fail;
11461 : }
11462 : }
11463 : else {
11464 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
11465 0 : SWIG_fail;
11466 : }
11467 : }
11468 : }
11469 6 : if (obj4) {
11470 1 : {
11471 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
11472 : /* callback_func typemap */
11473 :
11474 : /* In some cases 0 is passed instead of None. */
11475 : /* See https://github.com/OSGeo/gdal/pull/219 */
11476 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
11477 : {
11478 0 : if( PyLong_AsLong(obj4) == 0 )
11479 : {
11480 0 : obj4 = Py_None;
11481 : }
11482 : }
11483 :
11484 1 : if (obj4 && obj4 != Py_None ) {
11485 1 : void* cbfunction = NULL;
11486 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
11487 : (void**)&cbfunction,
11488 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
11489 : SWIG_POINTER_EXCEPTION | 0 ));
11490 :
11491 1 : if ( cbfunction == GDALTermProgress ) {
11492 : arg5 = GDALTermProgress;
11493 : } else {
11494 1 : if (!PyCallable_Check(obj4)) {
11495 0 : PyErr_SetString( PyExc_RuntimeError,
11496 : "Object given is not a Python function" );
11497 0 : SWIG_fail;
11498 : }
11499 1 : psProgressInfo->psPyCallback = obj4;
11500 1 : arg5 = PyProgressProxy;
11501 : }
11502 :
11503 : }
11504 :
11505 : }
11506 : }
11507 6 : if (obj5) {
11508 0 : {
11509 : /* %typemap(in) ( void* callback_data=NULL) */
11510 0 : psProgressInfo->psPyCallbackData = obj5 ;
11511 : }
11512 : }
11513 6 : {
11514 6 : const int bLocalUseExceptions = GetUseExceptions();
11515 6 : if ( bLocalUseExceptions ) {
11516 6 : pushErrorHandler();
11517 : }
11518 6 : {
11519 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11520 6 : result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,arg5,arg6);
11521 6 : SWIG_PYTHON_THREAD_END_ALLOW;
11522 : }
11523 6 : if ( bLocalUseExceptions ) {
11524 6 : popErrorHandler();
11525 : }
11526 : #ifndef SED_HACKS
11527 : if ( bLocalUseExceptions ) {
11528 : CPLErr eclass = CPLGetLastErrorType();
11529 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11530 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11531 : }
11532 : }
11533 : #endif
11534 : }
11535 6 : {
11536 : /* %typemap(out) OGRErr */
11537 6 : if ( result != 0 && GetUseExceptions()) {
11538 0 : const char* pszMessage = CPLGetLastErrorMsg();
11539 0 : if( pszMessage[0] != '\0' )
11540 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11541 : else
11542 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11543 0 : SWIG_fail;
11544 : }
11545 : }
11546 6 : {
11547 : /* %typemap(freearg) char **dict */
11548 6 : CSLDestroy( arg4 );
11549 : }
11550 6 : {
11551 : /* %typemap(freearg) ( void* callback_data=NULL) */
11552 :
11553 6 : CPLFree(psProgressInfo);
11554 :
11555 : }
11556 6 : {
11557 : /* %typemap(ret) OGRErr */
11558 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11559 6 : resultobj = PyInt_FromLong( result );
11560 : }
11561 : }
11562 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11563 : return resultobj;
11564 0 : fail:
11565 0 : {
11566 : /* %typemap(freearg) char **dict */
11567 0 : CSLDestroy( arg4 );
11568 : }
11569 0 : {
11570 : /* %typemap(freearg) ( void* callback_data=NULL) */
11571 :
11572 0 : CPLFree(psProgressInfo);
11573 :
11574 : }
11575 : return NULL;
11576 : }
11577 :
11578 :
11579 7 : SWIGINTERN PyObject *_wrap_Layer_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11580 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11581 7 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11582 7 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
11583 7 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
11584 7 : char **arg4 = (char **) NULL ;
11585 7 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
11586 7 : void *arg6 = (void *) NULL ;
11587 7 : void *argp1 = 0 ;
11588 7 : int res1 = 0 ;
11589 7 : void *argp2 = 0 ;
11590 7 : int res2 = 0 ;
11591 7 : void *argp3 = 0 ;
11592 7 : int res3 = 0 ;
11593 7 : PyObject * obj0 = 0 ;
11594 7 : PyObject * obj1 = 0 ;
11595 7 : PyObject * obj2 = 0 ;
11596 7 : PyObject * obj3 = 0 ;
11597 7 : PyObject * obj4 = 0 ;
11598 7 : PyObject * obj5 = 0 ;
11599 7 : char * kwnames[] = {
11600 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
11601 : };
11602 7 : OGRErr result;
11603 :
11604 : /* %typemap(arginit) ( const char* callback_data=NULL) */
11605 7 : PyProgressData *psProgressInfo;
11606 7 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
11607 7 : psProgressInfo->nLastReported = -1;
11608 7 : psProgressInfo->psPyCallback = NULL;
11609 7 : psProgressInfo->psPyCallbackData = NULL;
11610 7 : arg6 = psProgressInfo;
11611 7 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Union", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11612 7 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11613 7 : if (!SWIG_IsOK(res1)) {
11614 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Union" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11615 : }
11616 7 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11617 7 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11618 7 : if (!SWIG_IsOK(res2)) {
11619 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Union" "', argument " "2"" of type '" "OGRLayerShadow *""'");
11620 : }
11621 7 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
11622 7 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11623 7 : if (!SWIG_IsOK(res3)) {
11624 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Union" "', argument " "3"" of type '" "OGRLayerShadow *""'");
11625 : }
11626 7 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
11627 7 : if (obj3) {
11628 5 : {
11629 : /* %typemap(in) char **dict */
11630 5 : arg4 = NULL;
11631 5 : if ( PySequence_Check( obj3 ) ) {
11632 5 : int bErr = FALSE;
11633 5 : arg4 = CSLFromPySequence(obj3, &bErr);
11634 5 : if ( bErr )
11635 : {
11636 0 : SWIG_fail;
11637 : }
11638 : }
11639 0 : else if ( PyMapping_Check( obj3 ) ) {
11640 0 : int bErr = FALSE;
11641 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
11642 0 : if ( bErr )
11643 : {
11644 0 : SWIG_fail;
11645 : }
11646 : }
11647 : else {
11648 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
11649 0 : SWIG_fail;
11650 : }
11651 : }
11652 : }
11653 7 : if (obj4) {
11654 1 : {
11655 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
11656 : /* callback_func typemap */
11657 :
11658 : /* In some cases 0 is passed instead of None. */
11659 : /* See https://github.com/OSGeo/gdal/pull/219 */
11660 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
11661 : {
11662 0 : if( PyLong_AsLong(obj4) == 0 )
11663 : {
11664 0 : obj4 = Py_None;
11665 : }
11666 : }
11667 :
11668 1 : if (obj4 && obj4 != Py_None ) {
11669 1 : void* cbfunction = NULL;
11670 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
11671 : (void**)&cbfunction,
11672 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
11673 : SWIG_POINTER_EXCEPTION | 0 ));
11674 :
11675 1 : if ( cbfunction == GDALTermProgress ) {
11676 : arg5 = GDALTermProgress;
11677 : } else {
11678 1 : if (!PyCallable_Check(obj4)) {
11679 0 : PyErr_SetString( PyExc_RuntimeError,
11680 : "Object given is not a Python function" );
11681 0 : SWIG_fail;
11682 : }
11683 1 : psProgressInfo->psPyCallback = obj4;
11684 1 : arg5 = PyProgressProxy;
11685 : }
11686 :
11687 : }
11688 :
11689 : }
11690 : }
11691 7 : if (obj5) {
11692 0 : {
11693 : /* %typemap(in) ( void* callback_data=NULL) */
11694 0 : psProgressInfo->psPyCallbackData = obj5 ;
11695 : }
11696 : }
11697 7 : {
11698 7 : const int bLocalUseExceptions = GetUseExceptions();
11699 7 : if ( bLocalUseExceptions ) {
11700 7 : pushErrorHandler();
11701 : }
11702 7 : {
11703 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11704 7 : result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,arg5,arg6);
11705 7 : SWIG_PYTHON_THREAD_END_ALLOW;
11706 : }
11707 7 : if ( bLocalUseExceptions ) {
11708 7 : popErrorHandler();
11709 : }
11710 : #ifndef SED_HACKS
11711 : if ( bLocalUseExceptions ) {
11712 : CPLErr eclass = CPLGetLastErrorType();
11713 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11714 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11715 : }
11716 : }
11717 : #endif
11718 : }
11719 7 : {
11720 : /* %typemap(out) OGRErr */
11721 7 : if ( result != 0 && GetUseExceptions()) {
11722 0 : const char* pszMessage = CPLGetLastErrorMsg();
11723 0 : if( pszMessage[0] != '\0' )
11724 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11725 : else
11726 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11727 0 : SWIG_fail;
11728 : }
11729 : }
11730 7 : {
11731 : /* %typemap(freearg) char **dict */
11732 7 : CSLDestroy( arg4 );
11733 : }
11734 7 : {
11735 : /* %typemap(freearg) ( void* callback_data=NULL) */
11736 :
11737 7 : CPLFree(psProgressInfo);
11738 :
11739 : }
11740 7 : {
11741 : /* %typemap(ret) OGRErr */
11742 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11743 7 : resultobj = PyInt_FromLong( result );
11744 : }
11745 : }
11746 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11747 : return resultobj;
11748 0 : fail:
11749 0 : {
11750 : /* %typemap(freearg) char **dict */
11751 0 : CSLDestroy( arg4 );
11752 : }
11753 0 : {
11754 : /* %typemap(freearg) ( void* callback_data=NULL) */
11755 :
11756 0 : CPLFree(psProgressInfo);
11757 :
11758 : }
11759 : return NULL;
11760 : }
11761 :
11762 :
11763 4 : SWIGINTERN PyObject *_wrap_Layer_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11764 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11765 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11766 4 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
11767 4 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
11768 4 : char **arg4 = (char **) NULL ;
11769 4 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
11770 4 : void *arg6 = (void *) NULL ;
11771 4 : void *argp1 = 0 ;
11772 4 : int res1 = 0 ;
11773 4 : void *argp2 = 0 ;
11774 4 : int res2 = 0 ;
11775 4 : void *argp3 = 0 ;
11776 4 : int res3 = 0 ;
11777 4 : PyObject * obj0 = 0 ;
11778 4 : PyObject * obj1 = 0 ;
11779 4 : PyObject * obj2 = 0 ;
11780 4 : PyObject * obj3 = 0 ;
11781 4 : PyObject * obj4 = 0 ;
11782 4 : PyObject * obj5 = 0 ;
11783 4 : char * kwnames[] = {
11784 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
11785 : };
11786 4 : OGRErr result;
11787 :
11788 : /* %typemap(arginit) ( const char* callback_data=NULL) */
11789 4 : PyProgressData *psProgressInfo;
11790 4 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
11791 4 : psProgressInfo->nLastReported = -1;
11792 4 : psProgressInfo->psPyCallback = NULL;
11793 4 : psProgressInfo->psPyCallbackData = NULL;
11794 4 : arg6 = psProgressInfo;
11795 4 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_SymDifference", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11796 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11797 4 : if (!SWIG_IsOK(res1)) {
11798 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SymDifference" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11799 : }
11800 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11801 4 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11802 4 : if (!SWIG_IsOK(res2)) {
11803 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SymDifference" "', argument " "2"" of type '" "OGRLayerShadow *""'");
11804 : }
11805 4 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
11806 4 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11807 4 : if (!SWIG_IsOK(res3)) {
11808 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SymDifference" "', argument " "3"" of type '" "OGRLayerShadow *""'");
11809 : }
11810 4 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
11811 4 : if (obj3) {
11812 2 : {
11813 : /* %typemap(in) char **dict */
11814 2 : arg4 = NULL;
11815 2 : if ( PySequence_Check( obj3 ) ) {
11816 2 : int bErr = FALSE;
11817 2 : arg4 = CSLFromPySequence(obj3, &bErr);
11818 2 : if ( bErr )
11819 : {
11820 0 : SWIG_fail;
11821 : }
11822 : }
11823 0 : else if ( PyMapping_Check( obj3 ) ) {
11824 0 : int bErr = FALSE;
11825 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
11826 0 : if ( bErr )
11827 : {
11828 0 : SWIG_fail;
11829 : }
11830 : }
11831 : else {
11832 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
11833 0 : SWIG_fail;
11834 : }
11835 : }
11836 : }
11837 4 : if (obj4) {
11838 1 : {
11839 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
11840 : /* callback_func typemap */
11841 :
11842 : /* In some cases 0 is passed instead of None. */
11843 : /* See https://github.com/OSGeo/gdal/pull/219 */
11844 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
11845 : {
11846 0 : if( PyLong_AsLong(obj4) == 0 )
11847 : {
11848 0 : obj4 = Py_None;
11849 : }
11850 : }
11851 :
11852 1 : if (obj4 && obj4 != Py_None ) {
11853 1 : void* cbfunction = NULL;
11854 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
11855 : (void**)&cbfunction,
11856 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
11857 : SWIG_POINTER_EXCEPTION | 0 ));
11858 :
11859 1 : if ( cbfunction == GDALTermProgress ) {
11860 : arg5 = GDALTermProgress;
11861 : } else {
11862 1 : if (!PyCallable_Check(obj4)) {
11863 0 : PyErr_SetString( PyExc_RuntimeError,
11864 : "Object given is not a Python function" );
11865 0 : SWIG_fail;
11866 : }
11867 1 : psProgressInfo->psPyCallback = obj4;
11868 1 : arg5 = PyProgressProxy;
11869 : }
11870 :
11871 : }
11872 :
11873 : }
11874 : }
11875 4 : if (obj5) {
11876 0 : {
11877 : /* %typemap(in) ( void* callback_data=NULL) */
11878 0 : psProgressInfo->psPyCallbackData = obj5 ;
11879 : }
11880 : }
11881 4 : {
11882 4 : const int bLocalUseExceptions = GetUseExceptions();
11883 4 : if ( bLocalUseExceptions ) {
11884 4 : pushErrorHandler();
11885 : }
11886 4 : {
11887 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
11888 4 : result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,arg5,arg6);
11889 4 : SWIG_PYTHON_THREAD_END_ALLOW;
11890 : }
11891 4 : if ( bLocalUseExceptions ) {
11892 4 : popErrorHandler();
11893 : }
11894 : #ifndef SED_HACKS
11895 : if ( bLocalUseExceptions ) {
11896 : CPLErr eclass = CPLGetLastErrorType();
11897 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11898 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11899 : }
11900 : }
11901 : #endif
11902 : }
11903 4 : {
11904 : /* %typemap(out) OGRErr */
11905 4 : if ( result != 0 && GetUseExceptions()) {
11906 0 : const char* pszMessage = CPLGetLastErrorMsg();
11907 0 : if( pszMessage[0] != '\0' )
11908 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11909 : else
11910 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11911 0 : SWIG_fail;
11912 : }
11913 : }
11914 4 : {
11915 : /* %typemap(freearg) char **dict */
11916 4 : CSLDestroy( arg4 );
11917 : }
11918 4 : {
11919 : /* %typemap(freearg) ( void* callback_data=NULL) */
11920 :
11921 4 : CPLFree(psProgressInfo);
11922 :
11923 : }
11924 4 : {
11925 : /* %typemap(ret) OGRErr */
11926 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11927 4 : resultobj = PyInt_FromLong( result );
11928 : }
11929 : }
11930 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
11931 : return resultobj;
11932 0 : fail:
11933 0 : {
11934 : /* %typemap(freearg) char **dict */
11935 0 : CSLDestroy( arg4 );
11936 : }
11937 0 : {
11938 : /* %typemap(freearg) ( void* callback_data=NULL) */
11939 :
11940 0 : CPLFree(psProgressInfo);
11941 :
11942 : }
11943 : return NULL;
11944 : }
11945 :
11946 :
11947 6 : SWIGINTERN PyObject *_wrap_Layer_Identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11948 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11949 6 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
11950 6 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
11951 6 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
11952 6 : char **arg4 = (char **) NULL ;
11953 6 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
11954 6 : void *arg6 = (void *) NULL ;
11955 6 : void *argp1 = 0 ;
11956 6 : int res1 = 0 ;
11957 6 : void *argp2 = 0 ;
11958 6 : int res2 = 0 ;
11959 6 : void *argp3 = 0 ;
11960 6 : int res3 = 0 ;
11961 6 : PyObject * obj0 = 0 ;
11962 6 : PyObject * obj1 = 0 ;
11963 6 : PyObject * obj2 = 0 ;
11964 6 : PyObject * obj3 = 0 ;
11965 6 : PyObject * obj4 = 0 ;
11966 6 : PyObject * obj5 = 0 ;
11967 6 : char * kwnames[] = {
11968 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
11969 : };
11970 6 : OGRErr result;
11971 :
11972 : /* %typemap(arginit) ( const char* callback_data=NULL) */
11973 6 : PyProgressData *psProgressInfo;
11974 6 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
11975 6 : psProgressInfo->nLastReported = -1;
11976 6 : psProgressInfo->psPyCallback = NULL;
11977 6 : psProgressInfo->psPyCallbackData = NULL;
11978 6 : arg6 = psProgressInfo;
11979 6 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Identity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11980 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11981 6 : if (!SWIG_IsOK(res1)) {
11982 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Identity" "', argument " "1"" of type '" "OGRLayerShadow *""'");
11983 : }
11984 6 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
11985 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11986 6 : if (!SWIG_IsOK(res2)) {
11987 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Identity" "', argument " "2"" of type '" "OGRLayerShadow *""'");
11988 : }
11989 6 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
11990 6 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
11991 6 : if (!SWIG_IsOK(res3)) {
11992 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Identity" "', argument " "3"" of type '" "OGRLayerShadow *""'");
11993 : }
11994 6 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
11995 6 : if (obj3) {
11996 5 : {
11997 : /* %typemap(in) char **dict */
11998 5 : arg4 = NULL;
11999 5 : if ( PySequence_Check( obj3 ) ) {
12000 5 : int bErr = FALSE;
12001 5 : arg4 = CSLFromPySequence(obj3, &bErr);
12002 5 : if ( bErr )
12003 : {
12004 0 : SWIG_fail;
12005 : }
12006 : }
12007 0 : else if ( PyMapping_Check( obj3 ) ) {
12008 0 : int bErr = FALSE;
12009 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
12010 0 : if ( bErr )
12011 : {
12012 0 : SWIG_fail;
12013 : }
12014 : }
12015 : else {
12016 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12017 0 : SWIG_fail;
12018 : }
12019 : }
12020 : }
12021 6 : if (obj4) {
12022 1 : {
12023 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
12024 : /* callback_func typemap */
12025 :
12026 : /* In some cases 0 is passed instead of None. */
12027 : /* See https://github.com/OSGeo/gdal/pull/219 */
12028 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
12029 : {
12030 0 : if( PyLong_AsLong(obj4) == 0 )
12031 : {
12032 0 : obj4 = Py_None;
12033 : }
12034 : }
12035 :
12036 1 : if (obj4 && obj4 != Py_None ) {
12037 1 : void* cbfunction = NULL;
12038 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
12039 : (void**)&cbfunction,
12040 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
12041 : SWIG_POINTER_EXCEPTION | 0 ));
12042 :
12043 1 : if ( cbfunction == GDALTermProgress ) {
12044 : arg5 = GDALTermProgress;
12045 : } else {
12046 1 : if (!PyCallable_Check(obj4)) {
12047 0 : PyErr_SetString( PyExc_RuntimeError,
12048 : "Object given is not a Python function" );
12049 0 : SWIG_fail;
12050 : }
12051 1 : psProgressInfo->psPyCallback = obj4;
12052 1 : arg5 = PyProgressProxy;
12053 : }
12054 :
12055 : }
12056 :
12057 : }
12058 : }
12059 6 : if (obj5) {
12060 0 : {
12061 : /* %typemap(in) ( void* callback_data=NULL) */
12062 0 : psProgressInfo->psPyCallbackData = obj5 ;
12063 : }
12064 : }
12065 6 : {
12066 6 : const int bLocalUseExceptions = GetUseExceptions();
12067 6 : if ( bLocalUseExceptions ) {
12068 6 : pushErrorHandler();
12069 : }
12070 6 : {
12071 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12072 6 : result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,arg5,arg6);
12073 6 : SWIG_PYTHON_THREAD_END_ALLOW;
12074 : }
12075 6 : if ( bLocalUseExceptions ) {
12076 6 : popErrorHandler();
12077 : }
12078 : #ifndef SED_HACKS
12079 : if ( bLocalUseExceptions ) {
12080 : CPLErr eclass = CPLGetLastErrorType();
12081 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12082 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12083 : }
12084 : }
12085 : #endif
12086 : }
12087 6 : {
12088 : /* %typemap(out) OGRErr */
12089 6 : if ( result != 0 && GetUseExceptions()) {
12090 0 : const char* pszMessage = CPLGetLastErrorMsg();
12091 0 : if( pszMessage[0] != '\0' )
12092 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12093 : else
12094 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12095 0 : SWIG_fail;
12096 : }
12097 : }
12098 6 : {
12099 : /* %typemap(freearg) char **dict */
12100 6 : CSLDestroy( arg4 );
12101 : }
12102 6 : {
12103 : /* %typemap(freearg) ( void* callback_data=NULL) */
12104 :
12105 6 : CPLFree(psProgressInfo);
12106 :
12107 : }
12108 6 : {
12109 : /* %typemap(ret) OGRErr */
12110 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12111 6 : resultobj = PyInt_FromLong( result );
12112 : }
12113 : }
12114 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12115 : return resultobj;
12116 0 : fail:
12117 0 : {
12118 : /* %typemap(freearg) char **dict */
12119 0 : CSLDestroy( arg4 );
12120 : }
12121 0 : {
12122 : /* %typemap(freearg) ( void* callback_data=NULL) */
12123 :
12124 0 : CPLFree(psProgressInfo);
12125 :
12126 : }
12127 : return NULL;
12128 : }
12129 :
12130 :
12131 5 : SWIGINTERN PyObject *_wrap_Layer_Update(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12132 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12133 5 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12134 5 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
12135 5 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
12136 5 : char **arg4 = (char **) NULL ;
12137 5 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
12138 5 : void *arg6 = (void *) NULL ;
12139 5 : void *argp1 = 0 ;
12140 5 : int res1 = 0 ;
12141 5 : void *argp2 = 0 ;
12142 5 : int res2 = 0 ;
12143 5 : void *argp3 = 0 ;
12144 5 : int res3 = 0 ;
12145 5 : PyObject * obj0 = 0 ;
12146 5 : PyObject * obj1 = 0 ;
12147 5 : PyObject * obj2 = 0 ;
12148 5 : PyObject * obj3 = 0 ;
12149 5 : PyObject * obj4 = 0 ;
12150 5 : PyObject * obj5 = 0 ;
12151 5 : char * kwnames[] = {
12152 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
12153 : };
12154 5 : OGRErr result;
12155 :
12156 : /* %typemap(arginit) ( const char* callback_data=NULL) */
12157 5 : PyProgressData *psProgressInfo;
12158 5 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
12159 5 : psProgressInfo->nLastReported = -1;
12160 5 : psProgressInfo->psPyCallback = NULL;
12161 5 : psProgressInfo->psPyCallbackData = NULL;
12162 5 : arg6 = psProgressInfo;
12163 5 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Update", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12164 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12165 5 : if (!SWIG_IsOK(res1)) {
12166 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Update" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12167 : }
12168 5 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12169 5 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12170 5 : if (!SWIG_IsOK(res2)) {
12171 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Update" "', argument " "2"" of type '" "OGRLayerShadow *""'");
12172 : }
12173 5 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
12174 5 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12175 5 : if (!SWIG_IsOK(res3)) {
12176 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Update" "', argument " "3"" of type '" "OGRLayerShadow *""'");
12177 : }
12178 5 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
12179 5 : if (obj3) {
12180 2 : {
12181 : /* %typemap(in) char **dict */
12182 2 : arg4 = NULL;
12183 2 : if ( PySequence_Check( obj3 ) ) {
12184 2 : int bErr = FALSE;
12185 2 : arg4 = CSLFromPySequence(obj3, &bErr);
12186 2 : if ( bErr )
12187 : {
12188 0 : SWIG_fail;
12189 : }
12190 : }
12191 0 : else if ( PyMapping_Check( obj3 ) ) {
12192 0 : int bErr = FALSE;
12193 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
12194 0 : if ( bErr )
12195 : {
12196 0 : SWIG_fail;
12197 : }
12198 : }
12199 : else {
12200 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12201 0 : SWIG_fail;
12202 : }
12203 : }
12204 : }
12205 5 : if (obj4) {
12206 1 : {
12207 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
12208 : /* callback_func typemap */
12209 :
12210 : /* In some cases 0 is passed instead of None. */
12211 : /* See https://github.com/OSGeo/gdal/pull/219 */
12212 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
12213 : {
12214 0 : if( PyLong_AsLong(obj4) == 0 )
12215 : {
12216 0 : obj4 = Py_None;
12217 : }
12218 : }
12219 :
12220 1 : if (obj4 && obj4 != Py_None ) {
12221 1 : void* cbfunction = NULL;
12222 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
12223 : (void**)&cbfunction,
12224 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
12225 : SWIG_POINTER_EXCEPTION | 0 ));
12226 :
12227 1 : if ( cbfunction == GDALTermProgress ) {
12228 : arg5 = GDALTermProgress;
12229 : } else {
12230 1 : if (!PyCallable_Check(obj4)) {
12231 0 : PyErr_SetString( PyExc_RuntimeError,
12232 : "Object given is not a Python function" );
12233 0 : SWIG_fail;
12234 : }
12235 1 : psProgressInfo->psPyCallback = obj4;
12236 1 : arg5 = PyProgressProxy;
12237 : }
12238 :
12239 : }
12240 :
12241 : }
12242 : }
12243 5 : if (obj5) {
12244 0 : {
12245 : /* %typemap(in) ( void* callback_data=NULL) */
12246 0 : psProgressInfo->psPyCallbackData = obj5 ;
12247 : }
12248 : }
12249 5 : {
12250 5 : const int bLocalUseExceptions = GetUseExceptions();
12251 5 : if ( bLocalUseExceptions ) {
12252 5 : pushErrorHandler();
12253 : }
12254 5 : {
12255 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12256 5 : result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,arg5,arg6);
12257 5 : SWIG_PYTHON_THREAD_END_ALLOW;
12258 : }
12259 5 : if ( bLocalUseExceptions ) {
12260 5 : popErrorHandler();
12261 : }
12262 : #ifndef SED_HACKS
12263 : if ( bLocalUseExceptions ) {
12264 : CPLErr eclass = CPLGetLastErrorType();
12265 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12266 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12267 : }
12268 : }
12269 : #endif
12270 : }
12271 5 : {
12272 : /* %typemap(out) OGRErr */
12273 5 : if ( result != 0 && GetUseExceptions()) {
12274 0 : const char* pszMessage = CPLGetLastErrorMsg();
12275 0 : if( pszMessage[0] != '\0' )
12276 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12277 : else
12278 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12279 0 : SWIG_fail;
12280 : }
12281 : }
12282 5 : {
12283 : /* %typemap(freearg) char **dict */
12284 5 : CSLDestroy( arg4 );
12285 : }
12286 5 : {
12287 : /* %typemap(freearg) ( void* callback_data=NULL) */
12288 :
12289 5 : CPLFree(psProgressInfo);
12290 :
12291 : }
12292 5 : {
12293 : /* %typemap(ret) OGRErr */
12294 5 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12295 5 : resultobj = PyInt_FromLong( result );
12296 : }
12297 : }
12298 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12299 : return resultobj;
12300 0 : fail:
12301 0 : {
12302 : /* %typemap(freearg) char **dict */
12303 0 : CSLDestroy( arg4 );
12304 : }
12305 0 : {
12306 : /* %typemap(freearg) ( void* callback_data=NULL) */
12307 :
12308 0 : CPLFree(psProgressInfo);
12309 :
12310 : }
12311 : return NULL;
12312 : }
12313 :
12314 :
12315 3 : SWIGINTERN PyObject *_wrap_Layer_Clip(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12316 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12317 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12318 3 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
12319 3 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
12320 3 : char **arg4 = (char **) NULL ;
12321 3 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
12322 3 : void *arg6 = (void *) NULL ;
12323 3 : void *argp1 = 0 ;
12324 3 : int res1 = 0 ;
12325 3 : void *argp2 = 0 ;
12326 3 : int res2 = 0 ;
12327 3 : void *argp3 = 0 ;
12328 3 : int res3 = 0 ;
12329 3 : PyObject * obj0 = 0 ;
12330 3 : PyObject * obj1 = 0 ;
12331 3 : PyObject * obj2 = 0 ;
12332 3 : PyObject * obj3 = 0 ;
12333 3 : PyObject * obj4 = 0 ;
12334 3 : PyObject * obj5 = 0 ;
12335 3 : char * kwnames[] = {
12336 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
12337 : };
12338 3 : OGRErr result;
12339 :
12340 : /* %typemap(arginit) ( const char* callback_data=NULL) */
12341 3 : PyProgressData *psProgressInfo;
12342 3 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
12343 3 : psProgressInfo->nLastReported = -1;
12344 3 : psProgressInfo->psPyCallback = NULL;
12345 3 : psProgressInfo->psPyCallbackData = NULL;
12346 3 : arg6 = psProgressInfo;
12347 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Clip", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12348 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12349 3 : if (!SWIG_IsOK(res1)) {
12350 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Clip" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12351 : }
12352 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12353 3 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12354 3 : if (!SWIG_IsOK(res2)) {
12355 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Clip" "', argument " "2"" of type '" "OGRLayerShadow *""'");
12356 : }
12357 3 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
12358 3 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12359 3 : if (!SWIG_IsOK(res3)) {
12360 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Clip" "', argument " "3"" of type '" "OGRLayerShadow *""'");
12361 : }
12362 3 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
12363 3 : if (obj3) {
12364 2 : {
12365 : /* %typemap(in) char **dict */
12366 2 : arg4 = NULL;
12367 2 : if ( PySequence_Check( obj3 ) ) {
12368 2 : int bErr = FALSE;
12369 2 : arg4 = CSLFromPySequence(obj3, &bErr);
12370 2 : if ( bErr )
12371 : {
12372 0 : SWIG_fail;
12373 : }
12374 : }
12375 0 : else if ( PyMapping_Check( obj3 ) ) {
12376 0 : int bErr = FALSE;
12377 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
12378 0 : if ( bErr )
12379 : {
12380 0 : SWIG_fail;
12381 : }
12382 : }
12383 : else {
12384 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12385 0 : SWIG_fail;
12386 : }
12387 : }
12388 : }
12389 3 : if (obj4) {
12390 1 : {
12391 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
12392 : /* callback_func typemap */
12393 :
12394 : /* In some cases 0 is passed instead of None. */
12395 : /* See https://github.com/OSGeo/gdal/pull/219 */
12396 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
12397 : {
12398 0 : if( PyLong_AsLong(obj4) == 0 )
12399 : {
12400 0 : obj4 = Py_None;
12401 : }
12402 : }
12403 :
12404 1 : if (obj4 && obj4 != Py_None ) {
12405 1 : void* cbfunction = NULL;
12406 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
12407 : (void**)&cbfunction,
12408 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
12409 : SWIG_POINTER_EXCEPTION | 0 ));
12410 :
12411 1 : if ( cbfunction == GDALTermProgress ) {
12412 : arg5 = GDALTermProgress;
12413 : } else {
12414 1 : if (!PyCallable_Check(obj4)) {
12415 0 : PyErr_SetString( PyExc_RuntimeError,
12416 : "Object given is not a Python function" );
12417 0 : SWIG_fail;
12418 : }
12419 1 : psProgressInfo->psPyCallback = obj4;
12420 1 : arg5 = PyProgressProxy;
12421 : }
12422 :
12423 : }
12424 :
12425 : }
12426 : }
12427 3 : if (obj5) {
12428 0 : {
12429 : /* %typemap(in) ( void* callback_data=NULL) */
12430 0 : psProgressInfo->psPyCallbackData = obj5 ;
12431 : }
12432 : }
12433 3 : {
12434 3 : const int bLocalUseExceptions = GetUseExceptions();
12435 3 : if ( bLocalUseExceptions ) {
12436 3 : pushErrorHandler();
12437 : }
12438 3 : {
12439 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12440 3 : result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,arg5,arg6);
12441 3 : SWIG_PYTHON_THREAD_END_ALLOW;
12442 : }
12443 3 : if ( bLocalUseExceptions ) {
12444 3 : popErrorHandler();
12445 : }
12446 : #ifndef SED_HACKS
12447 : if ( bLocalUseExceptions ) {
12448 : CPLErr eclass = CPLGetLastErrorType();
12449 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12450 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12451 : }
12452 : }
12453 : #endif
12454 : }
12455 3 : {
12456 : /* %typemap(out) OGRErr */
12457 3 : if ( result != 0 && GetUseExceptions()) {
12458 0 : const char* pszMessage = CPLGetLastErrorMsg();
12459 0 : if( pszMessage[0] != '\0' )
12460 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12461 : else
12462 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12463 0 : SWIG_fail;
12464 : }
12465 : }
12466 3 : {
12467 : /* %typemap(freearg) char **dict */
12468 3 : CSLDestroy( arg4 );
12469 : }
12470 3 : {
12471 : /* %typemap(freearg) ( void* callback_data=NULL) */
12472 :
12473 3 : CPLFree(psProgressInfo);
12474 :
12475 : }
12476 3 : {
12477 : /* %typemap(ret) OGRErr */
12478 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12479 3 : resultobj = PyInt_FromLong( result );
12480 : }
12481 : }
12482 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12483 : return resultobj;
12484 0 : fail:
12485 0 : {
12486 : /* %typemap(freearg) char **dict */
12487 0 : CSLDestroy( arg4 );
12488 : }
12489 0 : {
12490 : /* %typemap(freearg) ( void* callback_data=NULL) */
12491 :
12492 0 : CPLFree(psProgressInfo);
12493 :
12494 : }
12495 : return NULL;
12496 : }
12497 :
12498 :
12499 6 : SWIGINTERN PyObject *_wrap_Layer_Erase(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12500 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12501 6 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12502 6 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
12503 6 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
12504 6 : char **arg4 = (char **) NULL ;
12505 6 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
12506 6 : void *arg6 = (void *) NULL ;
12507 6 : void *argp1 = 0 ;
12508 6 : int res1 = 0 ;
12509 6 : void *argp2 = 0 ;
12510 6 : int res2 = 0 ;
12511 6 : void *argp3 = 0 ;
12512 6 : int res3 = 0 ;
12513 6 : PyObject * obj0 = 0 ;
12514 6 : PyObject * obj1 = 0 ;
12515 6 : PyObject * obj2 = 0 ;
12516 6 : PyObject * obj3 = 0 ;
12517 6 : PyObject * obj4 = 0 ;
12518 6 : PyObject * obj5 = 0 ;
12519 6 : char * kwnames[] = {
12520 : (char *)"self", (char *)"method_layer", (char *)"result_layer", (char *)"options", (char *)"callback", (char *)"callback_data", NULL
12521 : };
12522 6 : OGRErr result;
12523 :
12524 : /* %typemap(arginit) ( const char* callback_data=NULL) */
12525 6 : PyProgressData *psProgressInfo;
12526 6 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
12527 6 : psProgressInfo->nLastReported = -1;
12528 6 : psProgressInfo->psPyCallback = NULL;
12529 6 : psProgressInfo->psPyCallbackData = NULL;
12530 6 : arg6 = psProgressInfo;
12531 6 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Erase", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12532 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12533 6 : if (!SWIG_IsOK(res1)) {
12534 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Erase" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12535 : }
12536 6 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12537 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12538 6 : if (!SWIG_IsOK(res2)) {
12539 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Erase" "', argument " "2"" of type '" "OGRLayerShadow *""'");
12540 : }
12541 6 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
12542 6 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12543 6 : if (!SWIG_IsOK(res3)) {
12544 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Erase" "', argument " "3"" of type '" "OGRLayerShadow *""'");
12545 : }
12546 6 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
12547 6 : if (obj3) {
12548 3 : {
12549 : /* %typemap(in) char **dict */
12550 3 : arg4 = NULL;
12551 3 : if ( PySequence_Check( obj3 ) ) {
12552 3 : int bErr = FALSE;
12553 3 : arg4 = CSLFromPySequence(obj3, &bErr);
12554 3 : if ( bErr )
12555 : {
12556 0 : SWIG_fail;
12557 : }
12558 : }
12559 0 : else if ( PyMapping_Check( obj3 ) ) {
12560 0 : int bErr = FALSE;
12561 0 : arg4 = CSLFromPyMapping(obj3, &bErr);
12562 0 : if ( bErr )
12563 : {
12564 0 : SWIG_fail;
12565 : }
12566 : }
12567 : else {
12568 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12569 0 : SWIG_fail;
12570 : }
12571 : }
12572 : }
12573 6 : if (obj4) {
12574 1 : {
12575 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
12576 : /* callback_func typemap */
12577 :
12578 : /* In some cases 0 is passed instead of None. */
12579 : /* See https://github.com/OSGeo/gdal/pull/219 */
12580 1 : if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
12581 : {
12582 0 : if( PyLong_AsLong(obj4) == 0 )
12583 : {
12584 0 : obj4 = Py_None;
12585 : }
12586 : }
12587 :
12588 1 : if (obj4 && obj4 != Py_None ) {
12589 1 : void* cbfunction = NULL;
12590 1 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
12591 : (void**)&cbfunction,
12592 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
12593 : SWIG_POINTER_EXCEPTION | 0 ));
12594 :
12595 1 : if ( cbfunction == GDALTermProgress ) {
12596 : arg5 = GDALTermProgress;
12597 : } else {
12598 1 : if (!PyCallable_Check(obj4)) {
12599 0 : PyErr_SetString( PyExc_RuntimeError,
12600 : "Object given is not a Python function" );
12601 0 : SWIG_fail;
12602 : }
12603 1 : psProgressInfo->psPyCallback = obj4;
12604 1 : arg5 = PyProgressProxy;
12605 : }
12606 :
12607 : }
12608 :
12609 : }
12610 : }
12611 6 : if (obj5) {
12612 0 : {
12613 : /* %typemap(in) ( void* callback_data=NULL) */
12614 0 : psProgressInfo->psPyCallbackData = obj5 ;
12615 : }
12616 : }
12617 6 : {
12618 6 : const int bLocalUseExceptions = GetUseExceptions();
12619 6 : if ( bLocalUseExceptions ) {
12620 6 : pushErrorHandler();
12621 : }
12622 6 : {
12623 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12624 6 : result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,arg5,arg6);
12625 6 : SWIG_PYTHON_THREAD_END_ALLOW;
12626 : }
12627 6 : if ( bLocalUseExceptions ) {
12628 6 : popErrorHandler();
12629 : }
12630 : #ifndef SED_HACKS
12631 : if ( bLocalUseExceptions ) {
12632 : CPLErr eclass = CPLGetLastErrorType();
12633 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12634 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12635 : }
12636 : }
12637 : #endif
12638 : }
12639 6 : {
12640 : /* %typemap(out) OGRErr */
12641 6 : if ( result != 0 && GetUseExceptions()) {
12642 0 : const char* pszMessage = CPLGetLastErrorMsg();
12643 0 : if( pszMessage[0] != '\0' )
12644 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12645 : else
12646 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12647 0 : SWIG_fail;
12648 : }
12649 : }
12650 6 : {
12651 : /* %typemap(freearg) char **dict */
12652 6 : CSLDestroy( arg4 );
12653 : }
12654 6 : {
12655 : /* %typemap(freearg) ( void* callback_data=NULL) */
12656 :
12657 6 : CPLFree(psProgressInfo);
12658 :
12659 : }
12660 6 : {
12661 : /* %typemap(ret) OGRErr */
12662 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12663 6 : resultobj = PyInt_FromLong( result );
12664 : }
12665 : }
12666 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12667 : return resultobj;
12668 0 : fail:
12669 0 : {
12670 : /* %typemap(freearg) char **dict */
12671 0 : CSLDestroy( arg4 );
12672 : }
12673 0 : {
12674 : /* %typemap(freearg) ( void* callback_data=NULL) */
12675 :
12676 0 : CPLFree(psProgressInfo);
12677 :
12678 : }
12679 : return NULL;
12680 : }
12681 :
12682 :
12683 3 : SWIGINTERN PyObject *_wrap_Layer_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12684 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12685 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12686 3 : void *argp1 = 0 ;
12687 3 : int res1 = 0 ;
12688 3 : PyObject *swig_obj[1] ;
12689 3 : OGRStyleTableShadow *result = 0 ;
12690 :
12691 3 : if (!args) SWIG_fail;
12692 3 : swig_obj[0] = args;
12693 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12694 3 : if (!SWIG_IsOK(res1)) {
12695 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetStyleTable" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12696 : }
12697 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12698 3 : {
12699 3 : const int bLocalUseExceptions = GetUseExceptions();
12700 3 : if ( bLocalUseExceptions ) {
12701 3 : pushErrorHandler();
12702 : }
12703 3 : {
12704 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12705 3 : result = (OGRStyleTableShadow *)OGRLayerShadow_GetStyleTable(arg1);
12706 3 : SWIG_PYTHON_THREAD_END_ALLOW;
12707 : }
12708 3 : if ( bLocalUseExceptions ) {
12709 3 : popErrorHandler();
12710 : }
12711 : #ifndef SED_HACKS
12712 : if ( bLocalUseExceptions ) {
12713 : CPLErr eclass = CPLGetLastErrorType();
12714 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12715 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12716 : }
12717 : }
12718 : #endif
12719 : }
12720 3 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
12721 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12722 : return resultobj;
12723 : fail:
12724 : return NULL;
12725 : }
12726 :
12727 :
12728 2 : SWIGINTERN PyObject *_wrap_Layer_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12729 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12730 2 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12731 2 : OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
12732 2 : void *argp1 = 0 ;
12733 2 : int res1 = 0 ;
12734 2 : void *argp2 = 0 ;
12735 2 : int res2 = 0 ;
12736 2 : PyObject *swig_obj[2] ;
12737 :
12738 2 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
12739 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12740 2 : if (!SWIG_IsOK(res1)) {
12741 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetStyleTable" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12742 : }
12743 2 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12744 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 | 0 );
12745 2 : if (!SWIG_IsOK(res2)) {
12746 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'");
12747 : }
12748 2 : arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
12749 2 : {
12750 2 : const int bLocalUseExceptions = GetUseExceptions();
12751 2 : if ( bLocalUseExceptions ) {
12752 2 : pushErrorHandler();
12753 : }
12754 2 : {
12755 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12756 2 : OGRLayerShadow_SetStyleTable(arg1,arg2);
12757 2 : SWIG_PYTHON_THREAD_END_ALLOW;
12758 : }
12759 2 : if ( bLocalUseExceptions ) {
12760 2 : popErrorHandler();
12761 : }
12762 : #ifndef SED_HACKS
12763 : if ( bLocalUseExceptions ) {
12764 : CPLErr eclass = CPLGetLastErrorType();
12765 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12766 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12767 : }
12768 : }
12769 : #endif
12770 : }
12771 2 : resultobj = SWIG_Py_Void();
12772 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12773 : return resultobj;
12774 : fail:
12775 : return NULL;
12776 : }
12777 :
12778 :
12779 8 : SWIGINTERN PyObject *_wrap_Layer_ExportArrowArrayStreamPyCapsule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12780 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12781 8 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12782 8 : char **arg2 = (char **) NULL ;
12783 8 : void *argp1 = 0 ;
12784 8 : int res1 = 0 ;
12785 8 : PyObject *swig_obj[2] ;
12786 8 : PyObject *result = 0 ;
12787 :
12788 8 : if (!SWIG_Python_UnpackTuple(args, "Layer_ExportArrowArrayStreamPyCapsule", 1, 2, swig_obj)) SWIG_fail;
12789 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12790 8 : if (!SWIG_IsOK(res1)) {
12791 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ExportArrowArrayStreamPyCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12792 : }
12793 8 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12794 8 : if (swig_obj[1]) {
12795 1 : {
12796 : /* %typemap(in) char **dict */
12797 1 : arg2 = NULL;
12798 1 : if ( PySequence_Check( swig_obj[1] ) ) {
12799 0 : int bErr = FALSE;
12800 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
12801 0 : if ( bErr )
12802 : {
12803 0 : SWIG_fail;
12804 : }
12805 : }
12806 1 : else if ( PyMapping_Check( swig_obj[1] ) ) {
12807 1 : int bErr = FALSE;
12808 1 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
12809 1 : if ( bErr )
12810 : {
12811 0 : SWIG_fail;
12812 : }
12813 : }
12814 : else {
12815 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12816 0 : SWIG_fail;
12817 : }
12818 : }
12819 : }
12820 8 : {
12821 8 : const int bLocalUseExceptions = GetUseExceptions();
12822 8 : if ( bLocalUseExceptions ) {
12823 8 : pushErrorHandler();
12824 : }
12825 8 : {
12826 8 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12827 8 : result = (PyObject *)OGRLayerShadow_ExportArrowArrayStreamPyCapsule(arg1,arg2);
12828 8 : SWIG_PYTHON_THREAD_END_ALLOW;
12829 : }
12830 8 : if ( bLocalUseExceptions ) {
12831 8 : popErrorHandler();
12832 : }
12833 : #ifndef SED_HACKS
12834 : if ( bLocalUseExceptions ) {
12835 : CPLErr eclass = CPLGetLastErrorType();
12836 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12837 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12838 : }
12839 : }
12840 : #endif
12841 : }
12842 8 : resultobj = result;
12843 8 : {
12844 : /* %typemap(freearg) char **dict */
12845 8 : CSLDestroy( arg2 );
12846 : }
12847 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12848 : return resultobj;
12849 0 : fail:
12850 0 : {
12851 : /* %typemap(freearg) char **dict */
12852 0 : CSLDestroy( arg2 );
12853 : }
12854 : return NULL;
12855 : }
12856 :
12857 :
12858 342 : SWIGINTERN PyObject *_wrap_Layer_GetArrowStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12859 342 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12860 342 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12861 342 : char **arg2 = (char **) NULL ;
12862 342 : void *argp1 = 0 ;
12863 342 : int res1 = 0 ;
12864 342 : PyObject *swig_obj[2] ;
12865 342 : ArrowArrayStream *result = 0 ;
12866 :
12867 342 : if (!SWIG_Python_UnpackTuple(args, "Layer_GetArrowStream", 1, 2, swig_obj)) SWIG_fail;
12868 342 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12869 342 : if (!SWIG_IsOK(res1)) {
12870 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetArrowStream" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12871 : }
12872 342 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12873 342 : if (swig_obj[1]) {
12874 317 : {
12875 : /* %typemap(in) char **dict */
12876 317 : arg2 = NULL;
12877 317 : if ( PySequence_Check( swig_obj[1] ) ) {
12878 317 : int bErr = FALSE;
12879 317 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
12880 317 : if ( bErr )
12881 : {
12882 0 : SWIG_fail;
12883 : }
12884 : }
12885 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
12886 0 : int bErr = FALSE;
12887 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
12888 0 : if ( bErr )
12889 : {
12890 0 : SWIG_fail;
12891 : }
12892 : }
12893 : else {
12894 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12895 0 : SWIG_fail;
12896 : }
12897 : }
12898 : }
12899 342 : {
12900 342 : const int bLocalUseExceptions = GetUseExceptions();
12901 342 : if ( bLocalUseExceptions ) {
12902 202 : pushErrorHandler();
12903 : }
12904 342 : {
12905 342 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
12906 342 : result = (ArrowArrayStream *)OGRLayerShadow_GetArrowStream(arg1,arg2);
12907 342 : SWIG_PYTHON_THREAD_END_ALLOW;
12908 : }
12909 342 : if ( bLocalUseExceptions ) {
12910 202 : popErrorHandler();
12911 : }
12912 : #ifndef SED_HACKS
12913 : if ( bLocalUseExceptions ) {
12914 : CPLErr eclass = CPLGetLastErrorType();
12915 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12916 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12917 : }
12918 : }
12919 : #endif
12920 : }
12921 342 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArrayStream, SWIG_POINTER_OWN | 0 );
12922 342 : {
12923 : /* %typemap(freearg) char **dict */
12924 342 : CSLDestroy( arg2 );
12925 : }
12926 342 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
12927 : return resultobj;
12928 0 : fail:
12929 0 : {
12930 : /* %typemap(freearg) char **dict */
12931 0 : CSLDestroy( arg2 );
12932 : }
12933 : return NULL;
12934 : }
12935 :
12936 :
12937 18 : SWIGINTERN PyObject *_wrap_Layer_IsArrowSchemaSupported(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12938 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12939 18 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
12940 18 : ArrowSchema *arg2 = (ArrowSchema *) 0 ;
12941 18 : bool *arg3 = (bool *) 0 ;
12942 18 : char **arg4 = (char **) 0 ;
12943 18 : char **arg5 = (char **) NULL ;
12944 18 : void *argp1 = 0 ;
12945 18 : int res1 = 0 ;
12946 18 : void *argp2 = 0 ;
12947 18 : int res2 = 0 ;
12948 18 : bool ret3 ;
12949 18 : char *errorMsg3 ;
12950 18 : PyObject *swig_obj[3] ;
12951 :
12952 18 : {
12953 : /* %typemap(in,numinputs=0) (bool* pbRet, char **errorMsg3) */
12954 18 : arg3 = &ret3;
12955 18 : arg4 = &errorMsg3;
12956 : }
12957 18 : if (!SWIG_Python_UnpackTuple(args, "Layer_IsArrowSchemaSupported", 2, 3, swig_obj)) SWIG_fail;
12958 18 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
12959 18 : if (!SWIG_IsOK(res1)) {
12960 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_IsArrowSchemaSupported" "', argument " "1"" of type '" "OGRLayerShadow *""'");
12961 : }
12962 18 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
12963 18 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 | 0 );
12964 18 : if (!SWIG_IsOK(res2)) {
12965 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_IsArrowSchemaSupported" "', argument " "2"" of type '" "ArrowSchema const *""'");
12966 : }
12967 18 : arg2 = reinterpret_cast< ArrowSchema * >(argp2);
12968 18 : if (swig_obj[2]) {
12969 3 : {
12970 : /* %typemap(in) char **dict */
12971 3 : arg5 = NULL;
12972 3 : if ( PySequence_Check( swig_obj[2] ) ) {
12973 3 : int bErr = FALSE;
12974 3 : arg5 = CSLFromPySequence(swig_obj[2], &bErr);
12975 3 : if ( bErr )
12976 : {
12977 0 : SWIG_fail;
12978 : }
12979 : }
12980 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
12981 0 : int bErr = FALSE;
12982 0 : arg5 = CSLFromPyMapping(swig_obj[2], &bErr);
12983 0 : if ( bErr )
12984 : {
12985 0 : SWIG_fail;
12986 : }
12987 : }
12988 : else {
12989 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
12990 0 : SWIG_fail;
12991 : }
12992 : }
12993 : }
12994 18 : {
12995 18 : const int bLocalUseExceptions = GetUseExceptions();
12996 18 : if ( bLocalUseExceptions ) {
12997 18 : pushErrorHandler();
12998 : }
12999 18 : {
13000 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13001 18 : OGRLayerShadow_IsArrowSchemaSupported(arg1,(ArrowSchema const *)arg2,arg3,arg4,arg5);
13002 18 : SWIG_PYTHON_THREAD_END_ALLOW;
13003 : }
13004 18 : if ( bLocalUseExceptions ) {
13005 18 : popErrorHandler();
13006 : }
13007 : #ifndef SED_HACKS
13008 : if ( bLocalUseExceptions ) {
13009 : CPLErr eclass = CPLGetLastErrorType();
13010 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13011 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13012 : }
13013 : }
13014 : #endif
13015 : }
13016 18 : resultobj = SWIG_Py_Void();
13017 18 : {
13018 : /* %typemap(argout) (bool* pbRet, char **errorMsg)*/
13019 18 : Py_DECREF(resultobj);
13020 18 : resultobj = PyTuple_New(2);
13021 18 : PyTuple_SetItem(resultobj, 0, PyBool_FromLong(*arg3));
13022 18 : if( *arg4 )
13023 : {
13024 2 : PyTuple_SetItem(resultobj, 1, PyUnicode_FromString(*arg4));
13025 2 : VSIFree(*arg4);
13026 : }
13027 : else
13028 : {
13029 16 : PyTuple_SetItem(resultobj, 1, Py_None);
13030 16 : Py_INCREF(Py_None);
13031 : }
13032 : }
13033 18 : {
13034 : /* %typemap(freearg) char **dict */
13035 18 : CSLDestroy( arg5 );
13036 : }
13037 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13038 : return resultobj;
13039 0 : fail:
13040 0 : {
13041 : /* %typemap(freearg) char **dict */
13042 0 : CSLDestroy( arg5 );
13043 : }
13044 : return NULL;
13045 : }
13046 :
13047 :
13048 524 : SWIGINTERN PyObject *_wrap_Layer_CreateFieldFromArrowSchema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13049 524 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13050 524 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13051 524 : ArrowSchema *arg2 = (ArrowSchema *) 0 ;
13052 524 : char **arg3 = (char **) NULL ;
13053 524 : void *argp1 = 0 ;
13054 524 : int res1 = 0 ;
13055 524 : void *argp2 = 0 ;
13056 524 : int res2 = 0 ;
13057 524 : PyObject *swig_obj[3] ;
13058 524 : OGRErr result;
13059 :
13060 524 : if (!SWIG_Python_UnpackTuple(args, "Layer_CreateFieldFromArrowSchema", 2, 3, swig_obj)) SWIG_fail;
13061 524 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13062 524 : if (!SWIG_IsOK(res1)) {
13063 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFieldFromArrowSchema" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13064 : }
13065 524 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13066 524 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 | 0 );
13067 524 : if (!SWIG_IsOK(res2)) {
13068 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFieldFromArrowSchema" "', argument " "2"" of type '" "ArrowSchema const *""'");
13069 : }
13070 524 : arg2 = reinterpret_cast< ArrowSchema * >(argp2);
13071 524 : if (swig_obj[2]) {
13072 119 : {
13073 : /* %typemap(in) char **dict */
13074 119 : arg3 = NULL;
13075 119 : if ( PySequence_Check( swig_obj[2] ) ) {
13076 119 : int bErr = FALSE;
13077 119 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
13078 119 : if ( bErr )
13079 : {
13080 0 : SWIG_fail;
13081 : }
13082 : }
13083 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
13084 0 : int bErr = FALSE;
13085 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
13086 0 : if ( bErr )
13087 : {
13088 0 : SWIG_fail;
13089 : }
13090 : }
13091 : else {
13092 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13093 0 : SWIG_fail;
13094 : }
13095 : }
13096 : }
13097 524 : {
13098 524 : const int bLocalUseExceptions = GetUseExceptions();
13099 524 : if ( bLocalUseExceptions ) {
13100 524 : pushErrorHandler();
13101 : }
13102 524 : {
13103 524 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13104 524 : result = (OGRErr)OGRLayerShadow_CreateFieldFromArrowSchema(arg1,(ArrowSchema const *)arg2,arg3);
13105 524 : SWIG_PYTHON_THREAD_END_ALLOW;
13106 : }
13107 524 : if ( bLocalUseExceptions ) {
13108 524 : popErrorHandler();
13109 : }
13110 : #ifndef SED_HACKS
13111 : if ( bLocalUseExceptions ) {
13112 : CPLErr eclass = CPLGetLastErrorType();
13113 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13114 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13115 : }
13116 : }
13117 : #endif
13118 : }
13119 524 : {
13120 : /* %typemap(out) OGRErr */
13121 524 : if ( result != 0 && GetUseExceptions()) {
13122 0 : const char* pszMessage = CPLGetLastErrorMsg();
13123 0 : if( pszMessage[0] != '\0' )
13124 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13125 : else
13126 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13127 0 : SWIG_fail;
13128 : }
13129 : }
13130 524 : {
13131 : /* %typemap(freearg) char **dict */
13132 524 : CSLDestroy( arg3 );
13133 : }
13134 524 : {
13135 : /* %typemap(ret) OGRErr */
13136 524 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13137 524 : resultobj = PyInt_FromLong( result );
13138 : }
13139 : }
13140 524 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13141 : return resultobj;
13142 0 : fail:
13143 0 : {
13144 : /* %typemap(freearg) char **dict */
13145 0 : CSLDestroy( arg3 );
13146 : }
13147 : return NULL;
13148 : }
13149 :
13150 :
13151 47 : SWIGINTERN PyObject *_wrap_Layer_WriteArrowBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13152 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13153 47 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13154 47 : ArrowSchema *arg2 = (ArrowSchema *) 0 ;
13155 47 : ArrowArray *arg3 = (ArrowArray *) 0 ;
13156 47 : char **arg4 = (char **) NULL ;
13157 47 : void *argp1 = 0 ;
13158 47 : int res1 = 0 ;
13159 47 : void *argp2 = 0 ;
13160 47 : int res2 = 0 ;
13161 47 : void *argp3 = 0 ;
13162 47 : int res3 = 0 ;
13163 47 : PyObject *swig_obj[4] ;
13164 47 : OGRErr result;
13165 :
13166 47 : if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowBatch", 3, 4, swig_obj)) SWIG_fail;
13167 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13168 47 : if (!SWIG_IsOK(res1)) {
13169 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowBatch" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13170 : }
13171 47 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13172 47 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 | 0 );
13173 47 : if (!SWIG_IsOK(res2)) {
13174 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_WriteArrowBatch" "', argument " "2"" of type '" "ArrowSchema const *""'");
13175 : }
13176 47 : arg2 = reinterpret_cast< ArrowSchema * >(argp2);
13177 47 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_ArrowArray, 0 | 0 );
13178 47 : if (!SWIG_IsOK(res3)) {
13179 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_WriteArrowBatch" "', argument " "3"" of type '" "ArrowArray *""'");
13180 : }
13181 47 : arg3 = reinterpret_cast< ArrowArray * >(argp3);
13182 47 : if (swig_obj[3]) {
13183 23 : {
13184 : /* %typemap(in) char **dict */
13185 23 : arg4 = NULL;
13186 23 : if ( PySequence_Check( swig_obj[3] ) ) {
13187 11 : int bErr = FALSE;
13188 11 : arg4 = CSLFromPySequence(swig_obj[3], &bErr);
13189 11 : if ( bErr )
13190 : {
13191 0 : SWIG_fail;
13192 : }
13193 : }
13194 12 : else if ( PyMapping_Check( swig_obj[3] ) ) {
13195 12 : int bErr = FALSE;
13196 12 : arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
13197 12 : if ( bErr )
13198 : {
13199 0 : SWIG_fail;
13200 : }
13201 : }
13202 : else {
13203 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13204 0 : SWIG_fail;
13205 : }
13206 : }
13207 : }
13208 47 : {
13209 47 : const int bLocalUseExceptions = GetUseExceptions();
13210 47 : if ( bLocalUseExceptions ) {
13211 47 : pushErrorHandler();
13212 : }
13213 47 : {
13214 47 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13215 47 : result = (OGRErr)OGRLayerShadow_WriteArrowBatch(arg1,(ArrowSchema const *)arg2,arg3,arg4);
13216 47 : SWIG_PYTHON_THREAD_END_ALLOW;
13217 : }
13218 47 : if ( bLocalUseExceptions ) {
13219 47 : popErrorHandler();
13220 : }
13221 : #ifndef SED_HACKS
13222 : if ( bLocalUseExceptions ) {
13223 : CPLErr eclass = CPLGetLastErrorType();
13224 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13225 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13226 : }
13227 : }
13228 : #endif
13229 : }
13230 47 : {
13231 : /* %typemap(out) OGRErr */
13232 58 : if ( result != 0 && GetUseExceptions()) {
13233 11 : const char* pszMessage = CPLGetLastErrorMsg();
13234 11 : if( pszMessage[0] != '\0' )
13235 11 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13236 : else
13237 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13238 11 : SWIG_fail;
13239 : }
13240 : }
13241 36 : {
13242 : /* %typemap(freearg) char **dict */
13243 36 : CSLDestroy( arg4 );
13244 : }
13245 36 : {
13246 : /* %typemap(ret) OGRErr */
13247 36 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13248 36 : resultobj = PyInt_FromLong( result );
13249 : }
13250 : }
13251 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13252 : return resultobj;
13253 11 : fail:
13254 11 : {
13255 : /* %typemap(freearg) char **dict */
13256 11 : CSLDestroy( arg4 );
13257 : }
13258 : return NULL;
13259 : }
13260 :
13261 :
13262 4 : SWIGINTERN PyObject *_wrap_Layer_WriteArrowStreamCapsule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13263 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13264 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13265 4 : PyObject *arg2 = (PyObject *) 0 ;
13266 4 : int arg3 ;
13267 4 : char **arg4 = (char **) NULL ;
13268 4 : void *argp1 = 0 ;
13269 4 : int res1 = 0 ;
13270 4 : int val3 ;
13271 4 : int ecode3 = 0 ;
13272 4 : PyObject *swig_obj[4] ;
13273 4 : OGRErr result;
13274 :
13275 4 : if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowStreamCapsule", 3, 4, swig_obj)) SWIG_fail;
13276 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13277 4 : if (!SWIG_IsOK(res1)) {
13278 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowStreamCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13279 : }
13280 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13281 4 : arg2 = swig_obj[1];
13282 4 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
13283 4 : if (!SWIG_IsOK(ecode3)) {
13284 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_WriteArrowStreamCapsule" "', argument " "3"" of type '" "int""'");
13285 : }
13286 4 : arg3 = static_cast< int >(val3);
13287 4 : if (swig_obj[3]) {
13288 4 : {
13289 : /* %typemap(in) char **dict */
13290 4 : arg4 = NULL;
13291 4 : if ( PySequence_Check( swig_obj[3] ) ) {
13292 4 : int bErr = FALSE;
13293 4 : arg4 = CSLFromPySequence(swig_obj[3], &bErr);
13294 4 : if ( bErr )
13295 : {
13296 0 : SWIG_fail;
13297 : }
13298 : }
13299 0 : else if ( PyMapping_Check( swig_obj[3] ) ) {
13300 0 : int bErr = FALSE;
13301 0 : arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
13302 0 : if ( bErr )
13303 : {
13304 0 : SWIG_fail;
13305 : }
13306 : }
13307 : else {
13308 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13309 0 : SWIG_fail;
13310 : }
13311 : }
13312 : }
13313 4 : {
13314 4 : const int bLocalUseExceptions = GetUseExceptions();
13315 4 : if ( bLocalUseExceptions ) {
13316 4 : pushErrorHandler();
13317 : }
13318 4 : {
13319 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13320 4 : result = (OGRErr)OGRLayerShadow_WriteArrowStreamCapsule(arg1,arg2,arg3,arg4);
13321 4 : SWIG_PYTHON_THREAD_END_ALLOW;
13322 : }
13323 4 : if ( bLocalUseExceptions ) {
13324 4 : popErrorHandler();
13325 : }
13326 : #ifndef SED_HACKS
13327 : if ( bLocalUseExceptions ) {
13328 : CPLErr eclass = CPLGetLastErrorType();
13329 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13330 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13331 : }
13332 : }
13333 : #endif
13334 : }
13335 4 : {
13336 : /* %typemap(out) OGRErr */
13337 4 : if ( result != 0 && GetUseExceptions()) {
13338 0 : const char* pszMessage = CPLGetLastErrorMsg();
13339 0 : if( pszMessage[0] != '\0' )
13340 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13341 : else
13342 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13343 0 : SWIG_fail;
13344 : }
13345 : }
13346 4 : {
13347 : /* %typemap(freearg) char **dict */
13348 4 : CSLDestroy( arg4 );
13349 : }
13350 4 : {
13351 : /* %typemap(ret) OGRErr */
13352 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13353 4 : resultobj = PyInt_FromLong( result );
13354 : }
13355 : }
13356 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13357 : return resultobj;
13358 0 : fail:
13359 0 : {
13360 : /* %typemap(freearg) char **dict */
13361 0 : CSLDestroy( arg4 );
13362 : }
13363 : return NULL;
13364 : }
13365 :
13366 :
13367 0 : SWIGINTERN PyObject *_wrap_Layer_WriteArrowSchemaAndArrowArrayCapsule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13368 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13369 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13370 0 : PyObject *arg2 = (PyObject *) 0 ;
13371 0 : PyObject *arg3 = (PyObject *) 0 ;
13372 0 : int arg4 ;
13373 0 : char **arg5 = (char **) NULL ;
13374 0 : void *argp1 = 0 ;
13375 0 : int res1 = 0 ;
13376 0 : int val4 ;
13377 0 : int ecode4 = 0 ;
13378 0 : PyObject *swig_obj[5] ;
13379 0 : OGRErr result;
13380 :
13381 0 : if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowSchemaAndArrowArrayCapsule", 4, 5, swig_obj)) SWIG_fail;
13382 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13383 0 : if (!SWIG_IsOK(res1)) {
13384 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowSchemaAndArrowArrayCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13385 : }
13386 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13387 0 : arg2 = swig_obj[1];
13388 0 : arg3 = swig_obj[2];
13389 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
13390 0 : if (!SWIG_IsOK(ecode4)) {
13391 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_WriteArrowSchemaAndArrowArrayCapsule" "', argument " "4"" of type '" "int""'");
13392 : }
13393 0 : arg4 = static_cast< int >(val4);
13394 0 : if (swig_obj[4]) {
13395 0 : {
13396 : /* %typemap(in) char **dict */
13397 0 : arg5 = NULL;
13398 0 : if ( PySequence_Check( swig_obj[4] ) ) {
13399 0 : int bErr = FALSE;
13400 0 : arg5 = CSLFromPySequence(swig_obj[4], &bErr);
13401 0 : if ( bErr )
13402 : {
13403 0 : SWIG_fail;
13404 : }
13405 : }
13406 0 : else if ( PyMapping_Check( swig_obj[4] ) ) {
13407 0 : int bErr = FALSE;
13408 0 : arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
13409 0 : if ( bErr )
13410 : {
13411 0 : SWIG_fail;
13412 : }
13413 : }
13414 : else {
13415 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13416 0 : SWIG_fail;
13417 : }
13418 : }
13419 : }
13420 0 : {
13421 0 : const int bLocalUseExceptions = GetUseExceptions();
13422 0 : if ( bLocalUseExceptions ) {
13423 0 : pushErrorHandler();
13424 : }
13425 0 : {
13426 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13427 0 : result = (OGRErr)OGRLayerShadow_WriteArrowSchemaAndArrowArrayCapsule(arg1,arg2,arg3,arg4,arg5);
13428 0 : SWIG_PYTHON_THREAD_END_ALLOW;
13429 : }
13430 0 : if ( bLocalUseExceptions ) {
13431 0 : popErrorHandler();
13432 : }
13433 : #ifndef SED_HACKS
13434 : if ( bLocalUseExceptions ) {
13435 : CPLErr eclass = CPLGetLastErrorType();
13436 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13437 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13438 : }
13439 : }
13440 : #endif
13441 : }
13442 0 : {
13443 : /* %typemap(out) OGRErr */
13444 0 : if ( result != 0 && GetUseExceptions()) {
13445 0 : const char* pszMessage = CPLGetLastErrorMsg();
13446 0 : if( pszMessage[0] != '\0' )
13447 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13448 : else
13449 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13450 0 : SWIG_fail;
13451 : }
13452 : }
13453 0 : {
13454 : /* %typemap(freearg) char **dict */
13455 0 : CSLDestroy( arg5 );
13456 : }
13457 0 : {
13458 : /* %typemap(ret) OGRErr */
13459 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13460 0 : resultobj = PyInt_FromLong( result );
13461 : }
13462 : }
13463 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13464 : return resultobj;
13465 0 : fail:
13466 0 : {
13467 : /* %typemap(freearg) char **dict */
13468 0 : CSLDestroy( arg5 );
13469 : }
13470 : return NULL;
13471 : }
13472 :
13473 :
13474 54 : SWIGINTERN PyObject *_wrap_Layer_GetGeometryTypes(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13475 54 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13476 54 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13477 54 : OGRGeometryTypeCounter **arg2 = (OGRGeometryTypeCounter **) 0 ;
13478 54 : int *arg3 = (int *) 0 ;
13479 54 : int arg4 = (int) 0 ;
13480 54 : int arg5 = (int) 0 ;
13481 54 : GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
13482 54 : void *arg7 = (void *) NULL ;
13483 54 : void *argp1 = 0 ;
13484 54 : int res1 = 0 ;
13485 54 : OGRGeometryTypeCounter *pRet2 = NULL ;
13486 54 : int nEntryCount2 = 0 ;
13487 54 : int val4 ;
13488 54 : int ecode4 = 0 ;
13489 54 : int val5 ;
13490 54 : int ecode5 = 0 ;
13491 54 : PyObject * obj0 = 0 ;
13492 54 : PyObject * obj1 = 0 ;
13493 54 : PyObject * obj2 = 0 ;
13494 54 : PyObject * obj3 = 0 ;
13495 54 : PyObject * obj4 = 0 ;
13496 54 : char * kwnames[] = {
13497 : (char *)"self", (char *)"geom_field", (char *)"flags", (char *)"callback", (char *)"callback_data", NULL
13498 : };
13499 :
13500 : /* %typemap(arginit) ( const char* callback_data=NULL) */
13501 54 : PyProgressData *psProgressInfo;
13502 54 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
13503 54 : psProgressInfo->nLastReported = -1;
13504 54 : psProgressInfo->psPyCallback = NULL;
13505 54 : psProgressInfo->psPyCallbackData = NULL;
13506 54 : arg7 = psProgressInfo;
13507 54 : {
13508 : /* %typemap(in,numinputs=0) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
13509 54 : arg2 = &pRet2;
13510 54 : arg3 = &nEntryCount2;
13511 : }
13512 54 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Layer_GetGeometryTypes", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
13513 54 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13514 54 : if (!SWIG_IsOK(res1)) {
13515 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeometryTypes" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13516 : }
13517 54 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13518 54 : if (obj1) {
13519 6 : ecode4 = SWIG_AsVal_int(obj1, &val4);
13520 6 : if (!SWIG_IsOK(ecode4)) {
13521 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetGeometryTypes" "', argument " "4"" of type '" "int""'");
13522 : }
13523 : arg4 = static_cast< int >(val4);
13524 : }
13525 54 : if (obj2) {
13526 19 : ecode5 = SWIG_AsVal_int(obj2, &val5);
13527 19 : if (!SWIG_IsOK(ecode5)) {
13528 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetGeometryTypes" "', argument " "5"" of type '" "int""'");
13529 : }
13530 : arg5 = static_cast< int >(val5);
13531 : }
13532 54 : if (obj3) {
13533 6 : {
13534 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
13535 : /* callback_func typemap */
13536 :
13537 : /* In some cases 0 is passed instead of None. */
13538 : /* See https://github.com/OSGeo/gdal/pull/219 */
13539 6 : if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
13540 : {
13541 0 : if( PyLong_AsLong(obj3) == 0 )
13542 : {
13543 0 : obj3 = Py_None;
13544 : }
13545 : }
13546 :
13547 6 : if (obj3 && obj3 != Py_None ) {
13548 6 : void* cbfunction = NULL;
13549 6 : CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
13550 : (void**)&cbfunction,
13551 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
13552 : SWIG_POINTER_EXCEPTION | 0 ));
13553 :
13554 6 : if ( cbfunction == GDALTermProgress ) {
13555 : arg6 = GDALTermProgress;
13556 : } else {
13557 6 : if (!PyCallable_Check(obj3)) {
13558 0 : PyErr_SetString( PyExc_RuntimeError,
13559 : "Object given is not a Python function" );
13560 0 : SWIG_fail;
13561 : }
13562 6 : psProgressInfo->psPyCallback = obj3;
13563 6 : arg6 = PyProgressProxy;
13564 : }
13565 :
13566 : }
13567 :
13568 : }
13569 : }
13570 54 : if (obj4) {
13571 0 : {
13572 : /* %typemap(in) ( void* callback_data=NULL) */
13573 0 : psProgressInfo->psPyCallbackData = obj4 ;
13574 : }
13575 : }
13576 54 : {
13577 54 : const int bLocalUseExceptions = GetUseExceptions();
13578 54 : if ( bLocalUseExceptions ) {
13579 12 : pushErrorHandler();
13580 : }
13581 54 : {
13582 54 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13583 54 : OGRLayerShadow_GetGeometryTypes(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
13584 54 : SWIG_PYTHON_THREAD_END_ALLOW;
13585 : }
13586 54 : if ( bLocalUseExceptions ) {
13587 12 : popErrorHandler();
13588 : }
13589 : #ifndef SED_HACKS
13590 : if ( bLocalUseExceptions ) {
13591 : CPLErr eclass = CPLGetLastErrorType();
13592 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13593 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13594 : }
13595 : }
13596 : #endif
13597 : }
13598 54 : resultobj = SWIG_Py_Void();
13599 54 : {
13600 : /* %typemap(argout) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
13601 54 : Py_DECREF(resultobj);
13602 54 : int nEntryCount = *(arg3);
13603 54 : OGRGeometryTypeCounter* pRet = *(arg2);
13604 54 : if( pRet == NULL )
13605 : {
13606 6 : PyErr_SetString( PyExc_RuntimeError, CPLGetLastErrorMsg() );
13607 6 : SWIG_fail;
13608 : }
13609 48 : resultobj = PyDict_New();
13610 153 : for(int i = 0; i < nEntryCount; ++ i)
13611 : {
13612 105 : PyObject *key = PyInt_FromLong( (int)(pRet[i].eGeomType) );
13613 105 : PyObject *val = PyLong_FromLongLong( pRet[i].nCount );
13614 105 : PyDict_SetItem(resultobj, key, val );
13615 105 : Py_DECREF(key);
13616 105 : Py_DECREF(val);
13617 : }
13618 : }
13619 48 : {
13620 : /* %typemap(freearg) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
13621 48 : VSIFree(*arg2);
13622 : }
13623 48 : {
13624 : /* %typemap(freearg) ( void* callback_data=NULL) */
13625 :
13626 48 : CPLFree(psProgressInfo);
13627 :
13628 : }
13629 54 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13630 : return resultobj;
13631 6 : fail:
13632 6 : {
13633 : /* %typemap(freearg) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
13634 6 : VSIFree(*arg2);
13635 : }
13636 6 : {
13637 : /* %typemap(freearg) ( void* callback_data=NULL) */
13638 :
13639 6 : CPLFree(psProgressInfo);
13640 :
13641 : }
13642 : return NULL;
13643 : }
13644 :
13645 :
13646 4 : SWIGINTERN PyObject *_wrap_Layer_GetSupportedSRSList(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13647 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13648 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13649 4 : OGRSpatialReferenceH **arg2 = (OGRSpatialReferenceH **) 0 ;
13650 4 : int *arg3 = (int *) 0 ;
13651 4 : int arg4 = (int) 0 ;
13652 4 : void *argp1 = 0 ;
13653 4 : int res1 = 0 ;
13654 4 : OGRSpatialReferenceH *pRet2 = NULL ;
13655 4 : int nEntryCount2 = 0 ;
13656 4 : int val4 ;
13657 4 : int ecode4 = 0 ;
13658 4 : PyObject * obj0 = 0 ;
13659 4 : PyObject * obj1 = 0 ;
13660 4 : char * kwnames[] = {
13661 : (char *)"self", (char *)"geom_field", NULL
13662 : };
13663 :
13664 4 : {
13665 : /* %typemap(in,numinputs=0) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
13666 4 : arg2 = &pRet2;
13667 4 : arg3 = &nEntryCount2;
13668 : }
13669 4 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Layer_GetSupportedSRSList", kwnames, &obj0, &obj1)) SWIG_fail;
13670 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13671 4 : if (!SWIG_IsOK(res1)) {
13672 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSupportedSRSList" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13673 : }
13674 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13675 4 : if (obj1) {
13676 0 : ecode4 = SWIG_AsVal_int(obj1, &val4);
13677 0 : if (!SWIG_IsOK(ecode4)) {
13678 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetSupportedSRSList" "', argument " "4"" of type '" "int""'");
13679 : }
13680 : arg4 = static_cast< int >(val4);
13681 : }
13682 4 : {
13683 4 : const int bLocalUseExceptions = GetUseExceptions();
13684 4 : if ( bLocalUseExceptions ) {
13685 2 : pushErrorHandler();
13686 : }
13687 4 : {
13688 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13689 4 : OGRLayerShadow_GetSupportedSRSList(arg1,arg2,arg3,arg4);
13690 4 : SWIG_PYTHON_THREAD_END_ALLOW;
13691 : }
13692 4 : if ( bLocalUseExceptions ) {
13693 2 : popErrorHandler();
13694 : }
13695 : #ifndef SED_HACKS
13696 : if ( bLocalUseExceptions ) {
13697 : CPLErr eclass = CPLGetLastErrorType();
13698 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13699 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13700 : }
13701 : }
13702 : #endif
13703 : }
13704 4 : resultobj = SWIG_Py_Void();
13705 4 : {
13706 : /* %typemap(argout) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
13707 4 : Py_DECREF(resultobj);
13708 4 : int nEntryCount = *(arg3);
13709 4 : OGRSpatialReferenceH* pRet = *(arg2);
13710 4 : if( nEntryCount == 0)
13711 : {
13712 2 : Py_INCREF(Py_None);
13713 2 : resultobj = Py_None;
13714 : }
13715 : else
13716 : {
13717 2 : resultobj = PyList_New(nEntryCount);
13718 2 : if( !resultobj ) {
13719 0 : SWIG_fail;
13720 : }
13721 7 : for(int i = 0; i < nEntryCount; ++ i)
13722 : {
13723 5 : OSRReference(pRet[i]);
13724 5 : PyList_SetItem(resultobj, i, SWIG_NewPointerObj(
13725 : SWIG_as_voidptr(pRet[i]),SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN) );
13726 : }
13727 : }
13728 : }
13729 4 : {
13730 : /* %typemap(freearg) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
13731 4 : OSRFreeSRSArray(*arg2);
13732 : }
13733 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13734 : return resultobj;
13735 0 : fail:
13736 0 : {
13737 : /* %typemap(freearg) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
13738 0 : OSRFreeSRSArray(*arg2);
13739 : }
13740 : return NULL;
13741 : }
13742 :
13743 :
13744 9 : SWIGINTERN PyObject *_wrap_Layer_SetActiveSRS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13745 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13746 9 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
13747 9 : int arg2 ;
13748 9 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
13749 9 : void *argp1 = 0 ;
13750 9 : int res1 = 0 ;
13751 9 : int val2 ;
13752 9 : int ecode2 = 0 ;
13753 9 : void *argp3 = 0 ;
13754 9 : int res3 = 0 ;
13755 9 : PyObject *swig_obj[3] ;
13756 9 : OGRErr result;
13757 :
13758 9 : if (!SWIG_Python_UnpackTuple(args, "Layer_SetActiveSRS", 3, 3, swig_obj)) SWIG_fail;
13759 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
13760 9 : if (!SWIG_IsOK(res1)) {
13761 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetActiveSRS" "', argument " "1"" of type '" "OGRLayerShadow *""'");
13762 : }
13763 9 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
13764 9 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
13765 9 : if (!SWIG_IsOK(ecode2)) {
13766 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetActiveSRS" "', argument " "2"" of type '" "int""'");
13767 : }
13768 9 : arg2 = static_cast< int >(val2);
13769 9 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13770 9 : if (!SWIG_IsOK(res3)) {
13771 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SetActiveSRS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
13772 : }
13773 9 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
13774 9 : {
13775 9 : const int bLocalUseExceptions = GetUseExceptions();
13776 9 : if ( bLocalUseExceptions ) {
13777 4 : pushErrorHandler();
13778 : }
13779 9 : {
13780 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13781 9 : result = (OGRErr)OGRLayerShadow_SetActiveSRS(arg1,arg2,arg3);
13782 9 : SWIG_PYTHON_THREAD_END_ALLOW;
13783 : }
13784 9 : if ( bLocalUseExceptions ) {
13785 4 : popErrorHandler();
13786 : }
13787 : #ifndef SED_HACKS
13788 : if ( bLocalUseExceptions ) {
13789 : CPLErr eclass = CPLGetLastErrorType();
13790 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13791 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13792 : }
13793 : }
13794 : #endif
13795 : }
13796 9 : {
13797 : /* %typemap(out) OGRErr */
13798 14 : if ( result != 0 && GetUseExceptions()) {
13799 2 : const char* pszMessage = CPLGetLastErrorMsg();
13800 2 : if( pszMessage[0] != '\0' )
13801 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13802 : else
13803 2 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13804 2 : SWIG_fail;
13805 : }
13806 : }
13807 7 : {
13808 : /* %typemap(ret) OGRErr */
13809 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13810 7 : resultobj = PyInt_FromLong( result );
13811 : }
13812 : }
13813 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13814 : return resultobj;
13815 : fail:
13816 : return NULL;
13817 : }
13818 :
13819 :
13820 271 : SWIGINTERN PyObject *Layer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13821 271 : PyObject *obj;
13822 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
13823 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRLayerShadow, SWIG_NewClientData(obj));
13824 271 : return SWIG_Py_Void();
13825 : }
13826 :
13827 200458 : SWIGINTERN PyObject *_wrap_delete_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13828 200458 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13829 200458 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
13830 200458 : void *argp1 = 0 ;
13831 200458 : int res1 = 0 ;
13832 200458 : PyObject *swig_obj[1] ;
13833 :
13834 200458 : if (!args) SWIG_fail;
13835 200458 : swig_obj[0] = args;
13836 200458 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_DISOWN | 0 );
13837 200458 : if (!SWIG_IsOK(res1)) {
13838 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Feature" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
13839 : }
13840 200458 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
13841 200458 : {
13842 200458 : const int bLocalUseExceptions = GetUseExceptions();
13843 200458 : if ( bLocalUseExceptions ) {
13844 106297 : pushErrorHandler();
13845 : }
13846 200458 : {
13847 200458 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13848 200458 : delete_OGRFeatureShadow(arg1);
13849 200458 : SWIG_PYTHON_THREAD_END_ALLOW;
13850 : }
13851 200458 : if ( bLocalUseExceptions ) {
13852 106297 : popErrorHandler();
13853 : }
13854 : #ifndef SED_HACKS
13855 : if ( bLocalUseExceptions ) {
13856 : CPLErr eclass = CPLGetLastErrorType();
13857 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13858 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13859 : }
13860 : }
13861 : #endif
13862 : }
13863 200458 : resultobj = SWIG_Py_Void();
13864 200458 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13865 : return resultobj;
13866 : fail:
13867 : return NULL;
13868 : }
13869 :
13870 :
13871 121101 : SWIGINTERN PyObject *_wrap_new_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13872 121101 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13873 121101 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
13874 121101 : void *argp1 = 0 ;
13875 121101 : int res1 = 0 ;
13876 121101 : PyObject * obj0 = 0 ;
13877 121101 : char * kwnames[] = {
13878 : (char *)"feature_def", NULL
13879 : };
13880 121101 : OGRFeatureShadow *result = 0 ;
13881 :
13882 121101 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:new_Feature", kwnames, &obj0)) SWIG_fail;
13883 121101 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
13884 121101 : if (!SWIG_IsOK(res1)) {
13885 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Feature" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
13886 : }
13887 121101 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
13888 121101 : {
13889 121101 : if (!arg1) {
13890 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13891 : }
13892 : }
13893 121101 : {
13894 121101 : const int bLocalUseExceptions = GetUseExceptions();
13895 121101 : if ( bLocalUseExceptions ) {
13896 59588 : pushErrorHandler();
13897 : }
13898 121101 : {
13899 121101 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13900 121101 : result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
13901 121101 : SWIG_PYTHON_THREAD_END_ALLOW;
13902 : }
13903 121101 : if ( bLocalUseExceptions ) {
13904 59588 : popErrorHandler();
13905 : }
13906 : #ifndef SED_HACKS
13907 : if ( bLocalUseExceptions ) {
13908 : CPLErr eclass = CPLGetLastErrorType();
13909 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13910 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13911 : }
13912 : }
13913 : #endif
13914 : }
13915 121101 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_NEW | 0 );
13916 121101 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13917 : return resultobj;
13918 : fail:
13919 : return NULL;
13920 : }
13921 :
13922 :
13923 46868 : SWIGINTERN PyObject *_wrap_Feature_GetDefnRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13924 46868 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13925 46868 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
13926 46868 : void *argp1 = 0 ;
13927 46868 : int res1 = 0 ;
13928 46868 : PyObject *swig_obj[1] ;
13929 46868 : OGRFeatureDefnShadow *result = 0 ;
13930 :
13931 46868 : if (!args) SWIG_fail;
13932 46868 : swig_obj[0] = args;
13933 46868 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
13934 46868 : if (!SWIG_IsOK(res1)) {
13935 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
13936 : }
13937 46868 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
13938 46868 : {
13939 46868 : const int bLocalUseExceptions = GetUseExceptions();
13940 46868 : if ( bLocalUseExceptions ) {
13941 17582 : pushErrorHandler();
13942 : }
13943 46868 : {
13944 46868 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13945 46868 : result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
13946 46868 : SWIG_PYTHON_THREAD_END_ALLOW;
13947 : }
13948 46868 : if ( bLocalUseExceptions ) {
13949 17582 : popErrorHandler();
13950 : }
13951 : #ifndef SED_HACKS
13952 : if ( bLocalUseExceptions ) {
13953 : CPLErr eclass = CPLGetLastErrorType();
13954 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13955 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13956 : }
13957 : }
13958 : #endif
13959 : }
13960 46868 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
13961 46868 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
13962 : return resultobj;
13963 : fail:
13964 : return NULL;
13965 : }
13966 :
13967 :
13968 236056 : SWIGINTERN PyObject *_wrap_Feature_SetGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13969 236056 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13970 236056 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
13971 236056 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
13972 236056 : void *argp1 = 0 ;
13973 236056 : int res1 = 0 ;
13974 236056 : void *argp2 = 0 ;
13975 236056 : int res2 = 0 ;
13976 236056 : PyObject *swig_obj[2] ;
13977 236056 : OGRErr result;
13978 :
13979 236056 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetGeometry", 2, 2, swig_obj)) SWIG_fail;
13980 236056 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
13981 236056 : if (!SWIG_IsOK(res1)) {
13982 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometry" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
13983 : }
13984 236056 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
13985 236056 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13986 236056 : if (!SWIG_IsOK(res2)) {
13987 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
13988 : }
13989 236056 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
13990 236056 : {
13991 236056 : const int bLocalUseExceptions = GetUseExceptions();
13992 236056 : if ( bLocalUseExceptions ) {
13993 217346 : pushErrorHandler();
13994 : }
13995 236056 : {
13996 236056 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
13997 236056 : result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
13998 236056 : SWIG_PYTHON_THREAD_END_ALLOW;
13999 : }
14000 236056 : if ( bLocalUseExceptions ) {
14001 217346 : popErrorHandler();
14002 : }
14003 : #ifndef SED_HACKS
14004 : if ( bLocalUseExceptions ) {
14005 : CPLErr eclass = CPLGetLastErrorType();
14006 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14007 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14008 : }
14009 : }
14010 : #endif
14011 : }
14012 236056 : {
14013 : /* %typemap(out) OGRErr */
14014 236058 : if ( result != 0 && GetUseExceptions()) {
14015 0 : const char* pszMessage = CPLGetLastErrorMsg();
14016 0 : if( pszMessage[0] != '\0' )
14017 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14018 : else
14019 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14020 0 : SWIG_fail;
14021 : }
14022 : }
14023 236056 : {
14024 : /* %typemap(ret) OGRErr */
14025 236056 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14026 236056 : resultobj = PyInt_FromLong( result );
14027 : }
14028 : }
14029 236056 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14030 : return resultobj;
14031 : fail:
14032 : return NULL;
14033 : }
14034 :
14035 :
14036 33895 : SWIGINTERN PyObject *_wrap_Feature_SetGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14037 33895 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14038 33895 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14039 33895 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
14040 33895 : void *argp1 = 0 ;
14041 33895 : int res1 = 0 ;
14042 33895 : int res2 = 0 ;
14043 33895 : PyObject *swig_obj[2] ;
14044 33895 : OGRErr result;
14045 :
14046 33895 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetGeometryDirectly", 2, 2, swig_obj)) SWIG_fail;
14047 33895 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14048 33895 : if (!SWIG_IsOK(res1)) {
14049 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometryDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14050 : }
14051 33895 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14052 33895 : res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
14053 33895 : if (!SWIG_IsOK(res2)) {
14054 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
14055 : }
14056 33895 : {
14057 33895 : const int bLocalUseExceptions = GetUseExceptions();
14058 33895 : if ( bLocalUseExceptions ) {
14059 1033 : pushErrorHandler();
14060 : }
14061 33895 : {
14062 33895 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14063 33895 : result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
14064 33895 : SWIG_PYTHON_THREAD_END_ALLOW;
14065 : }
14066 33895 : if ( bLocalUseExceptions ) {
14067 1033 : popErrorHandler();
14068 : }
14069 : #ifndef SED_HACKS
14070 : if ( bLocalUseExceptions ) {
14071 : CPLErr eclass = CPLGetLastErrorType();
14072 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14073 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14074 : }
14075 : }
14076 : #endif
14077 : }
14078 33895 : {
14079 : /* %typemap(out) OGRErr */
14080 33896 : if ( result != 0 && GetUseExceptions()) {
14081 0 : const char* pszMessage = CPLGetLastErrorMsg();
14082 0 : if( pszMessage[0] != '\0' )
14083 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14084 : else
14085 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14086 0 : SWIG_fail;
14087 : }
14088 : }
14089 33895 : {
14090 : /* %typemap(ret) OGRErr */
14091 33895 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14092 33895 : resultobj = PyInt_FromLong( result );
14093 : }
14094 : }
14095 33895 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14096 : return resultobj;
14097 : fail:
14098 : return NULL;
14099 : }
14100 :
14101 :
14102 37542 : SWIGINTERN PyObject *_wrap_Feature_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14103 37542 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14104 37542 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14105 37542 : void *argp1 = 0 ;
14106 37542 : int res1 = 0 ;
14107 37542 : PyObject *swig_obj[1] ;
14108 37542 : OGRGeometryShadow *result = 0 ;
14109 :
14110 37542 : if (!args) SWIG_fail;
14111 37542 : swig_obj[0] = args;
14112 37542 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14113 37542 : if (!SWIG_IsOK(res1)) {
14114 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeometryRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14115 : }
14116 37542 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14117 37542 : {
14118 37542 : const int bLocalUseExceptions = GetUseExceptions();
14119 37542 : if ( bLocalUseExceptions ) {
14120 32577 : pushErrorHandler();
14121 : }
14122 37542 : {
14123 37542 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14124 37542 : result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
14125 37542 : SWIG_PYTHON_THREAD_END_ALLOW;
14126 : }
14127 37542 : if ( bLocalUseExceptions ) {
14128 32577 : popErrorHandler();
14129 : }
14130 : #ifndef SED_HACKS
14131 : if ( bLocalUseExceptions ) {
14132 : CPLErr eclass = CPLGetLastErrorType();
14133 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14134 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14135 : }
14136 : }
14137 : #endif
14138 : }
14139 37542 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14140 37542 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14141 : return resultobj;
14142 : fail:
14143 : return NULL;
14144 : }
14145 :
14146 :
14147 : SWIGINTERN PyObject *_wrap_Feature_SetGeomField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14148 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14149 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14150 : int arg2 ;
14151 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
14152 : void *argp1 = 0 ;
14153 : int res1 = 0 ;
14154 : int val2 ;
14155 : int ecode2 = 0 ;
14156 : void *argp3 = 0 ;
14157 : int res3 = 0 ;
14158 : OGRErr result;
14159 :
14160 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
14161 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14162 : if (!SWIG_IsOK(res1)) {
14163 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14164 : }
14165 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14166 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14167 : if (!SWIG_IsOK(ecode2)) {
14168 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetGeomField" "', argument " "2"" of type '" "int""'");
14169 : }
14170 : arg2 = static_cast< int >(val2);
14171 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14172 : if (!SWIG_IsOK(res3)) {
14173 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomField" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
14174 : }
14175 : arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
14176 : {
14177 : const int bLocalUseExceptions = GetUseExceptions();
14178 : if ( bLocalUseExceptions ) {
14179 : pushErrorHandler();
14180 : }
14181 : {
14182 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14183 : result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_0(arg1,arg2,arg3);
14184 : SWIG_PYTHON_THREAD_END_ALLOW;
14185 : }
14186 : if ( bLocalUseExceptions ) {
14187 : popErrorHandler();
14188 : }
14189 : #ifndef SED_HACKS
14190 : if ( bLocalUseExceptions ) {
14191 : CPLErr eclass = CPLGetLastErrorType();
14192 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14193 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14194 : }
14195 : }
14196 : #endif
14197 : }
14198 : {
14199 : /* %typemap(out) OGRErr */
14200 : if ( result != 0 && GetUseExceptions()) {
14201 : const char* pszMessage = CPLGetLastErrorMsg();
14202 : if( pszMessage[0] != '\0' )
14203 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14204 : else
14205 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14206 : SWIG_fail;
14207 : }
14208 : }
14209 : {
14210 : /* %typemap(ret) OGRErr */
14211 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14212 : resultobj = PyInt_FromLong( result );
14213 : }
14214 : }
14215 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14216 : return resultobj;
14217 : fail:
14218 : return NULL;
14219 : }
14220 :
14221 :
14222 : SWIGINTERN PyObject *_wrap_Feature_SetGeomField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14223 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14224 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14225 : char *arg2 = (char *) 0 ;
14226 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
14227 : void *argp1 = 0 ;
14228 : int res1 = 0 ;
14229 : int bToFree2 = 0 ;
14230 : void *argp3 = 0 ;
14231 : int res3 = 0 ;
14232 : OGRErr result;
14233 :
14234 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
14235 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14236 : if (!SWIG_IsOK(res1)) {
14237 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14238 : }
14239 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14240 : {
14241 : /* %typemap(in) (const char *utf8_path) */
14242 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
14243 : {
14244 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
14245 : }
14246 : else
14247 : {
14248 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
14249 :
14250 : }
14251 : if (arg2 == NULL)
14252 : {
14253 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
14254 : SWIG_fail;
14255 : }
14256 : }
14257 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14258 : if (!SWIG_IsOK(res3)) {
14259 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomField" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
14260 : }
14261 : arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
14262 : {
14263 : const int bLocalUseExceptions = GetUseExceptions();
14264 : if ( bLocalUseExceptions ) {
14265 : pushErrorHandler();
14266 : }
14267 : {
14268 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14269 : result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_1(arg1,(char const *)arg2,arg3);
14270 : SWIG_PYTHON_THREAD_END_ALLOW;
14271 : }
14272 : if ( bLocalUseExceptions ) {
14273 : popErrorHandler();
14274 : }
14275 : #ifndef SED_HACKS
14276 : if ( bLocalUseExceptions ) {
14277 : CPLErr eclass = CPLGetLastErrorType();
14278 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14279 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14280 : }
14281 : }
14282 : #endif
14283 : }
14284 : {
14285 : /* %typemap(out) OGRErr */
14286 : if ( result != 0 && GetUseExceptions()) {
14287 : const char* pszMessage = CPLGetLastErrorMsg();
14288 : if( pszMessage[0] != '\0' )
14289 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14290 : else
14291 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14292 : SWIG_fail;
14293 : }
14294 : }
14295 : {
14296 : /* %typemap(freearg) (const char *utf8_path) */
14297 : GDALPythonFreeCStr(arg2, bToFree2);
14298 : }
14299 : {
14300 : /* %typemap(ret) OGRErr */
14301 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14302 : resultobj = PyInt_FromLong( result );
14303 : }
14304 : }
14305 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14306 : return resultobj;
14307 : fail:
14308 : {
14309 : /* %typemap(freearg) (const char *utf8_path) */
14310 : GDALPythonFreeCStr(arg2, bToFree2);
14311 : }
14312 : return NULL;
14313 : }
14314 :
14315 :
14316 221 : SWIGINTERN PyObject *_wrap_Feature_SetGeomField(PyObject *self, PyObject *args) {
14317 221 : Py_ssize_t argc;
14318 221 : PyObject *argv[4] = {
14319 : 0
14320 : };
14321 :
14322 221 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetGeomField", 0, 3, argv))) SWIG_fail;
14323 221 : --argc;
14324 221 : if (argc == 3) {
14325 221 : int _v;
14326 221 : void *vptr = 0;
14327 221 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14328 222 : _v = SWIG_CheckState(res);
14329 221 : if (_v) {
14330 221 : {
14331 221 : int res = SWIG_AsVal_int(argv[1], NULL);
14332 221 : _v = SWIG_CheckState(res);
14333 : }
14334 220 : if (_v) {
14335 220 : void *vptr = 0;
14336 220 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
14337 220 : _v = SWIG_CheckState(res);
14338 0 : if (_v) {
14339 220 : return _wrap_Feature_SetGeomField__SWIG_0(self, argc, argv);
14340 : }
14341 : }
14342 : }
14343 : }
14344 1 : if (argc == 3) {
14345 1 : int _v;
14346 1 : void *vptr = 0;
14347 1 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14348 1 : _v = SWIG_CheckState(res);
14349 1 : if (_v) {
14350 1 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
14351 1 : _v = SWIG_CheckState(res);
14352 1 : if (_v) {
14353 1 : void *vptr = 0;
14354 1 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
14355 1 : _v = SWIG_CheckState(res);
14356 0 : if (_v) {
14357 1 : return _wrap_Feature_SetGeomField__SWIG_1(self, argc, argv);
14358 : }
14359 : }
14360 : }
14361 : }
14362 :
14363 0 : fail:
14364 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetGeomField'.\n"
14365 : " Possible C/C++ prototypes are:\n"
14366 : " OGRFeatureShadow::SetGeomField(int,OGRGeometryShadow *)\n"
14367 : " OGRFeatureShadow::SetGeomField(char const *,OGRGeometryShadow *)\n");
14368 : return 0;
14369 : }
14370 :
14371 :
14372 : SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14373 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14374 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14375 : int arg2 ;
14376 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
14377 : void *argp1 = 0 ;
14378 : int res1 = 0 ;
14379 : int val2 ;
14380 : int ecode2 = 0 ;
14381 : int res3 = 0 ;
14382 : OGRErr result;
14383 :
14384 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
14385 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14386 : if (!SWIG_IsOK(res1)) {
14387 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14388 : }
14389 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14390 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14391 : if (!SWIG_IsOK(ecode2)) {
14392 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "2"" of type '" "int""'");
14393 : }
14394 : arg2 = static_cast< int >(val2);
14395 : res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&arg3), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
14396 : if (!SWIG_IsOK(res3)) {
14397 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
14398 : }
14399 : {
14400 : const int bLocalUseExceptions = GetUseExceptions();
14401 : if ( bLocalUseExceptions ) {
14402 : pushErrorHandler();
14403 : }
14404 : {
14405 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14406 : result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(arg1,arg2,arg3);
14407 : SWIG_PYTHON_THREAD_END_ALLOW;
14408 : }
14409 : if ( bLocalUseExceptions ) {
14410 : popErrorHandler();
14411 : }
14412 : #ifndef SED_HACKS
14413 : if ( bLocalUseExceptions ) {
14414 : CPLErr eclass = CPLGetLastErrorType();
14415 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14416 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14417 : }
14418 : }
14419 : #endif
14420 : }
14421 : {
14422 : /* %typemap(out) OGRErr */
14423 : if ( result != 0 && GetUseExceptions()) {
14424 : const char* pszMessage = CPLGetLastErrorMsg();
14425 : if( pszMessage[0] != '\0' )
14426 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14427 : else
14428 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14429 : SWIG_fail;
14430 : }
14431 : }
14432 : {
14433 : /* %typemap(ret) OGRErr */
14434 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14435 : resultobj = PyInt_FromLong( result );
14436 : }
14437 : }
14438 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14439 : return resultobj;
14440 : fail:
14441 : return NULL;
14442 : }
14443 :
14444 :
14445 : SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14446 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14447 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14448 : char *arg2 = (char *) 0 ;
14449 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
14450 : void *argp1 = 0 ;
14451 : int res1 = 0 ;
14452 : int bToFree2 = 0 ;
14453 : int res3 = 0 ;
14454 : OGRErr result;
14455 :
14456 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
14457 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14458 : if (!SWIG_IsOK(res1)) {
14459 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14460 : }
14461 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14462 : {
14463 : /* %typemap(in) (const char *utf8_path) */
14464 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
14465 : {
14466 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
14467 : }
14468 : else
14469 : {
14470 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
14471 :
14472 : }
14473 : if (arg2 == NULL)
14474 : {
14475 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
14476 : SWIG_fail;
14477 : }
14478 : }
14479 : res3 = SWIG_ConvertPtr(swig_obj[2], SWIG_as_voidptrptr(&arg3), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
14480 : if (!SWIG_IsOK(res3)) {
14481 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
14482 : }
14483 : {
14484 : const int bLocalUseExceptions = GetUseExceptions();
14485 : if ( bLocalUseExceptions ) {
14486 : pushErrorHandler();
14487 : }
14488 : {
14489 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14490 : result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(arg1,(char const *)arg2,arg3);
14491 : SWIG_PYTHON_THREAD_END_ALLOW;
14492 : }
14493 : if ( bLocalUseExceptions ) {
14494 : popErrorHandler();
14495 : }
14496 : #ifndef SED_HACKS
14497 : if ( bLocalUseExceptions ) {
14498 : CPLErr eclass = CPLGetLastErrorType();
14499 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14500 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14501 : }
14502 : }
14503 : #endif
14504 : }
14505 : {
14506 : /* %typemap(out) OGRErr */
14507 : if ( result != 0 && GetUseExceptions()) {
14508 : const char* pszMessage = CPLGetLastErrorMsg();
14509 : if( pszMessage[0] != '\0' )
14510 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14511 : else
14512 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14513 : SWIG_fail;
14514 : }
14515 : }
14516 : {
14517 : /* %typemap(freearg) (const char *utf8_path) */
14518 : GDALPythonFreeCStr(arg2, bToFree2);
14519 : }
14520 : {
14521 : /* %typemap(ret) OGRErr */
14522 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14523 : resultobj = PyInt_FromLong( result );
14524 : }
14525 : }
14526 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14527 : return resultobj;
14528 : fail:
14529 : {
14530 : /* %typemap(freearg) (const char *utf8_path) */
14531 : GDALPythonFreeCStr(arg2, bToFree2);
14532 : }
14533 : return NULL;
14534 : }
14535 :
14536 :
14537 35 : SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly(PyObject *self, PyObject *args) {
14538 35 : Py_ssize_t argc;
14539 35 : PyObject *argv[4] = {
14540 : 0
14541 : };
14542 :
14543 35 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetGeomFieldDirectly", 0, 3, argv))) SWIG_fail;
14544 35 : --argc;
14545 35 : if (argc == 3) {
14546 35 : int _v;
14547 35 : void *vptr = 0;
14548 35 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14549 51 : _v = SWIG_CheckState(res);
14550 35 : if (_v) {
14551 35 : {
14552 35 : int res = SWIG_AsVal_int(argv[1], NULL);
14553 35 : _v = SWIG_CheckState(res);
14554 : }
14555 19 : if (_v) {
14556 19 : void *vptr = 0;
14557 19 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
14558 19 : _v = SWIG_CheckState(res);
14559 0 : if (_v) {
14560 19 : return _wrap_Feature_SetGeomFieldDirectly__SWIG_0(self, argc, argv);
14561 : }
14562 : }
14563 : }
14564 : }
14565 16 : if (argc == 3) {
14566 16 : int _v;
14567 16 : void *vptr = 0;
14568 16 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14569 16 : _v = SWIG_CheckState(res);
14570 16 : if (_v) {
14571 16 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
14572 16 : _v = SWIG_CheckState(res);
14573 16 : if (_v) {
14574 16 : void *vptr = 0;
14575 16 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
14576 16 : _v = SWIG_CheckState(res);
14577 0 : if (_v) {
14578 16 : return _wrap_Feature_SetGeomFieldDirectly__SWIG_1(self, argc, argv);
14579 : }
14580 : }
14581 : }
14582 : }
14583 :
14584 0 : fail:
14585 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetGeomFieldDirectly'.\n"
14586 : " Possible C/C++ prototypes are:\n"
14587 : " OGRFeatureShadow::SetGeomFieldDirectly(int,OGRGeometryShadow *)\n"
14588 : " OGRFeatureShadow::SetGeomFieldDirectly(char const *,OGRGeometryShadow *)\n");
14589 : return 0;
14590 : }
14591 :
14592 :
14593 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14594 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14595 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14596 : int arg2 ;
14597 : void *argp1 = 0 ;
14598 : int res1 = 0 ;
14599 : int val2 ;
14600 : int ecode2 = 0 ;
14601 : OGRGeometryShadow *result = 0 ;
14602 :
14603 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
14604 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14605 : if (!SWIG_IsOK(res1)) {
14606 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14607 : }
14608 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14609 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14610 : if (!SWIG_IsOK(ecode2)) {
14611 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetGeomFieldRef" "', argument " "2"" of type '" "int""'");
14612 : }
14613 : arg2 = static_cast< int >(val2);
14614 : {
14615 : const int bLocalUseExceptions = GetUseExceptions();
14616 : if ( bLocalUseExceptions ) {
14617 : pushErrorHandler();
14618 : }
14619 : {
14620 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14621 : result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_0(arg1,arg2);
14622 : SWIG_PYTHON_THREAD_END_ALLOW;
14623 : }
14624 : if ( bLocalUseExceptions ) {
14625 : popErrorHandler();
14626 : }
14627 : #ifndef SED_HACKS
14628 : if ( bLocalUseExceptions ) {
14629 : CPLErr eclass = CPLGetLastErrorType();
14630 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14631 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14632 : }
14633 : }
14634 : #endif
14635 : }
14636 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14637 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14638 : return resultobj;
14639 : fail:
14640 : return NULL;
14641 : }
14642 :
14643 :
14644 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14645 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14646 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14647 : char *arg2 = (char *) 0 ;
14648 : void *argp1 = 0 ;
14649 : int res1 = 0 ;
14650 : int bToFree2 = 0 ;
14651 : OGRGeometryShadow *result = 0 ;
14652 :
14653 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
14654 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14655 : if (!SWIG_IsOK(res1)) {
14656 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14657 : }
14658 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14659 : {
14660 : /* %typemap(in) (const char *utf8_path) */
14661 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
14662 : {
14663 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
14664 : }
14665 : else
14666 : {
14667 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
14668 :
14669 : }
14670 : if (arg2 == NULL)
14671 : {
14672 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
14673 : SWIG_fail;
14674 : }
14675 : }
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_1(arg1,(char const *)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 : {
14700 : /* %typemap(freearg) (const char *utf8_path) */
14701 : GDALPythonFreeCStr(arg2, bToFree2);
14702 : }
14703 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14704 : return resultobj;
14705 : fail:
14706 : {
14707 : /* %typemap(freearg) (const char *utf8_path) */
14708 : GDALPythonFreeCStr(arg2, bToFree2);
14709 : }
14710 : return NULL;
14711 : }
14712 :
14713 :
14714 361 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef(PyObject *self, PyObject *args) {
14715 361 : Py_ssize_t argc;
14716 361 : PyObject *argv[3] = {
14717 : 0
14718 : };
14719 :
14720 361 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldRef", 0, 2, argv))) SWIG_fail;
14721 361 : --argc;
14722 361 : if (argc == 2) {
14723 361 : int _v;
14724 361 : void *vptr = 0;
14725 361 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14726 417 : _v = SWIG_CheckState(res);
14727 361 : if (_v) {
14728 361 : {
14729 361 : int res = SWIG_AsVal_int(argv[1], NULL);
14730 361 : _v = SWIG_CheckState(res);
14731 : }
14732 305 : if (_v) {
14733 305 : return _wrap_Feature_GetGeomFieldRef__SWIG_0(self, argc, argv);
14734 : }
14735 : }
14736 : }
14737 56 : if (argc == 2) {
14738 56 : int _v;
14739 56 : void *vptr = 0;
14740 56 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
14741 56 : _v = SWIG_CheckState(res);
14742 56 : if (_v) {
14743 56 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
14744 56 : _v = SWIG_CheckState(res);
14745 56 : if (_v) {
14746 56 : return _wrap_Feature_GetGeomFieldRef__SWIG_1(self, argc, argv);
14747 : }
14748 : }
14749 : }
14750 :
14751 0 : fail:
14752 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetGeomFieldRef'.\n"
14753 : " Possible C/C++ prototypes are:\n"
14754 : " OGRFeatureShadow::GetGeomFieldRef(int)\n"
14755 : " OGRFeatureShadow::GetGeomFieldRef(char const *)\n");
14756 : return 0;
14757 : }
14758 :
14759 :
14760 49 : SWIGINTERN PyObject *_wrap_Feature_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14761 49 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14762 49 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14763 49 : void *argp1 = 0 ;
14764 49 : int res1 = 0 ;
14765 49 : PyObject *swig_obj[1] ;
14766 49 : OGRFeatureShadow *result = 0 ;
14767 :
14768 49 : if (!args) SWIG_fail;
14769 49 : swig_obj[0] = args;
14770 49 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14771 49 : if (!SWIG_IsOK(res1)) {
14772 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Clone" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14773 : }
14774 49 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14775 49 : {
14776 49 : const int bLocalUseExceptions = GetUseExceptions();
14777 49 : if ( bLocalUseExceptions ) {
14778 43 : pushErrorHandler();
14779 : }
14780 49 : {
14781 49 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14782 49 : result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
14783 49 : SWIG_PYTHON_THREAD_END_ALLOW;
14784 : }
14785 49 : if ( bLocalUseExceptions ) {
14786 43 : popErrorHandler();
14787 : }
14788 : #ifndef SED_HACKS
14789 : if ( bLocalUseExceptions ) {
14790 : CPLErr eclass = CPLGetLastErrorType();
14791 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14792 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14793 : }
14794 : }
14795 : #endif
14796 : }
14797 49 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
14798 49 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14799 : return resultobj;
14800 : fail:
14801 : return NULL;
14802 : }
14803 :
14804 :
14805 109 : SWIGINTERN PyObject *_wrap_Feature_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14806 109 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14807 109 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14808 109 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
14809 109 : void *argp1 = 0 ;
14810 109 : int res1 = 0 ;
14811 109 : void *argp2 = 0 ;
14812 109 : int res2 = 0 ;
14813 109 : PyObject *swig_obj[2] ;
14814 109 : bool result;
14815 :
14816 109 : if (!SWIG_Python_UnpackTuple(args, "Feature_Equal", 2, 2, swig_obj)) SWIG_fail;
14817 109 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14818 109 : if (!SWIG_IsOK(res1)) {
14819 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Equal" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14820 : }
14821 109 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14822 109 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14823 109 : if (!SWIG_IsOK(res2)) {
14824 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_Equal" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
14825 : }
14826 109 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
14827 109 : {
14828 109 : if (!arg2) {
14829 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14830 : }
14831 : }
14832 109 : {
14833 109 : const int bLocalUseExceptions = GetUseExceptions();
14834 109 : if ( bLocalUseExceptions ) {
14835 97 : pushErrorHandler();
14836 : }
14837 109 : {
14838 109 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14839 109 : result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
14840 109 : SWIG_PYTHON_THREAD_END_ALLOW;
14841 : }
14842 109 : if ( bLocalUseExceptions ) {
14843 97 : popErrorHandler();
14844 : }
14845 : #ifndef SED_HACKS
14846 : if ( bLocalUseExceptions ) {
14847 : CPLErr eclass = CPLGetLastErrorType();
14848 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14849 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14850 : }
14851 : }
14852 : #endif
14853 : }
14854 109 : resultobj = SWIG_From_bool(static_cast< bool >(result));
14855 109 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14856 : return resultobj;
14857 : fail:
14858 : return NULL;
14859 : }
14860 :
14861 :
14862 108850 : SWIGINTERN PyObject *_wrap_Feature_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14863 108850 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14864 108850 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14865 108850 : void *argp1 = 0 ;
14866 108850 : int res1 = 0 ;
14867 108850 : PyObject *swig_obj[1] ;
14868 108850 : int result;
14869 :
14870 108850 : if (!args) SWIG_fail;
14871 108850 : swig_obj[0] = args;
14872 108850 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14873 108850 : if (!SWIG_IsOK(res1)) {
14874 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14875 : }
14876 108850 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14877 108850 : {
14878 108850 : const int bLocalUseExceptions = GetUseExceptions();
14879 108850 : if ( bLocalUseExceptions ) {
14880 21110 : pushErrorHandler();
14881 : }
14882 108850 : {
14883 108850 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14884 108850 : result = (int)OGRFeatureShadow_GetFieldCount(arg1);
14885 108850 : SWIG_PYTHON_THREAD_END_ALLOW;
14886 : }
14887 108850 : if ( bLocalUseExceptions ) {
14888 21110 : popErrorHandler();
14889 : }
14890 : #ifndef SED_HACKS
14891 : if ( bLocalUseExceptions ) {
14892 : CPLErr eclass = CPLGetLastErrorType();
14893 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14894 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14895 : }
14896 : }
14897 : #endif
14898 : }
14899 108850 : resultobj = SWIG_From_int(static_cast< int >(result));
14900 108850 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14901 : return resultobj;
14902 : fail:
14903 : return NULL;
14904 : }
14905 :
14906 :
14907 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14908 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14909 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14910 : int arg2 ;
14911 : void *argp1 = 0 ;
14912 : int res1 = 0 ;
14913 : int val2 ;
14914 : int ecode2 = 0 ;
14915 : OGRFieldDefnShadow *result = 0 ;
14916 :
14917 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
14918 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14919 : if (!SWIG_IsOK(res1)) {
14920 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14921 : }
14922 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14923 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14924 : if (!SWIG_IsOK(ecode2)) {
14925 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "int""'");
14926 : }
14927 : arg2 = static_cast< int >(val2);
14928 : {
14929 : const int bLocalUseExceptions = GetUseExceptions();
14930 : if ( bLocalUseExceptions ) {
14931 : pushErrorHandler();
14932 : }
14933 : {
14934 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
14935 : result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
14936 : SWIG_PYTHON_THREAD_END_ALLOW;
14937 : }
14938 : if ( bLocalUseExceptions ) {
14939 : popErrorHandler();
14940 : }
14941 : #ifndef SED_HACKS
14942 : if ( bLocalUseExceptions ) {
14943 : CPLErr eclass = CPLGetLastErrorType();
14944 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14945 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14946 : }
14947 : }
14948 : #endif
14949 : }
14950 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
14951 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
14952 : return resultobj;
14953 : fail:
14954 : return NULL;
14955 : }
14956 :
14957 :
14958 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
14959 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14960 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
14961 : char *arg2 = (char *) 0 ;
14962 : void *argp1 = 0 ;
14963 : int res1 = 0 ;
14964 : int bToFree2 = 0 ;
14965 : OGRFieldDefnShadow *result = 0 ;
14966 :
14967 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
14968 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
14969 : if (!SWIG_IsOK(res1)) {
14970 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
14971 : }
14972 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
14973 : {
14974 : /* %typemap(in) (const char *utf8_path) */
14975 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
14976 : {
14977 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
14978 : }
14979 : else
14980 : {
14981 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
14982 :
14983 : }
14984 : if (arg2 == NULL)
14985 : {
14986 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
14987 : SWIG_fail;
14988 : }
14989 : }
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_1(arg1,(char const *)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 : {
15014 : /* %typemap(freearg) (const char *utf8_path) */
15015 : GDALPythonFreeCStr(arg2, bToFree2);
15016 : }
15017 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15018 : return resultobj;
15019 : fail:
15020 : {
15021 : /* %typemap(freearg) (const char *utf8_path) */
15022 : GDALPythonFreeCStr(arg2, bToFree2);
15023 : }
15024 : return NULL;
15025 : }
15026 :
15027 :
15028 86780 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef(PyObject *self, PyObject *args) {
15029 86780 : Py_ssize_t argc;
15030 86780 : PyObject *argv[3] = {
15031 : 0
15032 : };
15033 :
15034 86780 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldDefnRef", 0, 2, argv))) SWIG_fail;
15035 86780 : --argc;
15036 86780 : if (argc == 2) {
15037 86780 : int _v;
15038 86780 : void *vptr = 0;
15039 86780 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15040 86780 : _v = SWIG_CheckState(res);
15041 86780 : if (_v) {
15042 86780 : {
15043 86780 : int res = SWIG_AsVal_int(argv[1], NULL);
15044 86780 : _v = SWIG_CheckState(res);
15045 : }
15046 86780 : if (_v) {
15047 86780 : return _wrap_Feature_GetFieldDefnRef__SWIG_0(self, argc, argv);
15048 : }
15049 : }
15050 : }
15051 0 : if (argc == 2) {
15052 0 : int _v;
15053 0 : void *vptr = 0;
15054 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15055 0 : _v = SWIG_CheckState(res);
15056 0 : if (_v) {
15057 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15058 0 : _v = SWIG_CheckState(res);
15059 0 : if (_v) {
15060 0 : return _wrap_Feature_GetFieldDefnRef__SWIG_1(self, argc, argv);
15061 : }
15062 : }
15063 : }
15064 :
15065 0 : fail:
15066 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldDefnRef'.\n"
15067 : " Possible C/C++ prototypes are:\n"
15068 : " OGRFeatureShadow::GetFieldDefnRef(int)\n"
15069 : " OGRFeatureShadow::GetFieldDefnRef(char const *)\n");
15070 : return 0;
15071 : }
15072 :
15073 :
15074 121 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15075 121 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15076 121 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15077 121 : void *argp1 = 0 ;
15078 121 : int res1 = 0 ;
15079 121 : PyObject *swig_obj[1] ;
15080 121 : int result;
15081 :
15082 121 : if (!args) SWIG_fail;
15083 121 : swig_obj[0] = args;
15084 121 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15085 121 : if (!SWIG_IsOK(res1)) {
15086 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15087 : }
15088 121 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15089 121 : {
15090 121 : const int bLocalUseExceptions = GetUseExceptions();
15091 121 : if ( bLocalUseExceptions ) {
15092 49 : pushErrorHandler();
15093 : }
15094 121 : {
15095 121 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15096 121 : result = (int)OGRFeatureShadow_GetGeomFieldCount(arg1);
15097 121 : SWIG_PYTHON_THREAD_END_ALLOW;
15098 : }
15099 121 : if ( bLocalUseExceptions ) {
15100 49 : popErrorHandler();
15101 : }
15102 : #ifndef SED_HACKS
15103 : if ( bLocalUseExceptions ) {
15104 : CPLErr eclass = CPLGetLastErrorType();
15105 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15106 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15107 : }
15108 : }
15109 : #endif
15110 : }
15111 121 : resultobj = SWIG_From_int(static_cast< int >(result));
15112 121 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15113 : return resultobj;
15114 : fail:
15115 : return NULL;
15116 : }
15117 :
15118 :
15119 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15120 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15121 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15122 : int arg2 ;
15123 : void *argp1 = 0 ;
15124 : int res1 = 0 ;
15125 : int val2 ;
15126 : int ecode2 = 0 ;
15127 : OGRGeomFieldDefnShadow *result = 0 ;
15128 :
15129 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15130 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15131 : if (!SWIG_IsOK(res1)) {
15132 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15133 : }
15134 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15135 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15136 : if (!SWIG_IsOK(ecode2)) {
15137 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "2"" of type '" "int""'");
15138 : }
15139 : arg2 = static_cast< int >(val2);
15140 : {
15141 : const int bLocalUseExceptions = GetUseExceptions();
15142 : if ( bLocalUseExceptions ) {
15143 : pushErrorHandler();
15144 : }
15145 : {
15146 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15147 : result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(arg1,arg2);
15148 : SWIG_PYTHON_THREAD_END_ALLOW;
15149 : }
15150 : if ( bLocalUseExceptions ) {
15151 : popErrorHandler();
15152 : }
15153 : #ifndef SED_HACKS
15154 : if ( bLocalUseExceptions ) {
15155 : CPLErr eclass = CPLGetLastErrorType();
15156 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15157 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15158 : }
15159 : }
15160 : #endif
15161 : }
15162 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
15163 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15164 : return resultobj;
15165 : fail:
15166 : return NULL;
15167 : }
15168 :
15169 :
15170 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15171 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15172 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15173 : char *arg2 = (char *) 0 ;
15174 : void *argp1 = 0 ;
15175 : int res1 = 0 ;
15176 : int bToFree2 = 0 ;
15177 : OGRGeomFieldDefnShadow *result = 0 ;
15178 :
15179 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15180 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15181 : if (!SWIG_IsOK(res1)) {
15182 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15183 : }
15184 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15185 : {
15186 : /* %typemap(in) (const char *utf8_path) */
15187 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15188 : {
15189 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15190 : }
15191 : else
15192 : {
15193 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15194 :
15195 : }
15196 : if (arg2 == NULL)
15197 : {
15198 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15199 : SWIG_fail;
15200 : }
15201 : }
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_1(arg1,(char const *)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 : {
15226 : /* %typemap(freearg) (const char *utf8_path) */
15227 : GDALPythonFreeCStr(arg2, bToFree2);
15228 : }
15229 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15230 : return resultobj;
15231 : fail:
15232 : {
15233 : /* %typemap(freearg) (const char *utf8_path) */
15234 : GDALPythonFreeCStr(arg2, bToFree2);
15235 : }
15236 : return NULL;
15237 : }
15238 :
15239 :
15240 2 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef(PyObject *self, PyObject *args) {
15241 2 : Py_ssize_t argc;
15242 2 : PyObject *argv[3] = {
15243 : 0
15244 : };
15245 :
15246 2 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldDefnRef", 0, 2, argv))) SWIG_fail;
15247 2 : --argc;
15248 2 : if (argc == 2) {
15249 2 : int _v;
15250 2 : void *vptr = 0;
15251 2 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15252 2 : _v = SWIG_CheckState(res);
15253 2 : if (_v) {
15254 2 : {
15255 2 : int res = SWIG_AsVal_int(argv[1], NULL);
15256 2 : _v = SWIG_CheckState(res);
15257 : }
15258 2 : if (_v) {
15259 2 : return _wrap_Feature_GetGeomFieldDefnRef__SWIG_0(self, argc, argv);
15260 : }
15261 : }
15262 : }
15263 0 : if (argc == 2) {
15264 0 : int _v;
15265 0 : void *vptr = 0;
15266 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15267 0 : _v = SWIG_CheckState(res);
15268 0 : if (_v) {
15269 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15270 0 : _v = SWIG_CheckState(res);
15271 0 : if (_v) {
15272 0 : return _wrap_Feature_GetGeomFieldDefnRef__SWIG_1(self, argc, argv);
15273 : }
15274 : }
15275 : }
15276 :
15277 0 : fail:
15278 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetGeomFieldDefnRef'.\n"
15279 : " Possible C/C++ prototypes are:\n"
15280 : " OGRFeatureShadow::GetGeomFieldDefnRef(int)\n"
15281 : " OGRFeatureShadow::GetGeomFieldDefnRef(char const *)\n");
15282 : return 0;
15283 : }
15284 :
15285 :
15286 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15287 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15288 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15289 : int arg2 ;
15290 : void *argp1 = 0 ;
15291 : int res1 = 0 ;
15292 : int val2 ;
15293 : int ecode2 = 0 ;
15294 : char *result = 0 ;
15295 :
15296 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15297 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15298 : if (!SWIG_IsOK(res1)) {
15299 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15300 : }
15301 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15302 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15303 : if (!SWIG_IsOK(ecode2)) {
15304 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "int""'");
15305 : }
15306 : arg2 = static_cast< int >(val2);
15307 : {
15308 : const int bLocalUseExceptions = GetUseExceptions();
15309 : if ( bLocalUseExceptions ) {
15310 : pushErrorHandler();
15311 : }
15312 : {
15313 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15314 : result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
15315 : SWIG_PYTHON_THREAD_END_ALLOW;
15316 : }
15317 : if ( bLocalUseExceptions ) {
15318 : popErrorHandler();
15319 : }
15320 : #ifndef SED_HACKS
15321 : if ( bLocalUseExceptions ) {
15322 : CPLErr eclass = CPLGetLastErrorType();
15323 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15324 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15325 : }
15326 : }
15327 : #endif
15328 : }
15329 : resultobj = SWIG_FromCharPtr((const char *)result);
15330 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15331 : return resultobj;
15332 : fail:
15333 : return NULL;
15334 : }
15335 :
15336 :
15337 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15338 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15339 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15340 : char *arg2 = (char *) 0 ;
15341 : void *argp1 = 0 ;
15342 : int res1 = 0 ;
15343 : int bToFree2 = 0 ;
15344 : char *result = 0 ;
15345 :
15346 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15347 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15348 : if (!SWIG_IsOK(res1)) {
15349 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15350 : }
15351 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15352 : {
15353 : /* %typemap(in) (const char *utf8_path) */
15354 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15355 : {
15356 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15357 : }
15358 : else
15359 : {
15360 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15361 :
15362 : }
15363 : if (arg2 == NULL)
15364 : {
15365 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15366 : SWIG_fail;
15367 : }
15368 : }
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_1(arg1,(char const *)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 : {
15393 : /* %typemap(freearg) (const char *utf8_path) */
15394 : GDALPythonFreeCStr(arg2, bToFree2);
15395 : }
15396 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15397 : return resultobj;
15398 : fail:
15399 : {
15400 : /* %typemap(freearg) (const char *utf8_path) */
15401 : GDALPythonFreeCStr(arg2, bToFree2);
15402 : }
15403 : return NULL;
15404 : }
15405 :
15406 :
15407 10393 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString(PyObject *self, PyObject *args) {
15408 10393 : Py_ssize_t argc;
15409 10393 : PyObject *argv[3] = {
15410 : 0
15411 : };
15412 :
15413 10393 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsString", 0, 2, argv))) SWIG_fail;
15414 10393 : --argc;
15415 10393 : if (argc == 2) {
15416 10393 : int _v;
15417 10393 : void *vptr = 0;
15418 10393 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15419 11182 : _v = SWIG_CheckState(res);
15420 10393 : if (_v) {
15421 10393 : {
15422 10393 : int res = SWIG_AsVal_int(argv[1], NULL);
15423 10393 : _v = SWIG_CheckState(res);
15424 : }
15425 9604 : if (_v) {
15426 9604 : return _wrap_Feature_GetFieldAsString__SWIG_0(self, argc, argv);
15427 : }
15428 : }
15429 : }
15430 789 : if (argc == 2) {
15431 789 : int _v;
15432 789 : void *vptr = 0;
15433 789 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15434 789 : _v = SWIG_CheckState(res);
15435 789 : if (_v) {
15436 789 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15437 789 : _v = SWIG_CheckState(res);
15438 789 : if (_v) {
15439 789 : return _wrap_Feature_GetFieldAsString__SWIG_1(self, argc, argv);
15440 : }
15441 : }
15442 : }
15443 :
15444 0 : fail:
15445 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsString'.\n"
15446 : " Possible C/C++ prototypes are:\n"
15447 : " OGRFeatureShadow::GetFieldAsString(int)\n"
15448 : " OGRFeatureShadow::GetFieldAsString(char const *)\n");
15449 : return 0;
15450 : }
15451 :
15452 :
15453 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15454 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15455 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15456 : int arg2 ;
15457 : char **arg3 = (char **) 0 ;
15458 : void *argp1 = 0 ;
15459 : int res1 = 0 ;
15460 : int val2 ;
15461 : int ecode2 = 0 ;
15462 : char *result = 0 ;
15463 :
15464 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
15465 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15466 : if (!SWIG_IsOK(res1)) {
15467 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15468 : }
15469 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15470 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15471 : if (!SWIG_IsOK(ecode2)) {
15472 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "2"" of type '" "int""'");
15473 : }
15474 : arg2 = static_cast< int >(val2);
15475 : if (swig_obj[2]) {
15476 : {
15477 : /* %typemap(in) char **dict */
15478 : arg3 = NULL;
15479 : if ( PySequence_Check( swig_obj[2] ) ) {
15480 : int bErr = FALSE;
15481 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
15482 : if ( bErr )
15483 : {
15484 : SWIG_fail;
15485 : }
15486 : }
15487 : else if ( PyMapping_Check( swig_obj[2] ) ) {
15488 : int bErr = FALSE;
15489 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
15490 : if ( bErr )
15491 : {
15492 : SWIG_fail;
15493 : }
15494 : }
15495 : else {
15496 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15497 : SWIG_fail;
15498 : }
15499 : }
15500 : }
15501 : {
15502 : const int bLocalUseExceptions = GetUseExceptions();
15503 : if ( bLocalUseExceptions ) {
15504 : pushErrorHandler();
15505 : }
15506 : {
15507 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15508 : result = (char *)OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_0(arg1,arg2,arg3);
15509 : SWIG_PYTHON_THREAD_END_ALLOW;
15510 : }
15511 : if ( bLocalUseExceptions ) {
15512 : popErrorHandler();
15513 : }
15514 : #ifndef SED_HACKS
15515 : if ( bLocalUseExceptions ) {
15516 : CPLErr eclass = CPLGetLastErrorType();
15517 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15518 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15519 : }
15520 : }
15521 : #endif
15522 : }
15523 : resultobj = SWIG_FromCharPtr((const char *)result);
15524 : {
15525 : /* %typemap(freearg) char **dict */
15526 : CSLDestroy( arg3 );
15527 : }
15528 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15529 : return resultobj;
15530 : fail:
15531 : {
15532 : /* %typemap(freearg) char **dict */
15533 : CSLDestroy( arg3 );
15534 : }
15535 : return NULL;
15536 : }
15537 :
15538 :
15539 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15540 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15541 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15542 : char *arg2 = (char *) 0 ;
15543 : char **arg3 = (char **) 0 ;
15544 : void *argp1 = 0 ;
15545 : int res1 = 0 ;
15546 : int bToFree2 = 0 ;
15547 : char *result = 0 ;
15548 :
15549 : if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
15550 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15551 : if (!SWIG_IsOK(res1)) {
15552 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15553 : }
15554 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15555 : {
15556 : /* %typemap(in) (const char *utf8_path) */
15557 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15558 : {
15559 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15560 : }
15561 : else
15562 : {
15563 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15564 :
15565 : }
15566 : if (arg2 == NULL)
15567 : {
15568 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15569 : SWIG_fail;
15570 : }
15571 : }
15572 : if (swig_obj[2]) {
15573 : {
15574 : /* %typemap(in) char **dict */
15575 : arg3 = NULL;
15576 : if ( PySequence_Check( swig_obj[2] ) ) {
15577 : int bErr = FALSE;
15578 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
15579 : if ( bErr )
15580 : {
15581 : SWIG_fail;
15582 : }
15583 : }
15584 : else if ( PyMapping_Check( swig_obj[2] ) ) {
15585 : int bErr = FALSE;
15586 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
15587 : if ( bErr )
15588 : {
15589 : SWIG_fail;
15590 : }
15591 : }
15592 : else {
15593 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15594 : SWIG_fail;
15595 : }
15596 : }
15597 : }
15598 : {
15599 : const int bLocalUseExceptions = GetUseExceptions();
15600 : if ( bLocalUseExceptions ) {
15601 : pushErrorHandler();
15602 : }
15603 : {
15604 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15605 : result = (char *)OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_1(arg1,(char const *)arg2,arg3);
15606 : SWIG_PYTHON_THREAD_END_ALLOW;
15607 : }
15608 : if ( bLocalUseExceptions ) {
15609 : popErrorHandler();
15610 : }
15611 : #ifndef SED_HACKS
15612 : if ( bLocalUseExceptions ) {
15613 : CPLErr eclass = CPLGetLastErrorType();
15614 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15615 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15616 : }
15617 : }
15618 : #endif
15619 : }
15620 : resultobj = SWIG_FromCharPtr((const char *)result);
15621 : {
15622 : /* %typemap(freearg) (const char *utf8_path) */
15623 : GDALPythonFreeCStr(arg2, bToFree2);
15624 : }
15625 : {
15626 : /* %typemap(freearg) char **dict */
15627 : CSLDestroy( arg3 );
15628 : }
15629 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15630 : return resultobj;
15631 : fail:
15632 : {
15633 : /* %typemap(freearg) (const char *utf8_path) */
15634 : GDALPythonFreeCStr(arg2, bToFree2);
15635 : }
15636 : {
15637 : /* %typemap(freearg) char **dict */
15638 : CSLDestroy( arg3 );
15639 : }
15640 : return NULL;
15641 : }
15642 :
15643 :
15644 8 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime(PyObject *self, PyObject *args) {
15645 8 : Py_ssize_t argc;
15646 8 : PyObject *argv[4] = {
15647 : 0
15648 : };
15649 :
15650 8 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsISO8601DateTime", 0, 3, argv))) SWIG_fail;
15651 8 : --argc;
15652 8 : if ((argc >= 2) && (argc <= 3)) {
15653 8 : int _v;
15654 8 : void *vptr = 0;
15655 8 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15656 14 : _v = SWIG_CheckState(res);
15657 8 : if (_v) {
15658 8 : {
15659 8 : int res = SWIG_AsVal_int(argv[1], NULL);
15660 8 : _v = SWIG_CheckState(res);
15661 : }
15662 2 : if (_v) {
15663 2 : if (argc <= 2) {
15664 2 : return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(self, argc, argv);
15665 : }
15666 0 : {
15667 : /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
15668 : /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
15669 : /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
15670 : /* (see #4816) */
15671 0 : _v = ((PyMapping_Check(argv[2]) || PySequence_Check(argv[2]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0)) ) ? 1 : 0;
15672 : }
15673 0 : if (_v) {
15674 0 : return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(self, argc, argv);
15675 : }
15676 : }
15677 : }
15678 : }
15679 6 : if ((argc >= 2) && (argc <= 3)) {
15680 6 : int _v;
15681 6 : void *vptr = 0;
15682 6 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15683 6 : _v = SWIG_CheckState(res);
15684 6 : if (_v) {
15685 6 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15686 6 : _v = SWIG_CheckState(res);
15687 6 : if (_v) {
15688 6 : if (argc <= 2) {
15689 6 : return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(self, argc, argv);
15690 : }
15691 0 : {
15692 : /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
15693 : /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
15694 : /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
15695 : /* (see #4816) */
15696 0 : _v = ((PyMapping_Check(argv[2]) || PySequence_Check(argv[2]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0)) ) ? 1 : 0;
15697 : }
15698 0 : if (_v) {
15699 0 : return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(self, argc, argv);
15700 : }
15701 : }
15702 : }
15703 : }
15704 :
15705 0 : fail:
15706 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsISO8601DateTime'.\n"
15707 : " Possible C/C++ prototypes are:\n"
15708 : " OGRFeatureShadow::GetFieldAsISO8601DateTime(int,char **)\n"
15709 : " OGRFeatureShadow::GetFieldAsISO8601DateTime(char const *,char **)\n");
15710 : return 0;
15711 : }
15712 :
15713 :
15714 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15715 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15716 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15717 : int arg2 ;
15718 : void *argp1 = 0 ;
15719 : int res1 = 0 ;
15720 : int val2 ;
15721 : int ecode2 = 0 ;
15722 : int result;
15723 :
15724 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15725 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15726 : if (!SWIG_IsOK(res1)) {
15727 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15728 : }
15729 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15730 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15731 : if (!SWIG_IsOK(ecode2)) {
15732 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "int""'");
15733 : }
15734 : arg2 = static_cast< int >(val2);
15735 : {
15736 : const int bLocalUseExceptions = GetUseExceptions();
15737 : if ( bLocalUseExceptions ) {
15738 : pushErrorHandler();
15739 : }
15740 : {
15741 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15742 : result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
15743 : SWIG_PYTHON_THREAD_END_ALLOW;
15744 : }
15745 : if ( bLocalUseExceptions ) {
15746 : popErrorHandler();
15747 : }
15748 : #ifndef SED_HACKS
15749 : if ( bLocalUseExceptions ) {
15750 : CPLErr eclass = CPLGetLastErrorType();
15751 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15752 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15753 : }
15754 : }
15755 : #endif
15756 : }
15757 : resultobj = SWIG_From_int(static_cast< int >(result));
15758 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15759 : return resultobj;
15760 : fail:
15761 : return NULL;
15762 : }
15763 :
15764 :
15765 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15766 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15767 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15768 : char *arg2 = (char *) 0 ;
15769 : void *argp1 = 0 ;
15770 : int res1 = 0 ;
15771 : int bToFree2 = 0 ;
15772 : int result;
15773 :
15774 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15775 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15776 : if (!SWIG_IsOK(res1)) {
15777 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15778 : }
15779 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15780 : {
15781 : /* %typemap(in) (const char *utf8_path) */
15782 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15783 : {
15784 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15785 : }
15786 : else
15787 : {
15788 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15789 :
15790 : }
15791 : if (arg2 == NULL)
15792 : {
15793 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15794 : SWIG_fail;
15795 : }
15796 : }
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_1(arg1,(char const *)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 : {
15821 : /* %typemap(freearg) (const char *utf8_path) */
15822 : GDALPythonFreeCStr(arg2, bToFree2);
15823 : }
15824 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15825 : return resultobj;
15826 : fail:
15827 : {
15828 : /* %typemap(freearg) (const char *utf8_path) */
15829 : GDALPythonFreeCStr(arg2, bToFree2);
15830 : }
15831 : return NULL;
15832 : }
15833 :
15834 :
15835 87704 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger(PyObject *self, PyObject *args) {
15836 87704 : Py_ssize_t argc;
15837 87704 : PyObject *argv[3] = {
15838 : 0
15839 : };
15840 :
15841 87704 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger", 0, 2, argv))) SWIG_fail;
15842 87704 : --argc;
15843 87704 : if (argc == 2) {
15844 87704 : int _v;
15845 87704 : void *vptr = 0;
15846 87704 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15847 87890 : _v = SWIG_CheckState(res);
15848 87704 : if (_v) {
15849 87704 : {
15850 87704 : int res = SWIG_AsVal_int(argv[1], NULL);
15851 87704 : _v = SWIG_CheckState(res);
15852 : }
15853 87518 : if (_v) {
15854 87518 : return _wrap_Feature_GetFieldAsInteger__SWIG_0(self, argc, argv);
15855 : }
15856 : }
15857 : }
15858 186 : if (argc == 2) {
15859 186 : int _v;
15860 186 : void *vptr = 0;
15861 186 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
15862 186 : _v = SWIG_CheckState(res);
15863 186 : if (_v) {
15864 186 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
15865 186 : _v = SWIG_CheckState(res);
15866 186 : if (_v) {
15867 186 : return _wrap_Feature_GetFieldAsInteger__SWIG_1(self, argc, argv);
15868 : }
15869 : }
15870 : }
15871 :
15872 0 : fail:
15873 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsInteger'.\n"
15874 : " Possible C/C++ prototypes are:\n"
15875 : " OGRFeatureShadow::GetFieldAsInteger(int)\n"
15876 : " OGRFeatureShadow::GetFieldAsInteger(char const *)\n");
15877 : return 0;
15878 : }
15879 :
15880 :
15881 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15882 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15883 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15884 : int arg2 ;
15885 : void *argp1 = 0 ;
15886 : int res1 = 0 ;
15887 : int val2 ;
15888 : int ecode2 = 0 ;
15889 : GIntBig result;
15890 :
15891 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15892 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15893 : if (!SWIG_IsOK(res1)) {
15894 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15895 : }
15896 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15897 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
15898 : if (!SWIG_IsOK(ecode2)) {
15899 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger64" "', argument " "2"" of type '" "int""'");
15900 : }
15901 : arg2 = static_cast< int >(val2);
15902 : {
15903 : const int bLocalUseExceptions = GetUseExceptions();
15904 : if ( bLocalUseExceptions ) {
15905 : pushErrorHandler();
15906 : }
15907 : {
15908 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15909 : result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(arg1,arg2);
15910 : SWIG_PYTHON_THREAD_END_ALLOW;
15911 : }
15912 : if ( bLocalUseExceptions ) {
15913 : popErrorHandler();
15914 : }
15915 : #ifndef SED_HACKS
15916 : if ( bLocalUseExceptions ) {
15917 : CPLErr eclass = CPLGetLastErrorType();
15918 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15919 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15920 : }
15921 : }
15922 : #endif
15923 : }
15924 : {
15925 : resultobj = PyLong_FromLongLong(result);
15926 : }
15927 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15928 : return resultobj;
15929 : fail:
15930 : return NULL;
15931 : }
15932 :
15933 :
15934 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
15935 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15936 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
15937 : char *arg2 = (char *) 0 ;
15938 : void *argp1 = 0 ;
15939 : int res1 = 0 ;
15940 : int bToFree2 = 0 ;
15941 : GIntBig result;
15942 :
15943 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
15944 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
15945 : if (!SWIG_IsOK(res1)) {
15946 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
15947 : }
15948 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
15949 : {
15950 : /* %typemap(in) (const char *utf8_path) */
15951 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
15952 : {
15953 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
15954 : }
15955 : else
15956 : {
15957 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
15958 :
15959 : }
15960 : if (arg2 == NULL)
15961 : {
15962 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
15963 : SWIG_fail;
15964 : }
15965 : }
15966 : {
15967 : const int bLocalUseExceptions = GetUseExceptions();
15968 : if ( bLocalUseExceptions ) {
15969 : pushErrorHandler();
15970 : }
15971 : {
15972 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
15973 : result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(arg1,(char const *)arg2);
15974 : SWIG_PYTHON_THREAD_END_ALLOW;
15975 : }
15976 : if ( bLocalUseExceptions ) {
15977 : popErrorHandler();
15978 : }
15979 : #ifndef SED_HACKS
15980 : if ( bLocalUseExceptions ) {
15981 : CPLErr eclass = CPLGetLastErrorType();
15982 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15983 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15984 : }
15985 : }
15986 : #endif
15987 : }
15988 : {
15989 : resultobj = PyLong_FromLongLong(result);
15990 : }
15991 : {
15992 : /* %typemap(freearg) (const char *utf8_path) */
15993 : GDALPythonFreeCStr(arg2, bToFree2);
15994 : }
15995 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
15996 : return resultobj;
15997 : fail:
15998 : {
15999 : /* %typemap(freearg) (const char *utf8_path) */
16000 : GDALPythonFreeCStr(arg2, bToFree2);
16001 : }
16002 : return NULL;
16003 : }
16004 :
16005 :
16006 1405 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64(PyObject *self, PyObject *args) {
16007 1405 : Py_ssize_t argc;
16008 1405 : PyObject *argv[3] = {
16009 : 0
16010 : };
16011 :
16012 1405 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger64", 0, 2, argv))) SWIG_fail;
16013 1405 : --argc;
16014 1405 : if (argc == 2) {
16015 1405 : int _v;
16016 1405 : void *vptr = 0;
16017 1405 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16018 1405 : _v = SWIG_CheckState(res);
16019 1405 : if (_v) {
16020 1405 : {
16021 1405 : int res = SWIG_AsVal_int(argv[1], NULL);
16022 1405 : _v = SWIG_CheckState(res);
16023 : }
16024 1405 : if (_v) {
16025 1405 : return _wrap_Feature_GetFieldAsInteger64__SWIG_0(self, argc, argv);
16026 : }
16027 : }
16028 : }
16029 0 : if (argc == 2) {
16030 0 : int _v;
16031 0 : void *vptr = 0;
16032 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16033 0 : _v = SWIG_CheckState(res);
16034 0 : if (_v) {
16035 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
16036 0 : _v = SWIG_CheckState(res);
16037 0 : if (_v) {
16038 0 : return _wrap_Feature_GetFieldAsInteger64__SWIG_1(self, argc, argv);
16039 : }
16040 : }
16041 : }
16042 :
16043 0 : fail:
16044 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsInteger64'.\n"
16045 : " Possible C/C++ prototypes are:\n"
16046 : " OGRFeatureShadow::GetFieldAsInteger64(int)\n"
16047 : " OGRFeatureShadow::GetFieldAsInteger64(char const *)\n");
16048 : return 0;
16049 : }
16050 :
16051 :
16052 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16053 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16054 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16055 : int arg2 ;
16056 : void *argp1 = 0 ;
16057 : int res1 = 0 ;
16058 : int val2 ;
16059 : int ecode2 = 0 ;
16060 : double result;
16061 :
16062 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16063 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16064 : if (!SWIG_IsOK(res1)) {
16065 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16066 : }
16067 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16068 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16069 : if (!SWIG_IsOK(ecode2)) {
16070 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "int""'");
16071 : }
16072 : arg2 = static_cast< int >(val2);
16073 : {
16074 : const int bLocalUseExceptions = GetUseExceptions();
16075 : if ( bLocalUseExceptions ) {
16076 : pushErrorHandler();
16077 : }
16078 : {
16079 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16080 : result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
16081 : SWIG_PYTHON_THREAD_END_ALLOW;
16082 : }
16083 : if ( bLocalUseExceptions ) {
16084 : popErrorHandler();
16085 : }
16086 : #ifndef SED_HACKS
16087 : if ( bLocalUseExceptions ) {
16088 : CPLErr eclass = CPLGetLastErrorType();
16089 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16090 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16091 : }
16092 : }
16093 : #endif
16094 : }
16095 : resultobj = SWIG_From_double(static_cast< double >(result));
16096 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16097 : return resultobj;
16098 : fail:
16099 : return NULL;
16100 : }
16101 :
16102 :
16103 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16104 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16105 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16106 : char *arg2 = (char *) 0 ;
16107 : void *argp1 = 0 ;
16108 : int res1 = 0 ;
16109 : int bToFree2 = 0 ;
16110 : double result;
16111 :
16112 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16113 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16114 : if (!SWIG_IsOK(res1)) {
16115 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16116 : }
16117 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16118 : {
16119 : /* %typemap(in) (const char *utf8_path) */
16120 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16121 : {
16122 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16123 : }
16124 : else
16125 : {
16126 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16127 :
16128 : }
16129 : if (arg2 == NULL)
16130 : {
16131 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16132 : SWIG_fail;
16133 : }
16134 : }
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_1(arg1,(char const *)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 : {
16159 : /* %typemap(freearg) (const char *utf8_path) */
16160 : GDALPythonFreeCStr(arg2, bToFree2);
16161 : }
16162 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16163 : return resultobj;
16164 : fail:
16165 : {
16166 : /* %typemap(freearg) (const char *utf8_path) */
16167 : GDALPythonFreeCStr(arg2, bToFree2);
16168 : }
16169 : return NULL;
16170 : }
16171 :
16172 :
16173 1780 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble(PyObject *self, PyObject *args) {
16174 1780 : Py_ssize_t argc;
16175 1780 : PyObject *argv[3] = {
16176 : 0
16177 : };
16178 :
16179 1780 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDouble", 0, 2, argv))) SWIG_fail;
16180 1780 : --argc;
16181 1780 : if (argc == 2) {
16182 1780 : int _v;
16183 1780 : void *vptr = 0;
16184 1780 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16185 1797 : _v = SWIG_CheckState(res);
16186 1780 : if (_v) {
16187 1780 : {
16188 1780 : int res = SWIG_AsVal_int(argv[1], NULL);
16189 1780 : _v = SWIG_CheckState(res);
16190 : }
16191 1763 : if (_v) {
16192 1763 : return _wrap_Feature_GetFieldAsDouble__SWIG_0(self, argc, argv);
16193 : }
16194 : }
16195 : }
16196 17 : if (argc == 2) {
16197 17 : int _v;
16198 17 : void *vptr = 0;
16199 17 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16200 17 : _v = SWIG_CheckState(res);
16201 17 : if (_v) {
16202 17 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
16203 17 : _v = SWIG_CheckState(res);
16204 17 : if (_v) {
16205 17 : return _wrap_Feature_GetFieldAsDouble__SWIG_1(self, argc, argv);
16206 : }
16207 : }
16208 : }
16209 :
16210 0 : fail:
16211 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDouble'.\n"
16212 : " Possible C/C++ prototypes are:\n"
16213 : " OGRFeatureShadow::GetFieldAsDouble(int)\n"
16214 : " OGRFeatureShadow::GetFieldAsDouble(char const *)\n");
16215 : return 0;
16216 : }
16217 :
16218 :
16219 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16220 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16221 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16222 : int arg2 ;
16223 : int *arg3 = (int *) 0 ;
16224 : int *arg4 = (int *) 0 ;
16225 : int *arg5 = (int *) 0 ;
16226 : int *arg6 = (int *) 0 ;
16227 : int *arg7 = (int *) 0 ;
16228 : float *arg8 = (float *) 0 ;
16229 : int *arg9 = (int *) 0 ;
16230 : void *argp1 = 0 ;
16231 : int res1 = 0 ;
16232 : int val2 ;
16233 : int ecode2 = 0 ;
16234 : int temp3 ;
16235 : int res3 = SWIG_TMPOBJ ;
16236 : int temp4 ;
16237 : int res4 = SWIG_TMPOBJ ;
16238 : int temp5 ;
16239 : int res5 = SWIG_TMPOBJ ;
16240 : int temp6 ;
16241 : int res6 = SWIG_TMPOBJ ;
16242 : int temp7 ;
16243 : int res7 = SWIG_TMPOBJ ;
16244 : float temp8 ;
16245 : int res8 = SWIG_TMPOBJ ;
16246 : int temp9 ;
16247 : int res9 = SWIG_TMPOBJ ;
16248 :
16249 : arg3 = &temp3;
16250 : arg4 = &temp4;
16251 : arg5 = &temp5;
16252 : arg6 = &temp6;
16253 : arg7 = &temp7;
16254 : arg8 = &temp8;
16255 : arg9 = &temp9;
16256 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16257 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16258 : if (!SWIG_IsOK(res1)) {
16259 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16260 : }
16261 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16262 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16263 : if (!SWIG_IsOK(ecode2)) {
16264 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDateTime" "', argument " "2"" of type '" "int""'");
16265 : }
16266 : arg2 = static_cast< int >(val2);
16267 : {
16268 : const int bLocalUseExceptions = GetUseExceptions();
16269 : if ( bLocalUseExceptions ) {
16270 : pushErrorHandler();
16271 : }
16272 : {
16273 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16274 : OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
16275 : SWIG_PYTHON_THREAD_END_ALLOW;
16276 : }
16277 : if ( bLocalUseExceptions ) {
16278 : popErrorHandler();
16279 : }
16280 : #ifndef SED_HACKS
16281 : if ( bLocalUseExceptions ) {
16282 : CPLErr eclass = CPLGetLastErrorType();
16283 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16284 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16285 : }
16286 : }
16287 : #endif
16288 : }
16289 : resultobj = SWIG_Py_Void();
16290 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
16291 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
16292 : } else {
16293 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16294 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
16295 : }
16296 : if (ReturnSame(SWIG_IsTmpObj(res4))) {
16297 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
16298 : } else {
16299 : int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16300 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
16301 : }
16302 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
16303 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
16304 : } else {
16305 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16306 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
16307 : }
16308 : if (ReturnSame(SWIG_IsTmpObj(res6))) {
16309 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
16310 : } else {
16311 : int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16312 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
16313 : }
16314 : if (ReturnSame(SWIG_IsTmpObj(res7))) {
16315 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
16316 : } else {
16317 : int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16318 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
16319 : }
16320 : if (ReturnSame(SWIG_IsTmpObj(res8))) {
16321 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg8)));
16322 : } else {
16323 : int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16324 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_float, new_flags));
16325 : }
16326 : if (ReturnSame(SWIG_IsTmpObj(res9))) {
16327 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
16328 : } else {
16329 : int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16330 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
16331 : }
16332 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16333 : return resultobj;
16334 : fail:
16335 : return NULL;
16336 : }
16337 :
16338 :
16339 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16340 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16341 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16342 : char *arg2 = (char *) 0 ;
16343 : int *arg3 = (int *) 0 ;
16344 : int *arg4 = (int *) 0 ;
16345 : int *arg5 = (int *) 0 ;
16346 : int *arg6 = (int *) 0 ;
16347 : int *arg7 = (int *) 0 ;
16348 : float *arg8 = (float *) 0 ;
16349 : int *arg9 = (int *) 0 ;
16350 : void *argp1 = 0 ;
16351 : int res1 = 0 ;
16352 : int bToFree2 = 0 ;
16353 : int temp3 ;
16354 : int res3 = SWIG_TMPOBJ ;
16355 : int temp4 ;
16356 : int res4 = SWIG_TMPOBJ ;
16357 : int temp5 ;
16358 : int res5 = SWIG_TMPOBJ ;
16359 : int temp6 ;
16360 : int res6 = SWIG_TMPOBJ ;
16361 : int temp7 ;
16362 : int res7 = SWIG_TMPOBJ ;
16363 : float temp8 ;
16364 : int res8 = SWIG_TMPOBJ ;
16365 : int temp9 ;
16366 : int res9 = SWIG_TMPOBJ ;
16367 :
16368 : arg3 = &temp3;
16369 : arg4 = &temp4;
16370 : arg5 = &temp5;
16371 : arg6 = &temp6;
16372 : arg7 = &temp7;
16373 : arg8 = &temp8;
16374 : arg9 = &temp9;
16375 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16376 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16377 : if (!SWIG_IsOK(res1)) {
16378 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16379 : }
16380 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16381 : {
16382 : /* %typemap(in) (const char *utf8_path) */
16383 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16384 : {
16385 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16386 : }
16387 : else
16388 : {
16389 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16390 :
16391 : }
16392 : if (arg2 == NULL)
16393 : {
16394 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16395 : SWIG_fail;
16396 : }
16397 : }
16398 : {
16399 : const int bLocalUseExceptions = GetUseExceptions();
16400 : if ( bLocalUseExceptions ) {
16401 : pushErrorHandler();
16402 : }
16403 : {
16404 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16405 : OGRFeatureShadow_GetFieldAsDateTime__SWIG_1(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
16406 : SWIG_PYTHON_THREAD_END_ALLOW;
16407 : }
16408 : if ( bLocalUseExceptions ) {
16409 : popErrorHandler();
16410 : }
16411 : #ifndef SED_HACKS
16412 : if ( bLocalUseExceptions ) {
16413 : CPLErr eclass = CPLGetLastErrorType();
16414 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16415 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16416 : }
16417 : }
16418 : #endif
16419 : }
16420 : resultobj = SWIG_Py_Void();
16421 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
16422 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
16423 : } else {
16424 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16425 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
16426 : }
16427 : if (ReturnSame(SWIG_IsTmpObj(res4))) {
16428 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
16429 : } else {
16430 : int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16431 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
16432 : }
16433 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
16434 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
16435 : } else {
16436 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16437 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
16438 : }
16439 : if (ReturnSame(SWIG_IsTmpObj(res6))) {
16440 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
16441 : } else {
16442 : int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16443 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
16444 : }
16445 : if (ReturnSame(SWIG_IsTmpObj(res7))) {
16446 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
16447 : } else {
16448 : int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16449 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
16450 : }
16451 : if (ReturnSame(SWIG_IsTmpObj(res8))) {
16452 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg8)));
16453 : } else {
16454 : int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16455 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_float, new_flags));
16456 : }
16457 : if (ReturnSame(SWIG_IsTmpObj(res9))) {
16458 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
16459 : } else {
16460 : int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
16461 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
16462 : }
16463 : {
16464 : /* %typemap(freearg) (const char *utf8_path) */
16465 : GDALPythonFreeCStr(arg2, bToFree2);
16466 : }
16467 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16468 : return resultobj;
16469 : fail:
16470 : {
16471 : /* %typemap(freearg) (const char *utf8_path) */
16472 : GDALPythonFreeCStr(arg2, bToFree2);
16473 : }
16474 : return NULL;
16475 : }
16476 :
16477 :
16478 86 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime(PyObject *self, PyObject *args) {
16479 86 : Py_ssize_t argc;
16480 86 : PyObject *argv[3] = {
16481 : 0
16482 : };
16483 :
16484 86 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDateTime", 0, 2, argv))) SWIG_fail;
16485 86 : --argc;
16486 86 : if (argc == 2) {
16487 86 : int _v;
16488 86 : void *vptr = 0;
16489 86 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16490 86 : _v = SWIG_CheckState(res);
16491 86 : if (_v) {
16492 86 : {
16493 86 : int res = SWIG_AsVal_int(argv[1], NULL);
16494 86 : _v = SWIG_CheckState(res);
16495 : }
16496 86 : if (_v) {
16497 86 : return _wrap_Feature_GetFieldAsDateTime__SWIG_0(self, argc, argv);
16498 : }
16499 : }
16500 : }
16501 0 : if (argc == 2) {
16502 0 : int _v;
16503 0 : void *vptr = 0;
16504 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16505 0 : _v = SWIG_CheckState(res);
16506 0 : if (_v) {
16507 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
16508 0 : _v = SWIG_CheckState(res);
16509 0 : if (_v) {
16510 0 : return _wrap_Feature_GetFieldAsDateTime__SWIG_1(self, argc, argv);
16511 : }
16512 : }
16513 : }
16514 :
16515 0 : fail:
16516 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDateTime'.\n"
16517 : " Possible C/C++ prototypes are:\n"
16518 : " OGRFeatureShadow::GetFieldAsDateTime(int,int *,int *,int *,int *,int *,float *,int *)\n"
16519 : " OGRFeatureShadow::GetFieldAsDateTime(char const *,int *,int *,int *,int *,int *,float *,int *)\n");
16520 : return 0;
16521 : }
16522 :
16523 :
16524 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16525 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16526 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16527 : int arg2 ;
16528 : int *arg3 = (int *) 0 ;
16529 : int **arg4 = (int **) 0 ;
16530 : void *argp1 = 0 ;
16531 : int res1 = 0 ;
16532 : int val2 ;
16533 : int ecode2 = 0 ;
16534 : int nLen3 = 0 ;
16535 : int *pList3 = NULL ;
16536 :
16537 : {
16538 : /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
16539 : arg3 = &nLen3;
16540 : arg4 = &pList3;
16541 : }
16542 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16543 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16544 : if (!SWIG_IsOK(res1)) {
16545 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16546 : }
16547 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16548 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16549 : if (!SWIG_IsOK(ecode2)) {
16550 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "2"" of type '" "int""'");
16551 : }
16552 : arg2 = static_cast< int >(val2);
16553 : {
16554 : const int bLocalUseExceptions = GetUseExceptions();
16555 : if ( bLocalUseExceptions ) {
16556 : pushErrorHandler();
16557 : }
16558 : {
16559 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16560 : OGRFeatureShadow_GetFieldAsIntegerList__SWIG_0(arg1,arg2,arg3,(int const **)arg4);
16561 : SWIG_PYTHON_THREAD_END_ALLOW;
16562 : }
16563 : if ( bLocalUseExceptions ) {
16564 : popErrorHandler();
16565 : }
16566 : #ifndef SED_HACKS
16567 : if ( bLocalUseExceptions ) {
16568 : CPLErr eclass = CPLGetLastErrorType();
16569 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16570 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16571 : }
16572 : }
16573 : #endif
16574 : }
16575 : resultobj = SWIG_Py_Void();
16576 : {
16577 : /* %typemap(argout) (int *nLen, const int **pList ) */
16578 : Py_DECREF(resultobj);
16579 : PyObject *out = PyList_New( *arg3 );
16580 : if( !out ) {
16581 : SWIG_fail;
16582 : }
16583 : for( int i=0; i<*arg3; i++ ) {
16584 : PyObject *val = PyInt_FromLong( (*arg4)[i] );
16585 : PyList_SetItem( out, i, val );
16586 : }
16587 : resultobj = out;
16588 : }
16589 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16590 : return resultobj;
16591 : fail:
16592 : return NULL;
16593 : }
16594 :
16595 :
16596 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16597 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16598 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16599 : char *arg2 = (char *) 0 ;
16600 : int *arg3 = (int *) 0 ;
16601 : int **arg4 = (int **) 0 ;
16602 : void *argp1 = 0 ;
16603 : int res1 = 0 ;
16604 : int bToFree2 = 0 ;
16605 : int nLen3 = 0 ;
16606 : int *pList3 = NULL ;
16607 :
16608 : {
16609 : /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
16610 : arg3 = &nLen3;
16611 : arg4 = &pList3;
16612 : }
16613 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16614 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16615 : if (!SWIG_IsOK(res1)) {
16616 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16617 : }
16618 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16619 : {
16620 : /* %typemap(in) (const char *utf8_path) */
16621 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16622 : {
16623 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16624 : }
16625 : else
16626 : {
16627 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16628 :
16629 : }
16630 : if (arg2 == NULL)
16631 : {
16632 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16633 : SWIG_fail;
16634 : }
16635 : }
16636 : {
16637 : const int bLocalUseExceptions = GetUseExceptions();
16638 : if ( bLocalUseExceptions ) {
16639 : pushErrorHandler();
16640 : }
16641 : {
16642 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16643 : OGRFeatureShadow_GetFieldAsIntegerList__SWIG_1(arg1,(char const *)arg2,arg3,(int const **)arg4);
16644 : SWIG_PYTHON_THREAD_END_ALLOW;
16645 : }
16646 : if ( bLocalUseExceptions ) {
16647 : popErrorHandler();
16648 : }
16649 : #ifndef SED_HACKS
16650 : if ( bLocalUseExceptions ) {
16651 : CPLErr eclass = CPLGetLastErrorType();
16652 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16653 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16654 : }
16655 : }
16656 : #endif
16657 : }
16658 : resultobj = SWIG_Py_Void();
16659 : {
16660 : /* %typemap(argout) (int *nLen, const int **pList ) */
16661 : Py_DECREF(resultobj);
16662 : PyObject *out = PyList_New( *arg3 );
16663 : if( !out ) {
16664 : SWIG_fail;
16665 : }
16666 : for( int i=0; i<*arg3; i++ ) {
16667 : PyObject *val = PyInt_FromLong( (*arg4)[i] );
16668 : PyList_SetItem( out, i, val );
16669 : }
16670 : resultobj = out;
16671 : }
16672 : {
16673 : /* %typemap(freearg) (const char *utf8_path) */
16674 : GDALPythonFreeCStr(arg2, bToFree2);
16675 : }
16676 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16677 : return resultobj;
16678 : fail:
16679 : {
16680 : /* %typemap(freearg) (const char *utf8_path) */
16681 : GDALPythonFreeCStr(arg2, bToFree2);
16682 : }
16683 : return NULL;
16684 : }
16685 :
16686 :
16687 777 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList(PyObject *self, PyObject *args) {
16688 777 : Py_ssize_t argc;
16689 777 : PyObject *argv[3] = {
16690 : 0
16691 : };
16692 :
16693 777 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsIntegerList", 0, 2, argv))) SWIG_fail;
16694 777 : --argc;
16695 777 : if (argc == 2) {
16696 777 : int _v;
16697 777 : void *vptr = 0;
16698 777 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16699 777 : _v = SWIG_CheckState(res);
16700 777 : if (_v) {
16701 777 : {
16702 777 : int res = SWIG_AsVal_int(argv[1], NULL);
16703 777 : _v = SWIG_CheckState(res);
16704 : }
16705 777 : if (_v) {
16706 777 : return _wrap_Feature_GetFieldAsIntegerList__SWIG_0(self, argc, argv);
16707 : }
16708 : }
16709 : }
16710 0 : if (argc == 2) {
16711 0 : int _v;
16712 0 : void *vptr = 0;
16713 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16714 0 : _v = SWIG_CheckState(res);
16715 0 : if (_v) {
16716 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
16717 0 : _v = SWIG_CheckState(res);
16718 0 : if (_v) {
16719 0 : return _wrap_Feature_GetFieldAsIntegerList__SWIG_1(self, argc, argv);
16720 : }
16721 : }
16722 : }
16723 :
16724 0 : fail:
16725 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsIntegerList'.\n"
16726 : " Possible C/C++ prototypes are:\n"
16727 : " OGRFeatureShadow::GetFieldAsIntegerList(int,int *,int const **)\n"
16728 : " OGRFeatureShadow::GetFieldAsIntegerList(char const *,int *,int const **)\n");
16729 : return 0;
16730 : }
16731 :
16732 :
16733 313 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16734 313 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16735 313 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16736 313 : int arg2 ;
16737 313 : int *arg3 = (int *) 0 ;
16738 313 : GIntBig **arg4 = (GIntBig **) 0 ;
16739 313 : void *argp1 = 0 ;
16740 313 : int res1 = 0 ;
16741 313 : int val2 ;
16742 313 : int ecode2 = 0 ;
16743 313 : int nLen3 = 0 ;
16744 313 : GIntBig *pList3 = NULL ;
16745 313 : PyObject *swig_obj[2] ;
16746 :
16747 313 : {
16748 : /* %typemap(in,numinputs=0) (int *nLen3, const GIntBig **pList3) (int nLen3, GIntBig *pList3) */
16749 313 : arg3 = &nLen3;
16750 313 : arg4 = &pList3;
16751 : }
16752 313 : if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger64List", 2, 2, swig_obj)) SWIG_fail;
16753 313 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16754 313 : if (!SWIG_IsOK(res1)) {
16755 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64List" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16756 : }
16757 313 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16758 313 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16759 313 : if (!SWIG_IsOK(ecode2)) {
16760 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger64List" "', argument " "2"" of type '" "int""'");
16761 : }
16762 313 : arg2 = static_cast< int >(val2);
16763 313 : {
16764 313 : const int bLocalUseExceptions = GetUseExceptions();
16765 313 : if ( bLocalUseExceptions ) {
16766 284 : pushErrorHandler();
16767 : }
16768 313 : {
16769 313 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16770 313 : OGRFeatureShadow_GetFieldAsInteger64List(arg1,arg2,arg3,(GIntBig const **)arg4);
16771 313 : SWIG_PYTHON_THREAD_END_ALLOW;
16772 : }
16773 313 : if ( bLocalUseExceptions ) {
16774 284 : popErrorHandler();
16775 : }
16776 : #ifndef SED_HACKS
16777 : if ( bLocalUseExceptions ) {
16778 : CPLErr eclass = CPLGetLastErrorType();
16779 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16780 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16781 : }
16782 : }
16783 : #endif
16784 : }
16785 313 : resultobj = SWIG_Py_Void();
16786 313 : {
16787 : /* %typemap(argout) (int *nLen, const GIntBig **pList ) */
16788 313 : Py_DECREF(resultobj);
16789 313 : PyObject *out = PyList_New( *arg3 );
16790 313 : if( !out ) {
16791 0 : SWIG_fail;
16792 : }
16793 786 : for( int i=0; i<*arg3; i++ ) {
16794 473 : char szTmp[32];
16795 473 : sprintf(szTmp, CPL_FRMT_GIB, (*arg4)[i]);
16796 473 : PyObject* val;
16797 473 : val = PyLong_FromString(szTmp, NULL, 10);
16798 473 : PyList_SetItem( out, i, val );
16799 : }
16800 313 : resultobj = out;
16801 : }
16802 313 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16803 : return resultobj;
16804 : fail:
16805 : return NULL;
16806 : }
16807 :
16808 :
16809 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16810 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16811 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16812 : int arg2 ;
16813 : int *arg3 = (int *) 0 ;
16814 : double **arg4 = (double **) 0 ;
16815 : void *argp1 = 0 ;
16816 : int res1 = 0 ;
16817 : int val2 ;
16818 : int ecode2 = 0 ;
16819 : int nLen3 = 0 ;
16820 : double *pList3 = NULL ;
16821 :
16822 : {
16823 : /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
16824 : arg3 = &nLen3;
16825 : arg4 = &pList3;
16826 : }
16827 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16828 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16829 : if (!SWIG_IsOK(res1)) {
16830 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16831 : }
16832 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16833 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
16834 : if (!SWIG_IsOK(ecode2)) {
16835 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "2"" of type '" "int""'");
16836 : }
16837 : arg2 = static_cast< int >(val2);
16838 : {
16839 : const int bLocalUseExceptions = GetUseExceptions();
16840 : if ( bLocalUseExceptions ) {
16841 : pushErrorHandler();
16842 : }
16843 : {
16844 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16845 : OGRFeatureShadow_GetFieldAsDoubleList__SWIG_0(arg1,arg2,arg3,(double const **)arg4);
16846 : SWIG_PYTHON_THREAD_END_ALLOW;
16847 : }
16848 : if ( bLocalUseExceptions ) {
16849 : popErrorHandler();
16850 : }
16851 : #ifndef SED_HACKS
16852 : if ( bLocalUseExceptions ) {
16853 : CPLErr eclass = CPLGetLastErrorType();
16854 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16855 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16856 : }
16857 : }
16858 : #endif
16859 : }
16860 : resultobj = SWIG_Py_Void();
16861 : {
16862 : /* %typemap(argout) (int *nLen, const double **pList ) */
16863 : Py_DECREF(resultobj);
16864 : PyObject *out = PyList_New( *arg3 );
16865 : if( !out ) {
16866 : SWIG_fail;
16867 : }
16868 : for( int i=0; i<*arg3; i++ ) {
16869 : PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
16870 : PyList_SetItem( out, i, val );
16871 : }
16872 : resultobj = out;
16873 : }
16874 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16875 : return resultobj;
16876 : fail:
16877 : return NULL;
16878 : }
16879 :
16880 :
16881 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
16882 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16883 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
16884 : char *arg2 = (char *) 0 ;
16885 : int *arg3 = (int *) 0 ;
16886 : double **arg4 = (double **) 0 ;
16887 : void *argp1 = 0 ;
16888 : int res1 = 0 ;
16889 : int bToFree2 = 0 ;
16890 : int nLen3 = 0 ;
16891 : double *pList3 = NULL ;
16892 :
16893 : {
16894 : /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
16895 : arg3 = &nLen3;
16896 : arg4 = &pList3;
16897 : }
16898 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
16899 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
16900 : if (!SWIG_IsOK(res1)) {
16901 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
16902 : }
16903 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
16904 : {
16905 : /* %typemap(in) (const char *utf8_path) */
16906 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
16907 : {
16908 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
16909 : }
16910 : else
16911 : {
16912 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
16913 :
16914 : }
16915 : if (arg2 == NULL)
16916 : {
16917 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
16918 : SWIG_fail;
16919 : }
16920 : }
16921 : {
16922 : const int bLocalUseExceptions = GetUseExceptions();
16923 : if ( bLocalUseExceptions ) {
16924 : pushErrorHandler();
16925 : }
16926 : {
16927 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
16928 : OGRFeatureShadow_GetFieldAsDoubleList__SWIG_1(arg1,(char const *)arg2,arg3,(double const **)arg4);
16929 : SWIG_PYTHON_THREAD_END_ALLOW;
16930 : }
16931 : if ( bLocalUseExceptions ) {
16932 : popErrorHandler();
16933 : }
16934 : #ifndef SED_HACKS
16935 : if ( bLocalUseExceptions ) {
16936 : CPLErr eclass = CPLGetLastErrorType();
16937 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16938 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16939 : }
16940 : }
16941 : #endif
16942 : }
16943 : resultobj = SWIG_Py_Void();
16944 : {
16945 : /* %typemap(argout) (int *nLen, const double **pList ) */
16946 : Py_DECREF(resultobj);
16947 : PyObject *out = PyList_New( *arg3 );
16948 : if( !out ) {
16949 : SWIG_fail;
16950 : }
16951 : for( int i=0; i<*arg3; i++ ) {
16952 : PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
16953 : PyList_SetItem( out, i, val );
16954 : }
16955 : resultobj = out;
16956 : }
16957 : {
16958 : /* %typemap(freearg) (const char *utf8_path) */
16959 : GDALPythonFreeCStr(arg2, bToFree2);
16960 : }
16961 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
16962 : return resultobj;
16963 : fail:
16964 : {
16965 : /* %typemap(freearg) (const char *utf8_path) */
16966 : GDALPythonFreeCStr(arg2, bToFree2);
16967 : }
16968 : return NULL;
16969 : }
16970 :
16971 :
16972 632 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList(PyObject *self, PyObject *args) {
16973 632 : Py_ssize_t argc;
16974 632 : PyObject *argv[3] = {
16975 : 0
16976 : };
16977 :
16978 632 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDoubleList", 0, 2, argv))) SWIG_fail;
16979 632 : --argc;
16980 632 : if (argc == 2) {
16981 632 : int _v;
16982 632 : void *vptr = 0;
16983 632 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16984 632 : _v = SWIG_CheckState(res);
16985 632 : if (_v) {
16986 632 : {
16987 632 : int res = SWIG_AsVal_int(argv[1], NULL);
16988 632 : _v = SWIG_CheckState(res);
16989 : }
16990 632 : if (_v) {
16991 632 : return _wrap_Feature_GetFieldAsDoubleList__SWIG_0(self, argc, argv);
16992 : }
16993 : }
16994 : }
16995 0 : if (argc == 2) {
16996 0 : int _v;
16997 0 : void *vptr = 0;
16998 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
16999 0 : _v = SWIG_CheckState(res);
17000 0 : if (_v) {
17001 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17002 0 : _v = SWIG_CheckState(res);
17003 0 : if (_v) {
17004 0 : return _wrap_Feature_GetFieldAsDoubleList__SWIG_1(self, argc, argv);
17005 : }
17006 : }
17007 : }
17008 :
17009 0 : fail:
17010 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDoubleList'.\n"
17011 : " Possible C/C++ prototypes are:\n"
17012 : " OGRFeatureShadow::GetFieldAsDoubleList(int,int *,double const **)\n"
17013 : " OGRFeatureShadow::GetFieldAsDoubleList(char const *,int *,double const **)\n");
17014 : return 0;
17015 : }
17016 :
17017 :
17018 319 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17019 319 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17020 319 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17021 319 : int arg2 ;
17022 319 : void *argp1 = 0 ;
17023 319 : int res1 = 0 ;
17024 319 : int val2 ;
17025 319 : int ecode2 = 0 ;
17026 319 : PyObject *swig_obj[2] ;
17027 319 : char **result = 0 ;
17028 :
17029 319 : if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsStringList", 2, 2, swig_obj)) SWIG_fail;
17030 319 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17031 319 : if (!SWIG_IsOK(res1)) {
17032 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17033 : }
17034 319 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17035 319 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17036 319 : if (!SWIG_IsOK(ecode2)) {
17037 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsStringList" "', argument " "2"" of type '" "int""'");
17038 : }
17039 319 : arg2 = static_cast< int >(val2);
17040 319 : {
17041 319 : const int bLocalUseExceptions = GetUseExceptions();
17042 319 : if ( bLocalUseExceptions ) {
17043 258 : pushErrorHandler();
17044 : }
17045 319 : {
17046 319 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17047 319 : result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
17048 319 : SWIG_PYTHON_THREAD_END_ALLOW;
17049 : }
17050 319 : if ( bLocalUseExceptions ) {
17051 258 : popErrorHandler();
17052 : }
17053 : #ifndef SED_HACKS
17054 : if ( bLocalUseExceptions ) {
17055 : CPLErr eclass = CPLGetLastErrorType();
17056 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17057 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17058 : }
17059 : }
17060 : #endif
17061 : }
17062 319 : {
17063 : /* %typemap(out) char **options -> ( string ) */
17064 319 : bool bErr = false;
17065 319 : resultobj = CSLToList(result, &bErr);
17066 319 : if( bErr ) {
17067 0 : SWIG_fail;
17068 : }
17069 : }
17070 319 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17071 : return resultobj;
17072 : fail:
17073 : return NULL;
17074 : }
17075 :
17076 :
17077 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17078 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17079 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17080 : int arg2 ;
17081 : int *arg3 = (int *) 0 ;
17082 : char **arg4 = (char **) 0 ;
17083 : void *argp1 = 0 ;
17084 : int res1 = 0 ;
17085 : int val2 ;
17086 : int ecode2 = 0 ;
17087 : int nLen3 = 0 ;
17088 : char *pBuf3 = 0 ;
17089 : OGRErr result;
17090 :
17091 : {
17092 : /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
17093 : arg3 = &nLen3;
17094 : arg4 = &pBuf3;
17095 : }
17096 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17097 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17098 : if (!SWIG_IsOK(res1)) {
17099 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17100 : }
17101 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17102 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17103 : if (!SWIG_IsOK(ecode2)) {
17104 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsBinary" "', argument " "2"" of type '" "int""'");
17105 : }
17106 : arg2 = static_cast< int >(val2);
17107 : {
17108 : const int bLocalUseExceptions = GetUseExceptions();
17109 : if ( bLocalUseExceptions ) {
17110 : pushErrorHandler();
17111 : }
17112 : {
17113 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17114 : result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_0(arg1,arg2,arg3,arg4);
17115 : SWIG_PYTHON_THREAD_END_ALLOW;
17116 : }
17117 : if ( bLocalUseExceptions ) {
17118 : popErrorHandler();
17119 : }
17120 : #ifndef SED_HACKS
17121 : if ( bLocalUseExceptions ) {
17122 : CPLErr eclass = CPLGetLastErrorType();
17123 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17124 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17125 : }
17126 : }
17127 : #endif
17128 : }
17129 : {
17130 : /* %typemap(out) OGRErr */
17131 : if ( result != 0 && GetUseExceptions()) {
17132 : const char* pszMessage = CPLGetLastErrorMsg();
17133 : if( pszMessage[0] != '\0' )
17134 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
17135 : else
17136 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
17137 : SWIG_fail;
17138 : }
17139 : }
17140 : {
17141 : /* %typemap(argout) (int *nLen, char **pBuf ) */
17142 : Py_XDECREF(resultobj);
17143 : resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
17144 : }
17145 : {
17146 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
17147 : VSIFree( *arg4 );
17148 : }
17149 : {
17150 : /* %typemap(ret) OGRErr */
17151 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
17152 : resultobj = PyInt_FromLong( result );
17153 : }
17154 : }
17155 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17156 : return resultobj;
17157 : fail:
17158 : {
17159 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
17160 : VSIFree( *arg4 );
17161 : }
17162 : return NULL;
17163 : }
17164 :
17165 :
17166 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17167 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17168 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17169 : char *arg2 = (char *) 0 ;
17170 : int *arg3 = (int *) 0 ;
17171 : char **arg4 = (char **) 0 ;
17172 : void *argp1 = 0 ;
17173 : int res1 = 0 ;
17174 : int bToFree2 = 0 ;
17175 : int nLen3 = 0 ;
17176 : char *pBuf3 = 0 ;
17177 : OGRErr result;
17178 :
17179 : {
17180 : /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
17181 : arg3 = &nLen3;
17182 : arg4 = &pBuf3;
17183 : }
17184 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17185 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17186 : if (!SWIG_IsOK(res1)) {
17187 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17188 : }
17189 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17190 : {
17191 : /* %typemap(in) (const char *utf8_path) */
17192 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17193 : {
17194 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17195 : }
17196 : else
17197 : {
17198 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17199 :
17200 : }
17201 : if (arg2 == NULL)
17202 : {
17203 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17204 : SWIG_fail;
17205 : }
17206 : }
17207 : {
17208 : const int bLocalUseExceptions = GetUseExceptions();
17209 : if ( bLocalUseExceptions ) {
17210 : pushErrorHandler();
17211 : }
17212 : {
17213 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17214 : result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
17215 : SWIG_PYTHON_THREAD_END_ALLOW;
17216 : }
17217 : if ( bLocalUseExceptions ) {
17218 : popErrorHandler();
17219 : }
17220 : #ifndef SED_HACKS
17221 : if ( bLocalUseExceptions ) {
17222 : CPLErr eclass = CPLGetLastErrorType();
17223 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17224 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17225 : }
17226 : }
17227 : #endif
17228 : }
17229 : {
17230 : /* %typemap(out) OGRErr */
17231 : if ( result != 0 && GetUseExceptions()) {
17232 : const char* pszMessage = CPLGetLastErrorMsg();
17233 : if( pszMessage[0] != '\0' )
17234 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
17235 : else
17236 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
17237 : SWIG_fail;
17238 : }
17239 : }
17240 : {
17241 : /* %typemap(argout) (int *nLen, char **pBuf ) */
17242 : Py_XDECREF(resultobj);
17243 : resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
17244 : }
17245 : {
17246 : /* %typemap(freearg) (const char *utf8_path) */
17247 : GDALPythonFreeCStr(arg2, bToFree2);
17248 : }
17249 : {
17250 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
17251 : VSIFree( *arg4 );
17252 : }
17253 : {
17254 : /* %typemap(ret) OGRErr */
17255 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
17256 : resultobj = PyInt_FromLong( result );
17257 : }
17258 : }
17259 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17260 : return resultobj;
17261 : fail:
17262 : {
17263 : /* %typemap(freearg) (const char *utf8_path) */
17264 : GDALPythonFreeCStr(arg2, bToFree2);
17265 : }
17266 : {
17267 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
17268 : VSIFree( *arg4 );
17269 : }
17270 : return NULL;
17271 : }
17272 :
17273 :
17274 100 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary(PyObject *self, PyObject *args) {
17275 100 : Py_ssize_t argc;
17276 100 : PyObject *argv[3] = {
17277 : 0
17278 : };
17279 :
17280 100 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsBinary", 0, 2, argv))) SWIG_fail;
17281 100 : --argc;
17282 100 : if (argc == 2) {
17283 100 : int _v;
17284 100 : void *vptr = 0;
17285 100 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17286 161 : _v = SWIG_CheckState(res);
17287 100 : if (_v) {
17288 100 : {
17289 100 : int res = SWIG_AsVal_int(argv[1], NULL);
17290 100 : _v = SWIG_CheckState(res);
17291 : }
17292 39 : if (_v) {
17293 39 : return _wrap_Feature_GetFieldAsBinary__SWIG_0(self, argc, argv);
17294 : }
17295 : }
17296 : }
17297 61 : if (argc == 2) {
17298 61 : int _v;
17299 61 : void *vptr = 0;
17300 61 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17301 61 : _v = SWIG_CheckState(res);
17302 61 : if (_v) {
17303 61 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17304 61 : _v = SWIG_CheckState(res);
17305 61 : if (_v) {
17306 61 : return _wrap_Feature_GetFieldAsBinary__SWIG_1(self, argc, argv);
17307 : }
17308 : }
17309 : }
17310 :
17311 0 : fail:
17312 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsBinary'.\n"
17313 : " Possible C/C++ prototypes are:\n"
17314 : " OGRFeatureShadow::GetFieldAsBinary(int,int *,char **)\n"
17315 : " OGRFeatureShadow::GetFieldAsBinary(char const *,int *,char **)\n");
17316 : return 0;
17317 : }
17318 :
17319 :
17320 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17321 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17322 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17323 : int arg2 ;
17324 : void *argp1 = 0 ;
17325 : int res1 = 0 ;
17326 : int val2 ;
17327 : int ecode2 = 0 ;
17328 : bool result;
17329 :
17330 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17331 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17332 : if (!SWIG_IsOK(res1)) {
17333 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17334 : }
17335 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17336 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17337 : if (!SWIG_IsOK(ecode2)) {
17338 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "int""'");
17339 : }
17340 : arg2 = static_cast< int >(val2);
17341 : {
17342 : const int bLocalUseExceptions = GetUseExceptions();
17343 : if ( bLocalUseExceptions ) {
17344 : pushErrorHandler();
17345 : }
17346 : {
17347 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17348 : result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
17349 : SWIG_PYTHON_THREAD_END_ALLOW;
17350 : }
17351 : if ( bLocalUseExceptions ) {
17352 : popErrorHandler();
17353 : }
17354 : #ifndef SED_HACKS
17355 : if ( bLocalUseExceptions ) {
17356 : CPLErr eclass = CPLGetLastErrorType();
17357 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17358 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17359 : }
17360 : }
17361 : #endif
17362 : }
17363 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17364 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17365 : return resultobj;
17366 : fail:
17367 : return NULL;
17368 : }
17369 :
17370 :
17371 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17372 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17373 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17374 : char *arg2 = (char *) 0 ;
17375 : void *argp1 = 0 ;
17376 : int res1 = 0 ;
17377 : int bToFree2 = 0 ;
17378 : bool result;
17379 :
17380 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17381 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17382 : if (!SWIG_IsOK(res1)) {
17383 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17384 : }
17385 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17386 : {
17387 : /* %typemap(in) (const char *utf8_path) */
17388 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17389 : {
17390 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17391 : }
17392 : else
17393 : {
17394 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17395 :
17396 : }
17397 : if (arg2 == NULL)
17398 : {
17399 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17400 : SWIG_fail;
17401 : }
17402 : }
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_1(arg1,(char const *)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 : {
17427 : /* %typemap(freearg) (const char *utf8_path) */
17428 : GDALPythonFreeCStr(arg2, bToFree2);
17429 : }
17430 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17431 : return resultobj;
17432 : fail:
17433 : {
17434 : /* %typemap(freearg) (const char *utf8_path) */
17435 : GDALPythonFreeCStr(arg2, bToFree2);
17436 : }
17437 : return NULL;
17438 : }
17439 :
17440 :
17441 101201 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet(PyObject *self, PyObject *args) {
17442 101201 : Py_ssize_t argc;
17443 101201 : PyObject *argv[3] = {
17444 : 0
17445 : };
17446 :
17447 101201 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldSet", 0, 2, argv))) SWIG_fail;
17448 101201 : --argc;
17449 101201 : if (argc == 2) {
17450 101201 : int _v;
17451 101201 : void *vptr = 0;
17452 101201 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17453 101413 : _v = SWIG_CheckState(res);
17454 101201 : if (_v) {
17455 101201 : {
17456 101201 : int res = SWIG_AsVal_int(argv[1], NULL);
17457 101201 : _v = SWIG_CheckState(res);
17458 : }
17459 100989 : if (_v) {
17460 100989 : return _wrap_Feature_IsFieldSet__SWIG_0(self, argc, argv);
17461 : }
17462 : }
17463 : }
17464 212 : if (argc == 2) {
17465 212 : int _v;
17466 212 : void *vptr = 0;
17467 212 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17468 212 : _v = SWIG_CheckState(res);
17469 212 : if (_v) {
17470 212 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17471 212 : _v = SWIG_CheckState(res);
17472 212 : if (_v) {
17473 212 : return _wrap_Feature_IsFieldSet__SWIG_1(self, argc, argv);
17474 : }
17475 : }
17476 : }
17477 :
17478 0 : fail:
17479 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_IsFieldSet'.\n"
17480 : " Possible C/C++ prototypes are:\n"
17481 : " OGRFeatureShadow::IsFieldSet(int)\n"
17482 : " OGRFeatureShadow::IsFieldSet(char const *)\n");
17483 : return 0;
17484 : }
17485 :
17486 :
17487 : SWIGINTERN PyObject *_wrap_Feature_IsFieldNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17488 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17489 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17490 : int arg2 ;
17491 : void *argp1 = 0 ;
17492 : int res1 = 0 ;
17493 : int val2 ;
17494 : int ecode2 = 0 ;
17495 : bool result;
17496 :
17497 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17498 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17499 : if (!SWIG_IsOK(res1)) {
17500 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17501 : }
17502 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17503 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17504 : if (!SWIG_IsOK(ecode2)) {
17505 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldNull" "', argument " "2"" of type '" "int""'");
17506 : }
17507 : arg2 = static_cast< int >(val2);
17508 : {
17509 : const int bLocalUseExceptions = GetUseExceptions();
17510 : if ( bLocalUseExceptions ) {
17511 : pushErrorHandler();
17512 : }
17513 : {
17514 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17515 : result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_0(arg1,arg2);
17516 : SWIG_PYTHON_THREAD_END_ALLOW;
17517 : }
17518 : if ( bLocalUseExceptions ) {
17519 : popErrorHandler();
17520 : }
17521 : #ifndef SED_HACKS
17522 : if ( bLocalUseExceptions ) {
17523 : CPLErr eclass = CPLGetLastErrorType();
17524 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17525 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17526 : }
17527 : }
17528 : #endif
17529 : }
17530 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17531 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17532 : return resultobj;
17533 : fail:
17534 : return NULL;
17535 : }
17536 :
17537 :
17538 : SWIGINTERN PyObject *_wrap_Feature_IsFieldNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17539 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17540 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17541 : char *arg2 = (char *) 0 ;
17542 : void *argp1 = 0 ;
17543 : int res1 = 0 ;
17544 : int bToFree2 = 0 ;
17545 : bool result;
17546 :
17547 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17548 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17549 : if (!SWIG_IsOK(res1)) {
17550 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17551 : }
17552 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17553 : {
17554 : /* %typemap(in) (const char *utf8_path) */
17555 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17556 : {
17557 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17558 : }
17559 : else
17560 : {
17561 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17562 :
17563 : }
17564 : if (arg2 == NULL)
17565 : {
17566 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17567 : SWIG_fail;
17568 : }
17569 : }
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_1(arg1,(char const *)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 : {
17594 : /* %typemap(freearg) (const char *utf8_path) */
17595 : GDALPythonFreeCStr(arg2, bToFree2);
17596 : }
17597 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17598 : return resultobj;
17599 : fail:
17600 : {
17601 : /* %typemap(freearg) (const char *utf8_path) */
17602 : GDALPythonFreeCStr(arg2, bToFree2);
17603 : }
17604 : return NULL;
17605 : }
17606 :
17607 :
17608 100416 : SWIGINTERN PyObject *_wrap_Feature_IsFieldNull(PyObject *self, PyObject *args) {
17609 100416 : Py_ssize_t argc;
17610 100416 : PyObject *argv[3] = {
17611 : 0
17612 : };
17613 :
17614 100416 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldNull", 0, 2, argv))) SWIG_fail;
17615 100416 : --argc;
17616 100416 : if (argc == 2) {
17617 100416 : int _v;
17618 100416 : void *vptr = 0;
17619 100416 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17620 100472 : _v = SWIG_CheckState(res);
17621 100416 : if (_v) {
17622 100416 : {
17623 100416 : int res = SWIG_AsVal_int(argv[1], NULL);
17624 100416 : _v = SWIG_CheckState(res);
17625 : }
17626 100360 : if (_v) {
17627 100360 : return _wrap_Feature_IsFieldNull__SWIG_0(self, argc, argv);
17628 : }
17629 : }
17630 : }
17631 56 : if (argc == 2) {
17632 56 : int _v;
17633 56 : void *vptr = 0;
17634 56 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17635 56 : _v = SWIG_CheckState(res);
17636 56 : if (_v) {
17637 56 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17638 56 : _v = SWIG_CheckState(res);
17639 56 : if (_v) {
17640 56 : return _wrap_Feature_IsFieldNull__SWIG_1(self, argc, argv);
17641 : }
17642 : }
17643 : }
17644 :
17645 0 : fail:
17646 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_IsFieldNull'.\n"
17647 : " Possible C/C++ prototypes are:\n"
17648 : " OGRFeatureShadow::IsFieldNull(int)\n"
17649 : " OGRFeatureShadow::IsFieldNull(char const *)\n");
17650 : return 0;
17651 : }
17652 :
17653 :
17654 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17655 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17656 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17657 : int arg2 ;
17658 : void *argp1 = 0 ;
17659 : int res1 = 0 ;
17660 : int val2 ;
17661 : int ecode2 = 0 ;
17662 : bool result;
17663 :
17664 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17665 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17666 : if (!SWIG_IsOK(res1)) {
17667 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17668 : }
17669 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17670 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
17671 : if (!SWIG_IsOK(ecode2)) {
17672 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "2"" of type '" "int""'");
17673 : }
17674 : arg2 = static_cast< int >(val2);
17675 : {
17676 : const int bLocalUseExceptions = GetUseExceptions();
17677 : if ( bLocalUseExceptions ) {
17678 : pushErrorHandler();
17679 : }
17680 : {
17681 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17682 : result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(arg1,arg2);
17683 : SWIG_PYTHON_THREAD_END_ALLOW;
17684 : }
17685 : if ( bLocalUseExceptions ) {
17686 : popErrorHandler();
17687 : }
17688 : #ifndef SED_HACKS
17689 : if ( bLocalUseExceptions ) {
17690 : CPLErr eclass = CPLGetLastErrorType();
17691 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17692 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17693 : }
17694 : }
17695 : #endif
17696 : }
17697 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17698 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17699 : return resultobj;
17700 : fail:
17701 : return NULL;
17702 : }
17703 :
17704 :
17705 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17706 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17707 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17708 : char *arg2 = (char *) 0 ;
17709 : void *argp1 = 0 ;
17710 : int res1 = 0 ;
17711 : int bToFree2 = 0 ;
17712 : bool result;
17713 :
17714 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17715 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17716 : if (!SWIG_IsOK(res1)) {
17717 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17718 : }
17719 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17720 : {
17721 : /* %typemap(in) (const char *utf8_path) */
17722 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17723 : {
17724 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17725 : }
17726 : else
17727 : {
17728 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17729 :
17730 : }
17731 : if (arg2 == NULL)
17732 : {
17733 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17734 : SWIG_fail;
17735 : }
17736 : }
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_1(arg1,(char const *)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 : {
17761 : /* %typemap(freearg) (const char *utf8_path) */
17762 : GDALPythonFreeCStr(arg2, bToFree2);
17763 : }
17764 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17765 : return resultobj;
17766 : fail:
17767 : {
17768 : /* %typemap(freearg) (const char *utf8_path) */
17769 : GDALPythonFreeCStr(arg2, bToFree2);
17770 : }
17771 : return NULL;
17772 : }
17773 :
17774 :
17775 826 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull(PyObject *self, PyObject *args) {
17776 826 : Py_ssize_t argc;
17777 826 : PyObject *argv[3] = {
17778 : 0
17779 : };
17780 :
17781 826 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldSetAndNotNull", 0, 2, argv))) SWIG_fail;
17782 826 : --argc;
17783 826 : if (argc == 2) {
17784 826 : int _v;
17785 826 : void *vptr = 0;
17786 826 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17787 878 : _v = SWIG_CheckState(res);
17788 826 : if (_v) {
17789 826 : {
17790 826 : int res = SWIG_AsVal_int(argv[1], NULL);
17791 826 : _v = SWIG_CheckState(res);
17792 : }
17793 774 : if (_v) {
17794 774 : return _wrap_Feature_IsFieldSetAndNotNull__SWIG_0(self, argc, argv);
17795 : }
17796 : }
17797 : }
17798 52 : if (argc == 2) {
17799 52 : int _v;
17800 52 : void *vptr = 0;
17801 52 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
17802 52 : _v = SWIG_CheckState(res);
17803 52 : if (_v) {
17804 52 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
17805 52 : _v = SWIG_CheckState(res);
17806 52 : if (_v) {
17807 52 : return _wrap_Feature_IsFieldSetAndNotNull__SWIG_1(self, argc, argv);
17808 : }
17809 : }
17810 : }
17811 :
17812 0 : fail:
17813 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_IsFieldSetAndNotNull'.\n"
17814 : " Possible C/C++ prototypes are:\n"
17815 : " OGRFeatureShadow::IsFieldSetAndNotNull(int)\n"
17816 : " OGRFeatureShadow::IsFieldSetAndNotNull(char const *)\n");
17817 : return 0;
17818 : }
17819 :
17820 :
17821 302 : SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17822 302 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17823 302 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17824 302 : char *arg2 = (char *) 0 ;
17825 302 : void *argp1 = 0 ;
17826 302 : int res1 = 0 ;
17827 302 : int bToFree2 = 0 ;
17828 302 : PyObject *swig_obj[2] ;
17829 302 : int result;
17830 :
17831 302 : if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldIndex", 2, 2, swig_obj)) SWIG_fail;
17832 302 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17833 302 : if (!SWIG_IsOK(res1)) {
17834 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17835 : }
17836 302 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17837 302 : {
17838 : /* %typemap(in) (const char *utf8_path) */
17839 302 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17840 : {
17841 302 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17842 : }
17843 : else
17844 : {
17845 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17846 :
17847 : }
17848 302 : if (arg2 == NULL)
17849 : {
17850 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17851 0 : SWIG_fail;
17852 : }
17853 : }
17854 302 : {
17855 302 : const int bLocalUseExceptions = GetUseExceptions();
17856 302 : if ( bLocalUseExceptions ) {
17857 72 : pushErrorHandler();
17858 : }
17859 302 : {
17860 302 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17861 302 : result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
17862 302 : SWIG_PYTHON_THREAD_END_ALLOW;
17863 : }
17864 302 : if ( bLocalUseExceptions ) {
17865 72 : popErrorHandler();
17866 : }
17867 : #ifndef SED_HACKS
17868 : if ( bLocalUseExceptions ) {
17869 : CPLErr eclass = CPLGetLastErrorType();
17870 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17871 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17872 : }
17873 : }
17874 : #endif
17875 : }
17876 302 : resultobj = SWIG_From_int(static_cast< int >(result));
17877 302 : {
17878 : /* %typemap(freearg) (const char *utf8_path) */
17879 302 : GDALPythonFreeCStr(arg2, bToFree2);
17880 : }
17881 302 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17882 : return resultobj;
17883 0 : fail:
17884 0 : {
17885 : /* %typemap(freearg) (const char *utf8_path) */
17886 302 : GDALPythonFreeCStr(arg2, bToFree2);
17887 : }
17888 : return NULL;
17889 : }
17890 :
17891 :
17892 72 : SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17893 72 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17894 72 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17895 72 : char *arg2 = (char *) 0 ;
17896 72 : void *argp1 = 0 ;
17897 72 : int res1 = 0 ;
17898 72 : int bToFree2 = 0 ;
17899 72 : PyObject *swig_obj[2] ;
17900 72 : int result;
17901 :
17902 72 : if (!SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldIndex", 2, 2, swig_obj)) SWIG_fail;
17903 72 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17904 72 : if (!SWIG_IsOK(res1)) {
17905 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17906 : }
17907 72 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17908 72 : {
17909 : /* %typemap(in) (const char *utf8_path) */
17910 72 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
17911 : {
17912 72 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
17913 : }
17914 : else
17915 : {
17916 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
17917 :
17918 : }
17919 72 : if (arg2 == NULL)
17920 : {
17921 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
17922 0 : SWIG_fail;
17923 : }
17924 : }
17925 72 : {
17926 72 : const int bLocalUseExceptions = GetUseExceptions();
17927 72 : if ( bLocalUseExceptions ) {
17928 0 : pushErrorHandler();
17929 : }
17930 72 : {
17931 72 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17932 72 : result = (int)OGRFeatureShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
17933 72 : SWIG_PYTHON_THREAD_END_ALLOW;
17934 : }
17935 72 : if ( bLocalUseExceptions ) {
17936 0 : popErrorHandler();
17937 : }
17938 : #ifndef SED_HACKS
17939 : if ( bLocalUseExceptions ) {
17940 : CPLErr eclass = CPLGetLastErrorType();
17941 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17942 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17943 : }
17944 : }
17945 : #endif
17946 : }
17947 72 : resultobj = SWIG_From_int(static_cast< int >(result));
17948 72 : {
17949 : /* %typemap(freearg) (const char *utf8_path) */
17950 72 : GDALPythonFreeCStr(arg2, bToFree2);
17951 : }
17952 72 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
17953 : return resultobj;
17954 0 : fail:
17955 0 : {
17956 : /* %typemap(freearg) (const char *utf8_path) */
17957 72 : GDALPythonFreeCStr(arg2, bToFree2);
17958 : }
17959 : return NULL;
17960 : }
17961 :
17962 :
17963 5175 : SWIGINTERN PyObject *_wrap_Feature_GetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17964 5175 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17965 5175 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
17966 5175 : void *argp1 = 0 ;
17967 5175 : int res1 = 0 ;
17968 5175 : PyObject *swig_obj[1] ;
17969 5175 : GIntBig result;
17970 :
17971 5175 : if (!args) SWIG_fail;
17972 5175 : swig_obj[0] = args;
17973 5175 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
17974 5175 : if (!SWIG_IsOK(res1)) {
17975 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
17976 : }
17977 5175 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
17978 5175 : {
17979 5175 : const int bLocalUseExceptions = GetUseExceptions();
17980 5175 : if ( bLocalUseExceptions ) {
17981 3447 : pushErrorHandler();
17982 : }
17983 5175 : {
17984 5175 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17985 5175 : result = OGRFeatureShadow_GetFID(arg1);
17986 5175 : SWIG_PYTHON_THREAD_END_ALLOW;
17987 : }
17988 5175 : if ( bLocalUseExceptions ) {
17989 3447 : popErrorHandler();
17990 : }
17991 : #ifndef SED_HACKS
17992 : if ( bLocalUseExceptions ) {
17993 : CPLErr eclass = CPLGetLastErrorType();
17994 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17995 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17996 : }
17997 : }
17998 : #endif
17999 : }
18000 5175 : {
18001 5175 : resultobj = PyLong_FromLongLong(result);
18002 : }
18003 5175 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18004 : return resultobj;
18005 : fail:
18006 : return NULL;
18007 : }
18008 :
18009 :
18010 160507 : SWIGINTERN PyObject *_wrap_Feature_SetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18011 160507 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18012 160507 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18013 160507 : GIntBig arg2 ;
18014 160507 : void *argp1 = 0 ;
18015 160507 : int res1 = 0 ;
18016 160507 : PyObject *swig_obj[2] ;
18017 160507 : OGRErr result;
18018 :
18019 160507 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFID", 2, 2, swig_obj)) SWIG_fail;
18020 160507 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18021 160507 : if (!SWIG_IsOK(res1)) {
18022 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18023 : }
18024 160507 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18025 160507 : {
18026 160507 : arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
18027 : }
18028 160507 : {
18029 160507 : const int bLocalUseExceptions = GetUseExceptions();
18030 160507 : if ( bLocalUseExceptions ) {
18031 160061 : pushErrorHandler();
18032 : }
18033 160507 : {
18034 160507 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18035 160507 : result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
18036 160507 : SWIG_PYTHON_THREAD_END_ALLOW;
18037 : }
18038 160507 : if ( bLocalUseExceptions ) {
18039 160061 : popErrorHandler();
18040 : }
18041 : #ifndef SED_HACKS
18042 : if ( bLocalUseExceptions ) {
18043 : CPLErr eclass = CPLGetLastErrorType();
18044 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18045 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18046 : }
18047 : }
18048 : #endif
18049 : }
18050 160507 : {
18051 : /* %typemap(out) OGRErr */
18052 160507 : if ( result != 0 && GetUseExceptions()) {
18053 0 : const char* pszMessage = CPLGetLastErrorMsg();
18054 0 : if( pszMessage[0] != '\0' )
18055 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
18056 : else
18057 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
18058 0 : SWIG_fail;
18059 : }
18060 : }
18061 160507 : {
18062 : /* %typemap(ret) OGRErr */
18063 160507 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
18064 160507 : resultobj = PyInt_FromLong( result );
18065 : }
18066 : }
18067 160507 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18068 : return resultobj;
18069 : fail:
18070 : return NULL;
18071 : }
18072 :
18073 :
18074 1 : SWIGINTERN PyObject *_wrap_Feature_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18075 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18076 1 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18077 1 : void *argp1 = 0 ;
18078 1 : int res1 = 0 ;
18079 1 : PyObject *swig_obj[1] ;
18080 :
18081 1 : if (!args) SWIG_fail;
18082 1 : swig_obj[0] = args;
18083 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18084 1 : if (!SWIG_IsOK(res1)) {
18085 2 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadable" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18086 : }
18087 0 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18088 0 : {
18089 0 : const int bLocalUseExceptions = GetUseExceptions();
18090 0 : if ( bLocalUseExceptions ) {
18091 0 : pushErrorHandler();
18092 : }
18093 0 : {
18094 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18095 0 : OGRFeatureShadow_DumpReadable(arg1);
18096 0 : SWIG_PYTHON_THREAD_END_ALLOW;
18097 : }
18098 0 : if ( bLocalUseExceptions ) {
18099 0 : popErrorHandler();
18100 : }
18101 : #ifndef SED_HACKS
18102 : if ( bLocalUseExceptions ) {
18103 : CPLErr eclass = CPLGetLastErrorType();
18104 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18105 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18106 : }
18107 : }
18108 : #endif
18109 : }
18110 0 : resultobj = SWIG_Py_Void();
18111 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18112 : return resultobj;
18113 : fail:
18114 : return NULL;
18115 : }
18116 :
18117 :
18118 72 : SWIGINTERN PyObject *_wrap_Feature_DumpReadableAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18119 72 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18120 72 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18121 72 : char **arg2 = (char **) NULL ;
18122 72 : void *argp1 = 0 ;
18123 72 : int res1 = 0 ;
18124 72 : PyObject *swig_obj[2] ;
18125 72 : retStringAndCPLFree *result = 0 ;
18126 :
18127 72 : if (!SWIG_Python_UnpackTuple(args, "Feature_DumpReadableAsString", 1, 2, swig_obj)) SWIG_fail;
18128 72 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18129 72 : if (!SWIG_IsOK(res1)) {
18130 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadableAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18131 : }
18132 72 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18133 72 : if (swig_obj[1]) {
18134 3 : {
18135 : /* %typemap(in) char **dict */
18136 3 : arg2 = NULL;
18137 3 : if ( PySequence_Check( swig_obj[1] ) ) {
18138 0 : int bErr = FALSE;
18139 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
18140 0 : if ( bErr )
18141 : {
18142 0 : SWIG_fail;
18143 : }
18144 : }
18145 3 : else if ( PyMapping_Check( swig_obj[1] ) ) {
18146 3 : int bErr = FALSE;
18147 3 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
18148 3 : if ( bErr )
18149 : {
18150 0 : SWIG_fail;
18151 : }
18152 : }
18153 : else {
18154 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
18155 0 : SWIG_fail;
18156 : }
18157 : }
18158 : }
18159 72 : {
18160 72 : const int bLocalUseExceptions = GetUseExceptions();
18161 72 : if ( bLocalUseExceptions ) {
18162 72 : pushErrorHandler();
18163 : }
18164 72 : {
18165 72 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18166 72 : result = (retStringAndCPLFree *)OGRFeatureShadow_DumpReadableAsString(arg1,arg2);
18167 72 : SWIG_PYTHON_THREAD_END_ALLOW;
18168 : }
18169 72 : if ( bLocalUseExceptions ) {
18170 72 : popErrorHandler();
18171 : }
18172 : #ifndef SED_HACKS
18173 : if ( bLocalUseExceptions ) {
18174 : CPLErr eclass = CPLGetLastErrorType();
18175 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18176 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18177 : }
18178 : }
18179 : #endif
18180 : }
18181 72 : {
18182 : /* %typemap(out) (retStringAndCPLFree*) */
18183 72 : Py_XDECREF(resultobj);
18184 72 : if(result)
18185 : {
18186 72 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
18187 72 : CPLFree(result);
18188 : }
18189 : else
18190 : {
18191 0 : resultobj = Py_None;
18192 0 : Py_INCREF(resultobj);
18193 : }
18194 : }
18195 72 : {
18196 : /* %typemap(freearg) char **dict */
18197 72 : CSLDestroy( arg2 );
18198 : }
18199 72 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18200 : return resultobj;
18201 0 : fail:
18202 0 : {
18203 : /* %typemap(freearg) char **dict */
18204 0 : CSLDestroy( arg2 );
18205 : }
18206 : return NULL;
18207 : }
18208 :
18209 :
18210 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18211 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18212 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18213 : int arg2 ;
18214 : void *argp1 = 0 ;
18215 : int res1 = 0 ;
18216 : int val2 ;
18217 : int ecode2 = 0 ;
18218 :
18219 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
18220 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18221 : if (!SWIG_IsOK(res1)) {
18222 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18223 : }
18224 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18225 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18226 : if (!SWIG_IsOK(ecode2)) {
18227 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "int""'");
18228 : }
18229 : arg2 = static_cast< int >(val2);
18230 : {
18231 : const int bLocalUseExceptions = GetUseExceptions();
18232 : if ( bLocalUseExceptions ) {
18233 : pushErrorHandler();
18234 : }
18235 : {
18236 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18237 : OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
18238 : SWIG_PYTHON_THREAD_END_ALLOW;
18239 : }
18240 : if ( bLocalUseExceptions ) {
18241 : popErrorHandler();
18242 : }
18243 : #ifndef SED_HACKS
18244 : if ( bLocalUseExceptions ) {
18245 : CPLErr eclass = CPLGetLastErrorType();
18246 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18247 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18248 : }
18249 : }
18250 : #endif
18251 : }
18252 : resultobj = SWIG_Py_Void();
18253 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18254 : return resultobj;
18255 : fail:
18256 : return NULL;
18257 : }
18258 :
18259 :
18260 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18261 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18262 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18263 : char *arg2 = (char *) 0 ;
18264 : void *argp1 = 0 ;
18265 : int res1 = 0 ;
18266 : int bToFree2 = 0 ;
18267 :
18268 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
18269 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18270 : if (!SWIG_IsOK(res1)) {
18271 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18272 : }
18273 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18274 : {
18275 : /* %typemap(in) (const char *utf8_path) */
18276 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
18277 : {
18278 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
18279 : }
18280 : else
18281 : {
18282 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
18283 :
18284 : }
18285 : if (arg2 == NULL)
18286 : {
18287 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
18288 : SWIG_fail;
18289 : }
18290 : }
18291 : {
18292 : const int bLocalUseExceptions = GetUseExceptions();
18293 : if ( bLocalUseExceptions ) {
18294 : pushErrorHandler();
18295 : }
18296 : {
18297 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18298 : OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
18299 : SWIG_PYTHON_THREAD_END_ALLOW;
18300 : }
18301 : if ( bLocalUseExceptions ) {
18302 : popErrorHandler();
18303 : }
18304 : #ifndef SED_HACKS
18305 : if ( bLocalUseExceptions ) {
18306 : CPLErr eclass = CPLGetLastErrorType();
18307 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18308 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18309 : }
18310 : }
18311 : #endif
18312 : }
18313 : resultobj = SWIG_Py_Void();
18314 : {
18315 : /* %typemap(freearg) (const char *utf8_path) */
18316 : GDALPythonFreeCStr(arg2, bToFree2);
18317 : }
18318 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18319 : return resultobj;
18320 : fail:
18321 : {
18322 : /* %typemap(freearg) (const char *utf8_path) */
18323 : GDALPythonFreeCStr(arg2, bToFree2);
18324 : }
18325 : return NULL;
18326 : }
18327 :
18328 :
18329 5 : SWIGINTERN PyObject *_wrap_Feature_UnsetField(PyObject *self, PyObject *args) {
18330 5 : Py_ssize_t argc;
18331 5 : PyObject *argv[3] = {
18332 : 0
18333 : };
18334 :
18335 5 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_UnsetField", 0, 2, argv))) SWIG_fail;
18336 5 : --argc;
18337 5 : if (argc == 2) {
18338 5 : int _v;
18339 5 : void *vptr = 0;
18340 5 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
18341 9 : _v = SWIG_CheckState(res);
18342 5 : if (_v) {
18343 5 : {
18344 5 : int res = SWIG_AsVal_int(argv[1], NULL);
18345 5 : _v = SWIG_CheckState(res);
18346 : }
18347 1 : if (_v) {
18348 1 : return _wrap_Feature_UnsetField__SWIG_0(self, argc, argv);
18349 : }
18350 : }
18351 : }
18352 4 : if (argc == 2) {
18353 4 : int _v;
18354 4 : void *vptr = 0;
18355 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
18356 4 : _v = SWIG_CheckState(res);
18357 4 : if (_v) {
18358 4 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
18359 4 : _v = SWIG_CheckState(res);
18360 4 : if (_v) {
18361 4 : return _wrap_Feature_UnsetField__SWIG_1(self, argc, argv);
18362 : }
18363 : }
18364 : }
18365 :
18366 0 : fail:
18367 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_UnsetField'.\n"
18368 : " Possible C/C++ prototypes are:\n"
18369 : " OGRFeatureShadow::UnsetField(int)\n"
18370 : " OGRFeatureShadow::UnsetField(char const *)\n");
18371 : return 0;
18372 : }
18373 :
18374 :
18375 : SWIGINTERN PyObject *_wrap_Feature_SetFieldNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18376 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18377 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18378 : int arg2 ;
18379 : void *argp1 = 0 ;
18380 : int res1 = 0 ;
18381 : int val2 ;
18382 : int ecode2 = 0 ;
18383 :
18384 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
18385 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18386 : if (!SWIG_IsOK(res1)) {
18387 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18388 : }
18389 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18390 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18391 : if (!SWIG_IsOK(ecode2)) {
18392 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldNull" "', argument " "2"" of type '" "int""'");
18393 : }
18394 : arg2 = static_cast< int >(val2);
18395 : {
18396 : const int bLocalUseExceptions = GetUseExceptions();
18397 : if ( bLocalUseExceptions ) {
18398 : pushErrorHandler();
18399 : }
18400 : {
18401 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18402 : OGRFeatureShadow_SetFieldNull__SWIG_0(arg1,arg2);
18403 : SWIG_PYTHON_THREAD_END_ALLOW;
18404 : }
18405 : if ( bLocalUseExceptions ) {
18406 : popErrorHandler();
18407 : }
18408 : #ifndef SED_HACKS
18409 : if ( bLocalUseExceptions ) {
18410 : CPLErr eclass = CPLGetLastErrorType();
18411 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18412 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18413 : }
18414 : }
18415 : #endif
18416 : }
18417 : resultobj = SWIG_Py_Void();
18418 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18419 : return resultobj;
18420 : fail:
18421 : return NULL;
18422 : }
18423 :
18424 :
18425 : SWIGINTERN PyObject *_wrap_Feature_SetFieldNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18426 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18427 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18428 : char *arg2 = (char *) 0 ;
18429 : void *argp1 = 0 ;
18430 : int res1 = 0 ;
18431 : int bToFree2 = 0 ;
18432 :
18433 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
18434 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18435 : if (!SWIG_IsOK(res1)) {
18436 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18437 : }
18438 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18439 : {
18440 : /* %typemap(in) (const char *utf8_path) */
18441 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
18442 : {
18443 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
18444 : }
18445 : else
18446 : {
18447 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
18448 :
18449 : }
18450 : if (arg2 == NULL)
18451 : {
18452 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
18453 : SWIG_fail;
18454 : }
18455 : }
18456 : {
18457 : const int bLocalUseExceptions = GetUseExceptions();
18458 : if ( bLocalUseExceptions ) {
18459 : pushErrorHandler();
18460 : }
18461 : {
18462 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18463 : OGRFeatureShadow_SetFieldNull__SWIG_1(arg1,(char const *)arg2);
18464 : SWIG_PYTHON_THREAD_END_ALLOW;
18465 : }
18466 : if ( bLocalUseExceptions ) {
18467 : popErrorHandler();
18468 : }
18469 : #ifndef SED_HACKS
18470 : if ( bLocalUseExceptions ) {
18471 : CPLErr eclass = CPLGetLastErrorType();
18472 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18473 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18474 : }
18475 : }
18476 : #endif
18477 : }
18478 : resultobj = SWIG_Py_Void();
18479 : {
18480 : /* %typemap(freearg) (const char *utf8_path) */
18481 : GDALPythonFreeCStr(arg2, bToFree2);
18482 : }
18483 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18484 : return resultobj;
18485 : fail:
18486 : {
18487 : /* %typemap(freearg) (const char *utf8_path) */
18488 : GDALPythonFreeCStr(arg2, bToFree2);
18489 : }
18490 : return NULL;
18491 : }
18492 :
18493 :
18494 44 : SWIGINTERN PyObject *_wrap_Feature_SetFieldNull(PyObject *self, PyObject *args) {
18495 44 : Py_ssize_t argc;
18496 44 : PyObject *argv[3] = {
18497 : 0
18498 : };
18499 :
18500 44 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetFieldNull", 0, 2, argv))) SWIG_fail;
18501 44 : --argc;
18502 44 : if (argc == 2) {
18503 44 : int _v;
18504 44 : void *vptr = 0;
18505 44 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
18506 63 : _v = SWIG_CheckState(res);
18507 44 : if (_v) {
18508 44 : {
18509 44 : int res = SWIG_AsVal_int(argv[1], NULL);
18510 44 : _v = SWIG_CheckState(res);
18511 : }
18512 25 : if (_v) {
18513 25 : return _wrap_Feature_SetFieldNull__SWIG_0(self, argc, argv);
18514 : }
18515 : }
18516 : }
18517 19 : if (argc == 2) {
18518 19 : int _v;
18519 19 : void *vptr = 0;
18520 19 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
18521 19 : _v = SWIG_CheckState(res);
18522 19 : if (_v) {
18523 19 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
18524 19 : _v = SWIG_CheckState(res);
18525 19 : if (_v) {
18526 19 : return _wrap_Feature_SetFieldNull__SWIG_1(self, argc, argv);
18527 : }
18528 : }
18529 : }
18530 :
18531 0 : fail:
18532 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetFieldNull'.\n"
18533 : " Possible C/C++ prototypes are:\n"
18534 : " OGRFeatureShadow::SetFieldNull(int)\n"
18535 : " OGRFeatureShadow::SetFieldNull(char const *)\n");
18536 : return 0;
18537 : }
18538 :
18539 :
18540 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18541 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18542 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18543 : int arg2 ;
18544 : char *arg3 = (char *) 0 ;
18545 : void *argp1 = 0 ;
18546 : int res1 = 0 ;
18547 : int val2 ;
18548 : int ecode2 = 0 ;
18549 : PyObject *str3 = 0 ;
18550 : int bToFree3 = 0 ;
18551 :
18552 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
18553 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18554 : if (!SWIG_IsOK(res1)) {
18555 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18556 : }
18557 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18558 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18559 : if (!SWIG_IsOK(ecode2)) {
18560 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
18561 : }
18562 : arg2 = static_cast< int >(val2);
18563 : {
18564 : /* %typemap(in) (tostring argin) */
18565 : str3 = PyObject_Str( swig_obj[2] );
18566 : if ( str3 == 0 ) {
18567 : PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
18568 : SWIG_fail;
18569 : }
18570 :
18571 : arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
18572 : }
18573 : {
18574 : const int bLocalUseExceptions = GetUseExceptions();
18575 : if ( bLocalUseExceptions ) {
18576 : pushErrorHandler();
18577 : }
18578 : {
18579 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18580 : OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
18581 : SWIG_PYTHON_THREAD_END_ALLOW;
18582 : }
18583 : if ( bLocalUseExceptions ) {
18584 : popErrorHandler();
18585 : }
18586 : #ifndef SED_HACKS
18587 : if ( bLocalUseExceptions ) {
18588 : CPLErr eclass = CPLGetLastErrorType();
18589 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18590 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18591 : }
18592 : }
18593 : #endif
18594 : }
18595 : resultobj = SWIG_Py_Void();
18596 : {
18597 : /* %typemap(freearg) (tostring argin) */
18598 : if ( str3 != NULL)
18599 : {
18600 : Py_DECREF(str3);
18601 : }
18602 : GDALPythonFreeCStr(arg3, bToFree3);
18603 : }
18604 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18605 : return resultobj;
18606 : fail:
18607 : {
18608 : /* %typemap(freearg) (tostring argin) */
18609 : if ( str3 != NULL)
18610 : {
18611 : Py_DECREF(str3);
18612 : }
18613 : GDALPythonFreeCStr(arg3, bToFree3);
18614 : }
18615 : return NULL;
18616 : }
18617 :
18618 :
18619 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18620 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18621 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18622 : char *arg2 = (char *) 0 ;
18623 : char *arg3 = (char *) 0 ;
18624 : void *argp1 = 0 ;
18625 : int res1 = 0 ;
18626 : int bToFree2 = 0 ;
18627 : PyObject *str3 = 0 ;
18628 : int bToFree3 = 0 ;
18629 :
18630 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
18631 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18632 : if (!SWIG_IsOK(res1)) {
18633 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18634 : }
18635 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18636 : {
18637 : /* %typemap(in) (const char *utf8_path) */
18638 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
18639 : {
18640 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
18641 : }
18642 : else
18643 : {
18644 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
18645 :
18646 : }
18647 : if (arg2 == NULL)
18648 : {
18649 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
18650 : SWIG_fail;
18651 : }
18652 : }
18653 : {
18654 : /* %typemap(in) (tostring argin) */
18655 : str3 = PyObject_Str( swig_obj[2] );
18656 : if ( str3 == 0 ) {
18657 : PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
18658 : SWIG_fail;
18659 : }
18660 :
18661 : arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
18662 : }
18663 : {
18664 : const int bLocalUseExceptions = GetUseExceptions();
18665 : if ( bLocalUseExceptions ) {
18666 : pushErrorHandler();
18667 : }
18668 : {
18669 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18670 : OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
18671 : SWIG_PYTHON_THREAD_END_ALLOW;
18672 : }
18673 : if ( bLocalUseExceptions ) {
18674 : popErrorHandler();
18675 : }
18676 : #ifndef SED_HACKS
18677 : if ( bLocalUseExceptions ) {
18678 : CPLErr eclass = CPLGetLastErrorType();
18679 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18680 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18681 : }
18682 : }
18683 : #endif
18684 : }
18685 : resultobj = SWIG_Py_Void();
18686 : {
18687 : /* %typemap(freearg) (const char *utf8_path) */
18688 : GDALPythonFreeCStr(arg2, bToFree2);
18689 : }
18690 : {
18691 : /* %typemap(freearg) (tostring argin) */
18692 : if ( str3 != NULL)
18693 : {
18694 : Py_DECREF(str3);
18695 : }
18696 : GDALPythonFreeCStr(arg3, bToFree3);
18697 : }
18698 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18699 : return resultobj;
18700 : fail:
18701 : {
18702 : /* %typemap(freearg) (const char *utf8_path) */
18703 : GDALPythonFreeCStr(arg2, bToFree2);
18704 : }
18705 : {
18706 : /* %typemap(freearg) (tostring argin) */
18707 : if ( str3 != NULL)
18708 : {
18709 : Py_DECREF(str3);
18710 : }
18711 : GDALPythonFreeCStr(arg3, bToFree3);
18712 : }
18713 : return NULL;
18714 : }
18715 :
18716 :
18717 86764 : SWIGINTERN PyObject *_wrap_Feature_SetFieldInteger64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18718 86764 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18719 86764 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18720 86764 : int arg2 ;
18721 86764 : GIntBig arg3 ;
18722 86764 : void *argp1 = 0 ;
18723 86764 : int res1 = 0 ;
18724 86764 : int val2 ;
18725 86764 : int ecode2 = 0 ;
18726 86764 : PyObject *swig_obj[3] ;
18727 :
18728 86764 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldInteger64", 3, 3, swig_obj)) SWIG_fail;
18729 86764 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18730 86764 : if (!SWIG_IsOK(res1)) {
18731 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18732 : }
18733 86764 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18734 86764 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18735 86764 : if (!SWIG_IsOK(ecode2)) {
18736 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldInteger64" "', argument " "2"" of type '" "int""'");
18737 : }
18738 86764 : arg2 = static_cast< int >(val2);
18739 86764 : {
18740 86764 : arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
18741 : }
18742 86764 : {
18743 86764 : const int bLocalUseExceptions = GetUseExceptions();
18744 86764 : if ( bLocalUseExceptions ) {
18745 1850 : pushErrorHandler();
18746 : }
18747 86764 : {
18748 86764 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18749 86764 : OGRFeatureShadow_SetFieldInteger64(arg1,arg2,arg3);
18750 86764 : SWIG_PYTHON_THREAD_END_ALLOW;
18751 : }
18752 86764 : if ( bLocalUseExceptions ) {
18753 1850 : popErrorHandler();
18754 : }
18755 : #ifndef SED_HACKS
18756 : if ( bLocalUseExceptions ) {
18757 : CPLErr eclass = CPLGetLastErrorType();
18758 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18759 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18760 : }
18761 : }
18762 : #endif
18763 : }
18764 86764 : resultobj = SWIG_Py_Void();
18765 86764 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18766 : return resultobj;
18767 : fail:
18768 : return NULL;
18769 : }
18770 :
18771 :
18772 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18773 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18774 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18775 : int arg2 ;
18776 : double arg3 ;
18777 : void *argp1 = 0 ;
18778 : int res1 = 0 ;
18779 : int val2 ;
18780 : int ecode2 = 0 ;
18781 : double val3 ;
18782 : int ecode3 = 0 ;
18783 :
18784 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
18785 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18786 : if (!SWIG_IsOK(res1)) {
18787 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18788 : }
18789 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18790 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18791 : if (!SWIG_IsOK(ecode2)) {
18792 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
18793 : }
18794 : arg2 = static_cast< int >(val2);
18795 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
18796 : if (!SWIG_IsOK(ecode3)) {
18797 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
18798 : }
18799 : arg3 = static_cast< double >(val3);
18800 : {
18801 : const int bLocalUseExceptions = GetUseExceptions();
18802 : if ( bLocalUseExceptions ) {
18803 : pushErrorHandler();
18804 : }
18805 : {
18806 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18807 : OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
18808 : SWIG_PYTHON_THREAD_END_ALLOW;
18809 : }
18810 : if ( bLocalUseExceptions ) {
18811 : popErrorHandler();
18812 : }
18813 : #ifndef SED_HACKS
18814 : if ( bLocalUseExceptions ) {
18815 : CPLErr eclass = CPLGetLastErrorType();
18816 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18817 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18818 : }
18819 : }
18820 : #endif
18821 : }
18822 : resultobj = SWIG_Py_Void();
18823 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18824 : return resultobj;
18825 : fail:
18826 : return NULL;
18827 : }
18828 :
18829 :
18830 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18831 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18832 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18833 : char *arg2 = (char *) 0 ;
18834 : double arg3 ;
18835 : void *argp1 = 0 ;
18836 : int res1 = 0 ;
18837 : int bToFree2 = 0 ;
18838 : double val3 ;
18839 : int ecode3 = 0 ;
18840 :
18841 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
18842 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18843 : if (!SWIG_IsOK(res1)) {
18844 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18845 : }
18846 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18847 : {
18848 : /* %typemap(in) (const char *utf8_path) */
18849 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
18850 : {
18851 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
18852 : }
18853 : else
18854 : {
18855 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
18856 :
18857 : }
18858 : if (arg2 == NULL)
18859 : {
18860 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
18861 : SWIG_fail;
18862 : }
18863 : }
18864 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
18865 : if (!SWIG_IsOK(ecode3)) {
18866 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
18867 : }
18868 : arg3 = static_cast< double >(val3);
18869 : {
18870 : const int bLocalUseExceptions = GetUseExceptions();
18871 : if ( bLocalUseExceptions ) {
18872 : pushErrorHandler();
18873 : }
18874 : {
18875 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18876 : OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
18877 : SWIG_PYTHON_THREAD_END_ALLOW;
18878 : }
18879 : if ( bLocalUseExceptions ) {
18880 : popErrorHandler();
18881 : }
18882 : #ifndef SED_HACKS
18883 : if ( bLocalUseExceptions ) {
18884 : CPLErr eclass = CPLGetLastErrorType();
18885 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18886 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18887 : }
18888 : }
18889 : #endif
18890 : }
18891 : resultobj = SWIG_Py_Void();
18892 : {
18893 : /* %typemap(freearg) (const char *utf8_path) */
18894 : GDALPythonFreeCStr(arg2, bToFree2);
18895 : }
18896 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
18897 : return resultobj;
18898 : fail:
18899 : {
18900 : /* %typemap(freearg) (const char *utf8_path) */
18901 : GDALPythonFreeCStr(arg2, bToFree2);
18902 : }
18903 : return NULL;
18904 : }
18905 :
18906 :
18907 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_4(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
18908 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18909 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
18910 : int arg2 ;
18911 : int arg3 ;
18912 : int arg4 ;
18913 : int arg5 ;
18914 : int arg6 ;
18915 : int arg7 ;
18916 : float arg8 ;
18917 : int arg9 ;
18918 : void *argp1 = 0 ;
18919 : int res1 = 0 ;
18920 : int val2 ;
18921 : int ecode2 = 0 ;
18922 : int val3 ;
18923 : int ecode3 = 0 ;
18924 : int val4 ;
18925 : int ecode4 = 0 ;
18926 : int val5 ;
18927 : int ecode5 = 0 ;
18928 : int val6 ;
18929 : int ecode6 = 0 ;
18930 : int val7 ;
18931 : int ecode7 = 0 ;
18932 : float val8 ;
18933 : int ecode8 = 0 ;
18934 : int val9 ;
18935 : int ecode9 = 0 ;
18936 :
18937 : if ((nobjs < 9) || (nobjs > 9)) SWIG_fail;
18938 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
18939 : if (!SWIG_IsOK(res1)) {
18940 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
18941 : }
18942 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
18943 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
18944 : if (!SWIG_IsOK(ecode2)) {
18945 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
18946 : }
18947 : arg2 = static_cast< int >(val2);
18948 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
18949 : if (!SWIG_IsOK(ecode3)) {
18950 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
18951 : }
18952 : arg3 = static_cast< int >(val3);
18953 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
18954 : if (!SWIG_IsOK(ecode4)) {
18955 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
18956 : }
18957 : arg4 = static_cast< int >(val4);
18958 : ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
18959 : if (!SWIG_IsOK(ecode5)) {
18960 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
18961 : }
18962 : arg5 = static_cast< int >(val5);
18963 : ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
18964 : if (!SWIG_IsOK(ecode6)) {
18965 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
18966 : }
18967 : arg6 = static_cast< int >(val6);
18968 : ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
18969 : if (!SWIG_IsOK(ecode7)) {
18970 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
18971 : }
18972 : arg7 = static_cast< int >(val7);
18973 : ecode8 = SWIG_AsVal_float(swig_obj[7], &val8);
18974 : if (!SWIG_IsOK(ecode8)) {
18975 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "float""'");
18976 : }
18977 : arg8 = static_cast< float >(val8);
18978 : ecode9 = SWIG_AsVal_int(swig_obj[8], &val9);
18979 : if (!SWIG_IsOK(ecode9)) {
18980 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
18981 : }
18982 : arg9 = static_cast< int >(val9);
18983 : {
18984 : const int bLocalUseExceptions = GetUseExceptions();
18985 : if ( bLocalUseExceptions ) {
18986 : pushErrorHandler();
18987 : }
18988 : {
18989 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18990 : OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
18991 : SWIG_PYTHON_THREAD_END_ALLOW;
18992 : }
18993 : if ( bLocalUseExceptions ) {
18994 : popErrorHandler();
18995 : }
18996 : #ifndef SED_HACKS
18997 : if ( bLocalUseExceptions ) {
18998 : CPLErr eclass = CPLGetLastErrorType();
18999 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19000 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19001 : }
19002 : }
19003 : #endif
19004 : }
19005 : resultobj = SWIG_Py_Void();
19006 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19007 : return resultobj;
19008 : fail:
19009 : return NULL;
19010 : }
19011 :
19012 :
19013 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_5(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
19014 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19015 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19016 : char *arg2 = (char *) 0 ;
19017 : int arg3 ;
19018 : int arg4 ;
19019 : int arg5 ;
19020 : int arg6 ;
19021 : int arg7 ;
19022 : float arg8 ;
19023 : int arg9 ;
19024 : void *argp1 = 0 ;
19025 : int res1 = 0 ;
19026 : int bToFree2 = 0 ;
19027 : int val3 ;
19028 : int ecode3 = 0 ;
19029 : int val4 ;
19030 : int ecode4 = 0 ;
19031 : int val5 ;
19032 : int ecode5 = 0 ;
19033 : int val6 ;
19034 : int ecode6 = 0 ;
19035 : int val7 ;
19036 : int ecode7 = 0 ;
19037 : float val8 ;
19038 : int ecode8 = 0 ;
19039 : int val9 ;
19040 : int ecode9 = 0 ;
19041 :
19042 : if ((nobjs < 9) || (nobjs > 9)) SWIG_fail;
19043 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19044 : if (!SWIG_IsOK(res1)) {
19045 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19046 : }
19047 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19048 : {
19049 : /* %typemap(in) (const char *utf8_path) */
19050 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
19051 : {
19052 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
19053 : }
19054 : else
19055 : {
19056 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
19057 :
19058 : }
19059 : if (arg2 == NULL)
19060 : {
19061 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19062 : SWIG_fail;
19063 : }
19064 : }
19065 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
19066 : if (!SWIG_IsOK(ecode3)) {
19067 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
19068 : }
19069 : arg3 = static_cast< int >(val3);
19070 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
19071 : if (!SWIG_IsOK(ecode4)) {
19072 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
19073 : }
19074 : arg4 = static_cast< int >(val4);
19075 : ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
19076 : if (!SWIG_IsOK(ecode5)) {
19077 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
19078 : }
19079 : arg5 = static_cast< int >(val5);
19080 : ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
19081 : if (!SWIG_IsOK(ecode6)) {
19082 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
19083 : }
19084 : arg6 = static_cast< int >(val6);
19085 : ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
19086 : if (!SWIG_IsOK(ecode7)) {
19087 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
19088 : }
19089 : arg7 = static_cast< int >(val7);
19090 : ecode8 = SWIG_AsVal_float(swig_obj[7], &val8);
19091 : if (!SWIG_IsOK(ecode8)) {
19092 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "float""'");
19093 : }
19094 : arg8 = static_cast< float >(val8);
19095 : ecode9 = SWIG_AsVal_int(swig_obj[8], &val9);
19096 : if (!SWIG_IsOK(ecode9)) {
19097 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
19098 : }
19099 : arg9 = static_cast< int >(val9);
19100 : {
19101 : const int bLocalUseExceptions = GetUseExceptions();
19102 : if ( bLocalUseExceptions ) {
19103 : pushErrorHandler();
19104 : }
19105 : {
19106 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19107 : OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
19108 : SWIG_PYTHON_THREAD_END_ALLOW;
19109 : }
19110 : if ( bLocalUseExceptions ) {
19111 : popErrorHandler();
19112 : }
19113 : #ifndef SED_HACKS
19114 : if ( bLocalUseExceptions ) {
19115 : CPLErr eclass = CPLGetLastErrorType();
19116 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19117 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19118 : }
19119 : }
19120 : #endif
19121 : }
19122 : resultobj = SWIG_Py_Void();
19123 : {
19124 : /* %typemap(freearg) (const char *utf8_path) */
19125 : GDALPythonFreeCStr(arg2, bToFree2);
19126 : }
19127 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19128 : return resultobj;
19129 : fail:
19130 : {
19131 : /* %typemap(freearg) (const char *utf8_path) */
19132 : GDALPythonFreeCStr(arg2, bToFree2);
19133 : }
19134 : return NULL;
19135 : }
19136 :
19137 :
19138 2594 : SWIGINTERN PyObject *_wrap_Feature_SetField(PyObject *self, PyObject *args) {
19139 2594 : Py_ssize_t argc;
19140 2594 : PyObject *argv[10] = {
19141 : 0
19142 : };
19143 :
19144 2594 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetField", 0, 9, argv))) SWIG_fail;
19145 2594 : --argc;
19146 2594 : if (argc == 3) {
19147 2550 : int _v;
19148 2550 : void *vptr = 0;
19149 2550 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19150 4841 : _v = SWIG_CheckState(res);
19151 2550 : if (_v) {
19152 2550 : {
19153 2550 : int res = SWIG_AsVal_int(argv[1], NULL);
19154 2550 : _v = SWIG_CheckState(res);
19155 : }
19156 259 : if (_v) {
19157 259 : {
19158 259 : int res = SWIG_AsVal_double(argv[2], NULL);
19159 259 : _v = SWIG_CheckState(res);
19160 : }
19161 259 : if (_v) {
19162 259 : return _wrap_Feature_SetField__SWIG_2(self, argc, argv);
19163 : }
19164 : }
19165 : }
19166 : }
19167 2335 : if (argc == 3) {
19168 2291 : int _v;
19169 2291 : void *vptr = 0;
19170 2291 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19171 4582 : _v = SWIG_CheckState(res);
19172 2291 : if (_v) {
19173 2291 : {
19174 2291 : int res = SWIG_AsVal_int(argv[1], NULL);
19175 2291 : _v = SWIG_CheckState(res);
19176 : }
19177 0 : if (_v) {
19178 0 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
19179 0 : _v = SWIG_CheckState(res);
19180 0 : if (_v) {
19181 0 : return _wrap_Feature_SetField__SWIG_0(self, argc, argv);
19182 : }
19183 : }
19184 : }
19185 : }
19186 2335 : if (argc == 3) {
19187 2291 : int _v;
19188 2291 : void *vptr = 0;
19189 2291 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19190 2291 : _v = SWIG_CheckState(res);
19191 2291 : if (_v) {
19192 2291 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
19193 2291 : _v = SWIG_CheckState(res);
19194 2291 : if (_v) {
19195 2291 : {
19196 2291 : int res = SWIG_AsVal_double(argv[2], NULL);
19197 2291 : _v = SWIG_CheckState(res);
19198 : }
19199 2291 : if (_v) {
19200 2291 : return _wrap_Feature_SetField__SWIG_3(self, argc, argv);
19201 : }
19202 : }
19203 : }
19204 : }
19205 44 : if (argc == 3) {
19206 0 : int _v;
19207 0 : void *vptr = 0;
19208 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19209 0 : _v = SWIG_CheckState(res);
19210 0 : if (_v) {
19211 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
19212 0 : _v = SWIG_CheckState(res);
19213 0 : if (_v) {
19214 0 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
19215 0 : _v = SWIG_CheckState(res);
19216 0 : if (_v) {
19217 0 : return _wrap_Feature_SetField__SWIG_1(self, argc, argv);
19218 : }
19219 : }
19220 : }
19221 : }
19222 44 : if (argc == 9) {
19223 44 : int _v;
19224 44 : void *vptr = 0;
19225 44 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19226 64 : _v = SWIG_CheckState(res);
19227 44 : if (_v) {
19228 44 : {
19229 44 : int res = SWIG_AsVal_int(argv[1], NULL);
19230 44 : _v = SWIG_CheckState(res);
19231 : }
19232 24 : if (_v) {
19233 24 : {
19234 24 : int res = SWIG_AsVal_int(argv[2], NULL);
19235 24 : _v = SWIG_CheckState(res);
19236 : }
19237 24 : if (_v) {
19238 24 : {
19239 24 : int res = SWIG_AsVal_int(argv[3], NULL);
19240 24 : _v = SWIG_CheckState(res);
19241 : }
19242 24 : if (_v) {
19243 24 : {
19244 24 : int res = SWIG_AsVal_int(argv[4], NULL);
19245 24 : _v = SWIG_CheckState(res);
19246 : }
19247 24 : if (_v) {
19248 24 : {
19249 24 : int res = SWIG_AsVal_int(argv[5], NULL);
19250 24 : _v = SWIG_CheckState(res);
19251 : }
19252 24 : if (_v) {
19253 24 : {
19254 24 : int res = SWIG_AsVal_int(argv[6], NULL);
19255 24 : _v = SWIG_CheckState(res);
19256 : }
19257 24 : if (_v) {
19258 24 : {
19259 24 : int res = SWIG_AsVal_float(argv[7], NULL);
19260 24 : _v = SWIG_CheckState(res);
19261 : }
19262 24 : if (_v) {
19263 24 : {
19264 24 : int res = SWIG_AsVal_int(argv[8], NULL);
19265 24 : _v = SWIG_CheckState(res);
19266 : }
19267 24 : if (_v) {
19268 24 : return _wrap_Feature_SetField__SWIG_4(self, argc, argv);
19269 : }
19270 : }
19271 : }
19272 : }
19273 : }
19274 : }
19275 : }
19276 : }
19277 : }
19278 : }
19279 20 : if (argc == 9) {
19280 20 : int _v;
19281 20 : void *vptr = 0;
19282 20 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19283 20 : _v = SWIG_CheckState(res);
19284 20 : if (_v) {
19285 20 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
19286 20 : _v = SWIG_CheckState(res);
19287 20 : if (_v) {
19288 20 : {
19289 20 : int res = SWIG_AsVal_int(argv[2], NULL);
19290 20 : _v = SWIG_CheckState(res);
19291 : }
19292 20 : if (_v) {
19293 20 : {
19294 20 : int res = SWIG_AsVal_int(argv[3], NULL);
19295 20 : _v = SWIG_CheckState(res);
19296 : }
19297 20 : if (_v) {
19298 20 : {
19299 20 : int res = SWIG_AsVal_int(argv[4], NULL);
19300 20 : _v = SWIG_CheckState(res);
19301 : }
19302 20 : if (_v) {
19303 20 : {
19304 20 : int res = SWIG_AsVal_int(argv[5], NULL);
19305 20 : _v = SWIG_CheckState(res);
19306 : }
19307 20 : if (_v) {
19308 20 : {
19309 20 : int res = SWIG_AsVal_int(argv[6], NULL);
19310 20 : _v = SWIG_CheckState(res);
19311 : }
19312 20 : if (_v) {
19313 20 : {
19314 20 : int res = SWIG_AsVal_float(argv[7], NULL);
19315 20 : _v = SWIG_CheckState(res);
19316 : }
19317 20 : if (_v) {
19318 20 : {
19319 20 : int res = SWIG_AsVal_int(argv[8], NULL);
19320 20 : _v = SWIG_CheckState(res);
19321 : }
19322 20 : if (_v) {
19323 20 : return _wrap_Feature_SetField__SWIG_5(self, argc, argv);
19324 : }
19325 : }
19326 : }
19327 : }
19328 : }
19329 : }
19330 : }
19331 : }
19332 : }
19333 : }
19334 :
19335 0 : fail:
19336 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetField'.\n"
19337 : " Possible C/C++ prototypes are:\n"
19338 : " OGRFeatureShadow::SetField(int,char const *)\n"
19339 : " OGRFeatureShadow::SetField(char const *,char const *)\n"
19340 : " OGRFeatureShadow::SetField(int,double)\n"
19341 : " OGRFeatureShadow::SetField(char const *,double)\n"
19342 : " OGRFeatureShadow::SetField(int,int,int,int,int,int,float,int)\n"
19343 : " OGRFeatureShadow::SetField(char const *,int,int,int,int,int,float,int)\n");
19344 : return 0;
19345 : }
19346 :
19347 :
19348 9 : SWIGINTERN PyObject *_wrap_Feature_SetFieldIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19349 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19350 9 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19351 9 : int arg2 ;
19352 9 : int arg3 ;
19353 9 : int *arg4 = (int *) 0 ;
19354 9 : void *argp1 = 0 ;
19355 9 : int res1 = 0 ;
19356 9 : int val2 ;
19357 9 : int ecode2 = 0 ;
19358 9 : PyObject *swig_obj[3] ;
19359 :
19360 9 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldIntegerList", 3, 3, swig_obj)) SWIG_fail;
19361 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19362 9 : if (!SWIG_IsOK(res1)) {
19363 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19364 : }
19365 9 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19366 9 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19367 9 : if (!SWIG_IsOK(ecode2)) {
19368 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldIntegerList" "', argument " "2"" of type '" "int""'");
19369 : }
19370 9 : arg2 = static_cast< int >(val2);
19371 9 : {
19372 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
19373 9 : arg4 = CreateCIntListFromSequence(swig_obj[2], &arg3);
19374 9 : if( arg3 < 0 ) {
19375 0 : SWIG_fail;
19376 : }
19377 : }
19378 9 : {
19379 9 : const int bLocalUseExceptions = GetUseExceptions();
19380 9 : if ( bLocalUseExceptions ) {
19381 5 : pushErrorHandler();
19382 : }
19383 9 : {
19384 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19385 9 : OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
19386 9 : SWIG_PYTHON_THREAD_END_ALLOW;
19387 : }
19388 9 : if ( bLocalUseExceptions ) {
19389 5 : popErrorHandler();
19390 : }
19391 : #ifndef SED_HACKS
19392 : if ( bLocalUseExceptions ) {
19393 : CPLErr eclass = CPLGetLastErrorType();
19394 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19395 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19396 : }
19397 : }
19398 : #endif
19399 : }
19400 9 : resultobj = SWIG_Py_Void();
19401 9 : {
19402 : /* %typemap(freearg) (int nList, int* pList) */
19403 9 : free(arg4);
19404 : }
19405 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19406 : return resultobj;
19407 0 : fail:
19408 0 : {
19409 : /* %typemap(freearg) (int nList, int* pList) */
19410 0 : free(arg4);
19411 : }
19412 0 : return NULL;
19413 : }
19414 :
19415 :
19416 112 : SWIGINTERN PyObject *_wrap_Feature_SetFieldInteger64List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19417 112 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19418 112 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19419 112 : int arg2 ;
19420 112 : int arg3 ;
19421 112 : GIntBig *arg4 = (GIntBig *) 0 ;
19422 112 : void *argp1 = 0 ;
19423 112 : int res1 = 0 ;
19424 112 : int val2 ;
19425 112 : int ecode2 = 0 ;
19426 112 : PyObject *swig_obj[3] ;
19427 :
19428 112 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldInteger64List", 3, 3, swig_obj)) SWIG_fail;
19429 112 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19430 112 : if (!SWIG_IsOK(res1)) {
19431 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldInteger64List" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19432 : }
19433 112 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19434 112 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19435 112 : if (!SWIG_IsOK(ecode2)) {
19436 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldInteger64List" "', argument " "2"" of type '" "int""'");
19437 : }
19438 112 : arg2 = static_cast< int >(val2);
19439 112 : {
19440 : /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
19441 112 : arg4 = CreateCGIntBigListFromSequence(swig_obj[2], &arg3);
19442 112 : if( arg3 < 0 ) {
19443 0 : SWIG_fail;
19444 : }
19445 : }
19446 112 : {
19447 112 : const int bLocalUseExceptions = GetUseExceptions();
19448 112 : if ( bLocalUseExceptions ) {
19449 104 : pushErrorHandler();
19450 : }
19451 112 : {
19452 112 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19453 112 : OGRFeatureShadow_SetFieldInteger64List(arg1,arg2,arg3,arg4);
19454 112 : SWIG_PYTHON_THREAD_END_ALLOW;
19455 : }
19456 112 : if ( bLocalUseExceptions ) {
19457 104 : popErrorHandler();
19458 : }
19459 : #ifndef SED_HACKS
19460 : if ( bLocalUseExceptions ) {
19461 : CPLErr eclass = CPLGetLastErrorType();
19462 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19463 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19464 : }
19465 : }
19466 : #endif
19467 : }
19468 112 : resultobj = SWIG_Py_Void();
19469 112 : {
19470 : /* %typemap(freearg) (int nList, GIntBig* pList) */
19471 112 : free(arg4);
19472 : }
19473 112 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19474 : return resultobj;
19475 0 : fail:
19476 0 : {
19477 : /* %typemap(freearg) (int nList, GIntBig* pList) */
19478 0 : free(arg4);
19479 : }
19480 0 : return NULL;
19481 : }
19482 :
19483 :
19484 89 : SWIGINTERN PyObject *_wrap_Feature_SetFieldDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19485 89 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19486 89 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19487 89 : int arg2 ;
19488 89 : int arg3 ;
19489 89 : double *arg4 = (double *) 0 ;
19490 89 : void *argp1 = 0 ;
19491 89 : int res1 = 0 ;
19492 89 : int val2 ;
19493 89 : int ecode2 = 0 ;
19494 89 : PyObject *swig_obj[3] ;
19495 :
19496 89 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldDoubleList", 3, 3, swig_obj)) SWIG_fail;
19497 89 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19498 89 : if (!SWIG_IsOK(res1)) {
19499 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19500 : }
19501 89 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19502 89 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19503 89 : if (!SWIG_IsOK(ecode2)) {
19504 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldDoubleList" "', argument " "2"" of type '" "int""'");
19505 : }
19506 89 : arg2 = static_cast< int >(val2);
19507 89 : {
19508 : /* %typemap(in,numinputs=1) (int nList, double* pList)*/
19509 89 : arg4 = CreateCDoubleListFromSequence(swig_obj[2], &arg3);
19510 89 : if( arg3 < 0 ) {
19511 0 : SWIG_fail;
19512 : }
19513 : }
19514 89 : {
19515 89 : const int bLocalUseExceptions = GetUseExceptions();
19516 89 : if ( bLocalUseExceptions ) {
19517 73 : pushErrorHandler();
19518 : }
19519 89 : {
19520 89 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19521 89 : OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
19522 89 : SWIG_PYTHON_THREAD_END_ALLOW;
19523 : }
19524 89 : if ( bLocalUseExceptions ) {
19525 73 : popErrorHandler();
19526 : }
19527 : #ifndef SED_HACKS
19528 : if ( bLocalUseExceptions ) {
19529 : CPLErr eclass = CPLGetLastErrorType();
19530 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19531 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19532 : }
19533 : }
19534 : #endif
19535 : }
19536 89 : resultobj = SWIG_Py_Void();
19537 89 : {
19538 : /* %typemap(freearg) (int nList, double* pList) */
19539 89 : free(arg4);
19540 : }
19541 89 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19542 : return resultobj;
19543 0 : fail:
19544 0 : {
19545 : /* %typemap(freearg) (int nList, double* pList) */
19546 0 : free(arg4);
19547 : }
19548 0 : return NULL;
19549 : }
19550 :
19551 :
19552 41 : SWIGINTERN PyObject *_wrap_Feature_SetFieldStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19553 41 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19554 41 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19555 41 : int arg2 ;
19556 41 : char **arg3 = (char **) 0 ;
19557 41 : void *argp1 = 0 ;
19558 41 : int res1 = 0 ;
19559 41 : int val2 ;
19560 41 : int ecode2 = 0 ;
19561 41 : PyObject *swig_obj[3] ;
19562 :
19563 41 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldStringList", 3, 3, swig_obj)) SWIG_fail;
19564 41 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19565 41 : if (!SWIG_IsOK(res1)) {
19566 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19567 : }
19568 41 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19569 41 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19570 41 : if (!SWIG_IsOK(ecode2)) {
19571 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
19572 : }
19573 41 : arg2 = static_cast< int >(val2);
19574 41 : {
19575 : /* %typemap(in) char **dict */
19576 41 : arg3 = NULL;
19577 41 : if ( PySequence_Check( swig_obj[2] ) ) {
19578 41 : int bErr = FALSE;
19579 41 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
19580 41 : if ( bErr )
19581 : {
19582 0 : SWIG_fail;
19583 : }
19584 : }
19585 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
19586 0 : int bErr = FALSE;
19587 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
19588 0 : if ( bErr )
19589 : {
19590 0 : SWIG_fail;
19591 : }
19592 : }
19593 : else {
19594 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19595 0 : SWIG_fail;
19596 : }
19597 : }
19598 41 : {
19599 41 : const int bLocalUseExceptions = GetUseExceptions();
19600 41 : if ( bLocalUseExceptions ) {
19601 37 : pushErrorHandler();
19602 : }
19603 41 : {
19604 41 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19605 41 : OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
19606 41 : SWIG_PYTHON_THREAD_END_ALLOW;
19607 : }
19608 41 : if ( bLocalUseExceptions ) {
19609 37 : popErrorHandler();
19610 : }
19611 : #ifndef SED_HACKS
19612 : if ( bLocalUseExceptions ) {
19613 : CPLErr eclass = CPLGetLastErrorType();
19614 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19615 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19616 : }
19617 : }
19618 : #endif
19619 : }
19620 41 : resultobj = SWIG_Py_Void();
19621 41 : {
19622 : /* %typemap(freearg) char **dict */
19623 41 : CSLDestroy( arg3 );
19624 : }
19625 41 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19626 : return resultobj;
19627 0 : fail:
19628 0 : {
19629 : /* %typemap(freearg) char **dict */
19630 0 : CSLDestroy( arg3 );
19631 : }
19632 : return NULL;
19633 : }
19634 :
19635 :
19636 1193 : SWIGINTERN PyObject *_wrap_Feature__SetFieldBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19637 1193 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19638 1193 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19639 1193 : int arg2 ;
19640 1193 : int arg3 ;
19641 1193 : char *arg4 = (char *) 0 ;
19642 1193 : void *argp1 = 0 ;
19643 1193 : int res1 = 0 ;
19644 1193 : int val2 ;
19645 1193 : int ecode2 = 0 ;
19646 1193 : int alloc3 = 0 ;
19647 1193 : bool viewIsValid3 = false ;
19648 1193 : Py_buffer view3 ;
19649 1193 : PyObject *swig_obj[3] ;
19650 :
19651 1193 : if (!SWIG_Python_UnpackTuple(args, "Feature__SetFieldBinary", 3, 3, swig_obj)) SWIG_fail;
19652 1193 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19653 1193 : if (!SWIG_IsOK(res1)) {
19654 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature__SetFieldBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19655 : }
19656 1193 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19657 1193 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19658 1193 : if (!SWIG_IsOK(ecode2)) {
19659 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature__SetFieldBinary" "', argument " "2"" of type '" "int""'");
19660 : }
19661 1193 : arg2 = static_cast< int >(val2);
19662 1193 : {
19663 : /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
19664 1193 : char* ptr = NULL;
19665 1193 : if( !GetBufferAsCharPtrIntSize(swig_obj[2], &arg3, &ptr, &alloc3, &viewIsValid3, &view3) ) {
19666 0 : SWIG_fail;
19667 : }
19668 1193 : arg4 = (char *)ptr;
19669 : }
19670 1193 : {
19671 1193 : const int bLocalUseExceptions = GetUseExceptions();
19672 1193 : if ( bLocalUseExceptions ) {
19673 50 : pushErrorHandler();
19674 : }
19675 1193 : {
19676 1193 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19677 1193 : OGRFeatureShadow__SetFieldBinary(arg1,arg2,arg3,arg4);
19678 1193 : SWIG_PYTHON_THREAD_END_ALLOW;
19679 : }
19680 1193 : if ( bLocalUseExceptions ) {
19681 50 : popErrorHandler();
19682 : }
19683 : #ifndef SED_HACKS
19684 : if ( bLocalUseExceptions ) {
19685 : CPLErr eclass = CPLGetLastErrorType();
19686 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19687 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19688 : }
19689 : }
19690 : #endif
19691 : }
19692 1193 : resultobj = SWIG_Py_Void();
19693 1193 : {
19694 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
19695 1193 : if( viewIsValid3 ) {
19696 1193 : PyBuffer_Release(&view3);
19697 : }
19698 0 : else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
19699 0 : delete[] arg4;
19700 : }
19701 : }
19702 1193 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19703 : return resultobj;
19704 0 : fail:
19705 0 : {
19706 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
19707 0 : if( viewIsValid3 ) {
19708 0 : PyBuffer_Release(&view3);
19709 : }
19710 1193 : else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
19711 : delete[] arg4;
19712 : }
19713 : }
19714 : return NULL;
19715 : }
19716 :
19717 :
19718 : SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
19719 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19720 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19721 : int arg2 ;
19722 : char *arg3 = (char *) 0 ;
19723 : void *argp1 = 0 ;
19724 : int res1 = 0 ;
19725 : int val2 ;
19726 : int ecode2 = 0 ;
19727 : int res3 ;
19728 : char *buf3 = 0 ;
19729 : int alloc3 = 0 ;
19730 :
19731 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
19732 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19733 : if (!SWIG_IsOK(res1)) {
19734 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19735 : }
19736 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19737 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
19738 : if (!SWIG_IsOK(ecode2)) {
19739 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "2"" of type '" "int""'");
19740 : }
19741 : arg2 = static_cast< int >(val2);
19742 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
19743 : if (!SWIG_IsOK(res3)) {
19744 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "3"" of type '" "char const *""'");
19745 : }
19746 : arg3 = reinterpret_cast< char * >(buf3);
19747 : {
19748 : const int bLocalUseExceptions = GetUseExceptions();
19749 : if ( bLocalUseExceptions ) {
19750 : pushErrorHandler();
19751 : }
19752 : {
19753 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19754 : OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(arg1,arg2,(char const *)arg3);
19755 : SWIG_PYTHON_THREAD_END_ALLOW;
19756 : }
19757 : if ( bLocalUseExceptions ) {
19758 : popErrorHandler();
19759 : }
19760 : #ifndef SED_HACKS
19761 : if ( bLocalUseExceptions ) {
19762 : CPLErr eclass = CPLGetLastErrorType();
19763 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19764 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19765 : }
19766 : }
19767 : #endif
19768 : }
19769 : resultobj = SWIG_Py_Void();
19770 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
19771 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19772 : return resultobj;
19773 : fail:
19774 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
19775 : return NULL;
19776 : }
19777 :
19778 :
19779 : SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
19780 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19781 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19782 : char *arg2 = (char *) 0 ;
19783 : char *arg3 = (char *) 0 ;
19784 : void *argp1 = 0 ;
19785 : int res1 = 0 ;
19786 : int bToFree2 = 0 ;
19787 : int res3 ;
19788 : char *buf3 = 0 ;
19789 : int alloc3 = 0 ;
19790 :
19791 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
19792 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19793 : if (!SWIG_IsOK(res1)) {
19794 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19795 : }
19796 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19797 : {
19798 : /* %typemap(in) (const char *utf8_path) */
19799 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
19800 : {
19801 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
19802 : }
19803 : else
19804 : {
19805 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
19806 :
19807 : }
19808 : if (arg2 == NULL)
19809 : {
19810 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19811 : SWIG_fail;
19812 : }
19813 : }
19814 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
19815 : if (!SWIG_IsOK(res3)) {
19816 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "3"" of type '" "char const *""'");
19817 : }
19818 : arg3 = reinterpret_cast< char * >(buf3);
19819 : {
19820 : const int bLocalUseExceptions = GetUseExceptions();
19821 : if ( bLocalUseExceptions ) {
19822 : pushErrorHandler();
19823 : }
19824 : {
19825 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19826 : OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
19827 : SWIG_PYTHON_THREAD_END_ALLOW;
19828 : }
19829 : if ( bLocalUseExceptions ) {
19830 : popErrorHandler();
19831 : }
19832 : #ifndef SED_HACKS
19833 : if ( bLocalUseExceptions ) {
19834 : CPLErr eclass = CPLGetLastErrorType();
19835 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19836 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19837 : }
19838 : }
19839 : #endif
19840 : }
19841 : resultobj = SWIG_Py_Void();
19842 : {
19843 : /* %typemap(freearg) (const char *utf8_path) */
19844 : GDALPythonFreeCStr(arg2, bToFree2);
19845 : }
19846 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
19847 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19848 : return resultobj;
19849 : fail:
19850 : {
19851 : /* %typemap(freearg) (const char *utf8_path) */
19852 : GDALPythonFreeCStr(arg2, bToFree2);
19853 : }
19854 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
19855 : return NULL;
19856 : }
19857 :
19858 :
19859 6 : SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString(PyObject *self, PyObject *args) {
19860 6 : Py_ssize_t argc;
19861 6 : PyObject *argv[4] = {
19862 : 0
19863 : };
19864 :
19865 6 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetFieldBinaryFromHexString", 0, 3, argv))) SWIG_fail;
19866 6 : --argc;
19867 6 : if (argc == 3) {
19868 6 : int _v;
19869 6 : void *vptr = 0;
19870 6 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19871 8 : _v = SWIG_CheckState(res);
19872 6 : if (_v) {
19873 6 : {
19874 6 : int res = SWIG_AsVal_int(argv[1], NULL);
19875 6 : _v = SWIG_CheckState(res);
19876 : }
19877 4 : if (_v) {
19878 4 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
19879 4 : _v = SWIG_CheckState(res);
19880 4 : if (_v) {
19881 4 : return _wrap_Feature_SetFieldBinaryFromHexString__SWIG_0(self, argc, argv);
19882 : }
19883 : }
19884 : }
19885 : }
19886 2 : if (argc == 3) {
19887 2 : int _v;
19888 2 : void *vptr = 0;
19889 2 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
19890 2 : _v = SWIG_CheckState(res);
19891 2 : if (_v) {
19892 2 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
19893 2 : _v = SWIG_CheckState(res);
19894 2 : if (_v) {
19895 2 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
19896 2 : _v = SWIG_CheckState(res);
19897 2 : if (_v) {
19898 2 : return _wrap_Feature_SetFieldBinaryFromHexString__SWIG_1(self, argc, argv);
19899 : }
19900 : }
19901 : }
19902 : }
19903 :
19904 0 : fail:
19905 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_SetFieldBinaryFromHexString'.\n"
19906 : " Possible C/C++ prototypes are:\n"
19907 : " OGRFeatureShadow::SetFieldBinaryFromHexString(int,char const *)\n"
19908 : " OGRFeatureShadow::SetFieldBinaryFromHexString(char const *,char const *)\n");
19909 : return 0;
19910 : }
19911 :
19912 :
19913 1708 : SWIGINTERN PyObject *_wrap_Feature_SetFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
19914 1708 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19915 1708 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
19916 1708 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
19917 1708 : int arg3 = (int) 1 ;
19918 1708 : void *argp1 = 0 ;
19919 1708 : int res1 = 0 ;
19920 1708 : void *argp2 = 0 ;
19921 1708 : int res2 = 0 ;
19922 1708 : int val3 ;
19923 1708 : int ecode3 = 0 ;
19924 1708 : PyObject * obj0 = 0 ;
19925 1708 : PyObject * obj1 = 0 ;
19926 1708 : PyObject * obj2 = 0 ;
19927 1708 : char * kwnames[] = {
19928 : (char *)"self", (char *)"other", (char *)"forgiving", NULL
19929 : };
19930 1708 : OGRErr result;
19931 :
19932 1708 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Feature_SetFrom", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
19933 1708 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19934 1708 : if (!SWIG_IsOK(res1)) {
19935 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFrom" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
19936 : }
19937 1708 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
19938 1708 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
19939 1708 : if (!SWIG_IsOK(res2)) {
19940 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFrom" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
19941 : }
19942 1708 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
19943 1708 : if (obj2) {
19944 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
19945 0 : if (!SWIG_IsOK(ecode3)) {
19946 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFrom" "', argument " "3"" of type '" "int""'");
19947 : }
19948 : arg3 = static_cast< int >(val3);
19949 : }
19950 1708 : {
19951 1708 : if (!arg2) {
19952 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19953 : }
19954 : }
19955 1708 : {
19956 1708 : const int bLocalUseExceptions = GetUseExceptions();
19957 1708 : if ( bLocalUseExceptions ) {
19958 59 : pushErrorHandler();
19959 : }
19960 1708 : {
19961 1708 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
19962 1708 : result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
19963 1708 : SWIG_PYTHON_THREAD_END_ALLOW;
19964 : }
19965 1708 : if ( bLocalUseExceptions ) {
19966 59 : popErrorHandler();
19967 : }
19968 : #ifndef SED_HACKS
19969 : if ( bLocalUseExceptions ) {
19970 : CPLErr eclass = CPLGetLastErrorType();
19971 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19972 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19973 : }
19974 : }
19975 : #endif
19976 : }
19977 1708 : {
19978 : /* %typemap(out) OGRErr */
19979 1708 : if ( result != 0 && GetUseExceptions()) {
19980 0 : const char* pszMessage = CPLGetLastErrorMsg();
19981 0 : if( pszMessage[0] != '\0' )
19982 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
19983 : else
19984 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
19985 0 : SWIG_fail;
19986 : }
19987 : }
19988 1708 : {
19989 : /* %typemap(ret) OGRErr */
19990 1708 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
19991 1708 : resultobj = PyInt_FromLong( result );
19992 : }
19993 : }
19994 1708 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
19995 : return resultobj;
19996 : fail:
19997 : return NULL;
19998 : }
19999 :
20000 :
20001 0 : SWIGINTERN PyObject *_wrap_Feature_SetFromWithMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20002 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20003 0 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20004 0 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
20005 0 : int arg3 ;
20006 0 : int arg4 ;
20007 0 : int *arg5 = (int *) 0 ;
20008 0 : void *argp1 = 0 ;
20009 0 : int res1 = 0 ;
20010 0 : void *argp2 = 0 ;
20011 0 : int res2 = 0 ;
20012 0 : int val3 ;
20013 0 : int ecode3 = 0 ;
20014 0 : PyObject *swig_obj[4] ;
20015 0 : OGRErr result;
20016 :
20017 0 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFromWithMap", 4, 4, swig_obj)) SWIG_fail;
20018 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20019 0 : if (!SWIG_IsOK(res1)) {
20020 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFromWithMap" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20021 : }
20022 0 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20023 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20024 0 : if (!SWIG_IsOK(res2)) {
20025 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFromWithMap" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
20026 : }
20027 0 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
20028 0 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
20029 0 : if (!SWIG_IsOK(ecode3)) {
20030 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFromWithMap" "', argument " "3"" of type '" "int""'");
20031 : }
20032 0 : arg3 = static_cast< int >(val3);
20033 0 : {
20034 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
20035 0 : arg5 = CreateCIntListFromSequence(swig_obj[3], &arg4);
20036 0 : if( arg4 < 0 ) {
20037 0 : SWIG_fail;
20038 : }
20039 : }
20040 0 : {
20041 0 : if (!arg2) {
20042 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
20043 : }
20044 : }
20045 0 : {
20046 0 : const int bLocalUseExceptions = GetUseExceptions();
20047 0 : if ( bLocalUseExceptions ) {
20048 0 : pushErrorHandler();
20049 : }
20050 0 : {
20051 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20052 0 : result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
20053 0 : SWIG_PYTHON_THREAD_END_ALLOW;
20054 : }
20055 0 : if ( bLocalUseExceptions ) {
20056 0 : popErrorHandler();
20057 : }
20058 : #ifndef SED_HACKS
20059 : if ( bLocalUseExceptions ) {
20060 : CPLErr eclass = CPLGetLastErrorType();
20061 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20062 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20063 : }
20064 : }
20065 : #endif
20066 : }
20067 0 : {
20068 : /* %typemap(out) OGRErr */
20069 0 : if ( result != 0 && GetUseExceptions()) {
20070 0 : const char* pszMessage = CPLGetLastErrorMsg();
20071 0 : if( pszMessage[0] != '\0' )
20072 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
20073 : else
20074 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
20075 0 : SWIG_fail;
20076 : }
20077 : }
20078 0 : {
20079 : /* %typemap(freearg) (int nList, int* pList) */
20080 0 : free(arg5);
20081 : }
20082 0 : {
20083 : /* %typemap(ret) OGRErr */
20084 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
20085 0 : resultobj = PyInt_FromLong( result );
20086 : }
20087 : }
20088 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20089 : return resultobj;
20090 0 : fail:
20091 0 : {
20092 : /* %typemap(freearg) (int nList, int* pList) */
20093 0 : free(arg5);
20094 : }
20095 0 : return NULL;
20096 : }
20097 :
20098 :
20099 513 : SWIGINTERN PyObject *_wrap_Feature_GetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20100 513 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20101 513 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20102 513 : void *argp1 = 0 ;
20103 513 : int res1 = 0 ;
20104 513 : PyObject *swig_obj[1] ;
20105 513 : char *result = 0 ;
20106 :
20107 513 : if (!args) SWIG_fail;
20108 513 : swig_obj[0] = args;
20109 513 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20110 513 : if (!SWIG_IsOK(res1)) {
20111 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20112 : }
20113 513 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20114 513 : {
20115 513 : const int bLocalUseExceptions = GetUseExceptions();
20116 513 : if ( bLocalUseExceptions ) {
20117 15 : pushErrorHandler();
20118 : }
20119 513 : {
20120 513 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20121 513 : result = (char *)OGRFeatureShadow_GetStyleString(arg1);
20122 513 : SWIG_PYTHON_THREAD_END_ALLOW;
20123 : }
20124 513 : if ( bLocalUseExceptions ) {
20125 15 : popErrorHandler();
20126 : }
20127 : #ifndef SED_HACKS
20128 : if ( bLocalUseExceptions ) {
20129 : CPLErr eclass = CPLGetLastErrorType();
20130 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20131 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20132 : }
20133 : }
20134 : #endif
20135 : }
20136 513 : resultobj = SWIG_FromCharPtr((const char *)result);
20137 513 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20138 : return resultobj;
20139 : fail:
20140 : return NULL;
20141 : }
20142 :
20143 :
20144 51 : SWIGINTERN PyObject *_wrap_Feature_SetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20145 51 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20146 51 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20147 51 : char *arg2 = (char *) 0 ;
20148 51 : void *argp1 = 0 ;
20149 51 : int res1 = 0 ;
20150 51 : int res2 ;
20151 51 : char *buf2 = 0 ;
20152 51 : int alloc2 = 0 ;
20153 51 : PyObject *swig_obj[2] ;
20154 :
20155 51 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetStyleString", 2, 2, swig_obj)) SWIG_fail;
20156 51 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20157 51 : if (!SWIG_IsOK(res1)) {
20158 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20159 : }
20160 51 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20161 51 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
20162 51 : if (!SWIG_IsOK(res2)) {
20163 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetStyleString" "', argument " "2"" of type '" "char const *""'");
20164 : }
20165 51 : arg2 = reinterpret_cast< char * >(buf2);
20166 51 : {
20167 51 : const int bLocalUseExceptions = GetUseExceptions();
20168 51 : if ( bLocalUseExceptions ) {
20169 26 : pushErrorHandler();
20170 : }
20171 51 : {
20172 51 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20173 51 : OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
20174 51 : SWIG_PYTHON_THREAD_END_ALLOW;
20175 : }
20176 51 : if ( bLocalUseExceptions ) {
20177 26 : popErrorHandler();
20178 : }
20179 : #ifndef SED_HACKS
20180 : if ( bLocalUseExceptions ) {
20181 : CPLErr eclass = CPLGetLastErrorType();
20182 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20183 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20184 : }
20185 : }
20186 : #endif
20187 : }
20188 51 : resultobj = SWIG_Py_Void();
20189 51 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20190 51 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20191 : return resultobj;
20192 0 : fail:
20193 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20194 : return NULL;
20195 : }
20196 :
20197 :
20198 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
20199 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20200 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20201 : int arg2 ;
20202 : void *argp1 = 0 ;
20203 : int res1 = 0 ;
20204 : int val2 ;
20205 : int ecode2 = 0 ;
20206 : OGRFieldType result;
20207 :
20208 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
20209 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20210 : if (!SWIG_IsOK(res1)) {
20211 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20212 : }
20213 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20214 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
20215 : if (!SWIG_IsOK(ecode2)) {
20216 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "int""'");
20217 : }
20218 : arg2 = static_cast< int >(val2);
20219 : {
20220 : const int bLocalUseExceptions = GetUseExceptions();
20221 : if ( bLocalUseExceptions ) {
20222 : pushErrorHandler();
20223 : }
20224 : {
20225 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20226 : result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
20227 : SWIG_PYTHON_THREAD_END_ALLOW;
20228 : }
20229 : if ( bLocalUseExceptions ) {
20230 : popErrorHandler();
20231 : }
20232 : #ifndef SED_HACKS
20233 : if ( bLocalUseExceptions ) {
20234 : CPLErr eclass = CPLGetLastErrorType();
20235 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20236 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20237 : }
20238 : }
20239 : #endif
20240 : }
20241 : resultobj = SWIG_From_int(static_cast< int >(result));
20242 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20243 : return resultobj;
20244 : fail:
20245 : return NULL;
20246 : }
20247 :
20248 :
20249 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
20250 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20251 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20252 : char *arg2 = (char *) 0 ;
20253 : void *argp1 = 0 ;
20254 : int res1 = 0 ;
20255 : int bToFree2 = 0 ;
20256 : OGRFieldType result;
20257 :
20258 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
20259 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20260 : if (!SWIG_IsOK(res1)) {
20261 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20262 : }
20263 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20264 : {
20265 : /* %typemap(in) (const char *utf8_path) */
20266 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
20267 : {
20268 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
20269 : }
20270 : else
20271 : {
20272 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
20273 :
20274 : }
20275 : if (arg2 == NULL)
20276 : {
20277 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
20278 : SWIG_fail;
20279 : }
20280 : }
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_1(arg1,(char const *)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 : {
20305 : /* %typemap(freearg) (const char *utf8_path) */
20306 : GDALPythonFreeCStr(arg2, bToFree2);
20307 : }
20308 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20309 : return resultobj;
20310 : fail:
20311 : {
20312 : /* %typemap(freearg) (const char *utf8_path) */
20313 : GDALPythonFreeCStr(arg2, bToFree2);
20314 : }
20315 : return NULL;
20316 : }
20317 :
20318 :
20319 100759 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType(PyObject *self, PyObject *args) {
20320 100759 : Py_ssize_t argc;
20321 100759 : PyObject *argv[3] = {
20322 : 0
20323 : };
20324 :
20325 100759 : if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldType", 0, 2, argv))) SWIG_fail;
20326 100759 : --argc;
20327 100759 : if (argc == 2) {
20328 100759 : int _v;
20329 100759 : void *vptr = 0;
20330 100759 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
20331 100759 : _v = SWIG_CheckState(res);
20332 100759 : if (_v) {
20333 100759 : {
20334 100759 : int res = SWIG_AsVal_int(argv[1], NULL);
20335 100759 : _v = SWIG_CheckState(res);
20336 : }
20337 100759 : if (_v) {
20338 100759 : return _wrap_Feature_GetFieldType__SWIG_0(self, argc, argv);
20339 : }
20340 : }
20341 : }
20342 0 : if (argc == 2) {
20343 0 : int _v;
20344 0 : void *vptr = 0;
20345 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
20346 0 : _v = SWIG_CheckState(res);
20347 0 : if (_v) {
20348 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
20349 0 : _v = SWIG_CheckState(res);
20350 0 : if (_v) {
20351 0 : return _wrap_Feature_GetFieldType__SWIG_1(self, argc, argv);
20352 : }
20353 : }
20354 : }
20355 :
20356 0 : fail:
20357 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldType'.\n"
20358 : " Possible C/C++ prototypes are:\n"
20359 : " OGRFeatureShadow::GetFieldType(int)\n"
20360 : " OGRFeatureShadow::GetFieldType(char const *)\n");
20361 : return 0;
20362 : }
20363 :
20364 :
20365 10 : SWIGINTERN PyObject *_wrap_Feature_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20366 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20367 10 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20368 10 : int arg2 = (int) OGR_F_VAL_ALL ;
20369 10 : int arg3 = (int) TRUE ;
20370 10 : void *argp1 = 0 ;
20371 10 : int res1 = 0 ;
20372 10 : int val2 ;
20373 10 : int ecode2 = 0 ;
20374 10 : int val3 ;
20375 10 : int ecode3 = 0 ;
20376 10 : PyObject *swig_obj[3] ;
20377 10 : int result;
20378 :
20379 10 : if (!SWIG_Python_UnpackTuple(args, "Feature_Validate", 1, 3, swig_obj)) SWIG_fail;
20380 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20381 10 : if (!SWIG_IsOK(res1)) {
20382 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Validate" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20383 : }
20384 10 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20385 10 : if (swig_obj[1]) {
20386 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
20387 0 : if (!SWIG_IsOK(ecode2)) {
20388 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_Validate" "', argument " "2"" of type '" "int""'");
20389 : }
20390 : arg2 = static_cast< int >(val2);
20391 : }
20392 10 : if (swig_obj[2]) {
20393 0 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
20394 0 : if (!SWIG_IsOK(ecode3)) {
20395 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_Validate" "', argument " "3"" of type '" "int""'");
20396 : }
20397 : arg3 = static_cast< int >(val3);
20398 : }
20399 10 : {
20400 10 : const int bLocalUseExceptions = GetUseExceptions();
20401 10 : if ( bLocalUseExceptions ) {
20402 10 : pushErrorHandler();
20403 : }
20404 10 : {
20405 10 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20406 10 : result = (int)OGRFeatureShadow_Validate(arg1,arg2,arg3);
20407 10 : SWIG_PYTHON_THREAD_END_ALLOW;
20408 : }
20409 10 : if ( bLocalUseExceptions ) {
20410 10 : popErrorHandler();
20411 : }
20412 : #ifndef SED_HACKS
20413 : if ( bLocalUseExceptions ) {
20414 : CPLErr eclass = CPLGetLastErrorType();
20415 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20416 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20417 : }
20418 : }
20419 : #endif
20420 : }
20421 10 : resultobj = SWIG_From_int(static_cast< int >(result));
20422 14 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20423 : return resultobj;
20424 : fail:
20425 : return NULL;
20426 : }
20427 :
20428 :
20429 2 : SWIGINTERN PyObject *_wrap_Feature_FillUnsetWithDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20430 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20431 2 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20432 2 : int arg2 = (int) FALSE ;
20433 2 : char **arg3 = (char **) NULL ;
20434 2 : void *argp1 = 0 ;
20435 2 : int res1 = 0 ;
20436 2 : int val2 ;
20437 2 : int ecode2 = 0 ;
20438 2 : PyObject *swig_obj[3] ;
20439 :
20440 2 : if (!SWIG_Python_UnpackTuple(args, "Feature_FillUnsetWithDefault", 1, 3, swig_obj)) SWIG_fail;
20441 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20442 2 : if (!SWIG_IsOK(res1)) {
20443 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_FillUnsetWithDefault" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20444 : }
20445 2 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20446 2 : if (swig_obj[1]) {
20447 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
20448 0 : if (!SWIG_IsOK(ecode2)) {
20449 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_FillUnsetWithDefault" "', argument " "2"" of type '" "int""'");
20450 : }
20451 : arg2 = static_cast< int >(val2);
20452 : }
20453 2 : if (swig_obj[2]) {
20454 0 : {
20455 : /* %typemap(in) char **dict */
20456 0 : arg3 = NULL;
20457 0 : if ( PySequence_Check( swig_obj[2] ) ) {
20458 0 : int bErr = FALSE;
20459 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
20460 0 : if ( bErr )
20461 : {
20462 0 : SWIG_fail;
20463 : }
20464 : }
20465 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
20466 0 : int bErr = FALSE;
20467 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
20468 0 : if ( bErr )
20469 : {
20470 0 : SWIG_fail;
20471 : }
20472 : }
20473 : else {
20474 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
20475 0 : SWIG_fail;
20476 : }
20477 : }
20478 : }
20479 2 : {
20480 2 : const int bLocalUseExceptions = GetUseExceptions();
20481 2 : if ( bLocalUseExceptions ) {
20482 2 : pushErrorHandler();
20483 : }
20484 2 : {
20485 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20486 2 : OGRFeatureShadow_FillUnsetWithDefault(arg1,arg2,arg3);
20487 2 : SWIG_PYTHON_THREAD_END_ALLOW;
20488 : }
20489 2 : if ( bLocalUseExceptions ) {
20490 2 : popErrorHandler();
20491 : }
20492 : #ifndef SED_HACKS
20493 : if ( bLocalUseExceptions ) {
20494 : CPLErr eclass = CPLGetLastErrorType();
20495 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20496 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20497 : }
20498 : }
20499 : #endif
20500 : }
20501 2 : resultobj = SWIG_Py_Void();
20502 2 : {
20503 : /* %typemap(freearg) char **dict */
20504 2 : CSLDestroy( arg3 );
20505 : }
20506 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20507 : return resultobj;
20508 0 : fail:
20509 0 : {
20510 : /* %typemap(freearg) char **dict */
20511 0 : CSLDestroy( arg3 );
20512 : }
20513 : return NULL;
20514 : }
20515 :
20516 :
20517 9 : SWIGINTERN PyObject *_wrap_Feature_GetNativeData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20518 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20519 9 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20520 9 : void *argp1 = 0 ;
20521 9 : int res1 = 0 ;
20522 9 : PyObject *swig_obj[1] ;
20523 9 : char *result = 0 ;
20524 :
20525 9 : if (!args) SWIG_fail;
20526 9 : swig_obj[0] = args;
20527 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20528 9 : if (!SWIG_IsOK(res1)) {
20529 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetNativeData" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20530 : }
20531 9 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20532 9 : {
20533 9 : const int bLocalUseExceptions = GetUseExceptions();
20534 9 : if ( bLocalUseExceptions ) {
20535 9 : pushErrorHandler();
20536 : }
20537 9 : {
20538 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20539 9 : result = (char *)OGRFeatureShadow_GetNativeData(arg1);
20540 9 : SWIG_PYTHON_THREAD_END_ALLOW;
20541 : }
20542 9 : if ( bLocalUseExceptions ) {
20543 9 : popErrorHandler();
20544 : }
20545 : #ifndef SED_HACKS
20546 : if ( bLocalUseExceptions ) {
20547 : CPLErr eclass = CPLGetLastErrorType();
20548 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20549 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20550 : }
20551 : }
20552 : #endif
20553 : }
20554 9 : resultobj = SWIG_FromCharPtr((const char *)result);
20555 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20556 : return resultobj;
20557 : fail:
20558 : return NULL;
20559 : }
20560 :
20561 :
20562 9 : SWIGINTERN PyObject *_wrap_Feature_GetNativeMediaType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20563 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20564 9 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20565 9 : void *argp1 = 0 ;
20566 9 : int res1 = 0 ;
20567 9 : PyObject *swig_obj[1] ;
20568 9 : char *result = 0 ;
20569 :
20570 9 : if (!args) SWIG_fail;
20571 9 : swig_obj[0] = args;
20572 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20573 9 : if (!SWIG_IsOK(res1)) {
20574 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetNativeMediaType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20575 : }
20576 9 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20577 9 : {
20578 9 : const int bLocalUseExceptions = GetUseExceptions();
20579 9 : if ( bLocalUseExceptions ) {
20580 9 : pushErrorHandler();
20581 : }
20582 9 : {
20583 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20584 9 : result = (char *)OGRFeatureShadow_GetNativeMediaType(arg1);
20585 9 : SWIG_PYTHON_THREAD_END_ALLOW;
20586 : }
20587 9 : if ( bLocalUseExceptions ) {
20588 9 : popErrorHandler();
20589 : }
20590 : #ifndef SED_HACKS
20591 : if ( bLocalUseExceptions ) {
20592 : CPLErr eclass = CPLGetLastErrorType();
20593 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20594 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20595 : }
20596 : }
20597 : #endif
20598 : }
20599 9 : resultobj = SWIG_FromCharPtr((const char *)result);
20600 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20601 : return resultobj;
20602 : fail:
20603 : return NULL;
20604 : }
20605 :
20606 :
20607 4 : SWIGINTERN PyObject *_wrap_Feature_SetNativeData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20608 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20609 4 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20610 4 : char *arg2 = (char *) 0 ;
20611 4 : void *argp1 = 0 ;
20612 4 : int res1 = 0 ;
20613 4 : int res2 ;
20614 4 : char *buf2 = 0 ;
20615 4 : int alloc2 = 0 ;
20616 4 : PyObject *swig_obj[2] ;
20617 :
20618 4 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetNativeData", 2, 2, swig_obj)) SWIG_fail;
20619 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20620 4 : if (!SWIG_IsOK(res1)) {
20621 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetNativeData" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20622 : }
20623 4 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20624 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
20625 4 : if (!SWIG_IsOK(res2)) {
20626 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetNativeData" "', argument " "2"" of type '" "char const *""'");
20627 : }
20628 4 : arg2 = reinterpret_cast< char * >(buf2);
20629 4 : {
20630 4 : const int bLocalUseExceptions = GetUseExceptions();
20631 4 : if ( bLocalUseExceptions ) {
20632 4 : pushErrorHandler();
20633 : }
20634 4 : {
20635 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20636 4 : OGRFeatureShadow_SetNativeData(arg1,(char const *)arg2);
20637 4 : SWIG_PYTHON_THREAD_END_ALLOW;
20638 : }
20639 4 : if ( bLocalUseExceptions ) {
20640 4 : popErrorHandler();
20641 : }
20642 : #ifndef SED_HACKS
20643 : if ( bLocalUseExceptions ) {
20644 : CPLErr eclass = CPLGetLastErrorType();
20645 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20646 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20647 : }
20648 : }
20649 : #endif
20650 : }
20651 4 : resultobj = SWIG_Py_Void();
20652 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20653 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20654 : return resultobj;
20655 0 : fail:
20656 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20657 : return NULL;
20658 : }
20659 :
20660 :
20661 4 : SWIGINTERN PyObject *_wrap_Feature_SetNativeMediaType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20662 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20663 4 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20664 4 : char *arg2 = (char *) 0 ;
20665 4 : void *argp1 = 0 ;
20666 4 : int res1 = 0 ;
20667 4 : int res2 ;
20668 4 : char *buf2 = 0 ;
20669 4 : int alloc2 = 0 ;
20670 4 : PyObject *swig_obj[2] ;
20671 :
20672 4 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetNativeMediaType", 2, 2, swig_obj)) SWIG_fail;
20673 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20674 4 : if (!SWIG_IsOK(res1)) {
20675 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetNativeMediaType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20676 : }
20677 4 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20678 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
20679 4 : if (!SWIG_IsOK(res2)) {
20680 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetNativeMediaType" "', argument " "2"" of type '" "char const *""'");
20681 : }
20682 4 : arg2 = reinterpret_cast< char * >(buf2);
20683 4 : {
20684 4 : const int bLocalUseExceptions = GetUseExceptions();
20685 4 : if ( bLocalUseExceptions ) {
20686 4 : pushErrorHandler();
20687 : }
20688 4 : {
20689 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20690 4 : OGRFeatureShadow_SetNativeMediaType(arg1,(char const *)arg2);
20691 4 : SWIG_PYTHON_THREAD_END_ALLOW;
20692 : }
20693 4 : if ( bLocalUseExceptions ) {
20694 4 : popErrorHandler();
20695 : }
20696 : #ifndef SED_HACKS
20697 : if ( bLocalUseExceptions ) {
20698 : CPLErr eclass = CPLGetLastErrorType();
20699 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20700 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20701 : }
20702 : }
20703 : #endif
20704 : }
20705 4 : resultobj = SWIG_Py_Void();
20706 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20707 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20708 : return resultobj;
20709 0 : fail:
20710 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
20711 : return NULL;
20712 : }
20713 :
20714 :
20715 12545 : SWIGINTERN PyObject *_wrap_Feature_SetFieldString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20716 12545 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20717 12545 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
20718 12545 : int arg2 ;
20719 12545 : char *arg3 = (char *) 0 ;
20720 12545 : void *argp1 = 0 ;
20721 12545 : int res1 = 0 ;
20722 12545 : int val2 ;
20723 12545 : int ecode2 = 0 ;
20724 12545 : int bToFree3 = 0 ;
20725 12545 : PyObject *swig_obj[3] ;
20726 :
20727 12545 : if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldString", 3, 3, swig_obj)) SWIG_fail;
20728 12545 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
20729 12545 : if (!SWIG_IsOK(res1)) {
20730 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
20731 : }
20732 12545 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
20733 12545 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
20734 12545 : if (!SWIG_IsOK(ecode2)) {
20735 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldString" "', argument " "2"" of type '" "int""'");
20736 : }
20737 12545 : arg2 = static_cast< int >(val2);
20738 12545 : {
20739 : /* %typemap(in) (const char *utf8_path) */
20740 12545 : if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
20741 : {
20742 12545 : arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
20743 : }
20744 : else
20745 : {
20746 0 : arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
20747 :
20748 : }
20749 12545 : if (arg3 == NULL)
20750 : {
20751 1 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
20752 1 : SWIG_fail;
20753 : }
20754 : }
20755 12544 : {
20756 12544 : const int bLocalUseExceptions = GetUseExceptions();
20757 12544 : if ( bLocalUseExceptions ) {
20758 1397 : pushErrorHandler();
20759 : }
20760 12544 : OGRFeatureShadow_SetFieldString(arg1,arg2,(char const *)arg3);
20761 12544 : if ( bLocalUseExceptions ) {
20762 1397 : popErrorHandler();
20763 : }
20764 : #ifndef SED_HACKS
20765 : if ( bLocalUseExceptions ) {
20766 : CPLErr eclass = CPLGetLastErrorType();
20767 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20768 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20769 : }
20770 : }
20771 : #endif
20772 : }
20773 12544 : resultobj = SWIG_Py_Void();
20774 12544 : {
20775 : /* %typemap(freearg) (const char *utf8_path) */
20776 12544 : GDALPythonFreeCStr(arg3, bToFree3);
20777 : }
20778 12544 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20779 : return resultobj;
20780 1 : fail:
20781 1 : {
20782 : /* %typemap(freearg) (const char *utf8_path) */
20783 1 : GDALPythonFreeCStr(arg3, bToFree3);
20784 : }
20785 : return NULL;
20786 : }
20787 :
20788 :
20789 271 : SWIGINTERN PyObject *Feature_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20790 271 : PyObject *obj;
20791 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
20792 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureShadow, SWIG_NewClientData(obj));
20793 271 : return SWIG_Py_Void();
20794 : }
20795 :
20796 121101 : SWIGINTERN PyObject *Feature_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20797 121101 : return SWIG_Python_InitShadowInstance(args);
20798 : }
20799 :
20800 124487 : SWIGINTERN PyObject *_wrap_delete_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20801 124487 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20802 124487 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
20803 124487 : void *argp1 = 0 ;
20804 124487 : int res1 = 0 ;
20805 124487 : PyObject *swig_obj[1] ;
20806 :
20807 124487 : if (!args) SWIG_fail;
20808 124487 : swig_obj[0] = args;
20809 124487 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_DISOWN | 0 );
20810 124487 : if (!SWIG_IsOK(res1)) {
20811 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FeatureDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
20812 : }
20813 124487 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
20814 124487 : {
20815 124487 : const int bLocalUseExceptions = GetUseExceptions();
20816 124487 : if ( bLocalUseExceptions ) {
20817 62217 : pushErrorHandler();
20818 : }
20819 124487 : {
20820 124487 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20821 124487 : delete_OGRFeatureDefnShadow(arg1);
20822 124487 : SWIG_PYTHON_THREAD_END_ALLOW;
20823 : }
20824 124487 : if ( bLocalUseExceptions ) {
20825 62217 : popErrorHandler();
20826 : }
20827 : #ifndef SED_HACKS
20828 : if ( bLocalUseExceptions ) {
20829 : CPLErr eclass = CPLGetLastErrorType();
20830 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20831 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20832 : }
20833 : }
20834 : #endif
20835 : }
20836 124487 : resultobj = SWIG_Py_Void();
20837 124487 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20838 : return resultobj;
20839 : fail:
20840 : return NULL;
20841 : }
20842 :
20843 :
20844 110 : SWIGINTERN PyObject *_wrap_new_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
20845 110 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20846 110 : char *arg1 = (char *) NULL ;
20847 110 : int res1 ;
20848 110 : char *buf1 = 0 ;
20849 110 : int alloc1 = 0 ;
20850 110 : PyObject * obj0 = 0 ;
20851 110 : char * kwnames[] = {
20852 : (char *)"name_null_ok", NULL
20853 : };
20854 110 : OGRFeatureDefnShadow *result = 0 ;
20855 :
20856 110 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_FeatureDefn", kwnames, &obj0)) SWIG_fail;
20857 110 : if (obj0) {
20858 84 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
20859 84 : if (!SWIG_IsOK(res1)) {
20860 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureDefn" "', argument " "1"" of type '" "char const *""'");
20861 : }
20862 84 : arg1 = reinterpret_cast< char * >(buf1);
20863 : }
20864 110 : {
20865 110 : const int bLocalUseExceptions = GetUseExceptions();
20866 110 : if ( bLocalUseExceptions ) {
20867 99 : pushErrorHandler();
20868 : }
20869 110 : {
20870 110 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20871 110 : result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
20872 110 : SWIG_PYTHON_THREAD_END_ALLOW;
20873 : }
20874 110 : if ( bLocalUseExceptions ) {
20875 99 : popErrorHandler();
20876 : }
20877 : #ifndef SED_HACKS
20878 : if ( bLocalUseExceptions ) {
20879 : CPLErr eclass = CPLGetLastErrorType();
20880 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20881 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20882 : }
20883 : }
20884 : #endif
20885 : }
20886 110 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_NEW | 0 );
20887 110 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
20888 110 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20889 : return resultobj;
20890 0 : fail:
20891 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
20892 : return NULL;
20893 : }
20894 :
20895 :
20896 107 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20897 107 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20898 107 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
20899 107 : void *argp1 = 0 ;
20900 107 : int res1 = 0 ;
20901 107 : PyObject *swig_obj[1] ;
20902 107 : char *result = 0 ;
20903 :
20904 107 : if (!args) SWIG_fail;
20905 107 : swig_obj[0] = args;
20906 107 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
20907 107 : if (!SWIG_IsOK(res1)) {
20908 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetName" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
20909 : }
20910 107 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
20911 107 : {
20912 107 : const int bLocalUseExceptions = GetUseExceptions();
20913 107 : if ( bLocalUseExceptions ) {
20914 9 : pushErrorHandler();
20915 : }
20916 107 : {
20917 107 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20918 107 : result = (char *)OGRFeatureDefnShadow_GetName(arg1);
20919 107 : SWIG_PYTHON_THREAD_END_ALLOW;
20920 : }
20921 107 : if ( bLocalUseExceptions ) {
20922 9 : popErrorHandler();
20923 : }
20924 : #ifndef SED_HACKS
20925 : if ( bLocalUseExceptions ) {
20926 : CPLErr eclass = CPLGetLastErrorType();
20927 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20928 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20929 : }
20930 : }
20931 : #endif
20932 : }
20933 107 : resultobj = SWIG_FromCharPtr((const char *)result);
20934 107 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20935 : return resultobj;
20936 : fail:
20937 : return NULL;
20938 : }
20939 :
20940 :
20941 47379 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20942 47379 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20943 47379 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
20944 47379 : void *argp1 = 0 ;
20945 47379 : int res1 = 0 ;
20946 47379 : PyObject *swig_obj[1] ;
20947 47379 : int result;
20948 :
20949 47379 : if (!args) SWIG_fail;
20950 47379 : swig_obj[0] = args;
20951 47379 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
20952 47379 : if (!SWIG_IsOK(res1)) {
20953 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
20954 : }
20955 47379 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
20956 47379 : {
20957 47379 : const int bLocalUseExceptions = GetUseExceptions();
20958 47379 : if ( bLocalUseExceptions ) {
20959 17917 : pushErrorHandler();
20960 : }
20961 47379 : {
20962 47379 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
20963 47379 : result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
20964 47379 : SWIG_PYTHON_THREAD_END_ALLOW;
20965 : }
20966 47379 : if ( bLocalUseExceptions ) {
20967 17917 : popErrorHandler();
20968 : }
20969 : #ifndef SED_HACKS
20970 : if ( bLocalUseExceptions ) {
20971 : CPLErr eclass = CPLGetLastErrorType();
20972 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20973 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20974 : }
20975 : }
20976 : #endif
20977 : }
20978 47379 : resultobj = SWIG_From_int(static_cast< int >(result));
20979 47379 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
20980 : return resultobj;
20981 : fail:
20982 : return NULL;
20983 : }
20984 :
20985 :
20986 208907 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20987 208907 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20988 208907 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
20989 208907 : int arg2 ;
20990 208907 : void *argp1 = 0 ;
20991 208907 : int res1 = 0 ;
20992 208907 : int val2 ;
20993 208907 : int ecode2 = 0 ;
20994 208907 : PyObject *swig_obj[2] ;
20995 208907 : OGRFieldDefnShadow *result = 0 ;
20996 :
20997 208907 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetFieldDefn", 2, 2, swig_obj)) SWIG_fail;
20998 208907 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
20999 208907 : if (!SWIG_IsOK(res1)) {
21000 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21001 : }
21002 208907 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21003 208907 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21004 208907 : if (!SWIG_IsOK(ecode2)) {
21005 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "2"" of type '" "int""'");
21006 : }
21007 208907 : arg2 = static_cast< int >(val2);
21008 208907 : {
21009 208907 : const int bLocalUseExceptions = GetUseExceptions();
21010 208907 : if ( bLocalUseExceptions ) {
21011 121640 : pushErrorHandler();
21012 : }
21013 208907 : {
21014 208907 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21015 208907 : result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
21016 208907 : SWIG_PYTHON_THREAD_END_ALLOW;
21017 : }
21018 208907 : if ( bLocalUseExceptions ) {
21019 121640 : popErrorHandler();
21020 : }
21021 : #ifndef SED_HACKS
21022 : if ( bLocalUseExceptions ) {
21023 : CPLErr eclass = CPLGetLastErrorType();
21024 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21025 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21026 : }
21027 : }
21028 : #endif
21029 : }
21030 208907 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
21031 208908 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21032 : return resultobj;
21033 : fail:
21034 : return NULL;
21035 : }
21036 :
21037 :
21038 1734 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21039 1734 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21040 1734 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21041 1734 : char *arg2 = (char *) 0 ;
21042 1734 : void *argp1 = 0 ;
21043 1734 : int res1 = 0 ;
21044 1734 : int bToFree2 = 0 ;
21045 1734 : PyObject *swig_obj[2] ;
21046 1734 : int result;
21047 :
21048 1734 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetFieldIndex", 2, 2, swig_obj)) SWIG_fail;
21049 1734 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21050 1734 : if (!SWIG_IsOK(res1)) {
21051 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21052 : }
21053 1734 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21054 1734 : {
21055 : /* %typemap(in) (const char *utf8_path) */
21056 1734 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
21057 : {
21058 1734 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
21059 : }
21060 : else
21061 : {
21062 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
21063 :
21064 : }
21065 1734 : if (arg2 == NULL)
21066 : {
21067 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
21068 0 : SWIG_fail;
21069 : }
21070 : }
21071 1734 : {
21072 1734 : const int bLocalUseExceptions = GetUseExceptions();
21073 1734 : if ( bLocalUseExceptions ) {
21074 236 : pushErrorHandler();
21075 : }
21076 1734 : {
21077 1734 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21078 1734 : result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
21079 1734 : SWIG_PYTHON_THREAD_END_ALLOW;
21080 : }
21081 1734 : if ( bLocalUseExceptions ) {
21082 236 : popErrorHandler();
21083 : }
21084 : #ifndef SED_HACKS
21085 : if ( bLocalUseExceptions ) {
21086 : CPLErr eclass = CPLGetLastErrorType();
21087 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21088 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21089 : }
21090 : }
21091 : #endif
21092 : }
21093 1734 : resultobj = SWIG_From_int(static_cast< int >(result));
21094 1734 : {
21095 : /* %typemap(freearg) (const char *utf8_path) */
21096 1734 : GDALPythonFreeCStr(arg2, bToFree2);
21097 : }
21098 1734 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21099 : return resultobj;
21100 0 : fail:
21101 0 : {
21102 : /* %typemap(freearg) (const char *utf8_path) */
21103 1734 : GDALPythonFreeCStr(arg2, bToFree2);
21104 : }
21105 : return NULL;
21106 : }
21107 :
21108 :
21109 397 : SWIGINTERN PyObject *_wrap_FeatureDefn_AddFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21110 397 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21111 397 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21112 397 : OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
21113 397 : void *argp1 = 0 ;
21114 397 : int res1 = 0 ;
21115 397 : void *argp2 = 0 ;
21116 397 : int res2 = 0 ;
21117 397 : PyObject *swig_obj[2] ;
21118 :
21119 397 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_AddFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21120 397 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21121 397 : if (!SWIG_IsOK(res1)) {
21122 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21123 : }
21124 397 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21125 397 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
21126 397 : if (!SWIG_IsOK(res2)) {
21127 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'");
21128 : }
21129 397 : arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
21130 397 : {
21131 397 : if (!arg2) {
21132 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
21133 : }
21134 : }
21135 397 : {
21136 397 : const int bLocalUseExceptions = GetUseExceptions();
21137 397 : if ( bLocalUseExceptions ) {
21138 396 : pushErrorHandler();
21139 : }
21140 397 : {
21141 397 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21142 397 : OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
21143 397 : SWIG_PYTHON_THREAD_END_ALLOW;
21144 : }
21145 397 : if ( bLocalUseExceptions ) {
21146 396 : popErrorHandler();
21147 : }
21148 : #ifndef SED_HACKS
21149 : if ( bLocalUseExceptions ) {
21150 : CPLErr eclass = CPLGetLastErrorType();
21151 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21152 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21153 : }
21154 : }
21155 : #endif
21156 : }
21157 397 : resultobj = SWIG_Py_Void();
21158 397 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21159 : return resultobj;
21160 : fail:
21161 : return NULL;
21162 : }
21163 :
21164 :
21165 235 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21166 235 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21167 235 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21168 235 : void *argp1 = 0 ;
21169 235 : int res1 = 0 ;
21170 235 : PyObject *swig_obj[1] ;
21171 235 : int result;
21172 :
21173 235 : if (!args) SWIG_fail;
21174 235 : swig_obj[0] = args;
21175 235 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21176 235 : if (!SWIG_IsOK(res1)) {
21177 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21178 : }
21179 235 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21180 235 : {
21181 235 : const int bLocalUseExceptions = GetUseExceptions();
21182 235 : if ( bLocalUseExceptions ) {
21183 144 : pushErrorHandler();
21184 : }
21185 235 : {
21186 235 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21187 235 : result = (int)OGRFeatureDefnShadow_GetGeomFieldCount(arg1);
21188 235 : SWIG_PYTHON_THREAD_END_ALLOW;
21189 : }
21190 235 : if ( bLocalUseExceptions ) {
21191 144 : popErrorHandler();
21192 : }
21193 : #ifndef SED_HACKS
21194 : if ( bLocalUseExceptions ) {
21195 : CPLErr eclass = CPLGetLastErrorType();
21196 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21197 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21198 : }
21199 : }
21200 : #endif
21201 : }
21202 235 : resultobj = SWIG_From_int(static_cast< int >(result));
21203 235 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21204 : return resultobj;
21205 : fail:
21206 : return NULL;
21207 : }
21208 :
21209 :
21210 518 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21211 518 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21212 518 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21213 518 : int arg2 ;
21214 518 : void *argp1 = 0 ;
21215 518 : int res1 = 0 ;
21216 518 : int val2 ;
21217 518 : int ecode2 = 0 ;
21218 518 : PyObject *swig_obj[2] ;
21219 518 : OGRGeomFieldDefnShadow *result = 0 ;
21220 :
21221 518 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21222 518 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21223 518 : if (!SWIG_IsOK(res1)) {
21224 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21225 : }
21226 518 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21227 518 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21228 518 : if (!SWIG_IsOK(ecode2)) {
21229 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetGeomFieldDefn" "', argument " "2"" of type '" "int""'");
21230 : }
21231 518 : arg2 = static_cast< int >(val2);
21232 518 : {
21233 518 : const int bLocalUseExceptions = GetUseExceptions();
21234 518 : if ( bLocalUseExceptions ) {
21235 192 : pushErrorHandler();
21236 : }
21237 518 : {
21238 518 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21239 518 : result = (OGRGeomFieldDefnShadow *)OGRFeatureDefnShadow_GetGeomFieldDefn(arg1,arg2);
21240 518 : SWIG_PYTHON_THREAD_END_ALLOW;
21241 : }
21242 518 : if ( bLocalUseExceptions ) {
21243 192 : popErrorHandler();
21244 : }
21245 : #ifndef SED_HACKS
21246 : if ( bLocalUseExceptions ) {
21247 : CPLErr eclass = CPLGetLastErrorType();
21248 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21249 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21250 : }
21251 : }
21252 : #endif
21253 : }
21254 518 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
21255 518 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21256 : return resultobj;
21257 : fail:
21258 : return NULL;
21259 : }
21260 :
21261 :
21262 37 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21263 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21264 37 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21265 37 : char *arg2 = (char *) 0 ;
21266 37 : void *argp1 = 0 ;
21267 37 : int res1 = 0 ;
21268 37 : int bToFree2 = 0 ;
21269 37 : PyObject *swig_obj[2] ;
21270 37 : int result;
21271 :
21272 37 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetGeomFieldIndex", 2, 2, swig_obj)) SWIG_fail;
21273 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21274 37 : if (!SWIG_IsOK(res1)) {
21275 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21276 : }
21277 37 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21278 37 : {
21279 : /* %typemap(in) (const char *utf8_path) */
21280 37 : if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
21281 : {
21282 37 : arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
21283 : }
21284 : else
21285 : {
21286 0 : arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
21287 :
21288 : }
21289 37 : if (arg2 == NULL)
21290 : {
21291 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
21292 0 : SWIG_fail;
21293 : }
21294 : }
21295 37 : {
21296 37 : const int bLocalUseExceptions = GetUseExceptions();
21297 37 : if ( bLocalUseExceptions ) {
21298 0 : pushErrorHandler();
21299 : }
21300 37 : {
21301 37 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21302 37 : result = (int)OGRFeatureDefnShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
21303 37 : SWIG_PYTHON_THREAD_END_ALLOW;
21304 : }
21305 37 : if ( bLocalUseExceptions ) {
21306 0 : popErrorHandler();
21307 : }
21308 : #ifndef SED_HACKS
21309 : if ( bLocalUseExceptions ) {
21310 : CPLErr eclass = CPLGetLastErrorType();
21311 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21312 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21313 : }
21314 : }
21315 : #endif
21316 : }
21317 37 : resultobj = SWIG_From_int(static_cast< int >(result));
21318 37 : {
21319 : /* %typemap(freearg) (const char *utf8_path) */
21320 37 : GDALPythonFreeCStr(arg2, bToFree2);
21321 : }
21322 37 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21323 : return resultobj;
21324 0 : fail:
21325 0 : {
21326 : /* %typemap(freearg) (const char *utf8_path) */
21327 37 : GDALPythonFreeCStr(arg2, bToFree2);
21328 : }
21329 : return NULL;
21330 : }
21331 :
21332 :
21333 11 : SWIGINTERN PyObject *_wrap_FeatureDefn_AddGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21334 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21335 11 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21336 11 : OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
21337 11 : void *argp1 = 0 ;
21338 11 : int res1 = 0 ;
21339 11 : void *argp2 = 0 ;
21340 11 : int res2 = 0 ;
21341 11 : PyObject *swig_obj[2] ;
21342 :
21343 11 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_AddGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21344 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21345 11 : if (!SWIG_IsOK(res1)) {
21346 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21347 : }
21348 11 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21349 11 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
21350 11 : if (!SWIG_IsOK(res2)) {
21351 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddGeomFieldDefn" "', argument " "2"" of type '" "OGRGeomFieldDefnShadow *""'");
21352 : }
21353 11 : arg2 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp2);
21354 11 : {
21355 11 : if (!arg2) {
21356 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
21357 : }
21358 : }
21359 11 : {
21360 11 : const int bLocalUseExceptions = GetUseExceptions();
21361 11 : if ( bLocalUseExceptions ) {
21362 8 : pushErrorHandler();
21363 : }
21364 11 : {
21365 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21366 11 : OGRFeatureDefnShadow_AddGeomFieldDefn(arg1,arg2);
21367 11 : SWIG_PYTHON_THREAD_END_ALLOW;
21368 : }
21369 11 : if ( bLocalUseExceptions ) {
21370 8 : popErrorHandler();
21371 : }
21372 : #ifndef SED_HACKS
21373 : if ( bLocalUseExceptions ) {
21374 : CPLErr eclass = CPLGetLastErrorType();
21375 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21376 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21377 : }
21378 : }
21379 : #endif
21380 : }
21381 11 : resultobj = SWIG_Py_Void();
21382 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21383 : return resultobj;
21384 : fail:
21385 : return NULL;
21386 : }
21387 :
21388 :
21389 4 : SWIGINTERN PyObject *_wrap_FeatureDefn_DeleteGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21390 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21391 4 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21392 4 : int arg2 ;
21393 4 : void *argp1 = 0 ;
21394 4 : int res1 = 0 ;
21395 4 : int val2 ;
21396 4 : int ecode2 = 0 ;
21397 4 : PyObject *swig_obj[2] ;
21398 4 : OGRErr result;
21399 :
21400 4 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_DeleteGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
21401 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21402 4 : if (!SWIG_IsOK(res1)) {
21403 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_DeleteGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21404 : }
21405 4 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21406 4 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21407 4 : if (!SWIG_IsOK(ecode2)) {
21408 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_DeleteGeomFieldDefn" "', argument " "2"" of type '" "int""'");
21409 : }
21410 4 : arg2 = static_cast< int >(val2);
21411 4 : {
21412 4 : const int bLocalUseExceptions = GetUseExceptions();
21413 4 : if ( bLocalUseExceptions ) {
21414 0 : pushErrorHandler();
21415 : }
21416 4 : {
21417 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21418 4 : result = (OGRErr)OGRFeatureDefnShadow_DeleteGeomFieldDefn(arg1,arg2);
21419 4 : SWIG_PYTHON_THREAD_END_ALLOW;
21420 : }
21421 4 : if ( bLocalUseExceptions ) {
21422 0 : popErrorHandler();
21423 : }
21424 : #ifndef SED_HACKS
21425 : if ( bLocalUseExceptions ) {
21426 : CPLErr eclass = CPLGetLastErrorType();
21427 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21428 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21429 : }
21430 : }
21431 : #endif
21432 : }
21433 4 : {
21434 : /* %typemap(out) OGRErr */
21435 6 : if ( result != 0 && GetUseExceptions()) {
21436 0 : const char* pszMessage = CPLGetLastErrorMsg();
21437 0 : if( pszMessage[0] != '\0' )
21438 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
21439 : else
21440 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
21441 0 : SWIG_fail;
21442 : }
21443 : }
21444 4 : {
21445 : /* %typemap(ret) OGRErr */
21446 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
21447 4 : resultobj = PyInt_FromLong( result );
21448 : }
21449 : }
21450 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21451 : return resultobj;
21452 : fail:
21453 : return NULL;
21454 : }
21455 :
21456 :
21457 91 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21458 91 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21459 91 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21460 91 : void *argp1 = 0 ;
21461 91 : int res1 = 0 ;
21462 91 : PyObject *swig_obj[1] ;
21463 91 : OGRwkbGeometryType result;
21464 :
21465 91 : if (!args) SWIG_fail;
21466 91 : swig_obj[0] = args;
21467 91 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21468 91 : if (!SWIG_IsOK(res1)) {
21469 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21470 : }
21471 91 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21472 91 : {
21473 91 : const int bLocalUseExceptions = GetUseExceptions();
21474 91 : if ( bLocalUseExceptions ) {
21475 28 : pushErrorHandler();
21476 : }
21477 91 : {
21478 91 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21479 91 : result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
21480 91 : SWIG_PYTHON_THREAD_END_ALLOW;
21481 : }
21482 91 : if ( bLocalUseExceptions ) {
21483 28 : popErrorHandler();
21484 : }
21485 : #ifndef SED_HACKS
21486 : if ( bLocalUseExceptions ) {
21487 : CPLErr eclass = CPLGetLastErrorType();
21488 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21489 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21490 : }
21491 : }
21492 : #endif
21493 : }
21494 91 : resultobj = SWIG_From_int(static_cast< int >(result));
21495 91 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21496 : return resultobj;
21497 : fail:
21498 : return NULL;
21499 : }
21500 :
21501 :
21502 12 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21503 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21504 12 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21505 12 : OGRwkbGeometryType arg2 ;
21506 12 : void *argp1 = 0 ;
21507 12 : int res1 = 0 ;
21508 12 : int val2 ;
21509 12 : int ecode2 = 0 ;
21510 12 : PyObject *swig_obj[2] ;
21511 :
21512 12 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetGeomType", 2, 2, swig_obj)) SWIG_fail;
21513 12 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21514 12 : if (!SWIG_IsOK(res1)) {
21515 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21516 : }
21517 12 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21518 12 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21519 12 : if (!SWIG_IsOK(ecode2)) {
21520 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeomType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
21521 : }
21522 12 : arg2 = static_cast< OGRwkbGeometryType >(val2);
21523 12 : {
21524 12 : const int bLocalUseExceptions = GetUseExceptions();
21525 12 : if ( bLocalUseExceptions ) {
21526 4 : pushErrorHandler();
21527 : }
21528 12 : {
21529 12 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21530 12 : OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
21531 12 : SWIG_PYTHON_THREAD_END_ALLOW;
21532 : }
21533 12 : if ( bLocalUseExceptions ) {
21534 4 : popErrorHandler();
21535 : }
21536 : #ifndef SED_HACKS
21537 : if ( bLocalUseExceptions ) {
21538 : CPLErr eclass = CPLGetLastErrorType();
21539 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21540 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21541 : }
21542 : }
21543 : #endif
21544 : }
21545 12 : resultobj = SWIG_Py_Void();
21546 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21547 : return resultobj;
21548 : fail:
21549 : return NULL;
21550 : }
21551 :
21552 :
21553 3 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetReferenceCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21554 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21555 3 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21556 3 : void *argp1 = 0 ;
21557 3 : int res1 = 0 ;
21558 3 : PyObject *swig_obj[1] ;
21559 3 : int result;
21560 :
21561 3 : if (!args) SWIG_fail;
21562 3 : swig_obj[0] = args;
21563 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21564 3 : if (!SWIG_IsOK(res1)) {
21565 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetReferenceCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21566 : }
21567 3 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21568 3 : {
21569 3 : const int bLocalUseExceptions = GetUseExceptions();
21570 3 : if ( bLocalUseExceptions ) {
21571 3 : pushErrorHandler();
21572 : }
21573 3 : {
21574 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21575 3 : result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
21576 3 : SWIG_PYTHON_THREAD_END_ALLOW;
21577 : }
21578 3 : if ( bLocalUseExceptions ) {
21579 3 : popErrorHandler();
21580 : }
21581 : #ifndef SED_HACKS
21582 : if ( bLocalUseExceptions ) {
21583 : CPLErr eclass = CPLGetLastErrorType();
21584 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21585 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21586 : }
21587 : }
21588 : #endif
21589 : }
21590 3 : resultobj = SWIG_From_int(static_cast< int >(result));
21591 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21592 : return resultobj;
21593 : fail:
21594 : return NULL;
21595 : }
21596 :
21597 :
21598 6 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21599 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21600 6 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21601 6 : void *argp1 = 0 ;
21602 6 : int res1 = 0 ;
21603 6 : PyObject *swig_obj[1] ;
21604 6 : int result;
21605 :
21606 6 : if (!args) SWIG_fail;
21607 6 : swig_obj[0] = args;
21608 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21609 6 : if (!SWIG_IsOK(res1)) {
21610 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21611 : }
21612 6 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21613 6 : {
21614 6 : const int bLocalUseExceptions = GetUseExceptions();
21615 6 : if ( bLocalUseExceptions ) {
21616 0 : pushErrorHandler();
21617 : }
21618 6 : {
21619 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21620 6 : result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
21621 6 : SWIG_PYTHON_THREAD_END_ALLOW;
21622 : }
21623 6 : if ( bLocalUseExceptions ) {
21624 0 : popErrorHandler();
21625 : }
21626 : #ifndef SED_HACKS
21627 : if ( bLocalUseExceptions ) {
21628 : CPLErr eclass = CPLGetLastErrorType();
21629 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21630 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21631 : }
21632 : }
21633 : #endif
21634 : }
21635 6 : resultobj = SWIG_From_int(static_cast< int >(result));
21636 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21637 : return resultobj;
21638 : fail:
21639 : return NULL;
21640 : }
21641 :
21642 :
21643 3 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21644 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21645 3 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21646 3 : int arg2 ;
21647 3 : void *argp1 = 0 ;
21648 3 : int res1 = 0 ;
21649 3 : int val2 ;
21650 3 : int ecode2 = 0 ;
21651 3 : PyObject *swig_obj[2] ;
21652 :
21653 3 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetGeometryIgnored", 2, 2, swig_obj)) SWIG_fail;
21654 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21655 3 : if (!SWIG_IsOK(res1)) {
21656 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21657 : }
21658 3 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21659 3 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21660 3 : if (!SWIG_IsOK(ecode2)) {
21661 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "2"" of type '" "int""'");
21662 : }
21663 3 : arg2 = static_cast< int >(val2);
21664 3 : {
21665 3 : const int bLocalUseExceptions = GetUseExceptions();
21666 3 : if ( bLocalUseExceptions ) {
21667 0 : pushErrorHandler();
21668 : }
21669 3 : {
21670 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21671 3 : OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
21672 3 : SWIG_PYTHON_THREAD_END_ALLOW;
21673 : }
21674 3 : if ( bLocalUseExceptions ) {
21675 0 : popErrorHandler();
21676 : }
21677 : #ifndef SED_HACKS
21678 : if ( bLocalUseExceptions ) {
21679 : CPLErr eclass = CPLGetLastErrorType();
21680 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21681 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21682 : }
21683 : }
21684 : #endif
21685 : }
21686 3 : resultobj = SWIG_Py_Void();
21687 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21688 : return resultobj;
21689 : fail:
21690 : return NULL;
21691 : }
21692 :
21693 :
21694 2 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21695 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21696 2 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21697 2 : void *argp1 = 0 ;
21698 2 : int res1 = 0 ;
21699 2 : PyObject *swig_obj[1] ;
21700 2 : int result;
21701 :
21702 2 : if (!args) SWIG_fail;
21703 2 : swig_obj[0] = args;
21704 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21705 2 : if (!SWIG_IsOK(res1)) {
21706 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21707 : }
21708 2 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21709 2 : {
21710 2 : const int bLocalUseExceptions = GetUseExceptions();
21711 2 : if ( bLocalUseExceptions ) {
21712 0 : pushErrorHandler();
21713 : }
21714 2 : {
21715 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21716 2 : result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
21717 2 : SWIG_PYTHON_THREAD_END_ALLOW;
21718 : }
21719 2 : if ( bLocalUseExceptions ) {
21720 0 : popErrorHandler();
21721 : }
21722 : #ifndef SED_HACKS
21723 : if ( bLocalUseExceptions ) {
21724 : CPLErr eclass = CPLGetLastErrorType();
21725 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21726 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21727 : }
21728 : }
21729 : #endif
21730 : }
21731 2 : resultobj = SWIG_From_int(static_cast< int >(result));
21732 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21733 : return resultobj;
21734 : fail:
21735 : return NULL;
21736 : }
21737 :
21738 :
21739 0 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21740 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21741 0 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21742 0 : int arg2 ;
21743 0 : void *argp1 = 0 ;
21744 0 : int res1 = 0 ;
21745 0 : int val2 ;
21746 0 : int ecode2 = 0 ;
21747 0 : PyObject *swig_obj[2] ;
21748 :
21749 0 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetStyleIgnored", 2, 2, swig_obj)) SWIG_fail;
21750 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21751 0 : if (!SWIG_IsOK(res1)) {
21752 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21753 : }
21754 0 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21755 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
21756 0 : if (!SWIG_IsOK(ecode2)) {
21757 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "2"" of type '" "int""'");
21758 : }
21759 0 : arg2 = static_cast< int >(val2);
21760 0 : {
21761 0 : const int bLocalUseExceptions = GetUseExceptions();
21762 0 : if ( bLocalUseExceptions ) {
21763 0 : pushErrorHandler();
21764 : }
21765 0 : {
21766 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21767 0 : OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
21768 0 : SWIG_PYTHON_THREAD_END_ALLOW;
21769 : }
21770 0 : if ( bLocalUseExceptions ) {
21771 0 : popErrorHandler();
21772 : }
21773 : #ifndef SED_HACKS
21774 : if ( bLocalUseExceptions ) {
21775 : CPLErr eclass = CPLGetLastErrorType();
21776 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21777 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21778 : }
21779 : }
21780 : #endif
21781 : }
21782 0 : resultobj = SWIG_Py_Void();
21783 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21784 : return resultobj;
21785 : fail:
21786 : return NULL;
21787 : }
21788 :
21789 :
21790 11 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21791 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21792 11 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
21793 11 : OGRFeatureDefnShadow *arg2 = (OGRFeatureDefnShadow *) 0 ;
21794 11 : void *argp1 = 0 ;
21795 11 : int res1 = 0 ;
21796 11 : void *argp2 = 0 ;
21797 11 : int res2 = 0 ;
21798 11 : PyObject *swig_obj[2] ;
21799 11 : int result;
21800 :
21801 11 : if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_IsSame", 2, 2, swig_obj)) SWIG_fail;
21802 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21803 11 : if (!SWIG_IsOK(res1)) {
21804 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsSame" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
21805 : }
21806 11 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
21807 11 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
21808 11 : if (!SWIG_IsOK(res2)) {
21809 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_IsSame" "', argument " "2"" of type '" "OGRFeatureDefnShadow *""'");
21810 : }
21811 11 : arg2 = reinterpret_cast< OGRFeatureDefnShadow * >(argp2);
21812 11 : {
21813 11 : if (!arg2) {
21814 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
21815 : }
21816 : }
21817 11 : {
21818 11 : const int bLocalUseExceptions = GetUseExceptions();
21819 11 : if ( bLocalUseExceptions ) {
21820 4 : pushErrorHandler();
21821 : }
21822 11 : {
21823 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21824 11 : result = (int)OGRFeatureDefnShadow_IsSame(arg1,arg2);
21825 11 : SWIG_PYTHON_THREAD_END_ALLOW;
21826 : }
21827 11 : if ( bLocalUseExceptions ) {
21828 4 : popErrorHandler();
21829 : }
21830 : #ifndef SED_HACKS
21831 : if ( bLocalUseExceptions ) {
21832 : CPLErr eclass = CPLGetLastErrorType();
21833 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21834 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21835 : }
21836 : }
21837 : #endif
21838 : }
21839 11 : resultobj = SWIG_From_int(static_cast< int >(result));
21840 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21841 : return resultobj;
21842 : fail:
21843 : return NULL;
21844 : }
21845 :
21846 :
21847 271 : SWIGINTERN PyObject *FeatureDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21848 271 : PyObject *obj;
21849 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
21850 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_NewClientData(obj));
21851 271 : return SWIG_Py_Void();
21852 : }
21853 :
21854 110 : SWIGINTERN PyObject *FeatureDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21855 110 : return SWIG_Python_InitShadowInstance(args);
21856 : }
21857 :
21858 75738 : SWIGINTERN PyObject *_wrap_delete_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21859 75738 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21860 75738 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
21861 75738 : void *argp1 = 0 ;
21862 75738 : int res1 = 0 ;
21863 75738 : PyObject *swig_obj[1] ;
21864 :
21865 75738 : if (!args) SWIG_fail;
21866 75738 : swig_obj[0] = args;
21867 75738 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_DISOWN | 0 );
21868 75738 : if (!SWIG_IsOK(res1)) {
21869 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDefn" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
21870 : }
21871 75738 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
21872 75738 : {
21873 75738 : const int bLocalUseExceptions = GetUseExceptions();
21874 75738 : if ( bLocalUseExceptions ) {
21875 1793 : pushErrorHandler();
21876 : }
21877 75738 : {
21878 75738 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21879 75738 : delete_OGRFieldDefnShadow(arg1);
21880 75738 : SWIG_PYTHON_THREAD_END_ALLOW;
21881 : }
21882 75738 : if ( bLocalUseExceptions ) {
21883 1793 : popErrorHandler();
21884 : }
21885 : #ifndef SED_HACKS
21886 : if ( bLocalUseExceptions ) {
21887 : CPLErr eclass = CPLGetLastErrorType();
21888 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21889 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21890 : }
21891 : }
21892 : #endif
21893 : }
21894 75738 : resultobj = SWIG_Py_Void();
21895 75738 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21896 : return resultobj;
21897 : fail:
21898 : return NULL;
21899 : }
21900 :
21901 :
21902 75751 : SWIGINTERN PyObject *_wrap_new_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
21903 75751 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21904 75751 : char *arg1 = (char *) "unnamed" ;
21905 75751 : OGRFieldType arg2 = (OGRFieldType) OFTString ;
21906 75751 : int res1 ;
21907 75751 : char *buf1 = 0 ;
21908 75751 : int alloc1 = 0 ;
21909 75751 : int val2 ;
21910 75751 : int ecode2 = 0 ;
21911 75751 : PyObject * obj0 = 0 ;
21912 75751 : PyObject * obj1 = 0 ;
21913 75751 : char * kwnames[] = {
21914 : (char *)"name_null_ok", (char *)"field_type", NULL
21915 : };
21916 75751 : OGRFieldDefnShadow *result = 0 ;
21917 :
21918 75751 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_FieldDefn", kwnames, &obj0, &obj1)) SWIG_fail;
21919 75751 : if (obj0) {
21920 75751 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
21921 75751 : if (!SWIG_IsOK(res1)) {
21922 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FieldDefn" "', argument " "1"" of type '" "char const *""'");
21923 : }
21924 75751 : arg1 = reinterpret_cast< char * >(buf1);
21925 : }
21926 75751 : if (obj1) {
21927 75209 : ecode2 = SWIG_AsVal_int(obj1, &val2);
21928 75209 : if (!SWIG_IsOK(ecode2)) {
21929 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FieldDefn" "', argument " "2"" of type '" "OGRFieldType""'");
21930 : }
21931 75209 : arg2 = static_cast< OGRFieldType >(val2);
21932 : }
21933 75751 : {
21934 75751 : const int bLocalUseExceptions = GetUseExceptions();
21935 75751 : if ( bLocalUseExceptions ) {
21936 1806 : pushErrorHandler();
21937 : }
21938 75751 : {
21939 75751 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21940 75751 : result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
21941 75751 : SWIG_PYTHON_THREAD_END_ALLOW;
21942 : }
21943 75751 : if ( bLocalUseExceptions ) {
21944 1806 : popErrorHandler();
21945 : }
21946 : #ifndef SED_HACKS
21947 : if ( bLocalUseExceptions ) {
21948 : CPLErr eclass = CPLGetLastErrorType();
21949 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21950 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21951 : }
21952 : }
21953 : #endif
21954 : }
21955 75751 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_NEW | 0 );
21956 75751 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
21957 75751 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
21958 : return resultobj;
21959 0 : fail:
21960 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
21961 : return NULL;
21962 : }
21963 :
21964 :
21965 199920 : SWIGINTERN PyObject *_wrap_FieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21966 199920 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
21967 199920 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
21968 199920 : void *argp1 = 0 ;
21969 199920 : int res1 = 0 ;
21970 199920 : PyObject *swig_obj[1] ;
21971 199920 : char *result = 0 ;
21972 :
21973 199920 : if (!args) SWIG_fail;
21974 199920 : swig_obj[0] = args;
21975 199920 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
21976 199920 : if (!SWIG_IsOK(res1)) {
21977 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
21978 : }
21979 199920 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
21980 199920 : {
21981 199920 : const int bLocalUseExceptions = GetUseExceptions();
21982 199920 : if ( bLocalUseExceptions ) {
21983 115913 : pushErrorHandler();
21984 : }
21985 199920 : {
21986 199920 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21987 199920 : result = (char *)OGRFieldDefnShadow_GetName(arg1);
21988 199920 : SWIG_PYTHON_THREAD_END_ALLOW;
21989 : }
21990 199920 : if ( bLocalUseExceptions ) {
21991 115913 : popErrorHandler();
21992 : }
21993 : #ifndef SED_HACKS
21994 : if ( bLocalUseExceptions ) {
21995 : CPLErr eclass = CPLGetLastErrorType();
21996 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
21997 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
21998 : }
21999 : }
22000 : #endif
22001 : }
22002 199920 : resultobj = SWIG_FromCharPtr((const char *)result);
22003 199920 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22004 : return resultobj;
22005 : fail:
22006 : return NULL;
22007 : }
22008 :
22009 :
22010 1537 : SWIGINTERN PyObject *_wrap_FieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22011 1537 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22012 1537 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22013 1537 : void *argp1 = 0 ;
22014 1537 : int res1 = 0 ;
22015 1537 : PyObject *swig_obj[1] ;
22016 1537 : char *result = 0 ;
22017 :
22018 1537 : if (!args) SWIG_fail;
22019 1537 : swig_obj[0] = args;
22020 1537 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22021 1537 : if (!SWIG_IsOK(res1)) {
22022 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22023 : }
22024 1537 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22025 1537 : {
22026 1537 : const int bLocalUseExceptions = GetUseExceptions();
22027 1537 : if ( bLocalUseExceptions ) {
22028 950 : pushErrorHandler();
22029 : }
22030 1537 : {
22031 1537 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22032 1537 : result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
22033 1537 : SWIG_PYTHON_THREAD_END_ALLOW;
22034 : }
22035 1537 : if ( bLocalUseExceptions ) {
22036 950 : popErrorHandler();
22037 : }
22038 : #ifndef SED_HACKS
22039 : if ( bLocalUseExceptions ) {
22040 : CPLErr eclass = CPLGetLastErrorType();
22041 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22042 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22043 : }
22044 : }
22045 : #endif
22046 : }
22047 1537 : resultobj = SWIG_FromCharPtr((const char *)result);
22048 1537 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22049 : return resultobj;
22050 : fail:
22051 : return NULL;
22052 : }
22053 :
22054 :
22055 2 : SWIGINTERN PyObject *_wrap_FieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22056 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22057 2 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22058 2 : char *arg2 = (char *) 0 ;
22059 2 : void *argp1 = 0 ;
22060 2 : int res1 = 0 ;
22061 2 : int res2 ;
22062 2 : char *buf2 = 0 ;
22063 2 : int alloc2 = 0 ;
22064 2 : PyObject *swig_obj[2] ;
22065 :
22066 2 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetName", 2, 2, swig_obj)) SWIG_fail;
22067 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22068 2 : if (!SWIG_IsOK(res1)) {
22069 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22070 : }
22071 2 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22072 2 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
22073 2 : if (!SWIG_IsOK(res2)) {
22074 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
22075 : }
22076 2 : arg2 = reinterpret_cast< char * >(buf2);
22077 2 : {
22078 2 : if (!arg2) {
22079 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
22080 : }
22081 : }
22082 2 : {
22083 2 : const int bLocalUseExceptions = GetUseExceptions();
22084 2 : if ( bLocalUseExceptions ) {
22085 0 : pushErrorHandler();
22086 : }
22087 2 : {
22088 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22089 2 : OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
22090 2 : SWIG_PYTHON_THREAD_END_ALLOW;
22091 : }
22092 2 : if ( bLocalUseExceptions ) {
22093 0 : popErrorHandler();
22094 : }
22095 : #ifndef SED_HACKS
22096 : if ( bLocalUseExceptions ) {
22097 : CPLErr eclass = CPLGetLastErrorType();
22098 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22099 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22100 : }
22101 : }
22102 : #endif
22103 : }
22104 2 : resultobj = SWIG_Py_Void();
22105 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
22106 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22107 : return resultobj;
22108 0 : fail:
22109 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
22110 : return NULL;
22111 : }
22112 :
22113 :
22114 50 : SWIGINTERN PyObject *_wrap_FieldDefn_GetAlternativeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22115 50 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22116 50 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22117 50 : void *argp1 = 0 ;
22118 50 : int res1 = 0 ;
22119 50 : PyObject *swig_obj[1] ;
22120 50 : char *result = 0 ;
22121 :
22122 50 : if (!args) SWIG_fail;
22123 50 : swig_obj[0] = args;
22124 50 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22125 50 : if (!SWIG_IsOK(res1)) {
22126 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetAlternativeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22127 : }
22128 50 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22129 50 : {
22130 50 : const int bLocalUseExceptions = GetUseExceptions();
22131 50 : if ( bLocalUseExceptions ) {
22132 16 : pushErrorHandler();
22133 : }
22134 50 : {
22135 50 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22136 50 : result = (char *)OGRFieldDefnShadow_GetAlternativeName(arg1);
22137 50 : SWIG_PYTHON_THREAD_END_ALLOW;
22138 : }
22139 50 : if ( bLocalUseExceptions ) {
22140 16 : popErrorHandler();
22141 : }
22142 : #ifndef SED_HACKS
22143 : if ( bLocalUseExceptions ) {
22144 : CPLErr eclass = CPLGetLastErrorType();
22145 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22146 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22147 : }
22148 : }
22149 : #endif
22150 : }
22151 50 : resultobj = SWIG_FromCharPtr((const char *)result);
22152 50 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22153 : return resultobj;
22154 : fail:
22155 : return NULL;
22156 : }
22157 :
22158 :
22159 9 : SWIGINTERN PyObject *_wrap_FieldDefn_GetAlternativeNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22160 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22161 9 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22162 9 : void *argp1 = 0 ;
22163 9 : int res1 = 0 ;
22164 9 : PyObject *swig_obj[1] ;
22165 9 : char *result = 0 ;
22166 :
22167 9 : if (!args) SWIG_fail;
22168 9 : swig_obj[0] = args;
22169 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22170 9 : if (!SWIG_IsOK(res1)) {
22171 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetAlternativeNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22172 : }
22173 9 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22174 9 : {
22175 9 : const int bLocalUseExceptions = GetUseExceptions();
22176 9 : if ( bLocalUseExceptions ) {
22177 9 : pushErrorHandler();
22178 : }
22179 9 : {
22180 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22181 9 : result = (char *)OGRFieldDefnShadow_GetAlternativeNameRef(arg1);
22182 9 : SWIG_PYTHON_THREAD_END_ALLOW;
22183 : }
22184 9 : if ( bLocalUseExceptions ) {
22185 9 : popErrorHandler();
22186 : }
22187 : #ifndef SED_HACKS
22188 : if ( bLocalUseExceptions ) {
22189 : CPLErr eclass = CPLGetLastErrorType();
22190 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22191 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22192 : }
22193 : }
22194 : #endif
22195 : }
22196 9 : resultobj = SWIG_FromCharPtr((const char *)result);
22197 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22198 : return resultobj;
22199 : fail:
22200 : return NULL;
22201 : }
22202 :
22203 :
22204 19 : SWIGINTERN PyObject *_wrap_FieldDefn_SetAlternativeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22205 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22206 19 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22207 19 : char *arg2 = (char *) 0 ;
22208 19 : void *argp1 = 0 ;
22209 19 : int res1 = 0 ;
22210 19 : int res2 ;
22211 19 : char *buf2 = 0 ;
22212 19 : int alloc2 = 0 ;
22213 19 : PyObject *swig_obj[2] ;
22214 :
22215 19 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetAlternativeName", 2, 2, swig_obj)) SWIG_fail;
22216 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22217 19 : if (!SWIG_IsOK(res1)) {
22218 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetAlternativeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22219 : }
22220 19 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22221 19 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
22222 19 : if (!SWIG_IsOK(res2)) {
22223 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetAlternativeName" "', argument " "2"" of type '" "char const *""'");
22224 : }
22225 19 : arg2 = reinterpret_cast< char * >(buf2);
22226 19 : {
22227 19 : const int bLocalUseExceptions = GetUseExceptions();
22228 19 : if ( bLocalUseExceptions ) {
22229 5 : pushErrorHandler();
22230 : }
22231 19 : {
22232 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22233 19 : OGRFieldDefnShadow_SetAlternativeName(arg1,(char const *)arg2);
22234 19 : SWIG_PYTHON_THREAD_END_ALLOW;
22235 : }
22236 19 : if ( bLocalUseExceptions ) {
22237 5 : popErrorHandler();
22238 : }
22239 : #ifndef SED_HACKS
22240 : if ( bLocalUseExceptions ) {
22241 : CPLErr eclass = CPLGetLastErrorType();
22242 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22243 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22244 : }
22245 : }
22246 : #endif
22247 : }
22248 19 : resultobj = SWIG_Py_Void();
22249 19 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
22250 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22251 : return resultobj;
22252 0 : fail:
22253 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
22254 : return NULL;
22255 : }
22256 :
22257 :
22258 3711 : SWIGINTERN PyObject *_wrap_FieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22259 3711 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22260 3711 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22261 3711 : void *argp1 = 0 ;
22262 3711 : int res1 = 0 ;
22263 3711 : PyObject *swig_obj[1] ;
22264 3711 : OGRFieldType result;
22265 :
22266 3711 : if (!args) SWIG_fail;
22267 3711 : swig_obj[0] = args;
22268 3711 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22269 3711 : if (!SWIG_IsOK(res1)) {
22270 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22271 : }
22272 3711 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22273 3711 : {
22274 3711 : const int bLocalUseExceptions = GetUseExceptions();
22275 3711 : if ( bLocalUseExceptions ) {
22276 2500 : pushErrorHandler();
22277 : }
22278 3711 : {
22279 3711 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22280 3711 : result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
22281 3711 : SWIG_PYTHON_THREAD_END_ALLOW;
22282 : }
22283 3711 : if ( bLocalUseExceptions ) {
22284 2500 : popErrorHandler();
22285 : }
22286 : #ifndef SED_HACKS
22287 : if ( bLocalUseExceptions ) {
22288 : CPLErr eclass = CPLGetLastErrorType();
22289 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22290 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22291 : }
22292 : }
22293 : #endif
22294 : }
22295 3711 : resultobj = SWIG_From_int(static_cast< int >(result));
22296 3711 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22297 : return resultobj;
22298 : fail:
22299 : return NULL;
22300 : }
22301 :
22302 :
22303 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22304 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22305 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22306 0 : OGRFieldType arg2 ;
22307 0 : void *argp1 = 0 ;
22308 0 : int res1 = 0 ;
22309 0 : int val2 ;
22310 0 : int ecode2 = 0 ;
22311 0 : PyObject *swig_obj[2] ;
22312 :
22313 0 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetType", 2, 2, swig_obj)) SWIG_fail;
22314 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22315 0 : if (!SWIG_IsOK(res1)) {
22316 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22317 : }
22318 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22319 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22320 0 : if (!SWIG_IsOK(ecode2)) {
22321 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetType" "', argument " "2"" of type '" "OGRFieldType""'");
22322 : }
22323 0 : arg2 = static_cast< OGRFieldType >(val2);
22324 0 : {
22325 0 : const int bLocalUseExceptions = GetUseExceptions();
22326 0 : if ( bLocalUseExceptions ) {
22327 0 : pushErrorHandler();
22328 : }
22329 0 : {
22330 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22331 0 : OGRFieldDefnShadow_SetType(arg1,arg2);
22332 0 : SWIG_PYTHON_THREAD_END_ALLOW;
22333 : }
22334 0 : if ( bLocalUseExceptions ) {
22335 0 : popErrorHandler();
22336 : }
22337 : #ifndef SED_HACKS
22338 : if ( bLocalUseExceptions ) {
22339 : CPLErr eclass = CPLGetLastErrorType();
22340 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22341 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22342 : }
22343 : }
22344 : #endif
22345 : }
22346 0 : resultobj = SWIG_Py_Void();
22347 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22348 : return resultobj;
22349 : fail:
22350 : return NULL;
22351 : }
22352 :
22353 :
22354 88252 : SWIGINTERN PyObject *_wrap_FieldDefn_GetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22355 88252 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22356 88252 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22357 88252 : void *argp1 = 0 ;
22358 88252 : int res1 = 0 ;
22359 88252 : PyObject *swig_obj[1] ;
22360 88252 : OGRFieldSubType result;
22361 :
22362 88252 : if (!args) SWIG_fail;
22363 88252 : swig_obj[0] = args;
22364 88252 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22365 88252 : if (!SWIG_IsOK(res1)) {
22366 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetSubType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22367 : }
22368 88252 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22369 88252 : {
22370 88252 : const int bLocalUseExceptions = GetUseExceptions();
22371 88252 : if ( bLocalUseExceptions ) {
22372 12955 : pushErrorHandler();
22373 : }
22374 88252 : {
22375 88252 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22376 88252 : result = (OGRFieldSubType)OGRFieldDefnShadow_GetSubType(arg1);
22377 88252 : SWIG_PYTHON_THREAD_END_ALLOW;
22378 : }
22379 88252 : if ( bLocalUseExceptions ) {
22380 12955 : popErrorHandler();
22381 : }
22382 : #ifndef SED_HACKS
22383 : if ( bLocalUseExceptions ) {
22384 : CPLErr eclass = CPLGetLastErrorType();
22385 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22386 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22387 : }
22388 : }
22389 : #endif
22390 : }
22391 88252 : resultobj = SWIG_From_int(static_cast< int >(result));
22392 88252 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22393 : return resultobj;
22394 : fail:
22395 : return NULL;
22396 : }
22397 :
22398 :
22399 550 : SWIGINTERN PyObject *_wrap_FieldDefn_SetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22400 550 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22401 550 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22402 550 : OGRFieldSubType arg2 ;
22403 550 : void *argp1 = 0 ;
22404 550 : int res1 = 0 ;
22405 550 : int val2 ;
22406 550 : int ecode2 = 0 ;
22407 550 : PyObject *swig_obj[2] ;
22408 :
22409 550 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetSubType", 2, 2, swig_obj)) SWIG_fail;
22410 550 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22411 550 : if (!SWIG_IsOK(res1)) {
22412 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetSubType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22413 : }
22414 550 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22415 550 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22416 550 : if (!SWIG_IsOK(ecode2)) {
22417 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetSubType" "', argument " "2"" of type '" "OGRFieldSubType""'");
22418 : }
22419 550 : arg2 = static_cast< OGRFieldSubType >(val2);
22420 550 : {
22421 550 : const int bLocalUseExceptions = GetUseExceptions();
22422 550 : if ( bLocalUseExceptions ) {
22423 135 : pushErrorHandler();
22424 : }
22425 550 : {
22426 550 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22427 550 : OGRFieldDefnShadow_SetSubType(arg1,arg2);
22428 550 : SWIG_PYTHON_THREAD_END_ALLOW;
22429 : }
22430 550 : if ( bLocalUseExceptions ) {
22431 135 : popErrorHandler();
22432 : }
22433 : #ifndef SED_HACKS
22434 : if ( bLocalUseExceptions ) {
22435 : CPLErr eclass = CPLGetLastErrorType();
22436 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22437 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22438 : }
22439 : }
22440 : #endif
22441 : }
22442 550 : resultobj = SWIG_Py_Void();
22443 550 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22444 : return resultobj;
22445 : fail:
22446 : return NULL;
22447 : }
22448 :
22449 :
22450 0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22451 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22452 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22453 0 : void *argp1 = 0 ;
22454 0 : int res1 = 0 ;
22455 0 : PyObject *swig_obj[1] ;
22456 0 : OGRJustification result;
22457 :
22458 0 : if (!args) SWIG_fail;
22459 0 : swig_obj[0] = args;
22460 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22461 0 : if (!SWIG_IsOK(res1)) {
22462 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22463 : }
22464 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22465 0 : {
22466 0 : const int bLocalUseExceptions = GetUseExceptions();
22467 0 : if ( bLocalUseExceptions ) {
22468 0 : pushErrorHandler();
22469 : }
22470 0 : {
22471 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22472 0 : result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
22473 0 : SWIG_PYTHON_THREAD_END_ALLOW;
22474 : }
22475 0 : if ( bLocalUseExceptions ) {
22476 0 : popErrorHandler();
22477 : }
22478 : #ifndef SED_HACKS
22479 : if ( bLocalUseExceptions ) {
22480 : CPLErr eclass = CPLGetLastErrorType();
22481 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22482 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22483 : }
22484 : }
22485 : #endif
22486 : }
22487 0 : resultobj = SWIG_From_int(static_cast< int >(result));
22488 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22489 : return resultobj;
22490 : fail:
22491 : return NULL;
22492 : }
22493 :
22494 :
22495 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22496 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22497 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22498 0 : OGRJustification arg2 ;
22499 0 : void *argp1 = 0 ;
22500 0 : int res1 = 0 ;
22501 0 : int val2 ;
22502 0 : int ecode2 = 0 ;
22503 0 : PyObject *swig_obj[2] ;
22504 :
22505 0 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetJustify", 2, 2, swig_obj)) SWIG_fail;
22506 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22507 0 : if (!SWIG_IsOK(res1)) {
22508 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22509 : }
22510 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22511 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22512 0 : if (!SWIG_IsOK(ecode2)) {
22513 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetJustify" "', argument " "2"" of type '" "OGRJustification""'");
22514 : }
22515 0 : arg2 = static_cast< OGRJustification >(val2);
22516 0 : {
22517 0 : const int bLocalUseExceptions = GetUseExceptions();
22518 0 : if ( bLocalUseExceptions ) {
22519 0 : pushErrorHandler();
22520 : }
22521 0 : {
22522 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22523 0 : OGRFieldDefnShadow_SetJustify(arg1,arg2);
22524 0 : SWIG_PYTHON_THREAD_END_ALLOW;
22525 : }
22526 0 : if ( bLocalUseExceptions ) {
22527 0 : popErrorHandler();
22528 : }
22529 : #ifndef SED_HACKS
22530 : if ( bLocalUseExceptions ) {
22531 : CPLErr eclass = CPLGetLastErrorType();
22532 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22533 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22534 : }
22535 : }
22536 : #endif
22537 : }
22538 0 : resultobj = SWIG_Py_Void();
22539 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22540 : return resultobj;
22541 : fail:
22542 : return NULL;
22543 : }
22544 :
22545 :
22546 2559 : SWIGINTERN PyObject *_wrap_FieldDefn_GetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22547 2559 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22548 2559 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22549 2559 : void *argp1 = 0 ;
22550 2559 : int res1 = 0 ;
22551 2559 : PyObject *swig_obj[1] ;
22552 2559 : int result;
22553 :
22554 2559 : if (!args) SWIG_fail;
22555 2559 : swig_obj[0] = args;
22556 2559 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22557 2559 : if (!SWIG_IsOK(res1)) {
22558 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22559 : }
22560 2559 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22561 2559 : {
22562 2559 : const int bLocalUseExceptions = GetUseExceptions();
22563 2559 : if ( bLocalUseExceptions ) {
22564 1313 : pushErrorHandler();
22565 : }
22566 2559 : {
22567 2559 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22568 2559 : result = (int)OGRFieldDefnShadow_GetWidth(arg1);
22569 2559 : SWIG_PYTHON_THREAD_END_ALLOW;
22570 : }
22571 2559 : if ( bLocalUseExceptions ) {
22572 1313 : popErrorHandler();
22573 : }
22574 : #ifndef SED_HACKS
22575 : if ( bLocalUseExceptions ) {
22576 : CPLErr eclass = CPLGetLastErrorType();
22577 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22578 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22579 : }
22580 : }
22581 : #endif
22582 : }
22583 2559 : resultobj = SWIG_From_int(static_cast< int >(result));
22584 2559 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22585 : return resultobj;
22586 : fail:
22587 : return NULL;
22588 : }
22589 :
22590 :
22591 314 : SWIGINTERN PyObject *_wrap_FieldDefn_SetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22592 314 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22593 314 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22594 314 : int arg2 ;
22595 314 : void *argp1 = 0 ;
22596 314 : int res1 = 0 ;
22597 314 : int val2 ;
22598 314 : int ecode2 = 0 ;
22599 314 : PyObject *swig_obj[2] ;
22600 :
22601 314 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetWidth", 2, 2, swig_obj)) SWIG_fail;
22602 314 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22603 314 : if (!SWIG_IsOK(res1)) {
22604 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22605 : }
22606 314 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22607 314 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22608 314 : if (!SWIG_IsOK(ecode2)) {
22609 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetWidth" "', argument " "2"" of type '" "int""'");
22610 : }
22611 314 : arg2 = static_cast< int >(val2);
22612 314 : {
22613 314 : const int bLocalUseExceptions = GetUseExceptions();
22614 314 : if ( bLocalUseExceptions ) {
22615 60 : pushErrorHandler();
22616 : }
22617 314 : {
22618 314 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22619 314 : OGRFieldDefnShadow_SetWidth(arg1,arg2);
22620 314 : SWIG_PYTHON_THREAD_END_ALLOW;
22621 : }
22622 314 : if ( bLocalUseExceptions ) {
22623 60 : popErrorHandler();
22624 : }
22625 : #ifndef SED_HACKS
22626 : if ( bLocalUseExceptions ) {
22627 : CPLErr eclass = CPLGetLastErrorType();
22628 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22629 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22630 : }
22631 : }
22632 : #endif
22633 : }
22634 314 : resultobj = SWIG_Py_Void();
22635 314 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22636 : return resultobj;
22637 : fail:
22638 : return NULL;
22639 : }
22640 :
22641 :
22642 1438 : SWIGINTERN PyObject *_wrap_FieldDefn_GetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22643 1438 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22644 1438 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22645 1438 : void *argp1 = 0 ;
22646 1438 : int res1 = 0 ;
22647 1438 : PyObject *swig_obj[1] ;
22648 1438 : int result;
22649 :
22650 1438 : if (!args) SWIG_fail;
22651 1438 : swig_obj[0] = args;
22652 1438 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22653 1438 : if (!SWIG_IsOK(res1)) {
22654 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22655 : }
22656 1438 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22657 1438 : {
22658 1438 : const int bLocalUseExceptions = GetUseExceptions();
22659 1438 : if ( bLocalUseExceptions ) {
22660 1308 : pushErrorHandler();
22661 : }
22662 1438 : {
22663 1438 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22664 1438 : result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
22665 1438 : SWIG_PYTHON_THREAD_END_ALLOW;
22666 : }
22667 1438 : if ( bLocalUseExceptions ) {
22668 1308 : popErrorHandler();
22669 : }
22670 : #ifndef SED_HACKS
22671 : if ( bLocalUseExceptions ) {
22672 : CPLErr eclass = CPLGetLastErrorType();
22673 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22674 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22675 : }
22676 : }
22677 : #endif
22678 : }
22679 1438 : resultobj = SWIG_From_int(static_cast< int >(result));
22680 1438 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22681 : return resultobj;
22682 : fail:
22683 : return NULL;
22684 : }
22685 :
22686 :
22687 24 : SWIGINTERN PyObject *_wrap_FieldDefn_SetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22688 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22689 24 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22690 24 : int arg2 ;
22691 24 : void *argp1 = 0 ;
22692 24 : int res1 = 0 ;
22693 24 : int val2 ;
22694 24 : int ecode2 = 0 ;
22695 24 : PyObject *swig_obj[2] ;
22696 :
22697 24 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetPrecision", 2, 2, swig_obj)) SWIG_fail;
22698 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22699 24 : if (!SWIG_IsOK(res1)) {
22700 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22701 : }
22702 24 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22703 24 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22704 24 : if (!SWIG_IsOK(ecode2)) {
22705 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetPrecision" "', argument " "2"" of type '" "int""'");
22706 : }
22707 24 : arg2 = static_cast< int >(val2);
22708 24 : {
22709 24 : const int bLocalUseExceptions = GetUseExceptions();
22710 24 : if ( bLocalUseExceptions ) {
22711 12 : pushErrorHandler();
22712 : }
22713 24 : {
22714 24 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22715 24 : OGRFieldDefnShadow_SetPrecision(arg1,arg2);
22716 24 : SWIG_PYTHON_THREAD_END_ALLOW;
22717 : }
22718 24 : if ( bLocalUseExceptions ) {
22719 12 : popErrorHandler();
22720 : }
22721 : #ifndef SED_HACKS
22722 : if ( bLocalUseExceptions ) {
22723 : CPLErr eclass = CPLGetLastErrorType();
22724 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22725 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22726 : }
22727 : }
22728 : #endif
22729 : }
22730 24 : resultobj = SWIG_Py_Void();
22731 24 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22732 : return resultobj;
22733 : fail:
22734 : return NULL;
22735 : }
22736 :
22737 :
22738 0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetTZFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22739 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22740 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22741 0 : void *argp1 = 0 ;
22742 0 : int res1 = 0 ;
22743 0 : PyObject *swig_obj[1] ;
22744 0 : int result;
22745 :
22746 0 : if (!args) SWIG_fail;
22747 0 : swig_obj[0] = args;
22748 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22749 0 : if (!SWIG_IsOK(res1)) {
22750 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTZFlag" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22751 : }
22752 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22753 0 : {
22754 0 : const int bLocalUseExceptions = GetUseExceptions();
22755 0 : if ( bLocalUseExceptions ) {
22756 0 : pushErrorHandler();
22757 : }
22758 0 : {
22759 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22760 0 : result = (int)OGRFieldDefnShadow_GetTZFlag(arg1);
22761 0 : SWIG_PYTHON_THREAD_END_ALLOW;
22762 : }
22763 0 : if ( bLocalUseExceptions ) {
22764 0 : popErrorHandler();
22765 : }
22766 : #ifndef SED_HACKS
22767 : if ( bLocalUseExceptions ) {
22768 : CPLErr eclass = CPLGetLastErrorType();
22769 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22770 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22771 : }
22772 : }
22773 : #endif
22774 : }
22775 0 : resultobj = SWIG_From_int(static_cast< int >(result));
22776 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22777 : return resultobj;
22778 : fail:
22779 : return NULL;
22780 : }
22781 :
22782 :
22783 6 : SWIGINTERN PyObject *_wrap_FieldDefn_SetTZFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22784 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22785 6 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22786 6 : int arg2 ;
22787 6 : void *argp1 = 0 ;
22788 6 : int res1 = 0 ;
22789 6 : int val2 ;
22790 6 : int ecode2 = 0 ;
22791 6 : PyObject *swig_obj[2] ;
22792 :
22793 6 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetTZFlag", 2, 2, swig_obj)) SWIG_fail;
22794 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22795 6 : if (!SWIG_IsOK(res1)) {
22796 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetTZFlag" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22797 : }
22798 6 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22799 6 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22800 6 : if (!SWIG_IsOK(ecode2)) {
22801 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetTZFlag" "', argument " "2"" of type '" "int""'");
22802 : }
22803 6 : arg2 = static_cast< int >(val2);
22804 6 : {
22805 6 : const int bLocalUseExceptions = GetUseExceptions();
22806 6 : if ( bLocalUseExceptions ) {
22807 6 : pushErrorHandler();
22808 : }
22809 6 : {
22810 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22811 6 : OGRFieldDefnShadow_SetTZFlag(arg1,arg2);
22812 6 : SWIG_PYTHON_THREAD_END_ALLOW;
22813 : }
22814 6 : if ( bLocalUseExceptions ) {
22815 6 : popErrorHandler();
22816 : }
22817 : #ifndef SED_HACKS
22818 : if ( bLocalUseExceptions ) {
22819 : CPLErr eclass = CPLGetLastErrorType();
22820 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22821 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22822 : }
22823 : }
22824 : #endif
22825 : }
22826 6 : resultobj = SWIG_Py_Void();
22827 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22828 : return resultobj;
22829 : fail:
22830 : return NULL;
22831 : }
22832 :
22833 :
22834 13 : SWIGINTERN PyObject *_wrap_FieldDefn_GetTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22835 13 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22836 13 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22837 13 : void *argp1 = 0 ;
22838 13 : int res1 = 0 ;
22839 13 : PyObject *swig_obj[1] ;
22840 13 : char *result = 0 ;
22841 :
22842 13 : if (!args) SWIG_fail;
22843 13 : swig_obj[0] = args;
22844 13 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22845 13 : if (!SWIG_IsOK(res1)) {
22846 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22847 : }
22848 13 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22849 13 : {
22850 13 : const int bLocalUseExceptions = GetUseExceptions();
22851 13 : if ( bLocalUseExceptions ) {
22852 13 : pushErrorHandler();
22853 : }
22854 13 : {
22855 13 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22856 13 : result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
22857 13 : SWIG_PYTHON_THREAD_END_ALLOW;
22858 : }
22859 13 : if ( bLocalUseExceptions ) {
22860 13 : popErrorHandler();
22861 : }
22862 : #ifndef SED_HACKS
22863 : if ( bLocalUseExceptions ) {
22864 : CPLErr eclass = CPLGetLastErrorType();
22865 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22866 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22867 : }
22868 : }
22869 : #endif
22870 : }
22871 13 : resultobj = SWIG_FromCharPtr((const char *)result);
22872 13 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22873 : return resultobj;
22874 : fail:
22875 : return NULL;
22876 : }
22877 :
22878 :
22879 36 : SWIGINTERN PyObject *_wrap_FieldDefn_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22880 36 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22881 36 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22882 36 : OGRFieldType arg2 ;
22883 36 : void *argp1 = 0 ;
22884 36 : int res1 = 0 ;
22885 36 : int val2 ;
22886 36 : int ecode2 = 0 ;
22887 36 : PyObject *swig_obj[2] ;
22888 36 : char *result = 0 ;
22889 :
22890 36 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_GetFieldTypeName", 2, 2, swig_obj)) SWIG_fail;
22891 36 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22892 36 : if (!SWIG_IsOK(res1)) {
22893 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22894 : }
22895 36 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22896 36 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22897 36 : if (!SWIG_IsOK(ecode2)) {
22898 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "2"" of type '" "OGRFieldType""'");
22899 : }
22900 36 : arg2 = static_cast< OGRFieldType >(val2);
22901 36 : {
22902 36 : const int bLocalUseExceptions = GetUseExceptions();
22903 36 : if ( bLocalUseExceptions ) {
22904 0 : pushErrorHandler();
22905 : }
22906 36 : {
22907 36 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22908 36 : result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
22909 36 : SWIG_PYTHON_THREAD_END_ALLOW;
22910 : }
22911 36 : if ( bLocalUseExceptions ) {
22912 0 : popErrorHandler();
22913 : }
22914 : #ifndef SED_HACKS
22915 : if ( bLocalUseExceptions ) {
22916 : CPLErr eclass = CPLGetLastErrorType();
22917 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22918 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22919 : }
22920 : }
22921 : #endif
22922 : }
22923 36 : resultobj = SWIG_FromCharPtr((const char *)result);
22924 36 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22925 : return resultobj;
22926 : fail:
22927 : return NULL;
22928 : }
22929 :
22930 :
22931 6 : SWIGINTERN PyObject *_wrap_FieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22932 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22933 6 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22934 6 : void *argp1 = 0 ;
22935 6 : int res1 = 0 ;
22936 6 : PyObject *swig_obj[1] ;
22937 6 : int result;
22938 :
22939 6 : if (!args) SWIG_fail;
22940 6 : swig_obj[0] = args;
22941 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22942 6 : if (!SWIG_IsOK(res1)) {
22943 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22944 : }
22945 6 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22946 6 : {
22947 6 : const int bLocalUseExceptions = GetUseExceptions();
22948 6 : if ( bLocalUseExceptions ) {
22949 2 : pushErrorHandler();
22950 : }
22951 6 : {
22952 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
22953 6 : result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
22954 6 : SWIG_PYTHON_THREAD_END_ALLOW;
22955 : }
22956 6 : if ( bLocalUseExceptions ) {
22957 2 : popErrorHandler();
22958 : }
22959 : #ifndef SED_HACKS
22960 : if ( bLocalUseExceptions ) {
22961 : CPLErr eclass = CPLGetLastErrorType();
22962 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
22963 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
22964 : }
22965 : }
22966 : #endif
22967 : }
22968 6 : resultobj = SWIG_From_int(static_cast< int >(result));
22969 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
22970 : return resultobj;
22971 : fail:
22972 : return NULL;
22973 : }
22974 :
22975 :
22976 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22977 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
22978 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
22979 0 : int arg2 ;
22980 0 : void *argp1 = 0 ;
22981 0 : int res1 = 0 ;
22982 0 : int val2 ;
22983 0 : int ecode2 = 0 ;
22984 0 : PyObject *swig_obj[2] ;
22985 :
22986 0 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetIgnored", 2, 2, swig_obj)) SWIG_fail;
22987 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
22988 0 : if (!SWIG_IsOK(res1)) {
22989 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
22990 : }
22991 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
22992 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
22993 0 : if (!SWIG_IsOK(ecode2)) {
22994 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
22995 : }
22996 0 : arg2 = static_cast< int >(val2);
22997 0 : {
22998 0 : const int bLocalUseExceptions = GetUseExceptions();
22999 0 : if ( bLocalUseExceptions ) {
23000 0 : pushErrorHandler();
23001 : }
23002 0 : {
23003 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23004 0 : OGRFieldDefnShadow_SetIgnored(arg1,arg2);
23005 0 : SWIG_PYTHON_THREAD_END_ALLOW;
23006 : }
23007 0 : if ( bLocalUseExceptions ) {
23008 0 : popErrorHandler();
23009 : }
23010 : #ifndef SED_HACKS
23011 : if ( bLocalUseExceptions ) {
23012 : CPLErr eclass = CPLGetLastErrorType();
23013 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23014 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23015 : }
23016 : }
23017 : #endif
23018 : }
23019 0 : resultobj = SWIG_Py_Void();
23020 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23021 : return resultobj;
23022 : fail:
23023 : return NULL;
23024 : }
23025 :
23026 :
23027 80 : SWIGINTERN PyObject *_wrap_FieldDefn_IsNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23028 80 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23029 80 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23030 80 : void *argp1 = 0 ;
23031 80 : int res1 = 0 ;
23032 80 : PyObject *swig_obj[1] ;
23033 80 : int result;
23034 :
23035 80 : if (!args) SWIG_fail;
23036 80 : swig_obj[0] = args;
23037 80 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23038 80 : if (!SWIG_IsOK(res1)) {
23039 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsNullable" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23040 : }
23041 80 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23042 80 : {
23043 80 : const int bLocalUseExceptions = GetUseExceptions();
23044 80 : if ( bLocalUseExceptions ) {
23045 43 : pushErrorHandler();
23046 : }
23047 80 : {
23048 80 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23049 80 : result = (int)OGRFieldDefnShadow_IsNullable(arg1);
23050 80 : SWIG_PYTHON_THREAD_END_ALLOW;
23051 : }
23052 80 : if ( bLocalUseExceptions ) {
23053 43 : popErrorHandler();
23054 : }
23055 : #ifndef SED_HACKS
23056 : if ( bLocalUseExceptions ) {
23057 : CPLErr eclass = CPLGetLastErrorType();
23058 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23059 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23060 : }
23061 : }
23062 : #endif
23063 : }
23064 80 : resultobj = SWIG_From_int(static_cast< int >(result));
23065 80 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23066 : return resultobj;
23067 : fail:
23068 : return NULL;
23069 : }
23070 :
23071 :
23072 190 : SWIGINTERN PyObject *_wrap_FieldDefn_SetNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23073 190 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23074 190 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23075 190 : int arg2 ;
23076 190 : void *argp1 = 0 ;
23077 190 : int res1 = 0 ;
23078 190 : int val2 ;
23079 190 : int ecode2 = 0 ;
23080 190 : PyObject *swig_obj[2] ;
23081 :
23082 190 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetNullable", 2, 2, swig_obj)) SWIG_fail;
23083 190 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23084 190 : if (!SWIG_IsOK(res1)) {
23085 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetNullable" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23086 : }
23087 190 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23088 190 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
23089 190 : if (!SWIG_IsOK(ecode2)) {
23090 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetNullable" "', argument " "2"" of type '" "int""'");
23091 : }
23092 190 : arg2 = static_cast< int >(val2);
23093 190 : {
23094 190 : const int bLocalUseExceptions = GetUseExceptions();
23095 190 : if ( bLocalUseExceptions ) {
23096 118 : pushErrorHandler();
23097 : }
23098 190 : {
23099 190 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23100 190 : OGRFieldDefnShadow_SetNullable(arg1,arg2);
23101 190 : SWIG_PYTHON_THREAD_END_ALLOW;
23102 : }
23103 190 : if ( bLocalUseExceptions ) {
23104 118 : popErrorHandler();
23105 : }
23106 : #ifndef SED_HACKS
23107 : if ( bLocalUseExceptions ) {
23108 : CPLErr eclass = CPLGetLastErrorType();
23109 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23110 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23111 : }
23112 : }
23113 : #endif
23114 : }
23115 190 : resultobj = SWIG_Py_Void();
23116 190 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23117 : return resultobj;
23118 : fail:
23119 : return NULL;
23120 : }
23121 :
23122 :
23123 78 : SWIGINTERN PyObject *_wrap_FieldDefn_IsUnique(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23124 78 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23125 78 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23126 78 : void *argp1 = 0 ;
23127 78 : int res1 = 0 ;
23128 78 : PyObject *swig_obj[1] ;
23129 78 : int result;
23130 :
23131 78 : if (!args) SWIG_fail;
23132 78 : swig_obj[0] = args;
23133 78 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23134 78 : if (!SWIG_IsOK(res1)) {
23135 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsUnique" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23136 : }
23137 78 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23138 78 : {
23139 78 : const int bLocalUseExceptions = GetUseExceptions();
23140 78 : if ( bLocalUseExceptions ) {
23141 2 : pushErrorHandler();
23142 : }
23143 78 : {
23144 78 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23145 78 : result = (int)OGRFieldDefnShadow_IsUnique(arg1);
23146 78 : SWIG_PYTHON_THREAD_END_ALLOW;
23147 : }
23148 78 : if ( bLocalUseExceptions ) {
23149 2 : popErrorHandler();
23150 : }
23151 : #ifndef SED_HACKS
23152 : if ( bLocalUseExceptions ) {
23153 : CPLErr eclass = CPLGetLastErrorType();
23154 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23155 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23156 : }
23157 : }
23158 : #endif
23159 : }
23160 78 : resultobj = SWIG_From_int(static_cast< int >(result));
23161 78 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23162 : return resultobj;
23163 : fail:
23164 : return NULL;
23165 : }
23166 :
23167 :
23168 28 : SWIGINTERN PyObject *_wrap_FieldDefn_SetUnique(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23169 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23170 28 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23171 28 : int arg2 ;
23172 28 : void *argp1 = 0 ;
23173 28 : int res1 = 0 ;
23174 28 : int val2 ;
23175 28 : int ecode2 = 0 ;
23176 28 : PyObject *swig_obj[2] ;
23177 :
23178 28 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetUnique", 2, 2, swig_obj)) SWIG_fail;
23179 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23180 28 : if (!SWIG_IsOK(res1)) {
23181 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetUnique" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23182 : }
23183 28 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23184 28 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
23185 28 : if (!SWIG_IsOK(ecode2)) {
23186 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetUnique" "', argument " "2"" of type '" "int""'");
23187 : }
23188 28 : arg2 = static_cast< int >(val2);
23189 28 : {
23190 28 : const int bLocalUseExceptions = GetUseExceptions();
23191 28 : if ( bLocalUseExceptions ) {
23192 4 : pushErrorHandler();
23193 : }
23194 28 : {
23195 28 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23196 28 : OGRFieldDefnShadow_SetUnique(arg1,arg2);
23197 28 : SWIG_PYTHON_THREAD_END_ALLOW;
23198 : }
23199 28 : if ( bLocalUseExceptions ) {
23200 4 : popErrorHandler();
23201 : }
23202 : #ifndef SED_HACKS
23203 : if ( bLocalUseExceptions ) {
23204 : CPLErr eclass = CPLGetLastErrorType();
23205 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23206 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23207 : }
23208 : }
23209 : #endif
23210 : }
23211 28 : resultobj = SWIG_Py_Void();
23212 28 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23213 : return resultobj;
23214 : fail:
23215 : return NULL;
23216 : }
23217 :
23218 :
23219 141 : SWIGINTERN PyObject *_wrap_FieldDefn_GetDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23220 141 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23221 141 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23222 141 : void *argp1 = 0 ;
23223 141 : int res1 = 0 ;
23224 141 : PyObject *swig_obj[1] ;
23225 141 : char *result = 0 ;
23226 :
23227 141 : if (!args) SWIG_fail;
23228 141 : swig_obj[0] = args;
23229 141 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23230 141 : if (!SWIG_IsOK(res1)) {
23231 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetDefault" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23232 : }
23233 141 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23234 141 : {
23235 141 : const int bLocalUseExceptions = GetUseExceptions();
23236 141 : if ( bLocalUseExceptions ) {
23237 27 : pushErrorHandler();
23238 : }
23239 141 : {
23240 141 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23241 141 : result = (char *)OGRFieldDefnShadow_GetDefault(arg1);
23242 141 : SWIG_PYTHON_THREAD_END_ALLOW;
23243 : }
23244 141 : if ( bLocalUseExceptions ) {
23245 27 : popErrorHandler();
23246 : }
23247 : #ifndef SED_HACKS
23248 : if ( bLocalUseExceptions ) {
23249 : CPLErr eclass = CPLGetLastErrorType();
23250 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23251 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23252 : }
23253 : }
23254 : #endif
23255 : }
23256 141 : resultobj = SWIG_FromCharPtr((const char *)result);
23257 141 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23258 : return resultobj;
23259 : fail:
23260 : return NULL;
23261 : }
23262 :
23263 :
23264 154 : SWIGINTERN PyObject *_wrap_FieldDefn_SetDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23265 154 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23266 154 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23267 154 : char *arg2 = (char *) 0 ;
23268 154 : void *argp1 = 0 ;
23269 154 : int res1 = 0 ;
23270 154 : int res2 ;
23271 154 : char *buf2 = 0 ;
23272 154 : int alloc2 = 0 ;
23273 154 : PyObject *swig_obj[2] ;
23274 :
23275 154 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetDefault", 2, 2, swig_obj)) SWIG_fail;
23276 154 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23277 154 : if (!SWIG_IsOK(res1)) {
23278 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetDefault" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23279 : }
23280 154 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23281 154 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
23282 154 : if (!SWIG_IsOK(res2)) {
23283 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetDefault" "', argument " "2"" of type '" "char const *""'");
23284 : }
23285 154 : arg2 = reinterpret_cast< char * >(buf2);
23286 154 : {
23287 154 : const int bLocalUseExceptions = GetUseExceptions();
23288 154 : if ( bLocalUseExceptions ) {
23289 11 : pushErrorHandler();
23290 : }
23291 154 : {
23292 154 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23293 154 : OGRFieldDefnShadow_SetDefault(arg1,(char const *)arg2);
23294 154 : SWIG_PYTHON_THREAD_END_ALLOW;
23295 : }
23296 154 : if ( bLocalUseExceptions ) {
23297 11 : popErrorHandler();
23298 : }
23299 : #ifndef SED_HACKS
23300 : if ( bLocalUseExceptions ) {
23301 : CPLErr eclass = CPLGetLastErrorType();
23302 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23303 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23304 : }
23305 : }
23306 : #endif
23307 : }
23308 154 : resultobj = SWIG_Py_Void();
23309 154 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23310 154 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23311 : return resultobj;
23312 0 : fail:
23313 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23314 : return NULL;
23315 : }
23316 :
23317 :
23318 3 : SWIGINTERN PyObject *_wrap_FieldDefn_IsDefaultDriverSpecific(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23319 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23320 3 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23321 3 : void *argp1 = 0 ;
23322 3 : int res1 = 0 ;
23323 3 : PyObject *swig_obj[1] ;
23324 3 : int result;
23325 :
23326 3 : if (!args) SWIG_fail;
23327 3 : swig_obj[0] = args;
23328 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23329 3 : if (!SWIG_IsOK(res1)) {
23330 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsDefaultDriverSpecific" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23331 : }
23332 3 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23333 3 : {
23334 3 : const int bLocalUseExceptions = GetUseExceptions();
23335 3 : if ( bLocalUseExceptions ) {
23336 3 : pushErrorHandler();
23337 : }
23338 3 : {
23339 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23340 3 : result = (int)OGRFieldDefnShadow_IsDefaultDriverSpecific(arg1);
23341 3 : SWIG_PYTHON_THREAD_END_ALLOW;
23342 : }
23343 3 : if ( bLocalUseExceptions ) {
23344 3 : popErrorHandler();
23345 : }
23346 : #ifndef SED_HACKS
23347 : if ( bLocalUseExceptions ) {
23348 : CPLErr eclass = CPLGetLastErrorType();
23349 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23350 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23351 : }
23352 : }
23353 : #endif
23354 : }
23355 3 : resultobj = SWIG_From_int(static_cast< int >(result));
23356 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23357 : return resultobj;
23358 : fail:
23359 : return NULL;
23360 : }
23361 :
23362 :
23363 34 : SWIGINTERN PyObject *_wrap_FieldDefn_GetDomainName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23364 34 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23365 34 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23366 34 : void *argp1 = 0 ;
23367 34 : int res1 = 0 ;
23368 34 : PyObject *swig_obj[1] ;
23369 34 : char *result = 0 ;
23370 :
23371 34 : if (!args) SWIG_fail;
23372 34 : swig_obj[0] = args;
23373 34 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23374 34 : if (!SWIG_IsOK(res1)) {
23375 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetDomainName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23376 : }
23377 34 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23378 34 : {
23379 34 : const int bLocalUseExceptions = GetUseExceptions();
23380 34 : if ( bLocalUseExceptions ) {
23381 23 : pushErrorHandler();
23382 : }
23383 34 : {
23384 34 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23385 34 : result = (char *)OGRFieldDefnShadow_GetDomainName(arg1);
23386 34 : SWIG_PYTHON_THREAD_END_ALLOW;
23387 : }
23388 34 : if ( bLocalUseExceptions ) {
23389 23 : popErrorHandler();
23390 : }
23391 : #ifndef SED_HACKS
23392 : if ( bLocalUseExceptions ) {
23393 : CPLErr eclass = CPLGetLastErrorType();
23394 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23395 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23396 : }
23397 : }
23398 : #endif
23399 : }
23400 34 : resultobj = SWIG_FromCharPtr((const char *)result);
23401 34 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23402 : return resultobj;
23403 : fail:
23404 : return NULL;
23405 : }
23406 :
23407 :
23408 21 : SWIGINTERN PyObject *_wrap_FieldDefn_SetDomainName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23409 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23410 21 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23411 21 : char *arg2 = (char *) 0 ;
23412 21 : void *argp1 = 0 ;
23413 21 : int res1 = 0 ;
23414 21 : int res2 ;
23415 21 : char *buf2 = 0 ;
23416 21 : int alloc2 = 0 ;
23417 21 : PyObject *swig_obj[2] ;
23418 :
23419 21 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetDomainName", 2, 2, swig_obj)) SWIG_fail;
23420 21 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23421 21 : if (!SWIG_IsOK(res1)) {
23422 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetDomainName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23423 : }
23424 21 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23425 21 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
23426 21 : if (!SWIG_IsOK(res2)) {
23427 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetDomainName" "', argument " "2"" of type '" "char const *""'");
23428 : }
23429 21 : arg2 = reinterpret_cast< char * >(buf2);
23430 21 : {
23431 21 : if (!arg2) {
23432 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
23433 : }
23434 : }
23435 21 : {
23436 21 : const int bLocalUseExceptions = GetUseExceptions();
23437 21 : if ( bLocalUseExceptions ) {
23438 9 : pushErrorHandler();
23439 : }
23440 21 : {
23441 21 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23442 21 : OGRFieldDefnShadow_SetDomainName(arg1,(char const *)arg2);
23443 21 : SWIG_PYTHON_THREAD_END_ALLOW;
23444 : }
23445 21 : if ( bLocalUseExceptions ) {
23446 9 : popErrorHandler();
23447 : }
23448 : #ifndef SED_HACKS
23449 : if ( bLocalUseExceptions ) {
23450 : CPLErr eclass = CPLGetLastErrorType();
23451 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23452 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23453 : }
23454 : }
23455 : #endif
23456 : }
23457 21 : resultobj = SWIG_Py_Void();
23458 21 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23459 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23460 : return resultobj;
23461 0 : fail:
23462 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23463 : return NULL;
23464 : }
23465 :
23466 :
23467 58 : SWIGINTERN PyObject *_wrap_FieldDefn_GetComment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23468 58 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23469 58 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23470 58 : void *argp1 = 0 ;
23471 58 : int res1 = 0 ;
23472 58 : PyObject *swig_obj[1] ;
23473 58 : char *result = 0 ;
23474 :
23475 58 : if (!args) SWIG_fail;
23476 58 : swig_obj[0] = args;
23477 58 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23478 58 : if (!SWIG_IsOK(res1)) {
23479 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetComment" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23480 : }
23481 58 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23482 58 : {
23483 58 : const int bLocalUseExceptions = GetUseExceptions();
23484 58 : if ( bLocalUseExceptions ) {
23485 4 : pushErrorHandler();
23486 : }
23487 58 : {
23488 58 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23489 58 : result = (char *)OGRFieldDefnShadow_GetComment(arg1);
23490 58 : SWIG_PYTHON_THREAD_END_ALLOW;
23491 : }
23492 58 : if ( bLocalUseExceptions ) {
23493 4 : popErrorHandler();
23494 : }
23495 : #ifndef SED_HACKS
23496 : if ( bLocalUseExceptions ) {
23497 : CPLErr eclass = CPLGetLastErrorType();
23498 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23499 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23500 : }
23501 : }
23502 : #endif
23503 : }
23504 58 : resultobj = SWIG_FromCharPtr((const char *)result);
23505 58 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23506 : return resultobj;
23507 : fail:
23508 : return NULL;
23509 : }
23510 :
23511 :
23512 31 : SWIGINTERN PyObject *_wrap_FieldDefn_SetComment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23513 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23514 31 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
23515 31 : char *arg2 = (char *) 0 ;
23516 31 : void *argp1 = 0 ;
23517 31 : int res1 = 0 ;
23518 31 : int res2 ;
23519 31 : char *buf2 = 0 ;
23520 31 : int alloc2 = 0 ;
23521 31 : PyObject *swig_obj[2] ;
23522 :
23523 31 : if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetComment", 2, 2, swig_obj)) SWIG_fail;
23524 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
23525 31 : if (!SWIG_IsOK(res1)) {
23526 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetComment" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
23527 : }
23528 31 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
23529 31 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
23530 31 : if (!SWIG_IsOK(res2)) {
23531 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetComment" "', argument " "2"" of type '" "char const *""'");
23532 : }
23533 31 : arg2 = reinterpret_cast< char * >(buf2);
23534 31 : {
23535 31 : const int bLocalUseExceptions = GetUseExceptions();
23536 31 : if ( bLocalUseExceptions ) {
23537 4 : pushErrorHandler();
23538 : }
23539 31 : {
23540 31 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23541 31 : OGRFieldDefnShadow_SetComment(arg1,(char const *)arg2);
23542 31 : SWIG_PYTHON_THREAD_END_ALLOW;
23543 : }
23544 31 : if ( bLocalUseExceptions ) {
23545 4 : popErrorHandler();
23546 : }
23547 : #ifndef SED_HACKS
23548 : if ( bLocalUseExceptions ) {
23549 : CPLErr eclass = CPLGetLastErrorType();
23550 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23551 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23552 : }
23553 : }
23554 : #endif
23555 : }
23556 31 : resultobj = SWIG_Py_Void();
23557 31 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23558 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23559 : return resultobj;
23560 0 : fail:
23561 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23562 : return NULL;
23563 : }
23564 :
23565 :
23566 271 : SWIGINTERN PyObject *FieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23567 271 : PyObject *obj;
23568 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
23569 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDefnShadow, SWIG_NewClientData(obj));
23570 271 : return SWIG_Py_Void();
23571 : }
23572 :
23573 75751 : SWIGINTERN PyObject *FieldDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23574 75751 : return SWIG_Python_InitShadowInstance(args);
23575 : }
23576 :
23577 168 : SWIGINTERN PyObject *_wrap_delete_GeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23578 168 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23579 168 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23580 168 : void *argp1 = 0 ;
23581 168 : int res1 = 0 ;
23582 168 : PyObject *swig_obj[1] ;
23583 :
23584 168 : if (!args) SWIG_fail;
23585 168 : swig_obj[0] = args;
23586 168 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_POINTER_DISOWN | 0 );
23587 168 : if (!SWIG_IsOK(res1)) {
23588 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomFieldDefn" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23589 : }
23590 168 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23591 168 : {
23592 168 : const int bLocalUseExceptions = GetUseExceptions();
23593 168 : if ( bLocalUseExceptions ) {
23594 56 : pushErrorHandler();
23595 : }
23596 168 : {
23597 168 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23598 168 : delete_OGRGeomFieldDefnShadow(arg1);
23599 168 : SWIG_PYTHON_THREAD_END_ALLOW;
23600 : }
23601 168 : if ( bLocalUseExceptions ) {
23602 56 : popErrorHandler();
23603 : }
23604 : #ifndef SED_HACKS
23605 : if ( bLocalUseExceptions ) {
23606 : CPLErr eclass = CPLGetLastErrorType();
23607 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23608 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23609 : }
23610 : }
23611 : #endif
23612 : }
23613 168 : resultobj = SWIG_Py_Void();
23614 168 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23615 : return resultobj;
23616 : fail:
23617 : return NULL;
23618 : }
23619 :
23620 :
23621 168 : SWIGINTERN PyObject *_wrap_new_GeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
23622 168 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23623 168 : char *arg1 = (char *) "" ;
23624 168 : OGRwkbGeometryType arg2 = (OGRwkbGeometryType) wkbUnknown ;
23625 168 : int res1 ;
23626 168 : char *buf1 = 0 ;
23627 168 : int alloc1 = 0 ;
23628 168 : int val2 ;
23629 168 : int ecode2 = 0 ;
23630 168 : PyObject * obj0 = 0 ;
23631 168 : PyObject * obj1 = 0 ;
23632 168 : char * kwnames[] = {
23633 : (char *)"name_null_ok", (char *)"field_type", NULL
23634 : };
23635 168 : OGRGeomFieldDefnShadow *result = 0 ;
23636 :
23637 168 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:new_GeomFieldDefn", kwnames, &obj0, &obj1)) SWIG_fail;
23638 168 : if (obj0) {
23639 165 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
23640 165 : if (!SWIG_IsOK(res1)) {
23641 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GeomFieldDefn" "', argument " "1"" of type '" "char const *""'");
23642 : }
23643 165 : arg1 = reinterpret_cast< char * >(buf1);
23644 : }
23645 168 : if (obj1) {
23646 152 : ecode2 = SWIG_AsVal_int(obj1, &val2);
23647 152 : if (!SWIG_IsOK(ecode2)) {
23648 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GeomFieldDefn" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
23649 : }
23650 152 : arg2 = static_cast< OGRwkbGeometryType >(val2);
23651 : }
23652 168 : {
23653 168 : const int bLocalUseExceptions = GetUseExceptions();
23654 168 : if ( bLocalUseExceptions ) {
23655 56 : pushErrorHandler();
23656 : }
23657 168 : {
23658 168 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23659 168 : result = (OGRGeomFieldDefnShadow *)new_OGRGeomFieldDefnShadow((char const *)arg1,arg2);
23660 168 : SWIG_PYTHON_THREAD_END_ALLOW;
23661 : }
23662 168 : if ( bLocalUseExceptions ) {
23663 56 : popErrorHandler();
23664 : }
23665 : #ifndef SED_HACKS
23666 : if ( bLocalUseExceptions ) {
23667 : CPLErr eclass = CPLGetLastErrorType();
23668 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23669 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23670 : }
23671 : }
23672 : #endif
23673 : }
23674 168 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_POINTER_NEW | 0 );
23675 168 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
23676 168 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23677 : return resultobj;
23678 0 : fail:
23679 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
23680 : return NULL;
23681 : }
23682 :
23683 :
23684 170 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23685 170 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23686 170 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23687 170 : void *argp1 = 0 ;
23688 170 : int res1 = 0 ;
23689 170 : PyObject *swig_obj[1] ;
23690 170 : char *result = 0 ;
23691 :
23692 170 : if (!args) SWIG_fail;
23693 170 : swig_obj[0] = args;
23694 170 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23695 170 : if (!SWIG_IsOK(res1)) {
23696 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetName" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23697 : }
23698 170 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23699 170 : {
23700 170 : const int bLocalUseExceptions = GetUseExceptions();
23701 170 : if ( bLocalUseExceptions ) {
23702 124 : pushErrorHandler();
23703 : }
23704 170 : {
23705 170 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23706 170 : result = (char *)OGRGeomFieldDefnShadow_GetName(arg1);
23707 170 : SWIG_PYTHON_THREAD_END_ALLOW;
23708 : }
23709 170 : if ( bLocalUseExceptions ) {
23710 124 : popErrorHandler();
23711 : }
23712 : #ifndef SED_HACKS
23713 : if ( bLocalUseExceptions ) {
23714 : CPLErr eclass = CPLGetLastErrorType();
23715 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23716 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23717 : }
23718 : }
23719 : #endif
23720 : }
23721 170 : resultobj = SWIG_FromCharPtr((const char *)result);
23722 170 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23723 : return resultobj;
23724 : fail:
23725 : return NULL;
23726 : }
23727 :
23728 :
23729 82 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23730 82 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23731 82 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23732 82 : void *argp1 = 0 ;
23733 82 : int res1 = 0 ;
23734 82 : PyObject *swig_obj[1] ;
23735 82 : char *result = 0 ;
23736 :
23737 82 : if (!args) SWIG_fail;
23738 82 : swig_obj[0] = args;
23739 82 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23740 82 : if (!SWIG_IsOK(res1)) {
23741 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23742 : }
23743 82 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23744 82 : {
23745 82 : const int bLocalUseExceptions = GetUseExceptions();
23746 82 : if ( bLocalUseExceptions ) {
23747 0 : pushErrorHandler();
23748 : }
23749 82 : {
23750 82 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23751 82 : result = (char *)OGRGeomFieldDefnShadow_GetNameRef(arg1);
23752 82 : SWIG_PYTHON_THREAD_END_ALLOW;
23753 : }
23754 82 : if ( bLocalUseExceptions ) {
23755 0 : popErrorHandler();
23756 : }
23757 : #ifndef SED_HACKS
23758 : if ( bLocalUseExceptions ) {
23759 : CPLErr eclass = CPLGetLastErrorType();
23760 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23761 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23762 : }
23763 : }
23764 : #endif
23765 : }
23766 82 : resultobj = SWIG_FromCharPtr((const char *)result);
23767 82 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23768 : return resultobj;
23769 : fail:
23770 : return NULL;
23771 : }
23772 :
23773 :
23774 4 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23775 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23776 4 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23777 4 : char *arg2 = (char *) 0 ;
23778 4 : void *argp1 = 0 ;
23779 4 : int res1 = 0 ;
23780 4 : int res2 ;
23781 4 : char *buf2 = 0 ;
23782 4 : int alloc2 = 0 ;
23783 4 : PyObject *swig_obj[2] ;
23784 :
23785 4 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetName", 2, 2, swig_obj)) SWIG_fail;
23786 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23787 4 : if (!SWIG_IsOK(res1)) {
23788 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetName" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23789 : }
23790 4 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23791 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
23792 4 : if (!SWIG_IsOK(res2)) {
23793 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
23794 : }
23795 4 : arg2 = reinterpret_cast< char * >(buf2);
23796 4 : {
23797 4 : if (!arg2) {
23798 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
23799 : }
23800 : }
23801 4 : {
23802 4 : const int bLocalUseExceptions = GetUseExceptions();
23803 4 : if ( bLocalUseExceptions ) {
23804 2 : pushErrorHandler();
23805 : }
23806 4 : {
23807 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23808 4 : OGRGeomFieldDefnShadow_SetName(arg1,(char const *)arg2);
23809 4 : SWIG_PYTHON_THREAD_END_ALLOW;
23810 : }
23811 4 : if ( bLocalUseExceptions ) {
23812 2 : popErrorHandler();
23813 : }
23814 : #ifndef SED_HACKS
23815 : if ( bLocalUseExceptions ) {
23816 : CPLErr eclass = CPLGetLastErrorType();
23817 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23818 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23819 : }
23820 : }
23821 : #endif
23822 : }
23823 4 : resultobj = SWIG_Py_Void();
23824 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23825 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23826 : return resultobj;
23827 0 : fail:
23828 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
23829 : return NULL;
23830 : }
23831 :
23832 :
23833 85 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23834 85 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23835 85 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23836 85 : void *argp1 = 0 ;
23837 85 : int res1 = 0 ;
23838 85 : PyObject *swig_obj[1] ;
23839 85 : OGRwkbGeometryType result;
23840 :
23841 85 : if (!args) SWIG_fail;
23842 85 : swig_obj[0] = args;
23843 85 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23844 85 : if (!SWIG_IsOK(res1)) {
23845 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetType" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23846 : }
23847 85 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23848 85 : {
23849 85 : const int bLocalUseExceptions = GetUseExceptions();
23850 85 : if ( bLocalUseExceptions ) {
23851 17 : pushErrorHandler();
23852 : }
23853 85 : {
23854 85 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23855 85 : result = (OGRwkbGeometryType)OGRGeomFieldDefnShadow_GetType(arg1);
23856 85 : SWIG_PYTHON_THREAD_END_ALLOW;
23857 : }
23858 85 : if ( bLocalUseExceptions ) {
23859 17 : popErrorHandler();
23860 : }
23861 : #ifndef SED_HACKS
23862 : if ( bLocalUseExceptions ) {
23863 : CPLErr eclass = CPLGetLastErrorType();
23864 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23865 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23866 : }
23867 : }
23868 : #endif
23869 : }
23870 85 : resultobj = SWIG_From_int(static_cast< int >(result));
23871 85 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23872 : return resultobj;
23873 : fail:
23874 : return NULL;
23875 : }
23876 :
23877 :
23878 2 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23879 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23880 2 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23881 2 : OGRwkbGeometryType arg2 ;
23882 2 : void *argp1 = 0 ;
23883 2 : int res1 = 0 ;
23884 2 : int val2 ;
23885 2 : int ecode2 = 0 ;
23886 2 : PyObject *swig_obj[2] ;
23887 :
23888 2 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetType", 2, 2, swig_obj)) SWIG_fail;
23889 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23890 2 : if (!SWIG_IsOK(res1)) {
23891 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetType" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23892 : }
23893 2 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23894 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
23895 2 : if (!SWIG_IsOK(ecode2)) {
23896 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
23897 : }
23898 2 : arg2 = static_cast< OGRwkbGeometryType >(val2);
23899 2 : {
23900 2 : const int bLocalUseExceptions = GetUseExceptions();
23901 2 : if ( bLocalUseExceptions ) {
23902 0 : pushErrorHandler();
23903 : }
23904 2 : {
23905 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23906 2 : OGRGeomFieldDefnShadow_SetType(arg1,arg2);
23907 2 : SWIG_PYTHON_THREAD_END_ALLOW;
23908 : }
23909 2 : if ( bLocalUseExceptions ) {
23910 0 : popErrorHandler();
23911 : }
23912 : #ifndef SED_HACKS
23913 : if ( bLocalUseExceptions ) {
23914 : CPLErr eclass = CPLGetLastErrorType();
23915 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23916 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23917 : }
23918 : }
23919 : #endif
23920 : }
23921 2 : resultobj = SWIG_Py_Void();
23922 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23923 : return resultobj;
23924 : fail:
23925 : return NULL;
23926 : }
23927 :
23928 :
23929 79 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23930 79 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23931 79 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23932 79 : void *argp1 = 0 ;
23933 79 : int res1 = 0 ;
23934 79 : PyObject *swig_obj[1] ;
23935 79 : OSRSpatialReferenceShadow *result = 0 ;
23936 :
23937 79 : if (!args) SWIG_fail;
23938 79 : swig_obj[0] = args;
23939 79 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23940 79 : if (!SWIG_IsOK(res1)) {
23941 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetSpatialRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23942 : }
23943 79 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23944 79 : {
23945 79 : const int bLocalUseExceptions = GetUseExceptions();
23946 79 : if ( bLocalUseExceptions ) {
23947 16 : pushErrorHandler();
23948 : }
23949 79 : {
23950 79 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
23951 79 : result = (OSRSpatialReferenceShadow *)OGRGeomFieldDefnShadow_GetSpatialRef(arg1);
23952 79 : SWIG_PYTHON_THREAD_END_ALLOW;
23953 : }
23954 79 : if ( bLocalUseExceptions ) {
23955 16 : popErrorHandler();
23956 : }
23957 : #ifndef SED_HACKS
23958 : if ( bLocalUseExceptions ) {
23959 : CPLErr eclass = CPLGetLastErrorType();
23960 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
23961 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
23962 : }
23963 : }
23964 : #endif
23965 : }
23966 79 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
23967 79 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
23968 : return resultobj;
23969 : fail:
23970 : return NULL;
23971 : }
23972 :
23973 :
23974 46 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23975 46 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
23976 46 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
23977 46 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
23978 46 : void *argp1 = 0 ;
23979 46 : int res1 = 0 ;
23980 46 : void *argp2 = 0 ;
23981 46 : int res2 = 0 ;
23982 46 : PyObject *swig_obj[2] ;
23983 :
23984 46 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
23985 46 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
23986 46 : if (!SWIG_IsOK(res1)) {
23987 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetSpatialRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
23988 : }
23989 46 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
23990 46 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
23991 46 : if (!SWIG_IsOK(res2)) {
23992 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
23993 : }
23994 46 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
23995 46 : {
23996 46 : const int bLocalUseExceptions = GetUseExceptions();
23997 46 : if ( bLocalUseExceptions ) {
23998 5 : pushErrorHandler();
23999 : }
24000 46 : {
24001 46 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24002 46 : OGRGeomFieldDefnShadow_SetSpatialRef(arg1,arg2);
24003 46 : SWIG_PYTHON_THREAD_END_ALLOW;
24004 : }
24005 46 : if ( bLocalUseExceptions ) {
24006 5 : popErrorHandler();
24007 : }
24008 : #ifndef SED_HACKS
24009 : if ( bLocalUseExceptions ) {
24010 : CPLErr eclass = CPLGetLastErrorType();
24011 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24012 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24013 : }
24014 : }
24015 : #endif
24016 : }
24017 46 : resultobj = SWIG_Py_Void();
24018 46 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24019 : return resultobj;
24020 : fail:
24021 : return NULL;
24022 : }
24023 :
24024 :
24025 6 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24026 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24027 6 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24028 6 : void *argp1 = 0 ;
24029 6 : int res1 = 0 ;
24030 6 : PyObject *swig_obj[1] ;
24031 6 : int result;
24032 :
24033 6 : if (!args) SWIG_fail;
24034 6 : swig_obj[0] = args;
24035 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24036 6 : if (!SWIG_IsOK(res1)) {
24037 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24038 : }
24039 6 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24040 6 : {
24041 6 : const int bLocalUseExceptions = GetUseExceptions();
24042 6 : if ( bLocalUseExceptions ) {
24043 2 : pushErrorHandler();
24044 : }
24045 6 : {
24046 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24047 6 : result = (int)OGRGeomFieldDefnShadow_IsIgnored(arg1);
24048 6 : SWIG_PYTHON_THREAD_END_ALLOW;
24049 : }
24050 6 : if ( bLocalUseExceptions ) {
24051 2 : popErrorHandler();
24052 : }
24053 : #ifndef SED_HACKS
24054 : if ( bLocalUseExceptions ) {
24055 : CPLErr eclass = CPLGetLastErrorType();
24056 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24057 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24058 : }
24059 : }
24060 : #endif
24061 : }
24062 6 : resultobj = SWIG_From_int(static_cast< int >(result));
24063 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24064 : return resultobj;
24065 : fail:
24066 : return NULL;
24067 : }
24068 :
24069 :
24070 1 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24071 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24072 1 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24073 1 : int arg2 ;
24074 1 : void *argp1 = 0 ;
24075 1 : int res1 = 0 ;
24076 1 : int val2 ;
24077 1 : int ecode2 = 0 ;
24078 1 : PyObject *swig_obj[2] ;
24079 :
24080 1 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetIgnored", 2, 2, swig_obj)) SWIG_fail;
24081 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24082 1 : if (!SWIG_IsOK(res1)) {
24083 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24084 : }
24085 1 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24086 1 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
24087 1 : if (!SWIG_IsOK(ecode2)) {
24088 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
24089 : }
24090 1 : arg2 = static_cast< int >(val2);
24091 1 : {
24092 1 : const int bLocalUseExceptions = GetUseExceptions();
24093 1 : if ( bLocalUseExceptions ) {
24094 0 : pushErrorHandler();
24095 : }
24096 1 : {
24097 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24098 1 : OGRGeomFieldDefnShadow_SetIgnored(arg1,arg2);
24099 1 : SWIG_PYTHON_THREAD_END_ALLOW;
24100 : }
24101 1 : if ( bLocalUseExceptions ) {
24102 0 : popErrorHandler();
24103 : }
24104 : #ifndef SED_HACKS
24105 : if ( bLocalUseExceptions ) {
24106 : CPLErr eclass = CPLGetLastErrorType();
24107 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24108 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24109 : }
24110 : }
24111 : #endif
24112 : }
24113 1 : resultobj = SWIG_Py_Void();
24114 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24115 : return resultobj;
24116 : fail:
24117 : return NULL;
24118 : }
24119 :
24120 :
24121 85 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_IsNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24122 85 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24123 85 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24124 85 : void *argp1 = 0 ;
24125 85 : int res1 = 0 ;
24126 85 : PyObject *swig_obj[1] ;
24127 85 : int result;
24128 :
24129 85 : if (!args) SWIG_fail;
24130 85 : swig_obj[0] = args;
24131 85 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24132 85 : if (!SWIG_IsOK(res1)) {
24133 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_IsNullable" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24134 : }
24135 85 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24136 85 : {
24137 85 : const int bLocalUseExceptions = GetUseExceptions();
24138 85 : if ( bLocalUseExceptions ) {
24139 3 : pushErrorHandler();
24140 : }
24141 85 : {
24142 85 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24143 85 : result = (int)OGRGeomFieldDefnShadow_IsNullable(arg1);
24144 85 : SWIG_PYTHON_THREAD_END_ALLOW;
24145 : }
24146 85 : if ( bLocalUseExceptions ) {
24147 3 : popErrorHandler();
24148 : }
24149 : #ifndef SED_HACKS
24150 : if ( bLocalUseExceptions ) {
24151 : CPLErr eclass = CPLGetLastErrorType();
24152 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24153 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24154 : }
24155 : }
24156 : #endif
24157 : }
24158 85 : resultobj = SWIG_From_int(static_cast< int >(result));
24159 85 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24160 : return resultobj;
24161 : fail:
24162 : return NULL;
24163 : }
24164 :
24165 :
24166 23 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24167 23 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24168 23 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24169 23 : int arg2 ;
24170 23 : void *argp1 = 0 ;
24171 23 : int res1 = 0 ;
24172 23 : int val2 ;
24173 23 : int ecode2 = 0 ;
24174 23 : PyObject *swig_obj[2] ;
24175 :
24176 23 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetNullable", 2, 2, swig_obj)) SWIG_fail;
24177 23 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24178 23 : if (!SWIG_IsOK(res1)) {
24179 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetNullable" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24180 : }
24181 23 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24182 23 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
24183 23 : if (!SWIG_IsOK(ecode2)) {
24184 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetNullable" "', argument " "2"" of type '" "int""'");
24185 : }
24186 23 : arg2 = static_cast< int >(val2);
24187 23 : {
24188 23 : const int bLocalUseExceptions = GetUseExceptions();
24189 23 : if ( bLocalUseExceptions ) {
24190 10 : pushErrorHandler();
24191 : }
24192 23 : {
24193 23 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24194 23 : OGRGeomFieldDefnShadow_SetNullable(arg1,arg2);
24195 23 : SWIG_PYTHON_THREAD_END_ALLOW;
24196 : }
24197 23 : if ( bLocalUseExceptions ) {
24198 10 : popErrorHandler();
24199 : }
24200 : #ifndef SED_HACKS
24201 : if ( bLocalUseExceptions ) {
24202 : CPLErr eclass = CPLGetLastErrorType();
24203 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24204 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24205 : }
24206 : }
24207 : #endif
24208 : }
24209 23 : resultobj = SWIG_Py_Void();
24210 23 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24211 : return resultobj;
24212 : fail:
24213 : return NULL;
24214 : }
24215 :
24216 :
24217 44 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetCoordinatePrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24218 44 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24219 44 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24220 44 : void *argp1 = 0 ;
24221 44 : int res1 = 0 ;
24222 44 : PyObject *swig_obj[1] ;
24223 44 : OGRGeomCoordinatePrecisionShadow *result = 0 ;
24224 :
24225 44 : if (!args) SWIG_fail;
24226 44 : swig_obj[0] = args;
24227 44 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24228 44 : if (!SWIG_IsOK(res1)) {
24229 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24230 : }
24231 44 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24232 44 : {
24233 44 : const int bLocalUseExceptions = GetUseExceptions();
24234 44 : if ( bLocalUseExceptions ) {
24235 35 : pushErrorHandler();
24236 : }
24237 44 : {
24238 44 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24239 44 : result = (OGRGeomCoordinatePrecisionShadow *)OGRGeomFieldDefnShadow_GetCoordinatePrecision(arg1);
24240 44 : SWIG_PYTHON_THREAD_END_ALLOW;
24241 : }
24242 44 : if ( bLocalUseExceptions ) {
24243 35 : popErrorHandler();
24244 : }
24245 : #ifndef SED_HACKS
24246 : if ( bLocalUseExceptions ) {
24247 : CPLErr eclass = CPLGetLastErrorType();
24248 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24249 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24250 : }
24251 : }
24252 : #endif
24253 : }
24254 44 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
24255 44 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24256 : return resultobj;
24257 : fail:
24258 : return NULL;
24259 : }
24260 :
24261 :
24262 19 : SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetCoordinatePrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24263 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24264 19 : OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
24265 19 : OGRGeomCoordinatePrecisionShadow *arg2 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
24266 19 : void *argp1 = 0 ;
24267 19 : int res1 = 0 ;
24268 19 : void *argp2 = 0 ;
24269 19 : int res2 = 0 ;
24270 19 : PyObject *swig_obj[2] ;
24271 :
24272 19 : if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetCoordinatePrecision", 2, 2, swig_obj)) SWIG_fail;
24273 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | 0 );
24274 19 : if (!SWIG_IsOK(res1)) {
24275 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'");
24276 : }
24277 19 : arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
24278 19 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
24279 19 : if (!SWIG_IsOK(res2)) {
24280 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetCoordinatePrecision" "', argument " "2"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
24281 : }
24282 19 : arg2 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp2);
24283 19 : {
24284 19 : const int bLocalUseExceptions = GetUseExceptions();
24285 19 : if ( bLocalUseExceptions ) {
24286 13 : pushErrorHandler();
24287 : }
24288 19 : {
24289 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24290 19 : OGRGeomFieldDefnShadow_SetCoordinatePrecision(arg1,arg2);
24291 19 : SWIG_PYTHON_THREAD_END_ALLOW;
24292 : }
24293 19 : if ( bLocalUseExceptions ) {
24294 13 : popErrorHandler();
24295 : }
24296 : #ifndef SED_HACKS
24297 : if ( bLocalUseExceptions ) {
24298 : CPLErr eclass = CPLGetLastErrorType();
24299 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24300 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24301 : }
24302 : }
24303 : #endif
24304 : }
24305 19 : resultobj = SWIG_Py_Void();
24306 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24307 : return resultobj;
24308 : fail:
24309 : return NULL;
24310 : }
24311 :
24312 :
24313 271 : SWIGINTERN PyObject *GeomFieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24314 271 : PyObject *obj;
24315 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
24316 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_NewClientData(obj));
24317 271 : return SWIG_Py_Void();
24318 : }
24319 :
24320 168 : SWIGINTERN PyObject *GeomFieldDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24321 168 : return SWIG_Python_InitShadowInstance(args);
24322 : }
24323 :
24324 31028 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
24325 31028 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24326 31028 : size_t arg1 ;
24327 31028 : char *arg2 = (char *) 0 ;
24328 31028 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
24329 31028 : int alloc1 = 0 ;
24330 31028 : bool viewIsValid1 = false ;
24331 31028 : Py_buffer view1 ;
24332 31028 : void *argp3 = 0 ;
24333 31028 : int res3 = 0 ;
24334 31028 : PyObject * obj0 = 0 ;
24335 31028 : PyObject * obj1 = 0 ;
24336 31028 : char * kwnames[] = {
24337 : (char *)"len", (char *)"reference", NULL
24338 : };
24339 31028 : OGRGeometryShadow *result = 0 ;
24340 :
24341 31028 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:CreateGeometryFromWkb", kwnames, &obj0, &obj1)) SWIG_fail;
24342 31028 : {
24343 : /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
24344 31028 : char* ptr = NULL;
24345 31028 : if( !GetBufferAsCharPtrSizetSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
24346 0 : SWIG_fail;
24347 : }
24348 31028 : arg2 = (char *)ptr;
24349 : }
24350 31028 : if (obj1) {
24351 0 : res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
24352 0 : if (!SWIG_IsOK(res3)) {
24353 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateGeometryFromWkb" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
24354 : }
24355 0 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
24356 : }
24357 31028 : {
24358 31028 : const int bLocalUseExceptions = GetUseExceptions();
24359 31028 : if ( bLocalUseExceptions ) {
24360 336 : pushErrorHandler();
24361 : }
24362 31028 : {
24363 31028 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24364 31028 : result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
24365 31028 : SWIG_PYTHON_THREAD_END_ALLOW;
24366 : }
24367 31028 : if ( bLocalUseExceptions ) {
24368 336 : popErrorHandler();
24369 : }
24370 : #ifndef SED_HACKS
24371 : if ( bLocalUseExceptions ) {
24372 : CPLErr eclass = CPLGetLastErrorType();
24373 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24374 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24375 : }
24376 : }
24377 : #endif
24378 : }
24379 31028 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24380 31028 : {
24381 : /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
24382 31028 : if( viewIsValid1 ) {
24383 31021 : PyBuffer_Release(&view1);
24384 : }
24385 7 : else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
24386 7 : delete[] arg2;
24387 : }
24388 : }
24389 31029 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24390 : return resultobj;
24391 0 : fail:
24392 0 : {
24393 : /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
24394 0 : if( viewIsValid1 ) {
24395 0 : PyBuffer_Release(&view1);
24396 : }
24397 31028 : else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
24398 0 : delete[] arg2;
24399 : }
24400 : }
24401 : return NULL;
24402 : }
24403 :
24404 :
24405 115687 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
24406 115687 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24407 115687 : char **arg1 = (char **) 0 ;
24408 115687 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
24409 115687 : char *val1 ;
24410 115687 : void *argp2 = 0 ;
24411 115687 : int res2 = 0 ;
24412 115687 : PyObject * obj0 = 0 ;
24413 115687 : PyObject * obj1 = 0 ;
24414 115687 : char * kwnames[] = {
24415 : (char *)"val", (char *)"reference", NULL
24416 : };
24417 115687 : OGRGeometryShadow *result = 0 ;
24418 :
24419 115687 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:CreateGeometryFromWkt", kwnames, &obj0, &obj1)) SWIG_fail;
24420 115687 : {
24421 : /* %typemap(in) (char **ignorechange) */
24422 115687 : if( !PyArg_Parse( obj0, "s", &val1 ) ) {
24423 0 : PyErr_SetString( PyExc_TypeError, "not a string" );
24424 0 : SWIG_fail;
24425 : }
24426 115687 : arg1 = &val1;
24427 : }
24428 115687 : if (obj1) {
24429 184 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
24430 184 : if (!SWIG_IsOK(res2)) {
24431 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGeometryFromWkt" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
24432 : }
24433 184 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
24434 : }
24435 115687 : {
24436 115687 : const int bLocalUseExceptions = GetUseExceptions();
24437 115687 : if ( bLocalUseExceptions ) {
24438 58692 : pushErrorHandler();
24439 : }
24440 115687 : {
24441 115687 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24442 115687 : result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
24443 115687 : SWIG_PYTHON_THREAD_END_ALLOW;
24444 : }
24445 115687 : if ( bLocalUseExceptions ) {
24446 58692 : popErrorHandler();
24447 : }
24448 : #ifndef SED_HACKS
24449 : if ( bLocalUseExceptions ) {
24450 : CPLErr eclass = CPLGetLastErrorType();
24451 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24452 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24453 : }
24454 : }
24455 : #endif
24456 : }
24457 115687 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24458 115688 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24459 : return resultobj;
24460 : fail:
24461 : return NULL;
24462 : }
24463 :
24464 :
24465 273 : SWIGINTERN PyObject *_wrap_CreateGeometryFromGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24466 273 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24467 273 : char *arg1 = (char *) 0 ;
24468 273 : int res1 ;
24469 273 : char *buf1 = 0 ;
24470 273 : int alloc1 = 0 ;
24471 273 : PyObject *swig_obj[1] ;
24472 273 : OGRGeometryShadow *result = 0 ;
24473 :
24474 273 : if (!args) SWIG_fail;
24475 273 : swig_obj[0] = args;
24476 273 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
24477 273 : if (!SWIG_IsOK(res1)) {
24478 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromGML" "', argument " "1"" of type '" "char const *""'");
24479 : }
24480 273 : arg1 = reinterpret_cast< char * >(buf1);
24481 273 : {
24482 273 : const int bLocalUseExceptions = GetUseExceptions();
24483 273 : if ( bLocalUseExceptions ) {
24484 132 : pushErrorHandler();
24485 : }
24486 273 : {
24487 273 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24488 273 : result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
24489 273 : SWIG_PYTHON_THREAD_END_ALLOW;
24490 : }
24491 273 : if ( bLocalUseExceptions ) {
24492 132 : popErrorHandler();
24493 : }
24494 : #ifndef SED_HACKS
24495 : if ( bLocalUseExceptions ) {
24496 : CPLErr eclass = CPLGetLastErrorType();
24497 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24498 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24499 : }
24500 : }
24501 : #endif
24502 : }
24503 273 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24504 273 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24505 274 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24506 : return resultobj;
24507 0 : fail:
24508 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24509 : return NULL;
24510 : }
24511 :
24512 :
24513 42 : SWIGINTERN PyObject *_wrap_CreateGeometryFromJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24514 42 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24515 42 : char *arg1 = (char *) 0 ;
24516 42 : int res1 ;
24517 42 : char *buf1 = 0 ;
24518 42 : int alloc1 = 0 ;
24519 42 : PyObject *swig_obj[1] ;
24520 42 : OGRGeometryShadow *result = 0 ;
24521 :
24522 42 : if (!args) SWIG_fail;
24523 42 : swig_obj[0] = args;
24524 42 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
24525 42 : if (!SWIG_IsOK(res1)) {
24526 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromJson" "', argument " "1"" of type '" "char const *""'");
24527 : }
24528 42 : arg1 = reinterpret_cast< char * >(buf1);
24529 42 : {
24530 42 : const int bLocalUseExceptions = GetUseExceptions();
24531 42 : if ( bLocalUseExceptions ) {
24532 42 : pushErrorHandler();
24533 : }
24534 42 : {
24535 42 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24536 42 : result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
24537 42 : SWIG_PYTHON_THREAD_END_ALLOW;
24538 : }
24539 42 : if ( bLocalUseExceptions ) {
24540 42 : popErrorHandler();
24541 : }
24542 : #ifndef SED_HACKS
24543 : if ( bLocalUseExceptions ) {
24544 : CPLErr eclass = CPLGetLastErrorType();
24545 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24546 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24547 : }
24548 : }
24549 : #endif
24550 : }
24551 42 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24552 42 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24553 42 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24554 : return resultobj;
24555 0 : fail:
24556 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24557 : return NULL;
24558 : }
24559 :
24560 :
24561 2 : SWIGINTERN PyObject *_wrap_CreateGeometryFromEsriJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24562 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24563 2 : char *arg1 = (char *) 0 ;
24564 2 : int res1 ;
24565 2 : char *buf1 = 0 ;
24566 2 : int alloc1 = 0 ;
24567 2 : PyObject *swig_obj[1] ;
24568 2 : OGRGeometryShadow *result = 0 ;
24569 :
24570 2 : if (!args) SWIG_fail;
24571 2 : swig_obj[0] = args;
24572 2 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
24573 2 : if (!SWIG_IsOK(res1)) {
24574 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromEsriJson" "', argument " "1"" of type '" "char const *""'");
24575 : }
24576 2 : arg1 = reinterpret_cast< char * >(buf1);
24577 2 : {
24578 2 : const int bLocalUseExceptions = GetUseExceptions();
24579 2 : if ( bLocalUseExceptions ) {
24580 2 : pushErrorHandler();
24581 : }
24582 2 : {
24583 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24584 2 : result = (OGRGeometryShadow *)CreateGeometryFromEsriJson((char const *)arg1);
24585 2 : SWIG_PYTHON_THREAD_END_ALLOW;
24586 : }
24587 2 : if ( bLocalUseExceptions ) {
24588 2 : popErrorHandler();
24589 : }
24590 : #ifndef SED_HACKS
24591 : if ( bLocalUseExceptions ) {
24592 : CPLErr eclass = CPLGetLastErrorType();
24593 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24594 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24595 : }
24596 : }
24597 : #endif
24598 : }
24599 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24600 2 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24601 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24602 : return resultobj;
24603 0 : fail:
24604 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
24605 : return NULL;
24606 : }
24607 :
24608 :
24609 5 : SWIGINTERN PyObject *_wrap_BuildPolygonFromEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
24610 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24611 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
24612 5 : int arg2 = (int) 0 ;
24613 5 : int arg3 = (int) 0 ;
24614 5 : double arg4 = (double) 0 ;
24615 5 : void *argp1 = 0 ;
24616 5 : int res1 = 0 ;
24617 5 : int val2 ;
24618 5 : int ecode2 = 0 ;
24619 5 : int val3 ;
24620 5 : int ecode3 = 0 ;
24621 5 : double val4 ;
24622 5 : int ecode4 = 0 ;
24623 5 : PyObject * obj0 = 0 ;
24624 5 : PyObject * obj1 = 0 ;
24625 5 : PyObject * obj2 = 0 ;
24626 5 : PyObject * obj3 = 0 ;
24627 5 : char * kwnames[] = {
24628 : (char *)"hLineCollection", (char *)"bBestEffort", (char *)"bAutoClose", (char *)"dfTolerance", NULL
24629 : };
24630 5 : OGRGeometryShadow *result = 0 ;
24631 :
24632 5 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:BuildPolygonFromEdges", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
24633 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
24634 5 : if (!SWIG_IsOK(res1)) {
24635 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BuildPolygonFromEdges" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
24636 : }
24637 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
24638 5 : if (obj1) {
24639 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
24640 0 : if (!SWIG_IsOK(ecode2)) {
24641 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BuildPolygonFromEdges" "', argument " "2"" of type '" "int""'");
24642 : }
24643 : arg2 = static_cast< int >(val2);
24644 : }
24645 5 : if (obj2) {
24646 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
24647 0 : if (!SWIG_IsOK(ecode3)) {
24648 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BuildPolygonFromEdges" "', argument " "3"" of type '" "int""'");
24649 : }
24650 : arg3 = static_cast< int >(val3);
24651 : }
24652 5 : if (obj3) {
24653 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
24654 0 : if (!SWIG_IsOK(ecode4)) {
24655 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BuildPolygonFromEdges" "', argument " "4"" of type '" "double""'");
24656 : }
24657 0 : arg4 = static_cast< double >(val4);
24658 : }
24659 5 : {
24660 5 : const int bLocalUseExceptions = GetUseExceptions();
24661 5 : if ( bLocalUseExceptions ) {
24662 0 : pushErrorHandler();
24663 : }
24664 5 : {
24665 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24666 5 : result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
24667 5 : SWIG_PYTHON_THREAD_END_ALLOW;
24668 : }
24669 5 : if ( bLocalUseExceptions ) {
24670 0 : popErrorHandler();
24671 : }
24672 : #ifndef SED_HACKS
24673 : if ( bLocalUseExceptions ) {
24674 : CPLErr eclass = CPLGetLastErrorType();
24675 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24676 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24677 : }
24678 : }
24679 : #endif
24680 : }
24681 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24682 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24683 : return resultobj;
24684 : fail:
24685 : return NULL;
24686 : }
24687 :
24688 :
24689 1 : SWIGINTERN PyObject *_wrap_ApproximateArcAngles(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
24690 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24691 1 : double arg1 ;
24692 1 : double arg2 ;
24693 1 : double arg3 ;
24694 1 : double arg4 ;
24695 1 : double arg5 ;
24696 1 : double arg6 ;
24697 1 : double arg7 ;
24698 1 : double arg8 ;
24699 1 : double arg9 ;
24700 1 : double val1 ;
24701 1 : int ecode1 = 0 ;
24702 1 : double val2 ;
24703 1 : int ecode2 = 0 ;
24704 1 : double val3 ;
24705 1 : int ecode3 = 0 ;
24706 1 : double val4 ;
24707 1 : int ecode4 = 0 ;
24708 1 : double val5 ;
24709 1 : int ecode5 = 0 ;
24710 1 : double val6 ;
24711 1 : int ecode6 = 0 ;
24712 1 : double val7 ;
24713 1 : int ecode7 = 0 ;
24714 1 : double val8 ;
24715 1 : int ecode8 = 0 ;
24716 1 : double val9 ;
24717 1 : int ecode9 = 0 ;
24718 1 : PyObject * obj0 = 0 ;
24719 1 : PyObject * obj1 = 0 ;
24720 1 : PyObject * obj2 = 0 ;
24721 1 : PyObject * obj3 = 0 ;
24722 1 : PyObject * obj4 = 0 ;
24723 1 : PyObject * obj5 = 0 ;
24724 1 : PyObject * obj6 = 0 ;
24725 1 : PyObject * obj7 = 0 ;
24726 1 : PyObject * obj8 = 0 ;
24727 1 : char * kwnames[] = {
24728 : (char *)"dfCenterX", (char *)"dfCenterY", (char *)"dfZ", (char *)"dfPrimaryRadius", (char *)"dfSecondaryAxis", (char *)"dfRotation", (char *)"dfStartAngle", (char *)"dfEndAngle", (char *)"dfMaxAngleStepSizeDegrees", NULL
24729 : };
24730 1 : OGRGeometryShadow *result = 0 ;
24731 :
24732 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:ApproximateArcAngles", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
24733 1 : ecode1 = SWIG_AsVal_double(obj0, &val1);
24734 1 : if (!SWIG_IsOK(ecode1)) {
24735 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ApproximateArcAngles" "', argument " "1"" of type '" "double""'");
24736 : }
24737 1 : arg1 = static_cast< double >(val1);
24738 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
24739 1 : if (!SWIG_IsOK(ecode2)) {
24740 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApproximateArcAngles" "', argument " "2"" of type '" "double""'");
24741 : }
24742 1 : arg2 = static_cast< double >(val2);
24743 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
24744 1 : if (!SWIG_IsOK(ecode3)) {
24745 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApproximateArcAngles" "', argument " "3"" of type '" "double""'");
24746 : }
24747 1 : arg3 = static_cast< double >(val3);
24748 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
24749 1 : if (!SWIG_IsOK(ecode4)) {
24750 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ApproximateArcAngles" "', argument " "4"" of type '" "double""'");
24751 : }
24752 1 : arg4 = static_cast< double >(val4);
24753 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
24754 1 : if (!SWIG_IsOK(ecode5)) {
24755 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ApproximateArcAngles" "', argument " "5"" of type '" "double""'");
24756 : }
24757 1 : arg5 = static_cast< double >(val5);
24758 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
24759 1 : if (!SWIG_IsOK(ecode6)) {
24760 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ApproximateArcAngles" "', argument " "6"" of type '" "double""'");
24761 : }
24762 1 : arg6 = static_cast< double >(val6);
24763 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
24764 1 : if (!SWIG_IsOK(ecode7)) {
24765 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ApproximateArcAngles" "', argument " "7"" of type '" "double""'");
24766 : }
24767 1 : arg7 = static_cast< double >(val7);
24768 1 : ecode8 = SWIG_AsVal_double(obj7, &val8);
24769 1 : if (!SWIG_IsOK(ecode8)) {
24770 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ApproximateArcAngles" "', argument " "8"" of type '" "double""'");
24771 : }
24772 1 : arg8 = static_cast< double >(val8);
24773 1 : ecode9 = SWIG_AsVal_double(obj8, &val9);
24774 1 : if (!SWIG_IsOK(ecode9)) {
24775 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ApproximateArcAngles" "', argument " "9"" of type '" "double""'");
24776 : }
24777 1 : arg9 = static_cast< double >(val9);
24778 1 : {
24779 1 : const int bLocalUseExceptions = GetUseExceptions();
24780 1 : if ( bLocalUseExceptions ) {
24781 1 : pushErrorHandler();
24782 : }
24783 1 : {
24784 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24785 1 : result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
24786 1 : SWIG_PYTHON_THREAD_END_ALLOW;
24787 : }
24788 1 : if ( bLocalUseExceptions ) {
24789 1 : popErrorHandler();
24790 : }
24791 : #ifndef SED_HACKS
24792 : if ( bLocalUseExceptions ) {
24793 : CPLErr eclass = CPLGetLastErrorType();
24794 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24795 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24796 : }
24797 : }
24798 : #endif
24799 : }
24800 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24801 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24802 : return resultobj;
24803 : fail:
24804 : return NULL;
24805 : }
24806 :
24807 :
24808 46 : SWIGINTERN PyObject *_wrap_ForceToPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24809 46 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24810 46 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
24811 46 : void *argp1 = 0 ;
24812 46 : int res1 = 0 ;
24813 46 : PyObject *swig_obj[1] ;
24814 46 : OGRGeometryShadow *result = 0 ;
24815 :
24816 46 : if (!args) SWIG_fail;
24817 46 : swig_obj[0] = args;
24818 46 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
24819 46 : if (!SWIG_IsOK(res1)) {
24820 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
24821 : }
24822 46 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
24823 46 : {
24824 46 : const int bLocalUseExceptions = GetUseExceptions();
24825 46 : if ( bLocalUseExceptions ) {
24826 4 : pushErrorHandler();
24827 : }
24828 46 : {
24829 46 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24830 46 : result = (OGRGeometryShadow *)ForceToPolygon(arg1);
24831 46 : SWIG_PYTHON_THREAD_END_ALLOW;
24832 : }
24833 46 : if ( bLocalUseExceptions ) {
24834 4 : popErrorHandler();
24835 : }
24836 : #ifndef SED_HACKS
24837 : if ( bLocalUseExceptions ) {
24838 : CPLErr eclass = CPLGetLastErrorType();
24839 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24840 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24841 : }
24842 : }
24843 : #endif
24844 : }
24845 46 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24846 46 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24847 : return resultobj;
24848 : fail:
24849 : return NULL;
24850 : }
24851 :
24852 :
24853 58 : SWIGINTERN PyObject *_wrap_ForceToLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24854 58 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24855 58 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
24856 58 : void *argp1 = 0 ;
24857 58 : int res1 = 0 ;
24858 58 : PyObject *swig_obj[1] ;
24859 58 : OGRGeometryShadow *result = 0 ;
24860 :
24861 58 : if (!args) SWIG_fail;
24862 58 : swig_obj[0] = args;
24863 58 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
24864 58 : if (!SWIG_IsOK(res1)) {
24865 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
24866 : }
24867 58 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
24868 58 : {
24869 58 : const int bLocalUseExceptions = GetUseExceptions();
24870 58 : if ( bLocalUseExceptions ) {
24871 14 : pushErrorHandler();
24872 : }
24873 58 : {
24874 58 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24875 58 : result = (OGRGeometryShadow *)ForceToLineString(arg1);
24876 58 : SWIG_PYTHON_THREAD_END_ALLOW;
24877 : }
24878 58 : if ( bLocalUseExceptions ) {
24879 14 : popErrorHandler();
24880 : }
24881 : #ifndef SED_HACKS
24882 : if ( bLocalUseExceptions ) {
24883 : CPLErr eclass = CPLGetLastErrorType();
24884 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24885 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24886 : }
24887 : }
24888 : #endif
24889 : }
24890 58 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24891 58 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24892 : return resultobj;
24893 : fail:
24894 : return NULL;
24895 : }
24896 :
24897 :
24898 47 : SWIGINTERN PyObject *_wrap_ForceToMultiPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24899 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24900 47 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
24901 47 : void *argp1 = 0 ;
24902 47 : int res1 = 0 ;
24903 47 : PyObject *swig_obj[1] ;
24904 47 : OGRGeometryShadow *result = 0 ;
24905 :
24906 47 : if (!args) SWIG_fail;
24907 47 : swig_obj[0] = args;
24908 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
24909 47 : if (!SWIG_IsOK(res1)) {
24910 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
24911 : }
24912 47 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
24913 47 : {
24914 47 : const int bLocalUseExceptions = GetUseExceptions();
24915 47 : if ( bLocalUseExceptions ) {
24916 4 : pushErrorHandler();
24917 : }
24918 47 : {
24919 47 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24920 47 : result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
24921 47 : SWIG_PYTHON_THREAD_END_ALLOW;
24922 : }
24923 47 : if ( bLocalUseExceptions ) {
24924 4 : popErrorHandler();
24925 : }
24926 : #ifndef SED_HACKS
24927 : if ( bLocalUseExceptions ) {
24928 : CPLErr eclass = CPLGetLastErrorType();
24929 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24930 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24931 : }
24932 : }
24933 : #endif
24934 : }
24935 47 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24936 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24937 : return resultobj;
24938 : fail:
24939 : return NULL;
24940 : }
24941 :
24942 :
24943 42 : SWIGINTERN PyObject *_wrap_ForceToMultiPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24944 42 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24945 42 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
24946 42 : void *argp1 = 0 ;
24947 42 : int res1 = 0 ;
24948 42 : PyObject *swig_obj[1] ;
24949 42 : OGRGeometryShadow *result = 0 ;
24950 :
24951 42 : if (!args) SWIG_fail;
24952 42 : swig_obj[0] = args;
24953 42 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
24954 42 : if (!SWIG_IsOK(res1)) {
24955 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
24956 : }
24957 42 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
24958 42 : {
24959 42 : const int bLocalUseExceptions = GetUseExceptions();
24960 42 : if ( bLocalUseExceptions ) {
24961 2 : pushErrorHandler();
24962 : }
24963 42 : {
24964 42 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
24965 42 : result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
24966 42 : SWIG_PYTHON_THREAD_END_ALLOW;
24967 : }
24968 42 : if ( bLocalUseExceptions ) {
24969 2 : popErrorHandler();
24970 : }
24971 : #ifndef SED_HACKS
24972 : if ( bLocalUseExceptions ) {
24973 : CPLErr eclass = CPLGetLastErrorType();
24974 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
24975 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
24976 : }
24977 : }
24978 : #endif
24979 : }
24980 42 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
24981 42 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
24982 : return resultobj;
24983 : fail:
24984 : return NULL;
24985 : }
24986 :
24987 :
24988 50 : SWIGINTERN PyObject *_wrap_ForceToMultiLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24989 50 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
24990 50 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
24991 50 : void *argp1 = 0 ;
24992 50 : int res1 = 0 ;
24993 50 : PyObject *swig_obj[1] ;
24994 50 : OGRGeometryShadow *result = 0 ;
24995 :
24996 50 : if (!args) SWIG_fail;
24997 50 : swig_obj[0] = args;
24998 50 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
24999 50 : if (!SWIG_IsOK(res1)) {
25000 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25001 : }
25002 50 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25003 50 : {
25004 50 : const int bLocalUseExceptions = GetUseExceptions();
25005 50 : if ( bLocalUseExceptions ) {
25006 4 : pushErrorHandler();
25007 : }
25008 50 : {
25009 50 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25010 50 : result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
25011 50 : SWIG_PYTHON_THREAD_END_ALLOW;
25012 : }
25013 50 : if ( bLocalUseExceptions ) {
25014 4 : popErrorHandler();
25015 : }
25016 : #ifndef SED_HACKS
25017 : if ( bLocalUseExceptions ) {
25018 : CPLErr eclass = CPLGetLastErrorType();
25019 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25020 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25021 : }
25022 : }
25023 : #endif
25024 : }
25025 50 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25026 50 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25027 : return resultobj;
25028 : fail:
25029 : return NULL;
25030 : }
25031 :
25032 :
25033 831 : SWIGINTERN PyObject *_wrap_ForceTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25034 831 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25035 831 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25036 831 : OGRwkbGeometryType arg2 ;
25037 831 : char **arg3 = (char **) NULL ;
25038 831 : void *argp1 = 0 ;
25039 831 : int res1 = 0 ;
25040 831 : int val2 ;
25041 831 : int ecode2 = 0 ;
25042 831 : PyObject *swig_obj[3] ;
25043 831 : OGRGeometryShadow *result = 0 ;
25044 :
25045 831 : if (!SWIG_Python_UnpackTuple(args, "ForceTo", 2, 3, swig_obj)) SWIG_fail;
25046 831 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25047 831 : if (!SWIG_IsOK(res1)) {
25048 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25049 : }
25050 831 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25051 831 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
25052 831 : if (!SWIG_IsOK(ecode2)) {
25053 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ForceTo" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
25054 : }
25055 831 : arg2 = static_cast< OGRwkbGeometryType >(val2);
25056 831 : if (swig_obj[2]) {
25057 0 : {
25058 : /* %typemap(in) char **dict */
25059 0 : arg3 = NULL;
25060 0 : if ( PySequence_Check( swig_obj[2] ) ) {
25061 0 : int bErr = FALSE;
25062 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
25063 0 : if ( bErr )
25064 : {
25065 0 : SWIG_fail;
25066 : }
25067 : }
25068 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
25069 0 : int bErr = FALSE;
25070 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
25071 0 : if ( bErr )
25072 : {
25073 0 : SWIG_fail;
25074 : }
25075 : }
25076 : else {
25077 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
25078 0 : SWIG_fail;
25079 : }
25080 : }
25081 : }
25082 831 : {
25083 831 : const int bLocalUseExceptions = GetUseExceptions();
25084 831 : if ( bLocalUseExceptions ) {
25085 228 : pushErrorHandler();
25086 : }
25087 831 : {
25088 831 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25089 831 : result = (OGRGeometryShadow *)ForceTo(arg1,arg2,arg3);
25090 831 : SWIG_PYTHON_THREAD_END_ALLOW;
25091 : }
25092 831 : if ( bLocalUseExceptions ) {
25093 228 : popErrorHandler();
25094 : }
25095 : #ifndef SED_HACKS
25096 : if ( bLocalUseExceptions ) {
25097 : CPLErr eclass = CPLGetLastErrorType();
25098 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25099 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25100 : }
25101 : }
25102 : #endif
25103 : }
25104 831 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
25105 831 : {
25106 : /* %typemap(freearg) char **dict */
25107 831 : CSLDestroy( arg3 );
25108 : }
25109 831 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25110 : return resultobj;
25111 0 : fail:
25112 0 : {
25113 : /* %typemap(freearg) char **dict */
25114 0 : CSLDestroy( arg3 );
25115 : }
25116 : return NULL;
25117 : }
25118 :
25119 :
25120 287806 : SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25121 287806 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25122 287806 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25123 287806 : void *argp1 = 0 ;
25124 287806 : int res1 = 0 ;
25125 287806 : PyObject *swig_obj[1] ;
25126 :
25127 287806 : if (!args) SWIG_fail;
25128 287806 : swig_obj[0] = args;
25129 287806 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
25130 287806 : if (!SWIG_IsOK(res1)) {
25131 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25132 : }
25133 287806 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25134 287806 : {
25135 287806 : const int bLocalUseExceptions = GetUseExceptions();
25136 287806 : if ( bLocalUseExceptions ) {
25137 231348 : pushErrorHandler();
25138 : }
25139 287806 : {
25140 287806 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25141 287806 : delete_OGRGeometryShadow(arg1);
25142 287806 : SWIG_PYTHON_THREAD_END_ALLOW;
25143 : }
25144 287806 : if ( bLocalUseExceptions ) {
25145 231348 : popErrorHandler();
25146 : }
25147 : #ifndef SED_HACKS
25148 : if ( bLocalUseExceptions ) {
25149 : CPLErr eclass = CPLGetLastErrorType();
25150 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25151 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25152 : }
25153 : }
25154 : #endif
25155 : }
25156 287806 : resultobj = SWIG_Py_Void();
25157 287806 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25158 : return resultobj;
25159 : fail:
25160 : return NULL;
25161 : }
25162 :
25163 :
25164 160788 : SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25165 160788 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25166 160788 : OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
25167 160788 : char *arg2 = (char *) 0 ;
25168 160788 : int arg3 = (int) 0 ;
25169 160788 : char *arg4 = (char *) 0 ;
25170 160788 : char *arg5 = (char *) 0 ;
25171 160788 : int val1 ;
25172 160788 : int ecode1 = 0 ;
25173 160788 : int res2 ;
25174 160788 : char *buf2 = 0 ;
25175 160788 : int alloc2 = 0 ;
25176 160788 : int alloc3 = 0 ;
25177 160788 : bool viewIsValid3 = false ;
25178 160788 : Py_buffer view3 ;
25179 160788 : int res5 ;
25180 160788 : char *buf5 = 0 ;
25181 160788 : int alloc5 = 0 ;
25182 160788 : PyObject * obj0 = 0 ;
25183 160788 : PyObject * obj1 = 0 ;
25184 160788 : PyObject * obj2 = 0 ;
25185 160788 : PyObject * obj3 = 0 ;
25186 160788 : char * kwnames[] = {
25187 : (char *)"type", (char *)"wkt", (char *)"wkb", (char *)"gml", NULL
25188 : };
25189 160788 : OGRGeometryShadow *result = 0 ;
25190 :
25191 160788 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOO:new_Geometry", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
25192 160788 : if (obj0) {
25193 160625 : ecode1 = SWIG_AsVal_int(obj0, &val1);
25194 160625 : if (!SWIG_IsOK(ecode1)) {
25195 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Geometry" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
25196 : }
25197 160625 : arg1 = static_cast< OGRwkbGeometryType >(val1);
25198 : }
25199 160788 : if (obj1) {
25200 162 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
25201 162 : if (!SWIG_IsOK(res2)) {
25202 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'");
25203 : }
25204 162 : arg2 = reinterpret_cast< char * >(buf2);
25205 : }
25206 160788 : if (obj2) {
25207 0 : {
25208 : /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
25209 0 : char* ptr = NULL;
25210 0 : if( !GetBufferAsCharPtrIntSize(obj2, &arg3, &ptr, &alloc3, &viewIsValid3, &view3) ) {
25211 0 : SWIG_fail;
25212 : }
25213 0 : arg4 = (char *)ptr;
25214 : }
25215 : }
25216 160788 : if (obj3) {
25217 0 : res5 = SWIG_AsCharPtrAndSize(obj3, &buf5, NULL, &alloc5);
25218 0 : if (!SWIG_IsOK(res5)) {
25219 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Geometry" "', argument " "5"" of type '" "char *""'");
25220 : }
25221 0 : arg5 = reinterpret_cast< char * >(buf5);
25222 : }
25223 160788 : {
25224 160788 : const int bLocalUseExceptions = GetUseExceptions();
25225 160788 : if ( bLocalUseExceptions ) {
25226 160545 : pushErrorHandler();
25227 : }
25228 160788 : {
25229 160788 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25230 160788 : result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
25231 160788 : SWIG_PYTHON_THREAD_END_ALLOW;
25232 : }
25233 160788 : if ( bLocalUseExceptions ) {
25234 160545 : popErrorHandler();
25235 : }
25236 : #ifndef SED_HACKS
25237 : if ( bLocalUseExceptions ) {
25238 : CPLErr eclass = CPLGetLastErrorType();
25239 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25240 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25241 : }
25242 : }
25243 : #endif
25244 : }
25245 160788 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_NEW | 0 );
25246 160788 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
25247 160788 : {
25248 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
25249 160788 : if( viewIsValid3 ) {
25250 0 : PyBuffer_Release(&view3);
25251 : }
25252 160788 : else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
25253 0 : delete[] arg4;
25254 : }
25255 : }
25256 160788 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
25257 160788 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25258 : return resultobj;
25259 0 : fail:
25260 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
25261 0 : {
25262 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
25263 0 : if( viewIsValid3 ) {
25264 0 : PyBuffer_Release(&view3);
25265 : }
25266 0 : else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
25267 0 : delete[] arg4;
25268 : }
25269 : }
25270 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
25271 : return NULL;
25272 : }
25273 :
25274 :
25275 2432 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25276 2432 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25277 2432 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25278 2432 : char **arg2 = (char **) 0 ;
25279 2432 : void *argp1 = 0 ;
25280 2432 : int res1 = 0 ;
25281 2432 : char *argout2 = 0 ;
25282 2432 : PyObject *swig_obj[1] ;
25283 2432 : OGRErr result;
25284 :
25285 2432 : {
25286 : /* %typemap(in,numinputs=0) (char **argout2) */
25287 2432 : arg2 = &argout2;
25288 : }
25289 2432 : if (!args) SWIG_fail;
25290 2432 : swig_obj[0] = args;
25291 2432 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25292 2432 : if (!SWIG_IsOK(res1)) {
25293 14 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25294 : }
25295 2425 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25296 2425 : {
25297 2425 : const int bLocalUseExceptions = GetUseExceptions();
25298 2425 : if ( bLocalUseExceptions ) {
25299 442 : pushErrorHandler();
25300 : }
25301 2425 : {
25302 2425 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25303 2425 : result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
25304 2425 : SWIG_PYTHON_THREAD_END_ALLOW;
25305 : }
25306 2425 : if ( bLocalUseExceptions ) {
25307 442 : popErrorHandler();
25308 : }
25309 : #ifndef SED_HACKS
25310 : if ( bLocalUseExceptions ) {
25311 : CPLErr eclass = CPLGetLastErrorType();
25312 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25313 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25314 : }
25315 : }
25316 : #endif
25317 : }
25318 2425 : {
25319 : /* %typemap(out) OGRErr */
25320 2425 : if ( result != 0 && GetUseExceptions()) {
25321 0 : const char* pszMessage = CPLGetLastErrorMsg();
25322 0 : if( pszMessage[0] != '\0' )
25323 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
25324 : else
25325 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
25326 0 : SWIG_fail;
25327 : }
25328 : }
25329 2425 : {
25330 : /* %typemap(argout) (char **argout) */
25331 2425 : PyObject *o;
25332 2425 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
25333 2425 : o = GDALPythonObjectFromCStr( *arg2 );
25334 : }
25335 : else {
25336 0 : o = Py_None;
25337 0 : Py_INCREF( o );
25338 : }
25339 2425 : resultobj = t_output_helper(resultobj, o);
25340 : }
25341 2425 : {
25342 : /* %typemap(freearg) (char **argout) */
25343 2425 : if ( *arg2 )
25344 2425 : CPLFree( *arg2 );
25345 : }
25346 2425 : {
25347 : /* %typemap(ret) OGRErr */
25348 4850 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
25349 0 : resultobj = PyInt_FromLong( result );
25350 : }
25351 : }
25352 2432 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25353 : return resultobj;
25354 7 : fail:
25355 7 : {
25356 : /* %typemap(freearg) (char **argout) */
25357 7 : if ( *arg2 )
25358 0 : CPLFree( *arg2 );
25359 : }
25360 : return NULL;
25361 : }
25362 :
25363 :
25364 5178 : SWIGINTERN PyObject *_wrap_Geometry_ExportToIsoWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25365 5178 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25366 5178 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25367 5178 : char **arg2 = (char **) 0 ;
25368 5178 : void *argp1 = 0 ;
25369 5178 : int res1 = 0 ;
25370 5178 : char *argout2 = 0 ;
25371 5178 : PyObject *swig_obj[1] ;
25372 5178 : OGRErr result;
25373 :
25374 5178 : {
25375 : /* %typemap(in,numinputs=0) (char **argout2) */
25376 5178 : arg2 = &argout2;
25377 : }
25378 5178 : if (!args) SWIG_fail;
25379 5178 : swig_obj[0] = args;
25380 5178 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25381 5178 : if (!SWIG_IsOK(res1)) {
25382 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToIsoWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25383 : }
25384 5178 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25385 5178 : {
25386 5178 : const int bLocalUseExceptions = GetUseExceptions();
25387 5178 : if ( bLocalUseExceptions ) {
25388 424 : pushErrorHandler();
25389 : }
25390 5178 : {
25391 5178 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25392 5178 : result = (OGRErr)OGRGeometryShadow_ExportToIsoWkt(arg1,arg2);
25393 5178 : SWIG_PYTHON_THREAD_END_ALLOW;
25394 : }
25395 5178 : if ( bLocalUseExceptions ) {
25396 424 : popErrorHandler();
25397 : }
25398 : #ifndef SED_HACKS
25399 : if ( bLocalUseExceptions ) {
25400 : CPLErr eclass = CPLGetLastErrorType();
25401 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25402 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25403 : }
25404 : }
25405 : #endif
25406 : }
25407 5178 : {
25408 : /* %typemap(out) OGRErr */
25409 5178 : if ( result != 0 && GetUseExceptions()) {
25410 0 : const char* pszMessage = CPLGetLastErrorMsg();
25411 0 : if( pszMessage[0] != '\0' )
25412 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
25413 : else
25414 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
25415 0 : SWIG_fail;
25416 : }
25417 : }
25418 5178 : {
25419 : /* %typemap(argout) (char **argout) */
25420 5178 : PyObject *o;
25421 5178 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
25422 5178 : o = GDALPythonObjectFromCStr( *arg2 );
25423 : }
25424 : else {
25425 0 : o = Py_None;
25426 0 : Py_INCREF( o );
25427 : }
25428 5178 : resultobj = t_output_helper(resultobj, o);
25429 : }
25430 5178 : {
25431 : /* %typemap(freearg) (char **argout) */
25432 5178 : if ( *arg2 )
25433 5178 : CPLFree( *arg2 );
25434 : }
25435 5178 : {
25436 : /* %typemap(ret) OGRErr */
25437 10356 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
25438 0 : resultobj = PyInt_FromLong( result );
25439 : }
25440 : }
25441 5178 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25442 : return resultobj;
25443 0 : fail:
25444 0 : {
25445 : /* %typemap(freearg) (char **argout) */
25446 0 : if ( *arg2 )
25447 0 : CPLFree( *arg2 );
25448 : }
25449 : return NULL;
25450 : }
25451 :
25452 :
25453 101 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25454 101 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25455 101 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25456 101 : size_t *arg2 = (size_t *) 0 ;
25457 101 : char **arg3 = (char **) 0 ;
25458 101 : OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbNDR ;
25459 101 : void *argp1 = 0 ;
25460 101 : int res1 = 0 ;
25461 101 : size_t nLen2 = 0 ;
25462 101 : char *pBuf2 = 0 ;
25463 101 : int val4 ;
25464 101 : int ecode4 = 0 ;
25465 101 : PyObject * obj0 = 0 ;
25466 101 : PyObject * obj1 = 0 ;
25467 101 : char * kwnames[] = {
25468 : (char *)"self", (char *)"byte_order", NULL
25469 : };
25470 101 : OGRErr result;
25471 :
25472 101 : {
25473 : /* %typemap(in,numinputs=0) (size_t *nLen2, char **pBuf2 ) */
25474 101 : arg2 = &nLen2;
25475 101 : arg3 = &pBuf2;
25476 : }
25477 101 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToWkb", kwnames, &obj0, &obj1)) SWIG_fail;
25478 101 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25479 101 : if (!SWIG_IsOK(res1)) {
25480 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25481 : }
25482 101 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25483 101 : if (obj1) {
25484 39 : ecode4 = SWIG_AsVal_int(obj1, &val4);
25485 39 : if (!SWIG_IsOK(ecode4)) {
25486 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
25487 : }
25488 39 : arg4 = static_cast< OGRwkbByteOrder >(val4);
25489 : }
25490 101 : {
25491 101 : const int bLocalUseExceptions = GetUseExceptions();
25492 101 : if ( bLocalUseExceptions ) {
25493 17 : pushErrorHandler();
25494 : }
25495 101 : {
25496 101 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25497 101 : result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
25498 101 : SWIG_PYTHON_THREAD_END_ALLOW;
25499 : }
25500 101 : if ( bLocalUseExceptions ) {
25501 17 : popErrorHandler();
25502 : }
25503 : #ifndef SED_HACKS
25504 : if ( bLocalUseExceptions ) {
25505 : CPLErr eclass = CPLGetLastErrorType();
25506 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25507 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25508 : }
25509 : }
25510 : #endif
25511 : }
25512 101 : {
25513 : /* %typemap(out) OGRErr */
25514 101 : if ( result != 0 && GetUseExceptions()) {
25515 0 : const char* pszMessage = CPLGetLastErrorMsg();
25516 0 : if( pszMessage[0] != '\0' )
25517 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
25518 : else
25519 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
25520 0 : SWIG_fail;
25521 : }
25522 : }
25523 101 : {
25524 : /* %typemap(argout) (size_t *nLen, char **pBuf ) */
25525 101 : Py_XDECREF(resultobj);
25526 101 : if( *arg3 ) {
25527 101 : resultobj = PyByteArray_FromStringAndSize( *arg3, *arg2 );
25528 : }
25529 : else {
25530 0 : resultobj = Py_None;
25531 0 : Py_INCREF(Py_None);
25532 : }
25533 : }
25534 101 : {
25535 : /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
25536 101 : VSIFree( *arg3 );
25537 : }
25538 101 : {
25539 : /* %typemap(ret) OGRErr */
25540 202 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
25541 0 : resultobj = PyInt_FromLong( result );
25542 : }
25543 : }
25544 101 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25545 : return resultobj;
25546 0 : fail:
25547 0 : {
25548 : /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
25549 0 : VSIFree( *arg3 );
25550 : }
25551 : return NULL;
25552 : }
25553 :
25554 :
25555 10570 : SWIGINTERN PyObject *_wrap_Geometry_ExportToIsoWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25556 10570 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25557 10570 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25558 10570 : size_t *arg2 = (size_t *) 0 ;
25559 10570 : char **arg3 = (char **) 0 ;
25560 10570 : OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbNDR ;
25561 10570 : void *argp1 = 0 ;
25562 10570 : int res1 = 0 ;
25563 10570 : size_t nLen2 = 0 ;
25564 10570 : char *pBuf2 = 0 ;
25565 10570 : int val4 ;
25566 10570 : int ecode4 = 0 ;
25567 10570 : PyObject * obj0 = 0 ;
25568 10570 : PyObject * obj1 = 0 ;
25569 10570 : char * kwnames[] = {
25570 : (char *)"self", (char *)"byte_order", NULL
25571 : };
25572 10570 : OGRErr result;
25573 :
25574 10570 : {
25575 : /* %typemap(in,numinputs=0) (size_t *nLen2, char **pBuf2 ) */
25576 10570 : arg2 = &nLen2;
25577 10570 : arg3 = &pBuf2;
25578 : }
25579 10570 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToIsoWkb", kwnames, &obj0, &obj1)) SWIG_fail;
25580 10570 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25581 10570 : if (!SWIG_IsOK(res1)) {
25582 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToIsoWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25583 : }
25584 10570 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25585 10570 : if (obj1) {
25586 0 : ecode4 = SWIG_AsVal_int(obj1, &val4);
25587 0 : if (!SWIG_IsOK(ecode4)) {
25588 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToIsoWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
25589 : }
25590 0 : arg4 = static_cast< OGRwkbByteOrder >(val4);
25591 : }
25592 10570 : {
25593 10570 : const int bLocalUseExceptions = GetUseExceptions();
25594 10570 : if ( bLocalUseExceptions ) {
25595 1 : pushErrorHandler();
25596 : }
25597 10570 : {
25598 10570 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25599 10570 : result = (OGRErr)OGRGeometryShadow_ExportToIsoWkb(arg1,arg2,arg3,arg4);
25600 10570 : SWIG_PYTHON_THREAD_END_ALLOW;
25601 : }
25602 10570 : if ( bLocalUseExceptions ) {
25603 1 : popErrorHandler();
25604 : }
25605 : #ifndef SED_HACKS
25606 : if ( bLocalUseExceptions ) {
25607 : CPLErr eclass = CPLGetLastErrorType();
25608 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25609 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25610 : }
25611 : }
25612 : #endif
25613 : }
25614 10570 : {
25615 : /* %typemap(out) OGRErr */
25616 10570 : if ( result != 0 && GetUseExceptions()) {
25617 0 : const char* pszMessage = CPLGetLastErrorMsg();
25618 0 : if( pszMessage[0] != '\0' )
25619 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
25620 : else
25621 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
25622 0 : SWIG_fail;
25623 : }
25624 : }
25625 10570 : {
25626 : /* %typemap(argout) (size_t *nLen, char **pBuf ) */
25627 10570 : Py_XDECREF(resultobj);
25628 10570 : if( *arg3 ) {
25629 10570 : resultobj = PyByteArray_FromStringAndSize( *arg3, *arg2 );
25630 : }
25631 : else {
25632 0 : resultobj = Py_None;
25633 0 : Py_INCREF(Py_None);
25634 : }
25635 : }
25636 10570 : {
25637 : /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
25638 10570 : VSIFree( *arg3 );
25639 : }
25640 10570 : {
25641 : /* %typemap(ret) OGRErr */
25642 21140 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
25643 0 : resultobj = PyInt_FromLong( result );
25644 : }
25645 : }
25646 10570 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25647 : return resultobj;
25648 0 : fail:
25649 0 : {
25650 : /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
25651 0 : VSIFree( *arg3 );
25652 : }
25653 : return NULL;
25654 : }
25655 :
25656 :
25657 66 : SWIGINTERN PyObject *_wrap_Geometry_ExportToGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25658 66 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25659 66 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25660 66 : char **arg2 = (char **) 0 ;
25661 66 : void *argp1 = 0 ;
25662 66 : int res1 = 0 ;
25663 66 : PyObject * obj0 = 0 ;
25664 66 : PyObject * obj1 = 0 ;
25665 66 : char * kwnames[] = {
25666 : (char *)"self", (char *)"options", NULL
25667 : };
25668 66 : retStringAndCPLFree *result = 0 ;
25669 :
25670 66 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToGML", kwnames, &obj0, &obj1)) SWIG_fail;
25671 66 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25672 66 : if (!SWIG_IsOK(res1)) {
25673 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToGML" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25674 : }
25675 66 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25676 66 : if (obj1) {
25677 42 : {
25678 : /* %typemap(in) char **dict */
25679 42 : arg2 = NULL;
25680 42 : if ( PySequence_Check( obj1 ) ) {
25681 42 : int bErr = FALSE;
25682 42 : arg2 = CSLFromPySequence(obj1, &bErr);
25683 42 : if ( bErr )
25684 : {
25685 0 : SWIG_fail;
25686 : }
25687 : }
25688 0 : else if ( PyMapping_Check( obj1 ) ) {
25689 0 : int bErr = FALSE;
25690 0 : arg2 = CSLFromPyMapping(obj1, &bErr);
25691 0 : if ( bErr )
25692 : {
25693 0 : SWIG_fail;
25694 : }
25695 : }
25696 : else {
25697 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
25698 0 : SWIG_fail;
25699 : }
25700 : }
25701 : }
25702 66 : {
25703 66 : const int bLocalUseExceptions = GetUseExceptions();
25704 66 : if ( bLocalUseExceptions ) {
25705 66 : pushErrorHandler();
25706 : }
25707 66 : {
25708 66 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25709 66 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML(arg1,arg2);
25710 66 : SWIG_PYTHON_THREAD_END_ALLOW;
25711 : }
25712 66 : if ( bLocalUseExceptions ) {
25713 66 : popErrorHandler();
25714 : }
25715 : #ifndef SED_HACKS
25716 : if ( bLocalUseExceptions ) {
25717 : CPLErr eclass = CPLGetLastErrorType();
25718 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25719 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25720 : }
25721 : }
25722 : #endif
25723 : }
25724 66 : {
25725 : /* %typemap(out) (retStringAndCPLFree*) */
25726 66 : Py_XDECREF(resultobj);
25727 66 : if(result)
25728 : {
25729 66 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
25730 66 : CPLFree(result);
25731 : }
25732 : else
25733 : {
25734 0 : resultobj = Py_None;
25735 0 : Py_INCREF(resultobj);
25736 : }
25737 : }
25738 66 : {
25739 : /* %typemap(freearg) char **dict */
25740 66 : CSLDestroy( arg2 );
25741 : }
25742 66 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25743 : return resultobj;
25744 0 : fail:
25745 0 : {
25746 : /* %typemap(freearg) char **dict */
25747 0 : CSLDestroy( arg2 );
25748 : }
25749 : return NULL;
25750 : }
25751 :
25752 :
25753 0 : SWIGINTERN PyObject *_wrap_Geometry_ExportToKML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25754 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25755 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25756 0 : char *arg2 = (char *) NULL ;
25757 0 : void *argp1 = 0 ;
25758 0 : int res1 = 0 ;
25759 0 : int res2 ;
25760 0 : char *buf2 = 0 ;
25761 0 : int alloc2 = 0 ;
25762 0 : PyObject *swig_obj[2] ;
25763 0 : retStringAndCPLFree *result = 0 ;
25764 :
25765 0 : if (!SWIG_Python_UnpackTuple(args, "Geometry_ExportToKML", 1, 2, swig_obj)) SWIG_fail;
25766 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25767 0 : if (!SWIG_IsOK(res1)) {
25768 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToKML" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25769 : }
25770 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25771 0 : if (swig_obj[1]) {
25772 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
25773 0 : if (!SWIG_IsOK(res2)) {
25774 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_ExportToKML" "', argument " "2"" of type '" "char const *""'");
25775 : }
25776 0 : arg2 = reinterpret_cast< char * >(buf2);
25777 : }
25778 0 : {
25779 0 : const int bLocalUseExceptions = GetUseExceptions();
25780 0 : if ( bLocalUseExceptions ) {
25781 0 : pushErrorHandler();
25782 : }
25783 0 : {
25784 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25785 0 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
25786 0 : SWIG_PYTHON_THREAD_END_ALLOW;
25787 : }
25788 0 : if ( bLocalUseExceptions ) {
25789 0 : popErrorHandler();
25790 : }
25791 : #ifndef SED_HACKS
25792 : if ( bLocalUseExceptions ) {
25793 : CPLErr eclass = CPLGetLastErrorType();
25794 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25795 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25796 : }
25797 : }
25798 : #endif
25799 : }
25800 0 : {
25801 : /* %typemap(out) (retStringAndCPLFree*) */
25802 0 : Py_XDECREF(resultobj);
25803 0 : if(result)
25804 : {
25805 0 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
25806 0 : CPLFree(result);
25807 : }
25808 : else
25809 : {
25810 0 : resultobj = Py_None;
25811 0 : Py_INCREF(resultobj);
25812 : }
25813 : }
25814 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
25815 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25816 : return resultobj;
25817 0 : fail:
25818 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
25819 : return NULL;
25820 : }
25821 :
25822 :
25823 88 : SWIGINTERN PyObject *_wrap_Geometry_ExportToJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25824 88 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25825 88 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25826 88 : char **arg2 = (char **) 0 ;
25827 88 : void *argp1 = 0 ;
25828 88 : int res1 = 0 ;
25829 88 : PyObject * obj0 = 0 ;
25830 88 : PyObject * obj1 = 0 ;
25831 88 : char * kwnames[] = {
25832 : (char *)"self", (char *)"options", NULL
25833 : };
25834 88 : retStringAndCPLFree *result = 0 ;
25835 :
25836 88 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToJson", kwnames, &obj0, &obj1)) SWIG_fail;
25837 88 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25838 88 : if (!SWIG_IsOK(res1)) {
25839 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToJson" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25840 : }
25841 88 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25842 88 : if (obj1) {
25843 34 : {
25844 : /* %typemap(in) char **dict */
25845 34 : arg2 = NULL;
25846 34 : if ( PySequence_Check( obj1 ) ) {
25847 34 : int bErr = FALSE;
25848 34 : arg2 = CSLFromPySequence(obj1, &bErr);
25849 34 : if ( bErr )
25850 : {
25851 0 : SWIG_fail;
25852 : }
25853 : }
25854 0 : else if ( PyMapping_Check( obj1 ) ) {
25855 0 : int bErr = FALSE;
25856 0 : arg2 = CSLFromPyMapping(obj1, &bErr);
25857 0 : if ( bErr )
25858 : {
25859 0 : SWIG_fail;
25860 : }
25861 : }
25862 : else {
25863 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
25864 0 : SWIG_fail;
25865 : }
25866 : }
25867 : }
25868 88 : {
25869 88 : const int bLocalUseExceptions = GetUseExceptions();
25870 88 : if ( bLocalUseExceptions ) {
25871 71 : pushErrorHandler();
25872 : }
25873 88 : {
25874 88 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25875 88 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
25876 88 : SWIG_PYTHON_THREAD_END_ALLOW;
25877 : }
25878 88 : if ( bLocalUseExceptions ) {
25879 71 : popErrorHandler();
25880 : }
25881 : #ifndef SED_HACKS
25882 : if ( bLocalUseExceptions ) {
25883 : CPLErr eclass = CPLGetLastErrorType();
25884 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25885 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25886 : }
25887 : }
25888 : #endif
25889 : }
25890 88 : {
25891 : /* %typemap(out) (retStringAndCPLFree*) */
25892 88 : Py_XDECREF(resultobj);
25893 88 : if(result)
25894 : {
25895 85 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
25896 85 : CPLFree(result);
25897 : }
25898 : else
25899 : {
25900 3 : resultobj = Py_None;
25901 3 : Py_INCREF(resultobj);
25902 : }
25903 : }
25904 88 : {
25905 : /* %typemap(freearg) char **dict */
25906 88 : CSLDestroy( arg2 );
25907 : }
25908 88 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25909 : return resultobj;
25910 0 : fail:
25911 0 : {
25912 : /* %typemap(freearg) char **dict */
25913 0 : CSLDestroy( arg2 );
25914 : }
25915 : return NULL;
25916 : }
25917 :
25918 :
25919 254 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25920 254 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25921 254 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25922 254 : double arg2 ;
25923 254 : double arg3 ;
25924 254 : double arg4 = (double) 0 ;
25925 254 : void *argp1 = 0 ;
25926 254 : int res1 = 0 ;
25927 254 : double val2 ;
25928 254 : int ecode2 = 0 ;
25929 254 : double val3 ;
25930 254 : int ecode3 = 0 ;
25931 254 : double val4 ;
25932 254 : int ecode4 = 0 ;
25933 254 : PyObject * obj0 = 0 ;
25934 254 : PyObject * obj1 = 0 ;
25935 254 : PyObject * obj2 = 0 ;
25936 254 : PyObject * obj3 = 0 ;
25937 254 : char * kwnames[] = {
25938 : (char *)"self", (char *)"x", (char *)"y", (char *)"z", NULL
25939 : };
25940 :
25941 254 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|O:Geometry_AddPoint", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
25942 254 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
25943 254 : if (!SWIG_IsOK(res1)) {
25944 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
25945 : }
25946 254 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
25947 254 : ecode2 = SWIG_AsVal_double(obj1, &val2);
25948 254 : if (!SWIG_IsOK(ecode2)) {
25949 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint" "', argument " "2"" of type '" "double""'");
25950 : }
25951 254 : arg2 = static_cast< double >(val2);
25952 254 : ecode3 = SWIG_AsVal_double(obj2, &val3);
25953 254 : if (!SWIG_IsOK(ecode3)) {
25954 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint" "', argument " "3"" of type '" "double""'");
25955 : }
25956 254 : arg3 = static_cast< double >(val3);
25957 254 : if (obj3) {
25958 153 : ecode4 = SWIG_AsVal_double(obj3, &val4);
25959 153 : if (!SWIG_IsOK(ecode4)) {
25960 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPoint" "', argument " "4"" of type '" "double""'");
25961 : }
25962 153 : arg4 = static_cast< double >(val4);
25963 : }
25964 254 : {
25965 254 : const int bLocalUseExceptions = GetUseExceptions();
25966 254 : if ( bLocalUseExceptions ) {
25967 228 : pushErrorHandler();
25968 : }
25969 254 : {
25970 254 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
25971 254 : OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
25972 254 : SWIG_PYTHON_THREAD_END_ALLOW;
25973 : }
25974 254 : if ( bLocalUseExceptions ) {
25975 228 : popErrorHandler();
25976 : }
25977 : #ifndef SED_HACKS
25978 : if ( bLocalUseExceptions ) {
25979 : CPLErr eclass = CPLGetLastErrorType();
25980 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
25981 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
25982 : }
25983 : }
25984 : #endif
25985 : }
25986 254 : resultobj = SWIG_Py_Void();
25987 254 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
25988 : return resultobj;
25989 : fail:
25990 : return NULL;
25991 : }
25992 :
25993 :
25994 0 : SWIGINTERN PyObject *_wrap_Geometry_AddPointM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
25995 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
25996 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
25997 0 : double arg2 ;
25998 0 : double arg3 ;
25999 0 : double arg4 ;
26000 0 : void *argp1 = 0 ;
26001 0 : int res1 = 0 ;
26002 0 : double val2 ;
26003 0 : int ecode2 = 0 ;
26004 0 : double val3 ;
26005 0 : int ecode3 = 0 ;
26006 0 : double val4 ;
26007 0 : int ecode4 = 0 ;
26008 0 : PyObject * obj0 = 0 ;
26009 0 : PyObject * obj1 = 0 ;
26010 0 : PyObject * obj2 = 0 ;
26011 0 : PyObject * obj3 = 0 ;
26012 0 : char * kwnames[] = {
26013 : (char *)"self", (char *)"x", (char *)"y", (char *)"m", NULL
26014 : };
26015 :
26016 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:Geometry_AddPointM", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
26017 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26018 0 : if (!SWIG_IsOK(res1)) {
26019 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPointM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26020 : }
26021 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26022 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
26023 0 : if (!SWIG_IsOK(ecode2)) {
26024 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPointM" "', argument " "2"" of type '" "double""'");
26025 : }
26026 0 : arg2 = static_cast< double >(val2);
26027 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
26028 0 : if (!SWIG_IsOK(ecode3)) {
26029 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPointM" "', argument " "3"" of type '" "double""'");
26030 : }
26031 0 : arg3 = static_cast< double >(val3);
26032 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
26033 0 : if (!SWIG_IsOK(ecode4)) {
26034 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPointM" "', argument " "4"" of type '" "double""'");
26035 : }
26036 0 : arg4 = static_cast< double >(val4);
26037 0 : {
26038 0 : const int bLocalUseExceptions = GetUseExceptions();
26039 0 : if ( bLocalUseExceptions ) {
26040 0 : pushErrorHandler();
26041 : }
26042 0 : {
26043 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26044 0 : OGRGeometryShadow_AddPointM(arg1,arg2,arg3,arg4);
26045 0 : SWIG_PYTHON_THREAD_END_ALLOW;
26046 : }
26047 0 : if ( bLocalUseExceptions ) {
26048 0 : popErrorHandler();
26049 : }
26050 : #ifndef SED_HACKS
26051 : if ( bLocalUseExceptions ) {
26052 : CPLErr eclass = CPLGetLastErrorType();
26053 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26054 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26055 : }
26056 : }
26057 : #endif
26058 : }
26059 0 : resultobj = SWIG_Py_Void();
26060 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26061 : return resultobj;
26062 : fail:
26063 : return NULL;
26064 : }
26065 :
26066 :
26067 0 : SWIGINTERN PyObject *_wrap_Geometry_AddPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
26068 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26069 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26070 0 : double arg2 ;
26071 0 : double arg3 ;
26072 0 : double arg4 ;
26073 0 : double arg5 ;
26074 0 : void *argp1 = 0 ;
26075 0 : int res1 = 0 ;
26076 0 : double val2 ;
26077 0 : int ecode2 = 0 ;
26078 0 : double val3 ;
26079 0 : int ecode3 = 0 ;
26080 0 : double val4 ;
26081 0 : int ecode4 = 0 ;
26082 0 : double val5 ;
26083 0 : int ecode5 = 0 ;
26084 0 : PyObject * obj0 = 0 ;
26085 0 : PyObject * obj1 = 0 ;
26086 0 : PyObject * obj2 = 0 ;
26087 0 : PyObject * obj3 = 0 ;
26088 0 : PyObject * obj4 = 0 ;
26089 0 : char * kwnames[] = {
26090 : (char *)"self", (char *)"x", (char *)"y", (char *)"z", (char *)"m", NULL
26091 : };
26092 :
26093 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:Geometry_AddPointZM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
26094 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26095 0 : if (!SWIG_IsOK(res1)) {
26096 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26097 : }
26098 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26099 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
26100 0 : if (!SWIG_IsOK(ecode2)) {
26101 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPointZM" "', argument " "2"" of type '" "double""'");
26102 : }
26103 0 : arg2 = static_cast< double >(val2);
26104 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
26105 0 : if (!SWIG_IsOK(ecode3)) {
26106 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPointZM" "', argument " "3"" of type '" "double""'");
26107 : }
26108 0 : arg3 = static_cast< double >(val3);
26109 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
26110 0 : if (!SWIG_IsOK(ecode4)) {
26111 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPointZM" "', argument " "4"" of type '" "double""'");
26112 : }
26113 0 : arg4 = static_cast< double >(val4);
26114 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
26115 0 : if (!SWIG_IsOK(ecode5)) {
26116 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_AddPointZM" "', argument " "5"" of type '" "double""'");
26117 : }
26118 0 : arg5 = static_cast< double >(val5);
26119 0 : {
26120 0 : const int bLocalUseExceptions = GetUseExceptions();
26121 0 : if ( bLocalUseExceptions ) {
26122 0 : pushErrorHandler();
26123 : }
26124 0 : {
26125 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26126 0 : OGRGeometryShadow_AddPointZM(arg1,arg2,arg3,arg4,arg5);
26127 0 : SWIG_PYTHON_THREAD_END_ALLOW;
26128 : }
26129 0 : if ( bLocalUseExceptions ) {
26130 0 : popErrorHandler();
26131 : }
26132 : #ifndef SED_HACKS
26133 : if ( bLocalUseExceptions ) {
26134 : CPLErr eclass = CPLGetLastErrorType();
26135 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26136 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26137 : }
26138 : }
26139 : #endif
26140 : }
26141 0 : resultobj = SWIG_Py_Void();
26142 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26143 : return resultobj;
26144 : fail:
26145 : return NULL;
26146 : }
26147 :
26148 :
26149 1259 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26150 1259 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26151 1259 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26152 1259 : double arg2 ;
26153 1259 : double arg3 ;
26154 1259 : void *argp1 = 0 ;
26155 1259 : int res1 = 0 ;
26156 1259 : double val2 ;
26157 1259 : int ecode2 = 0 ;
26158 1259 : double val3 ;
26159 1259 : int ecode3 = 0 ;
26160 1259 : PyObject *swig_obj[3] ;
26161 :
26162 1259 : if (!SWIG_Python_UnpackTuple(args, "Geometry_AddPoint_2D", 3, 3, swig_obj)) SWIG_fail;
26163 1259 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26164 1259 : if (!SWIG_IsOK(res1)) {
26165 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26166 : }
26167 1259 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26168 1259 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
26169 1259 : if (!SWIG_IsOK(ecode2)) {
26170 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint_2D" "', argument " "2"" of type '" "double""'");
26171 : }
26172 1259 : arg2 = static_cast< double >(val2);
26173 1259 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
26174 1259 : if (!SWIG_IsOK(ecode3)) {
26175 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint_2D" "', argument " "3"" of type '" "double""'");
26176 : }
26177 1259 : arg3 = static_cast< double >(val3);
26178 1259 : {
26179 1259 : const int bLocalUseExceptions = GetUseExceptions();
26180 1259 : if ( bLocalUseExceptions ) {
26181 26 : pushErrorHandler();
26182 : }
26183 1259 : {
26184 1259 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26185 1259 : OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
26186 1259 : SWIG_PYTHON_THREAD_END_ALLOW;
26187 : }
26188 1259 : if ( bLocalUseExceptions ) {
26189 26 : popErrorHandler();
26190 : }
26191 : #ifndef SED_HACKS
26192 : if ( bLocalUseExceptions ) {
26193 : CPLErr eclass = CPLGetLastErrorType();
26194 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26195 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26196 : }
26197 : }
26198 : #endif
26199 : }
26200 1259 : resultobj = SWIG_Py_Void();
26201 1259 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26202 : return resultobj;
26203 : fail:
26204 : return NULL;
26205 : }
26206 :
26207 :
26208 9 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26209 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26210 9 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26211 9 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
26212 9 : void *argp1 = 0 ;
26213 9 : int res1 = 0 ;
26214 9 : int res2 = 0 ;
26215 9 : PyObject *swig_obj[2] ;
26216 9 : OGRErr result;
26217 :
26218 9 : if (!SWIG_Python_UnpackTuple(args, "Geometry_AddGeometryDirectly", 2, 2, swig_obj)) SWIG_fail;
26219 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26220 9 : if (!SWIG_IsOK(res1)) {
26221 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometryDirectly" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26222 : }
26223 9 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26224 9 : res2 = SWIG_ConvertPtr(swig_obj[1], SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
26225 9 : if (!SWIG_IsOK(res2)) {
26226 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
26227 : }
26228 9 : {
26229 9 : if (!arg2) {
26230 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
26231 : }
26232 : }
26233 9 : {
26234 9 : const int bLocalUseExceptions = GetUseExceptions();
26235 9 : if ( bLocalUseExceptions ) {
26236 1 : pushErrorHandler();
26237 : }
26238 9 : {
26239 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26240 9 : result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
26241 9 : SWIG_PYTHON_THREAD_END_ALLOW;
26242 : }
26243 9 : if ( bLocalUseExceptions ) {
26244 1 : popErrorHandler();
26245 : }
26246 : #ifndef SED_HACKS
26247 : if ( bLocalUseExceptions ) {
26248 : CPLErr eclass = CPLGetLastErrorType();
26249 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26250 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26251 : }
26252 : }
26253 : #endif
26254 : }
26255 9 : {
26256 : /* %typemap(out) OGRErr */
26257 12 : if ( result != 0 && GetUseExceptions()) {
26258 0 : const char* pszMessage = CPLGetLastErrorMsg();
26259 0 : if( pszMessage[0] != '\0' )
26260 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
26261 : else
26262 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
26263 0 : SWIG_fail;
26264 : }
26265 : }
26266 9 : {
26267 : /* %typemap(ret) OGRErr */
26268 9 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
26269 9 : resultobj = PyInt_FromLong( result );
26270 : }
26271 : }
26272 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26273 : return resultobj;
26274 : fail:
26275 : return NULL;
26276 : }
26277 :
26278 :
26279 105 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26280 105 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26281 105 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26282 105 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
26283 105 : void *argp1 = 0 ;
26284 105 : int res1 = 0 ;
26285 105 : void *argp2 = 0 ;
26286 105 : int res2 = 0 ;
26287 105 : PyObject *swig_obj[2] ;
26288 105 : OGRErr result;
26289 :
26290 105 : if (!SWIG_Python_UnpackTuple(args, "Geometry_AddGeometry", 2, 2, swig_obj)) SWIG_fail;
26291 105 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26292 105 : if (!SWIG_IsOK(res1)) {
26293 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26294 : }
26295 105 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26296 105 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26297 105 : if (!SWIG_IsOK(res2)) {
26298 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
26299 : }
26300 105 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
26301 105 : {
26302 105 : if (!arg2) {
26303 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
26304 : }
26305 : }
26306 105 : {
26307 105 : const int bLocalUseExceptions = GetUseExceptions();
26308 105 : if ( bLocalUseExceptions ) {
26309 36 : pushErrorHandler();
26310 : }
26311 105 : {
26312 105 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26313 105 : result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
26314 105 : SWIG_PYTHON_THREAD_END_ALLOW;
26315 : }
26316 105 : if ( bLocalUseExceptions ) {
26317 36 : popErrorHandler();
26318 : }
26319 : #ifndef SED_HACKS
26320 : if ( bLocalUseExceptions ) {
26321 : CPLErr eclass = CPLGetLastErrorType();
26322 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26323 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26324 : }
26325 : }
26326 : #endif
26327 : }
26328 105 : {
26329 : /* %typemap(out) OGRErr */
26330 109 : if ( result != 0 && GetUseExceptions()) {
26331 0 : const char* pszMessage = CPLGetLastErrorMsg();
26332 0 : if( pszMessage[0] != '\0' )
26333 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
26334 : else
26335 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
26336 0 : SWIG_fail;
26337 : }
26338 : }
26339 105 : {
26340 : /* %typemap(ret) OGRErr */
26341 105 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
26342 105 : resultobj = PyInt_FromLong( result );
26343 : }
26344 : }
26345 105 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26346 : return resultobj;
26347 : fail:
26348 : return NULL;
26349 : }
26350 :
26351 :
26352 59 : SWIGINTERN PyObject *_wrap_Geometry_RemoveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26353 59 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26354 59 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26355 59 : int arg2 ;
26356 59 : void *argp1 = 0 ;
26357 59 : int res1 = 0 ;
26358 59 : int val2 ;
26359 59 : int ecode2 = 0 ;
26360 59 : PyObject *swig_obj[2] ;
26361 59 : OGRErr result;
26362 :
26363 59 : if (!SWIG_Python_UnpackTuple(args, "Geometry_RemoveGeometry", 2, 2, swig_obj)) SWIG_fail;
26364 59 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26365 59 : if (!SWIG_IsOK(res1)) {
26366 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_RemoveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26367 : }
26368 59 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26369 59 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
26370 59 : if (!SWIG_IsOK(ecode2)) {
26371 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_RemoveGeometry" "', argument " "2"" of type '" "int""'");
26372 : }
26373 59 : arg2 = static_cast< int >(val2);
26374 59 : {
26375 59 : const int bLocalUseExceptions = GetUseExceptions();
26376 59 : if ( bLocalUseExceptions ) {
26377 42 : pushErrorHandler();
26378 : }
26379 59 : {
26380 59 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26381 59 : result = (OGRErr)OGRGeometryShadow_RemoveGeometry(arg1,arg2);
26382 59 : SWIG_PYTHON_THREAD_END_ALLOW;
26383 : }
26384 59 : if ( bLocalUseExceptions ) {
26385 42 : popErrorHandler();
26386 : }
26387 : #ifndef SED_HACKS
26388 : if ( bLocalUseExceptions ) {
26389 : CPLErr eclass = CPLGetLastErrorType();
26390 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26391 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26392 : }
26393 : }
26394 : #endif
26395 : }
26396 59 : {
26397 : /* %typemap(out) OGRErr */
26398 66 : if ( result != 0 && GetUseExceptions()) {
26399 0 : const char* pszMessage = CPLGetLastErrorMsg();
26400 0 : if( pszMessage[0] != '\0' )
26401 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
26402 : else
26403 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
26404 0 : SWIG_fail;
26405 : }
26406 : }
26407 59 : {
26408 : /* %typemap(ret) OGRErr */
26409 59 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
26410 59 : resultobj = PyInt_FromLong( result );
26411 : }
26412 : }
26413 59 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26414 : return resultobj;
26415 : fail:
26416 : return NULL;
26417 : }
26418 :
26419 :
26420 12417 : SWIGINTERN PyObject *_wrap_Geometry_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26421 12417 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26422 12417 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26423 12417 : void *argp1 = 0 ;
26424 12417 : int res1 = 0 ;
26425 12417 : PyObject *swig_obj[1] ;
26426 12417 : OGRGeometryShadow *result = 0 ;
26427 :
26428 12417 : if (!args) SWIG_fail;
26429 12417 : swig_obj[0] = args;
26430 12417 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26431 12417 : if (!SWIG_IsOK(res1)) {
26432 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Clone" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26433 : }
26434 12417 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26435 12417 : {
26436 12417 : const int bLocalUseExceptions = GetUseExceptions();
26437 12417 : if ( bLocalUseExceptions ) {
26438 12346 : pushErrorHandler();
26439 : }
26440 12417 : {
26441 12417 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26442 12417 : result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
26443 12417 : SWIG_PYTHON_THREAD_END_ALLOW;
26444 : }
26445 12417 : if ( bLocalUseExceptions ) {
26446 12346 : popErrorHandler();
26447 : }
26448 : #ifndef SED_HACKS
26449 : if ( bLocalUseExceptions ) {
26450 : CPLErr eclass = CPLGetLastErrorType();
26451 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26452 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26453 : }
26454 : }
26455 : #endif
26456 : }
26457 12417 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
26458 12417 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26459 : return resultobj;
26460 : fail:
26461 : return NULL;
26462 : }
26463 :
26464 :
26465 3177 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26466 3177 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26467 3177 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26468 3177 : void *argp1 = 0 ;
26469 3177 : int res1 = 0 ;
26470 3177 : PyObject *swig_obj[1] ;
26471 3177 : OGRwkbGeometryType result;
26472 :
26473 3177 : if (!args) SWIG_fail;
26474 3177 : swig_obj[0] = args;
26475 3177 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26476 3177 : if (!SWIG_IsOK(res1)) {
26477 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryType" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26478 : }
26479 3177 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26480 3177 : {
26481 3177 : const int bLocalUseExceptions = GetUseExceptions();
26482 3177 : if ( bLocalUseExceptions ) {
26483 895 : pushErrorHandler();
26484 : }
26485 3177 : {
26486 3177 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26487 3177 : result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
26488 3177 : SWIG_PYTHON_THREAD_END_ALLOW;
26489 : }
26490 3177 : if ( bLocalUseExceptions ) {
26491 895 : popErrorHandler();
26492 : }
26493 : #ifndef SED_HACKS
26494 : if ( bLocalUseExceptions ) {
26495 : CPLErr eclass = CPLGetLastErrorType();
26496 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26497 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26498 : }
26499 : }
26500 : #endif
26501 : }
26502 3177 : resultobj = SWIG_From_int(static_cast< int >(result));
26503 3177 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26504 : return resultobj;
26505 : fail:
26506 : return NULL;
26507 : }
26508 :
26509 :
26510 13641 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26511 13641 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26512 13641 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26513 13641 : void *argp1 = 0 ;
26514 13641 : int res1 = 0 ;
26515 13641 : PyObject *swig_obj[1] ;
26516 13641 : char *result = 0 ;
26517 :
26518 13641 : if (!args) SWIG_fail;
26519 13641 : swig_obj[0] = args;
26520 13641 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26521 13641 : if (!SWIG_IsOK(res1)) {
26522 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryName" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26523 : }
26524 13641 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26525 13641 : {
26526 13641 : const int bLocalUseExceptions = GetUseExceptions();
26527 13641 : if ( bLocalUseExceptions ) {
26528 3 : pushErrorHandler();
26529 : }
26530 13641 : {
26531 13641 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26532 13641 : result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
26533 13641 : SWIG_PYTHON_THREAD_END_ALLOW;
26534 : }
26535 13641 : if ( bLocalUseExceptions ) {
26536 3 : popErrorHandler();
26537 : }
26538 : #ifndef SED_HACKS
26539 : if ( bLocalUseExceptions ) {
26540 : CPLErr eclass = CPLGetLastErrorType();
26541 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26542 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26543 : }
26544 : }
26545 : #endif
26546 : }
26547 13641 : resultobj = SWIG_FromCharPtr((const char *)result);
26548 13641 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26549 : return resultobj;
26550 : fail:
26551 : return NULL;
26552 : }
26553 :
26554 :
26555 27 : SWIGINTERN PyObject *_wrap_Geometry_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26556 27 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26557 27 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26558 27 : void *argp1 = 0 ;
26559 27 : int res1 = 0 ;
26560 27 : PyObject *swig_obj[1] ;
26561 27 : double result;
26562 :
26563 27 : if (!args) SWIG_fail;
26564 27 : swig_obj[0] = args;
26565 27 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26566 27 : if (!SWIG_IsOK(res1)) {
26567 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Length" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26568 : }
26569 27 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26570 27 : {
26571 27 : const int bLocalUseExceptions = GetUseExceptions();
26572 27 : if ( bLocalUseExceptions ) {
26573 3 : pushErrorHandler();
26574 : }
26575 27 : {
26576 27 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26577 27 : result = (double)OGRGeometryShadow_Length(arg1);
26578 27 : SWIG_PYTHON_THREAD_END_ALLOW;
26579 : }
26580 27 : if ( bLocalUseExceptions ) {
26581 3 : popErrorHandler();
26582 : }
26583 : #ifndef SED_HACKS
26584 : if ( bLocalUseExceptions ) {
26585 : CPLErr eclass = CPLGetLastErrorType();
26586 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26587 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26588 : }
26589 : }
26590 : #endif
26591 : }
26592 27 : resultobj = SWIG_From_double(static_cast< double >(result));
26593 27 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26594 : return resultobj;
26595 : fail:
26596 : return NULL;
26597 : }
26598 :
26599 :
26600 21 : SWIGINTERN PyObject *_wrap_Geometry_Area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26601 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26602 21 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26603 21 : void *argp1 = 0 ;
26604 21 : int res1 = 0 ;
26605 21 : PyObject *swig_obj[1] ;
26606 21 : double result;
26607 :
26608 21 : if (!args) SWIG_fail;
26609 21 : swig_obj[0] = args;
26610 21 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26611 21 : if (!SWIG_IsOK(res1)) {
26612 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Area" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26613 : }
26614 21 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26615 21 : {
26616 21 : const int bLocalUseExceptions = GetUseExceptions();
26617 21 : if ( bLocalUseExceptions ) {
26618 3 : pushErrorHandler();
26619 : }
26620 21 : {
26621 21 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26622 21 : result = (double)OGRGeometryShadow_Area(arg1);
26623 21 : SWIG_PYTHON_THREAD_END_ALLOW;
26624 : }
26625 21 : if ( bLocalUseExceptions ) {
26626 3 : popErrorHandler();
26627 : }
26628 : #ifndef SED_HACKS
26629 : if ( bLocalUseExceptions ) {
26630 : CPLErr eclass = CPLGetLastErrorType();
26631 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26632 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26633 : }
26634 : }
26635 : #endif
26636 : }
26637 21 : resultobj = SWIG_From_double(static_cast< double >(result));
26638 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26639 : return resultobj;
26640 : fail:
26641 : return NULL;
26642 : }
26643 :
26644 :
26645 24 : SWIGINTERN PyObject *_wrap_Geometry_GeodesicArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26646 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26647 24 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26648 24 : void *argp1 = 0 ;
26649 24 : int res1 = 0 ;
26650 24 : PyObject *swig_obj[1] ;
26651 24 : double result;
26652 :
26653 24 : if (!args) SWIG_fail;
26654 24 : swig_obj[0] = args;
26655 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26656 24 : if (!SWIG_IsOK(res1)) {
26657 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GeodesicArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26658 : }
26659 24 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26660 24 : {
26661 24 : const int bLocalUseExceptions = GetUseExceptions();
26662 24 : if ( bLocalUseExceptions ) {
26663 24 : pushErrorHandler();
26664 : }
26665 24 : {
26666 24 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26667 24 : result = (double)OGRGeometryShadow_GeodesicArea(arg1);
26668 24 : SWIG_PYTHON_THREAD_END_ALLOW;
26669 : }
26670 24 : if ( bLocalUseExceptions ) {
26671 24 : popErrorHandler();
26672 : }
26673 : #ifndef SED_HACKS
26674 : if ( bLocalUseExceptions ) {
26675 : CPLErr eclass = CPLGetLastErrorType();
26676 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26677 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26678 : }
26679 : }
26680 : #endif
26681 : }
26682 24 : resultobj = SWIG_From_double(static_cast< double >(result));
26683 32 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26684 : return resultobj;
26685 : fail:
26686 : return NULL;
26687 : }
26688 :
26689 :
26690 33 : SWIGINTERN PyObject *_wrap_Geometry_IsClockwise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26691 33 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26692 33 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26693 33 : void *argp1 = 0 ;
26694 33 : int res1 = 0 ;
26695 33 : PyObject *swig_obj[1] ;
26696 33 : bool result;
26697 :
26698 33 : if (!args) SWIG_fail;
26699 33 : swig_obj[0] = args;
26700 33 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26701 33 : if (!SWIG_IsOK(res1)) {
26702 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsClockwise" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26703 : }
26704 33 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26705 33 : {
26706 33 : const int bLocalUseExceptions = GetUseExceptions();
26707 33 : if ( bLocalUseExceptions ) {
26708 33 : pushErrorHandler();
26709 : }
26710 33 : {
26711 33 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26712 33 : result = (bool)OGRGeometryShadow_IsClockwise(arg1);
26713 33 : SWIG_PYTHON_THREAD_END_ALLOW;
26714 : }
26715 33 : if ( bLocalUseExceptions ) {
26716 33 : popErrorHandler();
26717 : }
26718 : #ifndef SED_HACKS
26719 : if ( bLocalUseExceptions ) {
26720 : CPLErr eclass = CPLGetLastErrorType();
26721 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26722 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26723 : }
26724 : }
26725 : #endif
26726 : }
26727 33 : resultobj = SWIG_From_bool(static_cast< bool >(result));
26728 34 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26729 : return resultobj;
26730 : fail:
26731 : return NULL;
26732 : }
26733 :
26734 :
26735 1384 : SWIGINTERN PyObject *_wrap_Geometry_GetArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26736 1384 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26737 1384 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26738 1384 : void *argp1 = 0 ;
26739 1384 : int res1 = 0 ;
26740 1384 : PyObject *swig_obj[1] ;
26741 1384 : double result;
26742 :
26743 1384 : if (!args) SWIG_fail;
26744 1384 : swig_obj[0] = args;
26745 1384 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26746 1384 : if (!SWIG_IsOK(res1)) {
26747 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26748 : }
26749 1384 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26750 1384 : {
26751 1384 : const int bLocalUseExceptions = GetUseExceptions();
26752 1384 : if ( bLocalUseExceptions ) {
26753 1378 : pushErrorHandler();
26754 : }
26755 1384 : {
26756 1384 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26757 1384 : result = (double)OGRGeometryShadow_GetArea(arg1);
26758 1384 : SWIG_PYTHON_THREAD_END_ALLOW;
26759 : }
26760 1384 : if ( bLocalUseExceptions ) {
26761 1378 : popErrorHandler();
26762 : }
26763 : #ifndef SED_HACKS
26764 : if ( bLocalUseExceptions ) {
26765 : CPLErr eclass = CPLGetLastErrorType();
26766 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26767 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26768 : }
26769 : }
26770 : #endif
26771 : }
26772 1384 : resultobj = SWIG_From_double(static_cast< double >(result));
26773 1384 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26774 : return resultobj;
26775 : fail:
26776 : return NULL;
26777 : }
26778 :
26779 :
26780 11321 : SWIGINTERN PyObject *_wrap_Geometry_GetPointCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26781 11321 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26782 11321 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26783 11321 : void *argp1 = 0 ;
26784 11321 : int res1 = 0 ;
26785 11321 : PyObject *swig_obj[1] ;
26786 11321 : int result;
26787 :
26788 11321 : if (!args) SWIG_fail;
26789 11321 : swig_obj[0] = args;
26790 11321 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26791 11321 : if (!SWIG_IsOK(res1)) {
26792 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26793 : }
26794 11321 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26795 11321 : {
26796 11321 : const int bLocalUseExceptions = GetUseExceptions();
26797 11321 : if ( bLocalUseExceptions ) {
26798 14 : pushErrorHandler();
26799 : }
26800 11321 : {
26801 11321 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26802 11321 : result = (int)OGRGeometryShadow_GetPointCount(arg1);
26803 11321 : SWIG_PYTHON_THREAD_END_ALLOW;
26804 : }
26805 11321 : if ( bLocalUseExceptions ) {
26806 14 : popErrorHandler();
26807 : }
26808 : #ifndef SED_HACKS
26809 : if ( bLocalUseExceptions ) {
26810 : CPLErr eclass = CPLGetLastErrorType();
26811 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26812 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26813 : }
26814 : }
26815 : #endif
26816 : }
26817 11321 : resultobj = SWIG_From_int(static_cast< int >(result));
26818 11321 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26819 : return resultobj;
26820 : fail:
26821 : return NULL;
26822 : }
26823 :
26824 :
26825 11 : SWIGINTERN PyObject *_wrap_Geometry_GetPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
26826 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26827 11 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26828 11 : int *arg2 = (int *) 0 ;
26829 11 : double **arg3 = (double **) 0 ;
26830 11 : double **arg4 = (double **) 0 ;
26831 11 : int arg5 = (int) 0 ;
26832 11 : void *argp1 = 0 ;
26833 11 : int res1 = 0 ;
26834 11 : int nPoints2 = 0 ;
26835 11 : double *padfXY2 = NULL ;
26836 11 : double *padfZ2 = NULL ;
26837 11 : int val5 ;
26838 11 : int ecode5 = 0 ;
26839 11 : PyObject * obj0 = 0 ;
26840 11 : PyObject * obj1 = 0 ;
26841 11 : char * kwnames[] = {
26842 : (char *)"self", (char *)"nCoordDimension", NULL
26843 : };
26844 :
26845 11 : {
26846 : /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
26847 11 : arg2 = &nPoints2;
26848 11 : arg3 = &padfXY2;
26849 11 : arg4 = &padfZ2;
26850 : }
26851 11 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetPoints", kwnames, &obj0, &obj1)) SWIG_fail;
26852 11 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26853 11 : if (!SWIG_IsOK(res1)) {
26854 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoints" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26855 : }
26856 11 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26857 11 : if (obj1) {
26858 4 : ecode5 = SWIG_AsVal_int(obj1, &val5);
26859 4 : if (!SWIG_IsOK(ecode5)) {
26860 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_GetPoints" "', argument " "5"" of type '" "int""'");
26861 : }
26862 : arg5 = static_cast< int >(val5);
26863 : }
26864 11 : {
26865 11 : const int bLocalUseExceptions = GetUseExceptions();
26866 11 : if ( bLocalUseExceptions ) {
26867 2 : pushErrorHandler();
26868 : }
26869 11 : {
26870 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26871 11 : OGRGeometryShadow_GetPoints(arg1,arg2,arg3,arg4,arg5);
26872 11 : SWIG_PYTHON_THREAD_END_ALLOW;
26873 : }
26874 11 : if ( bLocalUseExceptions ) {
26875 2 : popErrorHandler();
26876 : }
26877 : #ifndef SED_HACKS
26878 : if ( bLocalUseExceptions ) {
26879 : CPLErr eclass = CPLGetLastErrorType();
26880 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26881 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26882 : }
26883 : }
26884 : #endif
26885 : }
26886 11 : resultobj = SWIG_Py_Void();
26887 11 : {
26888 : /* %typemap(argout) (int* pnCount, double** ppadfXY, double** ppadfZ) */
26889 11 : Py_DECREF(resultobj);
26890 11 : int nPointCount = *(arg2);
26891 11 : if (nPointCount == 0)
26892 : {
26893 1 : Py_INCREF(Py_None);
26894 1 : resultobj = Py_None;
26895 : }
26896 : else
26897 : {
26898 10 : PyObject *xyz = PyList_New( nPointCount );
26899 10 : if( !xyz ) {
26900 0 : SWIG_fail;
26901 : }
26902 10 : int nDimensions = (*arg4 != NULL) ? 3 : 2;
26903 184 : for( int i=0; i< nPointCount; i++ ) {
26904 174 : PyObject *tuple = PyTuple_New( nDimensions );
26905 174 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (*arg3)[2*i] ) );
26906 174 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (*arg3)[2*i+1] ) );
26907 174 : if (nDimensions == 3)
26908 6 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (*arg4)[i] ) );
26909 174 : PyList_SetItem( xyz, i, tuple );
26910 : }
26911 : resultobj = xyz;
26912 : }
26913 : }
26914 11 : {
26915 : /* %typemap(freearg) (int* pnCount, double** ppadfXY, double** ppadfZ) */
26916 11 : VSIFree(*arg3);
26917 11 : VSIFree(*arg4);
26918 : }
26919 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26920 : return resultobj;
26921 0 : fail:
26922 0 : {
26923 : /* %typemap(freearg) (int* pnCount, double** ppadfXY, double** ppadfZ) */
26924 0 : VSIFree(*arg3);
26925 0 : VSIFree(*arg4);
26926 : }
26927 : return NULL;
26928 : }
26929 :
26930 :
26931 30960 : SWIGINTERN PyObject *_wrap_Geometry_GetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
26932 30960 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26933 30960 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26934 30960 : int arg2 = (int) 0 ;
26935 30960 : void *argp1 = 0 ;
26936 30960 : int res1 = 0 ;
26937 30960 : int val2 ;
26938 30960 : int ecode2 = 0 ;
26939 30960 : PyObject * obj0 = 0 ;
26940 30960 : PyObject * obj1 = 0 ;
26941 30960 : char * kwnames[] = {
26942 : (char *)"self", (char *)"point", NULL
26943 : };
26944 30960 : double result;
26945 :
26946 30960 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetX", kwnames, &obj0, &obj1)) SWIG_fail;
26947 30960 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
26948 30960 : if (!SWIG_IsOK(res1)) {
26949 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetX" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
26950 : }
26951 30960 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
26952 30960 : if (obj1) {
26953 29746 : ecode2 = SWIG_AsVal_int(obj1, &val2);
26954 29746 : if (!SWIG_IsOK(ecode2)) {
26955 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetX" "', argument " "2"" of type '" "int""'");
26956 : }
26957 : arg2 = static_cast< int >(val2);
26958 : }
26959 30960 : {
26960 30960 : const int bLocalUseExceptions = GetUseExceptions();
26961 30960 : if ( bLocalUseExceptions ) {
26962 1408 : pushErrorHandler();
26963 : }
26964 30960 : {
26965 30960 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
26966 30960 : result = (double)OGRGeometryShadow_GetX(arg1,arg2);
26967 30960 : SWIG_PYTHON_THREAD_END_ALLOW;
26968 : }
26969 30960 : if ( bLocalUseExceptions ) {
26970 1408 : popErrorHandler();
26971 : }
26972 : #ifndef SED_HACKS
26973 : if ( bLocalUseExceptions ) {
26974 : CPLErr eclass = CPLGetLastErrorType();
26975 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
26976 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
26977 : }
26978 : }
26979 : #endif
26980 : }
26981 30960 : resultobj = SWIG_From_double(static_cast< double >(result));
26982 30960 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
26983 : return resultobj;
26984 : fail:
26985 : return NULL;
26986 : }
26987 :
26988 :
26989 29750 : SWIGINTERN PyObject *_wrap_Geometry_GetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
26990 29750 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
26991 29750 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
26992 29750 : int arg2 = (int) 0 ;
26993 29750 : void *argp1 = 0 ;
26994 29750 : int res1 = 0 ;
26995 29750 : int val2 ;
26996 29750 : int ecode2 = 0 ;
26997 29750 : PyObject * obj0 = 0 ;
26998 29750 : PyObject * obj1 = 0 ;
26999 29750 : char * kwnames[] = {
27000 : (char *)"self", (char *)"point", NULL
27001 : };
27002 29750 : double result;
27003 :
27004 29750 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetY", kwnames, &obj0, &obj1)) SWIG_fail;
27005 29750 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27006 29750 : if (!SWIG_IsOK(res1)) {
27007 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetY" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27008 : }
27009 29750 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27010 29750 : if (obj1) {
27011 29737 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27012 29737 : if (!SWIG_IsOK(ecode2)) {
27013 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetY" "', argument " "2"" of type '" "int""'");
27014 : }
27015 : arg2 = static_cast< int >(val2);
27016 : }
27017 29750 : {
27018 29750 : const int bLocalUseExceptions = GetUseExceptions();
27019 29750 : if ( bLocalUseExceptions ) {
27020 200 : pushErrorHandler();
27021 : }
27022 29750 : {
27023 29750 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27024 29750 : result = (double)OGRGeometryShadow_GetY(arg1,arg2);
27025 29750 : SWIG_PYTHON_THREAD_END_ALLOW;
27026 : }
27027 29750 : if ( bLocalUseExceptions ) {
27028 200 : popErrorHandler();
27029 : }
27030 : #ifndef SED_HACKS
27031 : if ( bLocalUseExceptions ) {
27032 : CPLErr eclass = CPLGetLastErrorType();
27033 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27034 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27035 : }
27036 : }
27037 : #endif
27038 : }
27039 29750 : resultobj = SWIG_From_double(static_cast< double >(result));
27040 29750 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27041 : return resultobj;
27042 : fail:
27043 : return NULL;
27044 : }
27045 :
27046 :
27047 12560 : SWIGINTERN PyObject *_wrap_Geometry_GetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27048 12560 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27049 12560 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27050 12560 : int arg2 = (int) 0 ;
27051 12560 : void *argp1 = 0 ;
27052 12560 : int res1 = 0 ;
27053 12560 : int val2 ;
27054 12560 : int ecode2 = 0 ;
27055 12560 : PyObject * obj0 = 0 ;
27056 12560 : PyObject * obj1 = 0 ;
27057 12560 : char * kwnames[] = {
27058 : (char *)"self", (char *)"point", NULL
27059 : };
27060 12560 : double result;
27061 :
27062 12560 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetZ", kwnames, &obj0, &obj1)) SWIG_fail;
27063 12560 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27064 12560 : if (!SWIG_IsOK(res1)) {
27065 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetZ" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27066 : }
27067 12560 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27068 12560 : if (obj1) {
27069 12549 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27070 12549 : if (!SWIG_IsOK(ecode2)) {
27071 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetZ" "', argument " "2"" of type '" "int""'");
27072 : }
27073 : arg2 = static_cast< int >(val2);
27074 : }
27075 12560 : {
27076 12560 : const int bLocalUseExceptions = GetUseExceptions();
27077 12560 : if ( bLocalUseExceptions ) {
27078 188 : pushErrorHandler();
27079 : }
27080 12560 : {
27081 12560 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27082 12560 : result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
27083 12560 : SWIG_PYTHON_THREAD_END_ALLOW;
27084 : }
27085 12560 : if ( bLocalUseExceptions ) {
27086 188 : popErrorHandler();
27087 : }
27088 : #ifndef SED_HACKS
27089 : if ( bLocalUseExceptions ) {
27090 : CPLErr eclass = CPLGetLastErrorType();
27091 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27092 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27093 : }
27094 : }
27095 : #endif
27096 : }
27097 12560 : resultobj = SWIG_From_double(static_cast< double >(result));
27098 12560 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27099 : return resultobj;
27100 : fail:
27101 : return NULL;
27102 : }
27103 :
27104 :
27105 2254 : SWIGINTERN PyObject *_wrap_Geometry_GetM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27106 2254 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27107 2254 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27108 2254 : int arg2 = (int) 0 ;
27109 2254 : void *argp1 = 0 ;
27110 2254 : int res1 = 0 ;
27111 2254 : int val2 ;
27112 2254 : int ecode2 = 0 ;
27113 2254 : PyObject * obj0 = 0 ;
27114 2254 : PyObject * obj1 = 0 ;
27115 2254 : char * kwnames[] = {
27116 : (char *)"self", (char *)"point", NULL
27117 : };
27118 2254 : double result;
27119 :
27120 2254 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetM", kwnames, &obj0, &obj1)) SWIG_fail;
27121 2254 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27122 2254 : if (!SWIG_IsOK(res1)) {
27123 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27124 : }
27125 2254 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27126 2254 : if (obj1) {
27127 2254 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27128 2254 : if (!SWIG_IsOK(ecode2)) {
27129 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetM" "', argument " "2"" of type '" "int""'");
27130 : }
27131 : arg2 = static_cast< int >(val2);
27132 : }
27133 2254 : {
27134 2254 : const int bLocalUseExceptions = GetUseExceptions();
27135 2254 : if ( bLocalUseExceptions ) {
27136 17 : pushErrorHandler();
27137 : }
27138 2254 : {
27139 2254 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27140 2254 : result = (double)OGRGeometryShadow_GetM(arg1,arg2);
27141 2254 : SWIG_PYTHON_THREAD_END_ALLOW;
27142 : }
27143 2254 : if ( bLocalUseExceptions ) {
27144 17 : popErrorHandler();
27145 : }
27146 : #ifndef SED_HACKS
27147 : if ( bLocalUseExceptions ) {
27148 : CPLErr eclass = CPLGetLastErrorType();
27149 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27150 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27151 : }
27152 : }
27153 : #endif
27154 : }
27155 2254 : resultobj = SWIG_From_double(static_cast< double >(result));
27156 2254 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27157 : return resultobj;
27158 : fail:
27159 : return NULL;
27160 : }
27161 :
27162 :
27163 217 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27164 217 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27165 217 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27166 217 : int arg2 = (int) 0 ;
27167 217 : double *arg3 = (double *) (double *)NULL ;
27168 217 : void *argp1 = 0 ;
27169 217 : int res1 = 0 ;
27170 217 : int val2 ;
27171 217 : int ecode2 = 0 ;
27172 217 : double argout3[3] ;
27173 217 : PyObject *swig_obj[2] ;
27174 :
27175 217 : {
27176 : /* %typemap(in,numinputs=0) (double argout3[ANY]) */
27177 217 : memset(argout3, 0, sizeof(argout3));
27178 217 : arg3 = argout3;
27179 : }
27180 217 : if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPoint", 1, 2, swig_obj)) SWIG_fail;
27181 217 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27182 217 : if (!SWIG_IsOK(res1)) {
27183 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27184 : }
27185 217 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27186 217 : if (swig_obj[1]) {
27187 202 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
27188 202 : if (!SWIG_IsOK(ecode2)) {
27189 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint" "', argument " "2"" of type '" "int""'");
27190 : }
27191 : arg2 = static_cast< int >(val2);
27192 : }
27193 217 : {
27194 217 : const int bLocalUseExceptions = GetUseExceptions();
27195 217 : if ( bLocalUseExceptions ) {
27196 28 : pushErrorHandler();
27197 : }
27198 217 : {
27199 217 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27200 217 : OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
27201 217 : SWIG_PYTHON_THREAD_END_ALLOW;
27202 : }
27203 217 : if ( bLocalUseExceptions ) {
27204 28 : popErrorHandler();
27205 : }
27206 : #ifndef SED_HACKS
27207 : if ( bLocalUseExceptions ) {
27208 : CPLErr eclass = CPLGetLastErrorType();
27209 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27210 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27211 : }
27212 : }
27213 : #endif
27214 : }
27215 217 : resultobj = SWIG_Py_Void();
27216 217 : {
27217 : /* %typemap(argout) (double argout[ANY]) */
27218 217 : PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
27219 217 : resultobj = t_output_helper(resultobj,out);
27220 : }
27221 217 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27222 : return resultobj;
27223 : fail:
27224 : return NULL;
27225 : }
27226 :
27227 :
27228 1 : SWIGINTERN PyObject *_wrap_Geometry_GetPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27229 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27230 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27231 1 : int arg2 = (int) 0 ;
27232 1 : double *arg3 = (double *) (double *)NULL ;
27233 1 : void *argp1 = 0 ;
27234 1 : int res1 = 0 ;
27235 1 : int val2 ;
27236 1 : int ecode2 = 0 ;
27237 1 : double argout3[4] ;
27238 1 : PyObject *swig_obj[2] ;
27239 :
27240 1 : {
27241 : /* %typemap(in,numinputs=0) (double argout3[ANY]) */
27242 1 : memset(argout3, 0, sizeof(argout3));
27243 1 : arg3 = argout3;
27244 : }
27245 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPointZM", 1, 2, swig_obj)) SWIG_fail;
27246 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27247 1 : if (!SWIG_IsOK(res1)) {
27248 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27249 : }
27250 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27251 1 : if (swig_obj[1]) {
27252 1 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
27253 1 : if (!SWIG_IsOK(ecode2)) {
27254 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPointZM" "', argument " "2"" of type '" "int""'");
27255 : }
27256 : arg2 = static_cast< int >(val2);
27257 : }
27258 1 : {
27259 1 : const int bLocalUseExceptions = GetUseExceptions();
27260 1 : if ( bLocalUseExceptions ) {
27261 0 : pushErrorHandler();
27262 : }
27263 1 : {
27264 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27265 1 : OGRGeometryShadow_GetPointZM(arg1,arg2,arg3);
27266 1 : SWIG_PYTHON_THREAD_END_ALLOW;
27267 : }
27268 1 : if ( bLocalUseExceptions ) {
27269 0 : popErrorHandler();
27270 : }
27271 : #ifndef SED_HACKS
27272 : if ( bLocalUseExceptions ) {
27273 : CPLErr eclass = CPLGetLastErrorType();
27274 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27275 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27276 : }
27277 : }
27278 : #endif
27279 : }
27280 1 : resultobj = SWIG_Py_Void();
27281 1 : {
27282 : /* %typemap(argout) (double argout[ANY]) */
27283 1 : PyObject *out = CreateTupleFromDoubleArray( arg3, 4 );
27284 1 : resultobj = t_output_helper(resultobj,out);
27285 : }
27286 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27287 : return resultobj;
27288 : fail:
27289 : return NULL;
27290 : }
27291 :
27292 :
27293 3 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27294 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27295 3 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27296 3 : int arg2 = (int) 0 ;
27297 3 : double *arg3 = (double *) (double *)NULL ;
27298 3 : void *argp1 = 0 ;
27299 3 : int res1 = 0 ;
27300 3 : int val2 ;
27301 3 : int ecode2 = 0 ;
27302 3 : double argout3[2] ;
27303 3 : PyObject *swig_obj[2] ;
27304 :
27305 3 : {
27306 : /* %typemap(in,numinputs=0) (double argout3[ANY]) */
27307 3 : memset(argout3, 0, sizeof(argout3));
27308 3 : arg3 = argout3;
27309 : }
27310 3 : if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPoint_2D", 1, 2, swig_obj)) SWIG_fail;
27311 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27312 3 : if (!SWIG_IsOK(res1)) {
27313 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27314 : }
27315 3 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27316 3 : if (swig_obj[1]) {
27317 3 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
27318 3 : if (!SWIG_IsOK(ecode2)) {
27319 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint_2D" "', argument " "2"" of type '" "int""'");
27320 : }
27321 : arg2 = static_cast< int >(val2);
27322 : }
27323 3 : {
27324 3 : const int bLocalUseExceptions = GetUseExceptions();
27325 3 : if ( bLocalUseExceptions ) {
27326 0 : pushErrorHandler();
27327 : }
27328 3 : {
27329 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27330 3 : OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
27331 3 : SWIG_PYTHON_THREAD_END_ALLOW;
27332 : }
27333 3 : if ( bLocalUseExceptions ) {
27334 0 : popErrorHandler();
27335 : }
27336 : #ifndef SED_HACKS
27337 : if ( bLocalUseExceptions ) {
27338 : CPLErr eclass = CPLGetLastErrorType();
27339 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27340 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27341 : }
27342 : }
27343 : #endif
27344 : }
27345 3 : resultobj = SWIG_Py_Void();
27346 3 : {
27347 : /* %typemap(argout) (double argout[ANY]) */
27348 3 : PyObject *out = CreateTupleFromDoubleArray( arg3, 2 );
27349 3 : resultobj = t_output_helper(resultobj,out);
27350 : }
27351 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27352 : return resultobj;
27353 : fail:
27354 : return NULL;
27355 : }
27356 :
27357 :
27358 10188 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27359 10188 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27360 10188 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27361 10188 : void *argp1 = 0 ;
27362 10188 : int res1 = 0 ;
27363 10188 : PyObject *swig_obj[1] ;
27364 10188 : int result;
27365 :
27366 10188 : if (!args) SWIG_fail;
27367 10188 : swig_obj[0] = args;
27368 10188 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27369 10188 : if (!SWIG_IsOK(res1)) {
27370 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27371 : }
27372 10188 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27373 10188 : {
27374 10188 : const int bLocalUseExceptions = GetUseExceptions();
27375 10188 : if ( bLocalUseExceptions ) {
27376 213 : pushErrorHandler();
27377 : }
27378 10188 : {
27379 10188 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27380 10188 : result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
27381 10188 : SWIG_PYTHON_THREAD_END_ALLOW;
27382 : }
27383 10188 : if ( bLocalUseExceptions ) {
27384 213 : popErrorHandler();
27385 : }
27386 : #ifndef SED_HACKS
27387 : if ( bLocalUseExceptions ) {
27388 : CPLErr eclass = CPLGetLastErrorType();
27389 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27390 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27391 : }
27392 : }
27393 : #endif
27394 : }
27395 10188 : resultobj = SWIG_From_int(static_cast< int >(result));
27396 10188 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27397 : return resultobj;
27398 : fail:
27399 : return NULL;
27400 : }
27401 :
27402 :
27403 168 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27404 168 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27405 168 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27406 168 : int arg2 ;
27407 168 : double arg3 ;
27408 168 : double arg4 ;
27409 168 : double arg5 = (double) 0 ;
27410 168 : void *argp1 = 0 ;
27411 168 : int res1 = 0 ;
27412 168 : int val2 ;
27413 168 : int ecode2 = 0 ;
27414 168 : double val3 ;
27415 168 : int ecode3 = 0 ;
27416 168 : double val4 ;
27417 168 : int ecode4 = 0 ;
27418 168 : double val5 ;
27419 168 : int ecode5 = 0 ;
27420 168 : PyObject * obj0 = 0 ;
27421 168 : PyObject * obj1 = 0 ;
27422 168 : PyObject * obj2 = 0 ;
27423 168 : PyObject * obj3 = 0 ;
27424 168 : PyObject * obj4 = 0 ;
27425 168 : char * kwnames[] = {
27426 : (char *)"self", (char *)"point", (char *)"x", (char *)"y", (char *)"z", NULL
27427 : };
27428 :
27429 168 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO|O:Geometry_SetPoint", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
27430 168 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27431 168 : if (!SWIG_IsOK(res1)) {
27432 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27433 : }
27434 168 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27435 168 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27436 168 : if (!SWIG_IsOK(ecode2)) {
27437 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint" "', argument " "2"" of type '" "int""'");
27438 : }
27439 168 : arg2 = static_cast< int >(val2);
27440 168 : ecode3 = SWIG_AsVal_double(obj2, &val3);
27441 168 : if (!SWIG_IsOK(ecode3)) {
27442 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint" "', argument " "3"" of type '" "double""'");
27443 : }
27444 168 : arg3 = static_cast< double >(val3);
27445 168 : ecode4 = SWIG_AsVal_double(obj3, &val4);
27446 168 : if (!SWIG_IsOK(ecode4)) {
27447 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint" "', argument " "4"" of type '" "double""'");
27448 : }
27449 168 : arg4 = static_cast< double >(val4);
27450 168 : if (obj4) {
27451 162 : ecode5 = SWIG_AsVal_double(obj4, &val5);
27452 162 : if (!SWIG_IsOK(ecode5)) {
27453 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPoint" "', argument " "5"" of type '" "double""'");
27454 : }
27455 162 : arg5 = static_cast< double >(val5);
27456 : }
27457 168 : {
27458 168 : const int bLocalUseExceptions = GetUseExceptions();
27459 168 : if ( bLocalUseExceptions ) {
27460 157 : pushErrorHandler();
27461 : }
27462 168 : {
27463 168 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27464 168 : OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
27465 168 : SWIG_PYTHON_THREAD_END_ALLOW;
27466 : }
27467 168 : if ( bLocalUseExceptions ) {
27468 157 : popErrorHandler();
27469 : }
27470 : #ifndef SED_HACKS
27471 : if ( bLocalUseExceptions ) {
27472 : CPLErr eclass = CPLGetLastErrorType();
27473 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27474 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27475 : }
27476 : }
27477 : #endif
27478 : }
27479 168 : resultobj = SWIG_Py_Void();
27480 168 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27481 : return resultobj;
27482 : fail:
27483 : return NULL;
27484 : }
27485 :
27486 :
27487 0 : SWIGINTERN PyObject *_wrap_Geometry_SetPointM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27488 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27489 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27490 0 : int arg2 ;
27491 0 : double arg3 ;
27492 0 : double arg4 ;
27493 0 : double arg5 ;
27494 0 : void *argp1 = 0 ;
27495 0 : int res1 = 0 ;
27496 0 : int val2 ;
27497 0 : int ecode2 = 0 ;
27498 0 : double val3 ;
27499 0 : int ecode3 = 0 ;
27500 0 : double val4 ;
27501 0 : int ecode4 = 0 ;
27502 0 : double val5 ;
27503 0 : int ecode5 = 0 ;
27504 0 : PyObject * obj0 = 0 ;
27505 0 : PyObject * obj1 = 0 ;
27506 0 : PyObject * obj2 = 0 ;
27507 0 : PyObject * obj3 = 0 ;
27508 0 : PyObject * obj4 = 0 ;
27509 0 : char * kwnames[] = {
27510 : (char *)"self", (char *)"point", (char *)"x", (char *)"y", (char *)"m", NULL
27511 : };
27512 :
27513 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:Geometry_SetPointM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
27514 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27515 0 : if (!SWIG_IsOK(res1)) {
27516 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPointM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27517 : }
27518 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27519 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27520 0 : if (!SWIG_IsOK(ecode2)) {
27521 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPointM" "', argument " "2"" of type '" "int""'");
27522 : }
27523 0 : arg2 = static_cast< int >(val2);
27524 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
27525 0 : if (!SWIG_IsOK(ecode3)) {
27526 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPointM" "', argument " "3"" of type '" "double""'");
27527 : }
27528 0 : arg3 = static_cast< double >(val3);
27529 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
27530 0 : if (!SWIG_IsOK(ecode4)) {
27531 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPointM" "', argument " "4"" of type '" "double""'");
27532 : }
27533 0 : arg4 = static_cast< double >(val4);
27534 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
27535 0 : if (!SWIG_IsOK(ecode5)) {
27536 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPointM" "', argument " "5"" of type '" "double""'");
27537 : }
27538 0 : arg5 = static_cast< double >(val5);
27539 0 : {
27540 0 : const int bLocalUseExceptions = GetUseExceptions();
27541 0 : if ( bLocalUseExceptions ) {
27542 0 : pushErrorHandler();
27543 : }
27544 0 : {
27545 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27546 0 : OGRGeometryShadow_SetPointM(arg1,arg2,arg3,arg4,arg5);
27547 0 : SWIG_PYTHON_THREAD_END_ALLOW;
27548 : }
27549 0 : if ( bLocalUseExceptions ) {
27550 0 : popErrorHandler();
27551 : }
27552 : #ifndef SED_HACKS
27553 : if ( bLocalUseExceptions ) {
27554 : CPLErr eclass = CPLGetLastErrorType();
27555 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27556 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27557 : }
27558 : }
27559 : #endif
27560 : }
27561 0 : resultobj = SWIG_Py_Void();
27562 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27563 : return resultobj;
27564 : fail:
27565 : return NULL;
27566 : }
27567 :
27568 :
27569 0 : SWIGINTERN PyObject *_wrap_Geometry_SetPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27570 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27571 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27572 0 : int arg2 ;
27573 0 : double arg3 ;
27574 0 : double arg4 ;
27575 0 : double arg5 ;
27576 0 : double arg6 ;
27577 0 : void *argp1 = 0 ;
27578 0 : int res1 = 0 ;
27579 0 : int val2 ;
27580 0 : int ecode2 = 0 ;
27581 0 : double val3 ;
27582 0 : int ecode3 = 0 ;
27583 0 : double val4 ;
27584 0 : int ecode4 = 0 ;
27585 0 : double val5 ;
27586 0 : int ecode5 = 0 ;
27587 0 : double val6 ;
27588 0 : int ecode6 = 0 ;
27589 0 : PyObject * obj0 = 0 ;
27590 0 : PyObject * obj1 = 0 ;
27591 0 : PyObject * obj2 = 0 ;
27592 0 : PyObject * obj3 = 0 ;
27593 0 : PyObject * obj4 = 0 ;
27594 0 : PyObject * obj5 = 0 ;
27595 0 : char * kwnames[] = {
27596 : (char *)"self", (char *)"point", (char *)"x", (char *)"y", (char *)"z", (char *)"m", NULL
27597 : };
27598 :
27599 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:Geometry_SetPointZM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
27600 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27601 0 : if (!SWIG_IsOK(res1)) {
27602 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27603 : }
27604 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27605 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27606 0 : if (!SWIG_IsOK(ecode2)) {
27607 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPointZM" "', argument " "2"" of type '" "int""'");
27608 : }
27609 0 : arg2 = static_cast< int >(val2);
27610 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
27611 0 : if (!SWIG_IsOK(ecode3)) {
27612 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPointZM" "', argument " "3"" of type '" "double""'");
27613 : }
27614 0 : arg3 = static_cast< double >(val3);
27615 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
27616 0 : if (!SWIG_IsOK(ecode4)) {
27617 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPointZM" "', argument " "4"" of type '" "double""'");
27618 : }
27619 0 : arg4 = static_cast< double >(val4);
27620 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
27621 0 : if (!SWIG_IsOK(ecode5)) {
27622 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPointZM" "', argument " "5"" of type '" "double""'");
27623 : }
27624 0 : arg5 = static_cast< double >(val5);
27625 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
27626 0 : if (!SWIG_IsOK(ecode6)) {
27627 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Geometry_SetPointZM" "', argument " "6"" of type '" "double""'");
27628 : }
27629 0 : arg6 = static_cast< double >(val6);
27630 0 : {
27631 0 : const int bLocalUseExceptions = GetUseExceptions();
27632 0 : if ( bLocalUseExceptions ) {
27633 0 : pushErrorHandler();
27634 : }
27635 0 : {
27636 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27637 0 : OGRGeometryShadow_SetPointZM(arg1,arg2,arg3,arg4,arg5,arg6);
27638 0 : SWIG_PYTHON_THREAD_END_ALLOW;
27639 : }
27640 0 : if ( bLocalUseExceptions ) {
27641 0 : popErrorHandler();
27642 : }
27643 : #ifndef SED_HACKS
27644 : if ( bLocalUseExceptions ) {
27645 : CPLErr eclass = CPLGetLastErrorType();
27646 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27647 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27648 : }
27649 : }
27650 : #endif
27651 : }
27652 0 : resultobj = SWIG_Py_Void();
27653 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27654 : return resultobj;
27655 : fail:
27656 : return NULL;
27657 : }
27658 :
27659 :
27660 160060 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27661 160060 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27662 160060 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27663 160060 : int arg2 ;
27664 160060 : double arg3 ;
27665 160060 : double arg4 ;
27666 160060 : void *argp1 = 0 ;
27667 160060 : int res1 = 0 ;
27668 160060 : int val2 ;
27669 160060 : int ecode2 = 0 ;
27670 160060 : double val3 ;
27671 160060 : int ecode3 = 0 ;
27672 160060 : double val4 ;
27673 160060 : int ecode4 = 0 ;
27674 160060 : PyObject * obj0 = 0 ;
27675 160060 : PyObject * obj1 = 0 ;
27676 160060 : PyObject * obj2 = 0 ;
27677 160060 : PyObject * obj3 = 0 ;
27678 160060 : char * kwnames[] = {
27679 : (char *)"self", (char *)"point", (char *)"x", (char *)"y", NULL
27680 : };
27681 :
27682 160060 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:Geometry_SetPoint_2D", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
27683 160060 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27684 160060 : if (!SWIG_IsOK(res1)) {
27685 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27686 : }
27687 160060 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27688 160060 : ecode2 = SWIG_AsVal_int(obj1, &val2);
27689 160060 : if (!SWIG_IsOK(ecode2)) {
27690 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint_2D" "', argument " "2"" of type '" "int""'");
27691 : }
27692 160060 : arg2 = static_cast< int >(val2);
27693 160060 : ecode3 = SWIG_AsVal_double(obj2, &val3);
27694 160060 : if (!SWIG_IsOK(ecode3)) {
27695 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint_2D" "', argument " "3"" of type '" "double""'");
27696 : }
27697 160060 : arg3 = static_cast< double >(val3);
27698 160060 : ecode4 = SWIG_AsVal_double(obj3, &val4);
27699 160060 : if (!SWIG_IsOK(ecode4)) {
27700 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint_2D" "', argument " "4"" of type '" "double""'");
27701 : }
27702 160060 : arg4 = static_cast< double >(val4);
27703 160060 : {
27704 160060 : const int bLocalUseExceptions = GetUseExceptions();
27705 160060 : if ( bLocalUseExceptions ) {
27706 160000 : pushErrorHandler();
27707 : }
27708 160060 : {
27709 160060 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27710 160060 : OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
27711 160060 : SWIG_PYTHON_THREAD_END_ALLOW;
27712 : }
27713 160060 : if ( bLocalUseExceptions ) {
27714 160000 : popErrorHandler();
27715 : }
27716 : #ifndef SED_HACKS
27717 : if ( bLocalUseExceptions ) {
27718 : CPLErr eclass = CPLGetLastErrorType();
27719 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27720 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27721 : }
27722 : }
27723 : #endif
27724 : }
27725 160060 : resultobj = SWIG_Py_Void();
27726 160060 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27727 : return resultobj;
27728 : fail:
27729 : return NULL;
27730 : }
27731 :
27732 :
27733 2 : SWIGINTERN PyObject *_wrap_Geometry_SwapXY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27734 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27735 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27736 2 : void *argp1 = 0 ;
27737 2 : int res1 = 0 ;
27738 2 : PyObject *swig_obj[1] ;
27739 :
27740 2 : if (!args) SWIG_fail;
27741 2 : swig_obj[0] = args;
27742 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27743 2 : if (!SWIG_IsOK(res1)) {
27744 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SwapXY" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27745 : }
27746 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27747 2 : {
27748 2 : const int bLocalUseExceptions = GetUseExceptions();
27749 2 : if ( bLocalUseExceptions ) {
27750 1 : pushErrorHandler();
27751 : }
27752 2 : {
27753 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27754 2 : OGRGeometryShadow_SwapXY(arg1);
27755 2 : SWIG_PYTHON_THREAD_END_ALLOW;
27756 : }
27757 2 : if ( bLocalUseExceptions ) {
27758 1 : popErrorHandler();
27759 : }
27760 : #ifndef SED_HACKS
27761 : if ( bLocalUseExceptions ) {
27762 : CPLErr eclass = CPLGetLastErrorType();
27763 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27764 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27765 : }
27766 : }
27767 : #endif
27768 : }
27769 2 : resultobj = SWIG_Py_Void();
27770 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27771 : return resultobj;
27772 : fail:
27773 : return NULL;
27774 : }
27775 :
27776 :
27777 2700 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27778 2700 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27779 2700 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27780 2700 : int arg2 ;
27781 2700 : void *argp1 = 0 ;
27782 2700 : int res1 = 0 ;
27783 2700 : int val2 ;
27784 2700 : int ecode2 = 0 ;
27785 2700 : PyObject *swig_obj[2] ;
27786 2700 : OGRGeometryShadow *result = 0 ;
27787 :
27788 2700 : if (!SWIG_Python_UnpackTuple(args, "Geometry_GetGeometryRef", 2, 2, swig_obj)) SWIG_fail;
27789 2700 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27790 2700 : if (!SWIG_IsOK(res1)) {
27791 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryRef" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27792 : }
27793 2700 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27794 2700 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
27795 2700 : if (!SWIG_IsOK(ecode2)) {
27796 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetGeometryRef" "', argument " "2"" of type '" "int""'");
27797 : }
27798 2700 : arg2 = static_cast< int >(val2);
27799 2700 : {
27800 2700 : const int bLocalUseExceptions = GetUseExceptions();
27801 2700 : if ( bLocalUseExceptions ) {
27802 199 : pushErrorHandler();
27803 : }
27804 2700 : {
27805 2700 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27806 2700 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
27807 2700 : SWIG_PYTHON_THREAD_END_ALLOW;
27808 : }
27809 2700 : if ( bLocalUseExceptions ) {
27810 199 : popErrorHandler();
27811 : }
27812 : #ifndef SED_HACKS
27813 : if ( bLocalUseExceptions ) {
27814 : CPLErr eclass = CPLGetLastErrorType();
27815 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27816 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27817 : }
27818 : }
27819 : #endif
27820 : }
27821 2700 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27822 2700 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27823 : return resultobj;
27824 : fail:
27825 : return NULL;
27826 : }
27827 :
27828 :
27829 1 : SWIGINTERN PyObject *_wrap_Geometry_Simplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27830 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27831 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27832 1 : double arg2 ;
27833 1 : void *argp1 = 0 ;
27834 1 : int res1 = 0 ;
27835 1 : double val2 ;
27836 1 : int ecode2 = 0 ;
27837 1 : PyObject *swig_obj[2] ;
27838 1 : OGRGeometryShadow *result = 0 ;
27839 :
27840 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Simplify", 2, 2, swig_obj)) SWIG_fail;
27841 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27842 1 : if (!SWIG_IsOK(res1)) {
27843 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Simplify" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27844 : }
27845 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27846 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
27847 1 : if (!SWIG_IsOK(ecode2)) {
27848 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Simplify" "', argument " "2"" of type '" "double""'");
27849 : }
27850 1 : arg2 = static_cast< double >(val2);
27851 1 : {
27852 1 : const int bLocalUseExceptions = GetUseExceptions();
27853 1 : if ( bLocalUseExceptions ) {
27854 1 : pushErrorHandler();
27855 : }
27856 1 : {
27857 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27858 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
27859 1 : SWIG_PYTHON_THREAD_END_ALLOW;
27860 : }
27861 1 : if ( bLocalUseExceptions ) {
27862 1 : popErrorHandler();
27863 : }
27864 : #ifndef SED_HACKS
27865 : if ( bLocalUseExceptions ) {
27866 : CPLErr eclass = CPLGetLastErrorType();
27867 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27868 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27869 : }
27870 : }
27871 : #endif
27872 : }
27873 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
27874 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27875 : return resultobj;
27876 : fail:
27877 : return NULL;
27878 : }
27879 :
27880 :
27881 1 : SWIGINTERN PyObject *_wrap_Geometry_SimplifyPreserveTopology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27882 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27883 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27884 1 : double arg2 ;
27885 1 : void *argp1 = 0 ;
27886 1 : int res1 = 0 ;
27887 1 : double val2 ;
27888 1 : int ecode2 = 0 ;
27889 1 : PyObject *swig_obj[2] ;
27890 1 : OGRGeometryShadow *result = 0 ;
27891 :
27892 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SimplifyPreserveTopology", 2, 2, swig_obj)) SWIG_fail;
27893 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27894 1 : if (!SWIG_IsOK(res1)) {
27895 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27896 : }
27897 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27898 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
27899 1 : if (!SWIG_IsOK(ecode2)) {
27900 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "2"" of type '" "double""'");
27901 : }
27902 1 : arg2 = static_cast< double >(val2);
27903 1 : {
27904 1 : const int bLocalUseExceptions = GetUseExceptions();
27905 1 : if ( bLocalUseExceptions ) {
27906 1 : pushErrorHandler();
27907 : }
27908 1 : {
27909 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27910 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
27911 1 : SWIG_PYTHON_THREAD_END_ALLOW;
27912 : }
27913 1 : if ( bLocalUseExceptions ) {
27914 1 : popErrorHandler();
27915 : }
27916 : #ifndef SED_HACKS
27917 : if ( bLocalUseExceptions ) {
27918 : CPLErr eclass = CPLGetLastErrorType();
27919 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27920 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27921 : }
27922 : }
27923 : #endif
27924 : }
27925 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
27926 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27927 : return resultobj;
27928 : fail:
27929 : return NULL;
27930 : }
27931 :
27932 :
27933 1 : SWIGINTERN PyObject *_wrap_Geometry_DelaunayTriangulation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
27934 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
27935 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
27936 1 : double arg2 = (double) 0.0 ;
27937 1 : int arg3 = (int) FALSE ;
27938 1 : void *argp1 = 0 ;
27939 1 : int res1 = 0 ;
27940 1 : double val2 ;
27941 1 : int ecode2 = 0 ;
27942 1 : int val3 ;
27943 1 : int ecode3 = 0 ;
27944 1 : PyObject * obj0 = 0 ;
27945 1 : PyObject * obj1 = 0 ;
27946 1 : PyObject * obj2 = 0 ;
27947 1 : char * kwnames[] = {
27948 : (char *)"self", (char *)"dfTolerance", (char *)"bOnlyEdges", NULL
27949 : };
27950 1 : OGRGeometryShadow *result = 0 ;
27951 :
27952 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Geometry_DelaunayTriangulation", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
27953 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
27954 1 : if (!SWIG_IsOK(res1)) {
27955 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_DelaunayTriangulation" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
27956 : }
27957 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
27958 1 : if (obj1) {
27959 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
27960 0 : if (!SWIG_IsOK(ecode2)) {
27961 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_DelaunayTriangulation" "', argument " "2"" of type '" "double""'");
27962 : }
27963 0 : arg2 = static_cast< double >(val2);
27964 : }
27965 1 : if (obj2) {
27966 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
27967 0 : if (!SWIG_IsOK(ecode3)) {
27968 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_DelaunayTriangulation" "', argument " "3"" of type '" "int""'");
27969 : }
27970 : arg3 = static_cast< int >(val3);
27971 : }
27972 1 : {
27973 1 : const int bLocalUseExceptions = GetUseExceptions();
27974 1 : if ( bLocalUseExceptions ) {
27975 1 : pushErrorHandler();
27976 : }
27977 1 : {
27978 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
27979 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_DelaunayTriangulation(arg1,arg2,arg3);
27980 1 : SWIG_PYTHON_THREAD_END_ALLOW;
27981 : }
27982 1 : if ( bLocalUseExceptions ) {
27983 1 : popErrorHandler();
27984 : }
27985 : #ifndef SED_HACKS
27986 : if ( bLocalUseExceptions ) {
27987 : CPLErr eclass = CPLGetLastErrorType();
27988 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
27989 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
27990 : }
27991 : }
27992 : #endif
27993 : }
27994 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
27995 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
27996 : return resultobj;
27997 : fail:
27998 : return NULL;
27999 : }
28000 :
28001 :
28002 3 : SWIGINTERN PyObject *_wrap_Geometry_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28003 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28004 3 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28005 3 : void *argp1 = 0 ;
28006 3 : int res1 = 0 ;
28007 3 : PyObject *swig_obj[1] ;
28008 3 : OGRGeometryShadow *result = 0 ;
28009 :
28010 3 : if (!args) SWIG_fail;
28011 3 : swig_obj[0] = args;
28012 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28013 3 : if (!SWIG_IsOK(res1)) {
28014 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Polygonize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28015 : }
28016 3 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28017 3 : {
28018 3 : const int bLocalUseExceptions = GetUseExceptions();
28019 3 : if ( bLocalUseExceptions ) {
28020 3 : pushErrorHandler();
28021 : }
28022 3 : {
28023 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28024 3 : result = (OGRGeometryShadow *)OGRGeometryShadow_Polygonize(arg1);
28025 3 : SWIG_PYTHON_THREAD_END_ALLOW;
28026 : }
28027 3 : if ( bLocalUseExceptions ) {
28028 3 : popErrorHandler();
28029 : }
28030 : #ifndef SED_HACKS
28031 : if ( bLocalUseExceptions ) {
28032 : CPLErr eclass = CPLGetLastErrorType();
28033 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28034 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28035 : }
28036 : }
28037 : #endif
28038 : }
28039 3 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28040 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28041 : return resultobj;
28042 : fail:
28043 : return NULL;
28044 : }
28045 :
28046 :
28047 1 : SWIGINTERN PyObject *_wrap_Geometry_Boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28048 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28049 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28050 1 : void *argp1 = 0 ;
28051 1 : int res1 = 0 ;
28052 1 : PyObject *swig_obj[1] ;
28053 1 : OGRGeometryShadow *result = 0 ;
28054 :
28055 1 : if (!args) SWIG_fail;
28056 1 : swig_obj[0] = args;
28057 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28058 1 : if (!SWIG_IsOK(res1)) {
28059 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Boundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28060 : }
28061 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28062 1 : {
28063 1 : const int bLocalUseExceptions = GetUseExceptions();
28064 1 : if ( bLocalUseExceptions ) {
28065 0 : pushErrorHandler();
28066 : }
28067 1 : {
28068 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28069 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
28070 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28071 : }
28072 1 : if ( bLocalUseExceptions ) {
28073 0 : popErrorHandler();
28074 : }
28075 : #ifndef SED_HACKS
28076 : if ( bLocalUseExceptions ) {
28077 : CPLErr eclass = CPLGetLastErrorType();
28078 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28079 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28080 : }
28081 : }
28082 : #endif
28083 : }
28084 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28085 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28086 : return resultobj;
28087 : fail:
28088 : return NULL;
28089 : }
28090 :
28091 :
28092 5 : SWIGINTERN PyObject *_wrap_Geometry_GetBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28093 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28094 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28095 5 : void *argp1 = 0 ;
28096 5 : int res1 = 0 ;
28097 5 : PyObject *swig_obj[1] ;
28098 5 : OGRGeometryShadow *result = 0 ;
28099 :
28100 5 : if (!args) SWIG_fail;
28101 5 : swig_obj[0] = args;
28102 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28103 5 : if (!SWIG_IsOK(res1)) {
28104 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetBoundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28105 : }
28106 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28107 5 : {
28108 5 : const int bLocalUseExceptions = GetUseExceptions();
28109 5 : if ( bLocalUseExceptions ) {
28110 0 : pushErrorHandler();
28111 : }
28112 5 : {
28113 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28114 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
28115 5 : SWIG_PYTHON_THREAD_END_ALLOW;
28116 : }
28117 5 : if ( bLocalUseExceptions ) {
28118 0 : popErrorHandler();
28119 : }
28120 : #ifndef SED_HACKS
28121 : if ( bLocalUseExceptions ) {
28122 : CPLErr eclass = CPLGetLastErrorType();
28123 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28124 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28125 : }
28126 : }
28127 : #endif
28128 : }
28129 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28130 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28131 : return resultobj;
28132 : fail:
28133 : return NULL;
28134 : }
28135 :
28136 :
28137 1 : SWIGINTERN PyObject *_wrap_Geometry_ConvexHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28138 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28139 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28140 1 : void *argp1 = 0 ;
28141 1 : int res1 = 0 ;
28142 1 : PyObject *swig_obj[1] ;
28143 1 : OGRGeometryShadow *result = 0 ;
28144 :
28145 1 : if (!args) SWIG_fail;
28146 1 : swig_obj[0] = args;
28147 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28148 1 : if (!SWIG_IsOK(res1)) {
28149 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConvexHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28150 : }
28151 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
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_ConvexHull(arg1);
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 ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28176 : return resultobj;
28177 : fail:
28178 : return NULL;
28179 : }
28180 :
28181 :
28182 2 : SWIGINTERN PyObject *_wrap_Geometry_ConcaveHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28183 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28184 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28185 2 : double arg2 ;
28186 2 : bool arg3 ;
28187 2 : void *argp1 = 0 ;
28188 2 : int res1 = 0 ;
28189 2 : double val2 ;
28190 2 : int ecode2 = 0 ;
28191 2 : bool val3 ;
28192 2 : int ecode3 = 0 ;
28193 2 : PyObject *swig_obj[3] ;
28194 2 : OGRGeometryShadow *result = 0 ;
28195 :
28196 2 : if (!SWIG_Python_UnpackTuple(args, "Geometry_ConcaveHull", 3, 3, swig_obj)) SWIG_fail;
28197 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28198 2 : if (!SWIG_IsOK(res1)) {
28199 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConcaveHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28200 : }
28201 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28202 2 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
28203 2 : if (!SWIG_IsOK(ecode2)) {
28204 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_ConcaveHull" "', argument " "2"" of type '" "double""'");
28205 : }
28206 2 : arg2 = static_cast< double >(val2);
28207 2 : ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
28208 2 : if (!SWIG_IsOK(ecode3)) {
28209 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_ConcaveHull" "', argument " "3"" of type '" "bool""'");
28210 : }
28211 2 : arg3 = static_cast< bool >(val3);
28212 2 : {
28213 2 : const int bLocalUseExceptions = GetUseExceptions();
28214 2 : if ( bLocalUseExceptions ) {
28215 0 : pushErrorHandler();
28216 : }
28217 2 : {
28218 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28219 2 : result = (OGRGeometryShadow *)OGRGeometryShadow_ConcaveHull(arg1,arg2,arg3);
28220 2 : SWIG_PYTHON_THREAD_END_ALLOW;
28221 : }
28222 2 : if ( bLocalUseExceptions ) {
28223 0 : popErrorHandler();
28224 : }
28225 : #ifndef SED_HACKS
28226 : if ( bLocalUseExceptions ) {
28227 : CPLErr eclass = CPLGetLastErrorType();
28228 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28229 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28230 : }
28231 : }
28232 : #endif
28233 : }
28234 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28235 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28236 : return resultobj;
28237 : fail:
28238 : return NULL;
28239 : }
28240 :
28241 :
28242 7 : SWIGINTERN PyObject *_wrap_Geometry_MakeValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28243 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28244 7 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28245 7 : char **arg2 = (char **) NULL ;
28246 7 : void *argp1 = 0 ;
28247 7 : int res1 = 0 ;
28248 7 : PyObject *swig_obj[2] ;
28249 7 : OGRGeometryShadow *result = 0 ;
28250 :
28251 7 : if (!SWIG_Python_UnpackTuple(args, "Geometry_MakeValid", 1, 2, swig_obj)) SWIG_fail;
28252 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28253 7 : if (!SWIG_IsOK(res1)) {
28254 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_MakeValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28255 : }
28256 7 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28257 7 : if (swig_obj[1]) {
28258 1 : {
28259 : /* %typemap(in) char **dict */
28260 1 : arg2 = NULL;
28261 1 : if ( PySequence_Check( swig_obj[1] ) ) {
28262 1 : int bErr = FALSE;
28263 1 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
28264 1 : if ( bErr )
28265 : {
28266 0 : SWIG_fail;
28267 : }
28268 : }
28269 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
28270 0 : int bErr = FALSE;
28271 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
28272 0 : if ( bErr )
28273 : {
28274 0 : SWIG_fail;
28275 : }
28276 : }
28277 : else {
28278 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
28279 0 : SWIG_fail;
28280 : }
28281 : }
28282 : }
28283 7 : {
28284 7 : const int bLocalUseExceptions = GetUseExceptions();
28285 7 : if ( bLocalUseExceptions ) {
28286 0 : pushErrorHandler();
28287 : }
28288 7 : {
28289 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28290 7 : result = (OGRGeometryShadow *)OGRGeometryShadow_MakeValid(arg1,arg2);
28291 7 : SWIG_PYTHON_THREAD_END_ALLOW;
28292 : }
28293 7 : if ( bLocalUseExceptions ) {
28294 0 : popErrorHandler();
28295 : }
28296 : #ifndef SED_HACKS
28297 : if ( bLocalUseExceptions ) {
28298 : CPLErr eclass = CPLGetLastErrorType();
28299 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28300 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28301 : }
28302 : }
28303 : #endif
28304 : }
28305 7 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28306 7 : {
28307 : /* %typemap(freearg) char **dict */
28308 7 : CSLDestroy( arg2 );
28309 : }
28310 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28311 : return resultobj;
28312 0 : fail:
28313 0 : {
28314 : /* %typemap(freearg) char **dict */
28315 0 : CSLDestroy( arg2 );
28316 : }
28317 : return NULL;
28318 : }
28319 :
28320 :
28321 1 : SWIGINTERN PyObject *_wrap_Geometry_SetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28322 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28323 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28324 1 : double arg2 ;
28325 1 : int arg3 = (int) 0 ;
28326 1 : void *argp1 = 0 ;
28327 1 : int res1 = 0 ;
28328 1 : double val2 ;
28329 1 : int ecode2 = 0 ;
28330 1 : int val3 ;
28331 1 : int ecode3 = 0 ;
28332 1 : PyObject *swig_obj[3] ;
28333 1 : OGRGeometryShadow *result = 0 ;
28334 :
28335 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SetPrecision", 2, 3, swig_obj)) SWIG_fail;
28336 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28337 1 : if (!SWIG_IsOK(res1)) {
28338 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPrecision" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28339 : }
28340 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28341 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
28342 1 : if (!SWIG_IsOK(ecode2)) {
28343 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPrecision" "', argument " "2"" of type '" "double""'");
28344 : }
28345 1 : arg2 = static_cast< double >(val2);
28346 1 : if (swig_obj[2]) {
28347 0 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
28348 0 : if (!SWIG_IsOK(ecode3)) {
28349 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPrecision" "', argument " "3"" of type '" "int""'");
28350 : }
28351 : arg3 = static_cast< int >(val3);
28352 : }
28353 1 : {
28354 1 : const int bLocalUseExceptions = GetUseExceptions();
28355 1 : if ( bLocalUseExceptions ) {
28356 1 : pushErrorHandler();
28357 : }
28358 1 : {
28359 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28360 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_SetPrecision(arg1,arg2,arg3);
28361 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28362 : }
28363 1 : if ( bLocalUseExceptions ) {
28364 1 : popErrorHandler();
28365 : }
28366 : #ifndef SED_HACKS
28367 : if ( bLocalUseExceptions ) {
28368 : CPLErr eclass = CPLGetLastErrorType();
28369 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28370 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28371 : }
28372 : }
28373 : #endif
28374 : }
28375 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28376 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28377 : return resultobj;
28378 : fail:
28379 : return NULL;
28380 : }
28381 :
28382 :
28383 1 : SWIGINTERN PyObject *_wrap_Geometry_Normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28384 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28385 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28386 1 : void *argp1 = 0 ;
28387 1 : int res1 = 0 ;
28388 1 : PyObject *swig_obj[1] ;
28389 1 : OGRGeometryShadow *result = 0 ;
28390 :
28391 1 : if (!args) SWIG_fail;
28392 1 : swig_obj[0] = args;
28393 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28394 1 : if (!SWIG_IsOK(res1)) {
28395 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Normalize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28396 : }
28397 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28398 1 : {
28399 1 : const int bLocalUseExceptions = GetUseExceptions();
28400 1 : if ( bLocalUseExceptions ) {
28401 0 : pushErrorHandler();
28402 : }
28403 1 : {
28404 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28405 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_Normalize(arg1);
28406 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28407 : }
28408 1 : if ( bLocalUseExceptions ) {
28409 0 : popErrorHandler();
28410 : }
28411 : #ifndef SED_HACKS
28412 : if ( bLocalUseExceptions ) {
28413 : CPLErr eclass = CPLGetLastErrorType();
28414 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28415 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28416 : }
28417 : }
28418 : #endif
28419 : }
28420 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28421 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28422 : return resultobj;
28423 : fail:
28424 : return NULL;
28425 : }
28426 :
28427 :
28428 18 : SWIGINTERN PyObject *_wrap_Geometry_RemoveLowerDimensionSubGeoms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28429 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28430 18 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28431 18 : void *argp1 = 0 ;
28432 18 : int res1 = 0 ;
28433 18 : PyObject *swig_obj[1] ;
28434 18 : OGRGeometryShadow *result = 0 ;
28435 :
28436 18 : if (!args) SWIG_fail;
28437 18 : swig_obj[0] = args;
28438 18 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28439 18 : if (!SWIG_IsOK(res1)) {
28440 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_RemoveLowerDimensionSubGeoms" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28441 : }
28442 18 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28443 18 : {
28444 18 : const int bLocalUseExceptions = GetUseExceptions();
28445 18 : if ( bLocalUseExceptions ) {
28446 0 : pushErrorHandler();
28447 : }
28448 18 : {
28449 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28450 18 : result = (OGRGeometryShadow *)OGRGeometryShadow_RemoveLowerDimensionSubGeoms(arg1);
28451 18 : SWIG_PYTHON_THREAD_END_ALLOW;
28452 : }
28453 18 : if ( bLocalUseExceptions ) {
28454 0 : popErrorHandler();
28455 : }
28456 : #ifndef SED_HACKS
28457 : if ( bLocalUseExceptions ) {
28458 : CPLErr eclass = CPLGetLastErrorType();
28459 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28460 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28461 : }
28462 : }
28463 : #endif
28464 : }
28465 18 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28466 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28467 : return resultobj;
28468 : fail:
28469 : return NULL;
28470 : }
28471 :
28472 :
28473 3 : SWIGINTERN PyObject *_wrap_Geometry_Buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
28474 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28475 3 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28476 3 : double arg2 ;
28477 3 : int arg3 = (int) 30 ;
28478 3 : void *argp1 = 0 ;
28479 3 : int res1 = 0 ;
28480 3 : double val2 ;
28481 3 : int ecode2 = 0 ;
28482 3 : int val3 ;
28483 3 : int ecode3 = 0 ;
28484 3 : PyObject * obj0 = 0 ;
28485 3 : PyObject * obj1 = 0 ;
28486 3 : PyObject * obj2 = 0 ;
28487 3 : char * kwnames[] = {
28488 : (char *)"self", (char *)"distance", (char *)"quadsecs", NULL
28489 : };
28490 3 : OGRGeometryShadow *result = 0 ;
28491 :
28492 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:Geometry_Buffer", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
28493 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28494 3 : if (!SWIG_IsOK(res1)) {
28495 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28496 : }
28497 3 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28498 3 : ecode2 = SWIG_AsVal_double(obj1, &val2);
28499 3 : if (!SWIG_IsOK(ecode2)) {
28500 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
28501 : }
28502 3 : arg2 = static_cast< double >(val2);
28503 3 : if (obj2) {
28504 1 : ecode3 = SWIG_AsVal_int(obj2, &val3);
28505 1 : if (!SWIG_IsOK(ecode3)) {
28506 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Buffer" "', argument " "3"" of type '" "int""'");
28507 : }
28508 : arg3 = static_cast< int >(val3);
28509 : }
28510 3 : {
28511 3 : const int bLocalUseExceptions = GetUseExceptions();
28512 3 : if ( bLocalUseExceptions ) {
28513 1 : pushErrorHandler();
28514 : }
28515 3 : {
28516 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28517 3 : result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
28518 3 : SWIG_PYTHON_THREAD_END_ALLOW;
28519 : }
28520 3 : if ( bLocalUseExceptions ) {
28521 1 : popErrorHandler();
28522 : }
28523 : #ifndef SED_HACKS
28524 : if ( bLocalUseExceptions ) {
28525 : CPLErr eclass = CPLGetLastErrorType();
28526 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28527 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28528 : }
28529 : }
28530 : #endif
28531 : }
28532 3 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28533 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28534 : return resultobj;
28535 : fail:
28536 : return NULL;
28537 : }
28538 :
28539 :
28540 11 : SWIGINTERN PyObject *_wrap_Geometry_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28541 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28542 11 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28543 11 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
28544 11 : void *argp1 = 0 ;
28545 11 : int res1 = 0 ;
28546 11 : void *argp2 = 0 ;
28547 11 : int res2 = 0 ;
28548 11 : PyObject *swig_obj[2] ;
28549 11 : OGRGeometryShadow *result = 0 ;
28550 :
28551 11 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersection", 2, 2, swig_obj)) SWIG_fail;
28552 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28553 11 : if (!SWIG_IsOK(res1)) {
28554 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersection" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28555 : }
28556 11 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28557 11 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28558 11 : if (!SWIG_IsOK(res2)) {
28559 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersection" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
28560 : }
28561 11 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
28562 11 : {
28563 11 : if (!arg2) {
28564 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
28565 : }
28566 : }
28567 11 : {
28568 11 : const int bLocalUseExceptions = GetUseExceptions();
28569 11 : if ( bLocalUseExceptions ) {
28570 1 : pushErrorHandler();
28571 : }
28572 11 : {
28573 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28574 11 : result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
28575 11 : SWIG_PYTHON_THREAD_END_ALLOW;
28576 : }
28577 11 : if ( bLocalUseExceptions ) {
28578 1 : popErrorHandler();
28579 : }
28580 : #ifndef SED_HACKS
28581 : if ( bLocalUseExceptions ) {
28582 : CPLErr eclass = CPLGetLastErrorType();
28583 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28584 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28585 : }
28586 : }
28587 : #endif
28588 : }
28589 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28590 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28591 : return resultobj;
28592 : fail:
28593 : return NULL;
28594 : }
28595 :
28596 :
28597 7 : SWIGINTERN PyObject *_wrap_Geometry_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28598 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28599 7 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28600 7 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
28601 7 : void *argp1 = 0 ;
28602 7 : int res1 = 0 ;
28603 7 : void *argp2 = 0 ;
28604 7 : int res2 = 0 ;
28605 7 : PyObject *swig_obj[2] ;
28606 7 : OGRGeometryShadow *result = 0 ;
28607 :
28608 7 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Union", 2, 2, swig_obj)) SWIG_fail;
28609 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28610 7 : if (!SWIG_IsOK(res1)) {
28611 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Union" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28612 : }
28613 7 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28614 7 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28615 7 : if (!SWIG_IsOK(res2)) {
28616 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Union" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
28617 : }
28618 7 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
28619 7 : {
28620 7 : if (!arg2) {
28621 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
28622 : }
28623 : }
28624 7 : {
28625 7 : const int bLocalUseExceptions = GetUseExceptions();
28626 7 : if ( bLocalUseExceptions ) {
28627 1 : pushErrorHandler();
28628 : }
28629 7 : {
28630 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28631 7 : result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
28632 7 : SWIG_PYTHON_THREAD_END_ALLOW;
28633 : }
28634 7 : if ( bLocalUseExceptions ) {
28635 1 : popErrorHandler();
28636 : }
28637 : #ifndef SED_HACKS
28638 : if ( bLocalUseExceptions ) {
28639 : CPLErr eclass = CPLGetLastErrorType();
28640 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28641 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28642 : }
28643 : }
28644 : #endif
28645 : }
28646 7 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28647 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28648 : return resultobj;
28649 : fail:
28650 : return NULL;
28651 : }
28652 :
28653 :
28654 2 : SWIGINTERN PyObject *_wrap_Geometry_UnionCascaded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28655 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28656 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28657 2 : void *argp1 = 0 ;
28658 2 : int res1 = 0 ;
28659 2 : PyObject *swig_obj[1] ;
28660 2 : OGRGeometryShadow *result = 0 ;
28661 :
28662 2 : if (!args) SWIG_fail;
28663 2 : swig_obj[0] = args;
28664 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28665 2 : if (!SWIG_IsOK(res1)) {
28666 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnionCascaded" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28667 : }
28668 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28669 2 : {
28670 2 : const int bLocalUseExceptions = GetUseExceptions();
28671 2 : if ( bLocalUseExceptions ) {
28672 2 : pushErrorHandler();
28673 : }
28674 2 : {
28675 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28676 2 : result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
28677 2 : SWIG_PYTHON_THREAD_END_ALLOW;
28678 : }
28679 2 : if ( bLocalUseExceptions ) {
28680 2 : popErrorHandler();
28681 : }
28682 : #ifndef SED_HACKS
28683 : if ( bLocalUseExceptions ) {
28684 : CPLErr eclass = CPLGetLastErrorType();
28685 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28686 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28687 : }
28688 : }
28689 : #endif
28690 : }
28691 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28692 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28693 : return resultobj;
28694 : fail:
28695 : return NULL;
28696 : }
28697 :
28698 :
28699 2 : SWIGINTERN PyObject *_wrap_Geometry_UnaryUnion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28700 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28701 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28702 2 : void *argp1 = 0 ;
28703 2 : int res1 = 0 ;
28704 2 : PyObject *swig_obj[1] ;
28705 2 : OGRGeometryShadow *result = 0 ;
28706 :
28707 2 : if (!args) SWIG_fail;
28708 2 : swig_obj[0] = args;
28709 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28710 2 : if (!SWIG_IsOK(res1)) {
28711 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnaryUnion" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28712 : }
28713 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28714 2 : {
28715 2 : const int bLocalUseExceptions = GetUseExceptions();
28716 2 : if ( bLocalUseExceptions ) {
28717 2 : pushErrorHandler();
28718 : }
28719 2 : {
28720 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28721 2 : result = (OGRGeometryShadow *)OGRGeometryShadow_UnaryUnion(arg1);
28722 2 : SWIG_PYTHON_THREAD_END_ALLOW;
28723 : }
28724 2 : if ( bLocalUseExceptions ) {
28725 2 : popErrorHandler();
28726 : }
28727 : #ifndef SED_HACKS
28728 : if ( bLocalUseExceptions ) {
28729 : CPLErr eclass = CPLGetLastErrorType();
28730 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28731 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28732 : }
28733 : }
28734 : #endif
28735 : }
28736 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28737 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28738 : return resultobj;
28739 : fail:
28740 : return NULL;
28741 : }
28742 :
28743 :
28744 5 : SWIGINTERN PyObject *_wrap_Geometry_Difference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28745 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28746 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28747 5 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
28748 5 : void *argp1 = 0 ;
28749 5 : int res1 = 0 ;
28750 5 : void *argp2 = 0 ;
28751 5 : int res2 = 0 ;
28752 5 : PyObject *swig_obj[2] ;
28753 5 : OGRGeometryShadow *result = 0 ;
28754 :
28755 5 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Difference", 2, 2, swig_obj)) SWIG_fail;
28756 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28757 5 : if (!SWIG_IsOK(res1)) {
28758 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Difference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28759 : }
28760 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28761 5 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28762 5 : if (!SWIG_IsOK(res2)) {
28763 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Difference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
28764 : }
28765 5 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
28766 5 : {
28767 5 : if (!arg2) {
28768 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
28769 : }
28770 : }
28771 5 : {
28772 5 : const int bLocalUseExceptions = GetUseExceptions();
28773 5 : if ( bLocalUseExceptions ) {
28774 1 : pushErrorHandler();
28775 : }
28776 5 : {
28777 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28778 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
28779 5 : SWIG_PYTHON_THREAD_END_ALLOW;
28780 : }
28781 5 : if ( bLocalUseExceptions ) {
28782 1 : popErrorHandler();
28783 : }
28784 : #ifndef SED_HACKS
28785 : if ( bLocalUseExceptions ) {
28786 : CPLErr eclass = CPLGetLastErrorType();
28787 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28788 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28789 : }
28790 : }
28791 : #endif
28792 : }
28793 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28794 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28795 : return resultobj;
28796 : fail:
28797 : return NULL;
28798 : }
28799 :
28800 :
28801 5 : SWIGINTERN PyObject *_wrap_Geometry_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28802 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28803 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28804 5 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
28805 5 : void *argp1 = 0 ;
28806 5 : int res1 = 0 ;
28807 5 : void *argp2 = 0 ;
28808 5 : int res2 = 0 ;
28809 5 : PyObject *swig_obj[2] ;
28810 5 : OGRGeometryShadow *result = 0 ;
28811 :
28812 5 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SymDifference", 2, 2, swig_obj)) SWIG_fail;
28813 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28814 5 : if (!SWIG_IsOK(res1)) {
28815 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28816 : }
28817 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28818 5 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28819 5 : if (!SWIG_IsOK(res2)) {
28820 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
28821 : }
28822 5 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
28823 5 : {
28824 5 : if (!arg2) {
28825 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
28826 : }
28827 : }
28828 5 : {
28829 5 : const int bLocalUseExceptions = GetUseExceptions();
28830 5 : if ( bLocalUseExceptions ) {
28831 1 : pushErrorHandler();
28832 : }
28833 5 : {
28834 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28835 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
28836 5 : SWIG_PYTHON_THREAD_END_ALLOW;
28837 : }
28838 5 : if ( bLocalUseExceptions ) {
28839 1 : popErrorHandler();
28840 : }
28841 : #ifndef SED_HACKS
28842 : if ( bLocalUseExceptions ) {
28843 : CPLErr eclass = CPLGetLastErrorType();
28844 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28845 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28846 : }
28847 : }
28848 : #endif
28849 : }
28850 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28851 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28852 : return resultobj;
28853 : fail:
28854 : return NULL;
28855 : }
28856 :
28857 :
28858 1 : SWIGINTERN PyObject *_wrap_Geometry_SymmetricDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28859 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28860 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28861 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
28862 1 : void *argp1 = 0 ;
28863 1 : int res1 = 0 ;
28864 1 : void *argp2 = 0 ;
28865 1 : int res2 = 0 ;
28866 1 : PyObject *swig_obj[2] ;
28867 1 : OGRGeometryShadow *result = 0 ;
28868 :
28869 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SymmetricDifference", 2, 2, swig_obj)) SWIG_fail;
28870 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28871 1 : if (!SWIG_IsOK(res1)) {
28872 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymmetricDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28873 : }
28874 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28875 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28876 1 : if (!SWIG_IsOK(res2)) {
28877 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymmetricDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
28878 : }
28879 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
28880 1 : {
28881 1 : if (!arg2) {
28882 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
28883 : }
28884 : }
28885 1 : {
28886 1 : const int bLocalUseExceptions = GetUseExceptions();
28887 1 : if ( bLocalUseExceptions ) {
28888 1 : pushErrorHandler();
28889 : }
28890 1 : {
28891 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28892 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
28893 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28894 : }
28895 1 : if ( bLocalUseExceptions ) {
28896 1 : popErrorHandler();
28897 : }
28898 : #ifndef SED_HACKS
28899 : if ( bLocalUseExceptions ) {
28900 : CPLErr eclass = CPLGetLastErrorType();
28901 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28902 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28903 : }
28904 : }
28905 : #endif
28906 : }
28907 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
28908 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28909 : return resultobj;
28910 : fail:
28911 : return NULL;
28912 : }
28913 :
28914 :
28915 1 : SWIGINTERN PyObject *_wrap_Geometry_Distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28916 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28917 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28918 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
28919 1 : void *argp1 = 0 ;
28920 1 : int res1 = 0 ;
28921 1 : void *argp2 = 0 ;
28922 1 : int res2 = 0 ;
28923 1 : PyObject *swig_obj[2] ;
28924 1 : double result;
28925 :
28926 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Distance", 2, 2, swig_obj)) SWIG_fail;
28927 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28928 1 : if (!SWIG_IsOK(res1)) {
28929 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28930 : }
28931 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28932 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28933 1 : if (!SWIG_IsOK(res2)) {
28934 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
28935 : }
28936 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
28937 1 : {
28938 1 : if (!arg2) {
28939 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
28940 : }
28941 : }
28942 1 : {
28943 1 : const int bLocalUseExceptions = GetUseExceptions();
28944 1 : if ( bLocalUseExceptions ) {
28945 1 : pushErrorHandler();
28946 : }
28947 1 : {
28948 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
28949 1 : result = (double)OGRGeometryShadow_Distance(arg1,arg2);
28950 1 : SWIG_PYTHON_THREAD_END_ALLOW;
28951 : }
28952 1 : if ( bLocalUseExceptions ) {
28953 1 : popErrorHandler();
28954 : }
28955 : #ifndef SED_HACKS
28956 : if ( bLocalUseExceptions ) {
28957 : CPLErr eclass = CPLGetLastErrorType();
28958 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
28959 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
28960 : }
28961 : }
28962 : #endif
28963 : }
28964 1 : resultobj = SWIG_From_double(static_cast< double >(result));
28965 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
28966 : return resultobj;
28967 : fail:
28968 : return NULL;
28969 : }
28970 :
28971 :
28972 1 : SWIGINTERN PyObject *_wrap_Geometry_Distance3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28973 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
28974 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
28975 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
28976 1 : void *argp1 = 0 ;
28977 1 : int res1 = 0 ;
28978 1 : void *argp2 = 0 ;
28979 1 : int res2 = 0 ;
28980 1 : PyObject *swig_obj[2] ;
28981 1 : double result;
28982 :
28983 1 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Distance3D", 2, 2, swig_obj)) SWIG_fail;
28984 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28985 1 : if (!SWIG_IsOK(res1)) {
28986 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
28987 : }
28988 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
28989 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
28990 1 : if (!SWIG_IsOK(res2)) {
28991 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance3D" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
28992 : }
28993 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
28994 1 : {
28995 1 : if (!arg2) {
28996 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
28997 : }
28998 : }
28999 1 : {
29000 1 : const int bLocalUseExceptions = GetUseExceptions();
29001 1 : if ( bLocalUseExceptions ) {
29002 0 : pushErrorHandler();
29003 : }
29004 1 : {
29005 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29006 1 : result = (double)OGRGeometryShadow_Distance3D(arg1,arg2);
29007 1 : SWIG_PYTHON_THREAD_END_ALLOW;
29008 : }
29009 1 : if ( bLocalUseExceptions ) {
29010 0 : popErrorHandler();
29011 : }
29012 : #ifndef SED_HACKS
29013 : if ( bLocalUseExceptions ) {
29014 : CPLErr eclass = CPLGetLastErrorType();
29015 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29016 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29017 : }
29018 : }
29019 : #endif
29020 : }
29021 1 : resultobj = SWIG_From_double(static_cast< double >(result));
29022 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29023 : return resultobj;
29024 : fail:
29025 : return NULL;
29026 : }
29027 :
29028 :
29029 4 : SWIGINTERN PyObject *_wrap_Geometry_Empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29030 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29031 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29032 4 : void *argp1 = 0 ;
29033 4 : int res1 = 0 ;
29034 4 : PyObject *swig_obj[1] ;
29035 :
29036 4 : if (!args) SWIG_fail;
29037 4 : swig_obj[0] = args;
29038 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29039 4 : if (!SWIG_IsOK(res1)) {
29040 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Empty" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29041 : }
29042 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29043 4 : {
29044 4 : const int bLocalUseExceptions = GetUseExceptions();
29045 4 : if ( bLocalUseExceptions ) {
29046 0 : pushErrorHandler();
29047 : }
29048 4 : {
29049 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29050 4 : OGRGeometryShadow_Empty(arg1);
29051 4 : SWIG_PYTHON_THREAD_END_ALLOW;
29052 : }
29053 4 : if ( bLocalUseExceptions ) {
29054 0 : popErrorHandler();
29055 : }
29056 : #ifndef SED_HACKS
29057 : if ( bLocalUseExceptions ) {
29058 : CPLErr eclass = CPLGetLastErrorType();
29059 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29060 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29061 : }
29062 : }
29063 : #endif
29064 : }
29065 4 : resultobj = SWIG_Py_Void();
29066 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29067 : return resultobj;
29068 : fail:
29069 : return NULL;
29070 : }
29071 :
29072 :
29073 1930 : SWIGINTERN PyObject *_wrap_Geometry_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29074 1930 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29075 1930 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29076 1930 : void *argp1 = 0 ;
29077 1930 : int res1 = 0 ;
29078 1930 : PyObject *swig_obj[1] ;
29079 1930 : bool result;
29080 :
29081 1930 : if (!args) SWIG_fail;
29082 1930 : swig_obj[0] = args;
29083 1930 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29084 1930 : if (!SWIG_IsOK(res1)) {
29085 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsEmpty" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29086 : }
29087 1930 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29088 1930 : {
29089 1930 : const int bLocalUseExceptions = GetUseExceptions();
29090 1930 : if ( bLocalUseExceptions ) {
29091 1011 : pushErrorHandler();
29092 : }
29093 1930 : {
29094 1930 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29095 1930 : result = (bool)OGRGeometryShadow_IsEmpty(arg1);
29096 1930 : SWIG_PYTHON_THREAD_END_ALLOW;
29097 : }
29098 1930 : if ( bLocalUseExceptions ) {
29099 1011 : popErrorHandler();
29100 : }
29101 : #ifndef SED_HACKS
29102 : if ( bLocalUseExceptions ) {
29103 : CPLErr eclass = CPLGetLastErrorType();
29104 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29105 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29106 : }
29107 : }
29108 : #endif
29109 : }
29110 1930 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29111 1930 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29112 : return resultobj;
29113 : fail:
29114 : return NULL;
29115 : }
29116 :
29117 :
29118 19 : SWIGINTERN PyObject *_wrap_Geometry_IsValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29119 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29120 19 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29121 19 : void *argp1 = 0 ;
29122 19 : int res1 = 0 ;
29123 19 : PyObject *swig_obj[1] ;
29124 19 : bool result;
29125 :
29126 19 : if (!args) SWIG_fail;
29127 19 : swig_obj[0] = args;
29128 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29129 19 : if (!SWIG_IsOK(res1)) {
29130 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29131 : }
29132 19 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29133 19 : {
29134 19 : const int bLocalUseExceptions = GetUseExceptions();
29135 19 : if ( bLocalUseExceptions ) {
29136 14 : pushErrorHandler();
29137 : }
29138 19 : {
29139 19 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29140 19 : result = (bool)OGRGeometryShadow_IsValid(arg1);
29141 19 : SWIG_PYTHON_THREAD_END_ALLOW;
29142 : }
29143 19 : if ( bLocalUseExceptions ) {
29144 14 : popErrorHandler();
29145 : }
29146 : #ifndef SED_HACKS
29147 : if ( bLocalUseExceptions ) {
29148 : CPLErr eclass = CPLGetLastErrorType();
29149 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29150 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29151 : }
29152 : }
29153 : #endif
29154 : }
29155 19 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29156 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29157 : return resultobj;
29158 : fail:
29159 : return NULL;
29160 : }
29161 :
29162 :
29163 5 : SWIGINTERN PyObject *_wrap_Geometry_IsSimple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29164 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29165 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29166 5 : void *argp1 = 0 ;
29167 5 : int res1 = 0 ;
29168 5 : PyObject *swig_obj[1] ;
29169 5 : bool result;
29170 :
29171 5 : if (!args) SWIG_fail;
29172 5 : swig_obj[0] = args;
29173 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29174 5 : if (!SWIG_IsOK(res1)) {
29175 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsSimple" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29176 : }
29177 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29178 5 : {
29179 5 : const int bLocalUseExceptions = GetUseExceptions();
29180 5 : if ( bLocalUseExceptions ) {
29181 2 : pushErrorHandler();
29182 : }
29183 5 : {
29184 5 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29185 5 : result = (bool)OGRGeometryShadow_IsSimple(arg1);
29186 5 : SWIG_PYTHON_THREAD_END_ALLOW;
29187 : }
29188 5 : if ( bLocalUseExceptions ) {
29189 2 : popErrorHandler();
29190 : }
29191 : #ifndef SED_HACKS
29192 : if ( bLocalUseExceptions ) {
29193 : CPLErr eclass = CPLGetLastErrorType();
29194 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29195 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29196 : }
29197 : }
29198 : #endif
29199 : }
29200 5 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29201 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29202 : return resultobj;
29203 : fail:
29204 : return NULL;
29205 : }
29206 :
29207 :
29208 1 : SWIGINTERN PyObject *_wrap_Geometry_IsRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29209 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29210 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29211 1 : void *argp1 = 0 ;
29212 1 : int res1 = 0 ;
29213 1 : PyObject *swig_obj[1] ;
29214 1 : bool result;
29215 :
29216 1 : if (!args) SWIG_fail;
29217 1 : swig_obj[0] = args;
29218 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29219 1 : if (!SWIG_IsOK(res1)) {
29220 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsRing" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29221 : }
29222 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29223 1 : {
29224 1 : const int bLocalUseExceptions = GetUseExceptions();
29225 1 : if ( bLocalUseExceptions ) {
29226 1 : pushErrorHandler();
29227 : }
29228 1 : {
29229 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29230 1 : result = (bool)OGRGeometryShadow_IsRing(arg1);
29231 1 : SWIG_PYTHON_THREAD_END_ALLOW;
29232 : }
29233 1 : if ( bLocalUseExceptions ) {
29234 1 : popErrorHandler();
29235 : }
29236 : #ifndef SED_HACKS
29237 : if ( bLocalUseExceptions ) {
29238 : CPLErr eclass = CPLGetLastErrorType();
29239 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29240 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29241 : }
29242 : }
29243 : #endif
29244 : }
29245 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29246 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29247 : return resultobj;
29248 : fail:
29249 : return NULL;
29250 : }
29251 :
29252 :
29253 7 : SWIGINTERN PyObject *_wrap_Geometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29254 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29255 7 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29256 7 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29257 7 : void *argp1 = 0 ;
29258 7 : int res1 = 0 ;
29259 7 : void *argp2 = 0 ;
29260 7 : int res2 = 0 ;
29261 7 : PyObject *swig_obj[2] ;
29262 7 : bool result;
29263 :
29264 7 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersects", 2, 2, swig_obj)) SWIG_fail;
29265 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29266 7 : if (!SWIG_IsOK(res1)) {
29267 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersects" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29268 : }
29269 7 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29270 7 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29271 7 : if (!SWIG_IsOK(res2)) {
29272 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29273 : }
29274 7 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29275 7 : {
29276 7 : if (!arg2) {
29277 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29278 : }
29279 : }
29280 7 : {
29281 7 : const int bLocalUseExceptions = GetUseExceptions();
29282 7 : if ( bLocalUseExceptions ) {
29283 0 : pushErrorHandler();
29284 : }
29285 7 : {
29286 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29287 7 : result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
29288 7 : SWIG_PYTHON_THREAD_END_ALLOW;
29289 : }
29290 7 : if ( bLocalUseExceptions ) {
29291 0 : popErrorHandler();
29292 : }
29293 : #ifndef SED_HACKS
29294 : if ( bLocalUseExceptions ) {
29295 : CPLErr eclass = CPLGetLastErrorType();
29296 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29297 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29298 : }
29299 : }
29300 : #endif
29301 : }
29302 7 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29303 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29304 : return resultobj;
29305 : fail:
29306 : return NULL;
29307 : }
29308 :
29309 :
29310 2 : SWIGINTERN PyObject *_wrap_Geometry_Intersect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29311 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29312 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29313 2 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29314 2 : void *argp1 = 0 ;
29315 2 : int res1 = 0 ;
29316 2 : void *argp2 = 0 ;
29317 2 : int res2 = 0 ;
29318 2 : PyObject *swig_obj[2] ;
29319 2 : bool result;
29320 :
29321 2 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersect", 2, 2, swig_obj)) SWIG_fail;
29322 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29323 2 : if (!SWIG_IsOK(res1)) {
29324 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersect" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29325 : }
29326 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29327 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29328 2 : if (!SWIG_IsOK(res2)) {
29329 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersect" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29330 : }
29331 2 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29332 2 : {
29333 2 : if (!arg2) {
29334 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29335 : }
29336 : }
29337 2 : {
29338 2 : const int bLocalUseExceptions = GetUseExceptions();
29339 2 : if ( bLocalUseExceptions ) {
29340 2 : pushErrorHandler();
29341 : }
29342 2 : {
29343 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29344 2 : result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
29345 2 : SWIG_PYTHON_THREAD_END_ALLOW;
29346 : }
29347 2 : if ( bLocalUseExceptions ) {
29348 2 : popErrorHandler();
29349 : }
29350 : #ifndef SED_HACKS
29351 : if ( bLocalUseExceptions ) {
29352 : CPLErr eclass = CPLGetLastErrorType();
29353 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29354 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29355 : }
29356 : }
29357 : #endif
29358 : }
29359 2 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29360 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29361 : return resultobj;
29362 : fail:
29363 : return NULL;
29364 : }
29365 :
29366 :
29367 28011 : SWIGINTERN PyObject *_wrap_Geometry_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29368 28011 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29369 28011 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29370 28011 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29371 28011 : void *argp1 = 0 ;
29372 28011 : int res1 = 0 ;
29373 28011 : void *argp2 = 0 ;
29374 28011 : int res2 = 0 ;
29375 28011 : PyObject *swig_obj[2] ;
29376 28011 : bool result;
29377 :
29378 28011 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Equals", 2, 2, swig_obj)) SWIG_fail;
29379 28011 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29380 28011 : if (!SWIG_IsOK(res1)) {
29381 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equals" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29382 : }
29383 28011 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29384 28011 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29385 28011 : if (!SWIG_IsOK(res2)) {
29386 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equals" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29387 : }
29388 28011 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29389 28011 : {
29390 28011 : if (!arg2) {
29391 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29392 : }
29393 : }
29394 28011 : {
29395 28011 : const int bLocalUseExceptions = GetUseExceptions();
29396 28011 : if ( bLocalUseExceptions ) {
29397 14366 : pushErrorHandler();
29398 : }
29399 28011 : {
29400 28011 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29401 28011 : result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
29402 28011 : SWIG_PYTHON_THREAD_END_ALLOW;
29403 : }
29404 28011 : if ( bLocalUseExceptions ) {
29405 14366 : popErrorHandler();
29406 : }
29407 : #ifndef SED_HACKS
29408 : if ( bLocalUseExceptions ) {
29409 : CPLErr eclass = CPLGetLastErrorType();
29410 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29411 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29412 : }
29413 : }
29414 : #endif
29415 : }
29416 28011 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29417 28011 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29418 : return resultobj;
29419 : fail:
29420 : return NULL;
29421 : }
29422 :
29423 :
29424 170 : SWIGINTERN PyObject *_wrap_Geometry_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29425 170 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29426 170 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29427 170 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29428 170 : void *argp1 = 0 ;
29429 170 : int res1 = 0 ;
29430 170 : void *argp2 = 0 ;
29431 170 : int res2 = 0 ;
29432 170 : PyObject *swig_obj[2] ;
29433 170 : bool result;
29434 :
29435 170 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Equal", 2, 2, swig_obj)) SWIG_fail;
29436 170 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29437 170 : if (!SWIG_IsOK(res1)) {
29438 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equal" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29439 : }
29440 170 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29441 170 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29442 170 : if (!SWIG_IsOK(res2)) {
29443 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equal" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29444 : }
29445 170 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29446 170 : {
29447 170 : if (!arg2) {
29448 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29449 : }
29450 : }
29451 170 : {
29452 170 : const int bLocalUseExceptions = GetUseExceptions();
29453 170 : if ( bLocalUseExceptions ) {
29454 0 : pushErrorHandler();
29455 : }
29456 170 : {
29457 170 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29458 170 : result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
29459 170 : SWIG_PYTHON_THREAD_END_ALLOW;
29460 : }
29461 170 : if ( bLocalUseExceptions ) {
29462 0 : popErrorHandler();
29463 : }
29464 : #ifndef SED_HACKS
29465 : if ( bLocalUseExceptions ) {
29466 : CPLErr eclass = CPLGetLastErrorType();
29467 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29468 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29469 : }
29470 : }
29471 : #endif
29472 : }
29473 170 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29474 170 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29475 : return resultobj;
29476 : fail:
29477 : return NULL;
29478 : }
29479 :
29480 :
29481 6 : SWIGINTERN PyObject *_wrap_Geometry_Disjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29482 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29483 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29484 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29485 6 : void *argp1 = 0 ;
29486 6 : int res1 = 0 ;
29487 6 : void *argp2 = 0 ;
29488 6 : int res2 = 0 ;
29489 6 : PyObject *swig_obj[2] ;
29490 6 : bool result;
29491 :
29492 6 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Disjoint", 2, 2, swig_obj)) SWIG_fail;
29493 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29494 6 : if (!SWIG_IsOK(res1)) {
29495 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Disjoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29496 : }
29497 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29498 6 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29499 6 : if (!SWIG_IsOK(res2)) {
29500 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Disjoint" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29501 : }
29502 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29503 6 : {
29504 6 : if (!arg2) {
29505 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29506 : }
29507 : }
29508 6 : {
29509 6 : const int bLocalUseExceptions = GetUseExceptions();
29510 6 : if ( bLocalUseExceptions ) {
29511 2 : pushErrorHandler();
29512 : }
29513 6 : {
29514 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29515 6 : result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
29516 6 : SWIG_PYTHON_THREAD_END_ALLOW;
29517 : }
29518 6 : if ( bLocalUseExceptions ) {
29519 2 : popErrorHandler();
29520 : }
29521 : #ifndef SED_HACKS
29522 : if ( bLocalUseExceptions ) {
29523 : CPLErr eclass = CPLGetLastErrorType();
29524 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29525 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29526 : }
29527 : }
29528 : #endif
29529 : }
29530 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29531 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29532 : return resultobj;
29533 : fail:
29534 : return NULL;
29535 : }
29536 :
29537 :
29538 6 : SWIGINTERN PyObject *_wrap_Geometry_Touches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29539 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29540 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29541 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29542 6 : void *argp1 = 0 ;
29543 6 : int res1 = 0 ;
29544 6 : void *argp2 = 0 ;
29545 6 : int res2 = 0 ;
29546 6 : PyObject *swig_obj[2] ;
29547 6 : bool result;
29548 :
29549 6 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Touches", 2, 2, swig_obj)) SWIG_fail;
29550 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29551 6 : if (!SWIG_IsOK(res1)) {
29552 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Touches" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29553 : }
29554 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29555 6 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29556 6 : if (!SWIG_IsOK(res2)) {
29557 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Touches" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29558 : }
29559 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29560 6 : {
29561 6 : if (!arg2) {
29562 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29563 : }
29564 : }
29565 6 : {
29566 6 : const int bLocalUseExceptions = GetUseExceptions();
29567 6 : if ( bLocalUseExceptions ) {
29568 2 : pushErrorHandler();
29569 : }
29570 6 : {
29571 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29572 6 : result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
29573 6 : SWIG_PYTHON_THREAD_END_ALLOW;
29574 : }
29575 6 : if ( bLocalUseExceptions ) {
29576 2 : popErrorHandler();
29577 : }
29578 : #ifndef SED_HACKS
29579 : if ( bLocalUseExceptions ) {
29580 : CPLErr eclass = CPLGetLastErrorType();
29581 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29582 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29583 : }
29584 : }
29585 : #endif
29586 : }
29587 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29588 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29589 : return resultobj;
29590 : fail:
29591 : return NULL;
29592 : }
29593 :
29594 :
29595 6 : SWIGINTERN PyObject *_wrap_Geometry_Crosses(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29596 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29597 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29598 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29599 6 : void *argp1 = 0 ;
29600 6 : int res1 = 0 ;
29601 6 : void *argp2 = 0 ;
29602 6 : int res2 = 0 ;
29603 6 : PyObject *swig_obj[2] ;
29604 6 : bool result;
29605 :
29606 6 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Crosses", 2, 2, swig_obj)) SWIG_fail;
29607 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29608 6 : if (!SWIG_IsOK(res1)) {
29609 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Crosses" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29610 : }
29611 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29612 6 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29613 6 : if (!SWIG_IsOK(res2)) {
29614 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Crosses" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29615 : }
29616 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29617 6 : {
29618 6 : if (!arg2) {
29619 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29620 : }
29621 : }
29622 6 : {
29623 6 : const int bLocalUseExceptions = GetUseExceptions();
29624 6 : if ( bLocalUseExceptions ) {
29625 2 : pushErrorHandler();
29626 : }
29627 6 : {
29628 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29629 6 : result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
29630 6 : SWIG_PYTHON_THREAD_END_ALLOW;
29631 : }
29632 6 : if ( bLocalUseExceptions ) {
29633 2 : popErrorHandler();
29634 : }
29635 : #ifndef SED_HACKS
29636 : if ( bLocalUseExceptions ) {
29637 : CPLErr eclass = CPLGetLastErrorType();
29638 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29639 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29640 : }
29641 : }
29642 : #endif
29643 : }
29644 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29645 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29646 : return resultobj;
29647 : fail:
29648 : return NULL;
29649 : }
29650 :
29651 :
29652 5132 : SWIGINTERN PyObject *_wrap_Geometry_Within(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29653 5132 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29654 5132 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29655 5132 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29656 5132 : void *argp1 = 0 ;
29657 5132 : int res1 = 0 ;
29658 5132 : void *argp2 = 0 ;
29659 5132 : int res2 = 0 ;
29660 5132 : PyObject *swig_obj[2] ;
29661 5132 : bool result;
29662 :
29663 5132 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Within", 2, 2, swig_obj)) SWIG_fail;
29664 5132 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29665 5132 : if (!SWIG_IsOK(res1)) {
29666 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Within" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29667 : }
29668 5132 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29669 5132 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29670 5132 : if (!SWIG_IsOK(res2)) {
29671 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Within" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29672 : }
29673 5132 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29674 5132 : {
29675 5132 : if (!arg2) {
29676 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29677 : }
29678 : }
29679 5132 : {
29680 5132 : const int bLocalUseExceptions = GetUseExceptions();
29681 5132 : if ( bLocalUseExceptions ) {
29682 3 : pushErrorHandler();
29683 : }
29684 5132 : {
29685 5132 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29686 5132 : result = (bool)OGRGeometryShadow_Within(arg1,arg2);
29687 5132 : SWIG_PYTHON_THREAD_END_ALLOW;
29688 : }
29689 5132 : if ( bLocalUseExceptions ) {
29690 3 : popErrorHandler();
29691 : }
29692 : #ifndef SED_HACKS
29693 : if ( bLocalUseExceptions ) {
29694 : CPLErr eclass = CPLGetLastErrorType();
29695 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29696 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29697 : }
29698 : }
29699 : #endif
29700 : }
29701 5132 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29702 5132 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29703 : return resultobj;
29704 : fail:
29705 : return NULL;
29706 : }
29707 :
29708 :
29709 9 : SWIGINTERN PyObject *_wrap_Geometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29710 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29711 9 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29712 9 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29713 9 : void *argp1 = 0 ;
29714 9 : int res1 = 0 ;
29715 9 : void *argp2 = 0 ;
29716 9 : int res2 = 0 ;
29717 9 : PyObject *swig_obj[2] ;
29718 9 : bool result;
29719 :
29720 9 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Contains", 2, 2, swig_obj)) SWIG_fail;
29721 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29722 9 : if (!SWIG_IsOK(res1)) {
29723 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Contains" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29724 : }
29725 9 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29726 9 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29727 9 : if (!SWIG_IsOK(res2)) {
29728 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29729 : }
29730 9 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29731 9 : {
29732 9 : if (!arg2) {
29733 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29734 : }
29735 : }
29736 9 : {
29737 9 : const int bLocalUseExceptions = GetUseExceptions();
29738 9 : if ( bLocalUseExceptions ) {
29739 2 : pushErrorHandler();
29740 : }
29741 9 : {
29742 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29743 9 : result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
29744 9 : SWIG_PYTHON_THREAD_END_ALLOW;
29745 : }
29746 9 : if ( bLocalUseExceptions ) {
29747 2 : popErrorHandler();
29748 : }
29749 : #ifndef SED_HACKS
29750 : if ( bLocalUseExceptions ) {
29751 : CPLErr eclass = CPLGetLastErrorType();
29752 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29753 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29754 : }
29755 : }
29756 : #endif
29757 : }
29758 9 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29759 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29760 : return resultobj;
29761 : fail:
29762 : return NULL;
29763 : }
29764 :
29765 :
29766 6 : SWIGINTERN PyObject *_wrap_Geometry_Overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29767 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29768 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29769 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
29770 6 : void *argp1 = 0 ;
29771 6 : int res1 = 0 ;
29772 6 : void *argp2 = 0 ;
29773 6 : int res2 = 0 ;
29774 6 : PyObject *swig_obj[2] ;
29775 6 : bool result;
29776 :
29777 6 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Overlaps", 2, 2, swig_obj)) SWIG_fail;
29778 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29779 6 : if (!SWIG_IsOK(res1)) {
29780 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Overlaps" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29781 : }
29782 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29783 6 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29784 6 : if (!SWIG_IsOK(res2)) {
29785 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Overlaps" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
29786 : }
29787 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
29788 6 : {
29789 6 : if (!arg2) {
29790 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29791 : }
29792 : }
29793 6 : {
29794 6 : const int bLocalUseExceptions = GetUseExceptions();
29795 6 : if ( bLocalUseExceptions ) {
29796 2 : pushErrorHandler();
29797 : }
29798 6 : {
29799 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29800 6 : result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
29801 6 : SWIG_PYTHON_THREAD_END_ALLOW;
29802 : }
29803 6 : if ( bLocalUseExceptions ) {
29804 2 : popErrorHandler();
29805 : }
29806 : #ifndef SED_HACKS
29807 : if ( bLocalUseExceptions ) {
29808 : CPLErr eclass = CPLGetLastErrorType();
29809 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29810 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29811 : }
29812 : }
29813 : #endif
29814 : }
29815 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
29816 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29817 : return resultobj;
29818 : fail:
29819 : return NULL;
29820 : }
29821 :
29822 :
29823 4 : SWIGINTERN PyObject *_wrap_Geometry_TransformTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29824 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29825 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29826 4 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
29827 4 : void *argp1 = 0 ;
29828 4 : int res1 = 0 ;
29829 4 : void *argp2 = 0 ;
29830 4 : int res2 = 0 ;
29831 4 : PyObject *swig_obj[2] ;
29832 4 : OGRErr result;
29833 :
29834 4 : if (!SWIG_Python_UnpackTuple(args, "Geometry_TransformTo", 2, 2, swig_obj)) SWIG_fail;
29835 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29836 4 : if (!SWIG_IsOK(res1)) {
29837 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_TransformTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29838 : }
29839 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29840 4 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
29841 4 : if (!SWIG_IsOK(res2)) {
29842 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_TransformTo" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
29843 : }
29844 4 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
29845 4 : {
29846 4 : if (!arg2) {
29847 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29848 : }
29849 : }
29850 4 : {
29851 4 : const int bLocalUseExceptions = GetUseExceptions();
29852 4 : if ( bLocalUseExceptions ) {
29853 1 : pushErrorHandler();
29854 : }
29855 4 : {
29856 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29857 4 : result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
29858 4 : SWIG_PYTHON_THREAD_END_ALLOW;
29859 : }
29860 4 : if ( bLocalUseExceptions ) {
29861 1 : popErrorHandler();
29862 : }
29863 : #ifndef SED_HACKS
29864 : if ( bLocalUseExceptions ) {
29865 : CPLErr eclass = CPLGetLastErrorType();
29866 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29867 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29868 : }
29869 : }
29870 : #endif
29871 : }
29872 4 : {
29873 : /* %typemap(out) OGRErr */
29874 5 : if ( result != 0 && GetUseExceptions()) {
29875 0 : const char* pszMessage = CPLGetLastErrorMsg();
29876 0 : if( pszMessage[0] != '\0' )
29877 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
29878 : else
29879 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
29880 0 : SWIG_fail;
29881 : }
29882 : }
29883 4 : {
29884 : /* %typemap(ret) OGRErr */
29885 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
29886 4 : resultobj = PyInt_FromLong( result );
29887 : }
29888 : }
29889 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29890 : return resultobj;
29891 : fail:
29892 : return NULL;
29893 : }
29894 :
29895 :
29896 : SWIGINTERN PyObject *_wrap_Geometry_Transform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
29897 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29898 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29899 : OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
29900 : void *argp1 = 0 ;
29901 : int res1 = 0 ;
29902 : void *argp2 = 0 ;
29903 : int res2 = 0 ;
29904 : OGRErr result;
29905 :
29906 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
29907 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29908 : if (!SWIG_IsOK(res1)) {
29909 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29910 : }
29911 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29912 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
29913 : if (!SWIG_IsOK(res2)) {
29914 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OSRCoordinateTransformationShadow *""'");
29915 : }
29916 : arg2 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp2);
29917 : {
29918 : if (!arg2) {
29919 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
29920 : }
29921 : }
29922 : {
29923 : const int bLocalUseExceptions = GetUseExceptions();
29924 : if ( bLocalUseExceptions ) {
29925 : pushErrorHandler();
29926 : }
29927 : {
29928 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29929 : result = (OGRErr)OGRGeometryShadow_Transform__SWIG_0(arg1,arg2);
29930 : SWIG_PYTHON_THREAD_END_ALLOW;
29931 : }
29932 : if ( bLocalUseExceptions ) {
29933 : popErrorHandler();
29934 : }
29935 : #ifndef SED_HACKS
29936 : if ( bLocalUseExceptions ) {
29937 : CPLErr eclass = CPLGetLastErrorType();
29938 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
29939 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
29940 : }
29941 : }
29942 : #endif
29943 : }
29944 : {
29945 : /* %typemap(out) OGRErr */
29946 : if ( result != 0 && GetUseExceptions()) {
29947 : const char* pszMessage = CPLGetLastErrorMsg();
29948 : if( pszMessage[0] != '\0' )
29949 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
29950 : else
29951 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
29952 : SWIG_fail;
29953 : }
29954 : }
29955 : {
29956 : /* %typemap(ret) OGRErr */
29957 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
29958 : resultobj = PyInt_FromLong( result );
29959 : }
29960 : }
29961 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
29962 : return resultobj;
29963 : fail:
29964 : return NULL;
29965 : }
29966 :
29967 :
29968 47 : SWIGINTERN PyObject *_wrap_Geometry_GetSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29969 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
29970 47 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
29971 47 : void *argp1 = 0 ;
29972 47 : int res1 = 0 ;
29973 47 : PyObject *swig_obj[1] ;
29974 47 : OSRSpatialReferenceShadow *result = 0 ;
29975 :
29976 47 : if (!args) SWIG_fail;
29977 47 : swig_obj[0] = args;
29978 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
29979 47 : if (!SWIG_IsOK(res1)) {
29980 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
29981 : }
29982 47 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
29983 47 : {
29984 47 : const int bLocalUseExceptions = GetUseExceptions();
29985 47 : if ( bLocalUseExceptions ) {
29986 24 : pushErrorHandler();
29987 : }
29988 47 : {
29989 47 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29990 47 : result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
29991 47 : SWIG_PYTHON_THREAD_END_ALLOW;
29992 : }
29993 47 : if ( bLocalUseExceptions ) {
29994 24 : popErrorHandler();
29995 : }
29996 : #ifndef SED_HACKS
29997 : if ( bLocalUseExceptions ) {
29998 : CPLErr eclass = CPLGetLastErrorType();
29999 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30000 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30001 : }
30002 : }
30003 : #endif
30004 : }
30005 47 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
30006 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30007 : return resultobj;
30008 : fail:
30009 : return NULL;
30010 : }
30011 :
30012 :
30013 48 : SWIGINTERN PyObject *_wrap_Geometry_AssignSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30014 48 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30015 48 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30016 48 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
30017 48 : void *argp1 = 0 ;
30018 48 : int res1 = 0 ;
30019 48 : void *argp2 = 0 ;
30020 48 : int res2 = 0 ;
30021 48 : PyObject *swig_obj[2] ;
30022 :
30023 48 : if (!SWIG_Python_UnpackTuple(args, "Geometry_AssignSpatialReference", 2, 2, swig_obj)) SWIG_fail;
30024 48 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30025 48 : if (!SWIG_IsOK(res1)) {
30026 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AssignSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30027 : }
30028 48 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30029 48 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
30030 48 : if (!SWIG_IsOK(res2)) {
30031 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AssignSpatialReference" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
30032 : }
30033 48 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
30034 48 : {
30035 48 : const int bLocalUseExceptions = GetUseExceptions();
30036 48 : if ( bLocalUseExceptions ) {
30037 41 : pushErrorHandler();
30038 : }
30039 48 : {
30040 48 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30041 48 : OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
30042 48 : SWIG_PYTHON_THREAD_END_ALLOW;
30043 : }
30044 48 : if ( bLocalUseExceptions ) {
30045 41 : popErrorHandler();
30046 : }
30047 : #ifndef SED_HACKS
30048 : if ( bLocalUseExceptions ) {
30049 : CPLErr eclass = CPLGetLastErrorType();
30050 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30051 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30052 : }
30053 : }
30054 : #endif
30055 : }
30056 48 : resultobj = SWIG_Py_Void();
30057 48 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30058 : return resultobj;
30059 : fail:
30060 : return NULL;
30061 : }
30062 :
30063 :
30064 6 : SWIGINTERN PyObject *_wrap_Geometry_CloseRings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30065 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30066 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30067 6 : void *argp1 = 0 ;
30068 6 : int res1 = 0 ;
30069 6 : PyObject *swig_obj[1] ;
30070 :
30071 6 : if (!args) SWIG_fail;
30072 6 : swig_obj[0] = args;
30073 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30074 6 : if (!SWIG_IsOK(res1)) {
30075 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CloseRings" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30076 : }
30077 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30078 6 : {
30079 6 : const int bLocalUseExceptions = GetUseExceptions();
30080 6 : if ( bLocalUseExceptions ) {
30081 0 : pushErrorHandler();
30082 : }
30083 6 : {
30084 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30085 6 : OGRGeometryShadow_CloseRings(arg1);
30086 6 : SWIG_PYTHON_THREAD_END_ALLOW;
30087 : }
30088 6 : if ( bLocalUseExceptions ) {
30089 0 : popErrorHandler();
30090 : }
30091 : #ifndef SED_HACKS
30092 : if ( bLocalUseExceptions ) {
30093 : CPLErr eclass = CPLGetLastErrorType();
30094 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30095 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30096 : }
30097 : }
30098 : #endif
30099 : }
30100 6 : resultobj = SWIG_Py_Void();
30101 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30102 : return resultobj;
30103 : fail:
30104 : return NULL;
30105 : }
30106 :
30107 :
30108 31 : SWIGINTERN PyObject *_wrap_Geometry_FlattenTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30109 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30110 31 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30111 31 : void *argp1 = 0 ;
30112 31 : int res1 = 0 ;
30113 31 : PyObject *swig_obj[1] ;
30114 :
30115 31 : if (!args) SWIG_fail;
30116 31 : swig_obj[0] = args;
30117 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30118 31 : if (!SWIG_IsOK(res1)) {
30119 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FlattenTo2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30120 : }
30121 31 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30122 31 : {
30123 31 : const int bLocalUseExceptions = GetUseExceptions();
30124 31 : if ( bLocalUseExceptions ) {
30125 0 : pushErrorHandler();
30126 : }
30127 31 : {
30128 31 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30129 31 : OGRGeometryShadow_FlattenTo2D(arg1);
30130 31 : SWIG_PYTHON_THREAD_END_ALLOW;
30131 : }
30132 31 : if ( bLocalUseExceptions ) {
30133 0 : popErrorHandler();
30134 : }
30135 : #ifndef SED_HACKS
30136 : if ( bLocalUseExceptions ) {
30137 : CPLErr eclass = CPLGetLastErrorType();
30138 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30139 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30140 : }
30141 : }
30142 : #endif
30143 : }
30144 31 : resultobj = SWIG_Py_Void();
30145 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30146 : return resultobj;
30147 : fail:
30148 : return NULL;
30149 : }
30150 :
30151 :
30152 21 : SWIGINTERN PyObject *_wrap_Geometry_Segmentize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30153 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30154 21 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30155 21 : double arg2 ;
30156 21 : void *argp1 = 0 ;
30157 21 : int res1 = 0 ;
30158 21 : double val2 ;
30159 21 : int ecode2 = 0 ;
30160 21 : PyObject *swig_obj[2] ;
30161 :
30162 21 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Segmentize", 2, 2, swig_obj)) SWIG_fail;
30163 21 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30164 21 : if (!SWIG_IsOK(res1)) {
30165 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Segmentize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30166 : }
30167 21 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30168 21 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
30169 21 : if (!SWIG_IsOK(ecode2)) {
30170 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Segmentize" "', argument " "2"" of type '" "double""'");
30171 : }
30172 21 : arg2 = static_cast< double >(val2);
30173 21 : {
30174 21 : const int bLocalUseExceptions = GetUseExceptions();
30175 21 : if ( bLocalUseExceptions ) {
30176 0 : pushErrorHandler();
30177 : }
30178 21 : {
30179 21 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30180 21 : OGRGeometryShadow_Segmentize(arg1,arg2);
30181 21 : SWIG_PYTHON_THREAD_END_ALLOW;
30182 : }
30183 21 : if ( bLocalUseExceptions ) {
30184 0 : popErrorHandler();
30185 : }
30186 : #ifndef SED_HACKS
30187 : if ( bLocalUseExceptions ) {
30188 : CPLErr eclass = CPLGetLastErrorType();
30189 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30190 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30191 : }
30192 : }
30193 : #endif
30194 : }
30195 21 : resultobj = SWIG_Py_Void();
30196 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30197 : return resultobj;
30198 : fail:
30199 : return NULL;
30200 : }
30201 :
30202 :
30203 13070 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30204 13070 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30205 13070 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30206 13070 : double *arg2 ;
30207 13070 : void *argp1 = 0 ;
30208 13070 : int res1 = 0 ;
30209 13070 : double argout2[4] ;
30210 13070 : PyObject *swig_obj[1] ;
30211 :
30212 13070 : {
30213 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
30214 13070 : memset(argout2, 0, sizeof(argout2));
30215 13070 : arg2 = argout2;
30216 : }
30217 13070 : if (!args) SWIG_fail;
30218 13070 : swig_obj[0] = args;
30219 13070 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30220 13070 : if (!SWIG_IsOK(res1)) {
30221 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30222 : }
30223 13070 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30224 13070 : {
30225 13070 : const int bLocalUseExceptions = GetUseExceptions();
30226 13070 : if ( bLocalUseExceptions ) {
30227 13015 : pushErrorHandler();
30228 : }
30229 13070 : {
30230 13070 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30231 13070 : OGRGeometryShadow_GetEnvelope(arg1,arg2);
30232 13070 : SWIG_PYTHON_THREAD_END_ALLOW;
30233 : }
30234 13070 : if ( bLocalUseExceptions ) {
30235 13015 : popErrorHandler();
30236 : }
30237 : #ifndef SED_HACKS
30238 : if ( bLocalUseExceptions ) {
30239 : CPLErr eclass = CPLGetLastErrorType();
30240 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30241 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30242 : }
30243 : }
30244 : #endif
30245 : }
30246 13070 : resultobj = SWIG_Py_Void();
30247 13070 : {
30248 : /* %typemap(argout) (double argout[ANY]) */
30249 13070 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
30250 13070 : resultobj = t_output_helper(resultobj,out);
30251 : }
30252 13070 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30253 : return resultobj;
30254 : fail:
30255 : return NULL;
30256 : }
30257 :
30258 :
30259 10 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30260 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30261 10 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30262 10 : double *arg2 ;
30263 10 : void *argp1 = 0 ;
30264 10 : int res1 = 0 ;
30265 10 : double argout2[6] ;
30266 10 : PyObject *swig_obj[1] ;
30267 :
30268 10 : {
30269 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
30270 10 : memset(argout2, 0, sizeof(argout2));
30271 10 : arg2 = argout2;
30272 : }
30273 10 : if (!args) SWIG_fail;
30274 10 : swig_obj[0] = args;
30275 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30276 10 : if (!SWIG_IsOK(res1)) {
30277 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30278 : }
30279 10 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30280 10 : {
30281 10 : const int bLocalUseExceptions = GetUseExceptions();
30282 10 : if ( bLocalUseExceptions ) {
30283 0 : pushErrorHandler();
30284 : }
30285 10 : {
30286 10 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30287 10 : OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
30288 10 : SWIG_PYTHON_THREAD_END_ALLOW;
30289 : }
30290 10 : if ( bLocalUseExceptions ) {
30291 0 : popErrorHandler();
30292 : }
30293 : #ifndef SED_HACKS
30294 : if ( bLocalUseExceptions ) {
30295 : CPLErr eclass = CPLGetLastErrorType();
30296 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30297 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30298 : }
30299 : }
30300 : #endif
30301 : }
30302 10 : resultobj = SWIG_Py_Void();
30303 10 : {
30304 : /* %typemap(argout) (double argout[ANY]) */
30305 10 : PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
30306 10 : resultobj = t_output_helper(resultobj,out);
30307 : }
30308 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30309 : return resultobj;
30310 : fail:
30311 : return NULL;
30312 : }
30313 :
30314 :
30315 4 : SWIGINTERN PyObject *_wrap_Geometry_Centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30316 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30317 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30318 4 : void *argp1 = 0 ;
30319 4 : int res1 = 0 ;
30320 4 : PyObject *swig_obj[1] ;
30321 4 : OGRGeometryShadow *result = 0 ;
30322 :
30323 4 : if (!args) SWIG_fail;
30324 4 : swig_obj[0] = args;
30325 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30326 4 : if (!SWIG_IsOK(res1)) {
30327 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Centroid" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30328 : }
30329 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30330 4 : {
30331 4 : const int bLocalUseExceptions = GetUseExceptions();
30332 4 : if ( bLocalUseExceptions ) {
30333 4 : pushErrorHandler();
30334 : }
30335 4 : {
30336 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30337 4 : result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
30338 4 : SWIG_PYTHON_THREAD_END_ALLOW;
30339 : }
30340 4 : if ( bLocalUseExceptions ) {
30341 4 : popErrorHandler();
30342 : }
30343 : #ifndef SED_HACKS
30344 : if ( bLocalUseExceptions ) {
30345 : CPLErr eclass = CPLGetLastErrorType();
30346 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30347 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30348 : }
30349 : }
30350 : #endif
30351 : }
30352 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
30353 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30354 : return resultobj;
30355 : fail:
30356 : return NULL;
30357 : }
30358 :
30359 :
30360 4 : SWIGINTERN PyObject *_wrap_Geometry_PointOnSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30361 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30362 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30363 4 : void *argp1 = 0 ;
30364 4 : int res1 = 0 ;
30365 4 : PyObject *swig_obj[1] ;
30366 4 : OGRGeometryShadow *result = 0 ;
30367 :
30368 4 : if (!args) SWIG_fail;
30369 4 : swig_obj[0] = args;
30370 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30371 4 : if (!SWIG_IsOK(res1)) {
30372 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_PointOnSurface" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30373 : }
30374 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30375 4 : {
30376 4 : const int bLocalUseExceptions = GetUseExceptions();
30377 4 : if ( bLocalUseExceptions ) {
30378 1 : pushErrorHandler();
30379 : }
30380 4 : {
30381 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30382 4 : result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
30383 4 : SWIG_PYTHON_THREAD_END_ALLOW;
30384 : }
30385 4 : if ( bLocalUseExceptions ) {
30386 1 : popErrorHandler();
30387 : }
30388 : #ifndef SED_HACKS
30389 : if ( bLocalUseExceptions ) {
30390 : CPLErr eclass = CPLGetLastErrorType();
30391 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30392 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30393 : }
30394 : }
30395 : #endif
30396 : }
30397 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
30398 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30399 : return resultobj;
30400 : fail:
30401 : return NULL;
30402 : }
30403 :
30404 :
30405 2 : SWIGINTERN PyObject *_wrap_Geometry_WkbSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30406 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30407 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30408 2 : void *argp1 = 0 ;
30409 2 : int res1 = 0 ;
30410 2 : PyObject *swig_obj[1] ;
30411 2 : size_t result;
30412 :
30413 2 : if (!args) SWIG_fail;
30414 2 : swig_obj[0] = args;
30415 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30416 2 : if (!SWIG_IsOK(res1)) {
30417 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_WkbSize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30418 : }
30419 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30420 2 : {
30421 2 : const int bLocalUseExceptions = GetUseExceptions();
30422 2 : if ( bLocalUseExceptions ) {
30423 0 : pushErrorHandler();
30424 : }
30425 2 : {
30426 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30427 2 : result = OGRGeometryShadow_WkbSize(arg1);
30428 2 : SWIG_PYTHON_THREAD_END_ALLOW;
30429 : }
30430 2 : if ( bLocalUseExceptions ) {
30431 0 : popErrorHandler();
30432 : }
30433 : #ifndef SED_HACKS
30434 : if ( bLocalUseExceptions ) {
30435 : CPLErr eclass = CPLGetLastErrorType();
30436 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30437 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30438 : }
30439 : }
30440 : #endif
30441 : }
30442 2 : resultobj = SWIG_From_size_t(static_cast< size_t >(result));
30443 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30444 : return resultobj;
30445 : fail:
30446 : return NULL;
30447 : }
30448 :
30449 :
30450 77 : SWIGINTERN PyObject *_wrap_Geometry_GetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30451 77 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30452 77 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30453 77 : void *argp1 = 0 ;
30454 77 : int res1 = 0 ;
30455 77 : PyObject *swig_obj[1] ;
30456 77 : int result;
30457 :
30458 77 : if (!args) SWIG_fail;
30459 77 : swig_obj[0] = args;
30460 77 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30461 77 : if (!SWIG_IsOK(res1)) {
30462 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30463 : }
30464 77 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30465 77 : {
30466 77 : const int bLocalUseExceptions = GetUseExceptions();
30467 77 : if ( bLocalUseExceptions ) {
30468 15 : pushErrorHandler();
30469 : }
30470 77 : {
30471 77 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30472 77 : result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
30473 77 : SWIG_PYTHON_THREAD_END_ALLOW;
30474 : }
30475 77 : if ( bLocalUseExceptions ) {
30476 15 : popErrorHandler();
30477 : }
30478 : #ifndef SED_HACKS
30479 : if ( bLocalUseExceptions ) {
30480 : CPLErr eclass = CPLGetLastErrorType();
30481 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30482 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30483 : }
30484 : }
30485 : #endif
30486 : }
30487 77 : resultobj = SWIG_From_int(static_cast< int >(result));
30488 77 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30489 : return resultobj;
30490 : fail:
30491 : return NULL;
30492 : }
30493 :
30494 :
30495 4 : SWIGINTERN PyObject *_wrap_Geometry_CoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30496 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30497 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30498 4 : void *argp1 = 0 ;
30499 4 : int res1 = 0 ;
30500 4 : PyObject *swig_obj[1] ;
30501 4 : int result;
30502 :
30503 4 : if (!args) SWIG_fail;
30504 4 : swig_obj[0] = args;
30505 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30506 4 : if (!SWIG_IsOK(res1)) {
30507 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30508 : }
30509 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30510 4 : {
30511 4 : const int bLocalUseExceptions = GetUseExceptions();
30512 4 : if ( bLocalUseExceptions ) {
30513 0 : pushErrorHandler();
30514 : }
30515 4 : {
30516 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30517 4 : result = (int)OGRGeometryShadow_CoordinateDimension(arg1);
30518 4 : SWIG_PYTHON_THREAD_END_ALLOW;
30519 : }
30520 4 : if ( bLocalUseExceptions ) {
30521 0 : popErrorHandler();
30522 : }
30523 : #ifndef SED_HACKS
30524 : if ( bLocalUseExceptions ) {
30525 : CPLErr eclass = CPLGetLastErrorType();
30526 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30527 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30528 : }
30529 : }
30530 : #endif
30531 : }
30532 4 : resultobj = SWIG_From_int(static_cast< int >(result));
30533 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30534 : return resultobj;
30535 : fail:
30536 : return NULL;
30537 : }
30538 :
30539 :
30540 32434 : SWIGINTERN PyObject *_wrap_Geometry_Is3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30541 32434 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30542 32434 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30543 32434 : void *argp1 = 0 ;
30544 32434 : int res1 = 0 ;
30545 32434 : PyObject *swig_obj[1] ;
30546 32434 : int result;
30547 :
30548 32434 : if (!args) SWIG_fail;
30549 32434 : swig_obj[0] = args;
30550 32434 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30551 32434 : if (!SWIG_IsOK(res1)) {
30552 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Is3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30553 : }
30554 32434 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30555 32434 : {
30556 32434 : const int bLocalUseExceptions = GetUseExceptions();
30557 32434 : if ( bLocalUseExceptions ) {
30558 0 : pushErrorHandler();
30559 : }
30560 32434 : {
30561 32434 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30562 32434 : result = (int)OGRGeometryShadow_Is3D(arg1);
30563 32434 : SWIG_PYTHON_THREAD_END_ALLOW;
30564 : }
30565 32434 : if ( bLocalUseExceptions ) {
30566 0 : popErrorHandler();
30567 : }
30568 : #ifndef SED_HACKS
30569 : if ( bLocalUseExceptions ) {
30570 : CPLErr eclass = CPLGetLastErrorType();
30571 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30572 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30573 : }
30574 : }
30575 : #endif
30576 : }
30577 32434 : resultobj = SWIG_From_int(static_cast< int >(result));
30578 32434 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30579 : return resultobj;
30580 : fail:
30581 : return NULL;
30582 : }
30583 :
30584 :
30585 34987 : SWIGINTERN PyObject *_wrap_Geometry_IsMeasured(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30586 34987 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30587 34987 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30588 34987 : void *argp1 = 0 ;
30589 34987 : int res1 = 0 ;
30590 34987 : PyObject *swig_obj[1] ;
30591 34987 : int result;
30592 :
30593 34987 : if (!args) SWIG_fail;
30594 34987 : swig_obj[0] = args;
30595 34987 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30596 34987 : if (!SWIG_IsOK(res1)) {
30597 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsMeasured" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30598 : }
30599 34987 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30600 34987 : {
30601 34987 : const int bLocalUseExceptions = GetUseExceptions();
30602 34987 : if ( bLocalUseExceptions ) {
30603 0 : pushErrorHandler();
30604 : }
30605 34987 : {
30606 34987 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30607 34987 : result = (int)OGRGeometryShadow_IsMeasured(arg1);
30608 34987 : SWIG_PYTHON_THREAD_END_ALLOW;
30609 : }
30610 34987 : if ( bLocalUseExceptions ) {
30611 0 : popErrorHandler();
30612 : }
30613 : #ifndef SED_HACKS
30614 : if ( bLocalUseExceptions ) {
30615 : CPLErr eclass = CPLGetLastErrorType();
30616 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30617 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30618 : }
30619 : }
30620 : #endif
30621 : }
30622 34987 : resultobj = SWIG_From_int(static_cast< int >(result));
30623 34987 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30624 : return resultobj;
30625 : fail:
30626 : return NULL;
30627 : }
30628 :
30629 :
30630 56 : SWIGINTERN PyObject *_wrap_Geometry_SetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30631 56 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30632 56 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30633 56 : int arg2 ;
30634 56 : void *argp1 = 0 ;
30635 56 : int res1 = 0 ;
30636 56 : int val2 ;
30637 56 : int ecode2 = 0 ;
30638 56 : PyObject *swig_obj[2] ;
30639 :
30640 56 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SetCoordinateDimension", 2, 2, swig_obj)) SWIG_fail;
30641 56 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30642 56 : if (!SWIG_IsOK(res1)) {
30643 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30644 : }
30645 56 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30646 56 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
30647 56 : if (!SWIG_IsOK(ecode2)) {
30648 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetCoordinateDimension" "', argument " "2"" of type '" "int""'");
30649 : }
30650 56 : arg2 = static_cast< int >(val2);
30651 56 : {
30652 56 : const int bLocalUseExceptions = GetUseExceptions();
30653 56 : if ( bLocalUseExceptions ) {
30654 0 : pushErrorHandler();
30655 : }
30656 56 : {
30657 56 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30658 56 : OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
30659 56 : SWIG_PYTHON_THREAD_END_ALLOW;
30660 : }
30661 56 : if ( bLocalUseExceptions ) {
30662 0 : popErrorHandler();
30663 : }
30664 : #ifndef SED_HACKS
30665 : if ( bLocalUseExceptions ) {
30666 : CPLErr eclass = CPLGetLastErrorType();
30667 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30668 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30669 : }
30670 : }
30671 : #endif
30672 : }
30673 56 : resultobj = SWIG_Py_Void();
30674 56 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30675 : return resultobj;
30676 : fail:
30677 : return NULL;
30678 : }
30679 :
30680 :
30681 154 : SWIGINTERN PyObject *_wrap_Geometry_Set3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30682 154 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30683 154 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30684 154 : int arg2 ;
30685 154 : void *argp1 = 0 ;
30686 154 : int res1 = 0 ;
30687 154 : int val2 ;
30688 154 : int ecode2 = 0 ;
30689 154 : PyObject *swig_obj[2] ;
30690 :
30691 154 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Set3D", 2, 2, swig_obj)) SWIG_fail;
30692 154 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30693 154 : if (!SWIG_IsOK(res1)) {
30694 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Set3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30695 : }
30696 154 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30697 154 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
30698 154 : if (!SWIG_IsOK(ecode2)) {
30699 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Set3D" "', argument " "2"" of type '" "int""'");
30700 : }
30701 154 : arg2 = static_cast< int >(val2);
30702 154 : {
30703 154 : const int bLocalUseExceptions = GetUseExceptions();
30704 154 : if ( bLocalUseExceptions ) {
30705 0 : pushErrorHandler();
30706 : }
30707 154 : {
30708 154 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30709 154 : OGRGeometryShadow_Set3D(arg1,arg2);
30710 154 : SWIG_PYTHON_THREAD_END_ALLOW;
30711 : }
30712 154 : if ( bLocalUseExceptions ) {
30713 0 : popErrorHandler();
30714 : }
30715 : #ifndef SED_HACKS
30716 : if ( bLocalUseExceptions ) {
30717 : CPLErr eclass = CPLGetLastErrorType();
30718 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30719 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30720 : }
30721 : }
30722 : #endif
30723 : }
30724 154 : resultobj = SWIG_Py_Void();
30725 154 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30726 : return resultobj;
30727 : fail:
30728 : return NULL;
30729 : }
30730 :
30731 :
30732 154 : SWIGINTERN PyObject *_wrap_Geometry_SetMeasured(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30733 154 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30734 154 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30735 154 : int arg2 ;
30736 154 : void *argp1 = 0 ;
30737 154 : int res1 = 0 ;
30738 154 : int val2 ;
30739 154 : int ecode2 = 0 ;
30740 154 : PyObject *swig_obj[2] ;
30741 :
30742 154 : if (!SWIG_Python_UnpackTuple(args, "Geometry_SetMeasured", 2, 2, swig_obj)) SWIG_fail;
30743 154 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30744 154 : if (!SWIG_IsOK(res1)) {
30745 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetMeasured" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30746 : }
30747 154 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30748 154 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
30749 154 : if (!SWIG_IsOK(ecode2)) {
30750 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetMeasured" "', argument " "2"" of type '" "int""'");
30751 : }
30752 154 : arg2 = static_cast< int >(val2);
30753 154 : {
30754 154 : const int bLocalUseExceptions = GetUseExceptions();
30755 154 : if ( bLocalUseExceptions ) {
30756 0 : pushErrorHandler();
30757 : }
30758 154 : {
30759 154 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30760 154 : OGRGeometryShadow_SetMeasured(arg1,arg2);
30761 154 : SWIG_PYTHON_THREAD_END_ALLOW;
30762 : }
30763 154 : if ( bLocalUseExceptions ) {
30764 0 : popErrorHandler();
30765 : }
30766 : #ifndef SED_HACKS
30767 : if ( bLocalUseExceptions ) {
30768 : CPLErr eclass = CPLGetLastErrorType();
30769 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30770 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30771 : }
30772 : }
30773 : #endif
30774 : }
30775 154 : resultobj = SWIG_Py_Void();
30776 154 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30777 : return resultobj;
30778 : fail:
30779 : return NULL;
30780 : }
30781 :
30782 :
30783 21 : SWIGINTERN PyObject *_wrap_Geometry_GetDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30784 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30785 21 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30786 21 : void *argp1 = 0 ;
30787 21 : int res1 = 0 ;
30788 21 : PyObject *swig_obj[1] ;
30789 21 : int result;
30790 :
30791 21 : if (!args) SWIG_fail;
30792 21 : swig_obj[0] = args;
30793 21 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30794 21 : if (!SWIG_IsOK(res1)) {
30795 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30796 : }
30797 21 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30798 21 : {
30799 21 : const int bLocalUseExceptions = GetUseExceptions();
30800 21 : if ( bLocalUseExceptions ) {
30801 0 : pushErrorHandler();
30802 : }
30803 21 : {
30804 21 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30805 21 : result = (int)OGRGeometryShadow_GetDimension(arg1);
30806 21 : SWIG_PYTHON_THREAD_END_ALLOW;
30807 : }
30808 21 : if ( bLocalUseExceptions ) {
30809 0 : popErrorHandler();
30810 : }
30811 : #ifndef SED_HACKS
30812 : if ( bLocalUseExceptions ) {
30813 : CPLErr eclass = CPLGetLastErrorType();
30814 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30815 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30816 : }
30817 : }
30818 : #endif
30819 : }
30820 21 : resultobj = SWIG_From_int(static_cast< int >(result));
30821 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30822 : return resultobj;
30823 : fail:
30824 : return NULL;
30825 : }
30826 :
30827 :
30828 29 : SWIGINTERN PyObject *_wrap_Geometry_HasCurveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30829 29 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30830 29 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30831 29 : int arg2 = (int) FALSE ;
30832 29 : void *argp1 = 0 ;
30833 29 : int res1 = 0 ;
30834 29 : int val2 ;
30835 29 : int ecode2 = 0 ;
30836 29 : PyObject *swig_obj[2] ;
30837 29 : int result;
30838 :
30839 29 : if (!SWIG_Python_UnpackTuple(args, "Geometry_HasCurveGeometry", 1, 2, swig_obj)) SWIG_fail;
30840 29 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30841 29 : if (!SWIG_IsOK(res1)) {
30842 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_HasCurveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30843 : }
30844 29 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30845 29 : if (swig_obj[1]) {
30846 12 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
30847 12 : if (!SWIG_IsOK(ecode2)) {
30848 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_HasCurveGeometry" "', argument " "2"" of type '" "int""'");
30849 : }
30850 : arg2 = static_cast< int >(val2);
30851 : }
30852 29 : {
30853 29 : const int bLocalUseExceptions = GetUseExceptions();
30854 29 : if ( bLocalUseExceptions ) {
30855 0 : pushErrorHandler();
30856 : }
30857 29 : {
30858 29 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30859 29 : result = (int)OGRGeometryShadow_HasCurveGeometry(arg1,arg2);
30860 29 : SWIG_PYTHON_THREAD_END_ALLOW;
30861 : }
30862 29 : if ( bLocalUseExceptions ) {
30863 0 : popErrorHandler();
30864 : }
30865 : #ifndef SED_HACKS
30866 : if ( bLocalUseExceptions ) {
30867 : CPLErr eclass = CPLGetLastErrorType();
30868 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30869 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30870 : }
30871 : }
30872 : #endif
30873 : }
30874 29 : resultobj = SWIG_From_int(static_cast< int >(result));
30875 29 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30876 : return resultobj;
30877 : fail:
30878 : return NULL;
30879 : }
30880 :
30881 :
30882 3086 : SWIGINTERN PyObject *_wrap_Geometry_GetLinearGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
30883 3086 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30884 3086 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30885 3086 : double arg2 = (double) 0.0 ;
30886 3086 : char **arg3 = (char **) NULL ;
30887 3086 : void *argp1 = 0 ;
30888 3086 : int res1 = 0 ;
30889 3086 : double val2 ;
30890 3086 : int ecode2 = 0 ;
30891 3086 : PyObject * obj0 = 0 ;
30892 3086 : PyObject * obj1 = 0 ;
30893 3086 : PyObject * obj2 = 0 ;
30894 3086 : char * kwnames[] = {
30895 : (char *)"self", (char *)"dfMaxAngleStepSizeDegrees", (char *)"options", NULL
30896 : };
30897 3086 : OGRGeometryShadow *result = 0 ;
30898 :
30899 3086 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Geometry_GetLinearGeometry", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
30900 3086 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30901 3086 : if (!SWIG_IsOK(res1)) {
30902 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetLinearGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30903 : }
30904 3086 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30905 3086 : if (obj1) {
30906 17 : ecode2 = SWIG_AsVal_double(obj1, &val2);
30907 17 : if (!SWIG_IsOK(ecode2)) {
30908 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetLinearGeometry" "', argument " "2"" of type '" "double""'");
30909 : }
30910 17 : arg2 = static_cast< double >(val2);
30911 : }
30912 3086 : if (obj2) {
30913 4 : {
30914 : /* %typemap(in) char **dict */
30915 4 : arg3 = NULL;
30916 4 : if ( PySequence_Check( obj2 ) ) {
30917 4 : int bErr = FALSE;
30918 4 : arg3 = CSLFromPySequence(obj2, &bErr);
30919 4 : if ( bErr )
30920 : {
30921 0 : SWIG_fail;
30922 : }
30923 : }
30924 0 : else if ( PyMapping_Check( obj2 ) ) {
30925 0 : int bErr = FALSE;
30926 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
30927 0 : if ( bErr )
30928 : {
30929 0 : SWIG_fail;
30930 : }
30931 : }
30932 : else {
30933 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
30934 0 : SWIG_fail;
30935 : }
30936 : }
30937 : }
30938 3086 : {
30939 3086 : const int bLocalUseExceptions = GetUseExceptions();
30940 3086 : if ( bLocalUseExceptions ) {
30941 0 : pushErrorHandler();
30942 : }
30943 3086 : {
30944 3086 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
30945 3086 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetLinearGeometry(arg1,arg2,arg3);
30946 3086 : SWIG_PYTHON_THREAD_END_ALLOW;
30947 : }
30948 3086 : if ( bLocalUseExceptions ) {
30949 0 : popErrorHandler();
30950 : }
30951 : #ifndef SED_HACKS
30952 : if ( bLocalUseExceptions ) {
30953 : CPLErr eclass = CPLGetLastErrorType();
30954 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
30955 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
30956 : }
30957 : }
30958 : #endif
30959 : }
30960 3086 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
30961 3086 : {
30962 : /* %typemap(freearg) char **dict */
30963 3086 : CSLDestroy( arg3 );
30964 : }
30965 3086 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
30966 : return resultobj;
30967 0 : fail:
30968 0 : {
30969 : /* %typemap(freearg) char **dict */
30970 0 : CSLDestroy( arg3 );
30971 : }
30972 : return NULL;
30973 : }
30974 :
30975 :
30976 3062 : SWIGINTERN PyObject *_wrap_Geometry_GetCurveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
30977 3062 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
30978 3062 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
30979 3062 : char **arg2 = (char **) NULL ;
30980 3062 : void *argp1 = 0 ;
30981 3062 : int res1 = 0 ;
30982 3062 : PyObject * obj0 = 0 ;
30983 3062 : PyObject * obj1 = 0 ;
30984 3062 : char * kwnames[] = {
30985 : (char *)"self", (char *)"options", NULL
30986 : };
30987 3062 : OGRGeometryShadow *result = 0 ;
30988 :
30989 3062 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetCurveGeometry", kwnames, &obj0, &obj1)) SWIG_fail;
30990 3062 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
30991 3062 : if (!SWIG_IsOK(res1)) {
30992 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCurveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
30993 : }
30994 3062 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
30995 3062 : if (obj1) {
30996 0 : {
30997 : /* %typemap(in) char **dict */
30998 0 : arg2 = NULL;
30999 0 : if ( PySequence_Check( obj1 ) ) {
31000 0 : int bErr = FALSE;
31001 0 : arg2 = CSLFromPySequence(obj1, &bErr);
31002 0 : if ( bErr )
31003 : {
31004 0 : SWIG_fail;
31005 : }
31006 : }
31007 0 : else if ( PyMapping_Check( obj1 ) ) {
31008 0 : int bErr = FALSE;
31009 0 : arg2 = CSLFromPyMapping(obj1, &bErr);
31010 0 : if ( bErr )
31011 : {
31012 0 : SWIG_fail;
31013 : }
31014 : }
31015 : else {
31016 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
31017 0 : SWIG_fail;
31018 : }
31019 : }
31020 : }
31021 3062 : {
31022 3062 : const int bLocalUseExceptions = GetUseExceptions();
31023 3062 : if ( bLocalUseExceptions ) {
31024 0 : pushErrorHandler();
31025 : }
31026 3062 : {
31027 3062 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31028 3062 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetCurveGeometry(arg1,arg2);
31029 3062 : SWIG_PYTHON_THREAD_END_ALLOW;
31030 : }
31031 3062 : if ( bLocalUseExceptions ) {
31032 0 : popErrorHandler();
31033 : }
31034 : #ifndef SED_HACKS
31035 : if ( bLocalUseExceptions ) {
31036 : CPLErr eclass = CPLGetLastErrorType();
31037 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31038 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31039 : }
31040 : }
31041 : #endif
31042 : }
31043 3062 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
31044 3062 : {
31045 : /* %typemap(freearg) char **dict */
31046 3062 : CSLDestroy( arg2 );
31047 : }
31048 3062 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31049 : return resultobj;
31050 0 : fail:
31051 0 : {
31052 : /* %typemap(freearg) char **dict */
31053 0 : CSLDestroy( arg2 );
31054 : }
31055 : return NULL;
31056 : }
31057 :
31058 :
31059 22 : SWIGINTERN PyObject *_wrap_Geometry_Value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31060 22 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31061 22 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31062 22 : double arg2 ;
31063 22 : void *argp1 = 0 ;
31064 22 : int res1 = 0 ;
31065 22 : double val2 ;
31066 22 : int ecode2 = 0 ;
31067 22 : PyObject *swig_obj[2] ;
31068 22 : OGRGeometryShadow *result = 0 ;
31069 :
31070 22 : if (!SWIG_Python_UnpackTuple(args, "Geometry_Value", 2, 2, swig_obj)) SWIG_fail;
31071 22 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31072 22 : if (!SWIG_IsOK(res1)) {
31073 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Value" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31074 : }
31075 22 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31076 22 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
31077 22 : if (!SWIG_IsOK(ecode2)) {
31078 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Value" "', argument " "2"" of type '" "double""'");
31079 : }
31080 22 : arg2 = static_cast< double >(val2);
31081 22 : {
31082 22 : const int bLocalUseExceptions = GetUseExceptions();
31083 22 : if ( bLocalUseExceptions ) {
31084 0 : pushErrorHandler();
31085 : }
31086 22 : {
31087 22 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31088 22 : result = (OGRGeometryShadow *)OGRGeometryShadow_Value(arg1,arg2);
31089 22 : SWIG_PYTHON_THREAD_END_ALLOW;
31090 : }
31091 22 : if ( bLocalUseExceptions ) {
31092 0 : popErrorHandler();
31093 : }
31094 : #ifndef SED_HACKS
31095 : if ( bLocalUseExceptions ) {
31096 : CPLErr eclass = CPLGetLastErrorType();
31097 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31098 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31099 : }
31100 : }
31101 : #endif
31102 : }
31103 22 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
31104 22 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31105 : return resultobj;
31106 : fail:
31107 : return NULL;
31108 : }
31109 :
31110 :
31111 : SWIGINTERN PyObject *_wrap_Geometry_Transform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
31112 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31113 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31114 : OGRGeomTransformerShadow *arg2 = (OGRGeomTransformerShadow *) 0 ;
31115 : void *argp1 = 0 ;
31116 : int res1 = 0 ;
31117 : void *argp2 = 0 ;
31118 : int res2 = 0 ;
31119 : OGRGeometryShadow *result = 0 ;
31120 :
31121 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
31122 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31123 : if (!SWIG_IsOK(res1)) {
31124 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31125 : }
31126 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31127 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomTransformerShadow, 0 | 0 );
31128 : if (!SWIG_IsOK(res2)) {
31129 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OGRGeomTransformerShadow *""'");
31130 : }
31131 : arg2 = reinterpret_cast< OGRGeomTransformerShadow * >(argp2);
31132 : {
31133 : if (!arg2) {
31134 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
31135 : }
31136 : }
31137 : {
31138 : const int bLocalUseExceptions = GetUseExceptions();
31139 : if ( bLocalUseExceptions ) {
31140 : pushErrorHandler();
31141 : }
31142 : {
31143 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31144 : result = (OGRGeometryShadow *)OGRGeometryShadow_Transform__SWIG_1(arg1,arg2);
31145 : SWIG_PYTHON_THREAD_END_ALLOW;
31146 : }
31147 : if ( bLocalUseExceptions ) {
31148 : popErrorHandler();
31149 : }
31150 : #ifndef SED_HACKS
31151 : if ( bLocalUseExceptions ) {
31152 : CPLErr eclass = CPLGetLastErrorType();
31153 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31154 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31155 : }
31156 : }
31157 : #endif
31158 : }
31159 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
31160 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31161 : return resultobj;
31162 : fail:
31163 : return NULL;
31164 : }
31165 :
31166 :
31167 7 : SWIGINTERN PyObject *_wrap_Geometry_Transform(PyObject *self, PyObject *args) {
31168 7 : Py_ssize_t argc;
31169 7 : PyObject *argv[3] = {
31170 : 0
31171 : };
31172 :
31173 7 : if (!(argc = SWIG_Python_UnpackTuple(args, "Geometry_Transform", 0, 2, argv))) SWIG_fail;
31174 7 : --argc;
31175 7 : if (argc == 2) {
31176 7 : int _v;
31177 7 : void *vptr = 0;
31178 7 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
31179 11 : _v = SWIG_CheckState(res);
31180 7 : if (_v) {
31181 7 : void *vptr = 0;
31182 7 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
31183 7 : _v = SWIG_CheckState(res);
31184 4 : if (_v) {
31185 3 : return _wrap_Geometry_Transform__SWIG_0(self, argc, argv);
31186 : }
31187 : }
31188 : }
31189 4 : if (argc == 2) {
31190 4 : int _v;
31191 4 : void *vptr = 0;
31192 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
31193 4 : _v = SWIG_CheckState(res);
31194 4 : if (_v) {
31195 4 : void *vptr = 0;
31196 4 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OGRGeomTransformerShadow, 0);
31197 4 : _v = SWIG_CheckState(res);
31198 0 : if (_v) {
31199 4 : return _wrap_Geometry_Transform__SWIG_1(self, argc, argv);
31200 : }
31201 : }
31202 : }
31203 :
31204 0 : fail:
31205 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Geometry_Transform'.\n"
31206 : " Possible C/C++ prototypes are:\n"
31207 : " OGRGeometryShadow::Transform(OSRCoordinateTransformationShadow *)\n"
31208 : " OGRGeometryShadow::Transform(OGRGeomTransformerShadow *)\n");
31209 : return 0;
31210 : }
31211 :
31212 :
31213 1 : SWIGINTERN PyObject *_wrap_Geometry_CreatePreparedGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31214 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31215 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
31216 1 : void *argp1 = 0 ;
31217 1 : int res1 = 0 ;
31218 1 : PyObject *swig_obj[1] ;
31219 1 : OGRPreparedGeometryShadow *result = 0 ;
31220 :
31221 1 : if (!args) SWIG_fail;
31222 1 : swig_obj[0] = args;
31223 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31224 1 : if (!SWIG_IsOK(res1)) {
31225 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CreatePreparedGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
31226 : }
31227 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
31228 1 : {
31229 1 : const int bLocalUseExceptions = GetUseExceptions();
31230 1 : if ( bLocalUseExceptions ) {
31231 1 : pushErrorHandler();
31232 : }
31233 1 : {
31234 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31235 1 : result = (OGRPreparedGeometryShadow *)OGRGeometryShadow_CreatePreparedGeometry(arg1);
31236 1 : SWIG_PYTHON_THREAD_END_ALLOW;
31237 : }
31238 1 : if ( bLocalUseExceptions ) {
31239 1 : popErrorHandler();
31240 : }
31241 : #ifndef SED_HACKS
31242 : if ( bLocalUseExceptions ) {
31243 : CPLErr eclass = CPLGetLastErrorType();
31244 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31245 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31246 : }
31247 : }
31248 : #endif
31249 : }
31250 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_POINTER_OWN | 0 );
31251 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31252 : return resultobj;
31253 : fail:
31254 : return NULL;
31255 : }
31256 :
31257 :
31258 271 : SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31259 271 : PyObject *obj;
31260 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
31261 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeometryShadow, SWIG_NewClientData(obj));
31262 271 : return SWIG_Py_Void();
31263 : }
31264 :
31265 160788 : SWIGINTERN PyObject *Geometry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31266 160788 : return SWIG_Python_InitShadowInstance(args);
31267 : }
31268 :
31269 1 : SWIGINTERN PyObject *_wrap_delete_PreparedGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31270 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31271 1 : OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
31272 1 : void *argp1 = 0 ;
31273 1 : int res1 = 0 ;
31274 1 : PyObject *swig_obj[1] ;
31275 :
31276 1 : if (!args) SWIG_fail;
31277 1 : swig_obj[0] = args;
31278 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_POINTER_DISOWN | 0 );
31279 1 : if (!SWIG_IsOK(res1)) {
31280 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PreparedGeometry" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'");
31281 : }
31282 1 : arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
31283 1 : {
31284 1 : const int bLocalUseExceptions = GetUseExceptions();
31285 1 : if ( bLocalUseExceptions ) {
31286 1 : pushErrorHandler();
31287 : }
31288 1 : {
31289 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31290 1 : delete_OGRPreparedGeometryShadow(arg1);
31291 1 : SWIG_PYTHON_THREAD_END_ALLOW;
31292 : }
31293 1 : if ( bLocalUseExceptions ) {
31294 1 : popErrorHandler();
31295 : }
31296 : #ifndef SED_HACKS
31297 : if ( bLocalUseExceptions ) {
31298 : CPLErr eclass = CPLGetLastErrorType();
31299 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31300 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31301 : }
31302 : }
31303 : #endif
31304 : }
31305 1 : resultobj = SWIG_Py_Void();
31306 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31307 : return resultobj;
31308 : fail:
31309 : return NULL;
31310 : }
31311 :
31312 :
31313 3 : SWIGINTERN PyObject *_wrap_PreparedGeometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31314 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31315 3 : OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
31316 3 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
31317 3 : void *argp1 = 0 ;
31318 3 : int res1 = 0 ;
31319 3 : void *argp2 = 0 ;
31320 3 : int res2 = 0 ;
31321 3 : PyObject *swig_obj[2] ;
31322 3 : bool result;
31323 :
31324 3 : if (!SWIG_Python_UnpackTuple(args, "PreparedGeometry_Intersects", 2, 2, swig_obj)) SWIG_fail;
31325 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, 0 | 0 );
31326 3 : if (!SWIG_IsOK(res1)) {
31327 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreparedGeometry_Intersects" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'");
31328 : }
31329 3 : arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
31330 3 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31331 3 : if (!SWIG_IsOK(res2)) {
31332 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreparedGeometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow const *""'");
31333 : }
31334 3 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
31335 3 : {
31336 3 : if (!arg2) {
31337 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
31338 : }
31339 : }
31340 3 : {
31341 3 : const int bLocalUseExceptions = GetUseExceptions();
31342 3 : if ( bLocalUseExceptions ) {
31343 3 : pushErrorHandler();
31344 : }
31345 3 : {
31346 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31347 3 : result = (bool)OGRPreparedGeometryShadow_Intersects(arg1,(OGRGeometryShadow const *)arg2);
31348 3 : SWIG_PYTHON_THREAD_END_ALLOW;
31349 : }
31350 3 : if ( bLocalUseExceptions ) {
31351 3 : popErrorHandler();
31352 : }
31353 : #ifndef SED_HACKS
31354 : if ( bLocalUseExceptions ) {
31355 : CPLErr eclass = CPLGetLastErrorType();
31356 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31357 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31358 : }
31359 : }
31360 : #endif
31361 : }
31362 3 : resultobj = SWIG_From_bool(static_cast< bool >(result));
31363 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31364 : return resultobj;
31365 : fail:
31366 : return NULL;
31367 : }
31368 :
31369 :
31370 3 : SWIGINTERN PyObject *_wrap_PreparedGeometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31371 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31372 3 : OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
31373 3 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
31374 3 : void *argp1 = 0 ;
31375 3 : int res1 = 0 ;
31376 3 : void *argp2 = 0 ;
31377 3 : int res2 = 0 ;
31378 3 : PyObject *swig_obj[2] ;
31379 3 : bool result;
31380 :
31381 3 : if (!SWIG_Python_UnpackTuple(args, "PreparedGeometry_Contains", 2, 2, swig_obj)) SWIG_fail;
31382 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, 0 | 0 );
31383 3 : if (!SWIG_IsOK(res1)) {
31384 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreparedGeometry_Contains" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'");
31385 : }
31386 3 : arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
31387 3 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31388 3 : if (!SWIG_IsOK(res2)) {
31389 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreparedGeometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow const *""'");
31390 : }
31391 3 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
31392 3 : {
31393 3 : if (!arg2) {
31394 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
31395 : }
31396 : }
31397 3 : {
31398 3 : const int bLocalUseExceptions = GetUseExceptions();
31399 3 : if ( bLocalUseExceptions ) {
31400 3 : pushErrorHandler();
31401 : }
31402 3 : {
31403 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31404 3 : result = (bool)OGRPreparedGeometryShadow_Contains(arg1,(OGRGeometryShadow const *)arg2);
31405 3 : SWIG_PYTHON_THREAD_END_ALLOW;
31406 : }
31407 3 : if ( bLocalUseExceptions ) {
31408 3 : popErrorHandler();
31409 : }
31410 : #ifndef SED_HACKS
31411 : if ( bLocalUseExceptions ) {
31412 : CPLErr eclass = CPLGetLastErrorType();
31413 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31414 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31415 : }
31416 : }
31417 : #endif
31418 : }
31419 3 : resultobj = SWIG_From_bool(static_cast< bool >(result));
31420 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31421 : return resultobj;
31422 : fail:
31423 : return NULL;
31424 : }
31425 :
31426 :
31427 271 : SWIGINTERN PyObject *PreparedGeometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31428 271 : PyObject *obj;
31429 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
31430 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_NewClientData(obj));
31431 271 : return SWIG_Py_Void();
31432 : }
31433 :
31434 6 : SWIGINTERN PyObject *_wrap_new_GeomTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31435 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31436 6 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
31437 6 : char **arg2 = (char **) NULL ;
31438 6 : void *argp1 = 0 ;
31439 6 : int res1 = 0 ;
31440 6 : PyObject *swig_obj[2] ;
31441 6 : OGRGeomTransformerShadow *result = 0 ;
31442 :
31443 6 : if (!SWIG_Python_UnpackTuple(args, "new_GeomTransformer", 1, 2, swig_obj)) SWIG_fail;
31444 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
31445 6 : if (!SWIG_IsOK(res1)) {
31446 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GeomTransformer" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
31447 : }
31448 6 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
31449 6 : if (swig_obj[1]) {
31450 4 : {
31451 : /* %typemap(in) char **dict */
31452 4 : arg2 = NULL;
31453 4 : if ( PySequence_Check( swig_obj[1] ) ) {
31454 4 : int bErr = FALSE;
31455 4 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
31456 4 : if ( bErr )
31457 : {
31458 0 : SWIG_fail;
31459 : }
31460 : }
31461 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
31462 0 : int bErr = FALSE;
31463 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
31464 0 : if ( bErr )
31465 : {
31466 0 : SWIG_fail;
31467 : }
31468 : }
31469 : else {
31470 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
31471 0 : SWIG_fail;
31472 : }
31473 : }
31474 : }
31475 6 : {
31476 6 : const int bLocalUseExceptions = GetUseExceptions();
31477 6 : if ( bLocalUseExceptions ) {
31478 0 : pushErrorHandler();
31479 : }
31480 6 : {
31481 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31482 6 : result = (OGRGeomTransformerShadow *)new_OGRGeomTransformerShadow(arg1,arg2);
31483 6 : SWIG_PYTHON_THREAD_END_ALLOW;
31484 : }
31485 6 : if ( bLocalUseExceptions ) {
31486 0 : popErrorHandler();
31487 : }
31488 : #ifndef SED_HACKS
31489 : if ( bLocalUseExceptions ) {
31490 : CPLErr eclass = CPLGetLastErrorType();
31491 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31492 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31493 : }
31494 : }
31495 : #endif
31496 : }
31497 6 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_POINTER_NEW | 0 );
31498 6 : {
31499 : /* %typemap(freearg) char **dict */
31500 6 : CSLDestroy( arg2 );
31501 : }
31502 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31503 : return resultobj;
31504 0 : fail:
31505 0 : {
31506 : /* %typemap(freearg) char **dict */
31507 0 : CSLDestroy( arg2 );
31508 : }
31509 : return NULL;
31510 : }
31511 :
31512 :
31513 6 : SWIGINTERN PyObject *_wrap_delete_GeomTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31514 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31515 6 : OGRGeomTransformerShadow *arg1 = (OGRGeomTransformerShadow *) 0 ;
31516 6 : void *argp1 = 0 ;
31517 6 : int res1 = 0 ;
31518 6 : PyObject *swig_obj[1] ;
31519 :
31520 6 : if (!args) SWIG_fail;
31521 6 : swig_obj[0] = args;
31522 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_POINTER_DISOWN | 0 );
31523 6 : if (!SWIG_IsOK(res1)) {
31524 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomTransformer" "', argument " "1"" of type '" "OGRGeomTransformerShadow *""'");
31525 : }
31526 6 : arg1 = reinterpret_cast< OGRGeomTransformerShadow * >(argp1);
31527 6 : {
31528 6 : const int bLocalUseExceptions = GetUseExceptions();
31529 6 : if ( bLocalUseExceptions ) {
31530 0 : pushErrorHandler();
31531 : }
31532 6 : {
31533 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31534 6 : delete_OGRGeomTransformerShadow(arg1);
31535 6 : SWIG_PYTHON_THREAD_END_ALLOW;
31536 : }
31537 6 : if ( bLocalUseExceptions ) {
31538 0 : popErrorHandler();
31539 : }
31540 : #ifndef SED_HACKS
31541 : if ( bLocalUseExceptions ) {
31542 : CPLErr eclass = CPLGetLastErrorType();
31543 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31544 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31545 : }
31546 : }
31547 : #endif
31548 : }
31549 6 : resultobj = SWIG_Py_Void();
31550 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31551 : return resultobj;
31552 : fail:
31553 : return NULL;
31554 : }
31555 :
31556 :
31557 2 : SWIGINTERN PyObject *_wrap_GeomTransformer_Transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31558 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31559 2 : OGRGeomTransformerShadow *arg1 = (OGRGeomTransformerShadow *) 0 ;
31560 2 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
31561 2 : void *argp1 = 0 ;
31562 2 : int res1 = 0 ;
31563 2 : void *argp2 = 0 ;
31564 2 : int res2 = 0 ;
31565 2 : PyObject *swig_obj[2] ;
31566 2 : OGRGeometryShadow *result = 0 ;
31567 :
31568 2 : if (!SWIG_Python_UnpackTuple(args, "GeomTransformer_Transform", 2, 2, swig_obj)) SWIG_fail;
31569 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomTransformerShadow, 0 | 0 );
31570 2 : if (!SWIG_IsOK(res1)) {
31571 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomTransformer_Transform" "', argument " "1"" of type '" "OGRGeomTransformerShadow *""'");
31572 : }
31573 2 : arg1 = reinterpret_cast< OGRGeomTransformerShadow * >(argp1);
31574 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
31575 2 : if (!SWIG_IsOK(res2)) {
31576 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomTransformer_Transform" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
31577 : }
31578 2 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
31579 2 : {
31580 2 : if (!arg2) {
31581 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
31582 : }
31583 : }
31584 2 : {
31585 2 : const int bLocalUseExceptions = GetUseExceptions();
31586 2 : if ( bLocalUseExceptions ) {
31587 0 : pushErrorHandler();
31588 : }
31589 2 : {
31590 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31591 2 : result = (OGRGeometryShadow *)OGRGeomTransformerShadow_Transform(arg1,arg2);
31592 2 : SWIG_PYTHON_THREAD_END_ALLOW;
31593 : }
31594 2 : if ( bLocalUseExceptions ) {
31595 0 : popErrorHandler();
31596 : }
31597 : #ifndef SED_HACKS
31598 : if ( bLocalUseExceptions ) {
31599 : CPLErr eclass = CPLGetLastErrorType();
31600 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31601 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31602 : }
31603 : }
31604 : #endif
31605 : }
31606 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
31607 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31608 : return resultobj;
31609 : fail:
31610 : return NULL;
31611 : }
31612 :
31613 :
31614 271 : SWIGINTERN PyObject *GeomTransformer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31615 271 : PyObject *obj;
31616 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
31617 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_NewClientData(obj));
31618 271 : return SWIG_Py_Void();
31619 : }
31620 :
31621 6 : SWIGINTERN PyObject *GeomTransformer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31622 6 : return SWIG_Python_InitShadowInstance(args);
31623 : }
31624 :
31625 44 : SWIGINTERN PyObject *_wrap_delete_FieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31626 44 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31627 44 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31628 44 : void *argp1 = 0 ;
31629 44 : int res1 = 0 ;
31630 44 : PyObject *swig_obj[1] ;
31631 :
31632 44 : if (!args) SWIG_fail;
31633 44 : swig_obj[0] = args;
31634 44 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_DISOWN | 0 );
31635 44 : if (!SWIG_IsOK(res1)) {
31636 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDomain" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
31637 : }
31638 44 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
31639 44 : {
31640 44 : const int bLocalUseExceptions = GetUseExceptions();
31641 44 : if ( bLocalUseExceptions ) {
31642 23 : pushErrorHandler();
31643 : }
31644 44 : {
31645 44 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31646 44 : delete_OGRFieldDomainShadow(arg1);
31647 44 : SWIG_PYTHON_THREAD_END_ALLOW;
31648 : }
31649 44 : if ( bLocalUseExceptions ) {
31650 23 : popErrorHandler();
31651 : }
31652 : #ifndef SED_HACKS
31653 : if ( bLocalUseExceptions ) {
31654 : CPLErr eclass = CPLGetLastErrorType();
31655 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31656 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31657 : }
31658 : }
31659 : #endif
31660 : }
31661 44 : resultobj = SWIG_Py_Void();
31662 44 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31663 : return resultobj;
31664 : fail:
31665 : return NULL;
31666 : }
31667 :
31668 :
31669 57 : SWIGINTERN PyObject *_wrap_FieldDomain_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31670 57 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31671 57 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31672 57 : void *argp1 = 0 ;
31673 57 : int res1 = 0 ;
31674 57 : PyObject *swig_obj[1] ;
31675 57 : char *result = 0 ;
31676 :
31677 57 : if (!args) SWIG_fail;
31678 57 : swig_obj[0] = args;
31679 57 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
31680 57 : if (!SWIG_IsOK(res1)) {
31681 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetName" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
31682 : }
31683 57 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
31684 57 : {
31685 57 : const int bLocalUseExceptions = GetUseExceptions();
31686 57 : if ( bLocalUseExceptions ) {
31687 45 : pushErrorHandler();
31688 : }
31689 57 : {
31690 57 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31691 57 : result = (char *)OGRFieldDomainShadow_GetName(arg1);
31692 57 : SWIG_PYTHON_THREAD_END_ALLOW;
31693 : }
31694 57 : if ( bLocalUseExceptions ) {
31695 45 : popErrorHandler();
31696 : }
31697 : #ifndef SED_HACKS
31698 : if ( bLocalUseExceptions ) {
31699 : CPLErr eclass = CPLGetLastErrorType();
31700 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31701 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31702 : }
31703 : }
31704 : #endif
31705 : }
31706 57 : resultobj = SWIG_FromCharPtr((const char *)result);
31707 57 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31708 : return resultobj;
31709 : fail:
31710 : return NULL;
31711 : }
31712 :
31713 :
31714 61 : SWIGINTERN PyObject *_wrap_FieldDomain_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31715 61 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31716 61 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31717 61 : void *argp1 = 0 ;
31718 61 : int res1 = 0 ;
31719 61 : PyObject *swig_obj[1] ;
31720 61 : char *result = 0 ;
31721 :
31722 61 : if (!args) SWIG_fail;
31723 61 : swig_obj[0] = args;
31724 61 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
31725 61 : if (!SWIG_IsOK(res1)) {
31726 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetDescription" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
31727 : }
31728 61 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
31729 61 : {
31730 61 : const int bLocalUseExceptions = GetUseExceptions();
31731 61 : if ( bLocalUseExceptions ) {
31732 47 : pushErrorHandler();
31733 : }
31734 61 : {
31735 61 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31736 61 : result = (char *)OGRFieldDomainShadow_GetDescription(arg1);
31737 61 : SWIG_PYTHON_THREAD_END_ALLOW;
31738 : }
31739 61 : if ( bLocalUseExceptions ) {
31740 47 : popErrorHandler();
31741 : }
31742 : #ifndef SED_HACKS
31743 : if ( bLocalUseExceptions ) {
31744 : CPLErr eclass = CPLGetLastErrorType();
31745 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31746 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31747 : }
31748 : }
31749 : #endif
31750 : }
31751 61 : resultobj = SWIG_FromCharPtr((const char *)result);
31752 61 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31753 : return resultobj;
31754 : fail:
31755 : return NULL;
31756 : }
31757 :
31758 :
31759 60 : SWIGINTERN PyObject *_wrap_FieldDomain_GetFieldType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31760 60 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31761 60 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31762 60 : void *argp1 = 0 ;
31763 60 : int res1 = 0 ;
31764 60 : PyObject *swig_obj[1] ;
31765 60 : OGRFieldType result;
31766 :
31767 60 : if (!args) SWIG_fail;
31768 60 : swig_obj[0] = args;
31769 60 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
31770 60 : if (!SWIG_IsOK(res1)) {
31771 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetFieldType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
31772 : }
31773 60 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
31774 60 : {
31775 60 : const int bLocalUseExceptions = GetUseExceptions();
31776 60 : if ( bLocalUseExceptions ) {
31777 39 : pushErrorHandler();
31778 : }
31779 60 : {
31780 60 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31781 60 : result = (OGRFieldType)OGRFieldDomainShadow_GetFieldType(arg1);
31782 60 : SWIG_PYTHON_THREAD_END_ALLOW;
31783 : }
31784 60 : if ( bLocalUseExceptions ) {
31785 39 : popErrorHandler();
31786 : }
31787 : #ifndef SED_HACKS
31788 : if ( bLocalUseExceptions ) {
31789 : CPLErr eclass = CPLGetLastErrorType();
31790 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31791 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31792 : }
31793 : }
31794 : #endif
31795 : }
31796 60 : resultobj = SWIG_From_int(static_cast< int >(result));
31797 60 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31798 : return resultobj;
31799 : fail:
31800 : return NULL;
31801 : }
31802 :
31803 :
31804 40 : SWIGINTERN PyObject *_wrap_FieldDomain_GetFieldSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31805 40 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31806 40 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31807 40 : void *argp1 = 0 ;
31808 40 : int res1 = 0 ;
31809 40 : PyObject *swig_obj[1] ;
31810 40 : OGRFieldSubType result;
31811 :
31812 40 : if (!args) SWIG_fail;
31813 40 : swig_obj[0] = args;
31814 40 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
31815 40 : if (!SWIG_IsOK(res1)) {
31816 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetFieldSubType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
31817 : }
31818 40 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
31819 40 : {
31820 40 : const int bLocalUseExceptions = GetUseExceptions();
31821 40 : if ( bLocalUseExceptions ) {
31822 35 : pushErrorHandler();
31823 : }
31824 40 : {
31825 40 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31826 40 : result = (OGRFieldSubType)OGRFieldDomainShadow_GetFieldSubType(arg1);
31827 40 : SWIG_PYTHON_THREAD_END_ALLOW;
31828 : }
31829 40 : if ( bLocalUseExceptions ) {
31830 35 : popErrorHandler();
31831 : }
31832 : #ifndef SED_HACKS
31833 : if ( bLocalUseExceptions ) {
31834 : CPLErr eclass = CPLGetLastErrorType();
31835 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31836 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31837 : }
31838 : }
31839 : #endif
31840 : }
31841 40 : resultobj = SWIG_From_int(static_cast< int >(result));
31842 40 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31843 : return resultobj;
31844 : fail:
31845 : return NULL;
31846 : }
31847 :
31848 :
31849 54 : SWIGINTERN PyObject *_wrap_FieldDomain_GetDomainType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31850 54 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31851 54 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31852 54 : void *argp1 = 0 ;
31853 54 : int res1 = 0 ;
31854 54 : PyObject *swig_obj[1] ;
31855 54 : OGRFieldDomainType result;
31856 :
31857 54 : if (!args) SWIG_fail;
31858 54 : swig_obj[0] = args;
31859 54 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
31860 54 : if (!SWIG_IsOK(res1)) {
31861 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetDomainType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
31862 : }
31863 54 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
31864 54 : {
31865 54 : const int bLocalUseExceptions = GetUseExceptions();
31866 54 : if ( bLocalUseExceptions ) {
31867 42 : pushErrorHandler();
31868 : }
31869 54 : {
31870 54 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31871 54 : result = (OGRFieldDomainType)OGRFieldDomainShadow_GetDomainType(arg1);
31872 54 : SWIG_PYTHON_THREAD_END_ALLOW;
31873 : }
31874 54 : if ( bLocalUseExceptions ) {
31875 42 : popErrorHandler();
31876 : }
31877 : #ifndef SED_HACKS
31878 : if ( bLocalUseExceptions ) {
31879 : CPLErr eclass = CPLGetLastErrorType();
31880 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31881 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31882 : }
31883 : }
31884 : #endif
31885 : }
31886 54 : resultobj = SWIG_From_int(static_cast< int >(result));
31887 54 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31888 : return resultobj;
31889 : fail:
31890 : return NULL;
31891 : }
31892 :
31893 :
31894 2 : SWIGINTERN PyObject *_wrap_FieldDomain_GetSplitPolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31895 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31896 2 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31897 2 : void *argp1 = 0 ;
31898 2 : int res1 = 0 ;
31899 2 : PyObject *swig_obj[1] ;
31900 2 : OGRFieldDomainSplitPolicy result;
31901 :
31902 2 : if (!args) SWIG_fail;
31903 2 : swig_obj[0] = args;
31904 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
31905 2 : if (!SWIG_IsOK(res1)) {
31906 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetSplitPolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
31907 : }
31908 2 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
31909 2 : {
31910 2 : const int bLocalUseExceptions = GetUseExceptions();
31911 2 : if ( bLocalUseExceptions ) {
31912 2 : pushErrorHandler();
31913 : }
31914 2 : {
31915 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31916 2 : result = (OGRFieldDomainSplitPolicy)OGRFieldDomainShadow_GetSplitPolicy(arg1);
31917 2 : SWIG_PYTHON_THREAD_END_ALLOW;
31918 : }
31919 2 : if ( bLocalUseExceptions ) {
31920 2 : popErrorHandler();
31921 : }
31922 : #ifndef SED_HACKS
31923 : if ( bLocalUseExceptions ) {
31924 : CPLErr eclass = CPLGetLastErrorType();
31925 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31926 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31927 : }
31928 : }
31929 : #endif
31930 : }
31931 2 : resultobj = SWIG_From_int(static_cast< int >(result));
31932 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31933 : return resultobj;
31934 : fail:
31935 : return NULL;
31936 : }
31937 :
31938 :
31939 1 : SWIGINTERN PyObject *_wrap_FieldDomain_SetSplitPolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31940 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31941 1 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31942 1 : OGRFieldDomainSplitPolicy arg2 ;
31943 1 : void *argp1 = 0 ;
31944 1 : int res1 = 0 ;
31945 1 : int val2 ;
31946 1 : int ecode2 = 0 ;
31947 1 : PyObject *swig_obj[2] ;
31948 :
31949 1 : if (!SWIG_Python_UnpackTuple(args, "FieldDomain_SetSplitPolicy", 2, 2, swig_obj)) SWIG_fail;
31950 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
31951 1 : if (!SWIG_IsOK(res1)) {
31952 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_SetSplitPolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
31953 : }
31954 1 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
31955 1 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
31956 1 : if (!SWIG_IsOK(ecode2)) {
31957 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDomain_SetSplitPolicy" "', argument " "2"" of type '" "OGRFieldDomainSplitPolicy""'");
31958 : }
31959 1 : arg2 = static_cast< OGRFieldDomainSplitPolicy >(val2);
31960 1 : {
31961 1 : const int bLocalUseExceptions = GetUseExceptions();
31962 1 : if ( bLocalUseExceptions ) {
31963 1 : pushErrorHandler();
31964 : }
31965 1 : {
31966 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
31967 1 : OGRFieldDomainShadow_SetSplitPolicy(arg1,arg2);
31968 1 : SWIG_PYTHON_THREAD_END_ALLOW;
31969 : }
31970 1 : if ( bLocalUseExceptions ) {
31971 1 : popErrorHandler();
31972 : }
31973 : #ifndef SED_HACKS
31974 : if ( bLocalUseExceptions ) {
31975 : CPLErr eclass = CPLGetLastErrorType();
31976 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
31977 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
31978 : }
31979 : }
31980 : #endif
31981 : }
31982 1 : resultobj = SWIG_Py_Void();
31983 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
31984 : return resultobj;
31985 : fail:
31986 : return NULL;
31987 : }
31988 :
31989 :
31990 2 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMergePolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31991 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
31992 2 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
31993 2 : void *argp1 = 0 ;
31994 2 : int res1 = 0 ;
31995 2 : PyObject *swig_obj[1] ;
31996 2 : OGRFieldDomainMergePolicy result;
31997 :
31998 2 : if (!args) SWIG_fail;
31999 2 : swig_obj[0] = args;
32000 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32001 2 : if (!SWIG_IsOK(res1)) {
32002 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMergePolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32003 : }
32004 2 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32005 2 : {
32006 2 : const int bLocalUseExceptions = GetUseExceptions();
32007 2 : if ( bLocalUseExceptions ) {
32008 2 : pushErrorHandler();
32009 : }
32010 2 : {
32011 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32012 2 : result = (OGRFieldDomainMergePolicy)OGRFieldDomainShadow_GetMergePolicy(arg1);
32013 2 : SWIG_PYTHON_THREAD_END_ALLOW;
32014 : }
32015 2 : if ( bLocalUseExceptions ) {
32016 2 : popErrorHandler();
32017 : }
32018 : #ifndef SED_HACKS
32019 : if ( bLocalUseExceptions ) {
32020 : CPLErr eclass = CPLGetLastErrorType();
32021 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32022 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32023 : }
32024 : }
32025 : #endif
32026 : }
32027 2 : resultobj = SWIG_From_int(static_cast< int >(result));
32028 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32029 : return resultobj;
32030 : fail:
32031 : return NULL;
32032 : }
32033 :
32034 :
32035 1 : SWIGINTERN PyObject *_wrap_FieldDomain_SetMergePolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32036 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32037 1 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32038 1 : OGRFieldDomainMergePolicy arg2 ;
32039 1 : void *argp1 = 0 ;
32040 1 : int res1 = 0 ;
32041 1 : int val2 ;
32042 1 : int ecode2 = 0 ;
32043 1 : PyObject *swig_obj[2] ;
32044 :
32045 1 : if (!SWIG_Python_UnpackTuple(args, "FieldDomain_SetMergePolicy", 2, 2, swig_obj)) SWIG_fail;
32046 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32047 1 : if (!SWIG_IsOK(res1)) {
32048 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_SetMergePolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32049 : }
32050 1 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32051 1 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
32052 1 : if (!SWIG_IsOK(ecode2)) {
32053 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDomain_SetMergePolicy" "', argument " "2"" of type '" "OGRFieldDomainMergePolicy""'");
32054 : }
32055 1 : arg2 = static_cast< OGRFieldDomainMergePolicy >(val2);
32056 1 : {
32057 1 : const int bLocalUseExceptions = GetUseExceptions();
32058 1 : if ( bLocalUseExceptions ) {
32059 1 : pushErrorHandler();
32060 : }
32061 1 : {
32062 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32063 1 : OGRFieldDomainShadow_SetMergePolicy(arg1,arg2);
32064 1 : SWIG_PYTHON_THREAD_END_ALLOW;
32065 : }
32066 1 : if ( bLocalUseExceptions ) {
32067 1 : popErrorHandler();
32068 : }
32069 : #ifndef SED_HACKS
32070 : if ( bLocalUseExceptions ) {
32071 : CPLErr eclass = CPLGetLastErrorType();
32072 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32073 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32074 : }
32075 : }
32076 : #endif
32077 : }
32078 1 : resultobj = SWIG_Py_Void();
32079 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32080 : return resultobj;
32081 : fail:
32082 : return NULL;
32083 : }
32084 :
32085 :
32086 38 : SWIGINTERN PyObject *_wrap_FieldDomain_GetEnumeration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32087 38 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32088 38 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32089 38 : void *argp1 = 0 ;
32090 38 : int res1 = 0 ;
32091 38 : PyObject *swig_obj[1] ;
32092 38 : OGRCodedValue *result = 0 ;
32093 :
32094 38 : if (!args) SWIG_fail;
32095 38 : swig_obj[0] = args;
32096 38 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32097 38 : if (!SWIG_IsOK(res1)) {
32098 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetEnumeration" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32099 : }
32100 38 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32101 38 : {
32102 38 : const int bLocalUseExceptions = GetUseExceptions();
32103 38 : if ( bLocalUseExceptions ) {
32104 35 : pushErrorHandler();
32105 : }
32106 38 : {
32107 38 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32108 38 : result = (OGRCodedValue *)OGRFieldDomainShadow_GetEnumeration(arg1);
32109 38 : SWIG_PYTHON_THREAD_END_ALLOW;
32110 : }
32111 38 : if ( bLocalUseExceptions ) {
32112 35 : popErrorHandler();
32113 : }
32114 : #ifndef SED_HACKS
32115 : if ( bLocalUseExceptions ) {
32116 : CPLErr eclass = CPLGetLastErrorType();
32117 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32118 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32119 : }
32120 : }
32121 : #endif
32122 : }
32123 38 : {
32124 : /* %typemap(out) OGRCodedValue* */
32125 38 : if( result == NULL )
32126 : {
32127 1 : PyErr_SetString( PyExc_RuntimeError, CPLGetLastErrorMsg() );
32128 1 : SWIG_fail;
32129 : }
32130 37 : PyObject *dict = PyDict_New();
32131 139 : for( int i = 0; (result)[i].pszCode != NULL; i++ )
32132 : {
32133 102 : if( (result)[i].pszValue )
32134 : {
32135 100 : PyObject* val = GDALPythonObjectFromCStr((result)[i].pszValue);
32136 100 : PyDict_SetItemString(dict, (result)[i].pszCode, val);
32137 102 : Py_DECREF(val);
32138 : }
32139 : else
32140 : {
32141 2 : PyDict_SetItemString(dict, (result)[i].pszCode, Py_None);
32142 : }
32143 : }
32144 37 : resultobj = dict;
32145 : }
32146 38 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32147 : return resultobj;
32148 : fail:
32149 : return NULL;
32150 : }
32151 :
32152 :
32153 12 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMinAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32154 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32155 12 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32156 12 : void *argp1 = 0 ;
32157 12 : int res1 = 0 ;
32158 12 : PyObject *swig_obj[1] ;
32159 12 : double result;
32160 :
32161 12 : if (!args) SWIG_fail;
32162 12 : swig_obj[0] = args;
32163 12 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32164 12 : if (!SWIG_IsOK(res1)) {
32165 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMinAsDouble" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32166 : }
32167 12 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32168 12 : {
32169 12 : const int bLocalUseExceptions = GetUseExceptions();
32170 12 : if ( bLocalUseExceptions ) {
32171 4 : pushErrorHandler();
32172 : }
32173 12 : {
32174 12 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32175 12 : result = (double)OGRFieldDomainShadow_GetMinAsDouble(arg1);
32176 12 : SWIG_PYTHON_THREAD_END_ALLOW;
32177 : }
32178 12 : if ( bLocalUseExceptions ) {
32179 4 : popErrorHandler();
32180 : }
32181 : #ifndef SED_HACKS
32182 : if ( bLocalUseExceptions ) {
32183 : CPLErr eclass = CPLGetLastErrorType();
32184 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32185 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32186 : }
32187 : }
32188 : #endif
32189 : }
32190 12 : resultobj = SWIG_From_double(static_cast< double >(result));
32191 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32192 : return resultobj;
32193 : fail:
32194 : return NULL;
32195 : }
32196 :
32197 :
32198 2 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMinAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32199 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32200 2 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32201 2 : void *argp1 = 0 ;
32202 2 : int res1 = 0 ;
32203 2 : PyObject *swig_obj[1] ;
32204 2 : char *result = 0 ;
32205 :
32206 2 : if (!args) SWIG_fail;
32207 2 : swig_obj[0] = args;
32208 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32209 2 : if (!SWIG_IsOK(res1)) {
32210 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMinAsString" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32211 : }
32212 2 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32213 2 : {
32214 2 : const int bLocalUseExceptions = GetUseExceptions();
32215 2 : if ( bLocalUseExceptions ) {
32216 1 : pushErrorHandler();
32217 : }
32218 2 : {
32219 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32220 2 : result = (char *)OGRFieldDomainShadow_GetMinAsString(arg1);
32221 2 : SWIG_PYTHON_THREAD_END_ALLOW;
32222 : }
32223 2 : if ( bLocalUseExceptions ) {
32224 1 : popErrorHandler();
32225 : }
32226 : #ifndef SED_HACKS
32227 : if ( bLocalUseExceptions ) {
32228 : CPLErr eclass = CPLGetLastErrorType();
32229 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32230 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32231 : }
32232 : }
32233 : #endif
32234 : }
32235 2 : resultobj = SWIG_FromCharPtr((const char *)result);
32236 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32237 : return resultobj;
32238 : fail:
32239 : return NULL;
32240 : }
32241 :
32242 :
32243 7 : SWIGINTERN PyObject *_wrap_FieldDomain_IsMinInclusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32244 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32245 7 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32246 7 : void *argp1 = 0 ;
32247 7 : int res1 = 0 ;
32248 7 : PyObject *swig_obj[1] ;
32249 7 : bool result;
32250 :
32251 7 : if (!args) SWIG_fail;
32252 7 : swig_obj[0] = args;
32253 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32254 7 : if (!SWIG_IsOK(res1)) {
32255 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_IsMinInclusive" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32256 : }
32257 7 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32258 7 : {
32259 7 : const int bLocalUseExceptions = GetUseExceptions();
32260 7 : if ( bLocalUseExceptions ) {
32261 2 : pushErrorHandler();
32262 : }
32263 7 : {
32264 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32265 7 : result = (bool)OGRFieldDomainShadow_IsMinInclusive(arg1);
32266 7 : SWIG_PYTHON_THREAD_END_ALLOW;
32267 : }
32268 7 : if ( bLocalUseExceptions ) {
32269 2 : popErrorHandler();
32270 : }
32271 : #ifndef SED_HACKS
32272 : if ( bLocalUseExceptions ) {
32273 : CPLErr eclass = CPLGetLastErrorType();
32274 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32275 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32276 : }
32277 : }
32278 : #endif
32279 : }
32280 7 : resultobj = SWIG_From_bool(static_cast< bool >(result));
32281 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32282 : return resultobj;
32283 : fail:
32284 : return NULL;
32285 : }
32286 :
32287 :
32288 12 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMaxAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32289 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32290 12 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32291 12 : void *argp1 = 0 ;
32292 12 : int res1 = 0 ;
32293 12 : PyObject *swig_obj[1] ;
32294 12 : double result;
32295 :
32296 12 : if (!args) SWIG_fail;
32297 12 : swig_obj[0] = args;
32298 12 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32299 12 : if (!SWIG_IsOK(res1)) {
32300 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMaxAsDouble" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32301 : }
32302 12 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32303 12 : {
32304 12 : const int bLocalUseExceptions = GetUseExceptions();
32305 12 : if ( bLocalUseExceptions ) {
32306 4 : pushErrorHandler();
32307 : }
32308 12 : {
32309 12 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32310 12 : result = (double)OGRFieldDomainShadow_GetMaxAsDouble(arg1);
32311 12 : SWIG_PYTHON_THREAD_END_ALLOW;
32312 : }
32313 12 : if ( bLocalUseExceptions ) {
32314 4 : popErrorHandler();
32315 : }
32316 : #ifndef SED_HACKS
32317 : if ( bLocalUseExceptions ) {
32318 : CPLErr eclass = CPLGetLastErrorType();
32319 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32320 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32321 : }
32322 : }
32323 : #endif
32324 : }
32325 12 : resultobj = SWIG_From_double(static_cast< double >(result));
32326 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32327 : return resultobj;
32328 : fail:
32329 : return NULL;
32330 : }
32331 :
32332 :
32333 2 : SWIGINTERN PyObject *_wrap_FieldDomain_GetMaxAsString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32334 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32335 2 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32336 2 : void *argp1 = 0 ;
32337 2 : int res1 = 0 ;
32338 2 : PyObject *swig_obj[1] ;
32339 2 : char *result = 0 ;
32340 :
32341 2 : if (!args) SWIG_fail;
32342 2 : swig_obj[0] = args;
32343 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32344 2 : if (!SWIG_IsOK(res1)) {
32345 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMaxAsString" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32346 : }
32347 2 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32348 2 : {
32349 2 : const int bLocalUseExceptions = GetUseExceptions();
32350 2 : if ( bLocalUseExceptions ) {
32351 1 : pushErrorHandler();
32352 : }
32353 2 : {
32354 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32355 2 : result = (char *)OGRFieldDomainShadow_GetMaxAsString(arg1);
32356 2 : SWIG_PYTHON_THREAD_END_ALLOW;
32357 : }
32358 2 : if ( bLocalUseExceptions ) {
32359 1 : popErrorHandler();
32360 : }
32361 : #ifndef SED_HACKS
32362 : if ( bLocalUseExceptions ) {
32363 : CPLErr eclass = CPLGetLastErrorType();
32364 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32365 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32366 : }
32367 : }
32368 : #endif
32369 : }
32370 2 : resultobj = SWIG_FromCharPtr((const char *)result);
32371 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32372 : return resultobj;
32373 : fail:
32374 : return NULL;
32375 : }
32376 :
32377 :
32378 7 : SWIGINTERN PyObject *_wrap_FieldDomain_IsMaxInclusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32379 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32380 7 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32381 7 : void *argp1 = 0 ;
32382 7 : int res1 = 0 ;
32383 7 : PyObject *swig_obj[1] ;
32384 7 : bool result;
32385 :
32386 7 : if (!args) SWIG_fail;
32387 7 : swig_obj[0] = args;
32388 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32389 7 : if (!SWIG_IsOK(res1)) {
32390 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_IsMaxInclusive" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32391 : }
32392 7 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32393 7 : {
32394 7 : const int bLocalUseExceptions = GetUseExceptions();
32395 7 : if ( bLocalUseExceptions ) {
32396 2 : pushErrorHandler();
32397 : }
32398 7 : {
32399 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32400 7 : result = (bool)OGRFieldDomainShadow_IsMaxInclusive(arg1);
32401 7 : SWIG_PYTHON_THREAD_END_ALLOW;
32402 : }
32403 7 : if ( bLocalUseExceptions ) {
32404 2 : popErrorHandler();
32405 : }
32406 : #ifndef SED_HACKS
32407 : if ( bLocalUseExceptions ) {
32408 : CPLErr eclass = CPLGetLastErrorType();
32409 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32410 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32411 : }
32412 : }
32413 : #endif
32414 : }
32415 7 : resultobj = SWIG_From_bool(static_cast< bool >(result));
32416 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32417 : return resultobj;
32418 : fail:
32419 : return NULL;
32420 : }
32421 :
32422 :
32423 9 : SWIGINTERN PyObject *_wrap_FieldDomain_GetGlob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32424 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32425 9 : OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
32426 9 : void *argp1 = 0 ;
32427 9 : int res1 = 0 ;
32428 9 : PyObject *swig_obj[1] ;
32429 9 : char *result = 0 ;
32430 :
32431 9 : if (!args) SWIG_fail;
32432 9 : swig_obj[0] = args;
32433 9 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32434 9 : if (!SWIG_IsOK(res1)) {
32435 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetGlob" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'");
32436 : }
32437 9 : arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
32438 9 : {
32439 9 : const int bLocalUseExceptions = GetUseExceptions();
32440 9 : if ( bLocalUseExceptions ) {
32441 8 : pushErrorHandler();
32442 : }
32443 9 : {
32444 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32445 9 : result = (char *)OGRFieldDomainShadow_GetGlob(arg1);
32446 9 : SWIG_PYTHON_THREAD_END_ALLOW;
32447 : }
32448 9 : if ( bLocalUseExceptions ) {
32449 8 : popErrorHandler();
32450 : }
32451 : #ifndef SED_HACKS
32452 : if ( bLocalUseExceptions ) {
32453 : CPLErr eclass = CPLGetLastErrorType();
32454 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32455 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32456 : }
32457 : }
32458 : #endif
32459 : }
32460 9 : resultobj = SWIG_FromCharPtr((const char *)result);
32461 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32462 : return resultobj;
32463 : fail:
32464 : return NULL;
32465 : }
32466 :
32467 :
32468 271 : SWIGINTERN PyObject *FieldDomain_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32469 271 : PyObject *obj;
32470 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
32471 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDomainShadow, SWIG_NewClientData(obj));
32472 271 : return SWIG_Py_Void();
32473 : }
32474 :
32475 23 : SWIGINTERN PyObject *_wrap_CreateCodedFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32476 23 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32477 23 : char *arg1 = (char *) 0 ;
32478 23 : char *arg2 = (char *) 0 ;
32479 23 : OGRFieldType arg3 ;
32480 23 : OGRFieldSubType arg4 ;
32481 23 : OGRCodedValue *arg5 = (OGRCodedValue *) 0 ;
32482 23 : int res1 ;
32483 23 : char *buf1 = 0 ;
32484 23 : int alloc1 = 0 ;
32485 23 : int res2 ;
32486 23 : char *buf2 = 0 ;
32487 23 : int alloc2 = 0 ;
32488 23 : int val3 ;
32489 23 : int ecode3 = 0 ;
32490 23 : int val4 ;
32491 23 : int ecode4 = 0 ;
32492 23 : PyObject *swig_obj[5] ;
32493 23 : OGRFieldDomainShadow *result = 0 ;
32494 :
32495 23 : if (!SWIG_Python_UnpackTuple(args, "CreateCodedFieldDomain", 5, 5, swig_obj)) SWIG_fail;
32496 22 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
32497 22 : if (!SWIG_IsOK(res1)) {
32498 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCodedFieldDomain" "', argument " "1"" of type '" "char const *""'");
32499 : }
32500 22 : arg1 = reinterpret_cast< char * >(buf1);
32501 22 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
32502 22 : if (!SWIG_IsOK(res2)) {
32503 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCodedFieldDomain" "', argument " "2"" of type '" "char const *""'");
32504 : }
32505 22 : arg2 = reinterpret_cast< char * >(buf2);
32506 22 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
32507 22 : if (!SWIG_IsOK(ecode3)) {
32508 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateCodedFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
32509 : }
32510 22 : arg3 = static_cast< OGRFieldType >(val3);
32511 22 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
32512 22 : if (!SWIG_IsOK(ecode4)) {
32513 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateCodedFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
32514 : }
32515 22 : arg4 = static_cast< OGRFieldSubType >(val4);
32516 22 : {
32517 : /* %typemap(in) OGRCodedValue* enumeration */
32518 22 : arg5 = NULL;
32519 :
32520 22 : if (swig_obj[4] == NULL || !PyMapping_Check(swig_obj[4])) {
32521 2 : SWIG_exception_fail(SWIG_ValueError,"Expected dict.");
32522 : }
32523 20 : Py_ssize_t size = PyMapping_Length( swig_obj[4] );
32524 20 : arg5 = (OGRCodedValue*)VSICalloc(size+1, sizeof(OGRCodedValue) );
32525 20 : if( !arg5 ) {
32526 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
32527 0 : SWIG_fail;
32528 : }
32529 :
32530 20 : PyObject *item_list = PyMapping_Items( swig_obj[4] );
32531 20 : if( item_list == NULL )
32532 : {
32533 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve items");
32534 0 : SWIG_fail;
32535 : }
32536 :
32537 61 : for( Py_ssize_t i=0; i<size; i++ ) {
32538 41 : PyObject *it = PySequence_GetItem( item_list, i );
32539 41 : if( it == NULL )
32540 : {
32541 0 : Py_DECREF(item_list);
32542 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
32543 0 : SWIG_fail;
32544 : }
32545 :
32546 41 : PyObject *k, *v;
32547 41 : if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
32548 0 : Py_DECREF(it);
32549 0 : Py_DECREF(item_list);
32550 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
32551 0 : SWIG_fail;
32552 : }
32553 :
32554 41 : PyObject* kStr = PyObject_Str(k);
32555 41 : if( PyErr_Occurred() )
32556 : {
32557 0 : Py_DECREF(it);
32558 0 : Py_DECREF(item_list);
32559 0 : SWIG_fail;
32560 : }
32561 :
32562 41 : PyObject* vStr = v != Py_None ? PyObject_Str(v) : Py_None;
32563 41 : if( v == Py_None )
32564 10 : Py_INCREF(Py_None);
32565 41 : if( PyErr_Occurred() )
32566 : {
32567 0 : Py_DECREF(it);
32568 0 : Py_DECREF(kStr);
32569 0 : Py_DECREF(item_list);
32570 0 : SWIG_fail;
32571 : }
32572 :
32573 41 : int bFreeK, bFreeV;
32574 41 : char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
32575 41 : char* pszV = vStr != Py_None ? GDALPythonObjectToCStr(vStr, &bFreeV) : NULL;
32576 41 : if( pszK == NULL || (pszV == NULL && vStr != Py_None) )
32577 : {
32578 0 : GDALPythonFreeCStr(pszK, bFreeK);
32579 0 : if( pszV )
32580 0 : GDALPythonFreeCStr(pszV, bFreeV);
32581 0 : Py_DECREF(kStr);
32582 0 : Py_DECREF(vStr);
32583 0 : Py_DECREF(it);
32584 0 : Py_DECREF(item_list);
32585 0 : PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
32586 0 : SWIG_fail;
32587 : }
32588 41 : (arg5)[i].pszCode = CPLStrdup(pszK);
32589 41 : (arg5)[i].pszValue = pszV ? CPLStrdup(pszV) : NULL;
32590 :
32591 41 : GDALPythonFreeCStr(pszK, bFreeK);
32592 41 : if( pszV )
32593 31 : GDALPythonFreeCStr(pszV, bFreeV);
32594 41 : Py_DECREF(kStr);
32595 41 : Py_DECREF(vStr);
32596 41 : Py_DECREF(it);
32597 : }
32598 20 : Py_DECREF(item_list);
32599 : }
32600 20 : {
32601 20 : if (!arg1) {
32602 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
32603 : }
32604 : }
32605 20 : {
32606 20 : const int bLocalUseExceptions = GetUseExceptions();
32607 20 : if ( bLocalUseExceptions ) {
32608 7 : pushErrorHandler();
32609 : }
32610 20 : {
32611 20 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32612 20 : result = (OGRFieldDomainShadow *)CreateCodedFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,(OGRCodedValue const *)arg5);
32613 20 : SWIG_PYTHON_THREAD_END_ALLOW;
32614 : }
32615 20 : if ( bLocalUseExceptions ) {
32616 7 : popErrorHandler();
32617 : }
32618 : #ifndef SED_HACKS
32619 : if ( bLocalUseExceptions ) {
32620 : CPLErr eclass = CPLGetLastErrorType();
32621 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32622 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32623 : }
32624 : }
32625 : #endif
32626 : }
32627 20 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN | 0 );
32628 20 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
32629 20 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
32630 : {
32631 : /* %typemap(freearg) OGRCodedValue* */
32632 : if( arg5 )
32633 : {
32634 61 : for( size_t i = 0; (arg5)[i].pszCode != NULL; ++i )
32635 : {
32636 41 : CPLFree((arg5)[i].pszCode);
32637 41 : CPLFree((arg5)[i].pszValue);
32638 : }
32639 : }
32640 20 : CPLFree( arg5 );
32641 : }
32642 23 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32643 : return resultobj;
32644 3 : fail:
32645 3 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
32646 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
32647 3 : {
32648 : /* %typemap(freearg) OGRCodedValue* */
32649 3 : if( arg5 )
32650 : {
32651 0 : for( size_t i = 0; (arg5)[i].pszCode != NULL; ++i )
32652 : {
32653 0 : CPLFree((arg5)[i].pszCode);
32654 0 : CPLFree((arg5)[i].pszValue);
32655 : }
32656 : }
32657 3 : CPLFree( arg5 );
32658 : }
32659 : return NULL;
32660 : }
32661 :
32662 :
32663 12 : SWIGINTERN PyObject *_wrap_CreateRangeFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32664 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32665 12 : char *arg1 = (char *) 0 ;
32666 12 : char *arg2 = (char *) 0 ;
32667 12 : OGRFieldType arg3 ;
32668 12 : OGRFieldSubType arg4 ;
32669 12 : double arg5 ;
32670 12 : bool arg6 ;
32671 12 : double arg7 ;
32672 12 : double arg8 ;
32673 12 : int res1 ;
32674 12 : char *buf1 = 0 ;
32675 12 : int alloc1 = 0 ;
32676 12 : int res2 ;
32677 12 : char *buf2 = 0 ;
32678 12 : int alloc2 = 0 ;
32679 12 : int val3 ;
32680 12 : int ecode3 = 0 ;
32681 12 : int val4 ;
32682 12 : int ecode4 = 0 ;
32683 12 : double val5 ;
32684 12 : int ecode5 = 0 ;
32685 12 : bool val6 ;
32686 12 : int ecode6 = 0 ;
32687 12 : double val7 ;
32688 12 : int ecode7 = 0 ;
32689 12 : double val8 ;
32690 12 : int ecode8 = 0 ;
32691 12 : PyObject *swig_obj[8] ;
32692 12 : OGRFieldDomainShadow *result = 0 ;
32693 :
32694 12 : if (!SWIG_Python_UnpackTuple(args, "CreateRangeFieldDomain", 8, 8, swig_obj)) SWIG_fail;
32695 12 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
32696 12 : if (!SWIG_IsOK(res1)) {
32697 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateRangeFieldDomain" "', argument " "1"" of type '" "char const *""'");
32698 : }
32699 12 : arg1 = reinterpret_cast< char * >(buf1);
32700 12 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
32701 12 : if (!SWIG_IsOK(res2)) {
32702 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateRangeFieldDomain" "', argument " "2"" of type '" "char const *""'");
32703 : }
32704 12 : arg2 = reinterpret_cast< char * >(buf2);
32705 12 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
32706 12 : if (!SWIG_IsOK(ecode3)) {
32707 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateRangeFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
32708 : }
32709 12 : arg3 = static_cast< OGRFieldType >(val3);
32710 12 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
32711 12 : if (!SWIG_IsOK(ecode4)) {
32712 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateRangeFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
32713 : }
32714 12 : arg4 = static_cast< OGRFieldSubType >(val4);
32715 12 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
32716 12 : if (!SWIG_IsOK(ecode5)) {
32717 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CreateRangeFieldDomain" "', argument " "5"" of type '" "double""'");
32718 : }
32719 12 : arg5 = static_cast< double >(val5);
32720 12 : ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
32721 12 : if (!SWIG_IsOK(ecode6)) {
32722 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CreateRangeFieldDomain" "', argument " "6"" of type '" "bool""'");
32723 : }
32724 12 : arg6 = static_cast< bool >(val6);
32725 12 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
32726 12 : if (!SWIG_IsOK(ecode7)) {
32727 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CreateRangeFieldDomain" "', argument " "7"" of type '" "double""'");
32728 : }
32729 12 : arg7 = static_cast< double >(val7);
32730 12 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
32731 12 : if (!SWIG_IsOK(ecode8)) {
32732 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CreateRangeFieldDomain" "', argument " "8"" of type '" "double""'");
32733 : }
32734 12 : arg8 = static_cast< double >(val8);
32735 12 : {
32736 12 : if (!arg1) {
32737 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
32738 : }
32739 : }
32740 11 : {
32741 11 : const int bLocalUseExceptions = GetUseExceptions();
32742 11 : if ( bLocalUseExceptions ) {
32743 4 : pushErrorHandler();
32744 : }
32745 11 : {
32746 11 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32747 11 : result = (OGRFieldDomainShadow *)CreateRangeFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
32748 11 : SWIG_PYTHON_THREAD_END_ALLOW;
32749 : }
32750 11 : if ( bLocalUseExceptions ) {
32751 4 : popErrorHandler();
32752 : }
32753 : #ifndef SED_HACKS
32754 : if ( bLocalUseExceptions ) {
32755 : CPLErr eclass = CPLGetLastErrorType();
32756 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32757 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32758 : }
32759 : }
32760 : #endif
32761 : }
32762 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN | 0 );
32763 11 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
32764 11 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
32765 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32766 : return resultobj;
32767 1 : fail:
32768 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
32769 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
32770 : return NULL;
32771 : }
32772 :
32773 :
32774 2 : SWIGINTERN PyObject *_wrap_CreateRangeFieldDomainDateTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32775 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32776 2 : char *arg1 = (char *) 0 ;
32777 2 : char *arg2 = (char *) 0 ;
32778 2 : char *arg3 = (char *) 0 ;
32779 2 : bool arg4 ;
32780 2 : char *arg5 = (char *) 0 ;
32781 2 : double arg6 ;
32782 2 : int res1 ;
32783 2 : char *buf1 = 0 ;
32784 2 : int alloc1 = 0 ;
32785 2 : int res2 ;
32786 2 : char *buf2 = 0 ;
32787 2 : int alloc2 = 0 ;
32788 2 : int res3 ;
32789 2 : char *buf3 = 0 ;
32790 2 : int alloc3 = 0 ;
32791 2 : bool val4 ;
32792 2 : int ecode4 = 0 ;
32793 2 : int res5 ;
32794 2 : char *buf5 = 0 ;
32795 2 : int alloc5 = 0 ;
32796 2 : double val6 ;
32797 2 : int ecode6 = 0 ;
32798 2 : PyObject *swig_obj[6] ;
32799 2 : OGRFieldDomainShadow *result = 0 ;
32800 :
32801 2 : if (!SWIG_Python_UnpackTuple(args, "CreateRangeFieldDomainDateTime", 6, 6, swig_obj)) SWIG_fail;
32802 2 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
32803 2 : if (!SWIG_IsOK(res1)) {
32804 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "1"" of type '" "char const *""'");
32805 : }
32806 2 : arg1 = reinterpret_cast< char * >(buf1);
32807 2 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
32808 2 : if (!SWIG_IsOK(res2)) {
32809 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "2"" of type '" "char const *""'");
32810 : }
32811 2 : arg2 = reinterpret_cast< char * >(buf2);
32812 2 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
32813 2 : if (!SWIG_IsOK(res3)) {
32814 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "3"" of type '" "char const *""'");
32815 : }
32816 2 : arg3 = reinterpret_cast< char * >(buf3);
32817 2 : ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4);
32818 2 : if (!SWIG_IsOK(ecode4)) {
32819 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "4"" of type '" "bool""'");
32820 : }
32821 2 : arg4 = static_cast< bool >(val4);
32822 2 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
32823 2 : if (!SWIG_IsOK(res5)) {
32824 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "5"" of type '" "char const *""'");
32825 : }
32826 2 : arg5 = reinterpret_cast< char * >(buf5);
32827 2 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
32828 2 : if (!SWIG_IsOK(ecode6)) {
32829 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "6"" of type '" "double""'");
32830 : }
32831 2 : arg6 = static_cast< double >(val6);
32832 2 : {
32833 2 : if (!arg1) {
32834 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
32835 : }
32836 : }
32837 2 : {
32838 2 : const int bLocalUseExceptions = GetUseExceptions();
32839 2 : if ( bLocalUseExceptions ) {
32840 1 : pushErrorHandler();
32841 : }
32842 2 : {
32843 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32844 2 : result = (OGRFieldDomainShadow *)CreateRangeFieldDomainDateTime((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,(char const *)arg5,arg6);
32845 2 : SWIG_PYTHON_THREAD_END_ALLOW;
32846 : }
32847 2 : if ( bLocalUseExceptions ) {
32848 1 : popErrorHandler();
32849 : }
32850 : #ifndef SED_HACKS
32851 : if ( bLocalUseExceptions ) {
32852 : CPLErr eclass = CPLGetLastErrorType();
32853 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32854 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32855 : }
32856 : }
32857 : #endif
32858 : }
32859 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 | 0 );
32860 2 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
32861 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
32862 2 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
32863 2 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
32864 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32865 : return resultobj;
32866 0 : fail:
32867 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
32868 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
32869 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
32870 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
32871 : return NULL;
32872 : }
32873 :
32874 :
32875 15 : SWIGINTERN PyObject *_wrap_CreateGlobFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32876 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32877 15 : char *arg1 = (char *) 0 ;
32878 15 : char *arg2 = (char *) 0 ;
32879 15 : OGRFieldType arg3 ;
32880 15 : OGRFieldSubType arg4 ;
32881 15 : char *arg5 = (char *) 0 ;
32882 15 : int res1 ;
32883 15 : char *buf1 = 0 ;
32884 15 : int alloc1 = 0 ;
32885 15 : int res2 ;
32886 15 : char *buf2 = 0 ;
32887 15 : int alloc2 = 0 ;
32888 15 : int val3 ;
32889 15 : int ecode3 = 0 ;
32890 15 : int val4 ;
32891 15 : int ecode4 = 0 ;
32892 15 : int res5 ;
32893 15 : char *buf5 = 0 ;
32894 15 : int alloc5 = 0 ;
32895 15 : PyObject *swig_obj[5] ;
32896 15 : OGRFieldDomainShadow *result = 0 ;
32897 :
32898 15 : if (!SWIG_Python_UnpackTuple(args, "CreateGlobFieldDomain", 5, 5, swig_obj)) SWIG_fail;
32899 15 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
32900 15 : if (!SWIG_IsOK(res1)) {
32901 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGlobFieldDomain" "', argument " "1"" of type '" "char const *""'");
32902 : }
32903 15 : arg1 = reinterpret_cast< char * >(buf1);
32904 15 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
32905 15 : if (!SWIG_IsOK(res2)) {
32906 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGlobFieldDomain" "', argument " "2"" of type '" "char const *""'");
32907 : }
32908 15 : arg2 = reinterpret_cast< char * >(buf2);
32909 15 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
32910 15 : if (!SWIG_IsOK(ecode3)) {
32911 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateGlobFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
32912 : }
32913 15 : arg3 = static_cast< OGRFieldType >(val3);
32914 15 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
32915 15 : if (!SWIG_IsOK(ecode4)) {
32916 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateGlobFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
32917 : }
32918 15 : arg4 = static_cast< OGRFieldSubType >(val4);
32919 15 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
32920 15 : if (!SWIG_IsOK(res5)) {
32921 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CreateGlobFieldDomain" "', argument " "5"" of type '" "char const *""'");
32922 : }
32923 15 : arg5 = reinterpret_cast< char * >(buf5);
32924 15 : {
32925 15 : if (!arg1) {
32926 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
32927 : }
32928 : }
32929 15 : {
32930 15 : if (!arg5) {
32931 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
32932 : }
32933 : }
32934 14 : {
32935 14 : const int bLocalUseExceptions = GetUseExceptions();
32936 14 : if ( bLocalUseExceptions ) {
32937 13 : pushErrorHandler();
32938 : }
32939 14 : {
32940 14 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32941 14 : result = (OGRFieldDomainShadow *)CreateGlobFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,(char const *)arg5);
32942 14 : SWIG_PYTHON_THREAD_END_ALLOW;
32943 : }
32944 14 : if ( bLocalUseExceptions ) {
32945 13 : popErrorHandler();
32946 : }
32947 : #ifndef SED_HACKS
32948 : if ( bLocalUseExceptions ) {
32949 : CPLErr eclass = CPLGetLastErrorType();
32950 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
32951 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
32952 : }
32953 : }
32954 : #endif
32955 : }
32956 14 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN | 0 );
32957 14 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
32958 14 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
32959 14 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
32960 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
32961 : return resultobj;
32962 1 : fail:
32963 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
32964 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
32965 1 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
32966 : return NULL;
32967 : }
32968 :
32969 :
32970 20 : SWIGINTERN PyObject *_wrap_delete_GeomCoordinatePrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32971 20 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
32972 20 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
32973 20 : void *argp1 = 0 ;
32974 20 : int res1 = 0 ;
32975 20 : PyObject *swig_obj[1] ;
32976 :
32977 20 : if (!args) SWIG_fail;
32978 20 : swig_obj[0] = args;
32979 20 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, SWIG_POINTER_DISOWN | 0 );
32980 20 : if (!SWIG_IsOK(res1)) {
32981 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
32982 : }
32983 20 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
32984 20 : {
32985 20 : const int bLocalUseExceptions = GetUseExceptions();
32986 20 : if ( bLocalUseExceptions ) {
32987 14 : pushErrorHandler();
32988 : }
32989 20 : {
32990 20 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
32991 20 : delete_OGRGeomCoordinatePrecisionShadow(arg1);
32992 20 : SWIG_PYTHON_THREAD_END_ALLOW;
32993 : }
32994 20 : if ( bLocalUseExceptions ) {
32995 14 : popErrorHandler();
32996 : }
32997 : #ifndef SED_HACKS
32998 : if ( bLocalUseExceptions ) {
32999 : CPLErr eclass = CPLGetLastErrorType();
33000 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33001 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33002 : }
33003 : }
33004 : #endif
33005 : }
33006 20 : resultobj = SWIG_Py_Void();
33007 20 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33008 : return resultobj;
33009 : fail:
33010 : return NULL;
33011 : }
33012 :
33013 :
33014 20 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_Set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33015 20 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33016 20 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33017 20 : double arg2 ;
33018 20 : double arg3 ;
33019 20 : double arg4 ;
33020 20 : void *argp1 = 0 ;
33021 20 : int res1 = 0 ;
33022 20 : double val2 ;
33023 20 : int ecode2 = 0 ;
33024 20 : double val3 ;
33025 20 : int ecode3 = 0 ;
33026 20 : double val4 ;
33027 20 : int ecode4 = 0 ;
33028 20 : PyObject *swig_obj[4] ;
33029 :
33030 20 : if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_Set", 4, 4, swig_obj)) SWIG_fail;
33031 20 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33032 20 : if (!SWIG_IsOK(res1)) {
33033 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_Set" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33034 : }
33035 20 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33036 20 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
33037 20 : if (!SWIG_IsOK(ecode2)) {
33038 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomCoordinatePrecision_Set" "', argument " "2"" of type '" "double""'");
33039 : }
33040 20 : arg2 = static_cast< double >(val2);
33041 20 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
33042 20 : if (!SWIG_IsOK(ecode3)) {
33043 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GeomCoordinatePrecision_Set" "', argument " "3"" of type '" "double""'");
33044 : }
33045 20 : arg3 = static_cast< double >(val3);
33046 20 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
33047 20 : if (!SWIG_IsOK(ecode4)) {
33048 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GeomCoordinatePrecision_Set" "', argument " "4"" of type '" "double""'");
33049 : }
33050 20 : arg4 = static_cast< double >(val4);
33051 20 : {
33052 20 : const int bLocalUseExceptions = GetUseExceptions();
33053 20 : if ( bLocalUseExceptions ) {
33054 14 : pushErrorHandler();
33055 : }
33056 20 : {
33057 20 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33058 20 : OGRGeomCoordinatePrecisionShadow_Set(arg1,arg2,arg3,arg4);
33059 20 : SWIG_PYTHON_THREAD_END_ALLOW;
33060 : }
33061 20 : if ( bLocalUseExceptions ) {
33062 14 : popErrorHandler();
33063 : }
33064 : #ifndef SED_HACKS
33065 : if ( bLocalUseExceptions ) {
33066 : CPLErr eclass = CPLGetLastErrorType();
33067 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33068 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33069 : }
33070 : }
33071 : #endif
33072 : }
33073 20 : resultobj = SWIG_Py_Void();
33074 20 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33075 : return resultobj;
33076 : fail:
33077 : return NULL;
33078 : }
33079 :
33080 :
33081 4 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_SetFromMeter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33082 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33083 4 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33084 4 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
33085 4 : double arg3 ;
33086 4 : double arg4 ;
33087 4 : double arg5 ;
33088 4 : void *argp1 = 0 ;
33089 4 : int res1 = 0 ;
33090 4 : void *argp2 = 0 ;
33091 4 : int res2 = 0 ;
33092 4 : double val3 ;
33093 4 : int ecode3 = 0 ;
33094 4 : double val4 ;
33095 4 : int ecode4 = 0 ;
33096 4 : double val5 ;
33097 4 : int ecode5 = 0 ;
33098 4 : PyObject *swig_obj[5] ;
33099 :
33100 4 : if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_SetFromMeter", 5, 5, swig_obj)) SWIG_fail;
33101 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33102 4 : if (!SWIG_IsOK(res1)) {
33103 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33104 : }
33105 4 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33106 4 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
33107 4 : if (!SWIG_IsOK(res2)) {
33108 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
33109 : }
33110 4 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
33111 4 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
33112 4 : if (!SWIG_IsOK(ecode3)) {
33113 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "3"" of type '" "double""'");
33114 : }
33115 4 : arg3 = static_cast< double >(val3);
33116 4 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
33117 4 : if (!SWIG_IsOK(ecode4)) {
33118 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "4"" of type '" "double""'");
33119 : }
33120 4 : arg4 = static_cast< double >(val4);
33121 4 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
33122 4 : if (!SWIG_IsOK(ecode5)) {
33123 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "5"" of type '" "double""'");
33124 : }
33125 4 : arg5 = static_cast< double >(val5);
33126 4 : {
33127 4 : if (!arg2) {
33128 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33129 : }
33130 : }
33131 3 : {
33132 3 : const int bLocalUseExceptions = GetUseExceptions();
33133 3 : if ( bLocalUseExceptions ) {
33134 3 : pushErrorHandler();
33135 : }
33136 3 : {
33137 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33138 3 : OGRGeomCoordinatePrecisionShadow_SetFromMeter(arg1,arg2,arg3,arg4,arg5);
33139 3 : SWIG_PYTHON_THREAD_END_ALLOW;
33140 : }
33141 3 : if ( bLocalUseExceptions ) {
33142 3 : popErrorHandler();
33143 : }
33144 : #ifndef SED_HACKS
33145 : if ( bLocalUseExceptions ) {
33146 : CPLErr eclass = CPLGetLastErrorType();
33147 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33148 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33149 : }
33150 : }
33151 : #endif
33152 : }
33153 3 : resultobj = SWIG_Py_Void();
33154 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33155 : return resultobj;
33156 : fail:
33157 : return NULL;
33158 : }
33159 :
33160 :
33161 47 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetXYResolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33162 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33163 47 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33164 47 : void *argp1 = 0 ;
33165 47 : int res1 = 0 ;
33166 47 : PyObject *swig_obj[1] ;
33167 47 : double result;
33168 :
33169 47 : if (!args) SWIG_fail;
33170 47 : swig_obj[0] = args;
33171 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33172 47 : if (!SWIG_IsOK(res1)) {
33173 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetXYResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33174 : }
33175 47 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33176 47 : {
33177 47 : const int bLocalUseExceptions = GetUseExceptions();
33178 47 : if ( bLocalUseExceptions ) {
33179 38 : pushErrorHandler();
33180 : }
33181 47 : {
33182 47 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33183 47 : result = (double)OGRGeomCoordinatePrecisionShadow_GetXYResolution(arg1);
33184 47 : SWIG_PYTHON_THREAD_END_ALLOW;
33185 : }
33186 47 : if ( bLocalUseExceptions ) {
33187 38 : popErrorHandler();
33188 : }
33189 : #ifndef SED_HACKS
33190 : if ( bLocalUseExceptions ) {
33191 : CPLErr eclass = CPLGetLastErrorType();
33192 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33193 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33194 : }
33195 : }
33196 : #endif
33197 : }
33198 47 : resultobj = SWIG_From_double(static_cast< double >(result));
33199 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33200 : return resultobj;
33201 : fail:
33202 : return NULL;
33203 : }
33204 :
33205 :
33206 44 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetZResolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33207 44 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33208 44 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33209 44 : void *argp1 = 0 ;
33210 44 : int res1 = 0 ;
33211 44 : PyObject *swig_obj[1] ;
33212 44 : double result;
33213 :
33214 44 : if (!args) SWIG_fail;
33215 44 : swig_obj[0] = args;
33216 44 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33217 44 : if (!SWIG_IsOK(res1)) {
33218 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetZResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33219 : }
33220 44 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33221 44 : {
33222 44 : const int bLocalUseExceptions = GetUseExceptions();
33223 44 : if ( bLocalUseExceptions ) {
33224 35 : pushErrorHandler();
33225 : }
33226 44 : {
33227 44 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33228 44 : result = (double)OGRGeomCoordinatePrecisionShadow_GetZResolution(arg1);
33229 44 : SWIG_PYTHON_THREAD_END_ALLOW;
33230 : }
33231 44 : if ( bLocalUseExceptions ) {
33232 35 : popErrorHandler();
33233 : }
33234 : #ifndef SED_HACKS
33235 : if ( bLocalUseExceptions ) {
33236 : CPLErr eclass = CPLGetLastErrorType();
33237 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33238 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33239 : }
33240 : }
33241 : #endif
33242 : }
33243 44 : resultobj = SWIG_From_double(static_cast< double >(result));
33244 44 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33245 : return resultobj;
33246 : fail:
33247 : return NULL;
33248 : }
33249 :
33250 :
33251 29 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetMResolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33252 29 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33253 29 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33254 29 : void *argp1 = 0 ;
33255 29 : int res1 = 0 ;
33256 29 : PyObject *swig_obj[1] ;
33257 29 : double result;
33258 :
33259 29 : if (!args) SWIG_fail;
33260 29 : swig_obj[0] = args;
33261 29 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33262 29 : if (!SWIG_IsOK(res1)) {
33263 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetMResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33264 : }
33265 29 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33266 29 : {
33267 29 : const int bLocalUseExceptions = GetUseExceptions();
33268 29 : if ( bLocalUseExceptions ) {
33269 22 : pushErrorHandler();
33270 : }
33271 29 : {
33272 29 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33273 29 : result = (double)OGRGeomCoordinatePrecisionShadow_GetMResolution(arg1);
33274 29 : SWIG_PYTHON_THREAD_END_ALLOW;
33275 : }
33276 29 : if ( bLocalUseExceptions ) {
33277 22 : popErrorHandler();
33278 : }
33279 : #ifndef SED_HACKS
33280 : if ( bLocalUseExceptions ) {
33281 : CPLErr eclass = CPLGetLastErrorType();
33282 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33283 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33284 : }
33285 : }
33286 : #endif
33287 : }
33288 29 : resultobj = SWIG_From_double(static_cast< double >(result));
33289 29 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33290 : return resultobj;
33291 : fail:
33292 : return NULL;
33293 : }
33294 :
33295 :
33296 6 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetFormats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33297 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33298 6 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33299 6 : void *argp1 = 0 ;
33300 6 : int res1 = 0 ;
33301 6 : PyObject *swig_obj[1] ;
33302 6 : char **result = 0 ;
33303 :
33304 6 : if (!args) SWIG_fail;
33305 6 : swig_obj[0] = args;
33306 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33307 6 : if (!SWIG_IsOK(res1)) {
33308 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetFormats" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33309 : }
33310 6 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33311 6 : {
33312 6 : const int bLocalUseExceptions = GetUseExceptions();
33313 6 : if ( bLocalUseExceptions ) {
33314 2 : pushErrorHandler();
33315 : }
33316 6 : {
33317 6 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33318 6 : result = (char **)OGRGeomCoordinatePrecisionShadow_GetFormats(arg1);
33319 6 : SWIG_PYTHON_THREAD_END_ALLOW;
33320 : }
33321 6 : if ( bLocalUseExceptions ) {
33322 2 : popErrorHandler();
33323 : }
33324 : #ifndef SED_HACKS
33325 : if ( bLocalUseExceptions ) {
33326 : CPLErr eclass = CPLGetLastErrorType();
33327 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33328 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33329 : }
33330 : }
33331 : #endif
33332 : }
33333 6 : {
33334 : /* %typemap(out) char **CSL -> ( string ) */
33335 6 : bool bErr = false;
33336 6 : resultobj = CSLToList(result, &bErr);
33337 6 : CSLDestroy(result);
33338 6 : if( bErr ) {
33339 0 : SWIG_fail;
33340 : }
33341 : }
33342 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33343 : return resultobj;
33344 : fail:
33345 : return NULL;
33346 : }
33347 :
33348 :
33349 8 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetFormatSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33350 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33351 8 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33352 8 : char *arg2 = (char *) 0 ;
33353 8 : void *argp1 = 0 ;
33354 8 : int res1 = 0 ;
33355 8 : int res2 ;
33356 8 : char *buf2 = 0 ;
33357 8 : int alloc2 = 0 ;
33358 8 : PyObject *swig_obj[2] ;
33359 8 : char **result = 0 ;
33360 :
33361 8 : if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_GetFormatSpecificOptions", 2, 2, swig_obj)) SWIG_fail;
33362 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33363 8 : if (!SWIG_IsOK(res1)) {
33364 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetFormatSpecificOptions" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33365 : }
33366 8 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33367 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
33368 8 : if (!SWIG_IsOK(res2)) {
33369 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_GetFormatSpecificOptions" "', argument " "2"" of type '" "char const *""'");
33370 : }
33371 8 : arg2 = reinterpret_cast< char * >(buf2);
33372 8 : {
33373 8 : if (!arg2) {
33374 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33375 : }
33376 : }
33377 7 : {
33378 7 : const int bLocalUseExceptions = GetUseExceptions();
33379 7 : if ( bLocalUseExceptions ) {
33380 2 : pushErrorHandler();
33381 : }
33382 7 : {
33383 7 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33384 7 : result = (char **)OGRGeomCoordinatePrecisionShadow_GetFormatSpecificOptions(arg1,(char const *)arg2);
33385 7 : SWIG_PYTHON_THREAD_END_ALLOW;
33386 : }
33387 7 : if ( bLocalUseExceptions ) {
33388 2 : popErrorHandler();
33389 : }
33390 : #ifndef SED_HACKS
33391 : if ( bLocalUseExceptions ) {
33392 : CPLErr eclass = CPLGetLastErrorType();
33393 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33394 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33395 : }
33396 : }
33397 : #endif
33398 : }
33399 7 : {
33400 : /* %typemap(out) char **dict */
33401 7 : resultobj = GetCSLStringAsPyDict(result, false);
33402 : }
33403 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33404 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33405 : return resultobj;
33406 1 : fail:
33407 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33408 : return NULL;
33409 : }
33410 :
33411 :
33412 1 : SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_SetFormatSpecificOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33413 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33414 1 : OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
33415 1 : char *arg2 = (char *) 0 ;
33416 1 : char **arg3 = (char **) 0 ;
33417 1 : void *argp1 = 0 ;
33418 1 : int res1 = 0 ;
33419 1 : int res2 ;
33420 1 : char *buf2 = 0 ;
33421 1 : int alloc2 = 0 ;
33422 1 : PyObject *swig_obj[3] ;
33423 :
33424 1 : if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_SetFormatSpecificOptions", 3, 3, swig_obj)) SWIG_fail;
33425 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 | 0 );
33426 1 : if (!SWIG_IsOK(res1)) {
33427 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_SetFormatSpecificOptions" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'");
33428 : }
33429 1 : arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
33430 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
33431 1 : if (!SWIG_IsOK(res2)) {
33432 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_SetFormatSpecificOptions" "', argument " "2"" of type '" "char const *""'");
33433 : }
33434 1 : arg2 = reinterpret_cast< char * >(buf2);
33435 1 : {
33436 : /* %typemap(in) char **dict */
33437 1 : arg3 = NULL;
33438 1 : if ( PySequence_Check( swig_obj[2] ) ) {
33439 0 : int bErr = FALSE;
33440 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
33441 0 : if ( bErr )
33442 : {
33443 0 : SWIG_fail;
33444 : }
33445 : }
33446 1 : else if ( PyMapping_Check( swig_obj[2] ) ) {
33447 1 : int bErr = FALSE;
33448 1 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
33449 1 : if ( bErr )
33450 : {
33451 0 : SWIG_fail;
33452 : }
33453 : }
33454 : else {
33455 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
33456 0 : SWIG_fail;
33457 : }
33458 : }
33459 1 : {
33460 1 : if (!arg2) {
33461 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
33462 : }
33463 : }
33464 1 : {
33465 1 : const int bLocalUseExceptions = GetUseExceptions();
33466 1 : if ( bLocalUseExceptions ) {
33467 1 : pushErrorHandler();
33468 : }
33469 1 : {
33470 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33471 1 : OGRGeomCoordinatePrecisionShadow_SetFormatSpecificOptions(arg1,(char const *)arg2,arg3);
33472 1 : SWIG_PYTHON_THREAD_END_ALLOW;
33473 : }
33474 1 : if ( bLocalUseExceptions ) {
33475 1 : popErrorHandler();
33476 : }
33477 : #ifndef SED_HACKS
33478 : if ( bLocalUseExceptions ) {
33479 : CPLErr eclass = CPLGetLastErrorType();
33480 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33481 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33482 : }
33483 : }
33484 : #endif
33485 : }
33486 1 : resultobj = SWIG_Py_Void();
33487 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33488 1 : {
33489 : /* %typemap(freearg) char **dict */
33490 1 : CSLDestroy( arg3 );
33491 : }
33492 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33493 : return resultobj;
33494 0 : fail:
33495 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
33496 0 : {
33497 : /* %typemap(freearg) char **dict */
33498 0 : CSLDestroy( arg3 );
33499 : }
33500 : return NULL;
33501 : }
33502 :
33503 :
33504 271 : SWIGINTERN PyObject *GeomCoordinatePrecision_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33505 271 : PyObject *obj;
33506 271 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
33507 271 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, SWIG_NewClientData(obj));
33508 271 : return SWIG_Py_Void();
33509 : }
33510 :
33511 20 : SWIGINTERN PyObject *_wrap_CreateGeomCoordinatePrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33512 20 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33513 20 : OGRGeomCoordinatePrecisionShadow *result = 0 ;
33514 :
33515 20 : if (!SWIG_Python_UnpackTuple(args, "CreateGeomCoordinatePrecision", 0, 0, 0)) SWIG_fail;
33516 20 : {
33517 20 : const int bLocalUseExceptions = GetUseExceptions();
33518 20 : if ( bLocalUseExceptions ) {
33519 14 : pushErrorHandler();
33520 : }
33521 20 : {
33522 20 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33523 20 : result = (OGRGeomCoordinatePrecisionShadow *)CreateGeomCoordinatePrecision();
33524 20 : SWIG_PYTHON_THREAD_END_ALLOW;
33525 : }
33526 20 : if ( bLocalUseExceptions ) {
33527 14 : popErrorHandler();
33528 : }
33529 : #ifndef SED_HACKS
33530 : if ( bLocalUseExceptions ) {
33531 : CPLErr eclass = CPLGetLastErrorType();
33532 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33533 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33534 : }
33535 : }
33536 : #endif
33537 : }
33538 20 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, SWIG_POINTER_OWN | 0 );
33539 20 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33540 : return resultobj;
33541 0 : fail:
33542 0 : return NULL;
33543 : }
33544 :
33545 :
33546 0 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33547 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33548 0 : int result;
33549 :
33550 0 : if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
33551 0 : {
33552 0 : const int bLocalUseExceptions = GetUseExceptions();
33553 0 : if ( bLocalUseExceptions ) {
33554 0 : pushErrorHandler();
33555 : }
33556 0 : {
33557 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33558 0 : result = (int)OGRGetDriverCount();
33559 0 : SWIG_PYTHON_THREAD_END_ALLOW;
33560 : }
33561 0 : if ( bLocalUseExceptions ) {
33562 0 : popErrorHandler();
33563 : }
33564 : #ifndef SED_HACKS
33565 : if ( bLocalUseExceptions ) {
33566 : CPLErr eclass = CPLGetLastErrorType();
33567 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33568 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33569 : }
33570 : }
33571 : #endif
33572 : }
33573 0 : resultobj = SWIG_From_int(static_cast< int >(result));
33574 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33575 : return resultobj;
33576 0 : fail:
33577 0 : return NULL;
33578 : }
33579 :
33580 :
33581 0 : SWIGINTERN PyObject *_wrap_GetOpenDSCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33582 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33583 0 : int result;
33584 :
33585 0 : if (!SWIG_Python_UnpackTuple(args, "GetOpenDSCount", 0, 0, 0)) SWIG_fail;
33586 0 : {
33587 0 : const int bLocalUseExceptions = GetUseExceptions();
33588 0 : if ( bLocalUseExceptions ) {
33589 0 : pushErrorHandler();
33590 : }
33591 0 : {
33592 0 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33593 0 : result = (int)OGRGetOpenDSCount();
33594 0 : SWIG_PYTHON_THREAD_END_ALLOW;
33595 : }
33596 0 : if ( bLocalUseExceptions ) {
33597 0 : popErrorHandler();
33598 : }
33599 : #ifndef SED_HACKS
33600 : if ( bLocalUseExceptions ) {
33601 : CPLErr eclass = CPLGetLastErrorType();
33602 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33603 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33604 : }
33605 : }
33606 : #endif
33607 : }
33608 0 : resultobj = SWIG_From_int(static_cast< int >(result));
33609 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33610 : return resultobj;
33611 0 : fail:
33612 0 : return NULL;
33613 : }
33614 :
33615 :
33616 4 : SWIGINTERN PyObject *_wrap_SetGenerate_DB2_V72_BYTE_ORDER(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33617 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33618 4 : int arg1 ;
33619 4 : int val1 ;
33620 4 : int ecode1 = 0 ;
33621 4 : PyObject *swig_obj[1] ;
33622 4 : OGRErr result;
33623 :
33624 4 : if (!args) SWIG_fail;
33625 4 : swig_obj[0] = args;
33626 4 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
33627 4 : if (!SWIG_IsOK(ecode1)) {
33628 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetGenerate_DB2_V72_BYTE_ORDER" "', argument " "1"" of type '" "int""'");
33629 : }
33630 4 : arg1 = static_cast< int >(val1);
33631 4 : {
33632 4 : const int bLocalUseExceptions = GetUseExceptions();
33633 4 : if ( bLocalUseExceptions ) {
33634 4 : pushErrorHandler();
33635 : }
33636 4 : {
33637 4 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33638 4 : result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
33639 4 : SWIG_PYTHON_THREAD_END_ALLOW;
33640 : }
33641 4 : if ( bLocalUseExceptions ) {
33642 4 : popErrorHandler();
33643 : }
33644 : #ifndef SED_HACKS
33645 : if ( bLocalUseExceptions ) {
33646 : CPLErr eclass = CPLGetLastErrorType();
33647 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33648 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33649 : }
33650 : }
33651 : #endif
33652 : }
33653 4 : {
33654 : /* %typemap(out) OGRErr */
33655 4 : if ( result != 0 && GetUseExceptions()) {
33656 0 : const char* pszMessage = CPLGetLastErrorMsg();
33657 0 : if( pszMessage[0] != '\0' )
33658 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
33659 : else
33660 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
33661 0 : SWIG_fail;
33662 : }
33663 : }
33664 4 : {
33665 : /* %typemap(ret) OGRErr */
33666 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
33667 4 : resultobj = PyInt_FromLong( result );
33668 : }
33669 : }
33670 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33671 : return resultobj;
33672 : fail:
33673 : return NULL;
33674 : }
33675 :
33676 :
33677 3 : SWIGINTERN PyObject *_wrap_RegisterAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33678 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33679 :
33680 3 : if (!SWIG_Python_UnpackTuple(args, "RegisterAll", 0, 0, 0)) SWIG_fail;
33681 3 : {
33682 3 : const int bLocalUseExceptions = GetUseExceptions();
33683 3 : if ( bLocalUseExceptions ) {
33684 3 : pushErrorHandler();
33685 : }
33686 3 : {
33687 3 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33688 3 : OGRRegisterAll();
33689 3 : SWIG_PYTHON_THREAD_END_ALLOW;
33690 : }
33691 3 : if ( bLocalUseExceptions ) {
33692 3 : popErrorHandler();
33693 : }
33694 : #ifndef SED_HACKS
33695 : if ( bLocalUseExceptions ) {
33696 : CPLErr eclass = CPLGetLastErrorType();
33697 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33698 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33699 : }
33700 : }
33701 : #endif
33702 : }
33703 3 : resultobj = SWIG_Py_Void();
33704 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33705 : return resultobj;
33706 0 : fail:
33707 0 : return NULL;
33708 : }
33709 :
33710 :
33711 71 : SWIGINTERN PyObject *_wrap_GeometryTypeToName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33712 71 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33713 71 : OGRwkbGeometryType arg1 ;
33714 71 : int val1 ;
33715 71 : int ecode1 = 0 ;
33716 71 : PyObject *swig_obj[1] ;
33717 71 : char *result = 0 ;
33718 :
33719 71 : if (!args) SWIG_fail;
33720 71 : swig_obj[0] = args;
33721 71 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
33722 71 : if (!SWIG_IsOK(ecode1)) {
33723 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GeometryTypeToName" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
33724 : }
33725 71 : arg1 = static_cast< OGRwkbGeometryType >(val1);
33726 71 : {
33727 71 : const int bLocalUseExceptions = GetUseExceptions();
33728 71 : if ( bLocalUseExceptions ) {
33729 46 : pushErrorHandler();
33730 : }
33731 71 : {
33732 71 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33733 71 : result = (char *)OGRGeometryTypeToName(arg1);
33734 71 : SWIG_PYTHON_THREAD_END_ALLOW;
33735 : }
33736 71 : if ( bLocalUseExceptions ) {
33737 46 : popErrorHandler();
33738 : }
33739 : #ifndef SED_HACKS
33740 : if ( bLocalUseExceptions ) {
33741 : CPLErr eclass = CPLGetLastErrorType();
33742 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33743 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33744 : }
33745 : }
33746 : #endif
33747 : }
33748 71 : resultobj = SWIG_FromCharPtr((const char *)result);
33749 71 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33750 : return resultobj;
33751 : fail:
33752 : return NULL;
33753 : }
33754 :
33755 :
33756 1483 : SWIGINTERN PyObject *_wrap_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33757 1483 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33758 1483 : OGRFieldType arg1 ;
33759 1483 : int val1 ;
33760 1483 : int ecode1 = 0 ;
33761 1483 : PyObject *swig_obj[1] ;
33762 1483 : char *result = 0 ;
33763 :
33764 1483 : if (!args) SWIG_fail;
33765 1483 : swig_obj[0] = args;
33766 1483 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
33767 1483 : if (!SWIG_IsOK(ecode1)) {
33768 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldType""'");
33769 : }
33770 1483 : arg1 = static_cast< OGRFieldType >(val1);
33771 1483 : {
33772 1483 : const int bLocalUseExceptions = GetUseExceptions();
33773 1483 : if ( bLocalUseExceptions ) {
33774 1311 : pushErrorHandler();
33775 : }
33776 1483 : {
33777 1483 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33778 1483 : result = (char *)OGR_GetFieldTypeName(arg1);
33779 1483 : SWIG_PYTHON_THREAD_END_ALLOW;
33780 : }
33781 1483 : if ( bLocalUseExceptions ) {
33782 1311 : popErrorHandler();
33783 : }
33784 : #ifndef SED_HACKS
33785 : if ( bLocalUseExceptions ) {
33786 : CPLErr eclass = CPLGetLastErrorType();
33787 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33788 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33789 : }
33790 : }
33791 : #endif
33792 : }
33793 1483 : resultobj = SWIG_FromCharPtr((const char *)result);
33794 1483 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33795 : return resultobj;
33796 : fail:
33797 : return NULL;
33798 : }
33799 :
33800 :
33801 1314 : SWIGINTERN PyObject *_wrap_GetFieldSubTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33802 1314 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33803 1314 : OGRFieldSubType arg1 ;
33804 1314 : int val1 ;
33805 1314 : int ecode1 = 0 ;
33806 1314 : PyObject *swig_obj[1] ;
33807 1314 : char *result = 0 ;
33808 :
33809 1314 : if (!args) SWIG_fail;
33810 1314 : swig_obj[0] = args;
33811 1314 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
33812 1314 : if (!SWIG_IsOK(ecode1)) {
33813 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldSubTypeName" "', argument " "1"" of type '" "OGRFieldSubType""'");
33814 : }
33815 1314 : arg1 = static_cast< OGRFieldSubType >(val1);
33816 1314 : {
33817 1314 : const int bLocalUseExceptions = GetUseExceptions();
33818 1314 : if ( bLocalUseExceptions ) {
33819 1314 : pushErrorHandler();
33820 : }
33821 1314 : {
33822 1314 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33823 1314 : result = (char *)OGR_GetFieldSubTypeName(arg1);
33824 1314 : SWIG_PYTHON_THREAD_END_ALLOW;
33825 : }
33826 1314 : if ( bLocalUseExceptions ) {
33827 1314 : popErrorHandler();
33828 : }
33829 : #ifndef SED_HACKS
33830 : if ( bLocalUseExceptions ) {
33831 : CPLErr eclass = CPLGetLastErrorType();
33832 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33833 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33834 : }
33835 : }
33836 : #endif
33837 : }
33838 1314 : resultobj = SWIG_FromCharPtr((const char *)result);
33839 1314 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33840 : return resultobj;
33841 : fail:
33842 : return NULL;
33843 : }
33844 :
33845 :
33846 1737 : SWIGINTERN PyObject *_wrap_GT_Flatten(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33847 1737 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33848 1737 : OGRwkbGeometryType arg1 ;
33849 1737 : int val1 ;
33850 1737 : int ecode1 = 0 ;
33851 1737 : PyObject *swig_obj[1] ;
33852 1737 : OGRwkbGeometryType result;
33853 :
33854 1737 : if (!args) SWIG_fail;
33855 1737 : swig_obj[0] = args;
33856 1737 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
33857 1737 : if (!SWIG_IsOK(ecode1)) {
33858 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_Flatten" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
33859 : }
33860 1737 : arg1 = static_cast< OGRwkbGeometryType >(val1);
33861 1737 : {
33862 1737 : const int bLocalUseExceptions = GetUseExceptions();
33863 1737 : if ( bLocalUseExceptions ) {
33864 75 : pushErrorHandler();
33865 : }
33866 1737 : {
33867 1737 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33868 1737 : result = (OGRwkbGeometryType)OGR_GT_Flatten(arg1);
33869 1737 : SWIG_PYTHON_THREAD_END_ALLOW;
33870 : }
33871 1737 : if ( bLocalUseExceptions ) {
33872 75 : popErrorHandler();
33873 : }
33874 : #ifndef SED_HACKS
33875 : if ( bLocalUseExceptions ) {
33876 : CPLErr eclass = CPLGetLastErrorType();
33877 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33878 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33879 : }
33880 : }
33881 : #endif
33882 : }
33883 1737 : resultobj = SWIG_From_int(static_cast< int >(result));
33884 1737 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33885 : return resultobj;
33886 : fail:
33887 : return NULL;
33888 : }
33889 :
33890 :
33891 36 : SWIGINTERN PyObject *_wrap_GT_SetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33892 36 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33893 36 : OGRwkbGeometryType arg1 ;
33894 36 : int val1 ;
33895 36 : int ecode1 = 0 ;
33896 36 : PyObject *swig_obj[1] ;
33897 36 : OGRwkbGeometryType result;
33898 :
33899 36 : if (!args) SWIG_fail;
33900 36 : swig_obj[0] = args;
33901 36 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
33902 36 : if (!SWIG_IsOK(ecode1)) {
33903 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetZ" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
33904 : }
33905 36 : arg1 = static_cast< OGRwkbGeometryType >(val1);
33906 36 : {
33907 36 : const int bLocalUseExceptions = GetUseExceptions();
33908 36 : if ( bLocalUseExceptions ) {
33909 0 : pushErrorHandler();
33910 : }
33911 36 : {
33912 36 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33913 36 : result = (OGRwkbGeometryType)OGR_GT_SetZ(arg1);
33914 36 : SWIG_PYTHON_THREAD_END_ALLOW;
33915 : }
33916 36 : if ( bLocalUseExceptions ) {
33917 0 : popErrorHandler();
33918 : }
33919 : #ifndef SED_HACKS
33920 : if ( bLocalUseExceptions ) {
33921 : CPLErr eclass = CPLGetLastErrorType();
33922 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33923 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33924 : }
33925 : }
33926 : #endif
33927 : }
33928 36 : resultobj = SWIG_From_int(static_cast< int >(result));
33929 36 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33930 : return resultobj;
33931 : fail:
33932 : return NULL;
33933 : }
33934 :
33935 :
33936 36 : SWIGINTERN PyObject *_wrap_GT_SetM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33937 36 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33938 36 : OGRwkbGeometryType arg1 ;
33939 36 : int val1 ;
33940 36 : int ecode1 = 0 ;
33941 36 : PyObject *swig_obj[1] ;
33942 36 : OGRwkbGeometryType result;
33943 :
33944 36 : if (!args) SWIG_fail;
33945 36 : swig_obj[0] = args;
33946 36 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
33947 36 : if (!SWIG_IsOK(ecode1)) {
33948 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetM" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
33949 : }
33950 36 : arg1 = static_cast< OGRwkbGeometryType >(val1);
33951 36 : {
33952 36 : const int bLocalUseExceptions = GetUseExceptions();
33953 36 : if ( bLocalUseExceptions ) {
33954 0 : pushErrorHandler();
33955 : }
33956 36 : {
33957 36 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
33958 36 : result = (OGRwkbGeometryType)OGR_GT_SetM(arg1);
33959 36 : SWIG_PYTHON_THREAD_END_ALLOW;
33960 : }
33961 36 : if ( bLocalUseExceptions ) {
33962 0 : popErrorHandler();
33963 : }
33964 : #ifndef SED_HACKS
33965 : if ( bLocalUseExceptions ) {
33966 : CPLErr eclass = CPLGetLastErrorType();
33967 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
33968 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
33969 : }
33970 : }
33971 : #endif
33972 : }
33973 36 : resultobj = SWIG_From_int(static_cast< int >(result));
33974 36 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
33975 : return resultobj;
33976 : fail:
33977 : return NULL;
33978 : }
33979 :
33980 :
33981 18 : SWIGINTERN PyObject *_wrap_GT_SetModifier(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33982 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
33983 18 : OGRwkbGeometryType arg1 ;
33984 18 : int arg2 ;
33985 18 : int arg3 = (int) FALSE ;
33986 18 : int val1 ;
33987 18 : int ecode1 = 0 ;
33988 18 : int val2 ;
33989 18 : int ecode2 = 0 ;
33990 18 : int val3 ;
33991 18 : int ecode3 = 0 ;
33992 18 : PyObject *swig_obj[3] ;
33993 18 : OGRwkbGeometryType result;
33994 :
33995 18 : if (!SWIG_Python_UnpackTuple(args, "GT_SetModifier", 2, 3, swig_obj)) SWIG_fail;
33996 18 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
33997 18 : if (!SWIG_IsOK(ecode1)) {
33998 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetModifier" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
33999 : }
34000 18 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34001 18 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
34002 18 : if (!SWIG_IsOK(ecode2)) {
34003 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GT_SetModifier" "', argument " "2"" of type '" "int""'");
34004 : }
34005 18 : arg2 = static_cast< int >(val2);
34006 18 : if (swig_obj[2]) {
34007 18 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
34008 18 : if (!SWIG_IsOK(ecode3)) {
34009 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GT_SetModifier" "', argument " "3"" of type '" "int""'");
34010 : }
34011 : arg3 = static_cast< int >(val3);
34012 : }
34013 18 : {
34014 18 : const int bLocalUseExceptions = GetUseExceptions();
34015 18 : if ( bLocalUseExceptions ) {
34016 0 : pushErrorHandler();
34017 : }
34018 18 : {
34019 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34020 18 : result = (OGRwkbGeometryType)GT_SetModifier(arg1,arg2,arg3);
34021 18 : SWIG_PYTHON_THREAD_END_ALLOW;
34022 : }
34023 18 : if ( bLocalUseExceptions ) {
34024 0 : popErrorHandler();
34025 : }
34026 : #ifndef SED_HACKS
34027 : if ( bLocalUseExceptions ) {
34028 : CPLErr eclass = CPLGetLastErrorType();
34029 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34030 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34031 : }
34032 : }
34033 : #endif
34034 : }
34035 18 : resultobj = SWIG_From_int(static_cast< int >(result));
34036 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34037 : return resultobj;
34038 : fail:
34039 : return NULL;
34040 : }
34041 :
34042 :
34043 18 : SWIGINTERN PyObject *_wrap_GT_HasZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34044 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34045 18 : OGRwkbGeometryType arg1 ;
34046 18 : int val1 ;
34047 18 : int ecode1 = 0 ;
34048 18 : PyObject *swig_obj[1] ;
34049 18 : int result;
34050 :
34051 18 : if (!args) SWIG_fail;
34052 18 : swig_obj[0] = args;
34053 18 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34054 18 : if (!SWIG_IsOK(ecode1)) {
34055 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_HasZ" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34056 : }
34057 18 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34058 18 : {
34059 18 : const int bLocalUseExceptions = GetUseExceptions();
34060 18 : if ( bLocalUseExceptions ) {
34061 0 : pushErrorHandler();
34062 : }
34063 18 : {
34064 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34065 18 : result = (int)OGR_GT_HasZ(arg1);
34066 18 : SWIG_PYTHON_THREAD_END_ALLOW;
34067 : }
34068 18 : if ( bLocalUseExceptions ) {
34069 0 : popErrorHandler();
34070 : }
34071 : #ifndef SED_HACKS
34072 : if ( bLocalUseExceptions ) {
34073 : CPLErr eclass = CPLGetLastErrorType();
34074 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34075 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34076 : }
34077 : }
34078 : #endif
34079 : }
34080 18 : resultobj = SWIG_From_int(static_cast< int >(result));
34081 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34082 : return resultobj;
34083 : fail:
34084 : return NULL;
34085 : }
34086 :
34087 :
34088 18 : SWIGINTERN PyObject *_wrap_GT_HasM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34089 18 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34090 18 : OGRwkbGeometryType arg1 ;
34091 18 : int val1 ;
34092 18 : int ecode1 = 0 ;
34093 18 : PyObject *swig_obj[1] ;
34094 18 : int result;
34095 :
34096 18 : if (!args) SWIG_fail;
34097 18 : swig_obj[0] = args;
34098 18 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34099 18 : if (!SWIG_IsOK(ecode1)) {
34100 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_HasM" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34101 : }
34102 18 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34103 18 : {
34104 18 : const int bLocalUseExceptions = GetUseExceptions();
34105 18 : if ( bLocalUseExceptions ) {
34106 0 : pushErrorHandler();
34107 : }
34108 18 : {
34109 18 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34110 18 : result = (int)OGR_GT_HasM(arg1);
34111 18 : SWIG_PYTHON_THREAD_END_ALLOW;
34112 : }
34113 18 : if ( bLocalUseExceptions ) {
34114 0 : popErrorHandler();
34115 : }
34116 : #ifndef SED_HACKS
34117 : if ( bLocalUseExceptions ) {
34118 : CPLErr eclass = CPLGetLastErrorType();
34119 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34120 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34121 : }
34122 : }
34123 : #endif
34124 : }
34125 18 : resultobj = SWIG_From_int(static_cast< int >(result));
34126 18 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34127 : return resultobj;
34128 : fail:
34129 : return NULL;
34130 : }
34131 :
34132 :
34133 14 : SWIGINTERN PyObject *_wrap_GT_IsSubClassOf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34134 14 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34135 14 : OGRwkbGeometryType arg1 ;
34136 14 : OGRwkbGeometryType arg2 ;
34137 14 : int val1 ;
34138 14 : int ecode1 = 0 ;
34139 14 : int val2 ;
34140 14 : int ecode2 = 0 ;
34141 14 : PyObject *swig_obj[2] ;
34142 14 : int result;
34143 :
34144 14 : if (!SWIG_Python_UnpackTuple(args, "GT_IsSubClassOf", 2, 2, swig_obj)) SWIG_fail;
34145 14 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34146 14 : if (!SWIG_IsOK(ecode1)) {
34147 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsSubClassOf" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34148 : }
34149 14 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34150 14 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
34151 14 : if (!SWIG_IsOK(ecode2)) {
34152 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GT_IsSubClassOf" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
34153 : }
34154 14 : arg2 = static_cast< OGRwkbGeometryType >(val2);
34155 14 : {
34156 14 : const int bLocalUseExceptions = GetUseExceptions();
34157 14 : if ( bLocalUseExceptions ) {
34158 0 : pushErrorHandler();
34159 : }
34160 14 : {
34161 14 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34162 14 : result = (int)OGR_GT_IsSubClassOf(arg1,arg2);
34163 14 : SWIG_PYTHON_THREAD_END_ALLOW;
34164 : }
34165 14 : if ( bLocalUseExceptions ) {
34166 0 : popErrorHandler();
34167 : }
34168 : #ifndef SED_HACKS
34169 : if ( bLocalUseExceptions ) {
34170 : CPLErr eclass = CPLGetLastErrorType();
34171 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34172 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34173 : }
34174 : }
34175 : #endif
34176 : }
34177 14 : resultobj = SWIG_From_int(static_cast< int >(result));
34178 14 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34179 : return resultobj;
34180 : fail:
34181 : return NULL;
34182 : }
34183 :
34184 :
34185 15 : SWIGINTERN PyObject *_wrap_GT_IsCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34186 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34187 15 : OGRwkbGeometryType arg1 ;
34188 15 : int val1 ;
34189 15 : int ecode1 = 0 ;
34190 15 : PyObject *swig_obj[1] ;
34191 15 : int result;
34192 :
34193 15 : if (!args) SWIG_fail;
34194 15 : swig_obj[0] = args;
34195 15 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34196 15 : if (!SWIG_IsOK(ecode1)) {
34197 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsCurve" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34198 : }
34199 15 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34200 15 : {
34201 15 : const int bLocalUseExceptions = GetUseExceptions();
34202 15 : if ( bLocalUseExceptions ) {
34203 0 : pushErrorHandler();
34204 : }
34205 15 : {
34206 15 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34207 15 : result = (int)OGR_GT_IsCurve(arg1);
34208 15 : SWIG_PYTHON_THREAD_END_ALLOW;
34209 : }
34210 15 : if ( bLocalUseExceptions ) {
34211 0 : popErrorHandler();
34212 : }
34213 : #ifndef SED_HACKS
34214 : if ( bLocalUseExceptions ) {
34215 : CPLErr eclass = CPLGetLastErrorType();
34216 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34217 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34218 : }
34219 : }
34220 : #endif
34221 : }
34222 15 : resultobj = SWIG_From_int(static_cast< int >(result));
34223 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34224 : return resultobj;
34225 : fail:
34226 : return NULL;
34227 : }
34228 :
34229 :
34230 13 : SWIGINTERN PyObject *_wrap_GT_IsSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34231 13 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34232 13 : OGRwkbGeometryType arg1 ;
34233 13 : int val1 ;
34234 13 : int ecode1 = 0 ;
34235 13 : PyObject *swig_obj[1] ;
34236 13 : int result;
34237 :
34238 13 : if (!args) SWIG_fail;
34239 13 : swig_obj[0] = args;
34240 13 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34241 13 : if (!SWIG_IsOK(ecode1)) {
34242 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsSurface" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34243 : }
34244 13 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34245 13 : {
34246 13 : const int bLocalUseExceptions = GetUseExceptions();
34247 13 : if ( bLocalUseExceptions ) {
34248 0 : pushErrorHandler();
34249 : }
34250 13 : {
34251 13 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34252 13 : result = (int)OGR_GT_IsSurface(arg1);
34253 13 : SWIG_PYTHON_THREAD_END_ALLOW;
34254 : }
34255 13 : if ( bLocalUseExceptions ) {
34256 0 : popErrorHandler();
34257 : }
34258 : #ifndef SED_HACKS
34259 : if ( bLocalUseExceptions ) {
34260 : CPLErr eclass = CPLGetLastErrorType();
34261 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34262 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34263 : }
34264 : }
34265 : #endif
34266 : }
34267 13 : resultobj = SWIG_From_int(static_cast< int >(result));
34268 13 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34269 : return resultobj;
34270 : fail:
34271 : return NULL;
34272 : }
34273 :
34274 :
34275 15 : SWIGINTERN PyObject *_wrap_GT_IsNonLinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34276 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34277 15 : OGRwkbGeometryType arg1 ;
34278 15 : int val1 ;
34279 15 : int ecode1 = 0 ;
34280 15 : PyObject *swig_obj[1] ;
34281 15 : int result;
34282 :
34283 15 : if (!args) SWIG_fail;
34284 15 : swig_obj[0] = args;
34285 15 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34286 15 : if (!SWIG_IsOK(ecode1)) {
34287 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsNonLinear" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34288 : }
34289 15 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34290 15 : {
34291 15 : const int bLocalUseExceptions = GetUseExceptions();
34292 15 : if ( bLocalUseExceptions ) {
34293 0 : pushErrorHandler();
34294 : }
34295 15 : {
34296 15 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34297 15 : result = (int)OGR_GT_IsNonLinear(arg1);
34298 15 : SWIG_PYTHON_THREAD_END_ALLOW;
34299 : }
34300 15 : if ( bLocalUseExceptions ) {
34301 0 : popErrorHandler();
34302 : }
34303 : #ifndef SED_HACKS
34304 : if ( bLocalUseExceptions ) {
34305 : CPLErr eclass = CPLGetLastErrorType();
34306 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34307 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34308 : }
34309 : }
34310 : #endif
34311 : }
34312 15 : resultobj = SWIG_From_int(static_cast< int >(result));
34313 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34314 : return resultobj;
34315 : fail:
34316 : return NULL;
34317 : }
34318 :
34319 :
34320 9 : SWIGINTERN PyObject *_wrap_GT_GetCollection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34321 9 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34322 9 : OGRwkbGeometryType arg1 ;
34323 9 : int val1 ;
34324 9 : int ecode1 = 0 ;
34325 9 : PyObject *swig_obj[1] ;
34326 9 : OGRwkbGeometryType result;
34327 :
34328 9 : if (!args) SWIG_fail;
34329 9 : swig_obj[0] = args;
34330 9 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34331 9 : if (!SWIG_IsOK(ecode1)) {
34332 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetCollection" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34333 : }
34334 9 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34335 9 : {
34336 9 : const int bLocalUseExceptions = GetUseExceptions();
34337 9 : if ( bLocalUseExceptions ) {
34338 0 : pushErrorHandler();
34339 : }
34340 9 : {
34341 9 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34342 9 : result = (OGRwkbGeometryType)OGR_GT_GetCollection(arg1);
34343 9 : SWIG_PYTHON_THREAD_END_ALLOW;
34344 : }
34345 9 : if ( bLocalUseExceptions ) {
34346 0 : popErrorHandler();
34347 : }
34348 : #ifndef SED_HACKS
34349 : if ( bLocalUseExceptions ) {
34350 : CPLErr eclass = CPLGetLastErrorType();
34351 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34352 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34353 : }
34354 : }
34355 : #endif
34356 : }
34357 9 : resultobj = SWIG_From_int(static_cast< int >(result));
34358 9 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34359 : return resultobj;
34360 : fail:
34361 : return NULL;
34362 : }
34363 :
34364 :
34365 16 : SWIGINTERN PyObject *_wrap_GT_GetCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34366 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34367 16 : OGRwkbGeometryType arg1 ;
34368 16 : int val1 ;
34369 16 : int ecode1 = 0 ;
34370 16 : PyObject *swig_obj[1] ;
34371 16 : OGRwkbGeometryType result;
34372 :
34373 16 : if (!args) SWIG_fail;
34374 16 : swig_obj[0] = args;
34375 16 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34376 16 : if (!SWIG_IsOK(ecode1)) {
34377 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetCurve" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34378 : }
34379 16 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34380 16 : {
34381 16 : const int bLocalUseExceptions = GetUseExceptions();
34382 16 : if ( bLocalUseExceptions ) {
34383 0 : pushErrorHandler();
34384 : }
34385 16 : {
34386 16 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34387 16 : result = (OGRwkbGeometryType)OGR_GT_GetCurve(arg1);
34388 16 : SWIG_PYTHON_THREAD_END_ALLOW;
34389 : }
34390 16 : if ( bLocalUseExceptions ) {
34391 0 : popErrorHandler();
34392 : }
34393 : #ifndef SED_HACKS
34394 : if ( bLocalUseExceptions ) {
34395 : CPLErr eclass = CPLGetLastErrorType();
34396 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34397 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34398 : }
34399 : }
34400 : #endif
34401 : }
34402 16 : resultobj = SWIG_From_int(static_cast< int >(result));
34403 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34404 : return resultobj;
34405 : fail:
34406 : return NULL;
34407 : }
34408 :
34409 :
34410 16 : SWIGINTERN PyObject *_wrap_GT_GetLinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34411 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34412 16 : OGRwkbGeometryType arg1 ;
34413 16 : int val1 ;
34414 16 : int ecode1 = 0 ;
34415 16 : PyObject *swig_obj[1] ;
34416 16 : OGRwkbGeometryType result;
34417 :
34418 16 : if (!args) SWIG_fail;
34419 16 : swig_obj[0] = args;
34420 16 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34421 16 : if (!SWIG_IsOK(ecode1)) {
34422 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetLinear" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
34423 : }
34424 16 : arg1 = static_cast< OGRwkbGeometryType >(val1);
34425 16 : {
34426 16 : const int bLocalUseExceptions = GetUseExceptions();
34427 16 : if ( bLocalUseExceptions ) {
34428 0 : pushErrorHandler();
34429 : }
34430 16 : {
34431 16 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34432 16 : result = (OGRwkbGeometryType)OGR_GT_GetLinear(arg1);
34433 16 : SWIG_PYTHON_THREAD_END_ALLOW;
34434 : }
34435 16 : if ( bLocalUseExceptions ) {
34436 0 : popErrorHandler();
34437 : }
34438 : #ifndef SED_HACKS
34439 : if ( bLocalUseExceptions ) {
34440 : CPLErr eclass = CPLGetLastErrorType();
34441 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34442 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34443 : }
34444 : }
34445 : #endif
34446 : }
34447 16 : resultobj = SWIG_From_int(static_cast< int >(result));
34448 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34449 : return resultobj;
34450 : fail:
34451 : return NULL;
34452 : }
34453 :
34454 :
34455 2 : SWIGINTERN PyObject *_wrap_SetNonLinearGeometriesEnabledFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34456 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34457 2 : int arg1 ;
34458 2 : int val1 ;
34459 2 : int ecode1 = 0 ;
34460 2 : PyObject *swig_obj[1] ;
34461 :
34462 2 : if (!args) SWIG_fail;
34463 2 : swig_obj[0] = args;
34464 2 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34465 2 : if (!SWIG_IsOK(ecode1)) {
34466 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetNonLinearGeometriesEnabledFlag" "', argument " "1"" of type '" "int""'");
34467 : }
34468 2 : arg1 = static_cast< int >(val1);
34469 2 : {
34470 2 : const int bLocalUseExceptions = GetUseExceptions();
34471 2 : if ( bLocalUseExceptions ) {
34472 0 : pushErrorHandler();
34473 : }
34474 2 : {
34475 2 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34476 2 : OGRSetNonLinearGeometriesEnabledFlag(arg1);
34477 2 : SWIG_PYTHON_THREAD_END_ALLOW;
34478 : }
34479 2 : if ( bLocalUseExceptions ) {
34480 0 : popErrorHandler();
34481 : }
34482 : #ifndef SED_HACKS
34483 : if ( bLocalUseExceptions ) {
34484 : CPLErr eclass = CPLGetLastErrorType();
34485 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34486 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34487 : }
34488 : }
34489 : #endif
34490 : }
34491 2 : resultobj = SWIG_Py_Void();
34492 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34493 : return resultobj;
34494 : fail:
34495 : return NULL;
34496 : }
34497 :
34498 :
34499 1 : SWIGINTERN PyObject *_wrap_GetNonLinearGeometriesEnabledFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34500 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34501 1 : int result;
34502 :
34503 1 : if (!SWIG_Python_UnpackTuple(args, "GetNonLinearGeometriesEnabledFlag", 0, 0, 0)) SWIG_fail;
34504 1 : {
34505 1 : const int bLocalUseExceptions = GetUseExceptions();
34506 1 : if ( bLocalUseExceptions ) {
34507 0 : pushErrorHandler();
34508 : }
34509 1 : {
34510 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34511 1 : result = (int)OGRGetNonLinearGeometriesEnabledFlag();
34512 1 : SWIG_PYTHON_THREAD_END_ALLOW;
34513 : }
34514 1 : if ( bLocalUseExceptions ) {
34515 0 : popErrorHandler();
34516 : }
34517 : #ifndef SED_HACKS
34518 : if ( bLocalUseExceptions ) {
34519 : CPLErr eclass = CPLGetLastErrorType();
34520 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34521 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34522 : }
34523 : }
34524 : #endif
34525 : }
34526 1 : resultobj = SWIG_From_int(static_cast< int >(result));
34527 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34528 : return resultobj;
34529 0 : fail:
34530 0 : return NULL;
34531 : }
34532 :
34533 :
34534 1 : SWIGINTERN PyObject *_wrap_GetOpenDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34535 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34536 1 : int arg1 ;
34537 1 : int val1 ;
34538 1 : int ecode1 = 0 ;
34539 1 : PyObject *swig_obj[1] ;
34540 1 : OGRDataSourceShadow *result = 0 ;
34541 :
34542 1 : if (!args) SWIG_fail;
34543 1 : swig_obj[0] = args;
34544 1 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34545 1 : if (!SWIG_IsOK(ecode1)) {
34546 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetOpenDS" "', argument " "1"" of type '" "int""'");
34547 : }
34548 1 : arg1 = static_cast< int >(val1);
34549 1 : {
34550 1 : const int bLocalUseExceptions = GetUseExceptions();
34551 1 : if ( bLocalUseExceptions ) {
34552 0 : pushErrorHandler();
34553 : }
34554 1 : {
34555 1 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34556 1 : result = (OGRDataSourceShadow *)GetOpenDS(arg1);
34557 1 : SWIG_PYTHON_THREAD_END_ALLOW;
34558 : }
34559 1 : if ( bLocalUseExceptions ) {
34560 0 : popErrorHandler();
34561 : }
34562 : #ifndef SED_HACKS
34563 : if ( bLocalUseExceptions ) {
34564 : CPLErr eclass = CPLGetLastErrorType();
34565 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34566 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34567 : }
34568 : }
34569 : #endif
34570 : }
34571 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 | 0 );
34572 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34573 : return resultobj;
34574 : fail:
34575 : return NULL;
34576 : }
34577 :
34578 :
34579 6390 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
34580 6390 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34581 6390 : char *arg1 = (char *) 0 ;
34582 6390 : int arg2 = (int) 0 ;
34583 6390 : int bToFree1 = 0 ;
34584 6390 : int val2 ;
34585 6390 : int ecode2 = 0 ;
34586 6390 : PyObject * obj0 = 0 ;
34587 6390 : PyObject * obj1 = 0 ;
34588 6390 : char * kwnames[] = {
34589 : (char *)"utf8_path", (char *)"update", NULL
34590 : };
34591 6390 : OGRDataSourceShadow *result = 0 ;
34592 :
34593 6390 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Open", kwnames, &obj0, &obj1)) SWIG_fail;
34594 6390 : {
34595 : /* %typemap(in) (const char *utf8_path) */
34596 6390 : if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
34597 : {
34598 3230 : arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
34599 : }
34600 : else
34601 : {
34602 3160 : arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
34603 :
34604 : }
34605 6390 : if (arg1 == NULL)
34606 : {
34607 1 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
34608 1 : SWIG_fail;
34609 : }
34610 : }
34611 6389 : if (obj1) {
34612 1639 : ecode2 = SWIG_AsVal_int(obj1, &val2);
34613 1639 : if (!SWIG_IsOK(ecode2)) {
34614 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "int""'");
34615 : }
34616 : arg2 = static_cast< int >(val2);
34617 : }
34618 6389 : {
34619 6389 : const int bLocalUseExceptions = GetUseExceptions();
34620 6389 : if ( bLocalUseExceptions ) {
34621 1917 : pushErrorHandler();
34622 : }
34623 6389 : {
34624 6389 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34625 6389 : result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
34626 6389 : SWIG_PYTHON_THREAD_END_ALLOW;
34627 : }
34628 6389 : if ( bLocalUseExceptions ) {
34629 1917 : popErrorHandler();
34630 : }
34631 : #ifndef SED_HACKS
34632 : if( result == NULL && bLocalUseExceptions ) {
34633 : CPLErr eclass = CPLGetLastErrorType();
34634 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34635 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34636 : }
34637 : }
34638 : #endif
34639 6389 : if( result != NULL && bLocalUseExceptions ) {
34640 : #ifdef SED_HACKS
34641 1847 : bLocalUseExceptionsCode = FALSE;
34642 : #endif
34643 : }
34644 : }
34645 6389 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN | 0 );
34646 6389 : {
34647 : /* %typemap(freearg) (const char *utf8_path) */
34648 6389 : GDALPythonFreeCStr(arg1, bToFree1);
34649 : }
34650 6459 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34651 : return resultobj;
34652 1 : fail:
34653 1 : {
34654 : /* %typemap(freearg) (const char *utf8_path) */
34655 6390 : GDALPythonFreeCStr(arg1, bToFree1);
34656 : }
34657 : return NULL;
34658 : }
34659 :
34660 :
34661 23 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
34662 23 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34663 23 : char *arg1 = (char *) 0 ;
34664 23 : int arg2 = (int) 0 ;
34665 23 : int bToFree1 = 0 ;
34666 23 : int val2 ;
34667 23 : int ecode2 = 0 ;
34668 23 : PyObject * obj0 = 0 ;
34669 23 : PyObject * obj1 = 0 ;
34670 23 : char * kwnames[] = {
34671 : (char *)"utf8_path", (char *)"update", NULL
34672 : };
34673 23 : OGRDataSourceShadow *result = 0 ;
34674 :
34675 23 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:OpenShared", kwnames, &obj0, &obj1)) SWIG_fail;
34676 23 : {
34677 : /* %typemap(in) (const char *utf8_path) */
34678 23 : if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
34679 : {
34680 23 : arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
34681 : }
34682 : else
34683 : {
34684 0 : arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
34685 :
34686 : }
34687 23 : if (arg1 == NULL)
34688 : {
34689 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
34690 0 : SWIG_fail;
34691 : }
34692 : }
34693 23 : if (obj1) {
34694 14 : ecode2 = SWIG_AsVal_int(obj1, &val2);
34695 14 : if (!SWIG_IsOK(ecode2)) {
34696 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "int""'");
34697 : }
34698 : arg2 = static_cast< int >(val2);
34699 : }
34700 23 : {
34701 23 : const int bLocalUseExceptions = GetUseExceptions();
34702 23 : if ( bLocalUseExceptions ) {
34703 14 : pushErrorHandler();
34704 : }
34705 23 : {
34706 23 : SWIG_PYTHON_THREAD_BEGIN_ALLOW;
34707 23 : result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
34708 23 : SWIG_PYTHON_THREAD_END_ALLOW;
34709 : }
34710 23 : if ( bLocalUseExceptions ) {
34711 14 : popErrorHandler();
34712 : }
34713 : #ifndef SED_HACKS
34714 : if( result == NULL && bLocalUseExceptions ) {
34715 : CPLErr eclass = CPLGetLastErrorType();
34716 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34717 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34718 : }
34719 : }
34720 : #endif
34721 23 : if( result != NULL && bLocalUseExceptions ) {
34722 : #ifdef SED_HACKS
34723 14 : bLocalUseExceptionsCode = FALSE;
34724 : #endif
34725 : }
34726 : }
34727 23 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN | 0 );
34728 23 : {
34729 : /* %typemap(freearg) (const char *utf8_path) */
34730 23 : GDALPythonFreeCStr(arg1, bToFree1);
34731 : }
34732 23 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34733 : return resultobj;
34734 0 : fail:
34735 0 : {
34736 : /* %typemap(freearg) (const char *utf8_path) */
34737 23 : GDALPythonFreeCStr(arg1, bToFree1);
34738 : }
34739 : return NULL;
34740 : }
34741 :
34742 :
34743 2410 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34744 2410 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34745 2410 : char *arg1 = (char *) 0 ;
34746 2410 : int res1 ;
34747 2410 : char *buf1 = 0 ;
34748 2410 : int alloc1 = 0 ;
34749 2410 : PyObject *swig_obj[1] ;
34750 2410 : OGRDriverShadow *result = 0 ;
34751 :
34752 2410 : if (!args) SWIG_fail;
34753 2410 : swig_obj[0] = args;
34754 2410 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
34755 2410 : if (!SWIG_IsOK(res1)) {
34756 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
34757 : }
34758 2410 : arg1 = reinterpret_cast< char * >(buf1);
34759 2410 : {
34760 2410 : const int bLocalUseExceptions = GetUseExceptions();
34761 2410 : if ( bLocalUseExceptions ) {
34762 910 : pushErrorHandler();
34763 : }
34764 2410 : result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
34765 2410 : if ( bLocalUseExceptions ) {
34766 910 : popErrorHandler();
34767 : }
34768 : #ifndef SED_HACKS
34769 : if ( bLocalUseExceptions ) {
34770 : CPLErr eclass = CPLGetLastErrorType();
34771 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34772 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34773 : }
34774 : }
34775 : #endif
34776 : }
34777 2410 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 | 0 );
34778 2410 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
34779 2410 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34780 : return resultobj;
34781 0 : fail:
34782 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
34783 : return NULL;
34784 : }
34785 :
34786 :
34787 0 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34788 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34789 0 : int arg1 ;
34790 0 : int val1 ;
34791 0 : int ecode1 = 0 ;
34792 0 : PyObject *swig_obj[1] ;
34793 0 : OGRDriverShadow *result = 0 ;
34794 :
34795 0 : if (!args) SWIG_fail;
34796 0 : swig_obj[0] = args;
34797 0 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
34798 0 : if (!SWIG_IsOK(ecode1)) {
34799 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
34800 : }
34801 0 : arg1 = static_cast< int >(val1);
34802 0 : {
34803 0 : const int bLocalUseExceptions = GetUseExceptions();
34804 0 : if ( bLocalUseExceptions ) {
34805 0 : pushErrorHandler();
34806 : }
34807 0 : result = (OGRDriverShadow *)GetDriver(arg1);
34808 0 : if ( bLocalUseExceptions ) {
34809 0 : popErrorHandler();
34810 : }
34811 : #ifndef SED_HACKS
34812 : if ( bLocalUseExceptions ) {
34813 : CPLErr eclass = CPLGetLastErrorType();
34814 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34815 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34816 : }
34817 : }
34818 : #endif
34819 : }
34820 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 | 0 );
34821 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34822 : return resultobj;
34823 : fail:
34824 : return NULL;
34825 : }
34826 :
34827 :
34828 59 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34829 59 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34830 59 : char **arg1 = (char **) 0 ;
34831 59 : int arg2 = (int) 0 ;
34832 59 : int val2 ;
34833 59 : int ecode2 = 0 ;
34834 59 : PyObject *swig_obj[2] ;
34835 59 : char **result = 0 ;
34836 :
34837 59 : if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
34838 59 : {
34839 : /* %typemap(in) char **dict */
34840 59 : arg1 = NULL;
34841 59 : if ( PySequence_Check( swig_obj[0] ) ) {
34842 59 : int bErr = FALSE;
34843 59 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
34844 59 : if ( bErr )
34845 : {
34846 0 : SWIG_fail;
34847 : }
34848 : }
34849 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
34850 0 : int bErr = FALSE;
34851 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
34852 0 : if ( bErr )
34853 : {
34854 0 : SWIG_fail;
34855 : }
34856 : }
34857 : else {
34858 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
34859 0 : SWIG_fail;
34860 : }
34861 : }
34862 59 : if (swig_obj[1]) {
34863 0 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
34864 0 : if (!SWIG_IsOK(ecode2)) {
34865 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
34866 : }
34867 : arg2 = static_cast< int >(val2);
34868 : }
34869 59 : {
34870 59 : const int bLocalUseExceptions = GetUseExceptions();
34871 59 : if ( bLocalUseExceptions ) {
34872 45 : pushErrorHandler();
34873 : }
34874 59 : result = (char **)GeneralCmdLineProcessor(arg1,arg2);
34875 59 : if ( bLocalUseExceptions ) {
34876 45 : popErrorHandler();
34877 : }
34878 : #ifndef SED_HACKS
34879 : if ( bLocalUseExceptions ) {
34880 : CPLErr eclass = CPLGetLastErrorType();
34881 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34882 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34883 : }
34884 : }
34885 : #endif
34886 : }
34887 59 : {
34888 : /* %typemap(out) char **CSL -> ( string ) */
34889 59 : bool bErr = false;
34890 59 : resultobj = CSLToList(result, &bErr);
34891 59 : CSLDestroy(result);
34892 59 : if( bErr ) {
34893 0 : SWIG_fail;
34894 : }
34895 : }
34896 59 : {
34897 : /* %typemap(freearg) char **dict */
34898 59 : CSLDestroy( arg1 );
34899 : }
34900 59 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34901 : return resultobj;
34902 0 : fail:
34903 0 : {
34904 : /* %typemap(freearg) char **dict */
34905 0 : CSLDestroy( arg1 );
34906 : }
34907 : return NULL;
34908 : }
34909 :
34910 :
34911 11 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
34912 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
34913 11 : double arg1 ;
34914 11 : char *arg2 = (char *) NULL ;
34915 11 : void *arg3 = (void *) NULL ;
34916 11 : double val1 ;
34917 11 : int ecode1 = 0 ;
34918 11 : int res2 ;
34919 11 : char *buf2 = 0 ;
34920 11 : int alloc2 = 0 ;
34921 11 : int res3 ;
34922 11 : PyObject * obj0 = 0 ;
34923 11 : PyObject * obj1 = 0 ;
34924 11 : PyObject * obj2 = 0 ;
34925 11 : char * kwnames[] = {
34926 : (char *)"dfProgress", (char *)"pszMessage", (char *)"pData", NULL
34927 : };
34928 11 : int result;
34929 :
34930 11 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
34931 11 : ecode1 = SWIG_AsVal_double(obj0, &val1);
34932 11 : if (!SWIG_IsOK(ecode1)) {
34933 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
34934 : }
34935 11 : arg1 = static_cast< double >(val1);
34936 11 : if (obj1) {
34937 11 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
34938 11 : if (!SWIG_IsOK(res2)) {
34939 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
34940 : }
34941 11 : arg2 = reinterpret_cast< char * >(buf2);
34942 : }
34943 11 : if (obj2) {
34944 11 : res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
34945 11 : if (!SWIG_IsOK(res3)) {
34946 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'");
34947 : }
34948 : }
34949 11 : {
34950 11 : const int bLocalUseExceptions = GetUseExceptions();
34951 11 : if ( bLocalUseExceptions ) {
34952 11 : pushErrorHandler();
34953 : }
34954 11 : result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
34955 11 : if ( bLocalUseExceptions ) {
34956 11 : popErrorHandler();
34957 : }
34958 : #ifndef SED_HACKS
34959 : if ( bLocalUseExceptions ) {
34960 : CPLErr eclass = CPLGetLastErrorType();
34961 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
34962 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
34963 : }
34964 : }
34965 : #endif
34966 : }
34967 11 : resultobj = SWIG_From_int(static_cast< int >(result));
34968 11 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
34969 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
34970 : return resultobj;
34971 0 : fail:
34972 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
34973 : return NULL;
34974 : }
34975 :
34976 :
34977 : static PyMethodDef SwigMethods[] = {
34978 : { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
34979 : { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
34980 : { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
34981 : { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
34982 : { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
34983 : { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
34984 : { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
34985 : { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
34986 : { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
34987 : { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
34988 : { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
34989 : { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
34990 : { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
34991 : "MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
34992 : "MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
34993 : ""},
34994 : { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
34995 : { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
34996 : { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
34997 : { "GetGEOSVersionMajor", _wrap_GetGEOSVersionMajor, METH_NOARGS, "GetGEOSVersionMajor() -> int"},
34998 : { "GetGEOSVersionMinor", _wrap_GetGEOSVersionMinor, METH_NOARGS, "GetGEOSVersionMinor() -> int"},
34999 : { "GetGEOSVersionMicro", _wrap_GetGEOSVersionMicro, METH_NOARGS, "GetGEOSVersionMicro() -> int"},
35000 : { "new_StyleTable", _wrap_new_StyleTable, METH_NOARGS, "new_StyleTable() -> StyleTable"},
35001 : { "delete_StyleTable", _wrap_delete_StyleTable, METH_O, "delete_StyleTable(StyleTable self)"},
35002 : { "StyleTable_AddStyle", _wrap_StyleTable_AddStyle, METH_VARARGS, "StyleTable_AddStyle(StyleTable self, char const * pszName, char const * pszStyleString) -> int"},
35003 : { "StyleTable_LoadStyleTable", _wrap_StyleTable_LoadStyleTable, METH_VARARGS, "StyleTable_LoadStyleTable(StyleTable self, char const * utf8_path) -> int"},
35004 : { "StyleTable_SaveStyleTable", _wrap_StyleTable_SaveStyleTable, METH_VARARGS, "StyleTable_SaveStyleTable(StyleTable self, char const * utf8_path) -> int"},
35005 : { "StyleTable_Find", _wrap_StyleTable_Find, METH_VARARGS, "StyleTable_Find(StyleTable self, char const * pszName) -> char const *"},
35006 : { "StyleTable_ResetStyleStringReading", _wrap_StyleTable_ResetStyleStringReading, METH_O, "StyleTable_ResetStyleStringReading(StyleTable self)"},
35007 : { "StyleTable_GetNextStyle", _wrap_StyleTable_GetNextStyle, METH_O, "StyleTable_GetNextStyle(StyleTable self) -> char const *"},
35008 : { "StyleTable_GetLastStyleName", _wrap_StyleTable_GetLastStyleName, METH_O, "StyleTable_GetLastStyleName(StyleTable self) -> char const *"},
35009 : { "StyleTable_swigregister", StyleTable_swigregister, METH_O, NULL},
35010 : { "StyleTable_swiginit", StyleTable_swiginit, METH_VARARGS, NULL},
35011 : { "new_ArrowArray", _wrap_new_ArrowArray, METH_NOARGS, "new_ArrowArray() -> ArrowArray"},
35012 : { "delete_ArrowArray", _wrap_delete_ArrowArray, METH_O, "delete_ArrowArray(ArrowArray self)"},
35013 : { "ArrowArray__getPtr", _wrap_ArrowArray__getPtr, METH_O, "ArrowArray__getPtr(ArrowArray self) -> VoidPtrAsLong"},
35014 : { "ArrowArray_GetChildrenCount", _wrap_ArrowArray_GetChildrenCount, METH_O, "ArrowArray_GetChildrenCount(ArrowArray self) -> GIntBig"},
35015 : { "ArrowArray_GetLength", _wrap_ArrowArray_GetLength, METH_O, "ArrowArray_GetLength(ArrowArray self) -> GIntBig"},
35016 : { "ArrowArray_swigregister", ArrowArray_swigregister, METH_O, NULL},
35017 : { "ArrowArray_swiginit", ArrowArray_swiginit, METH_VARARGS, NULL},
35018 : { "new_ArrowSchema", _wrap_new_ArrowSchema, METH_NOARGS, "new_ArrowSchema() -> ArrowSchema"},
35019 : { "delete_ArrowSchema", _wrap_delete_ArrowSchema, METH_O, "delete_ArrowSchema(ArrowSchema self)"},
35020 : { "ArrowSchema__getPtr", _wrap_ArrowSchema__getPtr, METH_O, "ArrowSchema__getPtr(ArrowSchema self) -> VoidPtrAsLong"},
35021 : { "ArrowSchema_GetName", _wrap_ArrowSchema_GetName, METH_O, "ArrowSchema_GetName(ArrowSchema self) -> char const *"},
35022 : { "ArrowSchema_GetChildrenCount", _wrap_ArrowSchema_GetChildrenCount, METH_O, "ArrowSchema_GetChildrenCount(ArrowSchema self) -> GIntBig"},
35023 : { "ArrowSchema_GetChild", _wrap_ArrowSchema_GetChild, METH_VARARGS, "ArrowSchema_GetChild(ArrowSchema self, int iChild) -> ArrowSchema"},
35024 : { "ArrowSchema_swigregister", ArrowSchema_swigregister, METH_O, NULL},
35025 : { "ArrowSchema_swiginit", ArrowSchema_swiginit, METH_VARARGS, NULL},
35026 : { "delete_ArrowArrayStream", _wrap_delete_ArrowArrayStream, METH_O, "delete_ArrowArrayStream(ArrowArrayStream self)"},
35027 : { "ArrowArrayStream_GetSchema", _wrap_ArrowArrayStream_GetSchema, METH_O, "ArrowArrayStream_GetSchema(ArrowArrayStream self) -> ArrowSchema"},
35028 : { "ArrowArrayStream_GetNextRecordBatch", _wrap_ArrowArrayStream_GetNextRecordBatch, METH_VARARGS, "ArrowArrayStream_GetNextRecordBatch(ArrowArrayStream self, char ** options=None) -> ArrowArray"},
35029 : { "ArrowArrayStream_swigregister", ArrowArrayStream_swigregister, METH_O, NULL},
35030 : { "Layer_GetDataset", _wrap_Layer_GetDataset, METH_O, "\n"
35031 : "Layer_GetDataset(Layer self) -> GDALDatasetShadow *\n"
35032 : "\n"
35033 : "Return the dataset associated with this layer.\n"
35034 : "\n"
35035 : "For more details: :cpp:func:`OGR_L_GetDataset`\n"
35036 : "\n"
35037 : "Returns\n"
35038 : "-------\n"
35039 : "Dataset:\n"
35040 : " Dataset or None\n"
35041 : "\n"
35042 : ""},
35043 : { "Layer_Rename", _wrap_Layer_Rename, METH_VARARGS, "Layer_Rename(Layer self, char const * new_name) -> OGRErr"},
35044 : { "Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_O, "\n"
35045 : "Layer_GetRefCount(Layer self) -> int\n"
35046 : "\n"
35047 : "For more details: :cpp:func:`OGR_L_GetRefCount`\n"
35048 : "\n"
35049 : ""},
35050 : { "Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, "\n"
35051 : "Layer_SetSpatialFilter(Layer self, Geometry filter)\n"
35052 : "Layer_SetSpatialFilter(Layer self, int iGeomField, Geometry filter)\n"
35053 : "\n"
35054 : "Set a new spatial filter.\n"
35055 : "\n"
35056 : "For more details:\n"
35057 : "\n"
35058 : "- :cpp:func:`OGR_L_SetSpatialFilter`\n"
35059 : "- :cpp:func:`OGR_L_SetSpatialFilterEx`\n"
35060 : "\n"
35061 : "Parameters\n"
35062 : "-----------\n"
35063 : "iGeomField: int, optional\n"
35064 : " index of the geometry field on which the spatial filter operates.\n"
35065 : "filter: Geometry\n"
35066 : " The geometry to use as a filtering region. None may\n"
35067 : " be passed indicating that the current spatial filter should be\n"
35068 : " cleared, but no new one instituted.\n"
35069 : "\n"
35070 : ""},
35071 : { "Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, "\n"
35072 : "Layer_SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, double maxy)\n"
35073 : "Layer_SetSpatialFilterRect(Layer self, int iGeomField, double minx, double miny, double maxx, double maxy)\n"
35074 : "\n"
35075 : "Set a new rectangular spatial filter.\n"
35076 : "\n"
35077 : "For more details:\n"
35078 : "\n"
35079 : "- :cpp:func:`OGR_L_SetSpatialFilterRect`\n"
35080 : "- :cpp:func:`OGR_L_SetSpatialFilterRectEx`\n"
35081 : "\n"
35082 : "Parameters\n"
35083 : "-----------\n"
35084 : "iGeomField: int, optional\n"
35085 : " index of the geometry field on which the spatial filter operates.\n"
35086 : "minx: float\n"
35087 : " the minimum X coordinate for the rectangular region.\n"
35088 : "miny: float\n"
35089 : " the minimum Y coordinate for the rectangular region.\n"
35090 : "maxx: float\n"
35091 : " the maximum X coordinate for the rectangular region.\n"
35092 : "maxy: float\n"
35093 : " the maximum Y coordinate for the rectangular region.\n"
35094 : "\n"
35095 : ""},
35096 : { "Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_O, "\n"
35097 : "Layer_GetSpatialFilter(Layer self) -> Geometry\n"
35098 : "\n"
35099 : "This function returns the current spatial filter for this layer.\n"
35100 : "\n"
35101 : "For more details: :cpp:func:`OGR_L_GetSpatialFilter`\n"
35102 : "\n"
35103 : "Returns\n"
35104 : "--------\n"
35105 : "Geometry:\n"
35106 : " The spatial filter geometry.\n"
35107 : "\n"
35108 : ""},
35109 : { "Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, "\n"
35110 : "Layer_SetAttributeFilter(Layer self, char * filter_string) -> OGRErr\n"
35111 : "\n"
35112 : "Set a new attribute query.\n"
35113 : "\n"
35114 : "For more details: :cpp:func:`OGR_L_SetAttributeFilter`\n"
35115 : "\n"
35116 : "Parameters\n"
35117 : "-----------\n"
35118 : "filter_string: str\n"
35119 : " query in restricted SQL WHERE format, or None to clear the\n"
35120 : " current query.\n"
35121 : "\n"
35122 : "Returns\n"
35123 : "--------\n"
35124 : "int:\n"
35125 : " :py:const:`osgeo.ogr.OGRERR_NONE` if successfully installed,\n"
35126 : " or an error code if the query expression is in error,\n"
35127 : " or some other failure occurs.\n"
35128 : "\n"
35129 : ""},
35130 : { "Layer_ResetReading", _wrap_Layer_ResetReading, METH_O, "\n"
35131 : "Layer_ResetReading(Layer self)\n"
35132 : "\n"
35133 : "Reset feature reading to start on the first feature.\n"
35134 : "\n"
35135 : "For more details: :cpp:func:`OGR_L_ResetReading`\n"
35136 : "\n"
35137 : ""},
35138 : { "Layer_GetName", _wrap_Layer_GetName, METH_O, "\n"
35139 : "Layer_GetName(Layer self) -> char const *\n"
35140 : "\n"
35141 : "Return the layer name.\n"
35142 : "\n"
35143 : "For more details: :cpp:func:`OGR_L_GetName`\n"
35144 : "\n"
35145 : "Returns\n"
35146 : "--------\n"
35147 : "str:\n"
35148 : " The layer name\n"
35149 : "\n"
35150 : ""},
35151 : { "Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_O, "\n"
35152 : "Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\n"
35153 : "\n"
35154 : "Return the layer geometry type.\n"
35155 : "\n"
35156 : "For more details: :cpp:func:`OGR_L_GetGeomType`\n"
35157 : "\n"
35158 : "Returns\n"
35159 : "--------\n"
35160 : "int:\n"
35161 : " The geometry type code. The types can be found with\n"
35162 : " 'osgeo.ogr.wkb' prefix. For example :py:const:`osgeo.ogr.wkbPolygon`.\n"
35163 : "\n"
35164 : ""},
35165 : { "Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_O, "\n"
35166 : "Layer_GetGeometryColumn(Layer self) -> char const *\n"
35167 : "\n"
35168 : "This method returns the name of the underlying database column being\n"
35169 : "used as the geometry column, or '' if not supported.\n"
35170 : "\n"
35171 : "For more details: :cpp:func:`OGR_L_GetGeometryColumn`\n"
35172 : "\n"
35173 : "Returns\n"
35174 : "--------\n"
35175 : "str:\n"
35176 : " geometry column name.\n"
35177 : "\n"
35178 : ""},
35179 : { "Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_O, "\n"
35180 : "Layer_GetFIDColumn(Layer self) -> char const *\n"
35181 : "\n"
35182 : "This method returns the name of the underlying database column being\n"
35183 : "used as the FID column, or '' if not supported.\n"
35184 : "\n"
35185 : "For more details: :cpp:func:`OGR_L_GetFIDColumn`\n"
35186 : "\n"
35187 : "Returns\n"
35188 : "--------\n"
35189 : "str:\n"
35190 : " fid column name.\n"
35191 : "\n"
35192 : ""},
35193 : { "Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, "\n"
35194 : "Layer_GetFeature(Layer self, GIntBig fid) -> Feature\n"
35195 : "\n"
35196 : "Fetch a feature by its identifier.\n"
35197 : "\n"
35198 : "For more details: :cpp:func:`OGR_L_GetFeature`\n"
35199 : "\n"
35200 : "Use :py:func:`TestCapability` with (:py:const:`osgeo.ogr.OLCRandomRead`)\n"
35201 : "to establish if this layer supports efficient random access reading via\n"
35202 : ":py:func:`GetFeature`; However, the call should always work if the feature exists.\n"
35203 : "\n"
35204 : "Sequential reads (with :py:func:`GetNextFeature`) are generally\n"
35205 : "considered interrupted by a :py:func:`GetFeature` call.\n"
35206 : "\n"
35207 : "Parameters\n"
35208 : "-----------\n"
35209 : "fid: int\n"
35210 : " The feature id of the feature to read.\n"
35211 : "\n"
35212 : "Returns\n"
35213 : "--------\n"
35214 : "Feature:\n"
35215 : " A new feature now owned by the caller, or None on failure.\n"
35216 : " The returned feature should be deleted with :py:func:`Destroy`.\n"
35217 : "\n"
35218 : ""},
35219 : { "Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_O, "\n"
35220 : "Layer_GetNextFeature(Layer self) -> Feature\n"
35221 : "\n"
35222 : "Fetch the next available feature from this layer.\n"
35223 : "\n"
35224 : "For more details: :cpp:func:`OGR_L_GetNextFeature`\n"
35225 : "\n"
35226 : "Returns\n"
35227 : "--------\n"
35228 : "Feature:\n"
35229 : " A feature or None if no more features are available.\n"
35230 : "\n"
35231 : ""},
35232 : { "Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, "\n"
35233 : "Layer_SetNextByIndex(Layer self, GIntBig new_index) -> OGRErr\n"
35234 : "\n"
35235 : "Move read cursor to the nIndex'th feature in the current resultset.\n"
35236 : "\n"
35237 : "For more details: :cpp:func:`OGR_L_SetNextByIndex`\n"
35238 : "\n"
35239 : "Parameters\n"
35240 : "-----------\n"
35241 : "new_index: int\n"
35242 : " The index indicating how many steps into the result set to seek.\n"
35243 : "\n"
35244 : "Returns\n"
35245 : "--------\n"
35246 : "int:\n"
35247 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success or an error code.\n"
35248 : "\n"
35249 : ""},
35250 : { "Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, "\n"
35251 : "Layer_SetFeature(Layer self, Feature feature) -> OGRErr\n"
35252 : "\n"
35253 : "Rewrite an existing feature.\n"
35254 : "\n"
35255 : "For more details: :cpp:func:`OGR_L_SetFeature`\n"
35256 : "\n"
35257 : "To set a feature, but create it if it doesn't exist see :py:meth:`.Layer.UpsertFeature`.\n"
35258 : "\n"
35259 : "Parameters\n"
35260 : "-----------\n"
35261 : "feature: Feature\n"
35262 : " The feature to write.\n"
35263 : "\n"
35264 : "Returns\n"
35265 : "--------\n"
35266 : "int:\n"
35267 : " :py:const:`osgeo.ogr.OGRERR_NONE` if the operation works,\n"
35268 : " otherwise an appropriate error code\n"
35269 : " (e.g :py:const:`osgeo.ogr.OGRERR_NON_EXISTING_FEATURE` if the\n"
35270 : " feature does not exist).\n"
35271 : "\n"
35272 : ""},
35273 : { "Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, "\n"
35274 : "Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\n"
35275 : "\n"
35276 : "Create and write a new feature within a layer.\n"
35277 : "\n"
35278 : "For more details: :cpp:func:`OGR_L_CreateFeature`\n"
35279 : "\n"
35280 : "To create a feature, but set it if it exists see :py:meth:`.Layer.UpsertFeature`.\n"
35281 : "\n"
35282 : "Parameters\n"
35283 : "-----------\n"
35284 : "feature: Feature\n"
35285 : " The feature to write to disk.\n"
35286 : "\n"
35287 : "Returns\n"
35288 : "--------\n"
35289 : "int:\n"
35290 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35291 : "\n"
35292 : ""},
35293 : { "Layer_UpsertFeature", _wrap_Layer_UpsertFeature, METH_VARARGS, "\n"
35294 : "Layer_UpsertFeature(Layer self, Feature feature) -> OGRErr\n"
35295 : "\n"
35296 : "Rewrite an existing feature or create a new feature within a layer.\n"
35297 : "\n"
35298 : "For more details: :cpp:func:`OGR_L_UpsertFeature`\n"
35299 : "\n"
35300 : "Parameters\n"
35301 : "-----------\n"
35302 : "feature: Feature\n"
35303 : " The feature to write to disk.\n"
35304 : "\n"
35305 : "Returns\n"
35306 : "--------\n"
35307 : "int:\n"
35308 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35309 : "\n"
35310 : ""},
35311 : { "Layer_UpdateFeature", _wrap_Layer_UpdateFeature, METH_VARARGS, "Layer_UpdateFeature(Layer self, Feature feature, int nUpdatedFieldsCount, int nUpdatedGeomFieldsCount, bool bUpdateStyleString) -> OGRErr"},
35312 : { "Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, "\n"
35313 : "Layer_DeleteFeature(Layer self, GIntBig fid) -> OGRErr\n"
35314 : "\n"
35315 : "Delete feature from layer.\n"
35316 : "\n"
35317 : "For more details: :cpp:func:`OGR_L_DeleteFeature`\n"
35318 : "\n"
35319 : "Parameters\n"
35320 : "-----------\n"
35321 : "fid: int\n"
35322 : " The feature id to be deleted from the layer\n"
35323 : "\n"
35324 : "Returns\n"
35325 : "--------\n"
35326 : "int:\n"
35327 : " :py:const:`osgeo.ogr.OGRERR_NONE` if the operation works,\n"
35328 : " otherwise an appropriate error code\n"
35329 : " (e.g :py:const:`osgeo.ogr.OGRERR_NON_EXISTING_FEATURE`)\n"
35330 : " if the feature does not exist.\n"
35331 : "\n"
35332 : ""},
35333 : { "Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_O, "\n"
35334 : "Layer_SyncToDisk(Layer self) -> OGRErr\n"
35335 : "\n"
35336 : "Flush pending changes to disk.\n"
35337 : "\n"
35338 : "For more details: :cpp:func:`OGR_L_SyncToDisk`\n"
35339 : "\n"
35340 : "Returns\n"
35341 : "--------\n"
35342 : "int:\n"
35343 : " :py:const:`osgeo.ogr.OGRERR_NONE` if no error occurs\n"
35344 : " (even if nothing is done) or an error code.\n"
35345 : "\n"
35346 : ""},
35347 : { "Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_O, "\n"
35348 : "Layer_GetLayerDefn(Layer self) -> FeatureDefn\n"
35349 : "\n"
35350 : "Fetch the schema information for this layer.\n"
35351 : "\n"
35352 : "For more details: :cpp:func:`OGR_L_GetLayerDefn`\n"
35353 : "\n"
35354 : "Returns\n"
35355 : "--------\n"
35356 : "FeatureDefn:\n"
35357 : " The feature definition.\n"
35358 : "\n"
35359 : ""},
35360 : { "Layer_GetFeatureCount", (PyCFunction)(void(*)(void))_wrap_Layer_GetFeatureCount, METH_VARARGS|METH_KEYWORDS, "\n"
35361 : "Layer_GetFeatureCount(Layer self, int force=1) -> GIntBig\n"
35362 : "\n"
35363 : "Fetch the feature count in this layer.\n"
35364 : "\n"
35365 : "For more details: :cpp:func:`OGR_L_GetFeatureCount`\n"
35366 : "\n"
35367 : "Parameters\n"
35368 : "-----------\n"
35369 : "force: int\n"
35370 : " Flag indicating whether the count should be computed even if\n"
35371 : " it is expensive.\n"
35372 : "\n"
35373 : "Returns\n"
35374 : "--------\n"
35375 : "int:\n"
35376 : " Feature count, -1 if count not known.\n"
35377 : "\n"
35378 : ""},
35379 : { "Layer_GetExtent", (PyCFunction)(void(*)(void))_wrap_Layer_GetExtent, METH_VARARGS|METH_KEYWORDS, "\n"
35380 : "Layer_GetExtent(Layer self, int force=1, int can_return_null=0, int geom_field=0)\n"
35381 : "\n"
35382 : "Fetch the extent of this layer.\n"
35383 : "\n"
35384 : "For more details:\n"
35385 : "\n"
35386 : "- :cpp:func:`OGR_L_GetExtent`\n"
35387 : "- :cpp:func:`OGR_L_GetExtentEx`\n"
35388 : "\n"
35389 : ".. warning:: Check the return order of the bounds.\n"
35390 : "\n"
35391 : "Parameters\n"
35392 : "-----------\n"
35393 : "force: int, default=False\n"
35394 : " Flag indicating whether the extent should be computed even if\n"
35395 : " it is expensive.\n"
35396 : "can_return_null: int, default=False\n"
35397 : " Whether None can be returned in the response.\n"
35398 : "geom_field: int, default=0\n"
35399 : " Ithe index of the geometry field on which to compute the extent.\n"
35400 : " Can be iterated over using :py:func:`range` and :py:func:`GetGeomFieldCount`.\n"
35401 : "\n"
35402 : "Returns\n"
35403 : "--------\n"
35404 : "minx: float\n"
35405 : "maxx: float\n"
35406 : "miny: float\n"
35407 : "maxy: float\n"
35408 : "\n"
35409 : ""},
35410 : { "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)"},
35411 : { "Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, "\n"
35412 : "Layer_TestCapability(Layer self, char const * cap) -> bool\n"
35413 : "\n"
35414 : "Test if this layer supported the named capability.\n"
35415 : "\n"
35416 : "For more details: :cpp:func:`OGR_L_TestCapability`\n"
35417 : "\n"
35418 : "Parameters\n"
35419 : "-----------\n"
35420 : "cap: str\n"
35421 : " The name of the capability to test. These can\n"
35422 : " be found in the `osgeo.ogr` namespace. For example,\n"
35423 : " :py:const:`osgeo.ogr.OLCRandomRead`.\n"
35424 : "\n"
35425 : "Returns\n"
35426 : "--------\n"
35427 : "int:\n"
35428 : " True if the layer has the requested capability, or False otherwise.\n"
35429 : " Will return False for any unrecognized capabilities.\n"
35430 : "\n"
35431 : ""},
35432 : { "Layer_CreateField", (PyCFunction)(void(*)(void))_wrap_Layer_CreateField, METH_VARARGS|METH_KEYWORDS, "\n"
35433 : "Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok=1) -> OGRErr\n"
35434 : "\n"
35435 : "Create a new field on a layer.\n"
35436 : "\n"
35437 : "For more details: :cpp:func:`OGR_L_CreateField`\n"
35438 : "\n"
35439 : "Parameters\n"
35440 : "-----------\n"
35441 : "field_def: FieldDefn\n"
35442 : " The field definition to write to disk.\n"
35443 : "approx_ok: bool, default=True\n"
35444 : " If True, the field may be created in a slightly different\n"
35445 : " form depending on the limitations of the format driver.\n"
35446 : "\n"
35447 : "Returns\n"
35448 : "--------\n"
35449 : "int:\n"
35450 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35451 : "\n"
35452 : ""},
35453 : { "Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, "\n"
35454 : "Layer_DeleteField(Layer self, int iField) -> OGRErr\n"
35455 : "\n"
35456 : "Delete an existing field on a layer.\n"
35457 : "\n"
35458 : "For more details: :cpp:func:`OGR_L_DeleteField`\n"
35459 : "\n"
35460 : "Parameters\n"
35461 : "-----------\n"
35462 : "iField: int\n"
35463 : " index of the field to delete.\n"
35464 : "\n"
35465 : "Returns\n"
35466 : "--------\n"
35467 : "int:\n"
35468 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35469 : "\n"
35470 : ""},
35471 : { "Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, "\n"
35472 : "Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\n"
35473 : "\n"
35474 : "Reorder an existing field on a layer.\n"
35475 : "\n"
35476 : "For more details: :cpp:func:`OGR_L_ReorderField`\n"
35477 : "\n"
35478 : "Parameters\n"
35479 : "-----------\n"
35480 : "iOldFieldPos: int\n"
35481 : " previous position of the field to move. Must be in the\n"
35482 : " range [0,GetFieldCount()-1].\n"
35483 : "iNewFieldPos: int\n"
35484 : " new position of the field to move. Must be in the range\n"
35485 : " [0,GetFieldCount()-1].\n"
35486 : "\n"
35487 : "Returns\n"
35488 : "--------\n"
35489 : "int:\n"
35490 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35491 : "\n"
35492 : ""},
35493 : { "Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, "\n"
35494 : "Layer_ReorderFields(Layer self, int nList) -> OGRErr\n"
35495 : "\n"
35496 : "Reorder all the fields of a layer.\n"
35497 : "\n"
35498 : "For more details: :cpp:func:`OGR_L_ReorderFields`\n"
35499 : "\n"
35500 : "Parameters\n"
35501 : "-----------\n"
35502 : "nList: list[int]\n"
35503 : " A list of GetLayerDefn().GetFieldCount()\n"
35504 : " elements which is a permutation of\n"
35505 : " [0, GetLayerDefn().GetFieldCount()-1].\n"
35506 : "\n"
35507 : "Returns\n"
35508 : "--------\n"
35509 : "int:\n"
35510 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35511 : "\n"
35512 : ""},
35513 : { "Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, "\n"
35514 : "Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\n"
35515 : "\n"
35516 : "Alter the definition of an existing field on a layer.\n"
35517 : "\n"
35518 : "For more details: :cpp:func:`OGR_L_AlterFieldDefn`\n"
35519 : "\n"
35520 : "Parameters\n"
35521 : "-----------\n"
35522 : "iField: int\n"
35523 : " index of the field whose definition must be altered.\n"
35524 : "field_def: FieldDefn\n"
35525 : " new field definition\n"
35526 : "nFlags: int\n"
35527 : " Combination of\n"
35528 : " :py:const:`osgeo.ogr.ALTER_NAME_FLAG`,\n"
35529 : " :py:const:`osgeo.ogr.ALTER_TYPE_FLAG`,\n"
35530 : " :py:const:`osgeo.ogr.ALTER_WIDTH_PRECISION_FLAG`,\n"
35531 : " :py:const:`osgeo.ogr.ALTER_NULLABLE_FLAG` and\n"
35532 : " :py:const:`osgeo.ogr.ALTER_DEFAULT_FLAG`\n"
35533 : " to indicate which of the name and/or type and/or width and precision\n"
35534 : " fields and/or nullability from the new field definition must be taken\n"
35535 : " into account.\n"
35536 : "\n"
35537 : "Returns\n"
35538 : "--------\n"
35539 : "int:\n"
35540 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35541 : "\n"
35542 : ""},
35543 : { "Layer_AlterGeomFieldDefn", _wrap_Layer_AlterGeomFieldDefn, METH_VARARGS, "Layer_AlterGeomFieldDefn(Layer self, int iGeomField, GeomFieldDefn field_def, int nFlags) -> OGRErr"},
35544 : { "Layer_CreateGeomField", (PyCFunction)(void(*)(void))_wrap_Layer_CreateGeomField, METH_VARARGS|METH_KEYWORDS, "\n"
35545 : "Layer_CreateGeomField(Layer self, GeomFieldDefn field_def, int approx_ok=1) -> OGRErr\n"
35546 : "\n"
35547 : "Create a new geometry field on a layer.\n"
35548 : "\n"
35549 : "For more details: :cpp:func:`OGR_L_CreateGeomField`\n"
35550 : "\n"
35551 : "Parameters\n"
35552 : "-----------\n"
35553 : "field_def: GeomFieldDefn\n"
35554 : " The geometry field definition to write to disk.\n"
35555 : "approx_ok: bool, default=True\n"
35556 : " If True, the field may be created in a slightly different\n"
35557 : " form depending on the limitations of the format driver.\n"
35558 : "\n"
35559 : "Returns\n"
35560 : "--------\n"
35561 : "int:\n"
35562 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35563 : "\n"
35564 : ""},
35565 : { "Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_O, "\n"
35566 : "Layer_StartTransaction(Layer self) -> OGRErr\n"
35567 : "\n"
35568 : "For datasources which support transactions, this creates a transaction.\n"
35569 : "\n"
35570 : "For more details: :cpp:func:`OGR_L_StartTransaction`\n"
35571 : "\n"
35572 : "Returns\n"
35573 : "--------\n"
35574 : "int:\n"
35575 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35576 : "\n"
35577 : ""},
35578 : { "Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_O, "\n"
35579 : "Layer_CommitTransaction(Layer self) -> OGRErr\n"
35580 : "\n"
35581 : "For datasources which support transactions, this commits a transaction.\n"
35582 : "\n"
35583 : "For more details: :cpp:func:`OGR_L_CommitTransaction`\n"
35584 : "\n"
35585 : "Returns\n"
35586 : "--------\n"
35587 : "int:\n"
35588 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35589 : "\n"
35590 : ""},
35591 : { "Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_O, "\n"
35592 : "Layer_RollbackTransaction(Layer self) -> OGRErr\n"
35593 : "\n"
35594 : "Roll back a datasource to its state before the start of the current transaction.\n"
35595 : "\n"
35596 : "For more details: :cpp:func:`OGR_L_RollbackTransaction`\n"
35597 : "\n"
35598 : "Returns\n"
35599 : "--------\n"
35600 : "int:\n"
35601 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
35602 : "\n"
35603 : ""},
35604 : { "Layer_FindFieldIndex", _wrap_Layer_FindFieldIndex, METH_VARARGS, "\n"
35605 : "Layer_FindFieldIndex(Layer self, char const * pszFieldName, int bExactMatch) -> int\n"
35606 : "\n"
35607 : "Find the index of field in a layer.\n"
35608 : "\n"
35609 : "For more details: :cpp:func:`OGR_L_FindFieldIndex`\n"
35610 : "\n"
35611 : "Returns\n"
35612 : "--------\n"
35613 : "int:\n"
35614 : " field index, or -1 if the field doesn't exist\n"
35615 : "\n"
35616 : ""},
35617 : { "Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_O, "\n"
35618 : "Layer_GetSpatialRef(Layer self) -> SpatialReference\n"
35619 : "\n"
35620 : "Fetch the spatial reference system for this layer.\n"
35621 : "\n"
35622 : "For more details: :cpp:func:`OGR_L_GetSpatialRef`\n"
35623 : "\n"
35624 : "Returns\n"
35625 : "--------\n"
35626 : "SpatialReference:\n"
35627 : " spatial reference, or None if there isn't one.\n"
35628 : "\n"
35629 : ""},
35630 : { "Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_O, "\n"
35631 : "Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
35632 : "\n"
35633 : "For more details: :cpp:func:`OGR_L_GetFeaturesRead`\n"
35634 : "\n"
35635 : ""},
35636 : { "Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, "\n"
35637 : "Layer_SetIgnoredFields(Layer self, char const ** options) -> OGRErr\n"
35638 : "\n"
35639 : "Set which fields can be omitted when retrieving features from the\n"
35640 : "layer.\n"
35641 : "\n"
35642 : "For more details: :cpp:func:`OGR_L_SetIgnoredFields`\n"
35643 : "\n"
35644 : "Parameters\n"
35645 : "-----------\n"
35646 : "options: list[str]\n"
35647 : " A list of field names.\n"
35648 : " If an empty list is passed, the ignored list is cleared.\n"
35649 : "\n"
35650 : "Returns\n"
35651 : "-------\n"
35652 : "int:\n"
35653 : " :py:const:`osgeo.ogr.OGRERR_NONE` if all field names have been resolved\n"
35654 : " (even if the driver does not support this method)\n"
35655 : "\n"
35656 : ""},
35657 : { "Layer_Intersection", (PyCFunction)(void(*)(void))_wrap_Layer_Intersection, METH_VARARGS|METH_KEYWORDS, "\n"
35658 : "Layer_Intersection(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
35659 : "\n"
35660 : "Intersection of two layers.\n"
35661 : "\n"
35662 : "For more details: :cpp:func:`OGR_L_Intersection`\n"
35663 : "\n"
35664 : "Parameters\n"
35665 : "-----------\n"
35666 : "method_layer: Layer\n"
35667 : " the method layer. Should not be None.\n"
35668 : "result_layer: Layer\n"
35669 : " the layer where the features resulting from the\n"
35670 : " operation are inserted. Should not be None.\n"
35671 : "options: list[str], optional\n"
35672 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
35673 : "callback: Callable, optional\n"
35674 : " a GDALProgressFunc() compatible callback function for\n"
35675 : " reporting progress or None.\n"
35676 : "callback_data:\n"
35677 : " Argument to be passed to 'callback'. May be None.\n"
35678 : "\n"
35679 : "Returns\n"
35680 : "-------\n"
35681 : "int:\n"
35682 : " An error code if there was an error or the execution was interrupted,\n"
35683 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
35684 : "\n"
35685 : ""},
35686 : { "Layer_Union", (PyCFunction)(void(*)(void))_wrap_Layer_Union, METH_VARARGS|METH_KEYWORDS, "\n"
35687 : "Layer_Union(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
35688 : "\n"
35689 : "Union of two layers.\n"
35690 : "\n"
35691 : "For more details: :cpp:func:`OGR_L_Union`\n"
35692 : "\n"
35693 : "The first geometry field is always used.\n"
35694 : "\n"
35695 : "Parameters\n"
35696 : "-----------\n"
35697 : "method_layer: Layer\n"
35698 : " the method layer. Should not be None.\n"
35699 : "result_layer: Layer\n"
35700 : " the layer where the features resulting from the\n"
35701 : " operation are inserted. Should not be None.\n"
35702 : "options: list[str], optional\n"
35703 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
35704 : "callback: Callable, optional\n"
35705 : " a GDALProgressFunc() compatible callback function for\n"
35706 : " reporting progress or None.\n"
35707 : "callback_data:\n"
35708 : " Argument to be passed to 'callback'. May be None.\n"
35709 : "\n"
35710 : "Returns\n"
35711 : "-------\n"
35712 : "int:\n"
35713 : " An error code if there was an error or the execution was interrupted,\n"
35714 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
35715 : "\n"
35716 : ""},
35717 : { "Layer_SymDifference", (PyCFunction)(void(*)(void))_wrap_Layer_SymDifference, METH_VARARGS|METH_KEYWORDS, "\n"
35718 : "Layer_SymDifference(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
35719 : "\n"
35720 : "Symmetrical difference of two layers.\n"
35721 : "\n"
35722 : "For more details: :cpp:func:`OGR_L_SymDifference`\n"
35723 : "\n"
35724 : "Parameters\n"
35725 : "-----------\n"
35726 : "method_layer: Layer\n"
35727 : " the method layer. Should not be None.\n"
35728 : "result_layer: Layer\n"
35729 : " the layer where the features resulting from the\n"
35730 : " operation are inserted. Should not be None.\n"
35731 : "options: list[str], optional\n"
35732 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
35733 : "callback: Callable, optional\n"
35734 : " a GDALProgressFunc() compatible callback function for\n"
35735 : " reporting progress or None.\n"
35736 : "callback_data:\n"
35737 : " Argument to be passed to 'callback'. May be None.\n"
35738 : "\n"
35739 : "Returns\n"
35740 : "-------\n"
35741 : "int:\n"
35742 : " An error code if there was an error or the execution was interrupted,\n"
35743 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
35744 : "\n"
35745 : ""},
35746 : { "Layer_Identity", (PyCFunction)(void(*)(void))_wrap_Layer_Identity, METH_VARARGS|METH_KEYWORDS, "\n"
35747 : "Layer_Identity(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
35748 : "\n"
35749 : "Identify the features of this layer with the ones from the identity layer.\n"
35750 : "\n"
35751 : "For more details: :cpp:func:`OGR_L_Identity`\n"
35752 : "\n"
35753 : "Parameters\n"
35754 : "-----------\n"
35755 : "method_layer: Layer\n"
35756 : " the method layer. Should not be None.\n"
35757 : "result_layer: Layer\n"
35758 : " the layer where the features resulting from the\n"
35759 : " operation are inserted. Should not be None.\n"
35760 : "options: list[str], optional\n"
35761 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
35762 : "callback: Callable, optional\n"
35763 : " a GDALProgressFunc() compatible callback function for\n"
35764 : " reporting progress or None.\n"
35765 : "callback_data:\n"
35766 : " Argument to be passed to 'callback'. May be None.\n"
35767 : "\n"
35768 : "Returns\n"
35769 : "-------\n"
35770 : "int:\n"
35771 : " An error code if there was an error or the execution was interrupted,\n"
35772 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
35773 : "\n"
35774 : ""},
35775 : { "Layer_Update", (PyCFunction)(void(*)(void))_wrap_Layer_Update, METH_VARARGS|METH_KEYWORDS, "\n"
35776 : "Layer_Update(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
35777 : "\n"
35778 : "Update this layer with features from the update layer.\n"
35779 : "\n"
35780 : "For more details: :cpp:func:`OGR_L_Update`\n"
35781 : "\n"
35782 : "Parameters\n"
35783 : "-----------\n"
35784 : "method_layer: Layer\n"
35785 : " the method layer. Should not be None.\n"
35786 : "result_layer: Layer\n"
35787 : " the layer where the features resulting from the\n"
35788 : " operation are inserted. Should not be None.\n"
35789 : "options: list[str], optional\n"
35790 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
35791 : "callback: Callable, optional\n"
35792 : " a GDALProgressFunc() compatible callback function for\n"
35793 : " reporting progress or None.\n"
35794 : "callback_data:\n"
35795 : " Argument to be passed to 'callback'. May be None.\n"
35796 : "\n"
35797 : "Returns\n"
35798 : "-------\n"
35799 : "int:\n"
35800 : " An error code if there was an error or the execution was interrupted,\n"
35801 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
35802 : "\n"
35803 : ""},
35804 : { "Layer_Clip", (PyCFunction)(void(*)(void))_wrap_Layer_Clip, METH_VARARGS|METH_KEYWORDS, "\n"
35805 : "Layer_Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
35806 : "\n"
35807 : "Clip off areas that are not covered by the method layer.\n"
35808 : "\n"
35809 : "For more details: :cpp:func:`OGR_L_Clip`\n"
35810 : "\n"
35811 : "Parameters\n"
35812 : "-----------\n"
35813 : "method_layer: Layer\n"
35814 : " the method layer. Should not be None.\n"
35815 : "result_layer: Layer\n"
35816 : " the layer where the features resulting from the\n"
35817 : " operation are inserted. Should not be None.\n"
35818 : "options: list[str], optional\n"
35819 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
35820 : "callback: Callable, optional\n"
35821 : " a GDALProgressFunc() compatible callback function for\n"
35822 : " reporting progress or None.\n"
35823 : "callback_data:\n"
35824 : " Argument to be passed to 'callback'. May be None.\n"
35825 : "\n"
35826 : "Returns\n"
35827 : "-------\n"
35828 : "int:\n"
35829 : " An error code if there was an error or the execution was interrupted,\n"
35830 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
35831 : "\n"
35832 : ""},
35833 : { "Layer_Erase", (PyCFunction)(void(*)(void))_wrap_Layer_Erase, METH_VARARGS|METH_KEYWORDS, "\n"
35834 : "Layer_Erase(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
35835 : "\n"
35836 : "Remove areas that are covered by the method layer.\n"
35837 : "\n"
35838 : "For more details: :cpp:func:`OGR_L_Erase`\n"
35839 : "\n"
35840 : "Parameters\n"
35841 : "-----------\n"
35842 : "method_layer: Layer\n"
35843 : " the method layer. Should not be None.\n"
35844 : "result_layer: Layer\n"
35845 : " the layer where the features resulting from the\n"
35846 : " operation are inserted. Should not be None.\n"
35847 : "options: list[str], optional\n"
35848 : " List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
35849 : "callback: Callable, optional\n"
35850 : " a GDALProgressFunc() compatible callback function for\n"
35851 : " reporting progress or None.\n"
35852 : "callback_data:\n"
35853 : " Argument to be passed to 'callback'. May be None.\n"
35854 : "\n"
35855 : "Returns\n"
35856 : "-------\n"
35857 : "int:\n"
35858 : " An error code if there was an error or the execution was interrupted,\n"
35859 : " :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
35860 : "\n"
35861 : ""},
35862 : { "Layer_GetStyleTable", _wrap_Layer_GetStyleTable, METH_O, "\n"
35863 : "Layer_GetStyleTable(Layer self) -> StyleTable\n"
35864 : "\n"
35865 : "Get style table.\n"
35866 : "\n"
35867 : "For more details: :cpp:func:`OGR_L_GetStyleTable`\n"
35868 : "\n"
35869 : ""},
35870 : { "Layer_SetStyleTable", _wrap_Layer_SetStyleTable, METH_VARARGS, "\n"
35871 : "Layer_SetStyleTable(Layer self, StyleTable table)\n"
35872 : "\n"
35873 : "Set style table.\n"
35874 : "\n"
35875 : "For more details: :cpp:func:`OGR_L_SetStyleTable`\n"
35876 : "\n"
35877 : ""},
35878 : { "Layer_ExportArrowArrayStreamPyCapsule", _wrap_Layer_ExportArrowArrayStreamPyCapsule, METH_VARARGS, "Layer_ExportArrowArrayStreamPyCapsule(Layer self, char ** options=None) -> PyObject *"},
35879 : { "Layer_GetArrowStream", _wrap_Layer_GetArrowStream, METH_VARARGS, "Layer_GetArrowStream(Layer self, char ** options=None) -> ArrowArrayStream"},
35880 : { "Layer_IsArrowSchemaSupported", _wrap_Layer_IsArrowSchemaSupported, METH_VARARGS, "Layer_IsArrowSchemaSupported(Layer self, ArrowSchema schema, char ** options=None)"},
35881 : { "Layer_CreateFieldFromArrowSchema", _wrap_Layer_CreateFieldFromArrowSchema, METH_VARARGS, "Layer_CreateFieldFromArrowSchema(Layer self, ArrowSchema schema, char ** options=None) -> OGRErr"},
35882 : { "Layer_WriteArrowBatch", _wrap_Layer_WriteArrowBatch, METH_VARARGS, "Layer_WriteArrowBatch(Layer self, ArrowSchema schema, ArrowArray array, char ** options=None) -> OGRErr"},
35883 : { "Layer_WriteArrowStreamCapsule", _wrap_Layer_WriteArrowStreamCapsule, METH_VARARGS, "Layer_WriteArrowStreamCapsule(Layer self, PyObject * capsule, int createFieldsFromSchema, char ** options=None) -> OGRErr"},
35884 : { "Layer_WriteArrowSchemaAndArrowArrayCapsule", _wrap_Layer_WriteArrowSchemaAndArrowArrayCapsule, METH_VARARGS, "Layer_WriteArrowSchemaAndArrowArrayCapsule(Layer self, PyObject * schemaCapsule, PyObject * arrayCapsule, int createFieldsFromSchema, char ** options=None) -> OGRErr"},
35885 : { "Layer_GetGeometryTypes", (PyCFunction)(void(*)(void))_wrap_Layer_GetGeometryTypes, METH_VARARGS|METH_KEYWORDS, "\n"
35886 : "Layer_GetGeometryTypes(Layer self, int geom_field=0, int flags=0, GDALProgressFunc callback=0, void * callback_data=None)\n"
35887 : "\n"
35888 : "Get actual geometry types found in features.\n"
35889 : "\n"
35890 : "For more details: :cpp:func:`OGR_L_GetGeometryTypes`\n"
35891 : "\n"
35892 : "Parameters\n"
35893 : "-----------\n"
35894 : "geom_field: int, optional\n"
35895 : " index of the geometry field\n"
35896 : "flags: int, optional\n"
35897 : " 0, or a combination of :py:const:`osgeo.ogr.GGT_COUNT_NOT_NEEDED`,\n"
35898 : " :py:const:`osgeo.ogr.GGT_STOP_IF_MIXED` and\n"
35899 : " :py:const:`osgeo.ogr.GGT_GEOMCOLLECTIONZ_TINZ`\n"
35900 : "callback: Callable, optional\n"
35901 : " a GDALProgressFunc() compatible callback function for\n"
35902 : " cancellation or None.\n"
35903 : "callback_data:\n"
35904 : " Argument to be passed to 'callback'. May be None.\n"
35905 : "\n"
35906 : "Returns\n"
35907 : "-------\n"
35908 : "dict:\n"
35909 : " A dictionary whose keys are :py:const:`osgeo.ogr.wkbXXXX` constants and\n"
35910 : " values the corresponding number of geometries of that type in the layer.\n"
35911 : "\n"
35912 : ""},
35913 : { "Layer_GetSupportedSRSList", (PyCFunction)(void(*)(void))_wrap_Layer_GetSupportedSRSList, METH_VARARGS|METH_KEYWORDS, "Layer_GetSupportedSRSList(Layer self, int geom_field=0)"},
35914 : { "Layer_SetActiveSRS", _wrap_Layer_SetActiveSRS, METH_VARARGS, "Layer_SetActiveSRS(Layer self, int geom_field, SpatialReference srs) -> OGRErr"},
35915 : { "Layer_swigregister", Layer_swigregister, METH_O, NULL},
35916 : { "delete_Feature", _wrap_delete_Feature, METH_O, "delete_Feature(Feature self)"},
35917 : { "new_Feature", (PyCFunction)(void(*)(void))_wrap_new_Feature, METH_VARARGS|METH_KEYWORDS, "\n"
35918 : "new_Feature(FeatureDefn feature_def) -> Feature\n"
35919 : "\n"
35920 : "\n"
35921 : "Parameters\n"
35922 : "-----------\n"
35923 : "feature_def:\n"
35924 : " :py:class:`FeatureDefn` to which the feature will adhere.\n"
35925 : "\n"
35926 : ""},
35927 : { "Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_O, "\n"
35928 : "Feature_GetDefnRef(Feature self) -> FeatureDefn\n"
35929 : "\n"
35930 : "\n"
35931 : "Fetch the :py:class:`FeatureDefn` associated with this Feature.\n"
35932 : "\n"
35933 : "See :cpp:func:`OGRFeature::GetDefnRef()`.\n"
35934 : "\n"
35935 : "Returns\n"
35936 : "--------\n"
35937 : "FeatureDefn\n"
35938 : "\n"
35939 : ""},
35940 : { "Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, "\n"
35941 : "Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\n"
35942 : "\n"
35943 : "\n"
35944 : "Set feature geometry.\n"
35945 : "\n"
35946 : "This function updates the features geometry, and operates exactly as\n"
35947 : ":py:meth:`SetGeometryDirectly`, except that this function does not assume\n"
35948 : "ownership of the passed geometry, but instead makes a copy of it.\n"
35949 : "\n"
35950 : "See :cpp:func:`OGRFeature::SetGeometry`.\n"
35951 : "\n"
35952 : "This method has only an effect on the in-memory feature object. If\n"
35953 : "this object comes from a layer and the modifications must be\n"
35954 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
35955 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
35956 : "used afterwards.\n"
35957 : "\n"
35958 : "Parameters\n"
35959 : "-----------\n"
35960 : "geom : Geometry\n"
35961 : " new geometry to apply to feature.\n"
35962 : "\n"
35963 : "Returns\n"
35964 : "--------\n"
35965 : "int:\n"
35966 : " :py:const:`OGRERR_NONE` if successful, or\n"
35967 : " :py:const:`OGR_UNSUPPORTED_GEOMETRY_TYPE` if the geometry type is illegal for\n"
35968 : " the :py:class:`FeatureDefn` (checking not yet implemented).\n"
35969 : "\n"
35970 : ""},
35971 : { "Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, "Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr"},
35972 : { "Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_O, "\n"
35973 : "Feature_GetGeometryRef(Feature self) -> Geometry\n"
35974 : "\n"
35975 : "Return the feature geometry\n"
35976 : "\n"
35977 : "The lifetime of the returned geometry is bound to the one of its belonging\n"
35978 : "feature.\n"
35979 : "\n"
35980 : "See :cpp:func:`OGRFeature::GetGeometryRef`\n"
35981 : "\n"
35982 : "The :py:func:`Feature.geometry` method is also available as an alias of :py:func:`Feature.GetGeometryRef`.\n"
35983 : "\n"
35984 : "Returns\n"
35985 : "--------\n"
35986 : "Geometry:\n"
35987 : " the geometry, or None.\n"
35988 : "\n"
35989 : ""},
35990 : { "Feature_SetGeomField", _wrap_Feature_SetGeomField, METH_VARARGS, "\n"
35991 : "Feature_SetGeomField(Feature self, int iField, Geometry geom) -> OGRErr\n"
35992 : "Feature_SetGeomField(Feature self, char const * field_name, Geometry geom) -> OGRErr\n"
35993 : "\n"
35994 : "\n"
35995 : "Set feature geometry of a specified geometry field.\n"
35996 : "\n"
35997 : "This function updates the features geometry, and operates exactly as\n"
35998 : ":py:meth:`SetGeomFieldDirectly`, except that this function does not assume\n"
35999 : "ownership of the passed geometry, but instead makes a copy of it.\n"
36000 : "\n"
36001 : "See :cpp:func:`OGRFeature::SetGeomField`.\n"
36002 : "\n"
36003 : "Parameters\n"
36004 : "-----------\n"
36005 : "fld_index : int / str\n"
36006 : " Geometry field name or 0-based numeric index. For repeated\n"
36007 : " access, use of the numeric index avoids a lookup\n"
36008 : " step.\n"
36009 : "geom : Geometry\n"
36010 : " handle to the new geometry to apply to feature.\n"
36011 : "\n"
36012 : "Returns\n"
36013 : "--------\n"
36014 : "int:\n"
36015 : " :py:const:`OGRERR_NONE` if successful, or\n"
36016 : " :py:const:`OGR_UNSUPPORTED_GEOMETRY_TYPE` if the geometry type is illegal for\n"
36017 : " the :py:class:`FeatureDefn` (checking not yet implemented).\n"
36018 : "\n"
36019 : ""},
36020 : { "Feature_SetGeomFieldDirectly", _wrap_Feature_SetGeomFieldDirectly, METH_VARARGS, "\n"
36021 : "Feature_SetGeomFieldDirectly(Feature self, int iField, Geometry geom) -> OGRErr\n"
36022 : "Feature_SetGeomFieldDirectly(Feature self, char const * field_name, Geometry geom) -> OGRErr\n"
36023 : ""},
36024 : { "Feature_GetGeomFieldRef", _wrap_Feature_GetGeomFieldRef, METH_VARARGS, "\n"
36025 : "Feature_GetGeomFieldRef(Feature self, int iField) -> Geometry\n"
36026 : "Feature_GetGeomFieldRef(Feature self, char const * field_name) -> Geometry\n"
36027 : "\n"
36028 : "\n"
36029 : "Fetch a feature :py:class:`Geometry`.\n"
36030 : "\n"
36031 : "See :cpp:func:`OGRFeature::GetGeomFieldRef`.\n"
36032 : "\n"
36033 : "Parameters\n"
36034 : "-----------\n"
36035 : "fld_index : int / str\n"
36036 : " Field name or 0-based numeric index. For repeated\n"
36037 : " access, use of the numeric index avoids a lookup\n"
36038 : " step.\n"
36039 : "\n"
36040 : "Returns\n"
36041 : "-------\n"
36042 : "Geometry\n"
36043 : "\n"
36044 : "\n"
36045 : ""},
36046 : { "Feature_Clone", _wrap_Feature_Clone, METH_O, "\n"
36047 : "Feature_Clone(Feature self) -> Feature\n"
36048 : "\n"
36049 : "Duplicate a Feature.\n"
36050 : "See :cpp:func:`OGRFeature::Clone`.\n"
36051 : "\n"
36052 : "Returns\n"
36053 : "--------\n"
36054 : "Feature\n"
36055 : "\n"
36056 : ""},
36057 : { "Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, "\n"
36058 : "Feature_Equal(Feature self, Feature feature) -> bool\n"
36059 : "\n"
36060 : "\n"
36061 : "Test if two features are the same.\n"
36062 : "\n"
36063 : "Two features are considered equal if they reference the\n"
36064 : "same :py:class:`FeatureDefn`, have the same field values, and the same geometry\n"
36065 : "(as tested by :py:func:`Geometry.Equal`) as well as the same feature id.\n"
36066 : "\n"
36067 : "See :cpp:func:`OGRFeature::Equal`.\n"
36068 : "\n"
36069 : "Parameters\n"
36070 : "-----------\n"
36071 : "feature : Feature\n"
36072 : " feature to test this one against\n"
36073 : "\n"
36074 : "Returns\n"
36075 : "--------\n"
36076 : "bool\n"
36077 : "\n"
36078 : ""},
36079 : { "Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_O, "\n"
36080 : "Feature_GetFieldCount(Feature self) -> int\n"
36081 : "\n"
36082 : "\n"
36083 : "Fetch number of fields on this feature This will always be the same as\n"
36084 : "the field count for the :py:class:`FeatureDefn`.\n"
36085 : "\n"
36086 : "See :cpp:func:`OGRFeature::GetFieldCount`.\n"
36087 : "\n"
36088 : "Returns\n"
36089 : "--------\n"
36090 : "int:\n"
36091 : " count of fields.\n"
36092 : "\n"
36093 : ""},
36094 : { "Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, "\n"
36095 : "Feature_GetFieldDefnRef(Feature self, int id) -> FieldDefn\n"
36096 : "Feature_GetFieldDefnRef(Feature self, char const * field_name) -> FieldDefn\n"
36097 : "\n"
36098 : "\n"
36099 : "Fetch definition for this field.\n"
36100 : "\n"
36101 : "See :cpp:func:`OGRFeature::GetFieldDefnRef`.\n"
36102 : "\n"
36103 : "Parameters\n"
36104 : "-----------\n"
36105 : "fld_index : int / str\n"
36106 : " Field name or 0-based numeric index. For repeated\n"
36107 : " access, use of the numeric index avoids a lookup\n"
36108 : " step.\n"
36109 : "\n"
36110 : "Returns\n"
36111 : "--------\n"
36112 : "FieldDefn\n"
36113 : " a reference to the field definition. This reference should\n"
36114 : " not be modified.\n"
36115 : "\n"
36116 : ""},
36117 : { "Feature_GetGeomFieldCount", _wrap_Feature_GetGeomFieldCount, METH_O, "\n"
36118 : "Feature_GetGeomFieldCount(Feature self) -> int\n"
36119 : "\n"
36120 : "\n"
36121 : "Fetch number of geometry fields on this feature This will always be\n"
36122 : "the same as the geometry field count for the :py:class:`FeatureDefn`.\n"
36123 : "\n"
36124 : "See :cpp:func:`OGRFeature::GetGeomFieldCount`.\n"
36125 : "\n"
36126 : "Returns\n"
36127 : "--------\n"
36128 : "int:\n"
36129 : " count of geometry fields.\n"
36130 : "\n"
36131 : ""},
36132 : { "Feature_GetGeomFieldDefnRef", _wrap_Feature_GetGeomFieldDefnRef, METH_VARARGS, "\n"
36133 : "Feature_GetGeomFieldDefnRef(Feature self, int id) -> GeomFieldDefn\n"
36134 : "Feature_GetGeomFieldDefnRef(Feature self, char const * field_name) -> GeomFieldDefn\n"
36135 : "\n"
36136 : "\n"
36137 : "Fetch definition for this geometry field.\n"
36138 : "\n"
36139 : "See :cpp:func:`OGRFeature::GetGeomFieldDefnRef`.\n"
36140 : "\n"
36141 : "Parameters\n"
36142 : "-----------\n"
36143 : "fld_index : int / str\n"
36144 : " Field name or 0-based numeric index. For repeated\n"
36145 : " access, use of the numeric index avoids a lookup\n"
36146 : " step.\n"
36147 : "\n"
36148 : "Returns\n"
36149 : "--------\n"
36150 : "GeomFieldDefn:\n"
36151 : " a reference to the field definition.\n"
36152 : " Should not be deleted or modified.\n"
36153 : "\n"
36154 : ""},
36155 : { "Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, "\n"
36156 : "Feature_GetFieldAsString(Feature self, int id) -> char const\n"
36157 : "Feature_GetFieldAsString(Feature self, char const * field_name) -> char const *\n"
36158 : "\n"
36159 : "\n"
36160 : ":py:const:`OFTReal` and :py:const:`OFTInteger` fields will be translated to string using\n"
36161 : "sprintf(), but not necessarily using the established formatting rules.\n"
36162 : "Other field types, or errors will result in a return value of zero.\n"
36163 : "\n"
36164 : "See :cpp:func:`OGRFeature::GetFieldAsString`.\n"
36165 : "\n"
36166 : "Parameters\n"
36167 : "-----------\n"
36168 : "fld_index : int / str\n"
36169 : " Field name or 0-based numeric index. For repeated\n"
36170 : " access, use of the numeric index avoids a lookup\n"
36171 : " step.\n"
36172 : "\n"
36173 : "Returns\n"
36174 : "--------\n"
36175 : "str:\n"
36176 : " the field value.\n"
36177 : "\n"
36178 : ""},
36179 : { "Feature_GetFieldAsISO8601DateTime", _wrap_Feature_GetFieldAsISO8601DateTime, METH_VARARGS, "\n"
36180 : "Feature_GetFieldAsISO8601DateTime(Feature self, int id, char ** options=None) -> char const\n"
36181 : "Feature_GetFieldAsISO8601DateTime(Feature self, char const * field_name, char ** options=None) -> char const *\n"
36182 : "\n"
36183 : "\n"
36184 : "Fetch :py:const:`OFTDateTime` field value as a ISO8601 representation.\n"
36185 : "\n"
36186 : "Return a string like 'YYYY-MM-DDTHH:MM:SS(.sss)?(Z|([+|-]HH:MM))?'\n"
36187 : "Milliseconds are omitted if equal to zero.\n"
36188 : "Other field types, or errors will result in a return of an empty string.\n"
36189 : "\n"
36190 : "See :cpp:func:`OGRFeature::GetFieldAsISO8601DateTime`.\n"
36191 : "\n"
36192 : ".. versionadded:: 3.7\n"
36193 : "\n"
36194 : "Parameters\n"
36195 : "-----------\n"
36196 : "fld_index : int / str\n"
36197 : " Field name or 0-based numeric index. For repeated\n"
36198 : " access, use of the numeric index avoids a lookup\n"
36199 : " step.\n"
36200 : "options : dict / str\n"
36201 : " Not currently used.\n"
36202 : "\n"
36203 : ""},
36204 : { "Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, "\n"
36205 : "Feature_GetFieldAsInteger(Feature self, int id) -> int\n"
36206 : "Feature_GetFieldAsInteger(Feature self, char const * field_name) -> int\n"
36207 : "\n"
36208 : "\n"
36209 : "Fetch field value as a 32-bit integer.\n"
36210 : "\n"
36211 : ":py:const:`OFTString` features will be translated using atoi().\n"
36212 : ":py:const:`OFTReal` fields will be cast to integer. Other field types, or\n"
36213 : "errors will result in a return value of zero.\n"
36214 : "\n"
36215 : "See :cpp:func:`GetFieldAsInteger`.\n"
36216 : "\n"
36217 : "Parameters\n"
36218 : "-----------\n"
36219 : "fld_index : int / str\n"
36220 : " Field name or 0-based numeric index. For repeated\n"
36221 : " access, use of the numeric index avoids a lookup\n"
36222 : " step.\n"
36223 : "\n"
36224 : "Returns\n"
36225 : "--------\n"
36226 : "int:\n"
36227 : " the field value.\n"
36228 : "\n"
36229 : "Examples\n"
36230 : "--------\n"
36231 : ">>> defn = ogr.FeatureDefn()\n"
36232 : ">>> defn.AddFieldDefn(ogr.FieldDefn('my_int', ogr.OFTInteger64))\n"
36233 : ">>> feature = ogr.Feature(defn)\n"
36234 : ">>> feature['my_int'] = 2**32 + 1\n"
36235 : ">>> feature.GetFieldAsInteger('my_int')\n"
36236 : "Warning 1: Integer overflow occurred when trying to return 64bit integer. Use GetFieldAsInteger64() instead\n"
36237 : "2147483647\n"
36238 : ">>> feature.GetFieldAsInteger64('my_int')\n"
36239 : "4294967297\n"
36240 : ">>> feature.GetField('my_int')\n"
36241 : "4294967297\n"
36242 : "\n"
36243 : ""},
36244 : { "Feature_GetFieldAsInteger64", _wrap_Feature_GetFieldAsInteger64, METH_VARARGS, "\n"
36245 : "Feature_GetFieldAsInteger64(Feature self, int id) -> GIntBig\n"
36246 : "Feature_GetFieldAsInteger64(Feature self, char const * field_name) -> GIntBig\n"
36247 : "\n"
36248 : "\n"
36249 : "Fetch field value as integer 64 bit.\n"
36250 : "\n"
36251 : ":py:const:`OFTInteger` are promoted to 64 bit. :py:const:`OFTString` features\n"
36252 : "will be translated using :cpp:func:`CPLAtoGIntBig`. :py:const:`OFTReal` fields\n"
36253 : "will be cast to integer. Other field types, or errors will result in a return\n"
36254 : "value of zero.\n"
36255 : "\n"
36256 : "See :cpp:func:`OGRFeature::GetFieldAsInteger64`.\n"
36257 : "\n"
36258 : "Parameters\n"
36259 : "-----------\n"
36260 : "fld_index : int / str\n"
36261 : " Field name or 0-based numeric index. For repeated\n"
36262 : " access, use of the numeric index avoids a lookup\n"
36263 : " step.\n"
36264 : "\n"
36265 : "Returns\n"
36266 : "--------\n"
36267 : "int:\n"
36268 : " the field value.\n"
36269 : "\n"
36270 : ""},
36271 : { "Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, "\n"
36272 : "Feature_GetFieldAsDouble(Feature self, int id) -> double\n"
36273 : "Feature_GetFieldAsDouble(Feature self, char const * field_name) -> double\n"
36274 : "\n"
36275 : "Fetch field value as a double.\n"
36276 : "\n"
36277 : ":py:const:`OFTString` features will be translated using :cpp:func:`CPLAtof`. :py:const:`OFTInteger`\n"
36278 : "fields will be cast to double. Other field types, or errors will\n"
36279 : "result in a return value of zero.\n"
36280 : "\n"
36281 : "See :cpp:func:`OGRFeature::GetFieldAsDouble`.\n"
36282 : "\n"
36283 : "Parameters\n"
36284 : "-----------\n"
36285 : "fld_index : int / str\n"
36286 : " Field name or 0-based numeric index. For repeated\n"
36287 : " access, use of the numeric index avoids a lookup\n"
36288 : " step.\n"
36289 : "\n"
36290 : "Returns\n"
36291 : "--------\n"
36292 : "float:\n"
36293 : " the field value.\n"
36294 : "\n"
36295 : ""},
36296 : { "Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, "\n"
36297 : "Feature_GetFieldAsDateTime(Feature self, int id)\n"
36298 : "Feature_GetFieldAsDateTime(Feature self, char const * field_name)\n"
36299 : "\n"
36300 : "\n"
36301 : "Fetch field value as date and time.\n"
36302 : "\n"
36303 : "Currently this method only works for :py:const:`OFTDate`, :py:const:`OFTTime`\n"
36304 : "and :py:const:`OFTDateTime` fields.\n"
36305 : "\n"
36306 : "See :cpp:func:`OGRFeature::GetFieldAsDateTime`.\n"
36307 : "\n"
36308 : "Parameters\n"
36309 : "-----------\n"
36310 : "fld_index : int / str\n"
36311 : " Field name or 0-based numeric index. For repeated\n"
36312 : " access, use of the numeric index avoids a lookup\n"
36313 : " step.\n"
36314 : "\n"
36315 : "Returns\n"
36316 : "--------\n"
36317 : "list\n"
36318 : " list containing [ year, month, day, hour, minute, second, timezone flag ]\n"
36319 : "\n"
36320 : "Examples\n"
36321 : "--------\n"
36322 : ">>> from datetime import datetime\n"
36323 : ">>> from zoneinfo import ZoneInfo\n"
36324 : ">>> defn = ogr.FeatureDefn()\n"
36325 : ">>> defn.AddFieldDefn(ogr.FieldDefn('unknown', ogr.OFTDateTime))\n"
36326 : ">>> defn.AddFieldDefn(ogr.FieldDefn('local', ogr.OFTDateTime))\n"
36327 : ">>> defn.AddFieldDefn(ogr.FieldDefn('utc', ogr.OFTDateTime))\n"
36328 : ">>> feature = ogr.Feature(defn)\n"
36329 : ">>> feature['unknown'] = datetime.now()\n"
36330 : ">>> feature['local'] = datetime.now(ZoneInfo('Canada/Eastern'))\n"
36331 : ">>> feature['utc'] = datetime.now(ZoneInfo('UTC'))\n"
36332 : ">>> feature.GetFieldAsDateTime('unknown')\n"
36333 : "[2024, 3, 15, 20, 34, 52.594173431396484, 0]\n"
36334 : ">>> feature.GetFieldAsDateTime('local')\n"
36335 : "[2024, 3, 15, 20, 34, 52.59502410888672, 84]\n"
36336 : ">>> feature.GetFieldAsDateTime('utc')\n"
36337 : "[2024, 3, 16, 0, 34, 52.59580993652344, 100]\n"
36338 : "\n"
36339 : "See Also\n"
36340 : "--------\n"
36341 : ":py:func:`Feature.GetFieldAsISO8601DateTime`\n"
36342 : "\n"
36343 : ""},
36344 : { "Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, "\n"
36345 : "Feature_GetFieldAsIntegerList(Feature self, int id)\n"
36346 : "Feature_GetFieldAsIntegerList(Feature self, char const * field_name)\n"
36347 : "\n"
36348 : "\n"
36349 : "Fetch field value as a list of integers.\n"
36350 : "\n"
36351 : "Currently this function only works for :py:const:`OFTIntegerList` fields.\n"
36352 : "\n"
36353 : "This function is the same as the C++ method\n"
36354 : ":cpp:func:`OGRFeature::GetFieldAsIntegerList`.\n"
36355 : "\n"
36356 : "Parameters\n"
36357 : "-----------\n"
36358 : "fld_index : int / str\n"
36359 : " Field name or 0-based numeric index. For repeated\n"
36360 : " access, use of the numeric index avoids a lookup\n"
36361 : " step.\n"
36362 : "\n"
36363 : "Returns\n"
36364 : "--------\n"
36365 : "list:\n"
36366 : " the field value.\n"
36367 : "\n"
36368 : ""},
36369 : { "Feature_GetFieldAsInteger64List", _wrap_Feature_GetFieldAsInteger64List, METH_VARARGS, "\n"
36370 : "Feature_GetFieldAsInteger64List(Feature self, int id)\n"
36371 : "\n"
36372 : "Fetch field value as a list of 64 bit integers.\n"
36373 : "\n"
36374 : "Currently this function only works for :py:const:`OFTInteger64List` fields.\n"
36375 : "\n"
36376 : "See :cpp:func:`OGRFeature::GetFieldAsInteger64List`.\n"
36377 : "\n"
36378 : "Parameters\n"
36379 : "-----------\n"
36380 : "fld_index : int / str\n"
36381 : " Field name or 0-based numeric index. For repeated\n"
36382 : " access, use of the numeric index avoids a lookup\n"
36383 : " step.\n"
36384 : "\n"
36385 : "Returns\n"
36386 : "--------\n"
36387 : "list:\n"
36388 : " the field value.\n"
36389 : "\n"
36390 : ""},
36391 : { "Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, "\n"
36392 : "Feature_GetFieldAsDoubleList(Feature self, int id)\n"
36393 : "Feature_GetFieldAsDoubleList(Feature self, char const * field_name)\n"
36394 : "\n"
36395 : "\n"
36396 : "Fetch field value as a list of doubles.\n"
36397 : "\n"
36398 : "Currently this function only works for :py:const:`OFTRealList` fields.\n"
36399 : "\n"
36400 : "See :cpp:func:`OGRFeature::GetFieldAsDoubleList`.\n"
36401 : "\n"
36402 : "Parameters\n"
36403 : "-----------\n"
36404 : "fld_index : int / str\n"
36405 : " Field name or 0-based numeric index. For repeated\n"
36406 : " access, use of the numeric index avoids a lookup\n"
36407 : " step.\n"
36408 : "\n"
36409 : "Returns\n"
36410 : "-------\n"
36411 : "list\n"
36412 : "\n"
36413 : "Examples\n"
36414 : "--------\n"
36415 : ">>> defn = ogr.FeatureDefn()\n"
36416 : ">>> defn.AddFieldDefn(ogr.FieldDefn('list', ogr.OFTRealList))\n"
36417 : ">>> feature = ogr.Feature(defn)\n"
36418 : ">>> feature['list'] = [1.1, 2.2, 3.3]\n"
36419 : ">>> feature.GetFieldAsDoubleList('list')\n"
36420 : "[1.1, 2.2, 3.3]\n"
36421 : "\n"
36422 : ""},
36423 : { "Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, "\n"
36424 : "Feature_GetFieldAsStringList(Feature self, int id) -> char **\n"
36425 : "\n"
36426 : "\n"
36427 : "Fetch field value as a list of strings.\n"
36428 : "\n"
36429 : "Currently this method only works for :py:const:`OFTStringList` fields.\n"
36430 : "\n"
36431 : "See :cpp:func:`OGRFeature::GetFieldAsStringList`.\n"
36432 : "\n"
36433 : "Parameters\n"
36434 : "-----------\n"
36435 : "fld_index : int / str\n"
36436 : " Field name or 0-based numeric index. For repeated\n"
36437 : " access, use of the numeric index avoids a lookup\n"
36438 : " step.\n"
36439 : "\n"
36440 : "Returns\n"
36441 : "--------\n"
36442 : "list:\n"
36443 : " the field value.\n"
36444 : "\n"
36445 : ""},
36446 : { "Feature_GetFieldAsBinary", _wrap_Feature_GetFieldAsBinary, METH_VARARGS, "\n"
36447 : "Feature_GetFieldAsBinary(Feature self, int id) -> OGRErr\n"
36448 : "Feature_GetFieldAsBinary(Feature self, char const * field_name) -> OGRErr\n"
36449 : "\n"
36450 : "\n"
36451 : "Fetch field value as binary.\n"
36452 : "\n"
36453 : "This method only works for :py:const:`OFTBinary` and :py:const:`OFTString` fields.\n"
36454 : "\n"
36455 : "See :cpp:func:`OGRFeature::GetFieldAsBinary`.\n"
36456 : "\n"
36457 : "Parameters\n"
36458 : "-----------\n"
36459 : "fld_index : int / str\n"
36460 : " Field name or 0-based numeric index. For repeated\n"
36461 : " access, use of the numeric index avoids a lookup\n"
36462 : " step.\n"
36463 : "\n"
36464 : "Returns\n"
36465 : "--------\n"
36466 : "bytearray\n"
36467 : "\n"
36468 : ""},
36469 : { "Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, "\n"
36470 : "Feature_IsFieldSet(Feature self, int id) -> bool\n"
36471 : "Feature_IsFieldSet(Feature self, char const * field_name) -> bool\n"
36472 : "\n"
36473 : "\n"
36474 : "Test if a field has ever been assigned a value or not.\n"
36475 : "\n"
36476 : "See :cpp:func:`OGRFeature::IsFieldSet`.\n"
36477 : "\n"
36478 : "Parameters\n"
36479 : "-----------\n"
36480 : "fld_index : int / str\n"
36481 : " Field name or 0-based numeric index. For repeated\n"
36482 : " access, use of the numeric index avoids a lookup\n"
36483 : " step.\n"
36484 : "\n"
36485 : "Returns\n"
36486 : "--------\n"
36487 : "bool:\n"
36488 : " ``True`` if the field has been set, otherwise ``False``.\n"
36489 : "\n"
36490 : ""},
36491 : { "Feature_IsFieldNull", _wrap_Feature_IsFieldNull, METH_VARARGS, "\n"
36492 : "Feature_IsFieldNull(Feature self, int id) -> bool\n"
36493 : "Feature_IsFieldNull(Feature self, char const * field_name) -> bool\n"
36494 : "\n"
36495 : "\n"
36496 : "Test if a field is null.\n"
36497 : "\n"
36498 : "See :cpp:func:OGRFeature::`IsFieldNull`.\n"
36499 : "\n"
36500 : "Parameters\n"
36501 : "-----------\n"
36502 : "fld_index : int / str\n"
36503 : " Field name or 0-based numeric index. For repeated\n"
36504 : " access, use of the numeric index avoids a lookup\n"
36505 : " step.\n"
36506 : "\n"
36507 : "Returns\n"
36508 : "--------\n"
36509 : "bool:\n"
36510 : " ``True`` if the field is null, otherwise ``False``\n"
36511 : "\n"
36512 : ""},
36513 : { "Feature_IsFieldSetAndNotNull", _wrap_Feature_IsFieldSetAndNotNull, METH_VARARGS, "\n"
36514 : "Feature_IsFieldSetAndNotNull(Feature self, int id) -> bool\n"
36515 : "Feature_IsFieldSetAndNotNull(Feature self, char const * field_name) -> bool\n"
36516 : "\n"
36517 : "\n"
36518 : "Test if a field is set and not null.\n"
36519 : "\n"
36520 : "See :cpp:func:`OGRFeature::IsFieldSetAndNotNull`.\n"
36521 : "\n"
36522 : "Parameters\n"
36523 : "-----------\n"
36524 : "fld_index : int / str\n"
36525 : " Field name or 0-based numeric index. For repeated\n"
36526 : " access, use of the numeric index avoids a lookup\n"
36527 : " step.\n"
36528 : "\n"
36529 : "Returns\n"
36530 : "--------\n"
36531 : "bool:\n"
36532 : " ``True`` if the field is set and not null, otherwise ``False``.\n"
36533 : "\n"
36534 : ""},
36535 : { "Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, "\n"
36536 : "Feature_GetFieldIndex(Feature self, char const * field_name) -> int\n"
36537 : "\n"
36538 : "\n"
36539 : "Fetch the field index given field name.\n"
36540 : "\n"
36541 : "See :cpp:func:`OGRFeature::GetFieldIndex`.\n"
36542 : "\n"
36543 : "Parameters\n"
36544 : "-----------\n"
36545 : "field_name:\n"
36546 : " the name of the field to search for.\n"
36547 : "\n"
36548 : "Returns\n"
36549 : "--------\n"
36550 : "int:\n"
36551 : " the field index, or -1 if no matching field is found.\n"
36552 : "\n"
36553 : ""},
36554 : { "Feature_GetGeomFieldIndex", _wrap_Feature_GetGeomFieldIndex, METH_VARARGS, "\n"
36555 : "Feature_GetGeomFieldIndex(Feature self, char const * field_name) -> int\n"
36556 : "\n"
36557 : "\n"
36558 : "Fetch the geometry field index given geometry field name.\n"
36559 : "\n"
36560 : "See :cpp:func:`OGRFeature::GetGeomFieldIndex`.\n"
36561 : "\n"
36562 : "Parameters\n"
36563 : "-----------\n"
36564 : "field_name:\n"
36565 : " the name of the geometry field to search for.\n"
36566 : "\n"
36567 : "Returns\n"
36568 : "--------\n"
36569 : "int:\n"
36570 : " the geometry field index, or -1 if no matching geometry field is found.\n"
36571 : "\n"
36572 : ""},
36573 : { "Feature_GetFID", _wrap_Feature_GetFID, METH_O, "\n"
36574 : "Feature_GetFID(Feature self) -> GIntBig\n"
36575 : "\n"
36576 : "\n"
36577 : "Get feature identifier.\n"
36578 : "See :cpp:func:`OGRFeature::GetFID`\n"
36579 : "\n"
36580 : "Returns\n"
36581 : "-------\n"
36582 : "int:\n"
36583 : " feature id or :py:const:`NullFID` if none has been assigned.\n"
36584 : "\n"
36585 : ""},
36586 : { "Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, "\n"
36587 : "Feature_SetFID(Feature self, GIntBig fid) -> OGRErr\n"
36588 : "\n"
36589 : "\n"
36590 : "Set the feature identifier.\n"
36591 : "\n"
36592 : "For specific types of features this operation may fail on illegal\n"
36593 : "features ids. Generally it always succeeds. Feature ids should be\n"
36594 : "greater than or equal to zero, with the exception of :py:const:NullFID` (-1)\n"
36595 : "indicating that the feature id is unknown.\n"
36596 : "\n"
36597 : "See :cpp:func:`OGRFeature::SetFID`.\n"
36598 : "\n"
36599 : "Parameters\n"
36600 : "-----------\n"
36601 : "fid:\n"
36602 : " the new feature identifier value to assign.\n"
36603 : "\n"
36604 : "Returns\n"
36605 : "--------\n"
36606 : "int:\n"
36607 : " :py:const:`OGRERR_NONE` on success, or some other value on failure.\n"
36608 : "\n"
36609 : ""},
36610 : { "Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_O, "\n"
36611 : "Feature_DumpReadable(Feature self)\n"
36612 : "\n"
36613 : "\n"
36614 : "Print this feature in a human readable form.\n"
36615 : "\n"
36616 : "This dumps the attributes and geometry. It doesn't include\n"
36617 : "definition information other than field types and names nor does it\n"
36618 : "report the geometry spatial reference system.\n"
36619 : "\n"
36620 : "See :cpp:func:`OGRFeature::DumpReadable`.\n"
36621 : "\n"
36622 : "Examples\n"
36623 : "--------\n"
36624 : ">>> with gdal.OpenEx('data/poly.shp') as ds:\n"
36625 : "... lyr = ds.GetLayer(0)\n"
36626 : "... feature = lyr.GetNextFeature()\n"
36627 : "... feature.DumpReadable()\n"
36628 : "...\n"
36629 : "OGRFeature(poly):0\n"
36630 : " AREA (Real) = 215229.266\n"
36631 : " EAS_ID (Integer64) = 168\n"
36632 : " PRFEDEA (String) = 35043411\n"
36633 : " 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"
36634 : "\n"
36635 : ""},
36636 : { "Feature_DumpReadableAsString", _wrap_Feature_DumpReadableAsString, METH_VARARGS, "\n"
36637 : "Feature_DumpReadableAsString(Feature self, char ** options=None) -> retStringAndCPLFree *\n"
36638 : "\n"
36639 : "\n"
36640 : "Return feature information in a human-readable form.\n"
36641 : "Returns the text printed by :py:func:`Feature.DumpReadable`.\n"
36642 : "\n"
36643 : "Returns\n"
36644 : "-------\n"
36645 : "str\n"
36646 : "\n"
36647 : ""},
36648 : { "Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, "\n"
36649 : "Feature_UnsetField(Feature self, int id)\n"
36650 : "Feature_UnsetField(Feature self, char const * field_name)\n"
36651 : "\n"
36652 : "\n"
36653 : "Clear a field, marking it as unset.\n"
36654 : "\n"
36655 : "See :cpp:func:`OGRFeature::UnsetField`.\n"
36656 : "\n"
36657 : "Parameters\n"
36658 : "-----------\n"
36659 : "fld_index : int / str\n"
36660 : " Field name or 0-based numeric index. For repeated\n"
36661 : " access, use of the numeric index avoids a lookup\n"
36662 : " step.\n"
36663 : "\n"
36664 : ""},
36665 : { "Feature_SetFieldNull", _wrap_Feature_SetFieldNull, METH_VARARGS, "\n"
36666 : "Feature_SetFieldNull(Feature self, int id)\n"
36667 : "Feature_SetFieldNull(Feature self, char const * field_name)\n"
36668 : "\n"
36669 : "\n"
36670 : "Clear a field, marking it as null.\n"
36671 : "\n"
36672 : "See :cpp:func:`OGRFeature::SetFieldNull`.\n"
36673 : "\n"
36674 : "Parameters\n"
36675 : "-----------\n"
36676 : "fld_index : int / str\n"
36677 : " Field name or 0-based numeric index. For repeated\n"
36678 : " access, use of the numeric index avoids a lookup\n"
36679 : " step.\n"
36680 : "\n"
36681 : "\n"
36682 : ""},
36683 : { "Feature_SetFieldInteger64", _wrap_Feature_SetFieldInteger64, METH_VARARGS, "Feature_SetFieldInteger64(Feature self, int id, GIntBig value)"},
36684 : { "Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, "\n"
36685 : "Feature_SetField(Feature self, int id, char const * value)\n"
36686 : "Feature_SetField(Feature self, char const * field_name, char const * value)\n"
36687 : "Feature_SetField(Feature self, int id, double value)\n"
36688 : "Feature_SetField(Feature self, char const * field_name, double value)\n"
36689 : "Feature_SetField(Feature self, int id, int year, int month, int day, int hour, int minute, float second, int tzflag)\n"
36690 : "Feature_SetField(Feature self, char const * field_name, int year, int month, int day, int hour, int minute, float second, int tzflag)\n"
36691 : ""},
36692 : { "Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, "\n"
36693 : "Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
36694 : "void\n"
36695 : "\n"
36696 : "Set field to list of integer values.\n"
36697 : "\n"
36698 : "This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
36699 : ":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
36700 : "\n"
36701 : "See :cpp:func:`OGRFeature::SetField`.\n"
36702 : "\n"
36703 : "This method has only an effect on the in-memory feature object. If\n"
36704 : "this object comes from a layer and the modifications must be\n"
36705 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
36706 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
36707 : "used afterwards.\n"
36708 : "\n"
36709 : "Parameters\n"
36710 : "-----------\n"
36711 : "id : int\n"
36712 : " the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
36713 : "nList : list\n"
36714 : " the values to assign.\n"
36715 : "\n"
36716 : ""},
36717 : { "Feature_SetFieldInteger64List", _wrap_Feature_SetFieldInteger64List, METH_VARARGS, "\n"
36718 : "Feature_SetFieldInteger64List(Feature self, int id, int nList)\n"
36719 : "void\n"
36720 : "\n"
36721 : "Set field to list of 64 bit integer values.\n"
36722 : "\n"
36723 : "This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
36724 : ":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
36725 : "\n"
36726 : "See :cpp:func:`OGRFeature::SetField`.\n"
36727 : "\n"
36728 : "This method has only an effect on the in-memory feature object. If\n"
36729 : "this object comes from a layer and the modifications must be\n"
36730 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
36731 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
36732 : "used afterwards.\n"
36733 : "\n"
36734 : "Parameters\n"
36735 : "-----------\n"
36736 : "id : int\n"
36737 : " the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
36738 : "nList : list\n"
36739 : " the values to assign.\n"
36740 : "\n"
36741 : ""},
36742 : { "Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, "\n"
36743 : "Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
36744 : "\n"
36745 : "\n"
36746 : "Set field to list of double values.\n"
36747 : "\n"
36748 : "This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
36749 : ":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
36750 : "\n"
36751 : "See :cpp:func:`OGRFeature::SetField`.\n"
36752 : "\n"
36753 : "This method has only an effect on the in-memory feature object. If\n"
36754 : "this object comes from a layer and the modifications must be\n"
36755 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
36756 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
36757 : "used afterwards.\n"
36758 : "\n"
36759 : "Parameters\n"
36760 : "-----------\n"
36761 : "id : int\n"
36762 : " the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
36763 : "nList : list\n"
36764 : " the values to assign.\n"
36765 : "\n"
36766 : ""},
36767 : { "Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, "\n"
36768 : "Feature_SetFieldStringList(Feature self, int id, char ** pList)\n"
36769 : "\n"
36770 : "\n"
36771 : "Set field to list of strings value.\n"
36772 : "\n"
36773 : "This function currently only has an effect of :py:const:`OFTStringList` fields.\n"
36774 : "\n"
36775 : "See :cpp:func:`OGRFeature::SetField`.\n"
36776 : "\n"
36777 : "This method has only an effect on the in-memory feature object. If\n"
36778 : "this object comes from a layer and the modifications must be\n"
36779 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
36780 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
36781 : "used afterwards.\n"
36782 : "\n"
36783 : "Parameters\n"
36784 : "-----------\n"
36785 : "fld_index : int / str\n"
36786 : " Field name or 0-based numeric index. For repeated\n"
36787 : " access, use of the numeric index avoids a lookup\n"
36788 : " step.\n"
36789 : "value:\n"
36790 : " the value to assign.\n"
36791 : "\n"
36792 : ""},
36793 : { "Feature__SetFieldBinary", _wrap_Feature__SetFieldBinary, METH_VARARGS, "Feature__SetFieldBinary(Feature self, int id, int nLen)"},
36794 : { "Feature_SetFieldBinaryFromHexString", _wrap_Feature_SetFieldBinaryFromHexString, METH_VARARGS, "\n"
36795 : "Feature_SetFieldBinaryFromHexString(Feature self, int id, char const * pszValue)\n"
36796 : "Feature_SetFieldBinaryFromHexString(Feature self, char const * field_name, char const * pszValue)\n"
36797 : ""},
36798 : { "Feature_SetFrom", (PyCFunction)(void(*)(void))_wrap_Feature_SetFrom, METH_VARARGS|METH_KEYWORDS, "\n"
36799 : "Feature_SetFrom(Feature self, Feature other, int forgiving=1) -> OGRErr\n"
36800 : "\n"
36801 : "Set one feature from another.\n"
36802 : "\n"
36803 : "Overwrite the contents of this feature from the geometry and\n"
36804 : "attributes of another. The other feature does not need to have the\n"
36805 : "same :py:class:`FeatureDefn`. Field values are copied by corresponding field\n"
36806 : "names. Field types do not have to exactly match. OGR_F_SetField\\*()\n"
36807 : "function conversion rules will be applied as needed.\n"
36808 : "\n"
36809 : "See :cpp:func:`OGRFeature::SetFrom`.\n"
36810 : "\n"
36811 : "Parameters\n"
36812 : "-----------\n"
36813 : "other : Feature\n"
36814 : " feature from which geometry and field values will be copied.\n"
36815 : "forgiving : bool, default = True\n"
36816 : " ``True`` if the operation should continue despite lacking\n"
36817 : " output fields matching some of the source fields.\n"
36818 : "\n"
36819 : "Returns\n"
36820 : "--------\n"
36821 : "int:\n"
36822 : " :py:const:`OGRERR_NONE` if the operation succeeds, even if some values are not\n"
36823 : " transferred, otherwise an error code.\n"
36824 : "\n"
36825 : ""},
36826 : { "Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, "\n"
36827 : "Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
36828 : "\n"
36829 : "\n"
36830 : "Set one feature from another.\n"
36831 : "\n"
36832 : "Overwrite the contents of this feature from the geometry and\n"
36833 : "attributes of another. The other feature does not need to have the\n"
36834 : "same :py:class:`FeatureDefn`. Field values are copied according to the provided\n"
36835 : "indices map. Field types do not have to exactly match.\n"
36836 : "OGR_F_SetField\\*() function conversion rules will be applied as needed.\n"
36837 : "This is more efficient than :py:meth:SetFrom` in that this doesn't\n"
36838 : "lookup the fields by their names. Particularly useful when the field\n"
36839 : "names don't match.\n"
36840 : "\n"
36841 : "See :cpp:func:`OGRFeature::SetFrom`.\n"
36842 : "\n"
36843 : "Parameters\n"
36844 : "-----------\n"
36845 : "other : Feature\n"
36846 : " handle to the feature from which geometry, and field\n"
36847 : " values will be copied.\n"
36848 : "forgiving : bool\n"
36849 : " ``True`` if the operation should continue despite lacking\n"
36850 : " output fields matching some of the source fields.\n"
36851 : "nList : list\n"
36852 : " Array of the indices of the destination feature's fields\n"
36853 : " stored at the corresponding index of the source feature's fields. A\n"
36854 : " value of -1 should be used to ignore the source's field. The array\n"
36855 : " should not be NULL and be as long as the number of fields in the\n"
36856 : " source feature.\n"
36857 : "\n"
36858 : "Returns\n"
36859 : "--------\n"
36860 : "OGRErr:\n"
36861 : " :py:const:`OGRERR_NONE` if the operation succeeds, even if some values are not\n"
36862 : " transferred, otherwise an error code.\n"
36863 : "\n"
36864 : ""},
36865 : { "Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_O, "\n"
36866 : "Feature_GetStyleString(Feature self) -> char const *\n"
36867 : "\n"
36868 : "\n"
36869 : "Fetch style string for this feature.\n"
36870 : "\n"
36871 : "Set the OGR Feature Style Specification for details on the format of\n"
36872 : "this string, and :source_file:`ogr/ogr_featurestyle.h` for services available to parse\n"
36873 : "it.\n"
36874 : "\n"
36875 : "See :cpp:func:`OGRFeature::GetStyleString`.\n"
36876 : "\n"
36877 : "Returns\n"
36878 : "--------\n"
36879 : "str or None\n"
36880 : "\n"
36881 : ""},
36882 : { "Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, "\n"
36883 : "Feature_SetStyleString(Feature self, char const * the_string)\n"
36884 : "\n"
36885 : "\n"
36886 : "Set feature style string.\n"
36887 : "\n"
36888 : "See :cpp:func:`OGRFeature::SetStyleString`.\n"
36889 : "\n"
36890 : "Parameters\n"
36891 : "-----------\n"
36892 : "the_string : str\n"
36893 : " the style string to apply to this feature\n"
36894 : "\n"
36895 : ""},
36896 : { "Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, "\n"
36897 : "Feature_GetFieldType(Feature self, int id) -> OGRFieldType\n"
36898 : "Feature_GetFieldType(Feature self, char const * field_name) -> OGRFieldType\n"
36899 : "\n"
36900 : "\n"
36901 : "Return the type of the given field.\n"
36902 : "\n"
36903 : "Parameters\n"
36904 : "-----------\n"
36905 : "fld_index : int / str\n"
36906 : " Field name or 0-based numeric index. For repeated\n"
36907 : " access, use of the numeric index avoids a lookup\n"
36908 : " step.\n"
36909 : "\n"
36910 : "Returns\n"
36911 : "--------\n"
36912 : "int\n"
36913 : " field type code (e.g., :py:const:`OFTInteger`)\n"
36914 : "\n"
36915 : ""},
36916 : { "Feature_Validate", _wrap_Feature_Validate, METH_VARARGS, "\n"
36917 : "Feature_Validate(Feature self, int flags=OGR_F_VAL_ALL, int bEmitError=TRUE) -> int\n"
36918 : "\n"
36919 : "\n"
36920 : "Validate that a feature meets constraints of its schema.\n"
36921 : "\n"
36922 : "The scope of test is specified with the ``flags`` parameter.\n"
36923 : "\n"
36924 : "Regarding :py:const:`OGR_F_VAL_WIDTH`, the test is done assuming the string\n"
36925 : "width must be interpreted as the number of UTF-8 characters. Some drivers might\n"
36926 : "interpret the width as the number of bytes instead. So this test is rather\n"
36927 : "conservative (if it fails, then it will fail for all interpretations).\n"
36928 : "\n"
36929 : "See :cpp:func:`OGRFeature::Validate`.\n"
36930 : "\n"
36931 : "Parameters\n"
36932 : "-----------\n"
36933 : "flags : int, default = :py:const:`F_VAL_ALL`\n"
36934 : " One ore more of :py:const:`OGR_F_VAL_NULL`,\n"
36935 : " :py:const:`OGR_F_VAL_GEOM_TYPE`, py:const:`OGR_F_VAL_WIDTH` and\n"
36936 : " :py:const:`OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT` combined with\n"
36937 : " the with ``|`` operator\n"
36938 : "bEmitError : bool, default = True\n"
36939 : " TRUE if a CPLError() must be emitted when a check fails\n"
36940 : "\n"
36941 : "Returns\n"
36942 : "-------\n"
36943 : "int:\n"
36944 : " TRUE if all enabled validation tests pass.\n"
36945 : "\n"
36946 : ""},
36947 : { "Feature_FillUnsetWithDefault", _wrap_Feature_FillUnsetWithDefault, METH_VARARGS, "\n"
36948 : "Feature_FillUnsetWithDefault(Feature self, int bNotNullableOnly=FALSE, char ** options=None)\n"
36949 : "\n"
36950 : "\n"
36951 : "Fill unset fields with default values that might be defined.\n"
36952 : "\n"
36953 : "See :cpp:func:`OGRFeature::FillUnsetWithDefault`.\n"
36954 : "\n"
36955 : "Parameters\n"
36956 : "-----------\n"
36957 : "bNotNullableOnly : bool\n"
36958 : " if we should fill only unset fields with a not-null\n"
36959 : " constraint.\n"
36960 : "options : dict\n"
36961 : " unused currently.\n"
36962 : "\n"
36963 : ""},
36964 : { "Feature_GetNativeData", _wrap_Feature_GetNativeData, METH_O, "\n"
36965 : "Feature_GetNativeData(Feature self) -> char const *\n"
36966 : "\n"
36967 : "\n"
36968 : "Returns the native data for the feature.\n"
36969 : "\n"
36970 : "The native data is the representation in a \"natural\" form that comes\n"
36971 : "from the driver that created this feature, or that is aimed at an\n"
36972 : "output driver. The native data may be in different format, which is\n"
36973 : "indicated by :py:func:`GetNativeMediaType`.\n"
36974 : "\n"
36975 : "Note that most drivers do not support storing the native data in the\n"
36976 : "feature object, and if they do, generally the ``NATIVE_DATA`` open option\n"
36977 : "must be passed at dataset opening.\n"
36978 : "\n"
36979 : "The \"native data\" does not imply it is something more performant or\n"
36980 : "powerful than what can be obtained with the rest of the API, but it\n"
36981 : "may be useful in round-tripping scenarios where some characteristics\n"
36982 : "of the underlying format are not captured otherwise by the OGR\n"
36983 : "abstraction.\n"
36984 : "\n"
36985 : "See :cpp:func:`OGRFeature::GetNativeData` and :ref:`rfc-60`.\n"
36986 : "\n"
36987 : "Returns\n"
36988 : "-------\n"
36989 : "str:\n"
36990 : " a string with the native data, or ``None``.\n"
36991 : "\n"
36992 : ""},
36993 : { "Feature_GetNativeMediaType", _wrap_Feature_GetNativeMediaType, METH_O, "\n"
36994 : "Feature_GetNativeMediaType(Feature self) -> char const *\n"
36995 : "\n"
36996 : "\n"
36997 : "Returns the native media type for the feature.\n"
36998 : "\n"
36999 : "The native media type is the identifier for the format of the native\n"
37000 : "data. It follows the IANA RFC 2045\n"
37001 : "(seehttps://en.wikipedia.org/wiki/Media_type), e.g.\n"
37002 : "\"application/vnd.geo+json\" for JSon.\n"
37003 : "\n"
37004 : "See :cpp:func:`OGRFeature::GetNativeMediaType` and :ref:`rfc-60`.\n"
37005 : "\n"
37006 : "Returns\n"
37007 : "--------\n"
37008 : "str:\n"
37009 : " a string with the native media type, or ``None``.\n"
37010 : "\n"
37011 : ""},
37012 : { "Feature_SetNativeData", _wrap_Feature_SetNativeData, METH_VARARGS, "\n"
37013 : "Feature_SetNativeData(Feature self, char const * nativeData)\n"
37014 : "\n"
37015 : "\n"
37016 : "Sets the native data for the feature.\n"
37017 : "\n"
37018 : "The native data is the representation in a \"natural\" form that comes\n"
37019 : "from the driver that created this feature, or that is aimed at an\n"
37020 : "output driver. The native data may be in different format, which is\n"
37021 : "indicated by :py:meth:`GetNativeMediaType`.\n"
37022 : "\n"
37023 : "See :cpp:func:`OGRFeature::SetNativeData` and :ref:`rfc-60`.\n"
37024 : "\n"
37025 : "Parameters\n"
37026 : "-----------\n"
37027 : "nativeData : str\n"
37028 : " a string with the native data, or ``None``\n"
37029 : "\n"
37030 : ""},
37031 : { "Feature_SetNativeMediaType", _wrap_Feature_SetNativeMediaType, METH_VARARGS, "\n"
37032 : "Feature_SetNativeMediaType(Feature self, char const * nativeMediaType)\n"
37033 : "\n"
37034 : "\n"
37035 : "Sets the native media type for the feature.\n"
37036 : "\n"
37037 : "The native media type is the identifier for the format of the native\n"
37038 : "data. It follows the IANA RFC 2045\n"
37039 : "(see https://en.wikipedia.org/wiki/Media_type), e.g.\n"
37040 : "\"application/vnd.geo+json\" for JSon.\n"
37041 : "\n"
37042 : "See :cpp:func:`OGRFeature::SetNativeMediaType` and :ref:`rfc-60`.\n"
37043 : "\n"
37044 : "Parameters\n"
37045 : "-----------\n"
37046 : "nativeMediaType : str\n"
37047 : " a string with the native media type, or ``None``\n"
37048 : "\n"
37049 : ""},
37050 : { "Feature_SetFieldString", _wrap_Feature_SetFieldString, METH_VARARGS, "\n"
37051 : "Feature_SetFieldString(Feature self, int id, char const * value)\n"
37052 : "\n"
37053 : "\n"
37054 : "Set field to string value.\n"
37055 : "\n"
37056 : ":py:const:`OFTInteger` fields will be set based on an atoi() conversion of the\n"
37057 : "string. :py:const:`OFTInteger64` fields will be set based on an :cpp:func:`CPLAtoGIntBig`\n"
37058 : "conversion of the string. :py:const:`OFTReal` fields will be set based on an\n"
37059 : ":cpp:func:`CPLAtof` conversion of the string. Other field types may be\n"
37060 : "unaffected.\n"
37061 : "\n"
37062 : "See :cpp:func:`OGRFeature::SetField`.\n"
37063 : "\n"
37064 : "This method has only an effect on the in-memory feature object. If\n"
37065 : "this object comes from a layer and the modifications must be\n"
37066 : "serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
37067 : "afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
37068 : "used afterwards.\n"
37069 : "\n"
37070 : "Parameters\n"
37071 : "-----------\n"
37072 : "fld_index : int / str\n"
37073 : " Field name or 0-based numeric index. For repeated\n"
37074 : " access, use of the numeric index avoids a lookup\n"
37075 : " step.\n"
37076 : "value:\n"
37077 : " the value to assign.\n"
37078 : "\n"
37079 : ""},
37080 : { "Feature_swigregister", Feature_swigregister, METH_O, NULL},
37081 : { "Feature_swiginit", Feature_swiginit, METH_VARARGS, NULL},
37082 : { "delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_O, "delete_FeatureDefn(FeatureDefn self)"},
37083 : { "new_FeatureDefn", (PyCFunction)(void(*)(void))_wrap_new_FeatureDefn, METH_VARARGS|METH_KEYWORDS, "\n"
37084 : "new_FeatureDefn(char const * name_null_ok=None) -> FeatureDefn\n"
37085 : "\n"
37086 : "\n"
37087 : "Create a new feature definition object to hold the field definitions.\n"
37088 : "\n"
37089 : "Parameters\n"
37090 : "----------\n"
37091 : "name_null_ok : str, optional\n"
37092 : " Name for the :py:class:`FeatureDefn`.\n"
37093 : "\n"
37094 : ""},
37095 : { "FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_O, "\n"
37096 : "FeatureDefn_GetName(FeatureDefn self) -> char const *\n"
37097 : "\n"
37098 : "\n"
37099 : "Get name of the :py:class:`FeatureDefn`.\n"
37100 : "\n"
37101 : "See :cpp:func:`OGRFeatureDefn::GetName`.\n"
37102 : "\n"
37103 : "Returns\n"
37104 : "--------\n"
37105 : "str:\n"
37106 : " the name\n"
37107 : "\n"
37108 : ""},
37109 : { "FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_O, "\n"
37110 : "FeatureDefn_GetFieldCount(FeatureDefn self) -> int\n"
37111 : "\n"
37112 : "\n"
37113 : "Fetch number of fields on the passed feature definition.\n"
37114 : "\n"
37115 : "See :cpp:func:`OGRFeatureDefn::GetFieldCount`.\n"
37116 : "\n"
37117 : "Returns\n"
37118 : "--------\n"
37119 : "int:\n"
37120 : " count of fields.\n"
37121 : "\n"
37122 : ""},
37123 : { "FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, "\n"
37124 : "FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\n"
37125 : "\n"
37126 : "\n"
37127 : "Fetch field definition of the passed feature definition.\n"
37128 : "\n"
37129 : "See :cpp:func:`OGRFeatureDefn::GetFieldDefn`.\n"
37130 : "\n"
37131 : "Parameters\n"
37132 : "-----------\n"
37133 : "i : int / str\n"
37134 : " Field name or 0-based numeric index. For repeated\n"
37135 : " access, use of the numeric index avoids a lookup\n"
37136 : " step.\n"
37137 : "\n"
37138 : "Returns\n"
37139 : "--------\n"
37140 : "FieldDefn:\n"
37141 : " internal field definition object or ``None`` if the field does not\n"
37142 : " exist. This object should not be modified by the application.\n"
37143 : "\n"
37144 : ""},
37145 : { "FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, "\n"
37146 : "FeatureDefn_GetFieldIndex(FeatureDefn self, char const * field_name) -> int\n"
37147 : "\n"
37148 : "\n"
37149 : "Find field by name.\n"
37150 : "\n"
37151 : "The field index of the first field matching the passed field name\n"
37152 : "(case insensitively) is returned.\n"
37153 : "\n"
37154 : "See :cpp:func:`OGRFeatureDefn::GetFieldIndex`.\n"
37155 : "\n"
37156 : "Parameters\n"
37157 : "-----------\n"
37158 : "field_name : str\n"
37159 : " the field name to search for.\n"
37160 : "\n"
37161 : "Returns\n"
37162 : "--------\n"
37163 : "int:\n"
37164 : " the field index, or -1 if no match found.\n"
37165 : "\n"
37166 : ""},
37167 : { "FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, "\n"
37168 : "FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\n"
37169 : "\n"
37170 : "\n"
37171 : "Add a new field definition.\n"
37172 : "\n"
37173 : "To add a new field definition to a layer definition, do not use this\n"
37174 : "function directly, but use :py:meth:`Layer.CreateField` instead.\n"
37175 : "\n"
37176 : "This function should only be called while there are no :py:class:`Feature`\n"
37177 : "objects in existence based on this :py:class:`FeatureDefn`. The\n"
37178 : ":py:class:`FieldDefn` passed in is copied.\n"
37179 : "\n"
37180 : "See :cpp:func:`OGRFeatureDefn::AddFieldDefn`.\n"
37181 : "\n"
37182 : "Parameters\n"
37183 : "-----------\n"
37184 : "defn : FieldDefn\n"
37185 : " the new field definition.\n"
37186 : "\n"
37187 : ""},
37188 : { "FeatureDefn_GetGeomFieldCount", _wrap_FeatureDefn_GetGeomFieldCount, METH_O, "\n"
37189 : "FeatureDefn_GetGeomFieldCount(FeatureDefn self) -> int\n"
37190 : "\n"
37191 : "\n"
37192 : "Fetch number of geometry fields on the passed feature definition.\n"
37193 : "\n"
37194 : "See :cpp:func:`OGRFeatureDefn::GetGeomFieldCount`.\n"
37195 : "\n"
37196 : "Returns\n"
37197 : "--------\n"
37198 : "int:\n"
37199 : " count of geometry fields.\n"
37200 : "\n"
37201 : ""},
37202 : { "FeatureDefn_GetGeomFieldDefn", _wrap_FeatureDefn_GetGeomFieldDefn, METH_VARARGS, "\n"
37203 : "FeatureDefn_GetGeomFieldDefn(FeatureDefn self, int i) -> GeomFieldDefn\n"
37204 : "\n"
37205 : "\n"
37206 : "Fetch geometry field definition of the passed feature definition.\n"
37207 : "\n"
37208 : "See :cpp:func:`OGRFeatureDefn::GetGeomFieldDefn`.\n"
37209 : "\n"
37210 : "Parameters\n"
37211 : "-----------\n"
37212 : "i : int\n"
37213 : " the geometry field to fetch, between 0 and GetGeomFieldCount() - 1.\n"
37214 : "\n"
37215 : "Returns\n"
37216 : "--------\n"
37217 : "GeomFieldDefn:\n"
37218 : " an internal field definition object or ``None`` if invalid\n"
37219 : " index. This object should not be modified by the application.\n"
37220 : "\n"
37221 : ""},
37222 : { "FeatureDefn_GetGeomFieldIndex", _wrap_FeatureDefn_GetGeomFieldIndex, METH_VARARGS, "\n"
37223 : "FeatureDefn_GetGeomFieldIndex(FeatureDefn self, char const * field_name) -> int\n"
37224 : "\n"
37225 : "\n"
37226 : "Find geometry field by name.\n"
37227 : "\n"
37228 : "The geometry field index of the first geometry field matching the\n"
37229 : "passed field name (case insensitively) is returned.\n"
37230 : "\n"
37231 : "See :cpp:func:`OGRFeatureDefn::GetGeomFieldIndex`.\n"
37232 : "\n"
37233 : "Parameters\n"
37234 : "-----------\n"
37235 : "field_name : str\n"
37236 : " the geometry field name to search for.\n"
37237 : "\n"
37238 : "Returns\n"
37239 : "--------\n"
37240 : "int:\n"
37241 : " the geometry field index, or -1 if no match found.\n"
37242 : "\n"
37243 : ""},
37244 : { "FeatureDefn_AddGeomFieldDefn", _wrap_FeatureDefn_AddGeomFieldDefn, METH_VARARGS, "\n"
37245 : "FeatureDefn_AddGeomFieldDefn(FeatureDefn self, GeomFieldDefn defn)\n"
37246 : "\n"
37247 : "\n"
37248 : "Add a new geometry field definition.\n"
37249 : "\n"
37250 : "To add a new field definition to a layer definition, do not use this\n"
37251 : "function directly, but use :py:meth:`Layer.CreateGeomField` instead.\n"
37252 : "\n"
37253 : "This function should only be called while there are no :py:class:`Feature`\n"
37254 : "objects in existence based on this :py:class:`FeatureDefn`. The\n"
37255 : ":py:class:`GeomFieldDefn` passed in is copied.\n"
37256 : "\n"
37257 : "See :cpp:Func:`OGRFeatureDefn::AddGeomFieldDefn`.\n"
37258 : "\n"
37259 : "Parameters\n"
37260 : "-----------\n"
37261 : "defn : GeomFieldDefn\n"
37262 : " new geometry field definition.\n"
37263 : "\n"
37264 : ""},
37265 : { "FeatureDefn_DeleteGeomFieldDefn", _wrap_FeatureDefn_DeleteGeomFieldDefn, METH_VARARGS, "\n"
37266 : "FeatureDefn_DeleteGeomFieldDefn(FeatureDefn self, int idx) -> OGRErr\n"
37267 : "\n"
37268 : "\n"
37269 : "Delete an existing geometry field definition.\n"
37270 : "\n"
37271 : "To delete an existing geometry field definition from a layer\n"
37272 : "definition, do not use this function directly, but use\n"
37273 : ":py:meth:`Layer.DeleteGeomField` instead ( not implemented yet).\n"
37274 : "\n"
37275 : "This function should only be called while there are no :py:class:`Feature`\n"
37276 : "objects in existence based on this :py:class:`FeatureDefn`.\n"
37277 : "\n"
37278 : "See :cpp:func:`OGRFeatureDefn::DeleteGeomFieldDefn`.\n"
37279 : "\n"
37280 : "Parameters\n"
37281 : "-----------\n"
37282 : "idx : int\n"
37283 : " the index of the geometry field definition.\n"
37284 : "\n"
37285 : "Returns\n"
37286 : "--------\n"
37287 : "int:\n"
37288 : " :py:const:`OGRERR_NONE` in case of success.\n"
37289 : "\n"
37290 : ""},
37291 : { "FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_O, "\n"
37292 : "FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\n"
37293 : "\n"
37294 : "\n"
37295 : "Fetch the geometry base type of the passed feature definition.\n"
37296 : "\n"
37297 : "This is equivalent to ``GetGeomFieldDefn(0).GetType()``.\n"
37298 : "\n"
37299 : "See :cpp:func:`OGRFeatureDefn::GetGeomType`.\n"
37300 : "\n"
37301 : "Returns\n"
37302 : "--------\n"
37303 : "int :\n"
37304 : " the base type for all geometry related to this definition.\n"
37305 : "\n"
37306 : ""},
37307 : { "FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, "\n"
37308 : "FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\n"
37309 : "\n"
37310 : "\n"
37311 : "Assign the base geometry type for the passed layer (the same as the\n"
37312 : "feature definition).\n"
37313 : "\n"
37314 : "This is equivalent to ``GetGeomFieldDefn(0).SetType()``.\n"
37315 : "\n"
37316 : "All geometry objects using this type must be of the defined type or a\n"
37317 : "derived type. The default upon creation is :py:const:`wkbUnknown` which allows for\n"
37318 : "any geometry type. The geometry type should generally not be changed\n"
37319 : "after any :py:class:`Feature` objects have been created against this definition.\n"
37320 : "\n"
37321 : "See :cpp:func:`OGRFeatureDefn::SetGeomType`.\n"
37322 : "\n"
37323 : "Parameters\n"
37324 : "-----------\n"
37325 : "geom_type : int\n"
37326 : " the new type to assign.\n"
37327 : "\n"
37328 : ""},
37329 : { "FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_O, "\n"
37330 : "FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\n"
37331 : "\n"
37332 : "\n"
37333 : "Fetch current reference count.\n"
37334 : "\n"
37335 : "See :cpp:func:`OGRFeatureDefn::GetReferenceCount`.\n"
37336 : "\n"
37337 : "Returns\n"
37338 : "--------\n"
37339 : "int:\n"
37340 : " the current reference count.\n"
37341 : "\n"
37342 : ""},
37343 : { "FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_O, "\n"
37344 : "FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\n"
37345 : "\n"
37346 : "\n"
37347 : "Determine whether the geometry can be omitted when fetching features.\n"
37348 : "\n"
37349 : "Equivalent to ``GetGeomFieldDefn(0).IsIgnored()``.\n"
37350 : "\n"
37351 : "See :cpp:func:`OGRFeatureDefn::IsGeometryIgnored`.\n"
37352 : "\n"
37353 : "Returns\n"
37354 : "--------\n"
37355 : "int:\n"
37356 : " ignore state\n"
37357 : "\n"
37358 : ""},
37359 : { "FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, "\n"
37360 : "FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\n"
37361 : "\n"
37362 : "\n"
37363 : "Set whether the geometry can be omitted when fetching features.\n"
37364 : "\n"
37365 : "This is equivalent to ``GetGeomFieldDefn(0).SetIgnored()``.\n"
37366 : "\n"
37367 : "See :cpp:func:`OGRFeatureDefn::SetGeometryIgnored`.\n"
37368 : "\n"
37369 : "Parameters\n"
37370 : "-----------\n"
37371 : "bignored : bool\n"
37372 : " ignore state\n"
37373 : "\n"
37374 : ""},
37375 : { "FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_O, "\n"
37376 : "FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\n"
37377 : "\n"
37378 : "\n"
37379 : "Determine whether the style can be omitted when fetching features.\n"
37380 : "\n"
37381 : "See :cpp:func:`OGRFeatureDefn::IsStyleIgnored`.\n"
37382 : "\n"
37383 : "Returns\n"
37384 : "--------\n"
37385 : "int:\n"
37386 : " ignore state\n"
37387 : "\n"
37388 : ""},
37389 : { "FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, "\n"
37390 : "FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\n"
37391 : "\n"
37392 : "\n"
37393 : "Set whether the style can be omitted when fetching features.\n"
37394 : "\n"
37395 : "See :cpp:func:`OGRFeatureDefn::SetStyleIgnored`.\n"
37396 : "\n"
37397 : "Parameters\n"
37398 : "-----------\n"
37399 : "bignored : bool\n"
37400 : " ignore state\n"
37401 : "\n"
37402 : ""},
37403 : { "FeatureDefn_IsSame", _wrap_FeatureDefn_IsSame, METH_VARARGS, "\n"
37404 : "FeatureDefn_IsSame(FeatureDefn self, FeatureDefn other_defn) -> int\n"
37405 : "\n"
37406 : "\n"
37407 : "Test if the feature definition is identical to the other one.\n"
37408 : "\n"
37409 : "Parameters\n"
37410 : "-----------\n"
37411 : "other_defn : FeatureDefn\n"
37412 : " other feature definition to compare to.\n"
37413 : "\n"
37414 : "Returns\n"
37415 : "--------\n"
37416 : "int:\n"
37417 : " 1 if the feature definition is identical to the other one.\n"
37418 : "\n"
37419 : ""},
37420 : { "FeatureDefn_swigregister", FeatureDefn_swigregister, METH_O, NULL},
37421 : { "FeatureDefn_swiginit", FeatureDefn_swiginit, METH_VARARGS, NULL},
37422 : { "delete_FieldDefn", _wrap_delete_FieldDefn, METH_O, "delete_FieldDefn(FieldDefn self)"},
37423 : { "new_FieldDefn", (PyCFunction)(void(*)(void))_wrap_new_FieldDefn, METH_VARARGS|METH_KEYWORDS, "\n"
37424 : "new_FieldDefn(char const * name_null_ok=\"unnamed\", OGRFieldType field_type=OFTString) -> FieldDefn\n"
37425 : "\n"
37426 : "Python proxy of an :cpp:class:`OGRFieldDefn`.\n"
37427 : "\n"
37428 : ""},
37429 : { "FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_O, "FieldDefn_GetName(FieldDefn self) -> char const *"},
37430 : { "FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_O, "\n"
37431 : "FieldDefn_GetNameRef(FieldDefn self) -> char const *\n"
37432 : "\n"
37433 : "\n"
37434 : "Fetch name of this field.\n"
37435 : "\n"
37436 : "See :cpp:func:`OGRFieldDefn::GetNameRef`.\n"
37437 : "\n"
37438 : "Returns\n"
37439 : "--------\n"
37440 : "str:\n"
37441 : " the name of the field definition.\n"
37442 : "\n"
37443 : ""},
37444 : { "FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, "\n"
37445 : "FieldDefn_SetName(FieldDefn self, char const * name)\n"
37446 : "\n"
37447 : "\n"
37448 : "Reset the name of this field.\n"
37449 : "\n"
37450 : "See :cpp:func:`OGRFieldDefn::SetName`.\n"
37451 : "\n"
37452 : "Parameters\n"
37453 : "-----------\n"
37454 : "name : str\n"
37455 : " the new name to apply\n"
37456 : "\n"
37457 : ""},
37458 : { "FieldDefn_GetAlternativeName", _wrap_FieldDefn_GetAlternativeName, METH_O, "FieldDefn_GetAlternativeName(FieldDefn self) -> char const *"},
37459 : { "FieldDefn_GetAlternativeNameRef", _wrap_FieldDefn_GetAlternativeNameRef, METH_O, "\n"
37460 : "FieldDefn_GetAlternativeNameRef(FieldDefn self) -> char const *\n"
37461 : "\n"
37462 : "\n"
37463 : "Fetch the alternative name (or \"alias\") for this field.\n"
37464 : "\n"
37465 : "The alternative name is an optional attribute for a field which can\n"
37466 : "provide a more user-friendly, descriptive name of a field which is not\n"
37467 : "subject to the usual naming constraints defined by the data provider.\n"
37468 : "\n"
37469 : "This is a metadata style attribute only: the alternative name cannot\n"
37470 : "be used in place of the actual field name during SQL queries or other\n"
37471 : "field name dependent API calls.\n"
37472 : "\n"
37473 : "See :cpp:func:`OGRFieldDefn::GetAlternativeNameRef`.\n"
37474 : "\n"
37475 : ".. versionadded:: 3.2\n"
37476 : "\n"
37477 : "Returns\n"
37478 : "--------\n"
37479 : "str:\n"
37480 : " the alternative name of the field definition.\n"
37481 : "\n"
37482 : ""},
37483 : { "FieldDefn_SetAlternativeName", _wrap_FieldDefn_SetAlternativeName, METH_VARARGS, "\n"
37484 : "FieldDefn_SetAlternativeName(FieldDefn self, char const * alternativeName)\n"
37485 : "\n"
37486 : "\n"
37487 : "Reset the alternative name (or \"alias\") for this field.\n"
37488 : "\n"
37489 : "The alternative name is an optional attribute for a field which can\n"
37490 : "provide a more user-friendly, descriptive name of a field which is not\n"
37491 : "subject to the usual naming constraints defined by the data provider.\n"
37492 : "\n"
37493 : "This is a metadata style attribute only: the alternative name cannot\n"
37494 : "be used in place of the actual field name during SQL queries or other\n"
37495 : "field name dependent API calls.\n"
37496 : "\n"
37497 : "See :cpp:func:`OGRFieldDefn::SetAlternativeName`.\n"
37498 : "\n"
37499 : ".. versionadded:: 3.2\n"
37500 : "\n"
37501 : "Parameters\n"
37502 : "-----------\n"
37503 : "alternativeName : str\n"
37504 : " the new alternative name to apply.\n"
37505 : "\n"
37506 : ""},
37507 : { "FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_O, "\n"
37508 : "FieldDefn_GetType(FieldDefn self) -> OGRFieldType\n"
37509 : "\n"
37510 : "\n"
37511 : "Fetch type of this field.\n"
37512 : "\n"
37513 : "See :cpp:func:`OGRFieldDefn::GetType`.\n"
37514 : "\n"
37515 : "Returns\n"
37516 : "--------\n"
37517 : "int\n"
37518 : " field type code, e.g. :py:const:`OFTInteger`\n"
37519 : "\n"
37520 : ""},
37521 : { "FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, "\n"
37522 : "FieldDefn_SetType(FieldDefn self, OGRFieldType type)\n"
37523 : "\n"
37524 : "\n"
37525 : "Set the type of this field.\n"
37526 : "\n"
37527 : "This should never be done to a :py:class:`FieldDefn` that is already part of\n"
37528 : "an :py:class:`FeatureDefn`.\n"
37529 : "\n"
37530 : "See :cpp:func:`OGRFieldDefn::SetType`.\n"
37531 : "\n"
37532 : "Parameters\n"
37533 : "-----------\n"
37534 : "type : int\n"
37535 : " the new field type.\n"
37536 : "\n"
37537 : "Examples\n"
37538 : "--------\n"
37539 : ">>> f = ogr.FieldDefn()\n"
37540 : ">>> f.SetType(ogr.OFTReal)\n"
37541 : "\n"
37542 : ""},
37543 : { "FieldDefn_GetSubType", _wrap_FieldDefn_GetSubType, METH_O, "\n"
37544 : "FieldDefn_GetSubType(FieldDefn self) -> OGRFieldSubType\n"
37545 : "\n"
37546 : "\n"
37547 : "Fetch subtype of this field.\n"
37548 : "\n"
37549 : "See :cpp:func:`OGRFieldDefn::GetSubType`.\n"
37550 : "\n"
37551 : "Returns\n"
37552 : "--------\n"
37553 : "int\n"
37554 : " field subtype code, default = :py:const:`OFSTNone`\n"
37555 : "\n"
37556 : ""},
37557 : { "FieldDefn_SetSubType", _wrap_FieldDefn_SetSubType, METH_VARARGS, "\n"
37558 : "FieldDefn_SetSubType(FieldDefn self, OGRFieldSubType type)\n"
37559 : "\n"
37560 : "\n"
37561 : "Set the subtype of this field.\n"
37562 : "\n"
37563 : "This should never be done to a :py:class:`FieldDefn` that is already part of\n"
37564 : "an :py:class:FeatureDefn`.\n"
37565 : "\n"
37566 : "See :cpp:func:`OGRFieldDefn::SetSubType`.\n"
37567 : "\n"
37568 : "Parameters\n"
37569 : "-----------\n"
37570 : "type :\n"
37571 : " the new field subtype.\n"
37572 : "\n"
37573 : "Examples\n"
37574 : "--------\n"
37575 : ">>> f = ogr.FieldDefn()\n"
37576 : ">>> f.SetType(ogr.OFTReal)\n"
37577 : ">>> f.SetSubType(ogr.OFSTJSON)\n"
37578 : "Warning 1: Type and subtype of field definition are not compatible. Resetting to OFSTNone\n"
37579 : ">>> f.SetSubType(ogr.OFSTFloat32)\n"
37580 : "\n"
37581 : ""},
37582 : { "FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_O, "\n"
37583 : "FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\n"
37584 : "\n"
37585 : "\n"
37586 : "Get the justification for this field.\n"
37587 : "\n"
37588 : "See :cpp:func:`OGRFieldDefn::GetJustify`.\n"
37589 : "\n"
37590 : "Note: no driver is know to use the concept of field justification.\n"
37591 : "\n"
37592 : "Returns\n"
37593 : "--------\n"
37594 : "OGRJustification:\n"
37595 : " the justification.\n"
37596 : "\n"
37597 : ""},
37598 : { "FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, "\n"
37599 : "FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\n"
37600 : "\n"
37601 : "\n"
37602 : "Set the justification for this field.\n"
37603 : "\n"
37604 : "Note: no driver is know to use the concept of field justification.\n"
37605 : "\n"
37606 : "See :cpp:func:`OGRFieldDefn::SetJustify`.\n"
37607 : "\n"
37608 : "Parameters\n"
37609 : "-----------\n"
37610 : "justify : int\n"
37611 : " the new justification\n"
37612 : "\n"
37613 : "Examples\n"
37614 : "--------\n"
37615 : ">>> f = ogr.FieldDefn('desc', ogr.OFTString)\n"
37616 : ">>> f.SetJustify(ogr.OJRight)\n"
37617 : "\n"
37618 : ""},
37619 : { "FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_O, "\n"
37620 : "FieldDefn_GetWidth(FieldDefn self) -> int\n"
37621 : "\n"
37622 : "\n"
37623 : "Get the formatting width for this field.\n"
37624 : "\n"
37625 : "See :cpp:func:`OGRFieldDefn::GetWidth`.\n"
37626 : "\n"
37627 : "Returns\n"
37628 : "--------\n"
37629 : "int:\n"
37630 : " the width, zero means no specified width.\n"
37631 : "\n"
37632 : ""},
37633 : { "FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, "\n"
37634 : "FieldDefn_SetWidth(FieldDefn self, int width)\n"
37635 : "\n"
37636 : "\n"
37637 : "Set the formatting width for this field in characters.\n"
37638 : "\n"
37639 : "See :cpp:func:`OGRFieldDefn::SetWidth`.\n"
37640 : "\n"
37641 : "Parameters\n"
37642 : "-----------\n"
37643 : "width : int\n"
37644 : " the new width\n"
37645 : "\n"
37646 : ""},
37647 : { "FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_O, "\n"
37648 : "FieldDefn_GetPrecision(FieldDefn self) -> int\n"
37649 : "\n"
37650 : "\n"
37651 : "Get the formatting precision for this field.\n"
37652 : "\n"
37653 : "This should normally be zero for fields of types other than :py:const:`OFTReal`.\n"
37654 : "\n"
37655 : "See :cpp:func:`OGRFieldDefn::GetPrecision`.\n"
37656 : "\n"
37657 : "Returns\n"
37658 : "--------\n"
37659 : "int:\n"
37660 : " the precision.\n"
37661 : "\n"
37662 : ""},
37663 : { "FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, "\n"
37664 : "FieldDefn_SetPrecision(FieldDefn self, int precision)\n"
37665 : "\n"
37666 : "\n"
37667 : "Set the formatting precision for this field in characters.\n"
37668 : "\n"
37669 : "This should normally be zero for fields of types other than :py:const:`OFTReal`.\n"
37670 : "\n"
37671 : "See :cpp:func:`OGRFieldDefn::SetPrecision`.\n"
37672 : "\n"
37673 : "Parameters\n"
37674 : "-----------\n"
37675 : "precision : int\n"
37676 : " the new precision.\n"
37677 : "\n"
37678 : ""},
37679 : { "FieldDefn_GetTZFlag", _wrap_FieldDefn_GetTZFlag, METH_O, "FieldDefn_GetTZFlag(FieldDefn self) -> int"},
37680 : { "FieldDefn_SetTZFlag", _wrap_FieldDefn_SetTZFlag, METH_VARARGS, "FieldDefn_SetTZFlag(FieldDefn self, int tzflag)"},
37681 : { "FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_O, "FieldDefn_GetTypeName(FieldDefn self) -> char const *"},
37682 : { "FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, "FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char const *"},
37683 : { "FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_O, "\n"
37684 : "FieldDefn_IsIgnored(FieldDefn self) -> int\n"
37685 : "\n"
37686 : "\n"
37687 : "Return whether this field should be omitted when fetching features.\n"
37688 : "\n"
37689 : "See :cpp:func:`OGRFieldDefn::IsIgnored`.\n"
37690 : "\n"
37691 : "Returns\n"
37692 : "--------\n"
37693 : "int:\n"
37694 : " ignore state\n"
37695 : "\n"
37696 : ""},
37697 : { "FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, "\n"
37698 : "FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\n"
37699 : "\n"
37700 : "\n"
37701 : "Set whether this field should be omitted when fetching features.\n"
37702 : "\n"
37703 : "See :cpp:func:`OGRFieldDefn::SetIgnored`.\n"
37704 : "\n"
37705 : "Parameters\n"
37706 : "-----------\n"
37707 : "bignored : bool\n"
37708 : " ignore state\n"
37709 : "\n"
37710 : ""},
37711 : { "FieldDefn_IsNullable", _wrap_FieldDefn_IsNullable, METH_O, "\n"
37712 : "FieldDefn_IsNullable(FieldDefn self) -> int\n"
37713 : "\n"
37714 : "\n"
37715 : "Return whether this field can receive null values.\n"
37716 : "\n"
37717 : "By default, fields are nullable.\n"
37718 : "\n"
37719 : "Even if this method returns FALSE (i.e not-nullable field), it doesn't\n"
37720 : "mean that :py:meth:`Feature.IsFieldSet` will necessary return TRUE, as\n"
37721 : "fields can be temporary unset and null/not-null validation is usually\n"
37722 : "done when :py:meth:`Layer.CreateFeature`/:py:meth:`Layer.SetFeature` is called.\n"
37723 : "\n"
37724 : "See :cpp:func:`OGRFieldDefn::IsNullable`.\n"
37725 : "\n"
37726 : "Returns\n"
37727 : "--------\n"
37728 : "int:\n"
37729 : " TRUE if the field is authorized to be null.\n"
37730 : "\n"
37731 : ""},
37732 : { "FieldDefn_SetNullable", _wrap_FieldDefn_SetNullable, METH_VARARGS, "\n"
37733 : "FieldDefn_SetNullable(FieldDefn self, int bNullable)\n"
37734 : "\n"
37735 : "\n"
37736 : "Set whether this field can receive null values.\n"
37737 : "\n"
37738 : "By default, fields are nullable, so this method is generally called\n"
37739 : "with ``False`` to set a not-null constraint.\n"
37740 : "\n"
37741 : "Drivers that support writing not-null constraint will advertise the\n"
37742 : "``GDAL_DCAP_NOTNULL_FIELDS`` driver metadata item.\n"
37743 : "\n"
37744 : "See :cpp:func:`OGRFieldDefn::SetNullable`.\n"
37745 : "\n"
37746 : "Parameters\n"
37747 : "-----------\n"
37748 : "bNullable : bool\n"
37749 : " ``False`` if the field must have a not-null constraint.\n"
37750 : "\n"
37751 : ""},
37752 : { "FieldDefn_IsUnique", _wrap_FieldDefn_IsUnique, METH_O, "\n"
37753 : "FieldDefn_IsUnique(FieldDefn self) -> int\n"
37754 : "\n"
37755 : "\n"
37756 : "Return whether this field has a unique constraint.\n"
37757 : "\n"
37758 : "By default, fields have no unique constraint.\n"
37759 : "\n"
37760 : "See :cpp:func:`OGRFieldDefn::IsUnique`.\n"
37761 : "\n"
37762 : ".. versionadded:: 3.2\n"
37763 : "\n"
37764 : "Returns\n"
37765 : "--------\n"
37766 : "int:\n"
37767 : " TRUE if the field has a unique constraint.\n"
37768 : "\n"
37769 : ""},
37770 : { "FieldDefn_SetUnique", _wrap_FieldDefn_SetUnique, METH_VARARGS, "\n"
37771 : "FieldDefn_SetUnique(FieldDefn self, int bUnique)\n"
37772 : "\n"
37773 : "\n"
37774 : "Set whether this field has a unique constraint.\n"
37775 : "\n"
37776 : "By default, fields have no unique constraint, so this method is\n"
37777 : "generally called with TRUE to set a unique constraint.\n"
37778 : "\n"
37779 : "Drivers that support writing unique constraint will advertise the\n"
37780 : "``GDAL_DCAP_UNIQUE_FIELDS`` driver metadata item.\n"
37781 : "\n"
37782 : "Note that once a :py:class:`FieldDefn` has been added to a layer definition with\n"
37783 : ":py:meth:`Layer.AddFieldDefn`, its setter methods should not be called on the\n"
37784 : "object returned with ``GetLayerDefn().GetFieldDefn()``. Instead,\n"
37785 : ":py:meth:`Layer::AlterFieldDefn` should be called on a new instance of\n"
37786 : ":py:class:`FieldDefn`, for drivers that support :py:meth:`Layer.AlterFieldDefn`.\n"
37787 : "\n"
37788 : "See :cpp:func:`OGRFieldDefn::SetUnique`.\n"
37789 : "\n"
37790 : ".. versionadded:: 3.2\n"
37791 : "\n"
37792 : "Parameters\n"
37793 : "-----------\n"
37794 : "bUnique : bool\n"
37795 : " ``True`` if the field must have a unique constraint\n"
37796 : "\n"
37797 : ""},
37798 : { "FieldDefn_GetDefault", _wrap_FieldDefn_GetDefault, METH_O, "\n"
37799 : "FieldDefn_GetDefault(FieldDefn self) -> char const *\n"
37800 : "\n"
37801 : "\n"
37802 : "Get default field value.\n"
37803 : "\n"
37804 : "See :cpp:func:`OGRFieldDefn::GetDefault`.\n"
37805 : "\n"
37806 : "Returns\n"
37807 : "--------\n"
37808 : "str:\n"
37809 : " default field value or ``None``.\n"
37810 : "\n"
37811 : ""},
37812 : { "FieldDefn_SetDefault", _wrap_FieldDefn_SetDefault, METH_VARARGS, "\n"
37813 : "FieldDefn_SetDefault(FieldDefn self, char const * pszValue)\n"
37814 : "\n"
37815 : "\n"
37816 : "Set default field value.\n"
37817 : "\n"
37818 : "The default field value is taken into account by drivers (generally\n"
37819 : "those with a SQL interface) that support it at field creation time.\n"
37820 : "OGR will generally not automatically set the default field value to\n"
37821 : "null fields by itself when calling OGRFeature::CreateFeature() /\n"
37822 : "OGRFeature::SetFeature(), but will let the low-level layers to do the\n"
37823 : "job. So retrieving the feature from the layer is recommended.\n"
37824 : "\n"
37825 : "The accepted values are NULL, a numeric value, a literal value\n"
37826 : "enclosed between single quote characters (and inner single quote\n"
37827 : "characters escaped by repetition of the single quote character),\n"
37828 : "CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or a driver specific\n"
37829 : "expression (that might be ignored by other drivers). For a datetime\n"
37830 : "literal value, format should be 'YYYY/MM/DD HH:MM:SS[.sss]'\n"
37831 : "(considered as UTC time).\n"
37832 : "\n"
37833 : "Drivers that support writing DEFAULT clauses will advertise the\n"
37834 : "GDAL_DCAP_DEFAULT_FIELDS driver metadata item.\n"
37835 : "\n"
37836 : "See :cpp:func:`OGRFieldDefn::SetDefault`.\n"
37837 : "\n"
37838 : "Parameters\n"
37839 : "-----------\n"
37840 : "pszValue : str\n"
37841 : " new default field value or NULL pointer.\n"
37842 : "\n"
37843 : ""},
37844 : { "FieldDefn_IsDefaultDriverSpecific", _wrap_FieldDefn_IsDefaultDriverSpecific, METH_O, "\n"
37845 : "FieldDefn_IsDefaultDriverSpecific(FieldDefn self) -> int\n"
37846 : "\n"
37847 : "\n"
37848 : "Returns whether the default value is driver specific.\n"
37849 : "\n"
37850 : "Driver specific default values are those that are not NULL, a numeric\n"
37851 : "value, a literal value enclosed between single quote characters,\n"
37852 : "CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or datetime literal\n"
37853 : "value.\n"
37854 : "\n"
37855 : "See :cpp:func:`OGRFieldDefn::IsDefaultDriverSpecific`.\n"
37856 : "\n"
37857 : "Returns\n"
37858 : "--------\n"
37859 : "int:\n"
37860 : " TRUE if the default value is driver specific.\n"
37861 : "\n"
37862 : ""},
37863 : { "FieldDefn_GetDomainName", _wrap_FieldDefn_GetDomainName, METH_O, "\n"
37864 : "FieldDefn_GetDomainName(FieldDefn self) -> char const *\n"
37865 : "\n"
37866 : "\n"
37867 : "Return the name of the field domain for this field.\n"
37868 : "\n"
37869 : "By default an empty string is returned.\n"
37870 : "\n"
37871 : "Field domains ( :py:class:`FieldDomain` class) are attached at the :py:class:`Dataset` level and should be retrieved with :py:meth:`Dataset.GetFieldDomain`.\n"
37872 : "\n"
37873 : "See :cpp:func:`OGRFieldDefn::GetDomainName`.\n"
37874 : "\n"
37875 : ".. versionadded:: 3.3\n"
37876 : "\n"
37877 : "Returns\n"
37878 : "--------\n"
37879 : "str:\n"
37880 : " the field domain name, or an empty string if there is none.\n"
37881 : "\n"
37882 : ""},
37883 : { "FieldDefn_SetDomainName", _wrap_FieldDefn_SetDomainName, METH_VARARGS, "\n"
37884 : "FieldDefn_SetDomainName(FieldDefn self, char const * name)\n"
37885 : "\n"
37886 : "\n"
37887 : "Set the name of the field domain for this field.\n"
37888 : "\n"
37889 : "Field domains ( :py:class:`FieldDomain`) are attached at the :py:class:`Dataset` level.\n"
37890 : "\n"
37891 : "See :cpp:func:`OGRFieldDefn::SetDomainName`.\n"
37892 : "\n"
37893 : ".. versionadded:: 3.3\n"
37894 : "\n"
37895 : "Parameters\n"
37896 : "-----------\n"
37897 : "name : str\n"
37898 : " Field domain name.\n"
37899 : "\n"
37900 : ""},
37901 : { "FieldDefn_GetComment", _wrap_FieldDefn_GetComment, METH_O, "FieldDefn_GetComment(FieldDefn self) -> char const *"},
37902 : { "FieldDefn_SetComment", _wrap_FieldDefn_SetComment, METH_VARARGS, "FieldDefn_SetComment(FieldDefn self, char const * comment)"},
37903 : { "FieldDefn_swigregister", FieldDefn_swigregister, METH_O, NULL},
37904 : { "FieldDefn_swiginit", FieldDefn_swiginit, METH_VARARGS, NULL},
37905 : { "delete_GeomFieldDefn", _wrap_delete_GeomFieldDefn, METH_O, "delete_GeomFieldDefn(GeomFieldDefn self)"},
37906 : { "new_GeomFieldDefn", (PyCFunction)(void(*)(void))_wrap_new_GeomFieldDefn, METH_VARARGS|METH_KEYWORDS, "new_GeomFieldDefn(char const * name_null_ok=\"\", OGRwkbGeometryType field_type=wkbUnknown) -> GeomFieldDefn"},
37907 : { "GeomFieldDefn_GetName", _wrap_GeomFieldDefn_GetName, METH_O, "GeomFieldDefn_GetName(GeomFieldDefn self) -> char const *"},
37908 : { "GeomFieldDefn_GetNameRef", _wrap_GeomFieldDefn_GetNameRef, METH_O, "GeomFieldDefn_GetNameRef(GeomFieldDefn self) -> char const *"},
37909 : { "GeomFieldDefn_SetName", _wrap_GeomFieldDefn_SetName, METH_VARARGS, "GeomFieldDefn_SetName(GeomFieldDefn self, char const * name)"},
37910 : { "GeomFieldDefn_GetType", _wrap_GeomFieldDefn_GetType, METH_O, "GeomFieldDefn_GetType(GeomFieldDefn self) -> OGRwkbGeometryType"},
37911 : { "GeomFieldDefn_SetType", _wrap_GeomFieldDefn_SetType, METH_VARARGS, "GeomFieldDefn_SetType(GeomFieldDefn self, OGRwkbGeometryType type)"},
37912 : { "GeomFieldDefn_GetSpatialRef", _wrap_GeomFieldDefn_GetSpatialRef, METH_O, "GeomFieldDefn_GetSpatialRef(GeomFieldDefn self) -> SpatialReference"},
37913 : { "GeomFieldDefn_SetSpatialRef", _wrap_GeomFieldDefn_SetSpatialRef, METH_VARARGS, "GeomFieldDefn_SetSpatialRef(GeomFieldDefn self, SpatialReference srs)"},
37914 : { "GeomFieldDefn_IsIgnored", _wrap_GeomFieldDefn_IsIgnored, METH_O, "GeomFieldDefn_IsIgnored(GeomFieldDefn self) -> int"},
37915 : { "GeomFieldDefn_SetIgnored", _wrap_GeomFieldDefn_SetIgnored, METH_VARARGS, "GeomFieldDefn_SetIgnored(GeomFieldDefn self, int bIgnored)"},
37916 : { "GeomFieldDefn_IsNullable", _wrap_GeomFieldDefn_IsNullable, METH_O, "GeomFieldDefn_IsNullable(GeomFieldDefn self) -> int"},
37917 : { "GeomFieldDefn_SetNullable", _wrap_GeomFieldDefn_SetNullable, METH_VARARGS, "GeomFieldDefn_SetNullable(GeomFieldDefn self, int bNullable)"},
37918 : { "GeomFieldDefn_GetCoordinatePrecision", _wrap_GeomFieldDefn_GetCoordinatePrecision, METH_O, "GeomFieldDefn_GetCoordinatePrecision(GeomFieldDefn self) -> GeomCoordinatePrecision"},
37919 : { "GeomFieldDefn_SetCoordinatePrecision", _wrap_GeomFieldDefn_SetCoordinatePrecision, METH_VARARGS, "GeomFieldDefn_SetCoordinatePrecision(GeomFieldDefn self, GeomCoordinatePrecision coordPrec)"},
37920 : { "GeomFieldDefn_swigregister", GeomFieldDefn_swigregister, METH_O, NULL},
37921 : { "GeomFieldDefn_swiginit", GeomFieldDefn_swiginit, METH_VARARGS, NULL},
37922 : { "CreateGeometryFromWkb", (PyCFunction)(void(*)(void))_wrap_CreateGeometryFromWkb, METH_VARARGS|METH_KEYWORDS, "CreateGeometryFromWkb(size_t len, SpatialReference reference=None) -> Geometry"},
37923 : { "CreateGeometryFromWkt", (PyCFunction)(void(*)(void))_wrap_CreateGeometryFromWkt, METH_VARARGS|METH_KEYWORDS, "CreateGeometryFromWkt(char ** val, SpatialReference reference=None) -> Geometry"},
37924 : { "CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_O, "CreateGeometryFromGML(char const * input_string) -> Geometry"},
37925 : { "CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_O, "CreateGeometryFromJson(char const * input_string) -> Geometry"},
37926 : { "CreateGeometryFromEsriJson", _wrap_CreateGeometryFromEsriJson, METH_O, "CreateGeometryFromEsriJson(char const * input_string) -> Geometry"},
37927 : { "BuildPolygonFromEdges", (PyCFunction)(void(*)(void))_wrap_BuildPolygonFromEdges, METH_VARARGS|METH_KEYWORDS, "BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort=0, int bAutoClose=0, double dfTolerance=0) -> Geometry"},
37928 : { "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"},
37929 : { "ForceToPolygon", _wrap_ForceToPolygon, METH_O, "ForceToPolygon(Geometry geom_in) -> Geometry"},
37930 : { "ForceToLineString", _wrap_ForceToLineString, METH_O, "ForceToLineString(Geometry geom_in) -> Geometry"},
37931 : { "ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_O, "ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
37932 : { "ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_O, "ForceToMultiPoint(Geometry geom_in) -> Geometry"},
37933 : { "ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_O, "ForceToMultiLineString(Geometry geom_in) -> Geometry"},
37934 : { "ForceTo", _wrap_ForceTo, METH_VARARGS, "ForceTo(Geometry geom_in, OGRwkbGeometryType eTargetType, char ** options=None) -> Geometry"},
37935 : { "delete_Geometry", _wrap_delete_Geometry, METH_O, "delete_Geometry(Geometry self)"},
37936 : { "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"},
37937 : { "Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_O, "\n"
37938 : "Geometry_ExportToWkt(Geometry self) -> OGRErr\n"
37939 : "\n"
37940 : "Convert a geometry into well known text format.\n"
37941 : "\n"
37942 : "For more details: :cpp:func:`OGR_G_ExportToWkt`\n"
37943 : "\n"
37944 : "Returns\n"
37945 : "--------\n"
37946 : "str\n"
37947 : "\n"
37948 : ""},
37949 : { "Geometry_ExportToIsoWkt", _wrap_Geometry_ExportToIsoWkt, METH_O, "\n"
37950 : "Geometry_ExportToIsoWkt(Geometry self) -> OGRErr\n"
37951 : "\n"
37952 : "Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known text\n"
37953 : "format.\n"
37954 : "\n"
37955 : "For more details: :cpp:func:`OGR_G_ExportToIsoWkt`\n"
37956 : "\n"
37957 : ".. versionadded:: 2.0\n"
37958 : "\n"
37959 : "Returns\n"
37960 : "--------\n"
37961 : "str\n"
37962 : "\n"
37963 : ""},
37964 : { "Geometry_ExportToWkb", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToWkb, METH_VARARGS|METH_KEYWORDS, "\n"
37965 : "Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr\n"
37966 : "\n"
37967 : "Convert a geometry well known binary format.\n"
37968 : "\n"
37969 : "For more details: :cpp:func:`OGR_G_ExportToWkb`\n"
37970 : "\n"
37971 : "Parameters\n"
37972 : "-----------\n"
37973 : "byte_order: osgeo.ogr.wkbXDR | osgeo.ogr.wkbNDR, default=osgeo.ogr.wkbNDR\n"
37974 : " One of wkbXDR or wkbNDR indicating MSB or LSB byte order respectively.\n"
37975 : "\n"
37976 : "Returns\n"
37977 : "--------\n"
37978 : "bytes\n"
37979 : "\n"
37980 : ""},
37981 : { "Geometry_ExportToIsoWkb", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToIsoWkb, METH_VARARGS|METH_KEYWORDS, "\n"
37982 : "Geometry_ExportToIsoWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr\n"
37983 : "\n"
37984 : "Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known\n"
37985 : "binary format.\n"
37986 : "\n"
37987 : "For more details: :cpp:func:`OGR_G_ExportToIsoWkb`\n"
37988 : "\n"
37989 : ".. versionadded:: 2.0\n"
37990 : "\n"
37991 : "Parameters\n"
37992 : "-----------\n"
37993 : "byte_order: osgeo.ogr.wkbXDR | osgeo.ogr.wkbNDR, default=osgeo.ogr.wkbNDR\n"
37994 : " One of wkbXDR or wkbNDR indicating MSB or LSB byte order respectively.\n"
37995 : "\n"
37996 : "Returns\n"
37997 : "--------\n"
37998 : "bytes\n"
37999 : "\n"
38000 : ""},
38001 : { "Geometry_ExportToGML", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToGML, METH_VARARGS|METH_KEYWORDS, "Geometry_ExportToGML(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
38002 : { "Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, "Geometry_ExportToKML(Geometry self, char const * altitude_mode=None) -> retStringAndCPLFree *"},
38003 : { "Geometry_ExportToJson", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToJson, METH_VARARGS|METH_KEYWORDS, "Geometry_ExportToJson(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
38004 : { "Geometry_AddPoint", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPoint, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPoint(Geometry self, double x, double y, double z=0)"},
38005 : { "Geometry_AddPointM", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPointM, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPointM(Geometry self, double x, double y, double m)"},
38006 : { "Geometry_AddPointZM", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPointZM, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPointZM(Geometry self, double x, double y, double z, double m)"},
38007 : { "Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, "Geometry_AddPoint_2D(Geometry self, double x, double y)"},
38008 : { "Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, "Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
38009 : { "Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, "Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
38010 : { "Geometry_RemoveGeometry", _wrap_Geometry_RemoveGeometry, METH_VARARGS, "Geometry_RemoveGeometry(Geometry self, int iSubGeom) -> OGRErr"},
38011 : { "Geometry_Clone", _wrap_Geometry_Clone, METH_O, "\n"
38012 : "Geometry_Clone(Geometry self) -> Geometry\n"
38013 : "\n"
38014 : "Make a copy of this object.\n"
38015 : "\n"
38016 : "For more details: :cpp:func:`OGR_G_Clone`\n"
38017 : "\n"
38018 : "Returns\n"
38019 : "--------\n"
38020 : "Geometry:\n"
38021 : " The copy of the geometry with the same spatial reference system\n"
38022 : " as the original.\n"
38023 : "\n"
38024 : ""},
38025 : { "Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_O, "\n"
38026 : "Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\n"
38027 : "\n"
38028 : "Fetch geometry type.\n"
38029 : "\n"
38030 : "For more details: :cpp:func:`OGR_G_GetGeometryType`\n"
38031 : "\n"
38032 : "Returns\n"
38033 : "--------\n"
38034 : "int:\n"
38035 : " The geometry type code. The types can be found with\n"
38036 : " 'osgeo.ogr.wkb' prefix. For example :py:const:`osgeo.ogr.wkbPolygon`.\n"
38037 : "\n"
38038 : ""},
38039 : { "Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_O, "\n"
38040 : "Geometry_GetGeometryName(Geometry self) -> char const *\n"
38041 : "\n"
38042 : "Fetch WKT name for geometry type.\n"
38043 : "\n"
38044 : "For more details: :cpp:func:`OGR_G_GetGeometryName`\n"
38045 : "\n"
38046 : "geometry to get name from.\n"
38047 : "\n"
38048 : "Returns\n"
38049 : "--------\n"
38050 : "str\n"
38051 : "\n"
38052 : ""},
38053 : { "Geometry_Length", _wrap_Geometry_Length, METH_O, "Geometry_Length(Geometry self) -> double"},
38054 : { "Geometry_Area", _wrap_Geometry_Area, METH_O, "\n"
38055 : "Geometry_Area(Geometry self) -> double\n"
38056 : "\n"
38057 : "Compute geometry area.\n"
38058 : "\n"
38059 : "The returned area is a 2D Cartesian (planar) area in square units of the\n"
38060 : "spatial reference system in use, so potentially 'square degrees' for a\n"
38061 : "geometry expressed in a geographic SRS.\n"
38062 : "\n"
38063 : "For more details: :cpp:func:`OGR_G_Area`\n"
38064 : "\n"
38065 : "Returns\n"
38066 : "--------\n"
38067 : "float:\n"
38068 : " the area of the geometry in square units of the spatial reference\n"
38069 : " system in use, or 0.0 for unsupported geometry types.\n"
38070 : "\n"
38071 : "\n"
38072 : ""},
38073 : { "Geometry_GeodesicArea", _wrap_Geometry_GeodesicArea, METH_O, "\n"
38074 : "Geometry_GeodesicArea(Geometry self) -> double\n"
38075 : "\n"
38076 : "Compute geometry area, considered as a surface on the underlying\n"
38077 : "ellipsoid of the SRS attached to the geometry.\n"
38078 : "\n"
38079 : "For more details: :cpp:func:`OGR_G_GeodesicArea`\n"
38080 : "\n"
38081 : "Returns\n"
38082 : "--------\n"
38083 : "float:\n"
38084 : " the area in square meters, or a negative value for unsupported geometry types.\n"
38085 : "\n"
38086 : "\n"
38087 : ""},
38088 : { "Geometry_IsClockwise", _wrap_Geometry_IsClockwise, METH_O, "Geometry_IsClockwise(Geometry self) -> bool"},
38089 : { "Geometry_GetArea", _wrap_Geometry_GetArea, METH_O, "Geometry_GetArea(Geometry self) -> double"},
38090 : { "Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_O, "Geometry_GetPointCount(Geometry self) -> int"},
38091 : { "Geometry_GetPoints", (PyCFunction)(void(*)(void))_wrap_Geometry_GetPoints, METH_VARARGS|METH_KEYWORDS, "Geometry_GetPoints(Geometry self, int nCoordDimension=0)"},
38092 : { "Geometry_GetX", (PyCFunction)(void(*)(void))_wrap_Geometry_GetX, METH_VARARGS|METH_KEYWORDS, "Geometry_GetX(Geometry self, int point=0) -> double"},
38093 : { "Geometry_GetY", (PyCFunction)(void(*)(void))_wrap_Geometry_GetY, METH_VARARGS|METH_KEYWORDS, "Geometry_GetY(Geometry self, int point=0) -> double"},
38094 : { "Geometry_GetZ", (PyCFunction)(void(*)(void))_wrap_Geometry_GetZ, METH_VARARGS|METH_KEYWORDS, "Geometry_GetZ(Geometry self, int point=0) -> double"},
38095 : { "Geometry_GetM", (PyCFunction)(void(*)(void))_wrap_Geometry_GetM, METH_VARARGS|METH_KEYWORDS, "Geometry_GetM(Geometry self, int point=0) -> double"},
38096 : { "Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, "Geometry_GetPoint(Geometry self, int iPoint=0)"},
38097 : { "Geometry_GetPointZM", _wrap_Geometry_GetPointZM, METH_VARARGS, "Geometry_GetPointZM(Geometry self, int iPoint=0)"},
38098 : { "Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, "Geometry_GetPoint_2D(Geometry self, int iPoint=0)"},
38099 : { "Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_O, "Geometry_GetGeometryCount(Geometry self) -> int"},
38100 : { "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)"},
38101 : { "Geometry_SetPointM", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPointM, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPointM(Geometry self, int point, double x, double y, double m)"},
38102 : { "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)"},
38103 : { "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)"},
38104 : { "Geometry_SwapXY", _wrap_Geometry_SwapXY, METH_O, "\n"
38105 : "Geometry_SwapXY(Geometry self)\n"
38106 : "\n"
38107 : "Swap x and y coordinates.\n"
38108 : "\n"
38109 : "For more details: :cpp:func:`OGR_G_SwapXY`\n"
38110 : "\n"
38111 : ".. versionadded:: 2.3.0\n"
38112 : "\n"
38113 : "\n"
38114 : ""},
38115 : { "Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, "Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
38116 : { "Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, "\n"
38117 : "Geometry_Simplify(Geometry self, double tolerance) -> Geometry\n"
38118 : "\n"
38119 : "Compute a simplified geometry.\n"
38120 : "\n"
38121 : "For more details: :cpp:func:`OGR_G_Simplify`\n"
38122 : "\n"
38123 : "Parameters\n"
38124 : "-----------\n"
38125 : "tolerance: float\n"
38126 : " The distance tolerance for the simplification.\n"
38127 : "\n"
38128 : "Returns\n"
38129 : "--------\n"
38130 : "Geometry:\n"
38131 : " The simplified geometry or None if an error occurs.\n"
38132 : "\n"
38133 : ""},
38134 : { "Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, "\n"
38135 : "Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\n"
38136 : "\n"
38137 : "Simplify the geometry while preserving topology.\n"
38138 : "\n"
38139 : "For more details: :cpp:func:`OGR_G_SimplifyPreserveTopology`\n"
38140 : "\n"
38141 : "Parameters\n"
38142 : "-----------\n"
38143 : "tolerance: float\n"
38144 : " The distance tolerance for the simplification.\n"
38145 : "\n"
38146 : "Returns\n"
38147 : "--------\n"
38148 : "Geometry:\n"
38149 : " The simplified geometry or None if an error occurs.\n"
38150 : "\n"
38151 : ""},
38152 : { "Geometry_DelaunayTriangulation", (PyCFunction)(void(*)(void))_wrap_Geometry_DelaunayTriangulation, METH_VARARGS|METH_KEYWORDS, "\n"
38153 : "Geometry_DelaunayTriangulation(Geometry self, double dfTolerance=0.0, int bOnlyEdges=FALSE) -> Geometry\n"
38154 : "\n"
38155 : "Return a Delaunay triangulation of the vertices of the geometry.\n"
38156 : "\n"
38157 : "For more details: :cpp:func:`OGR_G_DelaunayTriangulation`\n"
38158 : "\n"
38159 : ".. versionadded:: 2.1\n"
38160 : "\n"
38161 : "Parameters\n"
38162 : "-----------\n"
38163 : "dfTolerance: float\n"
38164 : " optional snapping tolerance to use for improved robustness\n"
38165 : "bOnlyEdges: bool\n"
38166 : " If True, will return a MULTILINESTRING, otherwise it will\n"
38167 : " return a GEOMETRYCOLLECTION containing triangular POLYGONs.\n"
38168 : "\n"
38169 : "Returns\n"
38170 : "--------\n"
38171 : "Geometry:\n"
38172 : " The geometry resulting from the Delaunay triangulation or None if an\n"
38173 : " error occurs.\n"
38174 : "\n"
38175 : ""},
38176 : { "Geometry_Polygonize", _wrap_Geometry_Polygonize, METH_O, "\n"
38177 : "Geometry_Polygonize(Geometry self) -> Geometry\n"
38178 : "\n"
38179 : "Polygonizes a set of sparse edges.\n"
38180 : "\n"
38181 : "For more details: :cpp:func:`OGR_G_Polygonize`\n"
38182 : "\n"
38183 : "Returns\n"
38184 : "--------\n"
38185 : "Geometry:\n"
38186 : " A new geometry or None on failure.\n"
38187 : "\n"
38188 : ""},
38189 : { "Geometry_Boundary", _wrap_Geometry_Boundary, METH_O, "\n"
38190 : "Geometry_Boundary(Geometry self) -> Geometry\n"
38191 : "\n"
38192 : "Compute boundary.\n"
38193 : "\n"
38194 : "For more details: :cpp:func:`OGR_G_Boundary`\n"
38195 : "\n"
38196 : "Returns\n"
38197 : "--------\n"
38198 : "Geometry:\n"
38199 : " A new geometry or None on failure.\n"
38200 : "\n"
38201 : ""},
38202 : { "Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_O, "\n"
38203 : "Geometry_GetBoundary(Geometry self) -> Geometry\n"
38204 : "\n"
38205 : "Compute boundary (deprecated)\n"
38206 : "\n"
38207 : "For more details: :cpp:func:`OGR_G_GetBoundary`\n"
38208 : "\n"
38209 : "..warning:: Deprecated\n"
38210 : "\n"
38211 : "See: :cpp:func:`OGR_G_Boundary`\n"
38212 : "\n"
38213 : ""},
38214 : { "Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_O, "\n"
38215 : "Geometry_ConvexHull(Geometry self) -> Geometry\n"
38216 : "\n"
38217 : "Compute convex hull.\n"
38218 : "\n"
38219 : "For more details: :cpp:func:`OGR_G_ConvexHull`\n"
38220 : "\n"
38221 : "Returns\n"
38222 : "--------\n"
38223 : "Geometry:\n"
38224 : " a handle to A newly allocated geometry now owned by the caller, or\n"
38225 : " None on failure.\n"
38226 : "\n"
38227 : ""},
38228 : { "Geometry_ConcaveHull", _wrap_Geometry_ConcaveHull, METH_VARARGS, "Geometry_ConcaveHull(Geometry self, double ratio, bool allowHoles) -> Geometry"},
38229 : { "Geometry_MakeValid", _wrap_Geometry_MakeValid, METH_VARARGS, "\n"
38230 : "Geometry_MakeValid(Geometry self, char ** options=None) -> Geometry\n"
38231 : "\n"
38232 : "Attempts to make an invalid geometry valid without losing vertices.\n"
38233 : "\n"
38234 : "For more details: :cpp:func:`OGR_G_MakeValidEx`\n"
38235 : "\n"
38236 : ".. versionadded:: 3.0\n"
38237 : ".. versionadded:: 3.4 options\n"
38238 : "\n"
38239 : "Parameters\n"
38240 : "-----------\n"
38241 : "options: list[str], optional\n"
38242 : " papszOptions to be passed in. For example: [\"METHOD=STRUCTURE\"].\n"
38243 : "\n"
38244 : "Returns\n"
38245 : "--------\n"
38246 : "Geometry:\n"
38247 : " A newly allocated geometry now owned by the caller, or None on\n"
38248 : " failure.\n"
38249 : "\n"
38250 : ""},
38251 : { "Geometry_SetPrecision", _wrap_Geometry_SetPrecision, METH_VARARGS, "Geometry_SetPrecision(Geometry self, double gridSize, int flags=0) -> Geometry"},
38252 : { "Geometry_Normalize", _wrap_Geometry_Normalize, METH_O, "\n"
38253 : "Geometry_Normalize(Geometry self) -> Geometry\n"
38254 : "\n"
38255 : "Attempts to bring geometry into normalized/canonical form.\n"
38256 : "\n"
38257 : "For more details: :cpp:func:`OGR_G_Normalize`\n"
38258 : "\n"
38259 : ".. versionadded:: 3.3\n"
38260 : "\n"
38261 : "Returns\n"
38262 : "--------\n"
38263 : "Geometry:\n"
38264 : " A newly allocated geometry now owned by the caller, or None on\n"
38265 : " failure.\n"
38266 : "\n"
38267 : ""},
38268 : { "Geometry_RemoveLowerDimensionSubGeoms", _wrap_Geometry_RemoveLowerDimensionSubGeoms, METH_O, "Geometry_RemoveLowerDimensionSubGeoms(Geometry self) -> Geometry"},
38269 : { "Geometry_Buffer", (PyCFunction)(void(*)(void))_wrap_Geometry_Buffer, METH_VARARGS|METH_KEYWORDS, "\n"
38270 : "Geometry_Buffer(Geometry self, double distance, int quadsecs=30) -> Geometry\n"
38271 : "\n"
38272 : "Compute buffer of geometry.\n"
38273 : "\n"
38274 : "For more details: :cpp:func:`OGR_G_Buffer`\n"
38275 : "\n"
38276 : "Parameters\n"
38277 : "-----------\n"
38278 : "distance: float\n"
38279 : " The buffer distance to be applied. Should be expressed into\n"
38280 : " the same unit as the coordinates of the geometry.\n"
38281 : "quadsecs: int, default=30\n"
38282 : " The number of segments used to approximate a 90 degree\n"
38283 : " (quadrant) of curvature.\n"
38284 : "\n"
38285 : "Returns\n"
38286 : "--------\n"
38287 : "Geometry:\n"
38288 : " The newly created geometry or None if an error occurs.\n"
38289 : "\n"
38290 : ""},
38291 : { "Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, "\n"
38292 : "Geometry_Intersection(Geometry self, Geometry other) -> Geometry\n"
38293 : "\n"
38294 : "Compute intersection.\n"
38295 : "\n"
38296 : "For more details: :cpp:func:`OGR_G_Intersection`\n"
38297 : "\n"
38298 : "Parameters\n"
38299 : "-----------\n"
38300 : "other: Geometry\n"
38301 : " The other geometry.\n"
38302 : "\n"
38303 : "Returns\n"
38304 : "--------\n"
38305 : "Geometry:\n"
38306 : " A new geometry representing the intersection or None if there is no\n"
38307 : " intersection or an error occurs.\n"
38308 : "\n"
38309 : ""},
38310 : { "Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, "\n"
38311 : "Geometry_Union(Geometry self, Geometry other) -> Geometry\n"
38312 : "\n"
38313 : "Compute union.\n"
38314 : "\n"
38315 : "For more details: :cpp:func:`OGR_G_Union`\n"
38316 : "\n"
38317 : "Parameters\n"
38318 : "-----------\n"
38319 : "other: Geometry\n"
38320 : " The other geometry.\n"
38321 : "\n"
38322 : "Returns\n"
38323 : "--------\n"
38324 : "Geometry:\n"
38325 : " A new geometry representing the union or None if an error occurs.\n"
38326 : "\n"
38327 : ""},
38328 : { "Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_O, "\n"
38329 : "Geometry_UnionCascaded(Geometry self) -> Geometry\n"
38330 : "\n"
38331 : "Compute union using cascading.\n"
38332 : "\n"
38333 : "For more deails: :cpp:func:`OGR_G_UnionCascaded`\n"
38334 : "\n"
38335 : "Returns\n"
38336 : "--------\n"
38337 : "Geometry:\n"
38338 : " A new geometry representing the union or None if an error occurs.\n"
38339 : "\n"
38340 : ""},
38341 : { "Geometry_UnaryUnion", _wrap_Geometry_UnaryUnion, METH_O, "Geometry_UnaryUnion(Geometry self) -> Geometry"},
38342 : { "Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, "\n"
38343 : "Geometry_Difference(Geometry self, Geometry other) -> Geometry\n"
38344 : "\n"
38345 : "Compute difference.\n"
38346 : "\n"
38347 : "For more details: :cpp:func:`OGR_G_Difference`\n"
38348 : "\n"
38349 : "Parameters\n"
38350 : "-----------\n"
38351 : "other: Geometry\n"
38352 : " The other geometry.\n"
38353 : "\n"
38354 : "Returns\n"
38355 : "--------\n"
38356 : "Geometry:\n"
38357 : " A new geometry representing the difference or None if the difference\n"
38358 : " is empty or an error occurs.\n"
38359 : "\n"
38360 : ""},
38361 : { "Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, "\n"
38362 : "Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\n"
38363 : "\n"
38364 : "Compute symmetric difference.\n"
38365 : "\n"
38366 : "For more details: :cpp:func:`OGR_G_SymDifference`\n"
38367 : "\n"
38368 : "Parameters\n"
38369 : "-----------\n"
38370 : "other:\n"
38371 : " the other geometry.\n"
38372 : "\n"
38373 : "Returns\n"
38374 : "--------\n"
38375 : "Geometry:\n"
38376 : " A new geometry representing the symmetric difference or None if the\n"
38377 : " difference is empty or an error occurs.\n"
38378 : "\n"
38379 : ""},
38380 : { "Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, "\n"
38381 : "Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\n"
38382 : "\n"
38383 : "Compute symmetric difference (deprecated)\n"
38384 : "\n"
38385 : "For more details: :cpp:func:`OGR_G_SymmetricDifference`\n"
38386 : "\n"
38387 : ".. warning:: Deprecated\n"
38388 : "\n"
38389 : "\n"
38390 : ""},
38391 : { "Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, "\n"
38392 : "Geometry_Distance(Geometry self, Geometry other) -> double\n"
38393 : "\n"
38394 : "Compute distance between two geometries.\n"
38395 : "\n"
38396 : "For more details: :cpp:func:`OGR_G_Distance`\n"
38397 : "\n"
38398 : "Parameters\n"
38399 : "-----------\n"
38400 : "other: Geometry\n"
38401 : " The other geometry to compare against.\n"
38402 : "\n"
38403 : "Returns\n"
38404 : "--------\n"
38405 : "float:\n"
38406 : " The distance between the geometries or -1 if an error occurs.\n"
38407 : "\n"
38408 : ""},
38409 : { "Geometry_Distance3D", _wrap_Geometry_Distance3D, METH_VARARGS, "\n"
38410 : "Geometry_Distance3D(Geometry self, Geometry other) -> double\n"
38411 : "\n"
38412 : "Returns the 3D distance between two geometries.\n"
38413 : "\n"
38414 : "For more details: :cpp:func:`OGR_G_Distance3D`\n"
38415 : "\n"
38416 : ".. versionadded:: 2.2\n"
38417 : "\n"
38418 : "Parameters\n"
38419 : "-----------\n"
38420 : "other: Geometry\n"
38421 : " The other geometry to compare against.\n"
38422 : "\n"
38423 : "Returns\n"
38424 : "--------\n"
38425 : "float:\n"
38426 : " The distance between the geometries or -1 if an error occurs.\n"
38427 : "\n"
38428 : ""},
38429 : { "Geometry_Empty", _wrap_Geometry_Empty, METH_O, "\n"
38430 : "Geometry_Empty(Geometry self)\n"
38431 : "\n"
38432 : "Clear geometry information.\n"
38433 : "\n"
38434 : "For more details: :cpp:func:`OGR_G_Empty`\n"
38435 : "\n"
38436 : ""},
38437 : { "Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_O, "\n"
38438 : "Geometry_IsEmpty(Geometry self) -> bool\n"
38439 : "\n"
38440 : "Test if the geometry is empty.\n"
38441 : "\n"
38442 : "For more details: :cpp:func:`OGR_G_IsEmpty`\n"
38443 : "\n"
38444 : "Returns\n"
38445 : "--------\n"
38446 : "int:\n"
38447 : " True if the geometry has no points, otherwise False.\n"
38448 : "\n"
38449 : ""},
38450 : { "Geometry_IsValid", _wrap_Geometry_IsValid, METH_O, "\n"
38451 : "Geometry_IsValid(Geometry self) -> bool\n"
38452 : "\n"
38453 : "Test if the geometry is valid.\n"
38454 : "\n"
38455 : "For more details: :cpp:func:`OGR_G_IsValid`\n"
38456 : "\n"
38457 : "Returns\n"
38458 : "--------\n"
38459 : "int:\n"
38460 : " True if the geometry has no points, otherwise False.\n"
38461 : "\n"
38462 : ""},
38463 : { "Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_O, "\n"
38464 : "Geometry_IsSimple(Geometry self) -> bool\n"
38465 : "\n"
38466 : "Returns True if the geometry is simple.\n"
38467 : "\n"
38468 : "For more details: :cpp:func:`OGR_G_IsSimple`\n"
38469 : "\n"
38470 : "Returns\n"
38471 : "--------\n"
38472 : "int:\n"
38473 : " True if object is simple, otherwise False.\n"
38474 : "\n"
38475 : ""},
38476 : { "Geometry_IsRing", _wrap_Geometry_IsRing, METH_O, "\n"
38477 : "Geometry_IsRing(Geometry self) -> bool\n"
38478 : "\n"
38479 : "Test if the geometry is a ring.\n"
38480 : "\n"
38481 : "For more details: :cpp:func:`OGR_G_IsRing`\n"
38482 : "\n"
38483 : "Returns\n"
38484 : "--------\n"
38485 : "int:\n"
38486 : " True if the geometry has no points, otherwise False.\n"
38487 : "\n"
38488 : ""},
38489 : { "Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, "\n"
38490 : "Geometry_Intersects(Geometry self, Geometry other) -> bool\n"
38491 : "\n"
38492 : "Determines whether two geometries intersect.\n"
38493 : "\n"
38494 : "For more details: :cpp:func:`OGR_G_Intersects`\n"
38495 : "\n"
38496 : "Parameters\n"
38497 : "-----------\n"
38498 : "other: Geometry\n"
38499 : " The other geometry to test against.\n"
38500 : "\n"
38501 : "Returns\n"
38502 : "--------\n"
38503 : "int:\n"
38504 : " True if the geometries intersect, otherwise False.\n"
38505 : "\n"
38506 : ""},
38507 : { "Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, "Geometry_Intersect(Geometry self, Geometry other) -> bool"},
38508 : { "Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, "\n"
38509 : "Geometry_Equals(Geometry self, Geometry other) -> bool\n"
38510 : "\n"
38511 : "Returns True if two geometries are equivalent.\n"
38512 : "\n"
38513 : "For more details: :cpp:func:`OGR_G_Equals`\n"
38514 : "\n"
38515 : "Parameters\n"
38516 : "-----------\n"
38517 : "other: Geometry\n"
38518 : " The other geometry to test against.\n"
38519 : "\n"
38520 : "Returns\n"
38521 : "--------\n"
38522 : "int:\n"
38523 : " True if equivalent or False otherwise.\n"
38524 : "\n"
38525 : ""},
38526 : { "Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, "Geometry_Equal(Geometry self, Geometry other) -> bool"},
38527 : { "Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, "\n"
38528 : "Geometry_Disjoint(Geometry self, Geometry other) -> bool\n"
38529 : "\n"
38530 : "Test for disjointness.\n"
38531 : "\n"
38532 : "For more details: :cpp:func:`OGR_G_Disjoint`\n"
38533 : "\n"
38534 : "Parameters\n"
38535 : "-----------\n"
38536 : "other: Geometry\n"
38537 : " The other geometry to compare.\n"
38538 : "\n"
38539 : "Returns\n"
38540 : "--------\n"
38541 : "int:\n"
38542 : " True if they are disjoint, otherwise False.\n"
38543 : "\n"
38544 : ""},
38545 : { "Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, "\n"
38546 : "Geometry_Touches(Geometry self, Geometry other) -> bool\n"
38547 : "\n"
38548 : "Test for touching.\n"
38549 : "\n"
38550 : "For more details: :cpp:func:`OGR_G_Touches`\n"
38551 : "\n"
38552 : "Parameters\n"
38553 : "-----------\n"
38554 : "other:\n"
38555 : " the other geometry to compare.\n"
38556 : "\n"
38557 : "Returns\n"
38558 : "--------\n"
38559 : "int:\n"
38560 : " True if they are touching, otherwise False.\n"
38561 : "\n"
38562 : ""},
38563 : { "Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, "\n"
38564 : "Geometry_Crosses(Geometry self, Geometry other) -> bool\n"
38565 : "\n"
38566 : "Test for crossing.\n"
38567 : "\n"
38568 : "For more details: :cpp:func:`OGR_G_Crosses`\n"
38569 : "\n"
38570 : "Parameters\n"
38571 : "-----------\n"
38572 : "other: Geometry\n"
38573 : " the other geometry to compare.\n"
38574 : "\n"
38575 : "Returns\n"
38576 : "--------\n"
38577 : "int:\n"
38578 : " True if they are crossing, otherwise False.\n"
38579 : "\n"
38580 : ""},
38581 : { "Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, "\n"
38582 : "Geometry_Within(Geometry self, Geometry other) -> bool\n"
38583 : "\n"
38584 : "Test for containment.\n"
38585 : "\n"
38586 : "For more details: :cpp:func:`OGR_G_Within`\n"
38587 : "\n"
38588 : "Parameters\n"
38589 : "-----------\n"
38590 : "other: Geometry\n"
38591 : " the other geometry to compare.\n"
38592 : "\n"
38593 : "Returns\n"
38594 : "--------\n"
38595 : "int:\n"
38596 : " True if this is within other, otherwise False.\n"
38597 : "\n"
38598 : ""},
38599 : { "Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, "\n"
38600 : "Geometry_Contains(Geometry self, Geometry other) -> bool\n"
38601 : "\n"
38602 : "Test for containment.\n"
38603 : "\n"
38604 : "For more details: :cpp:func:`OGR_G_Contains`\n"
38605 : "\n"
38606 : "Parameters\n"
38607 : "-----------\n"
38608 : "other: Geometry\n"
38609 : " the other geometry to compare.\n"
38610 : "\n"
38611 : "Returns\n"
38612 : "--------\n"
38613 : "int:\n"
38614 : " True if this contains the other geometry, otherwise False.\n"
38615 : "\n"
38616 : ""},
38617 : { "Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, "\n"
38618 : "Geometry_Overlaps(Geometry self, Geometry other) -> bool\n"
38619 : "\n"
38620 : "Test for overlap.\n"
38621 : "\n"
38622 : "For more details: :cpp:func:`OGR_G_Overlaps`\n"
38623 : "\n"
38624 : "Parameters\n"
38625 : "-----------\n"
38626 : "other: Geometry\n"
38627 : " the other geometry to compare.\n"
38628 : "\n"
38629 : "Returns\n"
38630 : "--------\n"
38631 : "int:\n"
38632 : " True if they are overlapping, otherwise False.\n"
38633 : "\n"
38634 : ""},
38635 : { "Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, "\n"
38636 : "Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\n"
38637 : "\n"
38638 : "Transform geometry to new spatial reference system.\n"
38639 : "\n"
38640 : "For more details: :cpp:func:`OGR_G_TransformTo`\n"
38641 : "\n"
38642 : "Parameters\n"
38643 : "-----------\n"
38644 : "reference: SpatialReference\n"
38645 : " The spatial reference system to apply.\n"
38646 : "\n"
38647 : "Returns\n"
38648 : "--------\n"
38649 : "int:\n"
38650 : " :py:const:`osgeo.ogr.OGRERR_NONE` on success, or an error code.\n"
38651 : "\n"
38652 : ""},
38653 : { "Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_O, "\n"
38654 : "Geometry_GetSpatialReference(Geometry self) -> SpatialReference\n"
38655 : "\n"
38656 : "For more details: :cpp:func:`OGR_G_GetSpatialReference`\n"
38657 : "\n"
38658 : "Returns spatial reference system for geometry.\n"
38659 : "\n"
38660 : "Returns\n"
38661 : "--------\n"
38662 : "SpatialReference\n"
38663 : "\n"
38664 : ""},
38665 : { "Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, "\n"
38666 : "Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\n"
38667 : "\n"
38668 : "Assign spatial reference to this object.\n"
38669 : "\n"
38670 : "For more details: :cpp:func:`OGR_G_AssignSpatialReference`\n"
38671 : "\n"
38672 : "Parameters\n"
38673 : "-----------\n"
38674 : "reference: SpatialReference\n"
38675 : " The new spatial reference system to apply.\n"
38676 : "\n"
38677 : ""},
38678 : { "Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_O, "\n"
38679 : "Geometry_CloseRings(Geometry self)\n"
38680 : "\n"
38681 : "Force rings to be closed.\n"
38682 : "\n"
38683 : "For more details: :cpp:func:`OGR_G_CloseRings`\n"
38684 : "\n"
38685 : ""},
38686 : { "Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_O, "\n"
38687 : "Geometry_FlattenTo2D(Geometry self)\n"
38688 : "\n"
38689 : "Convert geometry to strictly 2D.\n"
38690 : "\n"
38691 : "For more details: :cpp:func:`OGR_G_FlattenTo2D`\n"
38692 : "\n"
38693 : ""},
38694 : { "Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, "\n"
38695 : "Geometry_Segmentize(Geometry self, double dfMaxLength)\n"
38696 : "\n"
38697 : "Modify the geometry such it has no segment longer then the given\n"
38698 : "distance.\n"
38699 : "\n"
38700 : "For more details: :cpp:func:`OGR_G_Segmentize`\n"
38701 : "\n"
38702 : "Parameters\n"
38703 : "-----------\n"
38704 : "dfMaxLength: float\n"
38705 : " the maximum distance between 2 points after segmentization\n"
38706 : "\n"
38707 : ""},
38708 : { "Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_O, "\n"
38709 : "Geometry_GetEnvelope(Geometry self)\n"
38710 : "\n"
38711 : "Computes and returns the bounding envelope for this geometry in the\n"
38712 : "passed psEnvelope structure.\n"
38713 : "\n"
38714 : "For more details: :cpp:func:`OGR_G_GetEnvelope`\n"
38715 : "\n"
38716 : ".. warning:: Check the return order of the bounds.\n"
38717 : "\n"
38718 : "Returns\n"
38719 : "--------\n"
38720 : "minx: float\n"
38721 : "maxx: float\n"
38722 : "miny: float\n"
38723 : "maxy: float\n"
38724 : "\n"
38725 : ""},
38726 : { "Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_O, "\n"
38727 : "Geometry_GetEnvelope3D(Geometry self)\n"
38728 : "\n"
38729 : "Computes and returns the bounding envelope (3D) for this geometry in\n"
38730 : "the passed psEnvelope structure.\n"
38731 : "\n"
38732 : "For more details: :cpp:func:`OGR_G_GetEnvelope3D`\n"
38733 : "\n"
38734 : ".. warning:: Check the return order of the bounds.\n"
38735 : "\n"
38736 : "Returns\n"
38737 : "--------\n"
38738 : "minx: float\n"
38739 : "maxx: float\n"
38740 : "miny: float\n"
38741 : "maxy: float\n"
38742 : "minz: float\n"
38743 : "maxz: float\n"
38744 : "\n"
38745 : ""},
38746 : { "Geometry_Centroid", _wrap_Geometry_Centroid, METH_O, "\n"
38747 : "Geometry_Centroid(Geometry self) -> Geometry\n"
38748 : "\n"
38749 : "Compute the geometry centroid.\n"
38750 : "\n"
38751 : "For more details: :cpp:func:`OGR_G_Centroid`\n"
38752 : "\n"
38753 : "Returns\n"
38754 : "--------\n"
38755 : "Geometry\n"
38756 : "\n"
38757 : ""},
38758 : { "Geometry_PointOnSurface", _wrap_Geometry_PointOnSurface, METH_O, "\n"
38759 : "Geometry_PointOnSurface(Geometry self) -> Geometry\n"
38760 : "\n"
38761 : "Returns a point guaranteed to lie on the surface.\n"
38762 : "\n"
38763 : "For more details: :cpp:func:`OGR_G_PointOnSurface`\n"
38764 : "\n"
38765 : "Returns\n"
38766 : "--------\n"
38767 : "Geometry:\n"
38768 : " A point guaranteed to lie on the surface or None if an error occurred.\n"
38769 : "\n"
38770 : ""},
38771 : { "Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_O, "\n"
38772 : "Geometry_WkbSize(Geometry self) -> size_t\n"
38773 : "\n"
38774 : "Returns size of related binary representation.\n"
38775 : "\n"
38776 : "For more details: :cpp:func:`OGR_G_WkbSize`\n"
38777 : "\n"
38778 : "Returns\n"
38779 : "--------\n"
38780 : "int\n"
38781 : "\n"
38782 : ""},
38783 : { "Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_O, "\n"
38784 : "Geometry_GetCoordinateDimension(Geometry self) -> int\n"
38785 : "\n"
38786 : "Get the dimension of the coordinates in this geometry.\n"
38787 : "\n"
38788 : "For more details: :cpp:func:`OGR_G_GetCoordinateDimension`\n"
38789 : "\n"
38790 : ".. warning:: Deprecated. Use :py:func:`CoordinateDimension`,\n"
38791 : " :py:func:`Is3D`, or :py:func:`IsMeasured`.\n"
38792 : "\n"
38793 : "Returns\n"
38794 : "--------\n"
38795 : "int:\n"
38796 : " This will return 2 or 3.\n"
38797 : "\n"
38798 : ""},
38799 : { "Geometry_CoordinateDimension", _wrap_Geometry_CoordinateDimension, METH_O, "\n"
38800 : "Geometry_CoordinateDimension(Geometry self) -> int\n"
38801 : "\n"
38802 : "Get the dimension of the coordinates in this geometry.\n"
38803 : "\n"
38804 : "For more details: :cpp:func:`OGR_G_CoordinateDimension`\n"
38805 : "\n"
38806 : ".. versionadded:: 2.1\n"
38807 : "\n"
38808 : "Returns\n"
38809 : "--------\n"
38810 : "int:\n"
38811 : " This will return 2 for XY, 3 for XYZ and XYM, and 4 for XYZM data.\n"
38812 : "\n"
38813 : ""},
38814 : { "Geometry_Is3D", _wrap_Geometry_Is3D, METH_O, "\n"
38815 : "Geometry_Is3D(Geometry self) -> int\n"
38816 : "\n"
38817 : "See whether this geometry has Z coordinates.\n"
38818 : "\n"
38819 : "For more details: :cpp:func:`OGR_G_Is3D`\n"
38820 : "\n"
38821 : ".. versionadded:: 2.1\n"
38822 : "\n"
38823 : "Returns\n"
38824 : "--------\n"
38825 : "int:\n"
38826 : " True if the geometry has Z coordinates.\n"
38827 : "\n"
38828 : ""},
38829 : { "Geometry_IsMeasured", _wrap_Geometry_IsMeasured, METH_O, "\n"
38830 : "Geometry_IsMeasured(Geometry self) -> int\n"
38831 : "\n"
38832 : "See whether this geometry is measured.\n"
38833 : "\n"
38834 : "For more details: :cpp:func:`OGR_G_IsMeasured`\n"
38835 : "\n"
38836 : ".. versionadded:: 2.1\n"
38837 : "\n"
38838 : "Returns\n"
38839 : "--------\n"
38840 : "int:\n"
38841 : " True if the geometry has M coordinates.\n"
38842 : "\n"
38843 : ""},
38844 : { "Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, "\n"
38845 : "Geometry_SetCoordinateDimension(Geometry self, int dimension)\n"
38846 : "\n"
38847 : "Set the coordinate dimension.\n"
38848 : "\n"
38849 : "For more details: :cpp:func:`OGR_G_SetCoordinateDimension`\n"
38850 : "\n"
38851 : ".. warning:: Deprecated. Use :py:func:`Set3D` or :py:func:`SetMeasured`.\n"
38852 : "\n"
38853 : "Parameters\n"
38854 : "-----------\n"
38855 : "dimension: int\n"
38856 : " New coordinate dimension value, either 2 or 3.\n"
38857 : "\n"
38858 : ""},
38859 : { "Geometry_Set3D", _wrap_Geometry_Set3D, METH_VARARGS, "\n"
38860 : "Geometry_Set3D(Geometry self, int b3D)\n"
38861 : "\n"
38862 : "Add or remove the Z coordinate dimension.\n"
38863 : "\n"
38864 : "For more details: :cpp:func:`OGR_G_Set3D`\n"
38865 : "\n"
38866 : ".. versionadded:: 2.1\n"
38867 : "\n"
38868 : "Parameters\n"
38869 : "-----------\n"
38870 : "bIs3D: bool\n"
38871 : " Should the geometry have a Z dimension, either True or False.\n"
38872 : "\n"
38873 : ""},
38874 : { "Geometry_SetMeasured", _wrap_Geometry_SetMeasured, METH_VARARGS, "\n"
38875 : "Geometry_SetMeasured(Geometry self, int bMeasured)\n"
38876 : "\n"
38877 : "Add or remove the M coordinate dimension.\n"
38878 : "\n"
38879 : "For more details: :cpp:func:`OGR_G_SetMeasured`\n"
38880 : "\n"
38881 : ".. versionadded:: 2.1\n"
38882 : "\n"
38883 : "Parameters\n"
38884 : "-----------\n"
38885 : "bIsMeasured: bool\n"
38886 : " Should the geometry have a M dimension, either True or False.\n"
38887 : "\n"
38888 : ""},
38889 : { "Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_O, "\n"
38890 : "Geometry_GetDimension(Geometry self) -> int\n"
38891 : "\n"
38892 : "Get the dimension of this geometry.\n"
38893 : "\n"
38894 : "For more details: :cpp:func:`OGR_G_GetDimension`\n"
38895 : "\n"
38896 : "Returns\n"
38897 : "--------\n"
38898 : "int:\n"
38899 : " 0 for points, 1 for lines, and 2 for surfaces.\n"
38900 : "\n"
38901 : ""},
38902 : { "Geometry_HasCurveGeometry", _wrap_Geometry_HasCurveGeometry, METH_VARARGS, "Geometry_HasCurveGeometry(Geometry self, int bLookForCircular=FALSE) -> int"},
38903 : { "Geometry_GetLinearGeometry", (PyCFunction)(void(*)(void))_wrap_Geometry_GetLinearGeometry, METH_VARARGS|METH_KEYWORDS, "Geometry_GetLinearGeometry(Geometry self, double dfMaxAngleStepSizeDegrees=0.0, char ** options=None) -> Geometry"},
38904 : { "Geometry_GetCurveGeometry", (PyCFunction)(void(*)(void))_wrap_Geometry_GetCurveGeometry, METH_VARARGS|METH_KEYWORDS, "Geometry_GetCurveGeometry(Geometry self, char ** options=None) -> Geometry"},
38905 : { "Geometry_Value", _wrap_Geometry_Value, METH_VARARGS, "Geometry_Value(Geometry self, double dfDistance) -> Geometry"},
38906 : { "Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, "\n"
38907 : "Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
38908 : "Geometry_Transform(Geometry self, GeomTransformer transformer) -> Geometry\n"
38909 : "\n"
38910 : "Apply arbitrary coordinate transformation to geometry.\n"
38911 : "\n"
38912 : "For more details: :cpp:func:`OGR_G_Transform`\n"
38913 : "\n"
38914 : "Parameters\n"
38915 : "-----------\n"
38916 : "trans: CoordinateTransform\n"
38917 : " The transformation to apply.\n"
38918 : "\n"
38919 : "Returns\n"
38920 : "--------\n"
38921 : "Geometry:\n"
38922 : " The transformed geometry.\n"
38923 : "\n"
38924 : ""},
38925 : { "Geometry_CreatePreparedGeometry", _wrap_Geometry_CreatePreparedGeometry, METH_O, "Geometry_CreatePreparedGeometry(Geometry self) -> PreparedGeometry"},
38926 : { "Geometry_swigregister", Geometry_swigregister, METH_O, NULL},
38927 : { "Geometry_swiginit", Geometry_swiginit, METH_VARARGS, NULL},
38928 : { "delete_PreparedGeometry", _wrap_delete_PreparedGeometry, METH_O, "delete_PreparedGeometry(PreparedGeometry self)"},
38929 : { "PreparedGeometry_Intersects", _wrap_PreparedGeometry_Intersects, METH_VARARGS, "PreparedGeometry_Intersects(PreparedGeometry self, Geometry otherGeom) -> bool"},
38930 : { "PreparedGeometry_Contains", _wrap_PreparedGeometry_Contains, METH_VARARGS, "PreparedGeometry_Contains(PreparedGeometry self, Geometry otherGeom) -> bool"},
38931 : { "PreparedGeometry_swigregister", PreparedGeometry_swigregister, METH_O, NULL},
38932 : { "new_GeomTransformer", _wrap_new_GeomTransformer, METH_VARARGS, "new_GeomTransformer(CoordinateTransformation ct, char ** options=None) -> GeomTransformer"},
38933 : { "delete_GeomTransformer", _wrap_delete_GeomTransformer, METH_O, "delete_GeomTransformer(GeomTransformer self)"},
38934 : { "GeomTransformer_Transform", _wrap_GeomTransformer_Transform, METH_VARARGS, "GeomTransformer_Transform(GeomTransformer self, Geometry src_geom) -> Geometry"},
38935 : { "GeomTransformer_swigregister", GeomTransformer_swigregister, METH_O, NULL},
38936 : { "GeomTransformer_swiginit", GeomTransformer_swiginit, METH_VARARGS, NULL},
38937 : { "delete_FieldDomain", _wrap_delete_FieldDomain, METH_O, "delete_FieldDomain(FieldDomain self)"},
38938 : { "FieldDomain_GetName", _wrap_FieldDomain_GetName, METH_O, "\n"
38939 : "FieldDomain_GetName(FieldDomain self) -> char const *\n"
38940 : "\n"
38941 : "\n"
38942 : "Get the name of the field domain.\n"
38943 : "\n"
38944 : "See :cpp:func:`OGRFieldDomain::GetName`.\n"
38945 : "\n"
38946 : ".. versionadded:: 3.3\n"
38947 : "\n"
38948 : "Returns\n"
38949 : "--------\n"
38950 : "str\n"
38951 : " the field domain name.\n"
38952 : "\n"
38953 : ""},
38954 : { "FieldDomain_GetDescription", _wrap_FieldDomain_GetDescription, METH_O, "\n"
38955 : "FieldDomain_GetDescription(FieldDomain self) -> char const *\n"
38956 : "\n"
38957 : "\n"
38958 : "Get the description of the field domain.\n"
38959 : "\n"
38960 : "See :cpp:func:`OGRFieldDomain::GetDescription`.\n"
38961 : "\n"
38962 : ".. versionadded:: 3.3\n"
38963 : "\n"
38964 : "Returns\n"
38965 : "--------\n"
38966 : "str\n"
38967 : " the field domain description (might be empty string).\n"
38968 : "\n"
38969 : ""},
38970 : { "FieldDomain_GetFieldType", _wrap_FieldDomain_GetFieldType, METH_O, "\n"
38971 : "FieldDomain_GetFieldType(FieldDomain self) -> OGRFieldType\n"
38972 : "\n"
38973 : "\n"
38974 : "Get the field type of the field domain.\n"
38975 : "\n"
38976 : "See :cpp:func:`OGRFieldDomain::GetFieldType`.\n"
38977 : "\n"
38978 : ".. versionadded:: 3.3\n"
38979 : "\n"
38980 : "Returns\n"
38981 : "--------\n"
38982 : "int\n"
38983 : " the field type of the field domain.\n"
38984 : "\n"
38985 : ""},
38986 : { "FieldDomain_GetFieldSubType", _wrap_FieldDomain_GetFieldSubType, METH_O, "\n"
38987 : "FieldDomain_GetFieldSubType(FieldDomain self) -> OGRFieldSubType\n"
38988 : "\n"
38989 : "\n"
38990 : "Get the field subtype of the field domain.\n"
38991 : "\n"
38992 : "See :cpp:func:`OGRFieldDomain::GetFieldSubType`.\n"
38993 : "\n"
38994 : ".. versionadded:: 3.3\n"
38995 : "\n"
38996 : "Returns\n"
38997 : "--------\n"
38998 : "int\n"
38999 : " the field subtype of the field domain.\n"
39000 : "\n"
39001 : ""},
39002 : { "FieldDomain_GetDomainType", _wrap_FieldDomain_GetDomainType, METH_O, "\n"
39003 : "FieldDomain_GetDomainType(FieldDomain self) -> OGRFieldDomainType\n"
39004 : "\n"
39005 : "\n"
39006 : "Get the type of the field domain.\n"
39007 : "\n"
39008 : "See :cpp:func:`OGRFieldDomain::GetDomainType`.\n"
39009 : "\n"
39010 : ".. versionadded:: 3.3\n"
39011 : "\n"
39012 : "Returns\n"
39013 : "--------\n"
39014 : "int\n"
39015 : " the type of the field domain.\n"
39016 : "\n"
39017 : "Examples\n"
39018 : "--------\n"
39019 : ">>> d = ogr.CreateCodedFieldDomain('my_code', None, ogr.OFTInteger, ogr.OFSTNone, { 1 : 'owned', 2 : 'leased' })\n"
39020 : ">>> d.GetDomainType() == ogr.OFDT_CODED\n"
39021 : "True\n"
39022 : "\n"
39023 : "\n"
39024 : ""},
39025 : { "FieldDomain_GetSplitPolicy", _wrap_FieldDomain_GetSplitPolicy, METH_O, "\n"
39026 : "FieldDomain_GetSplitPolicy(FieldDomain self) -> OGRFieldDomainSplitPolicy\n"
39027 : "\n"
39028 : "\n"
39029 : "Get the split policy of the field domain.\n"
39030 : "\n"
39031 : "See :cpp:func:`OGRFieldDomain::GetSplitPolicy`.\n"
39032 : "\n"
39033 : ".. versionadded:: 3.3\n"
39034 : "\n"
39035 : "Returns\n"
39036 : "--------\n"
39037 : "int\n"
39038 : " the split policy of the field domain (default = :py:const:`OFDSP_DEFAULT_VALUE`)\n"
39039 : "\n"
39040 : ""},
39041 : { "FieldDomain_SetSplitPolicy", _wrap_FieldDomain_SetSplitPolicy, METH_VARARGS, "\n"
39042 : "FieldDomain_SetSplitPolicy(FieldDomain self, OGRFieldDomainSplitPolicy policy)\n"
39043 : "\n"
39044 : "\n"
39045 : "Set the split policy of the field domain.\n"
39046 : "\n"
39047 : "See :cpp:func:`OGRFieldDomain::SetSplitPolicy`.\n"
39048 : "\n"
39049 : ".. versionadded:: 3.3\n"
39050 : "\n"
39051 : "policy : int\n"
39052 : " the split policy code of the field domain.\n"
39053 : "\n"
39054 : ""},
39055 : { "FieldDomain_GetMergePolicy", _wrap_FieldDomain_GetMergePolicy, METH_O, "\n"
39056 : "FieldDomain_GetMergePolicy(FieldDomain self) -> OGRFieldDomainMergePolicy\n"
39057 : "\n"
39058 : "\n"
39059 : "Get the merge policy of the field domain.\n"
39060 : "\n"
39061 : "See :cpp:func:`OGRFieldDomain::GetMergePolicy`.\n"
39062 : "\n"
39063 : ".. versionadded:: 3.3\n"
39064 : "\n"
39065 : "Returns\n"
39066 : "--------\n"
39067 : "int\n"
39068 : " the merge policy of the field domain (default = :py:const:`OFDMP_DEFAULT_VALUE`)\n"
39069 : "\n"
39070 : ""},
39071 : { "FieldDomain_SetMergePolicy", _wrap_FieldDomain_SetMergePolicy, METH_VARARGS, "\n"
39072 : "FieldDomain_SetMergePolicy(FieldDomain self, OGRFieldDomainMergePolicy policy)\n"
39073 : "\n"
39074 : "\n"
39075 : "Set the merge policy of the field domain.\n"
39076 : "\n"
39077 : "See :cpp:func:`OGRFieldDomain::SetMergePolicy`.\n"
39078 : "\n"
39079 : ".. versionadded:: 3.3\n"
39080 : "\n"
39081 : "Parameters\n"
39082 : "-----------\n"
39083 : "policy : int\n"
39084 : " the merge policy code of the field domain.\n"
39085 : "\n"
39086 : ""},
39087 : { "FieldDomain_GetEnumeration", _wrap_FieldDomain_GetEnumeration, METH_O, "\n"
39088 : "FieldDomain_GetEnumeration(FieldDomain self) -> OGRCodedValue const *\n"
39089 : "\n"
39090 : "\n"
39091 : "Get the enumeration as a mapping of codes to values.\n"
39092 : "\n"
39093 : "See :cpp:func:`OGRCodedFieldDomain::GetEnumeration`.\n"
39094 : "\n"
39095 : ".. versionadded:: 3.3\n"
39096 : "\n"
39097 : "Returns\n"
39098 : "--------\n"
39099 : "dict\n"
39100 : "\n"
39101 : "Examples\n"
39102 : "--------\n"
39103 : ">>> d = ogr.CreateCodedFieldDomain('my_domain', None, ogr.OFTInteger, ogr.OFSTNone, { 1 : 'owned', 2 : 'leased' })\n"
39104 : ">>> d.GetEnumeration()\n"
39105 : "{'1': 'owned', '2': 'leased'}\n"
39106 : "\n"
39107 : "\n"
39108 : ""},
39109 : { "FieldDomain_GetMinAsDouble", _wrap_FieldDomain_GetMinAsDouble, METH_O, "\n"
39110 : "FieldDomain_GetMinAsDouble(FieldDomain self) -> double\n"
39111 : "\n"
39112 : "\n"
39113 : "Get the minimum value of a range domain.\n"
39114 : "\n"
39115 : "See :cpp:func:`OGRRangeFieldDomain::GetMin()`\n"
39116 : "\n"
39117 : ".. versionadded:: 3.3\n"
39118 : "\n"
39119 : "Returns\n"
39120 : "--------\n"
39121 : "float\n"
39122 : " the minimum value of the range\n"
39123 : "\n"
39124 : ""},
39125 : { "FieldDomain_GetMinAsString", _wrap_FieldDomain_GetMinAsString, METH_O, "\n"
39126 : "FieldDomain_GetMinAsString(FieldDomain self) -> char const *\n"
39127 : "\n"
39128 : "\n"
39129 : "Get the minimum value of a range domain.\n"
39130 : "\n"
39131 : "See :cpp:func:`OGRRangeFieldDomain::GetMin()`\n"
39132 : "\n"
39133 : ".. versionadded:: 3.3\n"
39134 : "\n"
39135 : "Returns\n"
39136 : "--------\n"
39137 : "str\n"
39138 : " the minimum value of the range\n"
39139 : "\n"
39140 : ""},
39141 : { "FieldDomain_IsMinInclusive", _wrap_FieldDomain_IsMinInclusive, METH_O, "FieldDomain_IsMinInclusive(FieldDomain self) -> bool"},
39142 : { "FieldDomain_GetMaxAsDouble", _wrap_FieldDomain_GetMaxAsDouble, METH_O, "\n"
39143 : "FieldDomain_GetMaxAsDouble(FieldDomain self) -> double\n"
39144 : "\n"
39145 : "\n"
39146 : "Get the maximum value of a range domain.\n"
39147 : "\n"
39148 : "See :cpp:func:`OGRRangeFieldDomain::GetMax()`\n"
39149 : "\n"
39150 : ".. versionadded:: 3.3\n"
39151 : "\n"
39152 : "Returns\n"
39153 : "--------\n"
39154 : "float\n"
39155 : " the maximum value of the range\n"
39156 : "\n"
39157 : ""},
39158 : { "FieldDomain_GetMaxAsString", _wrap_FieldDomain_GetMaxAsString, METH_O, "\n"
39159 : "FieldDomain_GetMaxAsString(FieldDomain self) -> char const *\n"
39160 : "\n"
39161 : "\n"
39162 : "Get the maximum value of a range domain.\n"
39163 : "\n"
39164 : "See :cpp:func:`OGRRangeFieldDomain::GetMax()`\n"
39165 : "\n"
39166 : ".. versionadded:: 3.3\n"
39167 : "\n"
39168 : "Returns\n"
39169 : "--------\n"
39170 : "str\n"
39171 : " the maximum value of the range\n"
39172 : "\n"
39173 : ""},
39174 : { "FieldDomain_IsMaxInclusive", _wrap_FieldDomain_IsMaxInclusive, METH_O, "FieldDomain_IsMaxInclusive(FieldDomain self) -> bool"},
39175 : { "FieldDomain_GetGlob", _wrap_FieldDomain_GetGlob, METH_O, "\n"
39176 : "FieldDomain_GetGlob(FieldDomain self) -> char const *\n"
39177 : "\n"
39178 : "\n"
39179 : "Get the glob expression.\n"
39180 : "\n"
39181 : "See :cpp:func:`OGRGlobFieldDomain::GetGlob`.\n"
39182 : "\n"
39183 : ".. versionadded:: 3.3\n"
39184 : "\n"
39185 : "Returns\n"
39186 : "--------\n"
39187 : "str\n"
39188 : " the glob expression, or ``None`` in case of error\n"
39189 : "\n"
39190 : ""},
39191 : { "FieldDomain_swigregister", FieldDomain_swigregister, METH_O, NULL},
39192 : { "CreateCodedFieldDomain", _wrap_CreateCodedFieldDomain, METH_VARARGS, "\n"
39193 : "CreateCodedFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, OGRCodedValue const * enumeration) -> FieldDomain\n"
39194 : "\n"
39195 : "\n"
39196 : "Creates a new coded field domain.\n"
39197 : "\n"
39198 : "See :cpp:func:`OGRCodedFieldDomain::OGRCodedFieldDomain`.\n"
39199 : "\n"
39200 : ".. versionadded:: 3.3\n"
39201 : "\n"
39202 : "Parameters\n"
39203 : "-----------\n"
39204 : "name : str\n"
39205 : " Domain name. Should not be ``None``.\n"
39206 : "description : str, optional\n"
39207 : " Domain description (can be ``None``)\n"
39208 : "type : int\n"
39209 : " Field type.\n"
39210 : "subtype : int\n"
39211 : " Field subtype.\n"
39212 : "enumeration : dict\n"
39213 : " Enumeration as a dictionary of (code : value) pairs. Should not be ``None``.\n"
39214 : "\n"
39215 : "Returns\n"
39216 : "--------\n"
39217 : "FieldDomain\n"
39218 : "\n"
39219 : ""},
39220 : { "CreateRangeFieldDomain", _wrap_CreateRangeFieldDomain, METH_VARARGS, "\n"
39221 : "CreateRangeFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, double min, bool minIsInclusive, double max, double maxIsInclusive) -> FieldDomain\n"
39222 : "\n"
39223 : "Creates a new range field domain.\n"
39224 : "\n"
39225 : "See :cpp:func:`OGRRangeFieldDomain::OGRRangeFieldDomain`.\n"
39226 : "\n"
39227 : ".. versionadded:: 3.3\n"
39228 : "\n"
39229 : "Parameters\n"
39230 : "-----------\n"
39231 : "name : str\n"
39232 : " Domain name. Should not be ``None``.\n"
39233 : "description : str, optional\n"
39234 : " Domain description (can be ``None``)\n"
39235 : "type : int\n"
39236 : " Field type. Generally numeric. Potentially :py:const:`OFTDateTime`.\n"
39237 : "subtype : int\n"
39238 : " Field subtype.\n"
39239 : "min : float, optional\n"
39240 : " Minimum value (can be ``None``).\n"
39241 : "minIsInclusive : bool\n"
39242 : " Whether the minimum value is included in the range.\n"
39243 : "max : float, optional\n"
39244 : " Maximum value (can be ``None``).\n"
39245 : "maxIsInclusive : bool\n"
39246 : " Whether the maximum value is included in the range.\n"
39247 : "\n"
39248 : "Returns\n"
39249 : "--------\n"
39250 : "FieldDomain\n"
39251 : "\n"
39252 : ""},
39253 : { "CreateRangeFieldDomainDateTime", _wrap_CreateRangeFieldDomainDateTime, METH_VARARGS, "CreateRangeFieldDomainDateTime(char const * name, char const * description, char const * min, bool minIsInclusive, char const * max, double maxIsInclusive) -> FieldDomain"},
39254 : { "CreateGlobFieldDomain", _wrap_CreateGlobFieldDomain, METH_VARARGS, "\n"
39255 : "CreateGlobFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, char const * glob) -> FieldDomain\n"
39256 : "\n"
39257 : "\n"
39258 : "Creates a new glob field domain.\n"
39259 : "\n"
39260 : "See :cpp:func:`OGRGlobFieldDomain::OGRGlobFieldDomain`\n"
39261 : "\n"
39262 : ".. versionadded:: 3.3\n"
39263 : "\n"
39264 : "Parameters\n"
39265 : "-----------\n"
39266 : "name : str\n"
39267 : " Domain name. Should not be ``None``.\n"
39268 : "description : str, optional\n"
39269 : " Domain description (can be ``None``)\n"
39270 : "type : int\n"
39271 : " Field type.\n"
39272 : "subtype : int\n"
39273 : " Field subtype.\n"
39274 : "glob : str\n"
39275 : " Glob expression. Should not be ``None``.\n"
39276 : "\n"
39277 : "Returns\n"
39278 : "--------\n"
39279 : "FieldDomain\n"
39280 : "\n"
39281 : ""},
39282 : { "delete_GeomCoordinatePrecision", _wrap_delete_GeomCoordinatePrecision, METH_O, "delete_GeomCoordinatePrecision(GeomCoordinatePrecision self)"},
39283 : { "GeomCoordinatePrecision_Set", _wrap_GeomCoordinatePrecision_Set, METH_VARARGS, "GeomCoordinatePrecision_Set(GeomCoordinatePrecision self, double xyResolution, double zResolution, double mResolution)"},
39284 : { "GeomCoordinatePrecision_SetFromMeter", _wrap_GeomCoordinatePrecision_SetFromMeter, METH_VARARGS, "GeomCoordinatePrecision_SetFromMeter(GeomCoordinatePrecision self, SpatialReference srs, double xyMeterResolution, double zMeterResolution, double mResolution)"},
39285 : { "GeomCoordinatePrecision_GetXYResolution", _wrap_GeomCoordinatePrecision_GetXYResolution, METH_O, "GeomCoordinatePrecision_GetXYResolution(GeomCoordinatePrecision self) -> double"},
39286 : { "GeomCoordinatePrecision_GetZResolution", _wrap_GeomCoordinatePrecision_GetZResolution, METH_O, "GeomCoordinatePrecision_GetZResolution(GeomCoordinatePrecision self) -> double"},
39287 : { "GeomCoordinatePrecision_GetMResolution", _wrap_GeomCoordinatePrecision_GetMResolution, METH_O, "GeomCoordinatePrecision_GetMResolution(GeomCoordinatePrecision self) -> double"},
39288 : { "GeomCoordinatePrecision_GetFormats", _wrap_GeomCoordinatePrecision_GetFormats, METH_O, "GeomCoordinatePrecision_GetFormats(GeomCoordinatePrecision self) -> char **"},
39289 : { "GeomCoordinatePrecision_GetFormatSpecificOptions", _wrap_GeomCoordinatePrecision_GetFormatSpecificOptions, METH_VARARGS, "GeomCoordinatePrecision_GetFormatSpecificOptions(GeomCoordinatePrecision self, char const * formatName) -> char **"},
39290 : { "GeomCoordinatePrecision_SetFormatSpecificOptions", _wrap_GeomCoordinatePrecision_SetFormatSpecificOptions, METH_VARARGS, "GeomCoordinatePrecision_SetFormatSpecificOptions(GeomCoordinatePrecision self, char const * formatName, char ** formatSpecificOptions)"},
39291 : { "GeomCoordinatePrecision_swigregister", GeomCoordinatePrecision_swigregister, METH_O, NULL},
39292 : { "CreateGeomCoordinatePrecision", _wrap_CreateGeomCoordinatePrecision, METH_NOARGS, "CreateGeomCoordinatePrecision() -> GeomCoordinatePrecision"},
39293 : { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "GetDriverCount() -> int"},
39294 : { "GetOpenDSCount", _wrap_GetOpenDSCount, METH_NOARGS, "GetOpenDSCount() -> int"},
39295 : { "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"},
39296 : { "RegisterAll", _wrap_RegisterAll, METH_NOARGS, "RegisterAll()"},
39297 : { "GeometryTypeToName", _wrap_GeometryTypeToName, METH_O, "GeometryTypeToName(OGRwkbGeometryType eType) -> char const *"},
39298 : { "GetFieldTypeName", _wrap_GetFieldTypeName, METH_O, "\n"
39299 : "GetFieldTypeName(OGRFieldType type) -> char const *\n"
39300 : "\n"
39301 : "Fetch human readable name for a field type.\n"
39302 : "\n"
39303 : "See :cpp:func:`OGRFieldDefn::GetFieldTypeName`.\n"
39304 : "\n"
39305 : "Parameters\n"
39306 : "-----------\n"
39307 : "type : int\n"
39308 : " the field type code to get name for\n"
39309 : "\n"
39310 : "Returns\n"
39311 : "--------\n"
39312 : "str\n"
39313 : " the name\n"
39314 : "\n"
39315 : "Examples\n"
39316 : "--------\n"
39317 : ">>> ogr.GetFieldTypeName(0)\n"
39318 : "'Integer'\n"
39319 : "\n"
39320 : ">>> ogr.GetFieldTypeName(ogr.OFTReal)\n"
39321 : "'Real'\n"
39322 : "\n"
39323 : ""},
39324 : { "GetFieldSubTypeName", _wrap_GetFieldSubTypeName, METH_O, "\n"
39325 : "GetFieldSubTypeName(OGRFieldSubType type) -> char const *\n"
39326 : "\n"
39327 : "\n"
39328 : "Fetch human readable name for a field subtype.\n"
39329 : "\n"
39330 : "See :cpp:func:`OGRFieldDefn::GetFieldSubTypeName`.\n"
39331 : "\n"
39332 : "Parameters\n"
39333 : "-----------\n"
39334 : "type : int\n"
39335 : " the field subtype to get name for.\n"
39336 : "\n"
39337 : "Returns\n"
39338 : "--------\n"
39339 : "str\n"
39340 : " the name.\n"
39341 : "\n"
39342 : "Examples\n"
39343 : "--------\n"
39344 : ">>> ogr.GetFieldSubTypeName(1)\n"
39345 : "'Boolean'\n"
39346 : "\n"
39347 : ">>> ogr.GetFieldSubTypeName(ogr.OFSTInt16)\n"
39348 : "'Int16'\n"
39349 : "\n"
39350 : "\n"
39351 : ""},
39352 : { "GT_Flatten", _wrap_GT_Flatten, METH_O, "GT_Flatten(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
39353 : { "GT_SetZ", _wrap_GT_SetZ, METH_O, "GT_SetZ(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
39354 : { "GT_SetM", _wrap_GT_SetM, METH_O, "GT_SetM(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
39355 : { "GT_SetModifier", _wrap_GT_SetModifier, METH_VARARGS, "GT_SetModifier(OGRwkbGeometryType eType, int bSetZ, int bSetM=FALSE) -> OGRwkbGeometryType"},
39356 : { "GT_HasZ", _wrap_GT_HasZ, METH_O, "GT_HasZ(OGRwkbGeometryType eType) -> int"},
39357 : { "GT_HasM", _wrap_GT_HasM, METH_O, "GT_HasM(OGRwkbGeometryType eType) -> int"},
39358 : { "GT_IsSubClassOf", _wrap_GT_IsSubClassOf, METH_VARARGS, "GT_IsSubClassOf(OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType) -> int"},
39359 : { "GT_IsCurve", _wrap_GT_IsCurve, METH_O, "GT_IsCurve(OGRwkbGeometryType arg1) -> int"},
39360 : { "GT_IsSurface", _wrap_GT_IsSurface, METH_O, "GT_IsSurface(OGRwkbGeometryType arg1) -> int"},
39361 : { "GT_IsNonLinear", _wrap_GT_IsNonLinear, METH_O, "GT_IsNonLinear(OGRwkbGeometryType arg1) -> int"},
39362 : { "GT_GetCollection", _wrap_GT_GetCollection, METH_O, "GT_GetCollection(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
39363 : { "GT_GetCurve", _wrap_GT_GetCurve, METH_O, "GT_GetCurve(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
39364 : { "GT_GetLinear", _wrap_GT_GetLinear, METH_O, "GT_GetLinear(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
39365 : { "SetNonLinearGeometriesEnabledFlag", _wrap_SetNonLinearGeometriesEnabledFlag, METH_O, "SetNonLinearGeometriesEnabledFlag(int bFlag)"},
39366 : { "GetNonLinearGeometriesEnabledFlag", _wrap_GetNonLinearGeometriesEnabledFlag, METH_NOARGS, "GetNonLinearGeometriesEnabledFlag() -> int"},
39367 : { "GetOpenDS", _wrap_GetOpenDS, METH_O, "GetOpenDS(int ds_number) -> OGRDataSourceShadow *"},
39368 : { "Open", (PyCFunction)(void(*)(void))_wrap_Open, METH_VARARGS|METH_KEYWORDS, "\n"
39369 : "Open(char const * utf8_path, int update=0) -> OGRDataSourceShadow *\n"
39370 : "\n"
39371 : "\n"
39372 : "Open a vector file as a :py:class:`gdal.Dataset`.\n"
39373 : "Equivalent to calling :py:func:`gdal.OpenEx` with the\n"
39374 : ":py:const:`gdal.OF_VECTOR` flag.\n"
39375 : "\n"
39376 : "Parameters\n"
39377 : "----------\n"
39378 : "utf8_path : str\n"
39379 : " name of the file to open\n"
39380 : "\n"
39381 : "Returns\n"
39382 : "-------\n"
39383 : "gdal.Dataset, or ``None`` on failure\n"
39384 : "\n"
39385 : "Examples\n"
39386 : "--------\n"
39387 : ">>> from osgeo import ogr\n"
39388 : ">>> ogr.GetDriverByName('ESRI Shapefile').GetDescription()\n"
39389 : "'ESRI Shapefile'\n"
39390 : ">>> ogr.GetDriverByName('GTiff')\n"
39391 : ">>>\n"
39392 : "\n"
39393 : ""},
39394 : { "OpenShared", (PyCFunction)(void(*)(void))_wrap_OpenShared, METH_VARARGS|METH_KEYWORDS, "\n"
39395 : "OpenShared(char const * utf8_path, int update=0) -> OGRDataSourceShadow *\n"
39396 : "\n"
39397 : "\n"
39398 : "Open a vector file as a :py:class:`gdal.Dataset`. If the file has already been\n"
39399 : "opened in the current thread, return a reference to the already-opened\n"
39400 : ":py:class:`gdal.Dataset`. Equivalent to calling :py:func:`gdal.OpenEx` with the\n"
39401 : ":py:const:`gdal.OF_VECTOR` and :py:const:`gdal.OF_SHARED` flags.\n"
39402 : "\n"
39403 : "Parameters\n"
39404 : "----------\n"
39405 : "utf8_path : str\n"
39406 : " name of the file to open\n"
39407 : "\n"
39408 : "Returns\n"
39409 : "-------\n"
39410 : "gdal.Dataset, or ``None`` on failure\n"
39411 : "\n"
39412 : "\n"
39413 : ""},
39414 : { "GetDriverByName", _wrap_GetDriverByName, METH_O, "\n"
39415 : "GetDriverByName(char const * name) -> OGRDriverShadow *\n"
39416 : "\n"
39417 : "\n"
39418 : "Get a vector driver. Like :py:func:`gdal.GetDriverByName`, but\n"
39419 : "only returns drivers that handle vector data.\n"
39420 : "\n"
39421 : "Parameters\n"
39422 : "----------\n"
39423 : "name : str\n"
39424 : " name of the driver to fetch\n"
39425 : "\n"
39426 : "Returns\n"
39427 : "-------\n"
39428 : "gdal.Driver\n"
39429 : "\n"
39430 : "Examples\n"
39431 : "--------\n"
39432 : ">>> ogr.GetDriverByName('ESRI Shapefile').GetDescription()\n"
39433 : "'ESRI Shapefile'\n"
39434 : "\n"
39435 : ">>> ogr.GetDriverByName('GTiff')\n"
39436 : ">>>\n"
39437 : "\n"
39438 : ""},
39439 : { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int driver_number) -> OGRDriverShadow *"},
39440 : { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
39441 : { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
39442 : { NULL, NULL, 0, NULL }
39443 : };
39444 :
39445 : static PyMethodDef SwigMethods_proxydocs[] = {
39446 : { NULL, NULL, 0, NULL }
39447 : };
39448 :
39449 :
39450 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
39451 :
39452 0 : static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
39453 0 : return (void *)((GDALMajorObjectShadow *) ((OGRLayerShadow *) x));
39454 : }
39455 : static swig_type_info _swigt__p_ArrowArray = {"_p_ArrowArray", "ArrowArray *", 0, 0, (void*)0, 0};
39456 : static swig_type_info _swigt__p_ArrowArrayStream = {"_p_ArrowArrayStream", "ArrowArrayStream *", 0, 0, (void*)0, 0};
39457 : static swig_type_info _swigt__p_ArrowSchema = {"_p_ArrowSchema", "ArrowSchema *", 0, 0, (void*)0, 0};
39458 : static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "GDALDatasetShadow *|OGRDataSourceShadow *", 0, 0, (void*)0, 0};
39459 : static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "GDALDriverShadow *|OGRDriverShadow *", 0, 0, (void*)0, 0};
39460 : static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
39461 : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
39462 : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
39463 : static swig_type_info _swigt__p_OGRCodedValue = {"_p_OGRCodedValue", "OGRCodedValue *", 0, 0, (void*)0, 0};
39464 : static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
39465 : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
39466 : static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
39467 : static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
39468 : static swig_type_info _swigt__p_OGRGeomCoordinatePrecisionShadow = {"_p_OGRGeomCoordinatePrecisionShadow", "OGRGeomCoordinatePrecisionShadow *", 0, 0, (void*)0, 0};
39469 : static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
39470 : static swig_type_info _swigt__p_OGRGeomTransformerShadow = {"_p_OGRGeomTransformerShadow", "OGRGeomTransformerShadow *", 0, 0, (void*)0, 0};
39471 : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
39472 : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
39473 : static swig_type_info _swigt__p_OGRPreparedGeometryShadow = {"_p_OGRPreparedGeometryShadow", "OGRPreparedGeometryShadow *", 0, 0, (void*)0, 0};
39474 : static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
39475 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
39476 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
39477 : static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
39478 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
39479 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
39480 : 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};
39481 : static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
39482 : 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};
39483 : static swig_type_info _swigt__p_p_GIntBig = {"_p_p_GIntBig", "GIntBig **", 0, 0, (void*)0, 0};
39484 : static swig_type_info _swigt__p_p_OGRGeometryTypeCounter = {"_p_p_OGRGeometryTypeCounter", "OGRGeometryTypeCounter **", 0, 0, (void*)0, 0};
39485 : static swig_type_info _swigt__p_p_OGRSpatialReferenceH = {"_p_p_OGRSpatialReferenceH", "OGRSpatialReferenceH **", 0, 0, (void*)0, 0};
39486 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
39487 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
39488 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
39489 : static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
39490 :
39491 : static swig_type_info *swig_type_initial[] = {
39492 : &_swigt__p_ArrowArray,
39493 : &_swigt__p_ArrowArrayStream,
39494 : &_swigt__p_ArrowSchema,
39495 : &_swigt__p_GDALDatasetShadow,
39496 : &_swigt__p_GDALDriverShadow,
39497 : &_swigt__p_GDALMajorObjectShadow,
39498 : &_swigt__p_GDALProgressFunc,
39499 : &_swigt__p_GIntBig,
39500 : &_swigt__p_OGRCodedValue,
39501 : &_swigt__p_OGRFeatureDefnShadow,
39502 : &_swigt__p_OGRFeatureShadow,
39503 : &_swigt__p_OGRFieldDefnShadow,
39504 : &_swigt__p_OGRFieldDomainShadow,
39505 : &_swigt__p_OGRGeomCoordinatePrecisionShadow,
39506 : &_swigt__p_OGRGeomFieldDefnShadow,
39507 : &_swigt__p_OGRGeomTransformerShadow,
39508 : &_swigt__p_OGRGeometryShadow,
39509 : &_swigt__p_OGRLayerShadow,
39510 : &_swigt__p_OGRPreparedGeometryShadow,
39511 : &_swigt__p_OGRStyleTableShadow,
39512 : &_swigt__p_OSRCoordinateTransformationShadow,
39513 : &_swigt__p_OSRSpatialReferenceShadow,
39514 : &_swigt__p_bool,
39515 : &_swigt__p_char,
39516 : &_swigt__p_double,
39517 : &_swigt__p_f_double_p_q_const__char_p_void__int,
39518 : &_swigt__p_float,
39519 : &_swigt__p_int,
39520 : &_swigt__p_p_GIntBig,
39521 : &_swigt__p_p_OGRGeometryTypeCounter,
39522 : &_swigt__p_p_OGRSpatialReferenceH,
39523 : &_swigt__p_p_char,
39524 : &_swigt__p_p_double,
39525 : &_swigt__p_p_int,
39526 : &_swigt__p_size_t,
39527 : };
39528 :
39529 : static swig_cast_info _swigc__p_ArrowArray[] = { {&_swigt__p_ArrowArray, 0, 0, 0},{0, 0, 0, 0}};
39530 : static swig_cast_info _swigc__p_ArrowArrayStream[] = { {&_swigt__p_ArrowArrayStream, 0, 0, 0},{0, 0, 0, 0}};
39531 : static swig_cast_info _swigc__p_ArrowSchema[] = { {&_swigt__p_ArrowSchema, 0, 0, 0},{0, 0, 0, 0}};
39532 : static swig_cast_info _swigc__p_GDALDatasetShadow[] = { {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
39533 : static swig_cast_info _swigc__p_GDALDriverShadow[] = { {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
39534 : 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}};
39535 : static swig_cast_info _swigc__p_GDALProgressFunc[] = { {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
39536 : static swig_cast_info _swigc__p_GIntBig[] = { {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
39537 : static swig_cast_info _swigc__p_OGRCodedValue[] = { {&_swigt__p_OGRCodedValue, 0, 0, 0},{0, 0, 0, 0}};
39538 : static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = { {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
39539 : static swig_cast_info _swigc__p_OGRFeatureShadow[] = { {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
39540 : static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = { {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
39541 : static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = { {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
39542 : static swig_cast_info _swigc__p_OGRGeomCoordinatePrecisionShadow[] = { {&_swigt__p_OGRGeomCoordinatePrecisionShadow, 0, 0, 0},{0, 0, 0, 0}};
39543 : static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = { {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
39544 : static swig_cast_info _swigc__p_OGRGeomTransformerShadow[] = { {&_swigt__p_OGRGeomTransformerShadow, 0, 0, 0},{0, 0, 0, 0}};
39545 : static swig_cast_info _swigc__p_OGRGeometryShadow[] = { {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
39546 : static swig_cast_info _swigc__p_OGRLayerShadow[] = { {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
39547 : static swig_cast_info _swigc__p_OGRPreparedGeometryShadow[] = { {&_swigt__p_OGRPreparedGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
39548 : static swig_cast_info _swigc__p_OGRStyleTableShadow[] = { {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
39549 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
39550 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
39551 : static swig_cast_info _swigc__p_bool[] = { {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
39552 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
39553 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
39554 : 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}};
39555 : static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
39556 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
39557 : static swig_cast_info _swigc__p_p_GIntBig[] = { {&_swigt__p_p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
39558 : static swig_cast_info _swigc__p_p_OGRGeometryTypeCounter[] = { {&_swigt__p_p_OGRGeometryTypeCounter, 0, 0, 0},{0, 0, 0, 0}};
39559 : static swig_cast_info _swigc__p_p_OGRSpatialReferenceH[] = { {&_swigt__p_p_OGRSpatialReferenceH, 0, 0, 0},{0, 0, 0, 0}};
39560 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
39561 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
39562 : static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
39563 : static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
39564 :
39565 : static swig_cast_info *swig_cast_initial[] = {
39566 : _swigc__p_ArrowArray,
39567 : _swigc__p_ArrowArrayStream,
39568 : _swigc__p_ArrowSchema,
39569 : _swigc__p_GDALDatasetShadow,
39570 : _swigc__p_GDALDriverShadow,
39571 : _swigc__p_GDALMajorObjectShadow,
39572 : _swigc__p_GDALProgressFunc,
39573 : _swigc__p_GIntBig,
39574 : _swigc__p_OGRCodedValue,
39575 : _swigc__p_OGRFeatureDefnShadow,
39576 : _swigc__p_OGRFeatureShadow,
39577 : _swigc__p_OGRFieldDefnShadow,
39578 : _swigc__p_OGRFieldDomainShadow,
39579 : _swigc__p_OGRGeomCoordinatePrecisionShadow,
39580 : _swigc__p_OGRGeomFieldDefnShadow,
39581 : _swigc__p_OGRGeomTransformerShadow,
39582 : _swigc__p_OGRGeometryShadow,
39583 : _swigc__p_OGRLayerShadow,
39584 : _swigc__p_OGRPreparedGeometryShadow,
39585 : _swigc__p_OGRStyleTableShadow,
39586 : _swigc__p_OSRCoordinateTransformationShadow,
39587 : _swigc__p_OSRSpatialReferenceShadow,
39588 : _swigc__p_bool,
39589 : _swigc__p_char,
39590 : _swigc__p_double,
39591 : _swigc__p_f_double_p_q_const__char_p_void__int,
39592 : _swigc__p_float,
39593 : _swigc__p_int,
39594 : _swigc__p_p_GIntBig,
39595 : _swigc__p_p_OGRGeometryTypeCounter,
39596 : _swigc__p_p_OGRSpatialReferenceH,
39597 : _swigc__p_p_char,
39598 : _swigc__p_p_double,
39599 : _swigc__p_p_int,
39600 : _swigc__p_size_t,
39601 : };
39602 :
39603 :
39604 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
39605 :
39606 : static swig_const_info swig_const_table[] = {
39607 : { SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
39608 : {0, 0, 0, 0.0, 0, 0}};
39609 :
39610 : #ifdef __cplusplus
39611 : }
39612 : #endif
39613 : /* -----------------------------------------------------------------------------
39614 : * Type initialization:
39615 : * This problem is tough by the requirement that no dynamic
39616 : * memory is used. Also, since swig_type_info structures store pointers to
39617 : * swig_cast_info structures and swig_cast_info structures store pointers back
39618 : * to swig_type_info structures, we need some lookup code at initialization.
39619 : * The idea is that swig generates all the structures that are needed.
39620 : * The runtime then collects these partially filled structures.
39621 : * The SWIG_InitializeModule function takes these initial arrays out of
39622 : * swig_module, and does all the lookup, filling in the swig_module.types
39623 : * array with the correct data and linking the correct swig_cast_info
39624 : * structures together.
39625 : *
39626 : * The generated swig_type_info structures are assigned statically to an initial
39627 : * array. We just loop through that array, and handle each type individually.
39628 : * First we lookup if this type has been already loaded, and if so, use the
39629 : * loaded structure instead of the generated one. Then we have to fill in the
39630 : * cast linked list. The cast data is initially stored in something like a
39631 : * two-dimensional array. Each row corresponds to a type (there are the same
39632 : * number of rows as there are in the swig_type_initial array). Each entry in
39633 : * a column is one of the swig_cast_info structures for that type.
39634 : * The cast_initial array is actually an array of arrays, because each row has
39635 : * a variable number of columns. So to actually build the cast linked list,
39636 : * we find the array of casts associated with the type, and loop through it
39637 : * adding the casts to the list. The one last trick we need to do is making
39638 : * sure the type pointer in the swig_cast_info struct is correct.
39639 : *
39640 : * First off, we lookup the cast->type name to see if it is already loaded.
39641 : * There are three cases to handle:
39642 : * 1) If the cast->type has already been loaded AND the type we are adding
39643 : * casting info to has not been loaded (it is in this module), THEN we
39644 : * replace the cast->type pointer with the type pointer that has already
39645 : * been loaded.
39646 : * 2) If BOTH types (the one we are adding casting info to, and the
39647 : * cast->type) are loaded, THEN the cast info has already been loaded by
39648 : * the previous module so we just ignore it.
39649 : * 3) Finally, if cast->type has not already been loaded, then we add that
39650 : * swig_cast_info to the linked list (because the cast->type) pointer will
39651 : * be correct.
39652 : * ----------------------------------------------------------------------------- */
39653 :
39654 : #ifdef __cplusplus
39655 : extern "C" {
39656 : #if 0
39657 : } /* c-mode */
39658 : #endif
39659 : #endif
39660 :
39661 : #if 0
39662 : #define SWIGRUNTIME_DEBUG
39663 : #endif
39664 :
39665 :
39666 : SWIGRUNTIME void
39667 : SWIG_InitializeModule(void *clientdata) {
39668 : size_t i;
39669 : swig_module_info *module_head, *iter;
39670 : int init;
39671 :
39672 : /* check to see if the circular list has been setup, if not, set it up */
39673 : if (swig_module.next==0) {
39674 : /* Initialize the swig_module */
39675 : swig_module.type_initial = swig_type_initial;
39676 : swig_module.cast_initial = swig_cast_initial;
39677 : swig_module.next = &swig_module;
39678 : init = 1;
39679 : } else {
39680 : init = 0;
39681 : }
39682 :
39683 : /* Try and load any already created modules */
39684 : module_head = SWIG_GetModule(clientdata);
39685 : if (!module_head) {
39686 : /* This is the first module loaded for this interpreter */
39687 : /* so set the swig module into the interpreter */
39688 : SWIG_SetModule(clientdata, &swig_module);
39689 : } else {
39690 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
39691 : iter=module_head;
39692 : do {
39693 : if (iter==&swig_module) {
39694 : /* Our module is already in the list, so there's nothing more to do. */
39695 : return;
39696 : }
39697 : iter=iter->next;
39698 : } while (iter!= module_head);
39699 :
39700 : /* otherwise we must add our module into the list */
39701 : swig_module.next = module_head->next;
39702 : module_head->next = &swig_module;
39703 : }
39704 :
39705 : /* When multiple interpreters are used, a module could have already been initialized in
39706 : a different interpreter, but not yet have a pointer in this interpreter.
39707 : In this case, we do not want to continue adding types... everything should be
39708 : set up already */
39709 : if (init == 0) return;
39710 :
39711 : /* Now work on filling in swig_module.types */
39712 : #ifdef SWIGRUNTIME_DEBUG
39713 : printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
39714 : #endif
39715 : for (i = 0; i < swig_module.size; ++i) {
39716 : swig_type_info *type = 0;
39717 : swig_type_info *ret;
39718 : swig_cast_info *cast;
39719 :
39720 : #ifdef SWIGRUNTIME_DEBUG
39721 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
39722 : #endif
39723 :
39724 : /* if there is another module already loaded */
39725 : if (swig_module.next != &swig_module) {
39726 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
39727 : }
39728 : if (type) {
39729 : /* Overwrite clientdata field */
39730 : #ifdef SWIGRUNTIME_DEBUG
39731 : printf("SWIG_InitializeModule: found type %s\n", type->name);
39732 : #endif
39733 : if (swig_module.type_initial[i]->clientdata) {
39734 : type->clientdata = swig_module.type_initial[i]->clientdata;
39735 : #ifdef SWIGRUNTIME_DEBUG
39736 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
39737 : #endif
39738 : }
39739 : } else {
39740 : type = swig_module.type_initial[i];
39741 : }
39742 :
39743 : /* Insert casting types */
39744 : cast = swig_module.cast_initial[i];
39745 : while (cast->type) {
39746 : /* Don't need to add information already in the list */
39747 : ret = 0;
39748 : #ifdef SWIGRUNTIME_DEBUG
39749 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
39750 : #endif
39751 : if (swig_module.next != &swig_module) {
39752 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
39753 : #ifdef SWIGRUNTIME_DEBUG
39754 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
39755 : #endif
39756 : }
39757 : if (ret) {
39758 : if (type == swig_module.type_initial[i]) {
39759 : #ifdef SWIGRUNTIME_DEBUG
39760 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
39761 : #endif
39762 : cast->type = ret;
39763 : ret = 0;
39764 : } else {
39765 : /* Check for casting already in the list */
39766 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
39767 : #ifdef SWIGRUNTIME_DEBUG
39768 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
39769 : #endif
39770 : if (!ocast) ret = 0;
39771 : }
39772 : }
39773 :
39774 : if (!ret) {
39775 : #ifdef SWIGRUNTIME_DEBUG
39776 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
39777 : #endif
39778 : if (type->cast) {
39779 : type->cast->prev = cast;
39780 : cast->next = type->cast;
39781 : }
39782 : type->cast = cast;
39783 : }
39784 : cast++;
39785 : }
39786 : /* Set entry in modules->types array equal to the type */
39787 : swig_module.types[i] = type;
39788 : }
39789 : swig_module.types[i] = 0;
39790 :
39791 : #ifdef SWIGRUNTIME_DEBUG
39792 : printf("**** SWIG_InitializeModule: Cast List ******\n");
39793 : for (i = 0; i < swig_module.size; ++i) {
39794 : int j = 0;
39795 : swig_cast_info *cast = swig_module.cast_initial[i];
39796 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
39797 : while (cast->type) {
39798 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
39799 : cast++;
39800 : ++j;
39801 : }
39802 : printf("---- Total casts: %d\n",j);
39803 : }
39804 : printf("**** SWIG_InitializeModule: Cast List ******\n");
39805 : #endif
39806 : }
39807 :
39808 : /* This function will propagate the clientdata field of type to
39809 : * any new swig_type_info structures that have been added into the list
39810 : * of equivalent types. It is like calling
39811 : * SWIG_TypeClientData(type, clientdata) a second time.
39812 : */
39813 : SWIGRUNTIME void
39814 : SWIG_PropagateClientData(void) {
39815 : size_t i;
39816 : swig_cast_info *equiv;
39817 : static int init_run = 0;
39818 :
39819 : if (init_run) return;
39820 : init_run = 1;
39821 :
39822 : for (i = 0; i < swig_module.size; i++) {
39823 : if (swig_module.types[i]->clientdata) {
39824 : equiv = swig_module.types[i]->cast;
39825 : while (equiv) {
39826 : if (!equiv->converter) {
39827 : if (equiv->type && !equiv->type->clientdata)
39828 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
39829 : }
39830 : equiv = equiv->next;
39831 : }
39832 : }
39833 : }
39834 : }
39835 :
39836 : #ifdef __cplusplus
39837 : #if 0
39838 : {
39839 : /* c-mode */
39840 : #endif
39841 : }
39842 : #endif
39843 :
39844 :
39845 :
39846 : #ifdef __cplusplus
39847 : extern "C" {
39848 : #endif
39849 :
39850 : /* Python-specific SWIG API */
39851 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
39852 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
39853 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
39854 :
39855 : /* -----------------------------------------------------------------------------
39856 : * global variable support code.
39857 : * ----------------------------------------------------------------------------- */
39858 :
39859 : typedef struct swig_globalvar {
39860 : char *name; /* Name of global variable */
39861 : PyObject *(*get_attr)(void); /* Return the current value */
39862 : int (*set_attr)(PyObject *); /* Set the value */
39863 : struct swig_globalvar *next;
39864 : } swig_globalvar;
39865 :
39866 : typedef struct swig_varlinkobject {
39867 : PyObject_HEAD
39868 : swig_globalvar *vars;
39869 : } swig_varlinkobject;
39870 :
39871 : SWIGINTERN PyObject *
39872 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
39873 : #if PY_VERSION_HEX >= 0x03000000
39874 : return PyUnicode_InternFromString("<Swig global variables>");
39875 : #else
39876 : return PyString_FromString("<Swig global variables>");
39877 : #endif
39878 : }
39879 :
39880 : SWIGINTERN PyObject *
39881 : swig_varlink_str(swig_varlinkobject *v) {
39882 : #if PY_VERSION_HEX >= 0x03000000
39883 : PyObject *str = PyUnicode_InternFromString("(");
39884 : PyObject *tail;
39885 : PyObject *joined;
39886 : swig_globalvar *var;
39887 : for (var = v->vars; var; var=var->next) {
39888 : tail = PyUnicode_FromString(var->name);
39889 : joined = PyUnicode_Concat(str, tail);
39890 : Py_DecRef(str);
39891 : Py_DecRef(tail);
39892 : str = joined;
39893 : if (var->next) {
39894 : tail = PyUnicode_InternFromString(", ");
39895 : joined = PyUnicode_Concat(str, tail);
39896 : Py_DecRef(str);
39897 : Py_DecRef(tail);
39898 : str = joined;
39899 : }
39900 : }
39901 : tail = PyUnicode_InternFromString(")");
39902 : joined = PyUnicode_Concat(str, tail);
39903 : Py_DecRef(str);
39904 : Py_DecRef(tail);
39905 : str = joined;
39906 : #else
39907 : PyObject *str = PyString_FromString("(");
39908 : swig_globalvar *var;
39909 : for (var = v->vars; var; var=var->next) {
39910 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
39911 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
39912 : }
39913 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
39914 : #endif
39915 : return str;
39916 : }
39917 :
39918 : SWIGINTERN void
39919 : swig_varlink_dealloc(swig_varlinkobject *v) {
39920 : swig_globalvar *var = v->vars;
39921 : while (var) {
39922 : swig_globalvar *n = var->next;
39923 : free(var->name);
39924 : free(var);
39925 : var = n;
39926 : }
39927 : }
39928 :
39929 : SWIGINTERN PyObject *
39930 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
39931 : PyObject *res = NULL;
39932 : swig_globalvar *var = v->vars;
39933 : while (var) {
39934 : if (strcmp(var->name,n) == 0) {
39935 : res = (*var->get_attr)();
39936 : break;
39937 : }
39938 : var = var->next;
39939 : }
39940 : if (res == NULL && !PyErr_Occurred()) {
39941 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
39942 : }
39943 : return res;
39944 : }
39945 :
39946 : SWIGINTERN int
39947 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
39948 : int res = 1;
39949 : swig_globalvar *var = v->vars;
39950 : while (var) {
39951 : if (strcmp(var->name,n) == 0) {
39952 : res = (*var->set_attr)(p);
39953 : break;
39954 : }
39955 : var = var->next;
39956 : }
39957 : if (res == 1 && !PyErr_Occurred()) {
39958 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
39959 : }
39960 : return res;
39961 : }
39962 :
39963 : SWIGINTERN PyTypeObject*
39964 : swig_varlink_type(void) {
39965 : static char varlink__doc__[] = "Swig var link object";
39966 : static PyTypeObject varlink_type;
39967 : static int type_init = 0;
39968 : if (!type_init) {
39969 : const PyTypeObject tmp = {
39970 : #if PY_VERSION_HEX >= 0x03000000
39971 : PyVarObject_HEAD_INIT(NULL, 0)
39972 : #else
39973 : PyObject_HEAD_INIT(NULL)
39974 : 0, /* ob_size */
39975 : #endif
39976 : "swigvarlink", /* tp_name */
39977 : sizeof(swig_varlinkobject), /* tp_basicsize */
39978 : 0, /* tp_itemsize */
39979 : (destructor) swig_varlink_dealloc, /* tp_dealloc */
39980 : 0, /* tp_print */
39981 : (getattrfunc) swig_varlink_getattr, /* tp_getattr */
39982 : (setattrfunc) swig_varlink_setattr, /* tp_setattr */
39983 : 0, /* tp_compare */
39984 : (reprfunc) swig_varlink_repr, /* tp_repr */
39985 : 0, /* tp_as_number */
39986 : 0, /* tp_as_sequence */
39987 : 0, /* tp_as_mapping */
39988 : 0, /* tp_hash */
39989 : 0, /* tp_call */
39990 : (reprfunc) swig_varlink_str, /* tp_str */
39991 : 0, /* tp_getattro */
39992 : 0, /* tp_setattro */
39993 : 0, /* tp_as_buffer */
39994 : 0, /* tp_flags */
39995 : varlink__doc__, /* tp_doc */
39996 : 0, /* tp_traverse */
39997 : 0, /* tp_clear */
39998 : 0, /* tp_richcompare */
39999 : 0, /* tp_weaklistoffset */
40000 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
40001 : 0, /* tp_del */
40002 : 0, /* tp_version_tag */
40003 : #if PY_VERSION_HEX >= 0x03040000
40004 : 0, /* tp_finalize */
40005 : #endif
40006 : #ifdef COUNT_ALLOCS
40007 : 0, /* tp_allocs */
40008 : 0, /* tp_frees */
40009 : 0, /* tp_maxalloc */
40010 : 0, /* tp_prev */
40011 : 0 /* tp_next */
40012 : #endif
40013 : };
40014 : varlink_type = tmp;
40015 : type_init = 1;
40016 : if (PyType_Ready(&varlink_type) < 0)
40017 : return NULL;
40018 : }
40019 : return &varlink_type;
40020 : }
40021 :
40022 : /* Create a variable linking object for use later */
40023 : SWIGINTERN PyObject *
40024 : SWIG_Python_newvarlink(void) {
40025 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
40026 : if (result) {
40027 : result->vars = 0;
40028 : }
40029 : return ((PyObject*) result);
40030 : }
40031 :
40032 : SWIGINTERN void
40033 : SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
40034 : swig_varlinkobject *v = (swig_varlinkobject *) p;
40035 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
40036 : if (gv) {
40037 : size_t size = strlen(name)+1;
40038 : gv->name = (char *)malloc(size);
40039 : if (gv->name) {
40040 : memcpy(gv->name, name, size);
40041 : gv->get_attr = get_attr;
40042 : gv->set_attr = set_attr;
40043 : gv->next = v->vars;
40044 : }
40045 : }
40046 : v->vars = gv;
40047 : }
40048 :
40049 : SWIGINTERN PyObject *
40050 : SWIG_globals(void) {
40051 : static PyObject *globals = 0;
40052 : if (!globals) {
40053 : globals = SWIG_newvarlink();
40054 : }
40055 : return globals;
40056 : }
40057 :
40058 : /* -----------------------------------------------------------------------------
40059 : * constants/methods manipulation
40060 : * ----------------------------------------------------------------------------- */
40061 :
40062 : /* Install Constants */
40063 : SWIGINTERN void
40064 271 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
40065 271 : PyObject *obj = 0;
40066 271 : size_t i;
40067 542 : for (i = 0; constants[i].type; ++i) {
40068 271 : switch(constants[i].type) {
40069 271 : case SWIG_PY_POINTER:
40070 271 : obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
40071 271 : break;
40072 0 : case SWIG_PY_BINARY:
40073 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
40074 : break;
40075 : default:
40076 : obj = 0;
40077 : break;
40078 : }
40079 271 : if (obj) {
40080 271 : PyDict_SetItemString(d, constants[i].name, obj);
40081 271 : Py_DECREF(obj);
40082 : }
40083 : }
40084 271 : }
40085 :
40086 : /* -----------------------------------------------------------------------------*/
40087 : /* Fix SwigMethods to carry the callback ptrs when needed */
40088 : /* -----------------------------------------------------------------------------*/
40089 :
40090 : SWIGINTERN void
40091 271 : SWIG_Python_FixMethods(PyMethodDef *methods,
40092 : swig_const_info *const_table,
40093 : swig_type_info **types,
40094 : swig_type_info **types_initial) {
40095 271 : size_t i;
40096 117614 : for (i = 0; methods[i].ml_name; ++i) {
40097 117343 : const char *c = methods[i].ml_doc;
40098 117343 : if (!c) continue;
40099 110568 : c = strstr(c, "swig_ptr: ");
40100 110568 : if (c) {
40101 0 : int j;
40102 0 : swig_const_info *ci = 0;
40103 0 : const char *name = c + 10;
40104 0 : for (j = 0; const_table[j].type; ++j) {
40105 0 : if (strncmp(const_table[j].name, name,
40106 : strlen(const_table[j].name)) == 0) {
40107 : ci = &(const_table[j]);
40108 : break;
40109 : }
40110 : }
40111 0 : if (ci) {
40112 117343 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
40113 0 : if (ptr) {
40114 0 : size_t shift = (ci->ptype) - types;
40115 0 : swig_type_info *ty = types_initial[shift];
40116 0 : size_t ldoc = (c - methods[i].ml_doc);
40117 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
40118 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
40119 0 : if (ndoc) {
40120 0 : char *buff = ndoc;
40121 0 : memcpy(buff, methods[i].ml_doc, ldoc);
40122 0 : buff += ldoc;
40123 0 : memcpy(buff, "swig_ptr: ", 10);
40124 0 : buff += 10;
40125 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
40126 0 : methods[i].ml_doc = ndoc;
40127 : }
40128 : }
40129 : }
40130 : }
40131 : }
40132 271 : }
40133 :
40134 : /* -----------------------------------------------------------------------------
40135 : * Method creation and docstring support functions
40136 : * ----------------------------------------------------------------------------- */
40137 :
40138 : /* -----------------------------------------------------------------------------
40139 : * Function to find the method definition with the correct docstring for the
40140 : * proxy module as opposed to the low-level API
40141 : * ----------------------------------------------------------------------------- */
40142 :
40143 0 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
40144 : /* Find the function in the modified method table */
40145 0 : size_t offset = 0;
40146 0 : int found = 0;
40147 0 : while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
40148 0 : if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
40149 : found = 1;
40150 : break;
40151 : }
40152 0 : offset++;
40153 : }
40154 : /* Use the copy with the modified docstring if available */
40155 0 : return found ? &SwigMethods_proxydocs[offset] : NULL;
40156 : }
40157 :
40158 : /* -----------------------------------------------------------------------------
40159 : * Wrapper of PyInstanceMethod_New() used in Python 3
40160 : * It is exported to the generated module, used for -fastproxy
40161 : * ----------------------------------------------------------------------------- */
40162 :
40163 0 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
40164 0 : if (PyCFunction_Check(func)) {
40165 0 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
40166 0 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
40167 0 : if (ml)
40168 0 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
40169 : }
40170 : #if PY_VERSION_HEX >= 0x03000000
40171 0 : return PyInstanceMethod_New(func);
40172 : #else
40173 : return PyMethod_New(func, NULL, NULL);
40174 : #endif
40175 : }
40176 :
40177 : /* -----------------------------------------------------------------------------
40178 : * Wrapper of PyStaticMethod_New()
40179 : * It is exported to the generated module, used for -fastproxy
40180 : * ----------------------------------------------------------------------------- */
40181 :
40182 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
40183 : if (PyCFunction_Check(func)) {
40184 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
40185 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
40186 : if (ml)
40187 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
40188 : }
40189 : return PyStaticMethod_New(func);
40190 : }
40191 :
40192 : #ifdef __cplusplus
40193 : }
40194 : #endif
40195 :
40196 : /* -----------------------------------------------------------------------------*
40197 : * Partial Init method
40198 : * -----------------------------------------------------------------------------*/
40199 :
40200 : #ifdef __cplusplus
40201 : extern "C"
40202 : #endif
40203 :
40204 : SWIGEXPORT
40205 : #if PY_VERSION_HEX >= 0x03000000
40206 : PyObject*
40207 : #else
40208 : void
40209 : #endif
40210 271 : SWIG_init(void) {
40211 271 : PyObject *m, *d, *md, *globals;
40212 :
40213 : #if PY_VERSION_HEX >= 0x03000000
40214 271 : static struct PyModuleDef SWIG_module = {
40215 : PyModuleDef_HEAD_INIT,
40216 : SWIG_name,
40217 : NULL,
40218 : -1,
40219 : SwigMethods,
40220 : NULL,
40221 : NULL,
40222 : NULL,
40223 : NULL
40224 : };
40225 : #endif
40226 :
40227 : #if defined(SWIGPYTHON_BUILTIN)
40228 : static SwigPyClientData SwigPyObject_clientdata = {
40229 : 0, 0, 0, 0, 0, 0, 0
40230 : };
40231 : static PyGetSetDef this_getset_def = {
40232 : (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
40233 : };
40234 : static SwigPyGetSet thisown_getset_closure = {
40235 : SwigPyObject_own,
40236 : SwigPyObject_own
40237 : };
40238 : static PyGetSetDef thisown_getset_def = {
40239 : (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
40240 : };
40241 : PyTypeObject *builtin_pytype;
40242 : int builtin_base_count;
40243 : swig_type_info *builtin_basetype;
40244 : PyObject *tuple;
40245 : PyGetSetDescrObject *static_getset;
40246 : PyTypeObject *metatype;
40247 : PyTypeObject *swigpyobject;
40248 : SwigPyClientData *cd;
40249 : PyObject *public_interface, *public_symbol;
40250 : PyObject *this_descr;
40251 : PyObject *thisown_descr;
40252 : PyObject *self = 0;
40253 : int i;
40254 :
40255 : (void)builtin_pytype;
40256 : (void)builtin_base_count;
40257 : (void)builtin_basetype;
40258 : (void)tuple;
40259 : (void)static_getset;
40260 : (void)self;
40261 :
40262 : /* Metaclass is used to implement static member variables */
40263 : metatype = SwigPyObjectType();
40264 : assert(metatype);
40265 : #endif
40266 :
40267 271 : (void)globals;
40268 :
40269 : /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
40270 271 : SWIG_This();
40271 271 : SWIG_Python_TypeCache();
40272 271 : SwigPyPacked_type();
40273 : #ifndef SWIGPYTHON_BUILTIN
40274 271 : SwigPyObject_type();
40275 : #endif
40276 :
40277 : /* Fix SwigMethods to carry the callback ptrs when needed */
40278 271 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
40279 :
40280 : #if PY_VERSION_HEX >= 0x03000000
40281 271 : m = PyModule_Create(&SWIG_module);
40282 : #else
40283 : m = Py_InitModule(SWIG_name, SwigMethods);
40284 : #endif
40285 :
40286 271 : md = d = PyModule_GetDict(m);
40287 271 : (void)md;
40288 :
40289 271 : SWIG_InitializeModule(0);
40290 :
40291 : #ifdef SWIGPYTHON_BUILTIN
40292 : swigpyobject = SwigPyObject_TypeOnce();
40293 :
40294 : SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
40295 : assert(SwigPyObject_stype);
40296 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
40297 : if (!cd) {
40298 : SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
40299 : SwigPyObject_clientdata.pytype = swigpyobject;
40300 : } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
40301 : PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
40302 : # if PY_VERSION_HEX >= 0x03000000
40303 : return NULL;
40304 : # else
40305 : return;
40306 : # endif
40307 : }
40308 :
40309 : /* All objects have a 'this' attribute */
40310 : this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
40311 : (void)this_descr;
40312 :
40313 : /* All objects have a 'thisown' attribute */
40314 : thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
40315 : (void)thisown_descr;
40316 :
40317 : public_interface = PyList_New(0);
40318 : public_symbol = 0;
40319 : (void)public_symbol;
40320 :
40321 : PyDict_SetItemString(md, "__all__", public_interface);
40322 : Py_DECREF(public_interface);
40323 : for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
40324 : SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
40325 : for (i = 0; swig_const_table[i].name != 0; ++i)
40326 : SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
40327 : #endif
40328 :
40329 271 : SWIG_InstallConstants(d,swig_const_table);
40330 :
40331 271 : SWIG_Python_SetConstant(d, "wkb25DBit",SWIG_From_int(static_cast< int >(0x80000000)));
40332 271 : SWIG_Python_SetConstant(d, "wkb25Bit",SWIG_From_int(static_cast< int >(0x80000000)));
40333 271 : SWIG_Python_SetConstant(d, "wkbUnknown",SWIG_From_int(static_cast< int >(0)));
40334 271 : SWIG_Python_SetConstant(d, "wkbPoint",SWIG_From_int(static_cast< int >(1)));
40335 271 : SWIG_Python_SetConstant(d, "wkbLineString",SWIG_From_int(static_cast< int >(2)));
40336 271 : SWIG_Python_SetConstant(d, "wkbPolygon",SWIG_From_int(static_cast< int >(3)));
40337 271 : SWIG_Python_SetConstant(d, "wkbMultiPoint",SWIG_From_int(static_cast< int >(4)));
40338 271 : SWIG_Python_SetConstant(d, "wkbMultiLineString",SWIG_From_int(static_cast< int >(5)));
40339 271 : SWIG_Python_SetConstant(d, "wkbMultiPolygon",SWIG_From_int(static_cast< int >(6)));
40340 271 : SWIG_Python_SetConstant(d, "wkbGeometryCollection",SWIG_From_int(static_cast< int >(7)));
40341 271 : SWIG_Python_SetConstant(d, "wkbCircularString",SWIG_From_int(static_cast< int >(8)));
40342 271 : SWIG_Python_SetConstant(d, "wkbCompoundCurve",SWIG_From_int(static_cast< int >(9)));
40343 271 : SWIG_Python_SetConstant(d, "wkbCurvePolygon",SWIG_From_int(static_cast< int >(10)));
40344 271 : SWIG_Python_SetConstant(d, "wkbMultiCurve",SWIG_From_int(static_cast< int >(11)));
40345 271 : SWIG_Python_SetConstant(d, "wkbMultiSurface",SWIG_From_int(static_cast< int >(12)));
40346 271 : SWIG_Python_SetConstant(d, "wkbCurve",SWIG_From_int(static_cast< int >(13)));
40347 271 : SWIG_Python_SetConstant(d, "wkbSurface",SWIG_From_int(static_cast< int >(14)));
40348 271 : SWIG_Python_SetConstant(d, "wkbPolyhedralSurface",SWIG_From_int(static_cast< int >(15)));
40349 271 : SWIG_Python_SetConstant(d, "wkbTIN",SWIG_From_int(static_cast< int >(16)));
40350 271 : SWIG_Python_SetConstant(d, "wkbTriangle",SWIG_From_int(static_cast< int >(17)));
40351 271 : SWIG_Python_SetConstant(d, "wkbNone",SWIG_From_int(static_cast< int >(100)));
40352 271 : SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
40353 271 : SWIG_Python_SetConstant(d, "wkbCircularStringZ",SWIG_From_int(static_cast< int >(1008)));
40354 271 : SWIG_Python_SetConstant(d, "wkbCompoundCurveZ",SWIG_From_int(static_cast< int >(1009)));
40355 271 : SWIG_Python_SetConstant(d, "wkbCurvePolygonZ",SWIG_From_int(static_cast< int >(1010)));
40356 271 : SWIG_Python_SetConstant(d, "wkbMultiCurveZ",SWIG_From_int(static_cast< int >(1011)));
40357 271 : SWIG_Python_SetConstant(d, "wkbMultiSurfaceZ",SWIG_From_int(static_cast< int >(1012)));
40358 271 : SWIG_Python_SetConstant(d, "wkbCurveZ",SWIG_From_int(static_cast< int >(1013)));
40359 271 : SWIG_Python_SetConstant(d, "wkbSurfaceZ",SWIG_From_int(static_cast< int >(1014)));
40360 271 : SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZ",SWIG_From_int(static_cast< int >(1015)));
40361 271 : SWIG_Python_SetConstant(d, "wkbTINZ",SWIG_From_int(static_cast< int >(1016)));
40362 271 : SWIG_Python_SetConstant(d, "wkbTriangleZ",SWIG_From_int(static_cast< int >(1017)));
40363 271 : SWIG_Python_SetConstant(d, "wkbPointM",SWIG_From_int(static_cast< int >(2001)));
40364 271 : SWIG_Python_SetConstant(d, "wkbLineStringM",SWIG_From_int(static_cast< int >(2002)));
40365 271 : SWIG_Python_SetConstant(d, "wkbPolygonM",SWIG_From_int(static_cast< int >(2003)));
40366 271 : SWIG_Python_SetConstant(d, "wkbMultiPointM",SWIG_From_int(static_cast< int >(2004)));
40367 271 : SWIG_Python_SetConstant(d, "wkbMultiLineStringM",SWIG_From_int(static_cast< int >(2005)));
40368 271 : SWIG_Python_SetConstant(d, "wkbMultiPolygonM",SWIG_From_int(static_cast< int >(2006)));
40369 271 : SWIG_Python_SetConstant(d, "wkbGeometryCollectionM",SWIG_From_int(static_cast< int >(2007)));
40370 271 : SWIG_Python_SetConstant(d, "wkbCircularStringM",SWIG_From_int(static_cast< int >(2008)));
40371 271 : SWIG_Python_SetConstant(d, "wkbCompoundCurveM",SWIG_From_int(static_cast< int >(2009)));
40372 271 : SWIG_Python_SetConstant(d, "wkbCurvePolygonM",SWIG_From_int(static_cast< int >(2010)));
40373 271 : SWIG_Python_SetConstant(d, "wkbMultiCurveM",SWIG_From_int(static_cast< int >(2011)));
40374 271 : SWIG_Python_SetConstant(d, "wkbMultiSurfaceM",SWIG_From_int(static_cast< int >(2012)));
40375 271 : SWIG_Python_SetConstant(d, "wkbCurveM",SWIG_From_int(static_cast< int >(2013)));
40376 271 : SWIG_Python_SetConstant(d, "wkbSurfaceM",SWIG_From_int(static_cast< int >(2014)));
40377 271 : SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceM",SWIG_From_int(static_cast< int >(2015)));
40378 271 : SWIG_Python_SetConstant(d, "wkbTINM",SWIG_From_int(static_cast< int >(2016)));
40379 271 : SWIG_Python_SetConstant(d, "wkbTriangleM",SWIG_From_int(static_cast< int >(2017)));
40380 271 : SWIG_Python_SetConstant(d, "wkbPointZM",SWIG_From_int(static_cast< int >(3001)));
40381 271 : SWIG_Python_SetConstant(d, "wkbLineStringZM",SWIG_From_int(static_cast< int >(3002)));
40382 271 : SWIG_Python_SetConstant(d, "wkbPolygonZM",SWIG_From_int(static_cast< int >(3003)));
40383 271 : SWIG_Python_SetConstant(d, "wkbMultiPointZM",SWIG_From_int(static_cast< int >(3004)));
40384 271 : SWIG_Python_SetConstant(d, "wkbMultiLineStringZM",SWIG_From_int(static_cast< int >(3005)));
40385 271 : SWIG_Python_SetConstant(d, "wkbMultiPolygonZM",SWIG_From_int(static_cast< int >(3006)));
40386 271 : SWIG_Python_SetConstant(d, "wkbGeometryCollectionZM",SWIG_From_int(static_cast< int >(3007)));
40387 271 : SWIG_Python_SetConstant(d, "wkbCircularStringZM",SWIG_From_int(static_cast< int >(3008)));
40388 271 : SWIG_Python_SetConstant(d, "wkbCompoundCurveZM",SWIG_From_int(static_cast< int >(3009)));
40389 271 : SWIG_Python_SetConstant(d, "wkbCurvePolygonZM",SWIG_From_int(static_cast< int >(3010)));
40390 271 : SWIG_Python_SetConstant(d, "wkbMultiCurveZM",SWIG_From_int(static_cast< int >(3011)));
40391 271 : SWIG_Python_SetConstant(d, "wkbMultiSurfaceZM",SWIG_From_int(static_cast< int >(3012)));
40392 271 : SWIG_Python_SetConstant(d, "wkbCurveZM",SWIG_From_int(static_cast< int >(3013)));
40393 271 : SWIG_Python_SetConstant(d, "wkbSurfaceZM",SWIG_From_int(static_cast< int >(3014)));
40394 271 : SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZM",SWIG_From_int(static_cast< int >(3015)));
40395 271 : SWIG_Python_SetConstant(d, "wkbTINZM",SWIG_From_int(static_cast< int >(3016)));
40396 271 : SWIG_Python_SetConstant(d, "wkbTriangleZM",SWIG_From_int(static_cast< int >(3017)));
40397 271 : SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(0x80000001)));
40398 271 : SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(0x80000002)));
40399 271 : SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(0x80000003)));
40400 271 : SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(0x80000004)));
40401 271 : SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(0x80000005)));
40402 271 : SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(0x80000006)));
40403 271 : SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(0x80000007)));
40404 271 : SWIG_Python_SetConstant(d, "OFTInteger",SWIG_From_int(static_cast< int >(0)));
40405 271 : SWIG_Python_SetConstant(d, "OFTIntegerList",SWIG_From_int(static_cast< int >(1)));
40406 271 : SWIG_Python_SetConstant(d, "OFTReal",SWIG_From_int(static_cast< int >(2)));
40407 271 : SWIG_Python_SetConstant(d, "OFTRealList",SWIG_From_int(static_cast< int >(3)));
40408 271 : SWIG_Python_SetConstant(d, "OFTString",SWIG_From_int(static_cast< int >(4)));
40409 271 : SWIG_Python_SetConstant(d, "OFTStringList",SWIG_From_int(static_cast< int >(5)));
40410 271 : SWIG_Python_SetConstant(d, "OFTWideString",SWIG_From_int(static_cast< int >(6)));
40411 271 : SWIG_Python_SetConstant(d, "OFTWideStringList",SWIG_From_int(static_cast< int >(7)));
40412 271 : SWIG_Python_SetConstant(d, "OFTBinary",SWIG_From_int(static_cast< int >(8)));
40413 271 : SWIG_Python_SetConstant(d, "OFTDate",SWIG_From_int(static_cast< int >(9)));
40414 271 : SWIG_Python_SetConstant(d, "OFTTime",SWIG_From_int(static_cast< int >(10)));
40415 271 : SWIG_Python_SetConstant(d, "OFTDateTime",SWIG_From_int(static_cast< int >(11)));
40416 271 : SWIG_Python_SetConstant(d, "OFTInteger64",SWIG_From_int(static_cast< int >(12)));
40417 271 : SWIG_Python_SetConstant(d, "OFTInteger64List",SWIG_From_int(static_cast< int >(13)));
40418 271 : SWIG_Python_SetConstant(d, "OFSTNone",SWIG_From_int(static_cast< int >(0)));
40419 271 : SWIG_Python_SetConstant(d, "OFSTBoolean",SWIG_From_int(static_cast< int >(1)));
40420 271 : SWIG_Python_SetConstant(d, "OFSTInt16",SWIG_From_int(static_cast< int >(2)));
40421 271 : SWIG_Python_SetConstant(d, "OFSTFloat32",SWIG_From_int(static_cast< int >(3)));
40422 271 : SWIG_Python_SetConstant(d, "OFSTJSON",SWIG_From_int(static_cast< int >(4)));
40423 271 : SWIG_Python_SetConstant(d, "OFSTUUID",SWIG_From_int(static_cast< int >(5)));
40424 271 : SWIG_Python_SetConstant(d, "OJUndefined",SWIG_From_int(static_cast< int >(0)));
40425 271 : SWIG_Python_SetConstant(d, "OJLeft",SWIG_From_int(static_cast< int >(1)));
40426 271 : SWIG_Python_SetConstant(d, "OJRight",SWIG_From_int(static_cast< int >(2)));
40427 271 : SWIG_Python_SetConstant(d, "OFDT_CODED",SWIG_From_int(static_cast< int >(0)));
40428 271 : SWIG_Python_SetConstant(d, "OFDT_RANGE",SWIG_From_int(static_cast< int >(1)));
40429 271 : SWIG_Python_SetConstant(d, "OFDT_GLOB",SWIG_From_int(static_cast< int >(2)));
40430 271 : SWIG_Python_SetConstant(d, "OFDSP_DEFAULT_VALUE",SWIG_From_int(static_cast< int >(0)));
40431 271 : SWIG_Python_SetConstant(d, "OFDSP_DUPLICATE",SWIG_From_int(static_cast< int >(1)));
40432 271 : SWIG_Python_SetConstant(d, "OFDSP_GEOMETRY_RATIO",SWIG_From_int(static_cast< int >(2)));
40433 271 : SWIG_Python_SetConstant(d, "OFDMP_DEFAULT_VALUE",SWIG_From_int(static_cast< int >(0)));
40434 271 : SWIG_Python_SetConstant(d, "OFDMP_SUM",SWIG_From_int(static_cast< int >(1)));
40435 271 : SWIG_Python_SetConstant(d, "OFDMP_GEOMETRY_WEIGHTED",SWIG_From_int(static_cast< int >(2)));
40436 271 : SWIG_Python_SetConstant(d, "wkbXDR",SWIG_From_int(static_cast< int >(0)));
40437 271 : SWIG_Python_SetConstant(d, "wkbNDR",SWIG_From_int(static_cast< int >(1)));
40438 271 : SWIG_Python_SetConstant(d, "NullFID",SWIG_From_int(static_cast< int >(-1)));
40439 271 : SWIG_Python_SetConstant(d, "ALTER_NAME_FLAG",SWIG_From_int(static_cast< int >(1)));
40440 271 : SWIG_Python_SetConstant(d, "ALTER_TYPE_FLAG",SWIG_From_int(static_cast< int >(2)));
40441 271 : SWIG_Python_SetConstant(d, "ALTER_WIDTH_PRECISION_FLAG",SWIG_From_int(static_cast< int >(4)));
40442 271 : SWIG_Python_SetConstant(d, "ALTER_NULLABLE_FLAG",SWIG_From_int(static_cast< int >(8)));
40443 271 : SWIG_Python_SetConstant(d, "ALTER__FLAG",SWIG_From_int(static_cast< int >(8)));
40444 271 : SWIG_Python_SetConstant(d, "ALTER_DEFAULT_FLAG",SWIG_From_int(static_cast< int >(16)));
40445 271 : SWIG_Python_SetConstant(d, "ALTER_UNIQUE_FLAG",SWIG_From_int(static_cast< int >(32)));
40446 271 : SWIG_Python_SetConstant(d, "ALTER_DOMAIN_FLAG",SWIG_From_int(static_cast< int >(64)));
40447 271 : SWIG_Python_SetConstant(d, "ALTER_ALTERNATIVE_NAME_FLAG",SWIG_From_int(static_cast< int >(128)));
40448 271 : SWIG_Python_SetConstant(d, "ALTER_COMMENT_FLAG",SWIG_From_int(static_cast< int >(256)));
40449 271 : SWIG_Python_SetConstant(d, "ALTER_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4+8+16+32+64+128+256)));
40450 271 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_NAME_FLAG",SWIG_From_int(static_cast< int >(4096)));
40451 271 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_TYPE_FLAG",SWIG_From_int(static_cast< int >(8192)));
40452 271 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG",SWIG_From_int(static_cast< int >(16384)));
40453 271 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_SRS_FLAG",SWIG_From_int(static_cast< int >(32768)));
40454 271 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG",SWIG_From_int(static_cast< int >(65536)));
40455 271 : SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_ALL_FLAG",SWIG_From_int(static_cast< int >(4096+8192+16384+32768+65536)));
40456 271 : SWIG_Python_SetConstant(d, "F_VAL_NULL",SWIG_From_int(static_cast< int >(0x00000001)));
40457 271 : SWIG_Python_SetConstant(d, "F_VAL_GEOM_TYPE",SWIG_From_int(static_cast< int >(0x00000002)));
40458 271 : SWIG_Python_SetConstant(d, "F_VAL_WIDTH",SWIG_From_int(static_cast< int >(0x00000004)));
40459 271 : SWIG_Python_SetConstant(d, "F_VAL_ALLOW_NULL_WHEN_DEFAULT",SWIG_From_int(static_cast< int >(0x00000008)));
40460 271 : SWIG_Python_SetConstant(d, "F_VAL_ALL",SWIG_From_int(static_cast< int >(0xFFFFFFFF)));
40461 271 : SWIG_Python_SetConstant(d, "TZFLAG_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
40462 271 : SWIG_Python_SetConstant(d, "TZFLAG_LOCALTIME",SWIG_From_int(static_cast< int >(1)));
40463 271 : SWIG_Python_SetConstant(d, "TZFLAG_MIXED_TZ",SWIG_From_int(static_cast< int >(2)));
40464 271 : SWIG_Python_SetConstant(d, "TZFLAG_UTC",SWIG_From_int(static_cast< int >(100)));
40465 271 : SWIG_Python_SetConstant(d, "GGT_COUNT_NOT_NEEDED",SWIG_From_int(static_cast< int >(0x1)));
40466 271 : SWIG_Python_SetConstant(d, "GGT_STOP_IF_MIXED",SWIG_From_int(static_cast< int >(0x2)));
40467 271 : SWIG_Python_SetConstant(d, "GGT_GEOMCOLLECTIONZ_TINZ",SWIG_From_int(static_cast< int >(0x4)));
40468 271 : SWIG_Python_SetConstant(d, "OLCRandomRead",SWIG_FromCharPtr("RandomRead"));
40469 271 : SWIG_Python_SetConstant(d, "OLCSequentialWrite",SWIG_FromCharPtr("SequentialWrite"));
40470 271 : SWIG_Python_SetConstant(d, "OLCRandomWrite",SWIG_FromCharPtr("RandomWrite"));
40471 271 : SWIG_Python_SetConstant(d, "OLCFastSpatialFilter",SWIG_FromCharPtr("FastSpatialFilter"));
40472 271 : SWIG_Python_SetConstant(d, "OLCFastFeatureCount",SWIG_FromCharPtr("FastFeatureCount"));
40473 271 : SWIG_Python_SetConstant(d, "OLCFastGetExtent",SWIG_FromCharPtr("FastGetExtent"));
40474 271 : SWIG_Python_SetConstant(d, "OLCFastGetExtent3D",SWIG_FromCharPtr("FastGetExtent3D"));
40475 271 : SWIG_Python_SetConstant(d, "OLCCreateField",SWIG_FromCharPtr("CreateField"));
40476 271 : SWIG_Python_SetConstant(d, "OLCDeleteField",SWIG_FromCharPtr("DeleteField"));
40477 271 : SWIG_Python_SetConstant(d, "OLCReorderFields",SWIG_FromCharPtr("ReorderFields"));
40478 271 : SWIG_Python_SetConstant(d, "OLCAlterFieldDefn",SWIG_FromCharPtr("AlterFieldDefn"));
40479 271 : SWIG_Python_SetConstant(d, "OLCAlterGeomFieldDefn",SWIG_FromCharPtr("AlterGeomFieldDefn"));
40480 271 : SWIG_Python_SetConstant(d, "OLCTransactions",SWIG_FromCharPtr("Transactions"));
40481 271 : SWIG_Python_SetConstant(d, "OLCDeleteFeature",SWIG_FromCharPtr("DeleteFeature"));
40482 271 : SWIG_Python_SetConstant(d, "OLCUpsertFeature",SWIG_FromCharPtr("UpsertFeature"));
40483 271 : SWIG_Python_SetConstant(d, "OLCUpdateFeature",SWIG_FromCharPtr("UpdateFeature"));
40484 271 : SWIG_Python_SetConstant(d, "OLCFastSetNextByIndex",SWIG_FromCharPtr("FastSetNextByIndex"));
40485 271 : SWIG_Python_SetConstant(d, "OLCStringsAsUTF8",SWIG_FromCharPtr("StringsAsUTF8"));
40486 271 : SWIG_Python_SetConstant(d, "OLCIgnoreFields",SWIG_FromCharPtr("IgnoreFields"));
40487 271 : SWIG_Python_SetConstant(d, "OLCCreateGeomField",SWIG_FromCharPtr("CreateGeomField"));
40488 271 : SWIG_Python_SetConstant(d, "OLCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
40489 271 : SWIG_Python_SetConstant(d, "OLCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
40490 271 : SWIG_Python_SetConstant(d, "OLCZGeometries",SWIG_FromCharPtr("ZGeometries"));
40491 271 : SWIG_Python_SetConstant(d, "OLCRename",SWIG_FromCharPtr("Rename"));
40492 271 : SWIG_Python_SetConstant(d, "OLCFastGetArrowStream",SWIG_FromCharPtr("FastGetArrowStream"));
40493 271 : SWIG_Python_SetConstant(d, "OLCFastWriteArrowBatch",SWIG_FromCharPtr("FastWriteArrowBatch"));
40494 271 : SWIG_Python_SetConstant(d, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
40495 271 : SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
40496 271 : SWIG_Python_SetConstant(d, "ODsCCreateGeomFieldAfterCreateLayer",SWIG_FromCharPtr("CreateGeomFieldAfterCreateLayer"));
40497 271 : SWIG_Python_SetConstant(d, "ODsCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
40498 271 : SWIG_Python_SetConstant(d, "ODsCTransactions",SWIG_FromCharPtr("Transactions"));
40499 271 : SWIG_Python_SetConstant(d, "ODsCEmulatedTransactions",SWIG_FromCharPtr("EmulatedTransactions"));
40500 271 : SWIG_Python_SetConstant(d, "ODsCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
40501 271 : SWIG_Python_SetConstant(d, "ODsCZGeometries",SWIG_FromCharPtr("ZGeometries"));
40502 271 : SWIG_Python_SetConstant(d, "ODsCRandomLayerRead",SWIG_FromCharPtr("RandomLayerRead"));
40503 271 : SWIG_Python_SetConstant(d, "ODsCRandomLayerWrite",SWIG_FromCharPtr("RandomLayerWrite "));
40504 271 : SWIG_Python_SetConstant(d, "ODsCAddFieldDomain",SWIG_FromCharPtr("AddFieldDomain"));
40505 271 : SWIG_Python_SetConstant(d, "ODsCDeleteFieldDomain",SWIG_FromCharPtr("DeleteFieldDomain"));
40506 271 : SWIG_Python_SetConstant(d, "ODsCUpdateFieldDomain",SWIG_FromCharPtr("UpdateFieldDomain"));
40507 271 : SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
40508 271 : SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
40509 271 : SWIG_Python_SetConstant(d, "OLMD_FID64",SWIG_FromCharPtr("OLMD_FID64"));
40510 271 : SWIG_Python_SetConstant(d, "GEOS_PREC_NO_TOPO",SWIG_From_int(static_cast< int >(1)));
40511 271 : SWIG_Python_SetConstant(d, "GEOS_PREC_KEEP_COLLAPSED",SWIG_From_int(static_cast< int >(2)));
40512 271 : SWIG_Python_SetConstant(d, "OGRERR_NONE",SWIG_From_int(static_cast< int >(0)));
40513 271 : SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_DATA",SWIG_From_int(static_cast< int >(1)));
40514 271 : SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_MEMORY",SWIG_From_int(static_cast< int >(2)));
40515 271 : SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_GEOMETRY_TYPE",SWIG_From_int(static_cast< int >(3)));
40516 271 : SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_OPERATION",SWIG_From_int(static_cast< int >(4)));
40517 271 : SWIG_Python_SetConstant(d, "OGRERR_CORRUPT_DATA",SWIG_From_int(static_cast< int >(5)));
40518 271 : SWIG_Python_SetConstant(d, "OGRERR_FAILURE",SWIG_From_int(static_cast< int >(6)));
40519 271 : SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_SRS",SWIG_From_int(static_cast< int >(7)));
40520 271 : SWIG_Python_SetConstant(d, "OGRERR_INVALID_HANDLE",SWIG_From_int(static_cast< int >(8)));
40521 271 : SWIG_Python_SetConstant(d, "OGRERR_NON_EXISTING_FEATURE",SWIG_From_int(static_cast< int >(9)));
40522 :
40523 :
40524 271 : if ( OGRGetDriverCount() == 0 ) {
40525 0 : OGRRegisterAll();
40526 : }
40527 : // Will be turned on for GDAL 4.0
40528 : // UseExceptions();
40529 :
40530 :
40531 :
40532 :
40533 : /* Initialize threading */
40534 271 : SWIG_PYTHON_INITIALIZE_THREADS;
40535 : #if PY_VERSION_HEX >= 0x03000000
40536 271 : return m;
40537 : #else
40538 : return;
40539 : #endif
40540 : }
40541 :
|