1 : /* ----------------------------------------------------------------------------
2 : * This file was automatically generated by SWIG (http://www.swig.org).
3 : * Version 1.3.40
4 : *
5 : * This file is not intended to be easily readable and contains a number of
6 : * coding conventions designed to improve portability and efficiency. Do not make
7 : * changes to this file unless you know what you are doing--modify the SWIG
8 : * interface file instead.
9 : * ----------------------------------------------------------------------------- */
10 :
11 : #define SWIGPYTHON
12 : #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13 :
14 :
15 : #ifdef __cplusplus
16 : /* SwigValueWrapper is described in swig.swg */
17 : template<typename T> class SwigValueWrapper {
18 : struct SwigMovePointer {
19 : T *ptr;
20 : SwigMovePointer(T *p) : ptr(p) { }
21 : ~SwigMovePointer() { delete ptr; }
22 : SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
23 : } pointer;
24 : SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
25 : SwigValueWrapper(const SwigValueWrapper<T>& rhs);
26 : public:
27 : SwigValueWrapper() : pointer(0) { }
28 : SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
29 : operator T&() const { return *pointer.ptr; }
30 : T *operator&() { return pointer.ptr; }
31 : };
32 :
33 : template <typename T> T SwigValueInit() {
34 : return T();
35 : }
36 : #endif
37 :
38 : /* -----------------------------------------------------------------------------
39 : * This section contains generic SWIG labels for method/variable
40 : * declarations/attributes, and other compiler dependent labels.
41 : * ----------------------------------------------------------------------------- */
42 :
43 : /* template workaround for compilers that cannot correctly implement the C++ standard */
44 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
45 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
46 : # define SWIGTEMPLATEDISAMBIGUATOR template
47 : # elif defined(__HP_aCC)
48 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
49 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
50 : # define SWIGTEMPLATEDISAMBIGUATOR template
51 : # else
52 : # define SWIGTEMPLATEDISAMBIGUATOR
53 : # endif
54 : #endif
55 :
56 : /* inline attribute */
57 : #ifndef SWIGINLINE
58 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
59 : # define SWIGINLINE inline
60 : # else
61 : # define SWIGINLINE
62 : # endif
63 : #endif
64 :
65 : /* attribute recognised by some compilers to avoid 'unused' warnings */
66 : #ifndef SWIGUNUSED
67 : # if defined(__GNUC__)
68 : # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
69 : # define SWIGUNUSED __attribute__ ((__unused__))
70 : # else
71 : # define SWIGUNUSED
72 : # endif
73 : # elif defined(__ICC)
74 : # define SWIGUNUSED __attribute__ ((__unused__))
75 : # else
76 : # define SWIGUNUSED
77 : # endif
78 : #endif
79 :
80 : #ifndef SWIG_MSC_UNSUPPRESS_4505
81 : # if defined(_MSC_VER)
82 : # pragma warning(disable : 4505) /* unreferenced local function has been removed */
83 : # endif
84 : #endif
85 :
86 : #ifndef SWIGUNUSEDPARM
87 : # ifdef __cplusplus
88 : # define SWIGUNUSEDPARM(p)
89 : # else
90 : # define SWIGUNUSEDPARM(p) p SWIGUNUSED
91 : # endif
92 : #endif
93 :
94 : /* internal SWIG method */
95 : #ifndef SWIGINTERN
96 : # define SWIGINTERN static SWIGUNUSED
97 : #endif
98 :
99 : /* internal inline SWIG method */
100 : #ifndef SWIGINTERNINLINE
101 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
102 : #endif
103 :
104 : /* exporting methods */
105 : #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
106 : # ifndef GCC_HASCLASSVISIBILITY
107 : # define GCC_HASCLASSVISIBILITY
108 : # endif
109 : #endif
110 :
111 : #ifndef SWIGEXPORT
112 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113 : # if defined(STATIC_LINKED)
114 : # define SWIGEXPORT
115 : # else
116 : # define SWIGEXPORT __declspec(dllexport)
117 : # endif
118 : # else
119 : # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
120 : # define SWIGEXPORT __attribute__ ((visibility("default")))
121 : # else
122 : # define SWIGEXPORT
123 : # endif
124 : # endif
125 : #endif
126 :
127 : /* calling conventions for Windows */
128 : #ifndef SWIGSTDCALL
129 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
130 : # define SWIGSTDCALL __stdcall
131 : # else
132 : # define SWIGSTDCALL
133 : # endif
134 : #endif
135 :
136 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
137 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
138 : # define _CRT_SECURE_NO_DEPRECATE
139 : #endif
140 :
141 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
142 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
143 : # define _SCL_SECURE_NO_DEPRECATE
144 : #endif
145 :
146 :
147 :
148 : /* Python.h has to appear first */
149 : #include <Python.h>
150 :
151 : /* -----------------------------------------------------------------------------
152 : * swigrun.swg
153 : *
154 : * This file contains generic C API SWIG runtime support for pointer
155 : * type checking.
156 : * ----------------------------------------------------------------------------- */
157 :
158 : /* This should only be incremented when either the layout of swig_type_info changes,
159 : or for whatever reason, the runtime changes incompatibly */
160 : #define SWIG_RUNTIME_VERSION "4"
161 :
162 : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
163 : #ifdef SWIG_TYPE_TABLE
164 : # define SWIG_QUOTE_STRING(x) #x
165 : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
166 : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
167 : #else
168 : # define SWIG_TYPE_TABLE_NAME
169 : #endif
170 :
171 : /*
172 : You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
173 : creating a static or dynamic library from the SWIG runtime code.
174 : In 99.9% of the cases, SWIG just needs to declare them as 'static'.
175 :
176 : But only do this if strictly necessary, ie, if you have problems
177 : with your compiler or suchlike.
178 : */
179 :
180 : #ifndef SWIGRUNTIME
181 : # define SWIGRUNTIME SWIGINTERN
182 : #endif
183 :
184 : #ifndef SWIGRUNTIMEINLINE
185 : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
186 : #endif
187 :
188 : /* Generic buffer size */
189 : #ifndef SWIG_BUFFER_SIZE
190 : # define SWIG_BUFFER_SIZE 1024
191 : #endif
192 :
193 : /* Flags for pointer conversions */
194 : #define SWIG_POINTER_DISOWN 0x1
195 : #define SWIG_CAST_NEW_MEMORY 0x2
196 :
197 : /* Flags for new pointer objects */
198 : #define SWIG_POINTER_OWN 0x1
199 :
200 :
201 : /*
202 : Flags/methods for returning states.
203 :
204 : The SWIG conversion methods, as ConvertPtr, return and integer
205 : that tells if the conversion was successful or not. And if not,
206 : an error code can be returned (see swigerrors.swg for the codes).
207 :
208 : Use the following macros/flags to set or process the returning
209 : states.
210 :
211 : In old versions of SWIG, code such as the following was usually written:
212 :
213 : if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
214 : // success code
215 : } else {
216 : //fail code
217 : }
218 :
219 : Now you can be more explicit:
220 :
221 : int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
222 : if (SWIG_IsOK(res)) {
223 : // success code
224 : } else {
225 : // fail code
226 : }
227 :
228 : which is the same really, but now you can also do
229 :
230 : Type *ptr;
231 : int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
232 : if (SWIG_IsOK(res)) {
233 : // success code
234 : if (SWIG_IsNewObj(res) {
235 : ...
236 : delete *ptr;
237 : } else {
238 : ...
239 : }
240 : } else {
241 : // fail code
242 : }
243 :
244 : I.e., now SWIG_ConvertPtr can return new objects and you can
245 : identify the case and take care of the deallocation. Of course that
246 : also requires SWIG_ConvertPtr to return new result values, such as
247 :
248 : int SWIG_ConvertPtr(obj, ptr,...) {
249 : if (<obj is ok>) {
250 : if (<need new object>) {
251 : *ptr = <ptr to new allocated object>;
252 : return SWIG_NEWOBJ;
253 : } else {
254 : *ptr = <ptr to old object>;
255 : return SWIG_OLDOBJ;
256 : }
257 : } else {
258 : return SWIG_BADOBJ;
259 : }
260 : }
261 :
262 : Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
263 : more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
264 : SWIG errors code.
265 :
266 : Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
267 : allows to return the 'cast rank', for example, if you have this
268 :
269 : int food(double)
270 : int fooi(int);
271 :
272 : and you call
273 :
274 : food(1) // cast rank '1' (1 -> 1.0)
275 : fooi(1) // cast rank '0'
276 :
277 : just use the SWIG_AddCast()/SWIG_CheckState()
278 : */
279 :
280 : #define SWIG_OK (0)
281 : #define SWIG_ERROR (-1)
282 : #define SWIG_IsOK(r) (r >= 0)
283 : #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
284 :
285 : /* The CastRankLimit says how many bits are used for the cast rank */
286 : #define SWIG_CASTRANKLIMIT (1 << 8)
287 : /* The NewMask denotes the object was created (using new/malloc) */
288 : #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
289 : /* The TmpMask is for in/out typemaps that use temporal objects */
290 : #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
291 : /* Simple returning values */
292 : #define SWIG_BADOBJ (SWIG_ERROR)
293 : #define SWIG_OLDOBJ (SWIG_OK)
294 : #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
295 : #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
296 : /* Check, add and del mask methods */
297 : #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
298 : #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
299 : #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
300 : #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
301 : #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
302 : #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
303 :
304 : /* Cast-Rank Mode */
305 : #if defined(SWIG_CASTRANK_MODE)
306 : # ifndef SWIG_TypeRank
307 : # define SWIG_TypeRank unsigned long
308 : # endif
309 : # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
310 : # define SWIG_MAXCASTRANK (2)
311 : # endif
312 : # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
313 : # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
314 : SWIGINTERNINLINE int SWIG_AddCast(int r) {
315 : return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
316 : }
317 : SWIGINTERNINLINE int SWIG_CheckState(int r) {
318 : return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
319 : }
320 : #else /* no cast-rank mode */
321 : # define SWIG_AddCast
322 : # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
323 : #endif
324 :
325 :
326 : #include <string.h>
327 :
328 : #ifdef __cplusplus
329 : extern "C" {
330 : #endif
331 :
332 : typedef void *(*swig_converter_func)(void *, int *);
333 : typedef struct swig_type_info *(*swig_dycast_func)(void **);
334 :
335 : /* Structure to store information on one type */
336 : typedef struct swig_type_info {
337 : const char *name; /* mangled name of this type */
338 : const char *str; /* human readable name of this type */
339 : swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
340 : struct swig_cast_info *cast; /* linked list of types that can cast into this type */
341 : void *clientdata; /* language specific type data */
342 : int owndata; /* flag if the structure owns the clientdata */
343 : } swig_type_info;
344 :
345 : /* Structure to store a type and conversion function used for casting */
346 : typedef struct swig_cast_info {
347 : swig_type_info *type; /* pointer to type that is equivalent to this type */
348 : swig_converter_func converter; /* function to cast the void pointers */
349 : struct swig_cast_info *next; /* pointer to next cast in linked list */
350 : struct swig_cast_info *prev; /* pointer to the previous cast */
351 : } swig_cast_info;
352 :
353 : /* Structure used to store module information
354 : * Each module generates one structure like this, and the runtime collects
355 : * all of these structures and stores them in a circularly linked list.*/
356 : typedef struct swig_module_info {
357 : swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
358 : size_t size; /* Number of types in this module */
359 : struct swig_module_info *next; /* Pointer to next element in circularly linked list */
360 : swig_type_info **type_initial; /* Array of initially generated type structures */
361 : swig_cast_info **cast_initial; /* Array of initially generated casting structures */
362 : void *clientdata; /* Language specific module data */
363 : } swig_module_info;
364 :
365 : /*
366 : Compare two type names skipping the space characters, therefore
367 : "char*" == "char *" and "Class<int>" == "Class<int >", etc.
368 :
369 : Return 0 when the two name types are equivalent, as in
370 : strncmp, but skipping ' '.
371 : */
372 : SWIGRUNTIME int
373 : SWIG_TypeNameComp(const char *f1, const char *l1,
374 : const char *f2, const char *l2) {
375 0 : for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
376 0 : while ((*f1 == ' ') && (f1 != l1)) ++f1;
377 0 : while ((*f2 == ' ') && (f2 != l2)) ++f2;
378 0 : if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
379 : }
380 0 : return (int)((l1 - f1) - (l2 - f2));
381 : }
382 :
383 : /*
384 : Check type equivalence in a name list like <name1>|<name2>|...
385 : Return 0 if not equal, 1 if equal
386 : */
387 : SWIGRUNTIME int
388 : SWIG_TypeEquiv(const char *nb, const char *tb) {
389 0 : int equiv = 0;
390 0 : const char* te = tb + strlen(tb);
391 0 : const char* ne = nb;
392 0 : while (!equiv && *ne) {
393 0 : for (nb = ne; *ne; ++ne) {
394 0 : if (*ne == '|') break;
395 : }
396 0 : equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
397 0 : if (*ne) ++ne;
398 : }
399 0 : return equiv;
400 : }
401 :
402 : /*
403 : Check type equivalence in a name list like <name1>|<name2>|...
404 : Return 0 if equal, -1 if nb < tb, 1 if nb > tb
405 : */
406 : SWIGRUNTIME int
407 : SWIG_TypeCompare(const char *nb, const char *tb) {
408 : int equiv = 0;
409 : const char* te = tb + strlen(tb);
410 : const char* ne = nb;
411 : while (!equiv && *ne) {
412 : for (nb = ne; *ne; ++ne) {
413 : if (*ne == '|') break;
414 : }
415 : equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
416 : if (*ne) ++ne;
417 : }
418 : return equiv;
419 : }
420 :
421 :
422 : /*
423 : Check the typename
424 : */
425 : SWIGRUNTIME swig_cast_info *
426 21 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
427 21 : if (ty) {
428 21 : swig_cast_info *iter = ty->cast;
429 42 : while (iter) {
430 21 : if (strcmp(iter->type->name, c) == 0) {
431 21 : if (iter == ty->cast)
432 21 : return iter;
433 : /* Move iter to the top of the linked list */
434 0 : iter->prev->next = iter->next;
435 0 : if (iter->next)
436 0 : iter->next->prev = iter->prev;
437 0 : iter->next = ty->cast;
438 0 : iter->prev = 0;
439 0 : if (ty->cast) ty->cast->prev = iter;
440 0 : ty->cast = iter;
441 0 : return iter;
442 : }
443 0 : iter = iter->next;
444 : }
445 : }
446 0 : return 0;
447 : }
448 :
449 : /*
450 : Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
451 : */
452 : SWIGRUNTIME swig_cast_info *
453 : SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
454 : if (ty) {
455 : swig_cast_info *iter = ty->cast;
456 : while (iter) {
457 : if (iter->type == from) {
458 : if (iter == ty->cast)
459 : return iter;
460 : /* Move iter to the top of the linked list */
461 : iter->prev->next = iter->next;
462 : if (iter->next)
463 : iter->next->prev = iter->prev;
464 : iter->next = ty->cast;
465 : iter->prev = 0;
466 : if (ty->cast) ty->cast->prev = iter;
467 : ty->cast = iter;
468 : return iter;
469 : }
470 : iter = iter->next;
471 : }
472 : }
473 : return 0;
474 : }
475 :
476 : /*
477 : Cast a pointer up an inheritance hierarchy
478 : */
479 : SWIGRUNTIMEINLINE void *
480 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
481 0 : return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
482 : }
483 :
484 : /*
485 : Dynamic pointer casting. Down an inheritance hierarchy
486 : */
487 : SWIGRUNTIME swig_type_info *
488 : SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
489 : swig_type_info *lastty = ty;
490 : if (!ty || !ty->dcast) return ty;
491 : while (ty && (ty->dcast)) {
492 : ty = (*ty->dcast)(ptr);
493 : if (ty) lastty = ty;
494 : }
495 : return lastty;
496 : }
497 :
498 : /*
499 : Return the name associated with this type
500 : */
501 : SWIGRUNTIMEINLINE const char *
502 : SWIG_TypeName(const swig_type_info *ty) {
503 : return ty->name;
504 : }
505 :
506 : /*
507 : Return the pretty name associated with this type,
508 : that is an unmangled type name in a form presentable to the user.
509 : */
510 : SWIGRUNTIME const char *
511 : SWIG_TypePrettyName(const swig_type_info *type) {
512 : /* The "str" field contains the equivalent pretty names of the
513 : type, separated by vertical-bar characters. We choose
514 : to print the last name, as it is often (?) the most
515 : specific. */
516 0 : if (!type) return NULL;
517 0 : if (type->str != NULL) {
518 0 : const char *last_name = type->str;
519 : const char *s;
520 0 : for (s = type->str; *s; s++)
521 0 : if (*s == '|') last_name = s+1;
522 0 : return last_name;
523 : }
524 : else
525 0 : return type->name;
526 : }
527 :
528 : /*
529 : Set the clientdata field for a type
530 : */
531 : SWIGRUNTIME void
532 14 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
533 14 : swig_cast_info *cast = ti->cast;
534 : /* if (ti->clientdata == clientdata) return; */
535 14 : ti->clientdata = clientdata;
536 :
537 42 : while (cast) {
538 14 : if (!cast->converter) {
539 14 : swig_type_info *tc = cast->type;
540 14 : if (!tc->clientdata) {
541 0 : SWIG_TypeClientData(tc, clientdata);
542 : }
543 : }
544 14 : cast = cast->next;
545 : }
546 14 : }
547 : SWIGRUNTIME void
548 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
549 14 : SWIG_TypeClientData(ti, clientdata);
550 14 : ti->owndata = 1;
551 : }
552 :
553 : /*
554 : Search for a swig_type_info structure only by mangled name
555 : Search is a O(log #types)
556 :
557 : We start searching at module start, and finish searching when start == end.
558 : Note: if start == end at the beginning of the function, we go all the way around
559 : the circular list.
560 : */
561 : SWIGRUNTIME swig_type_info *
562 74 : SWIG_MangledTypeQueryModule(swig_module_info *start,
563 : swig_module_info *end,
564 : const char *name) {
565 74 : swig_module_info *iter = start;
566 74 : do {
567 118 : if (iter->size) {
568 118 : register size_t l = 0;
569 118 : register size_t r = iter->size - 1;
570 322 : do {
571 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
572 402 : register size_t i = (l + r) >> 1;
573 402 : const char *iname = iter->types[i]->name;
574 402 : if (iname) {
575 402 : register int compare = strcmp(name, iname);
576 402 : if (compare == 0) {
577 44 : return iter->types[i];
578 358 : } else if (compare < 0) {
579 206 : if (i) {
580 170 : r = i - 1;
581 : } else {
582 : break;
583 : }
584 152 : } else if (compare > 0) {
585 152 : l = i + 1;
586 : }
587 : } else {
588 : break; /* should never happen */
589 : }
590 : } while (l <= r);
591 : }
592 74 : iter = iter->next;
593 : } while (iter != end);
594 30 : return 0;
595 : }
596 :
597 : /*
598 : Search for a swig_type_info structure for either a mangled name or a human readable name.
599 : It first searches the mangled names of the types, which is a O(log #types)
600 : If a type is not found it then searches the human readable names, which is O(#types).
601 :
602 : We start searching at module start, and finish searching when start == end.
603 : Note: if start == end at the beginning of the function, we go all the way around
604 : the circular list.
605 : */
606 : SWIGRUNTIME swig_type_info *
607 2 : SWIG_TypeQueryModule(swig_module_info *start,
608 : swig_module_info *end,
609 : const char *name) {
610 : /* STEP 1: Search the name field using binary search */
611 2 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
612 2 : if (ret) {
613 2 : return ret;
614 : } else {
615 : /* STEP 2: If the type hasn't been found, do a complete search
616 : of the str field (the human readable name) */
617 0 : swig_module_info *iter = start;
618 0 : do {
619 0 : register size_t i = 0;
620 0 : for (; i < iter->size; ++i) {
621 0 : if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
622 0 : return iter->types[i];
623 : }
624 0 : iter = iter->next;
625 : } while (iter != end);
626 : }
627 :
628 : /* neither found a match */
629 0 : return 0;
630 : }
631 :
632 : /*
633 : Pack binary data into a string
634 : */
635 : SWIGRUNTIME char *
636 : SWIG_PackData(char *c, void *ptr, size_t sz) {
637 : static const char hex[17] = "0123456789abcdef";
638 0 : register const unsigned char *u = (unsigned char *) ptr;
639 0 : register const unsigned char *eu = u + sz;
640 0 : for (; u != eu; ++u) {
641 0 : register unsigned char uu = *u;
642 0 : *(c++) = hex[(uu & 0xf0) >> 4];
643 0 : *(c++) = hex[uu & 0xf];
644 : }
645 0 : return c;
646 : }
647 :
648 : /*
649 : Unpack binary data from a string
650 : */
651 : SWIGRUNTIME const char *
652 : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
653 : register unsigned char *u = (unsigned char *) ptr;
654 : register const unsigned char *eu = u + sz;
655 : for (; u != eu; ++u) {
656 : register char d = *(c++);
657 : register unsigned char uu;
658 : if ((d >= '0') && (d <= '9'))
659 : uu = ((d - '0') << 4);
660 : else if ((d >= 'a') && (d <= 'f'))
661 : uu = ((d - ('a'-10)) << 4);
662 : else
663 : return (char *) 0;
664 : d = *(c++);
665 : if ((d >= '0') && (d <= '9'))
666 : uu |= (d - '0');
667 : else if ((d >= 'a') && (d <= 'f'))
668 : uu |= (d - ('a'-10));
669 : else
670 : return (char *) 0;
671 : *u = uu;
672 : }
673 : return c;
674 : }
675 :
676 : /*
677 : Pack 'void *' into a string buffer.
678 : */
679 : SWIGRUNTIME char *
680 0 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
681 0 : char *r = buff;
682 0 : if ((2*sizeof(void *) + 2) > bsz) return 0;
683 0 : *(r++) = '_';
684 0 : r = SWIG_PackData(r,&ptr,sizeof(void *));
685 0 : if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
686 : strcpy(r,name);
687 0 : return buff;
688 : }
689 :
690 : SWIGRUNTIME const char *
691 : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
692 : if (*c != '_') {
693 : if (strcmp(c,"NULL") == 0) {
694 : *ptr = (void *) 0;
695 : return name;
696 : } else {
697 : return 0;
698 : }
699 : }
700 : return SWIG_UnpackData(++c,ptr,sizeof(void *));
701 : }
702 :
703 : SWIGRUNTIME char *
704 0 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
705 0 : char *r = buff;
706 0 : size_t lname = (name ? strlen(name) : 0);
707 0 : if ((2*sz + 2 + lname) > bsz) return 0;
708 0 : *(r++) = '_';
709 0 : r = SWIG_PackData(r,ptr,sz);
710 0 : if (lname) {
711 0 : strncpy(r,name,lname+1);
712 : } else {
713 0 : *r = 0;
714 : }
715 0 : return buff;
716 : }
717 :
718 : SWIGRUNTIME const char *
719 : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
720 : if (*c != '_') {
721 : if (strcmp(c,"NULL") == 0) {
722 : memset(ptr,0,sz);
723 : return name;
724 : } else {
725 : return 0;
726 : }
727 : }
728 : return SWIG_UnpackData(++c,ptr,sz);
729 : }
730 :
731 : #ifdef __cplusplus
732 : }
733 : #endif
734 :
735 : /* Errors in SWIG */
736 : #define SWIG_UnknownError -1
737 : #define SWIG_IOError -2
738 : #define SWIG_RuntimeError -3
739 : #define SWIG_IndexError -4
740 : #define SWIG_TypeError -5
741 : #define SWIG_DivisionByZero -6
742 : #define SWIG_OverflowError -7
743 : #define SWIG_SyntaxError -8
744 : #define SWIG_ValueError -9
745 : #define SWIG_SystemError -10
746 : #define SWIG_AttributeError -11
747 : #define SWIG_MemoryError -12
748 : #define SWIG_NullReferenceError -13
749 :
750 :
751 :
752 : /* Compatibility macros for Python 3 */
753 : #if PY_VERSION_HEX >= 0x03000000
754 :
755 : #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
756 : #define PyInt_Check(x) PyLong_Check(x)
757 : #define PyInt_AsLong(x) PyLong_AsLong(x)
758 : #define PyInt_FromLong(x) PyLong_FromLong(x)
759 : #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
760 :
761 : #endif
762 :
763 : #ifndef Py_TYPE
764 : # define Py_TYPE(op) ((op)->ob_type)
765 : #endif
766 :
767 : /* SWIG APIs for compatibility of both Python 2 & 3 */
768 :
769 : #if PY_VERSION_HEX >= 0x03000000
770 : # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
771 : #else
772 : # define SWIG_Python_str_FromFormat PyString_FromFormat
773 : #endif
774 :
775 :
776 : /* Warning: This function will allocate a new string in Python 3,
777 : * so please call SWIG_Python_str_DelForPy3(x) to free the space.
778 : */
779 : SWIGINTERN char*
780 : SWIG_Python_str_AsChar(PyObject *str)
781 : {
782 : #if PY_VERSION_HEX >= 0x03000000
783 : char *cstr;
784 : char *newstr;
785 : Py_ssize_t len;
786 : str = PyUnicode_AsUTF8String(str);
787 : PyBytes_AsStringAndSize(str, &cstr, &len);
788 : newstr = (char *) malloc(len+1);
789 : memcpy(newstr, cstr, len+1);
790 : Py_XDECREF(str);
791 : return newstr;
792 : #else
793 0 : return PyString_AsString(str);
794 : #endif
795 : }
796 :
797 : #if PY_VERSION_HEX >= 0x03000000
798 : # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
799 : #else
800 : # define SWIG_Python_str_DelForPy3(x)
801 : #endif
802 :
803 :
804 : SWIGINTERN PyObject*
805 : SWIG_Python_str_FromChar(const char *c)
806 : {
807 : #if PY_VERSION_HEX >= 0x03000000
808 : return PyUnicode_FromString(c);
809 : #else
810 2 : return PyString_FromString(c);
811 : #endif
812 : }
813 :
814 : /* Add PyOS_snprintf for old Pythons */
815 : #if PY_VERSION_HEX < 0x02020000
816 : # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
817 : # define PyOS_snprintf _snprintf
818 : # else
819 : # define PyOS_snprintf snprintf
820 : # endif
821 : #endif
822 :
823 : /* A crude PyString_FromFormat implementation for old Pythons */
824 : #if PY_VERSION_HEX < 0x02020000
825 :
826 : #ifndef SWIG_PYBUFFER_SIZE
827 : # define SWIG_PYBUFFER_SIZE 1024
828 : #endif
829 :
830 : static PyObject *
831 : PyString_FromFormat(const char *fmt, ...) {
832 : va_list ap;
833 : char buf[SWIG_PYBUFFER_SIZE * 2];
834 : int res;
835 : va_start(ap, fmt);
836 : res = vsnprintf(buf, sizeof(buf), fmt, ap);
837 : va_end(ap);
838 : return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
839 : }
840 : #endif
841 :
842 : /* Add PyObject_Del for old Pythons */
843 : #if PY_VERSION_HEX < 0x01060000
844 : # define PyObject_Del(op) PyMem_DEL((op))
845 : #endif
846 : #ifndef PyObject_DEL
847 : # define PyObject_DEL PyObject_Del
848 : #endif
849 :
850 : /* A crude PyExc_StopIteration exception for old Pythons */
851 : #if PY_VERSION_HEX < 0x02020000
852 : # ifndef PyExc_StopIteration
853 : # define PyExc_StopIteration PyExc_RuntimeError
854 : # endif
855 : # ifndef PyObject_GenericGetAttr
856 : # define PyObject_GenericGetAttr 0
857 : # endif
858 : #endif
859 :
860 : /* Py_NotImplemented is defined in 2.1 and up. */
861 : #if PY_VERSION_HEX < 0x02010000
862 : # ifndef Py_NotImplemented
863 : # define Py_NotImplemented PyExc_RuntimeError
864 : # endif
865 : #endif
866 :
867 : /* A crude PyString_AsStringAndSize implementation for old Pythons */
868 : #if PY_VERSION_HEX < 0x02010000
869 : # ifndef PyString_AsStringAndSize
870 : # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
871 : # endif
872 : #endif
873 :
874 : /* PySequence_Size for old Pythons */
875 : #if PY_VERSION_HEX < 0x02000000
876 : # ifndef PySequence_Size
877 : # define PySequence_Size PySequence_Length
878 : # endif
879 : #endif
880 :
881 : /* PyBool_FromLong for old Pythons */
882 : #if PY_VERSION_HEX < 0x02030000
883 : static
884 : PyObject *PyBool_FromLong(long ok)
885 : {
886 : PyObject *result = ok ? Py_True : Py_False;
887 : Py_INCREF(result);
888 : return result;
889 : }
890 : #endif
891 :
892 : /* Py_ssize_t for old Pythons */
893 : /* This code is as recommended by: */
894 : /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
895 : #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
896 : typedef int Py_ssize_t;
897 : # define PY_SSIZE_T_MAX INT_MAX
898 : # define PY_SSIZE_T_MIN INT_MIN
899 : #endif
900 :
901 : /* -----------------------------------------------------------------------------
902 : * error manipulation
903 : * ----------------------------------------------------------------------------- */
904 :
905 : SWIGRUNTIME PyObject*
906 1 : SWIG_Python_ErrorType(int code) {
907 1 : PyObject* type = 0;
908 1 : switch(code) {
909 : case SWIG_MemoryError:
910 0 : type = PyExc_MemoryError;
911 0 : break;
912 : case SWIG_IOError:
913 0 : type = PyExc_IOError;
914 0 : break;
915 : case SWIG_RuntimeError:
916 0 : type = PyExc_RuntimeError;
917 0 : break;
918 : case SWIG_IndexError:
919 0 : type = PyExc_IndexError;
920 0 : break;
921 : case SWIG_TypeError:
922 0 : type = PyExc_TypeError;
923 0 : break;
924 : case SWIG_DivisionByZero:
925 0 : type = PyExc_ZeroDivisionError;
926 0 : break;
927 : case SWIG_OverflowError:
928 0 : type = PyExc_OverflowError;
929 0 : break;
930 : case SWIG_SyntaxError:
931 0 : type = PyExc_SyntaxError;
932 0 : break;
933 : case SWIG_ValueError:
934 1 : type = PyExc_ValueError;
935 1 : break;
936 : case SWIG_SystemError:
937 0 : type = PyExc_SystemError;
938 0 : break;
939 : case SWIG_AttributeError:
940 0 : type = PyExc_AttributeError;
941 0 : break;
942 : default:
943 0 : type = PyExc_RuntimeError;
944 : }
945 1 : return type;
946 : }
947 :
948 :
949 : SWIGRUNTIME void
950 : SWIG_Python_AddErrorMsg(const char* mesg)
951 : {
952 : PyObject *type = 0;
953 : PyObject *value = 0;
954 : PyObject *traceback = 0;
955 :
956 : if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
957 : if (value) {
958 : char *tmp;
959 : PyObject *old_str = PyObject_Str(value);
960 : PyErr_Clear();
961 : Py_XINCREF(type);
962 :
963 : PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
964 : SWIG_Python_str_DelForPy3(tmp);
965 : Py_DECREF(old_str);
966 : Py_DECREF(value);
967 : } else {
968 : PyErr_SetString(PyExc_RuntimeError, mesg);
969 : }
970 : }
971 :
972 : #if defined(SWIG_PYTHON_NO_THREADS)
973 : # if defined(SWIG_PYTHON_THREADS)
974 : # undef SWIG_PYTHON_THREADS
975 : # endif
976 : #endif
977 : #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
978 : # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
979 : # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
980 : # define SWIG_PYTHON_USE_GIL
981 : # endif
982 : # endif
983 : # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
984 : # ifndef SWIG_PYTHON_INITIALIZE_THREADS
985 : # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
986 : # endif
987 : # ifdef __cplusplus /* C++ code */
988 : class SWIG_Python_Thread_Block {
989 : bool status;
990 : PyGILState_STATE state;
991 : public:
992 : void end() { if (status) { PyGILState_Release(state); status = false;} }
993 : SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
994 : ~SWIG_Python_Thread_Block() { end(); }
995 : };
996 : class SWIG_Python_Thread_Allow {
997 : bool status;
998 : PyThreadState *save;
999 : public:
1000 : void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1001 : SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1002 : ~SWIG_Python_Thread_Allow() { end(); }
1003 : };
1004 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1005 : # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1006 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1007 : # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1008 : # else /* C code */
1009 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1010 : # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1011 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1012 : # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1013 : # endif
1014 : # else /* Old thread way, not implemented, user must provide it */
1015 : # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1016 : # define SWIG_PYTHON_INITIALIZE_THREADS
1017 : # endif
1018 : # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1019 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1020 : # endif
1021 : # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1022 : # define SWIG_PYTHON_THREAD_END_BLOCK
1023 : # endif
1024 : # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1025 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1026 : # endif
1027 : # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1028 : # define SWIG_PYTHON_THREAD_END_ALLOW
1029 : # endif
1030 : # endif
1031 : #else /* No thread support */
1032 : # define SWIG_PYTHON_INITIALIZE_THREADS
1033 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1034 : # define SWIG_PYTHON_THREAD_END_BLOCK
1035 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1036 : # define SWIG_PYTHON_THREAD_END_ALLOW
1037 : #endif
1038 :
1039 : /* -----------------------------------------------------------------------------
1040 : * Python API portion that goes into the runtime
1041 : * ----------------------------------------------------------------------------- */
1042 :
1043 : #ifdef __cplusplus
1044 : extern "C" {
1045 : #if 0
1046 : } /* cc-mode */
1047 : #endif
1048 : #endif
1049 :
1050 : /* -----------------------------------------------------------------------------
1051 : * Constant declarations
1052 : * ----------------------------------------------------------------------------- */
1053 :
1054 : /* Constant Types */
1055 : #define SWIG_PY_POINTER 4
1056 : #define SWIG_PY_BINARY 5
1057 :
1058 : /* Constant information structure */
1059 : typedef struct swig_const_info {
1060 : int type;
1061 : char *name;
1062 : long lvalue;
1063 : double dvalue;
1064 : void *pvalue;
1065 : swig_type_info **ptype;
1066 : } swig_const_info;
1067 :
1068 :
1069 : /* -----------------------------------------------------------------------------
1070 : * Wrapper of PyInstanceMethod_New() used in Python 3
1071 : * It is exported to the generated module, used for -fastproxy
1072 : * ----------------------------------------------------------------------------- */
1073 0 : SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
1074 : {
1075 : #if PY_VERSION_HEX >= 0x03000000
1076 : return PyInstanceMethod_New(func);
1077 : #else
1078 0 : return NULL;
1079 : #endif
1080 : }
1081 :
1082 : #ifdef __cplusplus
1083 : #if 0
1084 : { /* cc-mode */
1085 : #endif
1086 : }
1087 : #endif
1088 :
1089 :
1090 : /* -----------------------------------------------------------------------------
1091 : * See the LICENSE file for information on copyright, usage and redistribution
1092 : * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1093 : *
1094 : * pyrun.swg
1095 : *
1096 : * This file contains the runtime support for Python modules
1097 : * and includes code for managing global variables and pointer
1098 : * type checking.
1099 : *
1100 : * ----------------------------------------------------------------------------- */
1101 :
1102 : /* Common SWIG API */
1103 :
1104 : /* for raw pointers */
1105 : #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1106 : #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1107 : #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1108 : #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags)
1109 : #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1110 : #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1111 : #define swig_owntype int
1112 :
1113 : /* for raw packed data */
1114 : #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1115 : #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1116 :
1117 : /* for class or struct pointers */
1118 : #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1119 : #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1120 :
1121 : /* for C or C++ function pointers */
1122 : #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1123 : #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0)
1124 :
1125 : /* for C++ member pointers, ie, member methods */
1126 : #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1127 : #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1128 :
1129 :
1130 : /* Runtime API */
1131 :
1132 : #if PY_VERSION_HEX >= 0x03020000
1133 : #define SWIG_PYTHON_USE_CAPSULE
1134 : #endif
1135 :
1136 : #define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
1137 : #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1138 : #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1139 :
1140 : #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1141 : #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1142 : #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1143 : #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1144 : #define SWIG_fail goto fail
1145 :
1146 :
1147 : /* Runtime API implementation */
1148 :
1149 : /* Error manipulation */
1150 :
1151 : SWIGINTERN void
1152 : SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1153 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1154 : PyErr_SetObject(errtype, obj);
1155 : Py_DECREF(obj);
1156 : SWIG_PYTHON_THREAD_END_BLOCK;
1157 : }
1158 :
1159 : SWIGINTERN void
1160 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1161 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1162 1 : PyErr_SetString(errtype, (char *) msg);
1163 : SWIG_PYTHON_THREAD_END_BLOCK;
1164 : }
1165 :
1166 : #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1167 :
1168 : /* Set a constant value */
1169 :
1170 : SWIGINTERN void
1171 120 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1172 120 : PyDict_SetItemString(d, (char*) name, obj);
1173 120 : Py_DECREF(obj);
1174 120 : }
1175 :
1176 : /* Append a value to the result obj */
1177 :
1178 : SWIGINTERN PyObject*
1179 18749 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1180 : #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1181 18749 : if (!result) {
1182 1168 : result = obj;
1183 17581 : } else if (result == Py_None) {
1184 17575 : Py_DECREF(result);
1185 17575 : result = obj;
1186 : } else {
1187 6 : if (!PyList_Check(result)) {
1188 1 : PyObject *o2 = result;
1189 1 : result = PyList_New(1);
1190 1 : PyList_SetItem(result, 0, o2);
1191 : }
1192 6 : PyList_Append(result,obj);
1193 6 : Py_DECREF(obj);
1194 : }
1195 18749 : return result;
1196 : #else
1197 : PyObject* o2;
1198 : PyObject* o3;
1199 : if (!result) {
1200 : result = obj;
1201 : } else if (result == Py_None) {
1202 : Py_DECREF(result);
1203 : result = obj;
1204 : } else {
1205 : if (!PyTuple_Check(result)) {
1206 : o2 = result;
1207 : result = PyTuple_New(1);
1208 : PyTuple_SET_ITEM(result, 0, o2);
1209 : }
1210 : o3 = PyTuple_New(1);
1211 : PyTuple_SET_ITEM(o3, 0, obj);
1212 : o2 = result;
1213 : result = PySequence_Concat(o2, o3);
1214 : Py_DECREF(o2);
1215 : Py_DECREF(o3);
1216 : }
1217 : return result;
1218 : #endif
1219 : }
1220 :
1221 : /* Unpack the argument tuple */
1222 :
1223 : SWIGINTERN int
1224 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1225 : {
1226 : if (!args) {
1227 : if (!min && !max) {
1228 : return 1;
1229 : } else {
1230 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1231 : name, (min == max ? "" : "at least "), (int)min);
1232 : return 0;
1233 : }
1234 : }
1235 : if (!PyTuple_Check(args)) {
1236 : PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1237 : return 0;
1238 : } else {
1239 : register Py_ssize_t l = PyTuple_GET_SIZE(args);
1240 : if (l < min) {
1241 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1242 : name, (min == max ? "" : "at least "), (int)min, (int)l);
1243 : return 0;
1244 : } else if (l > max) {
1245 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1246 : name, (min == max ? "" : "at most "), (int)max, (int)l);
1247 : return 0;
1248 : } else {
1249 : register int i;
1250 : for (i = 0; i < l; ++i) {
1251 : objs[i] = PyTuple_GET_ITEM(args, i);
1252 : }
1253 : for (; l < max; ++l) {
1254 : objs[l] = 0;
1255 : }
1256 : return i + 1;
1257 : }
1258 : }
1259 : }
1260 :
1261 : /* A functor is a function object with one single object argument */
1262 : #if PY_VERSION_HEX >= 0x02020000
1263 : #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1264 : #else
1265 : #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1266 : #endif
1267 :
1268 : /*
1269 : Helper for static pointer initialization for both C and C++ code, for example
1270 : static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1271 : */
1272 : #ifdef __cplusplus
1273 : #define SWIG_STATIC_POINTER(var) var
1274 : #else
1275 : #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1276 : #endif
1277 :
1278 : /* -----------------------------------------------------------------------------
1279 : * Pointer declarations
1280 : * ----------------------------------------------------------------------------- */
1281 :
1282 : /* Flags for new pointer objects */
1283 : #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1284 : #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1285 :
1286 : #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1287 :
1288 : #ifdef __cplusplus
1289 : extern "C" {
1290 : #if 0
1291 : } /* cc-mode */
1292 : #endif
1293 : #endif
1294 :
1295 : /* How to access Py_None */
1296 : #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1297 : # ifndef SWIG_PYTHON_NO_BUILD_NONE
1298 : # ifndef SWIG_PYTHON_BUILD_NONE
1299 : # define SWIG_PYTHON_BUILD_NONE
1300 : # endif
1301 : # endif
1302 : #endif
1303 :
1304 : #ifdef SWIG_PYTHON_BUILD_NONE
1305 : # ifdef Py_None
1306 : # undef Py_None
1307 : # define Py_None SWIG_Py_None()
1308 : # endif
1309 : SWIGRUNTIMEINLINE PyObject *
1310 : _SWIG_Py_None(void)
1311 : {
1312 : PyObject *none = Py_BuildValue((char*)"");
1313 : Py_DECREF(none);
1314 : return none;
1315 : }
1316 : SWIGRUNTIME PyObject *
1317 : SWIG_Py_None(void)
1318 : {
1319 : static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1320 : return none;
1321 : }
1322 : #endif
1323 :
1324 : /* The python void return value */
1325 :
1326 : SWIGRUNTIMEINLINE PyObject *
1327 : SWIG_Py_Void(void)
1328 : {
1329 222674 : PyObject *none = Py_None;
1330 222674 : Py_INCREF(none);
1331 222674 : return none;
1332 : }
1333 :
1334 : /* SwigPyClientData */
1335 :
1336 : typedef struct {
1337 : PyObject *klass;
1338 : PyObject *newraw;
1339 : PyObject *newargs;
1340 : PyObject *destroy;
1341 : int delargs;
1342 : int implicitconv;
1343 : } SwigPyClientData;
1344 :
1345 : SWIGRUNTIMEINLINE int
1346 : SWIG_Python_CheckImplicit(swig_type_info *ty)
1347 : {
1348 : SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1349 : return data ? data->implicitconv : 0;
1350 : }
1351 :
1352 : SWIGRUNTIMEINLINE PyObject *
1353 : SWIG_Python_ExceptionType(swig_type_info *desc) {
1354 : SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1355 : PyObject *klass = data ? data->klass : 0;
1356 : return (klass ? klass : PyExc_RuntimeError);
1357 : }
1358 :
1359 :
1360 : SWIGRUNTIME SwigPyClientData *
1361 14 : SwigPyClientData_New(PyObject* obj)
1362 : {
1363 14 : if (!obj) {
1364 0 : return 0;
1365 : } else {
1366 14 : SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1367 : /* the klass element */
1368 14 : data->klass = obj;
1369 14 : Py_INCREF(data->klass);
1370 : /* the newraw method and newargs arguments used to create a new raw instance */
1371 14 : if (PyClass_Check(obj)) {
1372 0 : data->newraw = 0;
1373 0 : data->newargs = obj;
1374 0 : Py_INCREF(obj);
1375 : } else {
1376 : #if (PY_VERSION_HEX < 0x02020000)
1377 : data->newraw = 0;
1378 : #else
1379 14 : data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1380 : #endif
1381 14 : if (data->newraw) {
1382 14 : Py_INCREF(data->newraw);
1383 14 : data->newargs = PyTuple_New(1);
1384 14 : PyTuple_SetItem(data->newargs, 0, obj);
1385 : } else {
1386 0 : data->newargs = obj;
1387 : }
1388 14 : Py_INCREF(data->newargs);
1389 : }
1390 : /* the destroy method, aka as the C++ delete method */
1391 14 : data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1392 14 : if (PyErr_Occurred()) {
1393 4 : PyErr_Clear();
1394 4 : data->destroy = 0;
1395 : }
1396 14 : if (data->destroy) {
1397 : int flags;
1398 10 : Py_INCREF(data->destroy);
1399 10 : flags = PyCFunction_GET_FLAGS(data->destroy);
1400 : #ifdef METH_O
1401 10 : data->delargs = !(flags & (METH_O));
1402 : #else
1403 : data->delargs = 0;
1404 : #endif
1405 : } else {
1406 4 : data->delargs = 0;
1407 : }
1408 14 : data->implicitconv = 0;
1409 14 : return data;
1410 : }
1411 : }
1412 :
1413 : SWIGRUNTIME void
1414 : SwigPyClientData_Del(SwigPyClientData* data)
1415 : {
1416 0 : Py_XDECREF(data->newraw);
1417 0 : Py_XDECREF(data->newargs);
1418 0 : Py_XDECREF(data->destroy);
1419 : }
1420 :
1421 : /* =============== SwigPyObject =====================*/
1422 :
1423 : typedef struct {
1424 : PyObject_HEAD
1425 : void *ptr;
1426 : swig_type_info *ty;
1427 : int own;
1428 : PyObject *next;
1429 : } SwigPyObject;
1430 :
1431 : SWIGRUNTIME PyObject *
1432 0 : SwigPyObject_long(SwigPyObject *v)
1433 : {
1434 0 : return PyLong_FromVoidPtr(v->ptr);
1435 : }
1436 :
1437 : SWIGRUNTIME PyObject *
1438 0 : SwigPyObject_format(const char* fmt, SwigPyObject *v)
1439 : {
1440 0 : PyObject *res = NULL;
1441 0 : PyObject *args = PyTuple_New(1);
1442 0 : if (args) {
1443 0 : if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1444 0 : PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1445 0 : if (ofmt) {
1446 : #if PY_VERSION_HEX >= 0x03000000
1447 : res = PyUnicode_Format(ofmt,args);
1448 : #else
1449 0 : res = PyString_Format(ofmt,args);
1450 : #endif
1451 0 : Py_DECREF(ofmt);
1452 : }
1453 0 : Py_DECREF(args);
1454 : }
1455 : }
1456 0 : return res;
1457 : }
1458 :
1459 : SWIGRUNTIME PyObject *
1460 0 : SwigPyObject_oct(SwigPyObject *v)
1461 : {
1462 0 : return SwigPyObject_format("%o",v);
1463 : }
1464 :
1465 : SWIGRUNTIME PyObject *
1466 0 : SwigPyObject_hex(SwigPyObject *v)
1467 : {
1468 0 : return SwigPyObject_format("%x",v);
1469 : }
1470 :
1471 : SWIGRUNTIME PyObject *
1472 : #ifdef METH_NOARGS
1473 0 : SwigPyObject_repr(SwigPyObject *v)
1474 : #else
1475 : SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1476 : #endif
1477 : {
1478 0 : const char *name = SWIG_TypePrettyName(v->ty);
1479 0 : PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
1480 0 : if (v->next) {
1481 : #ifdef METH_NOARGS
1482 0 : PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1483 : #else
1484 : PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1485 : #endif
1486 : #if PY_VERSION_HEX >= 0x03000000
1487 : PyObject *joined = PyUnicode_Concat(repr, nrep);
1488 : Py_DecRef(repr);
1489 : Py_DecRef(nrep);
1490 : repr = joined;
1491 : #else
1492 0 : PyString_ConcatAndDel(&repr,nrep);
1493 : #endif
1494 : }
1495 0 : return repr;
1496 : }
1497 :
1498 : SWIGRUNTIME int
1499 0 : SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1500 : {
1501 : char *str;
1502 : #ifdef METH_NOARGS
1503 0 : PyObject *repr = SwigPyObject_repr(v);
1504 : #else
1505 : PyObject *repr = SwigPyObject_repr(v, NULL);
1506 : #endif
1507 0 : if (repr) {
1508 0 : str = SWIG_Python_str_AsChar(repr);
1509 0 : fputs(str, fp);
1510 : SWIG_Python_str_DelForPy3(str);
1511 0 : Py_DECREF(repr);
1512 0 : return 0;
1513 : } else {
1514 0 : return 1;
1515 : }
1516 : }
1517 :
1518 : SWIGRUNTIME PyObject *
1519 0 : SwigPyObject_str(SwigPyObject *v)
1520 : {
1521 : char result[SWIG_BUFFER_SIZE];
1522 : return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1523 0 : SWIG_Python_str_FromChar(result) : 0;
1524 : }
1525 :
1526 : SWIGRUNTIME int
1527 0 : SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1528 : {
1529 0 : void *i = v->ptr;
1530 0 : void *j = w->ptr;
1531 0 : return (i < j) ? -1 : ((i > j) ? 1 : 0);
1532 : }
1533 :
1534 : /* Added for Python 3.x, would it also be useful for Python 2.x? */
1535 : SWIGRUNTIME PyObject*
1536 0 : SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1537 : {
1538 : PyObject* res;
1539 0 : if( op != Py_EQ && op != Py_NE ) {
1540 0 : Py_INCREF(Py_NotImplemented);
1541 0 : return Py_NotImplemented;
1542 : }
1543 0 : if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
1544 0 : res = Py_True;
1545 : else
1546 0 : res = Py_False;
1547 0 : Py_INCREF(res);
1548 0 : return res;
1549 : }
1550 :
1551 :
1552 : SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
1553 :
1554 : SWIGRUNTIME PyTypeObject*
1555 2194936 : SwigPyObject_type(void) {
1556 2194936 : static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1557 2194936 : return type;
1558 : }
1559 :
1560 : SWIGRUNTIMEINLINE int
1561 1421726 : SwigPyObject_Check(PyObject *op) {
1562 : return (Py_TYPE(op) == SwigPyObject_type())
1563 1421726 : || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1564 : }
1565 :
1566 : SWIGRUNTIME PyObject *
1567 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1568 :
1569 : SWIGRUNTIME void
1570 386605 : SwigPyObject_dealloc(PyObject *v)
1571 : {
1572 386605 : SwigPyObject *sobj = (SwigPyObject *) v;
1573 386605 : PyObject *next = sobj->next;
1574 386605 : if (sobj->own == SWIG_POINTER_OWN) {
1575 140152 : swig_type_info *ty = sobj->ty;
1576 140152 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1577 140152 : PyObject *destroy = data ? data->destroy : 0;
1578 140152 : if (destroy) {
1579 : /* destroy is always a VARARGS method */
1580 : PyObject *res;
1581 140152 : if (data->delargs) {
1582 : /* we need to create a temporary object to carry the destroy operation */
1583 140152 : PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1584 140152 : res = SWIG_Python_CallFunctor(destroy, tmp);
1585 140152 : Py_DECREF(tmp);
1586 : } else {
1587 0 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1588 0 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1589 0 : res = ((*meth)(mself, v));
1590 : }
1591 140152 : Py_XDECREF(res);
1592 : }
1593 : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1594 : else {
1595 0 : const char *name = SWIG_TypePrettyName(ty);
1596 0 : printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1597 : }
1598 : #endif
1599 : }
1600 386605 : Py_XDECREF(next);
1601 386605 : PyObject_DEL(v);
1602 386605 : }
1603 :
1604 : SWIGRUNTIME PyObject*
1605 0 : SwigPyObject_append(PyObject* v, PyObject* next)
1606 : {
1607 0 : SwigPyObject *sobj = (SwigPyObject *) v;
1608 : #ifndef METH_O
1609 : PyObject *tmp = 0;
1610 : if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1611 : next = tmp;
1612 : #endif
1613 0 : if (!SwigPyObject_Check(next)) {
1614 0 : return NULL;
1615 : }
1616 0 : sobj->next = next;
1617 0 : Py_INCREF(next);
1618 0 : return SWIG_Py_Void();
1619 : }
1620 :
1621 : SWIGRUNTIME PyObject*
1622 : #ifdef METH_NOARGS
1623 0 : SwigPyObject_next(PyObject* v)
1624 : #else
1625 : SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1626 : #endif
1627 : {
1628 0 : SwigPyObject *sobj = (SwigPyObject *) v;
1629 0 : if (sobj->next) {
1630 0 : Py_INCREF(sobj->next);
1631 0 : return sobj->next;
1632 : } else {
1633 0 : return SWIG_Py_Void();
1634 : }
1635 : }
1636 :
1637 : SWIGINTERN PyObject*
1638 : #ifdef METH_NOARGS
1639 0 : SwigPyObject_disown(PyObject *v)
1640 : #else
1641 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1642 : #endif
1643 : {
1644 2414 : SwigPyObject *sobj = (SwigPyObject *)v;
1645 2414 : sobj->own = 0;
1646 2414 : return SWIG_Py_Void();
1647 : }
1648 :
1649 : SWIGINTERN PyObject*
1650 : #ifdef METH_NOARGS
1651 0 : SwigPyObject_acquire(PyObject *v)
1652 : #else
1653 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1654 : #endif
1655 : {
1656 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1657 0 : sobj->own = SWIG_POINTER_OWN;
1658 0 : return SWIG_Py_Void();
1659 : }
1660 :
1661 : SWIGINTERN PyObject*
1662 2414 : SwigPyObject_own(PyObject *v, PyObject *args)
1663 : {
1664 2414 : PyObject *val = 0;
1665 : #if (PY_VERSION_HEX < 0x02020000)
1666 : if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1667 : #else
1668 2414 : if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1669 : #endif
1670 : {
1671 0 : return NULL;
1672 : }
1673 : else
1674 : {
1675 2414 : SwigPyObject *sobj = (SwigPyObject *)v;
1676 2414 : PyObject *obj = PyBool_FromLong(sobj->own);
1677 2414 : if (val) {
1678 : #ifdef METH_NOARGS
1679 2414 : if (PyObject_IsTrue(val)) {
1680 : SwigPyObject_acquire(v);
1681 : } else {
1682 : SwigPyObject_disown(v);
1683 : }
1684 : #else
1685 : if (PyObject_IsTrue(val)) {
1686 : SwigPyObject_acquire(v,args);
1687 : } else {
1688 : SwigPyObject_disown(v,args);
1689 : }
1690 : #endif
1691 : }
1692 2414 : return obj;
1693 : }
1694 : }
1695 :
1696 : #ifdef METH_O
1697 : static PyMethodDef
1698 : swigobject_methods[] = {
1699 : {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1700 : {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
1701 : {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1702 : {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
1703 : {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1704 : {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
1705 : {0, 0, 0, 0}
1706 : };
1707 : #else
1708 : static PyMethodDef
1709 : swigobject_methods[] = {
1710 : {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1711 : {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1712 : {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1713 : {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1714 : {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1715 : {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
1716 : {0, 0, 0, 0}
1717 : };
1718 : #endif
1719 :
1720 : #if PY_VERSION_HEX < 0x02020000
1721 : SWIGINTERN PyObject *
1722 : SwigPyObject_getattr(SwigPyObject *sobj,char *name)
1723 : {
1724 : return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1725 : }
1726 : #endif
1727 :
1728 : SWIGRUNTIME PyTypeObject*
1729 2 : _PySwigObject_type(void) {
1730 : static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1731 :
1732 : static PyNumberMethods SwigPyObject_as_number = {
1733 : (binaryfunc)0, /*nb_add*/
1734 : (binaryfunc)0, /*nb_subtract*/
1735 : (binaryfunc)0, /*nb_multiply*/
1736 : /* nb_divide removed in Python 3 */
1737 : #if PY_VERSION_HEX < 0x03000000
1738 : (binaryfunc)0, /*nb_divide*/
1739 : #endif
1740 : (binaryfunc)0, /*nb_remainder*/
1741 : (binaryfunc)0, /*nb_divmod*/
1742 : (ternaryfunc)0,/*nb_power*/
1743 : (unaryfunc)0, /*nb_negative*/
1744 : (unaryfunc)0, /*nb_positive*/
1745 : (unaryfunc)0, /*nb_absolute*/
1746 : (inquiry)0, /*nb_nonzero*/
1747 : 0, /*nb_invert*/
1748 : 0, /*nb_lshift*/
1749 : 0, /*nb_rshift*/
1750 : 0, /*nb_and*/
1751 : 0, /*nb_xor*/
1752 : 0, /*nb_or*/
1753 : #if PY_VERSION_HEX < 0x03000000
1754 : 0, /*nb_coerce*/
1755 : #endif
1756 : (unaryfunc)SwigPyObject_long, /*nb_int*/
1757 : #if PY_VERSION_HEX < 0x03000000
1758 : (unaryfunc)SwigPyObject_long, /*nb_long*/
1759 : #else
1760 : 0, /*nb_reserved*/
1761 : #endif
1762 : (unaryfunc)0, /*nb_float*/
1763 : #if PY_VERSION_HEX < 0x03000000
1764 : (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1765 : (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1766 : #endif
1767 : #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1768 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1769 : #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1770 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1771 : #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1772 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1773 : #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1774 : 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1775 : #endif
1776 : };
1777 :
1778 : static PyTypeObject swigpyobject_type;
1779 : static int type_init = 0;
1780 2 : if (!type_init) {
1781 : const PyTypeObject tmp
1782 : = {
1783 : /* PyObject header changed in Python 3 */
1784 : #if PY_VERSION_HEX >= 0x03000000
1785 : PyVarObject_HEAD_INIT(&PyType_Type, 0)
1786 : #else
1787 : PyObject_HEAD_INIT(NULL)
1788 : 0, /* ob_size */
1789 : #endif
1790 : (char *)"SwigPyObject", /* tp_name */
1791 : sizeof(SwigPyObject), /* tp_basicsize */
1792 : 0, /* tp_itemsize */
1793 : (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1794 : (printfunc)SwigPyObject_print, /* tp_print */
1795 : #if PY_VERSION_HEX < 0x02020000
1796 : (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
1797 : #else
1798 : (getattrfunc)0, /* tp_getattr */
1799 : #endif
1800 : (setattrfunc)0, /* tp_setattr */
1801 : #if PY_VERSION_HEX >= 0x03000000
1802 : 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1803 : #else
1804 : (cmpfunc)SwigPyObject_compare, /* tp_compare */
1805 : #endif
1806 : (reprfunc)SwigPyObject_repr, /* tp_repr */
1807 : &SwigPyObject_as_number, /* tp_as_number */
1808 : 0, /* tp_as_sequence */
1809 : 0, /* tp_as_mapping */
1810 : (hashfunc)0, /* tp_hash */
1811 : (ternaryfunc)0, /* tp_call */
1812 : (reprfunc)SwigPyObject_str, /* tp_str */
1813 : PyObject_GenericGetAttr, /* tp_getattro */
1814 : 0, /* tp_setattro */
1815 : 0, /* tp_as_buffer */
1816 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1817 : swigobject_doc, /* tp_doc */
1818 : 0, /* tp_traverse */
1819 : 0, /* tp_clear */
1820 : (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */
1821 : 0, /* tp_weaklistoffset */
1822 : #if PY_VERSION_HEX >= 0x02020000
1823 : 0, /* tp_iter */
1824 : 0, /* tp_iternext */
1825 : swigobject_methods, /* tp_methods */
1826 : 0, /* tp_members */
1827 : 0, /* tp_getset */
1828 : 0, /* tp_base */
1829 : 0, /* tp_dict */
1830 : 0, /* tp_descr_get */
1831 : 0, /* tp_descr_set */
1832 : 0, /* tp_dictoffset */
1833 : 0, /* tp_init */
1834 : 0, /* tp_alloc */
1835 : 0, /* tp_new */
1836 : 0, /* tp_free */
1837 : 0, /* tp_is_gc */
1838 : 0, /* tp_bases */
1839 : 0, /* tp_mro */
1840 : 0, /* tp_cache */
1841 : 0, /* tp_subclasses */
1842 : 0, /* tp_weaklist */
1843 : #endif
1844 : #if PY_VERSION_HEX >= 0x02030000
1845 : 0, /* tp_del */
1846 : #endif
1847 : #ifdef COUNT_ALLOCS
1848 : 0,0,0,0 /* tp_alloc -> tp_next */
1849 : #endif
1850 2 : };
1851 2 : swigpyobject_type = tmp;
1852 : /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
1853 : #if PY_VERSION_HEX < 0x03000000
1854 2 : swigpyobject_type.ob_type = &PyType_Type;
1855 : #endif
1856 2 : type_init = 1;
1857 : }
1858 2 : return &swigpyobject_type;
1859 : }
1860 :
1861 : SWIGRUNTIME PyObject *
1862 386605 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1863 : {
1864 386605 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1865 386605 : if (sobj) {
1866 386605 : sobj->ptr = ptr;
1867 386605 : sobj->ty = ty;
1868 386605 : sobj->own = own;
1869 386605 : sobj->next = 0;
1870 : }
1871 386605 : return (PyObject *)sobj;
1872 : }
1873 :
1874 : /* -----------------------------------------------------------------------------
1875 : * Implements a simple Swig Packed type, and use it instead of string
1876 : * ----------------------------------------------------------------------------- */
1877 :
1878 : typedef struct {
1879 : PyObject_HEAD
1880 : void *pack;
1881 : swig_type_info *ty;
1882 : size_t size;
1883 : } SwigPyPacked;
1884 :
1885 : SWIGRUNTIME int
1886 0 : SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1887 : {
1888 : char result[SWIG_BUFFER_SIZE];
1889 0 : fputs("<Swig Packed ", fp);
1890 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1891 0 : fputs("at ", fp);
1892 0 : fputs(result, fp);
1893 : }
1894 0 : fputs(v->ty->name,fp);
1895 0 : fputs(">", fp);
1896 0 : return 0;
1897 : }
1898 :
1899 : SWIGRUNTIME PyObject *
1900 0 : SwigPyPacked_repr(SwigPyPacked *v)
1901 : {
1902 : char result[SWIG_BUFFER_SIZE];
1903 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1904 0 : return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1905 : } else {
1906 0 : return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1907 : }
1908 : }
1909 :
1910 : SWIGRUNTIME PyObject *
1911 0 : SwigPyPacked_str(SwigPyPacked *v)
1912 : {
1913 : char result[SWIG_BUFFER_SIZE];
1914 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1915 0 : return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1916 : } else {
1917 0 : return SWIG_Python_str_FromChar(v->ty->name);
1918 : }
1919 : }
1920 :
1921 : SWIGRUNTIME int
1922 0 : SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
1923 : {
1924 0 : size_t i = v->size;
1925 0 : size_t j = w->size;
1926 0 : int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1927 0 : return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1928 : }
1929 :
1930 : SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
1931 :
1932 : SWIGRUNTIME PyTypeObject*
1933 0 : SwigPyPacked_type(void) {
1934 0 : static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
1935 0 : return type;
1936 : }
1937 :
1938 : SWIGRUNTIMEINLINE int
1939 : SwigPyPacked_Check(PyObject *op) {
1940 : return ((op)->ob_type == _PySwigPacked_type())
1941 0 : || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1942 : }
1943 :
1944 : SWIGRUNTIME void
1945 0 : SwigPyPacked_dealloc(PyObject *v)
1946 : {
1947 0 : if (SwigPyPacked_Check(v)) {
1948 0 : SwigPyPacked *sobj = (SwigPyPacked *) v;
1949 0 : free(sobj->pack);
1950 : }
1951 0 : PyObject_DEL(v);
1952 0 : }
1953 :
1954 : SWIGRUNTIME PyTypeObject*
1955 0 : _PySwigPacked_type(void) {
1956 : static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1957 : static PyTypeObject swigpypacked_type;
1958 : static int type_init = 0;
1959 0 : if (!type_init) {
1960 : const PyTypeObject tmp
1961 : = {
1962 : /* PyObject header changed in Python 3 */
1963 : #if PY_VERSION_HEX>=0x03000000
1964 : PyVarObject_HEAD_INIT(&PyType_Type, 0)
1965 : #else
1966 : PyObject_HEAD_INIT(NULL)
1967 : 0, /* ob_size */
1968 : #endif
1969 : (char *)"SwigPyPacked", /* tp_name */
1970 : sizeof(SwigPyPacked), /* tp_basicsize */
1971 : 0, /* tp_itemsize */
1972 : (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1973 : (printfunc)SwigPyPacked_print, /* tp_print */
1974 : (getattrfunc)0, /* tp_getattr */
1975 : (setattrfunc)0, /* tp_setattr */
1976 : #if PY_VERSION_HEX>=0x03000000
1977 : 0, /* tp_reserved in 3.0.1 */
1978 : #else
1979 : (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1980 : #endif
1981 : (reprfunc)SwigPyPacked_repr, /* tp_repr */
1982 : 0, /* tp_as_number */
1983 : 0, /* tp_as_sequence */
1984 : 0, /* tp_as_mapping */
1985 : (hashfunc)0, /* tp_hash */
1986 : (ternaryfunc)0, /* tp_call */
1987 : (reprfunc)SwigPyPacked_str, /* tp_str */
1988 : PyObject_GenericGetAttr, /* tp_getattro */
1989 : 0, /* tp_setattro */
1990 : 0, /* tp_as_buffer */
1991 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1992 : swigpacked_doc, /* tp_doc */
1993 : 0, /* tp_traverse */
1994 : 0, /* tp_clear */
1995 : 0, /* tp_richcompare */
1996 : 0, /* tp_weaklistoffset */
1997 : #if PY_VERSION_HEX >= 0x02020000
1998 : 0, /* tp_iter */
1999 : 0, /* tp_iternext */
2000 : 0, /* tp_methods */
2001 : 0, /* tp_members */
2002 : 0, /* tp_getset */
2003 : 0, /* tp_base */
2004 : 0, /* tp_dict */
2005 : 0, /* tp_descr_get */
2006 : 0, /* tp_descr_set */
2007 : 0, /* tp_dictoffset */
2008 : 0, /* tp_init */
2009 : 0, /* tp_alloc */
2010 : 0, /* tp_new */
2011 : 0, /* tp_free */
2012 : 0, /* tp_is_gc */
2013 : 0, /* tp_bases */
2014 : 0, /* tp_mro */
2015 : 0, /* tp_cache */
2016 : 0, /* tp_subclasses */
2017 : 0, /* tp_weaklist */
2018 : #endif
2019 : #if PY_VERSION_HEX >= 0x02030000
2020 : 0, /* tp_del */
2021 : #endif
2022 : #ifdef COUNT_ALLOCS
2023 : 0,0,0,0 /* tp_alloc -> tp_next */
2024 : #endif
2025 0 : };
2026 0 : swigpypacked_type = tmp;
2027 : /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
2028 : #if PY_VERSION_HEX < 0x03000000
2029 0 : swigpypacked_type.ob_type = &PyType_Type;
2030 : #endif
2031 0 : type_init = 1;
2032 : }
2033 0 : return &swigpypacked_type;
2034 : }
2035 :
2036 : SWIGRUNTIME PyObject *
2037 0 : SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2038 : {
2039 0 : SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2040 0 : if (sobj) {
2041 0 : void *pack = malloc(size);
2042 0 : if (pack) {
2043 : memcpy(pack, ptr, size);
2044 0 : sobj->pack = pack;
2045 0 : sobj->ty = ty;
2046 0 : sobj->size = size;
2047 : } else {
2048 0 : PyObject_DEL((PyObject *) sobj);
2049 0 : sobj = 0;
2050 : }
2051 : }
2052 0 : return (PyObject *) sobj;
2053 : }
2054 :
2055 : SWIGRUNTIME swig_type_info *
2056 : SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2057 : {
2058 : if (SwigPyPacked_Check(obj)) {
2059 : SwigPyPacked *sobj = (SwigPyPacked *)obj;
2060 : if (sobj->size != size) return 0;
2061 : memcpy(ptr, sobj->pack, size);
2062 : return sobj->ty;
2063 : } else {
2064 : return 0;
2065 : }
2066 : }
2067 :
2068 : /* -----------------------------------------------------------------------------
2069 : * pointers/data manipulation
2070 : * ----------------------------------------------------------------------------- */
2071 :
2072 : SWIGRUNTIMEINLINE PyObject *
2073 : _SWIG_This(void)
2074 : {
2075 2 : return SWIG_Python_str_FromChar("this");
2076 : }
2077 :
2078 : SWIGRUNTIME PyObject *
2079 849768 : SWIG_This(void)
2080 : {
2081 849770 : static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
2082 849768 : return swig_this;
2083 : }
2084 :
2085 : /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2086 :
2087 : /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2088 : #if PY_VERSION_HEX>=0x03000000
2089 : #define SWIG_PYTHON_SLOW_GETSET_THIS
2090 : #endif
2091 :
2092 : SWIGRUNTIME SwigPyObject *
2093 780822 : SWIG_Python_GetSwigThis(PyObject *pyobj)
2094 : {
2095 780822 : if (SwigPyObject_Check(pyobj)) {
2096 139918 : return (SwigPyObject *) pyobj;
2097 : } else {
2098 640904 : PyObject *obj = 0;
2099 : #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2100 640904 : if (PyInstance_Check(pyobj)) {
2101 0 : obj = _PyInstance_Lookup(pyobj, SWIG_This());
2102 : } else {
2103 640904 : PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2104 640904 : if (dictptr != NULL) {
2105 640904 : PyObject *dict = *dictptr;
2106 640904 : obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2107 : } else {
2108 : #ifdef PyWeakref_CheckProxy
2109 0 : if (PyWeakref_CheckProxy(pyobj)) {
2110 0 : PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2111 0 : return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2112 : }
2113 : #endif
2114 0 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2115 0 : if (obj) {
2116 0 : Py_DECREF(obj);
2117 : } else {
2118 0 : if (PyErr_Occurred()) PyErr_Clear();
2119 0 : return 0;
2120 : }
2121 : }
2122 : }
2123 : #else
2124 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2125 : if (obj) {
2126 : Py_DECREF(obj);
2127 : } else {
2128 : if (PyErr_Occurred()) PyErr_Clear();
2129 : return 0;
2130 : }
2131 : #endif
2132 640904 : if (obj && !SwigPyObject_Check(obj)) {
2133 : /* a PyObject is called 'this', try to get the 'real this'
2134 : SwigPyObject from it */
2135 0 : return SWIG_Python_GetSwigThis(obj);
2136 : }
2137 640904 : return (SwigPyObject *)obj;
2138 : }
2139 : }
2140 :
2141 : /* Acquire a pointer value */
2142 :
2143 : SWIGRUNTIME int
2144 : SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2145 : if (own == SWIG_POINTER_OWN) {
2146 : SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2147 : if (sobj) {
2148 : int oldown = sobj->own;
2149 : sobj->own = own;
2150 : return oldown;
2151 : }
2152 : }
2153 : return 0;
2154 : }
2155 :
2156 : /* Convert a pointer value */
2157 :
2158 : SWIGRUNTIME int
2159 781008 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2160 781008 : if (!obj) return SWIG_ERROR;
2161 781008 : if (obj == Py_None) {
2162 186 : if (ptr) *ptr = 0;
2163 186 : return SWIG_OK;
2164 : } else {
2165 780822 : SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2166 780822 : if (own)
2167 0 : *own = 0;
2168 780822 : while (sobj) {
2169 780822 : void *vptr = sobj->ptr;
2170 780822 : if (ty) {
2171 780822 : swig_type_info *to = sobj->ty;
2172 780822 : if (to == ty) {
2173 : /* no type cast needed */
2174 780822 : if (ptr) *ptr = vptr;
2175 : break;
2176 : } else {
2177 0 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2178 0 : if (!tc) {
2179 0 : sobj = (SwigPyObject *)sobj->next;
2180 : } else {
2181 0 : if (ptr) {
2182 0 : int newmemory = 0;
2183 0 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2184 0 : if (newmemory == SWIG_CAST_NEW_MEMORY) {
2185 : assert(own);
2186 0 : if (own)
2187 0 : *own = *own | SWIG_CAST_NEW_MEMORY;
2188 : }
2189 : }
2190 : break;
2191 : }
2192 : }
2193 : } else {
2194 0 : if (ptr) *ptr = vptr;
2195 : break;
2196 : }
2197 : }
2198 780822 : if (sobj) {
2199 780822 : if (own)
2200 0 : *own = *own | sobj->own;
2201 780822 : if (flags & SWIG_POINTER_DISOWN) {
2202 149304 : sobj->own = 0;
2203 : }
2204 780822 : return SWIG_OK;
2205 : } else {
2206 0 : int res = SWIG_ERROR;
2207 0 : if (flags & SWIG_POINTER_IMPLICIT_CONV) {
2208 0 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2209 0 : if (data && !data->implicitconv) {
2210 0 : PyObject *klass = data->klass;
2211 0 : if (klass) {
2212 : PyObject *impconv;
2213 0 : data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2214 0 : impconv = SWIG_Python_CallFunctor(klass, obj);
2215 0 : data->implicitconv = 0;
2216 0 : if (PyErr_Occurred()) {
2217 0 : PyErr_Clear();
2218 0 : impconv = 0;
2219 : }
2220 0 : if (impconv) {
2221 0 : SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2222 0 : if (iobj) {
2223 : void *vptr;
2224 0 : res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2225 0 : if (SWIG_IsOK(res)) {
2226 0 : if (ptr) {
2227 0 : *ptr = vptr;
2228 : /* transfer the ownership to 'ptr' */
2229 0 : iobj->own = 0;
2230 0 : res = SWIG_AddCast(res);
2231 0 : res = SWIG_AddNewMask(res);
2232 : } else {
2233 0 : res = SWIG_AddCast(res);
2234 : }
2235 : }
2236 : }
2237 0 : Py_DECREF(impconv);
2238 : }
2239 : }
2240 : }
2241 : }
2242 0 : return res;
2243 : }
2244 : }
2245 : }
2246 :
2247 : /* Convert a function ptr value */
2248 :
2249 : SWIGRUNTIME int
2250 : SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2251 : if (!PyCFunction_Check(obj)) {
2252 : return SWIG_ConvertPtr(obj, ptr, ty, 0);
2253 : } else {
2254 : void *vptr = 0;
2255 :
2256 : /* here we get the method pointer for callbacks */
2257 : const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2258 : const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2259 : if (desc)
2260 : desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2261 : if (!desc)
2262 : return SWIG_ERROR;
2263 : if (ty) {
2264 : swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2265 : if (tc) {
2266 : int newmemory = 0;
2267 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2268 : assert(!newmemory); /* newmemory handling not yet implemented */
2269 : } else {
2270 : return SWIG_ERROR;
2271 : }
2272 : } else {
2273 : *ptr = vptr;
2274 : }
2275 : return SWIG_OK;
2276 : }
2277 : }
2278 :
2279 : /* Convert a packed value value */
2280 :
2281 : SWIGRUNTIME int
2282 : SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2283 : swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2284 : if (!to) return SWIG_ERROR;
2285 : if (ty) {
2286 : if (to != ty) {
2287 : /* check type cast? */
2288 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2289 : if (!tc) return SWIG_ERROR;
2290 : }
2291 : }
2292 : return SWIG_OK;
2293 : }
2294 :
2295 : /* -----------------------------------------------------------------------------
2296 : * Create a new pointer object
2297 : * ----------------------------------------------------------------------------- */
2298 :
2299 : /*
2300 : Create a new instance object, without calling __init__, and set the
2301 : 'this' attribute.
2302 : */
2303 :
2304 : SWIGRUNTIME PyObject*
2305 208864 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2306 : {
2307 : #if (PY_VERSION_HEX >= 0x02020000)
2308 208864 : PyObject *inst = 0;
2309 208864 : PyObject *newraw = data->newraw;
2310 208864 : if (newraw) {
2311 208864 : inst = PyObject_Call(newraw, data->newargs, NULL);
2312 208864 : if (inst) {
2313 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2314 208864 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2315 208864 : if (dictptr != NULL) {
2316 208864 : PyObject *dict = *dictptr;
2317 208864 : if (dict == NULL) {
2318 208864 : dict = PyDict_New();
2319 208864 : *dictptr = dict;
2320 208864 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2321 : }
2322 : }
2323 : #else
2324 : PyObject *key = SWIG_This();
2325 : PyObject_SetAttr(inst, key, swig_this);
2326 : #endif
2327 : }
2328 : } else {
2329 : #if PY_VERSION_HEX >= 0x03000000
2330 : inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2331 : PyObject_SetAttr(inst, SWIG_This(), swig_this);
2332 : Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2333 : #else
2334 0 : PyObject *dict = PyDict_New();
2335 0 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2336 0 : inst = PyInstance_NewRaw(data->newargs, dict);
2337 0 : Py_DECREF(dict);
2338 : #endif
2339 : }
2340 208864 : return inst;
2341 : #else
2342 : #if (PY_VERSION_HEX >= 0x02010000)
2343 : PyObject *inst;
2344 : PyObject *dict = PyDict_New();
2345 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2346 : inst = PyInstance_NewRaw(data->newargs, dict);
2347 : Py_DECREF(dict);
2348 : return (PyObject *) inst;
2349 : #else
2350 : PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2351 : if (inst == NULL) {
2352 : return NULL;
2353 : }
2354 : inst->in_class = (PyClassObject *)data->newargs;
2355 : Py_INCREF(inst->in_class);
2356 : inst->in_dict = PyDict_New();
2357 : if (inst->in_dict == NULL) {
2358 : Py_DECREF(inst);
2359 : return NULL;
2360 : }
2361 : #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2362 : inst->in_weakreflist = NULL;
2363 : #endif
2364 : #ifdef Py_TPFLAGS_GC
2365 : PyObject_GC_Init(inst);
2366 : #endif
2367 : PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2368 : return (PyObject *) inst;
2369 : #endif
2370 : #endif
2371 : }
2372 :
2373 : SWIGRUNTIME void
2374 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2375 : {
2376 : PyObject *dict;
2377 : #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2378 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2379 : if (dictptr != NULL) {
2380 : dict = *dictptr;
2381 : if (dict == NULL) {
2382 : dict = PyDict_New();
2383 : *dictptr = dict;
2384 : }
2385 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2386 : return;
2387 : }
2388 : #endif
2389 : dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2390 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2391 : Py_DECREF(dict);
2392 : }
2393 :
2394 :
2395 : SWIGINTERN PyObject *
2396 : SWIG_Python_InitShadowInstance(PyObject *args) {
2397 : PyObject *obj[2];
2398 : if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
2399 : return NULL;
2400 : } else {
2401 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2402 : if (sthis) {
2403 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2404 : } else {
2405 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2406 : }
2407 : return SWIG_Py_Void();
2408 : }
2409 : }
2410 :
2411 : /* Create a new pointer object */
2412 :
2413 : SWIGRUNTIME PyObject *
2414 248730 : SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2415 248730 : if (!ptr) {
2416 2277 : return SWIG_Py_Void();
2417 : } else {
2418 246453 : int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2419 246453 : PyObject *robj = SwigPyObject_New(ptr, type, own);
2420 246453 : SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2421 246453 : if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2422 208864 : PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2423 208864 : if (inst) {
2424 208864 : Py_DECREF(robj);
2425 208864 : robj = inst;
2426 : }
2427 : }
2428 246453 : return robj;
2429 : }
2430 : }
2431 :
2432 : /* Create a new packed object */
2433 :
2434 : SWIGRUNTIMEINLINE PyObject *
2435 : SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2436 0 : return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2437 : }
2438 :
2439 : /* -----------------------------------------------------------------------------*
2440 : * Get type list
2441 : * -----------------------------------------------------------------------------*/
2442 :
2443 : #ifdef SWIG_LINK_RUNTIME
2444 : void *SWIG_ReturnGlobalTypeList(void *);
2445 : #endif
2446 :
2447 : SWIGRUNTIME swig_module_info *
2448 : SWIG_Python_GetModule(void) {
2449 : static void *type_pointer = (void *)0;
2450 : /* first check if module already created */
2451 2 : if (!type_pointer) {
2452 : #ifdef SWIG_LINK_RUNTIME
2453 : type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2454 : #else
2455 : #ifdef SWIG_PYTHON_USE_CAPSULE
2456 : type_pointer = PyCapsule_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME, 0);
2457 : #else
2458 : type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2459 2 : (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2460 : #endif
2461 2 : if (PyErr_Occurred()) {
2462 0 : PyErr_Clear();
2463 0 : type_pointer = (void *)0;
2464 : }
2465 : #endif
2466 : }
2467 2 : return (swig_module_info *) type_pointer;
2468 : }
2469 :
2470 : #if PY_MAJOR_VERSION < 2
2471 : /* PyModule_AddObject function was introduced in Python 2.0. The following function
2472 : is copied out of Python/modsupport.c in python version 2.3.4 */
2473 : SWIGINTERN int
2474 : PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2475 : {
2476 : PyObject *dict;
2477 : if (!PyModule_Check(m)) {
2478 : PyErr_SetString(PyExc_TypeError,
2479 : "PyModule_AddObject() needs module as first arg");
2480 : return SWIG_ERROR;
2481 : }
2482 : if (!o) {
2483 : PyErr_SetString(PyExc_TypeError,
2484 : "PyModule_AddObject() needs non-NULL value");
2485 : return SWIG_ERROR;
2486 : }
2487 :
2488 : dict = PyModule_GetDict(m);
2489 : if (dict == NULL) {
2490 : /* Internal error -- modules must have a dict! */
2491 : PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2492 : PyModule_GetName(m));
2493 : return SWIG_ERROR;
2494 : }
2495 : if (PyDict_SetItemString(dict, name, o))
2496 : return SWIG_ERROR;
2497 : Py_DECREF(o);
2498 : return SWIG_OK;
2499 : }
2500 : #endif
2501 :
2502 : SWIGRUNTIME void
2503 : #ifdef SWIG_PYTHON_USE_CAPSULE
2504 : SWIG_Python_DestroyModule(PyObject *capsule)
2505 : {
2506 : swig_module_info *swig_module;
2507 : swig_type_info **types;
2508 : size_t i;
2509 : swig_module = (swig_module_info *)PyCapsule_GetPointer(capsule, (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2510 : if (swig_module == NULL)
2511 : {
2512 : PyErr_Clear();
2513 : return;
2514 : }
2515 : types = swig_module->types;
2516 : #else
2517 0 : SWIG_Python_DestroyModule(void *vptr)
2518 : {
2519 0 : swig_module_info *swig_module = (swig_module_info *) vptr;
2520 0 : swig_type_info **types = swig_module->types;
2521 : size_t i;
2522 : #endif
2523 0 : for (i =0; i < swig_module->size; ++i) {
2524 0 : swig_type_info *ty = types[i];
2525 0 : if (ty->owndata) {
2526 0 : SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2527 0 : if (data) SwigPyClientData_Del(data);
2528 : }
2529 : }
2530 0 : Py_DECREF(SWIG_This());
2531 0 : }
2532 :
2533 : SWIGRUNTIME void
2534 : SWIG_Python_SetModule(swig_module_info *swig_module) {
2535 : static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2536 :
2537 : #if PY_VERSION_HEX >= 0x03000000
2538 : /* Add a dummy module object into sys.modules */
2539 : PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2540 : #else
2541 0 : PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2542 : swig_empty_runtime_method_table);
2543 : #endif
2544 : #ifdef SWIG_PYTHON_USE_CAPSULE
2545 : PyObject *pointer = PyCapsule_New((void *) swig_module,
2546 : (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME,
2547 : SWIG_Python_DestroyModule);
2548 : #else
2549 0 : PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2550 : #endif
2551 0 : if (pointer && module) {
2552 0 : PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2553 : } else {
2554 0 : Py_XDECREF(pointer);
2555 : }
2556 : }
2557 :
2558 : /* The python cached type query */
2559 : SWIGRUNTIME PyObject *
2560 : SWIG_Python_TypeCache(void) {
2561 : static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2562 : return cache;
2563 : }
2564 :
2565 : SWIGRUNTIME swig_type_info *
2566 : SWIG_Python_TypeQuery(const char *type)
2567 : {
2568 : PyObject *cache = SWIG_Python_TypeCache();
2569 : PyObject *key = SWIG_Python_str_FromChar(type);
2570 : PyObject *obj = PyDict_GetItem(cache, key);
2571 : swig_type_info *descriptor;
2572 : if (obj) {
2573 : #ifdef SWIG_PYTHON_USE_CAPSULE
2574 : descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, (char*)"swig_type_info");
2575 : #else
2576 : descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2577 : #endif
2578 : } else {
2579 : swig_module_info *swig_module = SWIG_Python_GetModule();
2580 : descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2581 : if (descriptor) {
2582 : #ifdef SWIG_PYTHON_USE_CAPSULE
2583 : obj = PyCapsule_New(descriptor, (char*)"swig_type_info", NULL);
2584 : #else
2585 : obj = PyCObject_FromVoidPtr(descriptor, NULL);
2586 : #endif
2587 : PyDict_SetItem(cache, key, obj);
2588 : Py_DECREF(obj);
2589 : }
2590 : }
2591 : Py_DECREF(key);
2592 : return descriptor;
2593 : }
2594 :
2595 : /*
2596 : For backward compatibility only
2597 : */
2598 : #define SWIG_POINTER_EXCEPTION 0
2599 : #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2600 : #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2601 :
2602 : SWIGRUNTIME int
2603 : SWIG_Python_AddErrMesg(const char* mesg, int infront)
2604 : {
2605 : if (PyErr_Occurred()) {
2606 : PyObject *type = 0;
2607 : PyObject *value = 0;
2608 : PyObject *traceback = 0;
2609 : PyErr_Fetch(&type, &value, &traceback);
2610 : if (value) {
2611 : char *tmp;
2612 : PyObject *old_str = PyObject_Str(value);
2613 : Py_XINCREF(type);
2614 : PyErr_Clear();
2615 : if (infront) {
2616 : PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2617 : } else {
2618 : PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2619 : }
2620 : SWIG_Python_str_DelForPy3(tmp);
2621 : Py_DECREF(old_str);
2622 : }
2623 : return 1;
2624 : } else {
2625 : return 0;
2626 : }
2627 : }
2628 :
2629 : SWIGRUNTIME int
2630 : SWIG_Python_ArgFail(int argnum)
2631 : {
2632 : if (PyErr_Occurred()) {
2633 : /* add information about failing argument */
2634 : char mesg[256];
2635 : PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2636 : return SWIG_Python_AddErrMesg(mesg, 1);
2637 : } else {
2638 : return 0;
2639 : }
2640 : }
2641 :
2642 : SWIGRUNTIMEINLINE const char *
2643 : SwigPyObject_GetDesc(PyObject *self)
2644 : {
2645 : SwigPyObject *v = (SwigPyObject *)self;
2646 : swig_type_info *ty = v ? v->ty : 0;
2647 : return ty ? ty->str : (char*)"";
2648 : }
2649 :
2650 : SWIGRUNTIME void
2651 : SWIG_Python_TypeError(const char *type, PyObject *obj)
2652 : {
2653 : if (type) {
2654 : #if defined(SWIG_COBJECT_TYPES)
2655 : if (obj && SwigPyObject_Check(obj)) {
2656 : const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2657 : if (otype) {
2658 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2659 : type, otype);
2660 : return;
2661 : }
2662 : } else
2663 : #endif
2664 : {
2665 : const char *otype = (obj ? obj->ob_type->tp_name : 0);
2666 : if (otype) {
2667 : PyObject *str = PyObject_Str(obj);
2668 : const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2669 : if (cstr) {
2670 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2671 : type, otype, cstr);
2672 : SWIG_Python_str_DelForPy3(cstr);
2673 : } else {
2674 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2675 : type, otype);
2676 : }
2677 : Py_XDECREF(str);
2678 : return;
2679 : }
2680 : }
2681 : PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2682 : } else {
2683 : PyErr_Format(PyExc_TypeError, "unexpected type is received");
2684 : }
2685 : }
2686 :
2687 :
2688 : /* Convert a pointer value, signal an exception on a type mismatch */
2689 : SWIGRUNTIME void *
2690 : SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
2691 : void *result;
2692 : if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2693 : PyErr_Clear();
2694 : #if SWIG_POINTER_EXCEPTION
2695 : if (flags) {
2696 : SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2697 : SWIG_Python_ArgFail(argnum);
2698 : }
2699 : #endif
2700 : }
2701 : return result;
2702 : }
2703 :
2704 :
2705 : #ifdef __cplusplus
2706 : #if 0
2707 : { /* cc-mode */
2708 : #endif
2709 : }
2710 : #endif
2711 :
2712 :
2713 :
2714 : #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2715 :
2716 : #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2717 :
2718 :
2719 :
2720 : #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2721 :
2722 :
2723 : /* -------- TYPES TABLE (BEGIN) -------- */
2724 :
2725 : #define SWIGTYPE_p_GDALProgressFunc swig_types[0]
2726 : #define SWIGTYPE_p_GIntBig swig_types[1]
2727 : #define SWIGTYPE_p_OGRDataSourceShadow swig_types[2]
2728 : #define SWIGTYPE_p_OGRDriverShadow swig_types[3]
2729 : #define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[4]
2730 : #define SWIGTYPE_p_OGRFeatureShadow swig_types[5]
2731 : #define SWIGTYPE_p_OGRFieldDefnShadow swig_types[6]
2732 : #define SWIGTYPE_p_OGRGeometryShadow swig_types[7]
2733 : #define SWIGTYPE_p_OGRLayerShadow swig_types[8]
2734 : #define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[9]
2735 : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[10]
2736 : #define SWIGTYPE_p_char swig_types[11]
2737 : #define SWIGTYPE_p_double swig_types[12]
2738 : #define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[13]
2739 : #define SWIGTYPE_p_int swig_types[14]
2740 : #define SWIGTYPE_p_p_char swig_types[15]
2741 : #define SWIGTYPE_p_p_double swig_types[16]
2742 : #define SWIGTYPE_p_p_int swig_types[17]
2743 : static swig_type_info *swig_types[19];
2744 : static swig_module_info swig_module = {swig_types, 18, 0, 0, 0, 0};
2745 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2746 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2747 :
2748 : /* -------- TYPES TABLE (END) -------- */
2749 :
2750 : #if (PY_VERSION_HEX <= 0x02000000)
2751 : # if !defined(SWIG_PYTHON_CLASSIC)
2752 : # error "This python version requires swig to be run with the '-classic' option"
2753 : # endif
2754 : #endif
2755 :
2756 : /*-----------------------------------------------
2757 : @(target):= _ogr.so
2758 : ------------------------------------------------*/
2759 : #if PY_VERSION_HEX >= 0x03000000
2760 : # define SWIG_init PyInit__ogr
2761 :
2762 : #else
2763 : # define SWIG_init init_ogr
2764 :
2765 : #endif
2766 : #define SWIG_name "_ogr"
2767 :
2768 : #define SWIGVERSION 0x010340
2769 : #define SWIG_VERSION SWIGVERSION
2770 :
2771 :
2772 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2773 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2774 :
2775 :
2776 : #include <stdexcept>
2777 :
2778 :
2779 : namespace swig {
2780 : class SwigPtr_PyObject {
2781 : protected:
2782 : PyObject *_obj;
2783 :
2784 : public:
2785 : SwigPtr_PyObject() :_obj(0)
2786 : {
2787 : }
2788 :
2789 : SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
2790 : {
2791 : Py_XINCREF(_obj);
2792 : }
2793 :
2794 : SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2795 : {
2796 : if (initial_ref) {
2797 : Py_XINCREF(_obj);
2798 : }
2799 : }
2800 :
2801 : SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
2802 : {
2803 : Py_XINCREF(item._obj);
2804 : Py_XDECREF(_obj);
2805 : _obj = item._obj;
2806 : return *this;
2807 : }
2808 :
2809 : ~SwigPtr_PyObject()
2810 : {
2811 : Py_XDECREF(_obj);
2812 : }
2813 :
2814 : operator PyObject *() const
2815 : {
2816 : return _obj;
2817 : }
2818 :
2819 : PyObject *operator->() const
2820 : {
2821 : return _obj;
2822 : }
2823 : };
2824 : }
2825 :
2826 :
2827 : namespace swig {
2828 : struct SwigVar_PyObject : SwigPtr_PyObject {
2829 : SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2830 :
2831 : SwigVar_PyObject & operator = (PyObject* obj)
2832 : {
2833 : Py_XDECREF(_obj);
2834 : _obj = obj;
2835 : return *this;
2836 : }
2837 : };
2838 : }
2839 :
2840 :
2841 : typedef char retStringAndCPLFree;
2842 :
2843 :
2844 : #include <iostream>
2845 : using namespace std;
2846 :
2847 : #include "ogr_api.h"
2848 : #include "ogr_p.h"
2849 : #include "ogr_core.h"
2850 : #include "cpl_port.h"
2851 : #include "cpl_string.h"
2852 : #include "ogr_srs_api.h"
2853 :
2854 : #ifdef DEBUG
2855 : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
2856 : typedef struct OGRDriverHS OGRDriverShadow;
2857 : typedef struct OGRDataSourceHS OGRDataSourceShadow;
2858 : typedef struct OGRLayerHS OGRLayerShadow;
2859 : typedef struct OGRFeatureHS OGRFeatureShadow;
2860 : typedef struct OGRFeatureDefnHS OGRFeatureDefnShadow;
2861 : typedef struct OGRGeometryHS OGRGeometryShadow;
2862 : typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
2863 : typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
2864 : typedef struct OGRFieldDefnHS OGRFieldDefnShadow;
2865 : #else
2866 : typedef void OSRSpatialReferenceShadow;
2867 : typedef void OGRDriverShadow;
2868 : typedef void OGRDataSourceShadow;
2869 : typedef void OGRLayerShadow;
2870 : typedef void OGRFeatureShadow;
2871 : typedef void OGRFeatureDefnShadow;
2872 : typedef void OGRGeometryShadow;
2873 : typedef void OSRCoordinateTransformationShadow;
2874 : typedef void OGRFieldDefnShadow;
2875 : #endif
2876 :
2877 :
2878 : #define SWIG_From_long PyInt_FromLong
2879 :
2880 :
2881 : SWIGINTERNINLINE PyObject *
2882 : SWIG_From_int (int value)
2883 : {
2884 28041 : return SWIG_From_long (value);
2885 : }
2886 :
2887 :
2888 : SWIGINTERN swig_type_info*
2889 : SWIG_pchar_descriptor(void)
2890 : {
2891 : static int init = 0;
2892 : static swig_type_info* info = 0;
2893 65 : if (!init) {
2894 2 : info = SWIG_TypeQuery("_p_char");
2895 2 : init = 1;
2896 : }
2897 65 : return info;
2898 : }
2899 :
2900 :
2901 : SWIGINTERNINLINE PyObject *
2902 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2903 : {
2904 10377 : if (carray) {
2905 10311 : if (size > INT_MAX) {
2906 0 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2907 : return pchar_descriptor ?
2908 0 : SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
2909 : } else {
2910 : #if PY_VERSION_HEX >= 0x03000000
2911 : return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
2912 : #else
2913 10311 : return PyString_FromStringAndSize(carray, static_cast< int >(size));
2914 : #endif
2915 : }
2916 : } else {
2917 66 : return SWIG_Py_Void();
2918 : }
2919 : }
2920 :
2921 :
2922 : SWIGINTERNINLINE PyObject *
2923 10377 : SWIG_FromCharPtr(const char *cptr)
2924 : {
2925 20754 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2926 : }
2927 :
2928 :
2929 : int bUseExceptions=0;
2930 : CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;
2931 :
2932 : void CPL_STDCALL
2933 0 : PythonBindingErrorHandler(CPLErr eclass, int code, const char *msg )
2934 : {
2935 : /*
2936 : ** Generally we want to supress error reporting if we have exceptions
2937 : ** enabled as the error message will be in the exception thrown in
2938 : ** Python.
2939 : */
2940 :
2941 : /* If the error class is CE_Fatal, we want to have a message issued
2942 : because the CPL support code does an abort() before any exception
2943 : can be generated */
2944 0 : if (eclass == CE_Fatal ) {
2945 0 : pfnPreviousHandler(eclass, code, msg );
2946 : }
2947 :
2948 : /*
2949 : ** We do not want to interfere with warnings or debug messages since
2950 : ** they won't be translated into exceptions.
2951 : */
2952 0 : if (eclass == CE_Warning || eclass == CE_Debug ) {
2953 0 : pfnPreviousHandler(eclass, code, msg );
2954 : }
2955 0 : }
2956 :
2957 :
2958 :
2959 0 : int GetUseExceptions() {
2960 0 : return bUseExceptions;
2961 : }
2962 :
2963 0 : void UseExceptions() {
2964 0 : bUseExceptions = 1;
2965 : pfnPreviousHandler =
2966 0 : CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
2967 0 : }
2968 :
2969 0 : void DontUseExceptions() {
2970 0 : bUseExceptions = 0;
2971 0 : CPLSetErrorHandler( pfnPreviousHandler );
2972 0 : }
2973 :
2974 :
2975 :
2976 : /* Return a PyObject* from a NULL terminated C String */
2977 1497 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
2978 : {
2979 1497 : const unsigned char* pszIter = (const unsigned char*) pszStr;
2980 95841 : while(*pszIter != 0)
2981 : {
2982 92847 : if (*pszIter > 127)
2983 : {
2984 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "ignore");
2985 0 : if (pyObj != NULL)
2986 0 : return pyObj;
2987 : #if PY_VERSION_HEX >= 0x03000000
2988 : return PyBytes_FromString(pszStr);
2989 : #else
2990 0 : return PyString_FromString(pszStr);
2991 : #endif
2992 : }
2993 92847 : pszIter ++;
2994 : }
2995 : #if PY_VERSION_HEX >= 0x03000000
2996 : return PyUnicode_FromString(pszStr);
2997 : #else
2998 1497 : return PyString_FromString(pszStr);
2999 : #endif
3000 : }
3001 :
3002 : /* Return a NULL terminated c String from a PyObject */
3003 : /* Result must be freed with GDALPythonFreeCStr */
3004 5124 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
3005 : {
3006 5124 : *pbToFree = 0;
3007 5124 : if (PyUnicode_Check(pyObject))
3008 : {
3009 : char *pszStr;
3010 : char *pszNewStr;
3011 : Py_ssize_t nLen;
3012 3 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
3013 : #if PY_VERSION_HEX >= 0x03000000
3014 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3015 : #else
3016 3 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3017 : #endif
3018 3 : pszNewStr = (char *) malloc(nLen+1);
3019 3 : memcpy(pszNewStr, pszStr, nLen+1);
3020 3 : Py_XDECREF(pyUTF8Str);
3021 3 : *pbToFree = 1;
3022 3 : return pszNewStr;
3023 : }
3024 : else
3025 : {
3026 : #if PY_VERSION_HEX >= 0x03000000
3027 : return PyBytes_AsString(pyObject);
3028 : #else
3029 5121 : return PyString_AsString(pyObject);
3030 : #endif
3031 : }
3032 : }
3033 :
3034 5124 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
3035 : {
3036 5124 : if (bToFree)
3037 3 : free(ptr);
3038 5124 : }
3039 :
3040 :
3041 :
3042 :
3043 : typedef struct {
3044 : PyObject *psPyCallback;
3045 : PyObject *psPyCallbackData;
3046 : int nLastReported;
3047 : } PyProgressData;
3048 :
3049 : /************************************************************************/
3050 : /* PyProgressProxy() */
3051 : /************************************************************************/
3052 :
3053 : int CPL_STDCALL
3054 0 : PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )
3055 :
3056 : {
3057 0 : PyProgressData *psInfo = (PyProgressData *) pData;
3058 : PyObject *psArgs, *psResult;
3059 0 : int bContinue = TRUE;
3060 :
3061 0 : if( psInfo->nLastReported == (int) (100.0 * dfComplete) )
3062 0 : return TRUE;
3063 :
3064 0 : if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
3065 0 : return TRUE;
3066 :
3067 0 : psInfo->nLastReported = (int) (100.0 * dfComplete);
3068 :
3069 0 : if( pszMessage == NULL )
3070 0 : pszMessage = "";
3071 :
3072 0 : if( psInfo->psPyCallbackData == NULL )
3073 0 : psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
3074 : else
3075 : psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
3076 0 : psInfo->psPyCallbackData );
3077 :
3078 0 : psResult = PyEval_CallObject( psInfo->psPyCallback, psArgs);
3079 0 : Py_XDECREF(psArgs);
3080 :
3081 0 : if( psResult == NULL )
3082 : {
3083 0 : return TRUE;
3084 : }
3085 :
3086 0 : if( psResult == Py_None )
3087 : {
3088 0 : Py_XDECREF(Py_None);
3089 0 : return TRUE;
3090 : }
3091 :
3092 0 : if( !PyArg_Parse( psResult, "i", &bContinue ) )
3093 : {
3094 0 : PyErr_SetString(PyExc_ValueError, "bad progress return value");
3095 0 : return FALSE;
3096 : }
3097 :
3098 0 : Py_XDECREF(psResult);
3099 :
3100 0 : return bContinue;
3101 : }
3102 :
3103 :
3104 : SWIGINTERN int
3105 22996 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3106 : {
3107 : #if PY_VERSION_HEX>=0x03000000
3108 : if (PyUnicode_Check(obj))
3109 : #else
3110 22996 : if (PyString_Check(obj))
3111 : #endif
3112 : {
3113 : char *cstr; Py_ssize_t len;
3114 : #if PY_VERSION_HEX>=0x03000000
3115 : if (!alloc && cptr) {
3116 : /* We can't allow converting without allocation, since the internal
3117 : representation of string in Python 3 is UCS-2/UCS-4 but we require
3118 : a UTF-8 representation.
3119 : TODO(bhy) More detailed explanation */
3120 : return SWIG_RuntimeError;
3121 : }
3122 : obj = PyUnicode_AsUTF8String(obj);
3123 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3124 : if(alloc) *alloc = SWIG_NEWOBJ;
3125 : #else
3126 22931 : PyString_AsStringAndSize(obj, &cstr, &len);
3127 : #endif
3128 22931 : if (cptr) {
3129 16864 : if (alloc) {
3130 : /*
3131 : In python the user should not be able to modify the inner
3132 : string representation. To warranty that, if you define
3133 : SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3134 : buffer is always returned.
3135 :
3136 : The default behavior is just to return the pointer value,
3137 : so, be careful.
3138 : */
3139 : #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3140 : if (*alloc != SWIG_OLDOBJ)
3141 : #else
3142 16864 : if (*alloc == SWIG_NEWOBJ)
3143 : #endif
3144 : {
3145 0 : *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
3146 0 : *alloc = SWIG_NEWOBJ;
3147 : }
3148 : else {
3149 16864 : *cptr = cstr;
3150 16864 : *alloc = SWIG_OLDOBJ;
3151 : }
3152 : } else {
3153 : #if PY_VERSION_HEX>=0x03000000
3154 : assert(0); /* Should never reach here in Python 3 */
3155 : #endif
3156 0 : *cptr = SWIG_Python_str_AsChar(obj);
3157 : }
3158 : }
3159 22931 : if (psize) *psize = len + 1;
3160 : #if PY_VERSION_HEX>=0x03000000
3161 : Py_XDECREF(obj);
3162 : #endif
3163 22931 : return SWIG_OK;
3164 : } else {
3165 65 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3166 65 : if (pchar_descriptor) {
3167 65 : void* vptr = 0;
3168 65 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3169 65 : if (cptr) *cptr = (char *) vptr;
3170 65 : if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3171 65 : if (alloc) *alloc = SWIG_OLDOBJ;
3172 65 : return SWIG_OK;
3173 : }
3174 : }
3175 : }
3176 0 : return SWIG_TypeError;
3177 : }
3178 :
3179 :
3180 :
3181 :
3182 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CreateDataSource(OGRDriverShadow *self,char const *utf8_path,char **options=0){
3183 289 : OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CreateDataSource( self, utf8_path, options);
3184 289 : return ds;
3185 : }
3186 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CopyDataSource(OGRDriverShadow *self,OGRDataSourceShadow *copy_ds,char const *utf8_path,char **options=0){
3187 1 : OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CopyDataSource(self, copy_ds, utf8_path, options);
3188 1 : return ds;
3189 : }
3190 :
3191 : #include <limits.h>
3192 : #if !defined(SWIG_NO_LLONG_MAX)
3193 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3194 : # define LLONG_MAX __LONG_LONG_MAX__
3195 : # define LLONG_MIN (-LLONG_MAX - 1LL)
3196 : # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3197 : # endif
3198 : #endif
3199 :
3200 :
3201 : SWIGINTERN int
3202 74864 : SWIG_AsVal_double (PyObject *obj, double *val)
3203 : {
3204 74864 : int res = SWIG_TypeError;
3205 74864 : if (PyFloat_Check(obj)) {
3206 71010 : if (val) *val = PyFloat_AsDouble(obj);
3207 71010 : return SWIG_OK;
3208 3854 : } else if (PyInt_Check(obj)) {
3209 172 : if (val) *val = PyInt_AsLong(obj);
3210 172 : return SWIG_OK;
3211 3682 : } else if (PyLong_Check(obj)) {
3212 0 : double v = PyLong_AsDouble(obj);
3213 0 : if (!PyErr_Occurred()) {
3214 0 : if (val) *val = v;
3215 0 : return SWIG_OK;
3216 : } else {
3217 0 : PyErr_Clear();
3218 : }
3219 : }
3220 : #ifdef SWIG_PYTHON_CAST_MODE
3221 : {
3222 : int dispatch = 0;
3223 : double d = PyFloat_AsDouble(obj);
3224 : if (!PyErr_Occurred()) {
3225 : if (val) *val = d;
3226 : return SWIG_AddCast(SWIG_OK);
3227 : } else {
3228 : PyErr_Clear();
3229 : }
3230 : if (!dispatch) {
3231 : long v = PyLong_AsLong(obj);
3232 : if (!PyErr_Occurred()) {
3233 : if (val) *val = v;
3234 : return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3235 : } else {
3236 : PyErr_Clear();
3237 : }
3238 : }
3239 : }
3240 : #endif
3241 3682 : return res;
3242 : }
3243 :
3244 :
3245 : #include <float.h>
3246 :
3247 :
3248 : #include <math.h>
3249 :
3250 :
3251 : SWIGINTERNINLINE int
3252 : SWIG_CanCastAsInteger(double *d, double min, double max) {
3253 : double x = *d;
3254 : if ((min <= x && x <= max)) {
3255 : double fx = floor(x);
3256 : double cx = ceil(x);
3257 : double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3258 : if ((errno == EDOM) || (errno == ERANGE)) {
3259 : errno = 0;
3260 : } else {
3261 : double summ, reps, diff;
3262 : if (rd < x) {
3263 : diff = x - rd;
3264 : } else if (rd > x) {
3265 : diff = rd - x;
3266 : } else {
3267 : return 1;
3268 : }
3269 : summ = rd + x;
3270 : reps = diff/summ;
3271 : if (reps < 8*DBL_EPSILON) {
3272 : *d = rd;
3273 : return 1;
3274 : }
3275 : }
3276 : }
3277 : return 0;
3278 : }
3279 :
3280 :
3281 : SWIGINTERN int
3282 154578 : SWIG_AsVal_long (PyObject *obj, long* val)
3283 : {
3284 154578 : if (PyInt_Check(obj)) {
3285 147822 : if (val) *val = PyInt_AsLong(obj);
3286 147822 : return SWIG_OK;
3287 6756 : } else if (PyLong_Check(obj)) {
3288 0 : long v = PyLong_AsLong(obj);
3289 0 : if (!PyErr_Occurred()) {
3290 0 : if (val) *val = v;
3291 0 : return SWIG_OK;
3292 : } else {
3293 0 : PyErr_Clear();
3294 : }
3295 : }
3296 : #ifdef SWIG_PYTHON_CAST_MODE
3297 : {
3298 : int dispatch = 0;
3299 : long v = PyInt_AsLong(obj);
3300 : if (!PyErr_Occurred()) {
3301 : if (val) *val = v;
3302 : return SWIG_AddCast(SWIG_OK);
3303 : } else {
3304 : PyErr_Clear();
3305 : }
3306 : if (!dispatch) {
3307 : double d;
3308 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3309 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3310 : if (val) *val = (long)(d);
3311 : return res;
3312 : }
3313 : }
3314 : }
3315 : #endif
3316 6756 : return SWIG_TypeError;
3317 : }
3318 :
3319 :
3320 : SWIGINTERN int
3321 154395 : SWIG_AsVal_int (PyObject * obj, int *val)
3322 : {
3323 : long v;
3324 154395 : int res = SWIG_AsVal_long (obj, &v);
3325 154395 : if (SWIG_IsOK(res)) {
3326 147639 : if ((v < INT_MIN || v > INT_MAX)) {
3327 0 : return SWIG_OverflowError;
3328 : } else {
3329 147639 : if (val) *val = static_cast< int >(v);
3330 : }
3331 : }
3332 154395 : return res;
3333 : }
3334 :
3335 : SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_Open(OGRDriverShadow *self,char const *utf8_path,int update=0){
3336 56 : CPLErrorReset();
3337 56 : OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, utf8_path, update);
3338 56 : if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
3339 : {
3340 : CPLDebug(
3341 : "SWIG",
3342 : "OGR_Dr_Open() succeeded, but an error is posted, so we destroy"
3343 : " the datasource and fail at swig level.\nError:%s",
3344 0 : CPLGetLastErrorMsg() );
3345 0 : OGRReleaseDataSource(ds);
3346 0 : ds = NULL;
3347 : }
3348 56 : return ds;
3349 : }
3350 : SWIGINTERN int OGRDriverShadow_DeleteDataSource(OGRDriverShadow *self,char const *utf8_path){
3351 :
3352 166 : return OGR_Dr_DeleteDataSource( self, utf8_path );
3353 : }
3354 : SWIGINTERN bool OGRDriverShadow_TestCapability(OGRDriverShadow *self,char const *cap){
3355 41 : return (OGR_Dr_TestCapability(self, cap) > 0);
3356 : }
3357 :
3358 : SWIGINTERNINLINE PyObject*
3359 40959 : SWIG_From_bool (bool value)
3360 : {
3361 40959 : return PyBool_FromLong(value ? 1 : 0);
3362 : }
3363 :
3364 : SWIGINTERN char const *OGRDriverShadow_GetName(OGRDriverShadow *self){
3365 154 : return OGR_Dr_GetName( self );
3366 : }
3367 : SWIGINTERN void OGRDriverShadow_Register(OGRDriverShadow *self){
3368 5 : OGRRegisterDriver( self );
3369 : }
3370 : SWIGINTERN void OGRDriverShadow_Deregister(OGRDriverShadow *self){
3371 5 : OGRDeregisterDriver( self );
3372 : }
3373 : SWIGINTERN void delete_OGRDataSourceShadow(OGRDataSourceShadow *self){
3374 1241 : OGRReleaseDataSource(self);
3375 : }
3376 : SWIGINTERN int OGRDataSourceShadow_GetRefCount(OGRDataSourceShadow *self){
3377 4 : return OGR_DS_GetRefCount(self);
3378 : }
3379 : SWIGINTERN int OGRDataSourceShadow_GetSummaryRefCount(OGRDataSourceShadow *self){
3380 0 : return OGR_DS_GetSummaryRefCount(self);
3381 : }
3382 : SWIGINTERN int OGRDataSourceShadow_GetLayerCount(OGRDataSourceShadow *self){
3383 234 : return OGR_DS_GetLayerCount(self);
3384 : }
3385 : SWIGINTERN OGRDriverShadow *OGRDataSourceShadow_GetDriver(OGRDataSourceShadow *self){
3386 123 : return (OGRDriverShadow *) OGR_DS_GetDriver( self );
3387 : }
3388 : SWIGINTERN char const *OGRDataSourceShadow_GetName(OGRDataSourceShadow *self){
3389 11 : return OGR_DS_GetName(self);
3390 : }
3391 : SWIGINTERN OGRErr OGRDataSourceShadow_DeleteLayer(OGRDataSourceShadow *self,int index){
3392 15 : return OGR_DS_DeleteLayer(self, index);
3393 : }
3394 :
3395 :
3396 : #include "ogr_core.h"
3397 : static char const *
3398 179 : OGRErrMessages( int rc ) {
3399 179 : switch( rc ) {
3400 : case OGRERR_NONE:
3401 0 : return "OGR Error: None";
3402 : case OGRERR_NOT_ENOUGH_DATA:
3403 0 : return "OGR Error: Not enough data to deserialize";
3404 : case OGRERR_NOT_ENOUGH_MEMORY:
3405 0 : return "OGR Error: Not enough memory";
3406 : case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
3407 11 : return "OGR Error: Unsupported geometry type";
3408 : case OGRERR_UNSUPPORTED_OPERATION:
3409 0 : return "OGR Error: Unsupported operation";
3410 : case OGRERR_CORRUPT_DATA:
3411 166 : return "OGR Error: Corrupt data";
3412 : case OGRERR_FAILURE:
3413 2 : return "OGR Error: General Error";
3414 : case OGRERR_UNSUPPORTED_SRS:
3415 0 : return "OGR Error: Unsupported SRS";
3416 : case OGRERR_INVALID_HANDLE:
3417 0 : return "OGR Error: Invalid handle";
3418 : default:
3419 0 : return "OGR Error: Unknown";
3420 : }
3421 : }
3422 :
3423 : SWIGINTERN OGRErr OGRDataSourceShadow_SyncToDisk(OGRDataSourceShadow *self){
3424 0 : return OGR_DS_SyncToDisk(self);
3425 : }
3426 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CreateLayer(OGRDataSourceShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
3427 : OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CreateLayer( self,
3428 : name,
3429 : srs,
3430 : geom_type,
3431 1531 : options);
3432 1531 : return layer;
3433 : }
3434 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CopyLayer(OGRDataSourceShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
3435 : OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CopyLayer( self,
3436 : src_layer,
3437 : new_name,
3438 4 : options);
3439 4 : return layer;
3440 : }
3441 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByIndex(OGRDataSourceShadow *self,int index=0){
3442 :
3443 2636 : OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayer(self, index);
3444 2636 : return layer;
3445 : }
3446 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByName(OGRDataSourceShadow *self,char const *layer_name){
3447 1720 : OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayerByName(self, layer_name);
3448 1720 : return layer;
3449 : }
3450 : SWIGINTERN bool OGRDataSourceShadow_TestCapability(OGRDataSourceShadow *self,char const *cap){
3451 54 : return (OGR_DS_TestCapability(self, cap) > 0);
3452 : }
3453 : SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_ExecuteSQL(OGRDataSourceShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
3454 : OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_ExecuteSQL((OGRDataSourceShadow*)self,
3455 : statement,
3456 : spatialFilter,
3457 2051 : dialect);
3458 2051 : return layer;
3459 : }
3460 : SWIGINTERN void OGRDataSourceShadow_ReleaseResultSet(OGRDataSourceShadow *self,OGRLayerShadow *layer){
3461 998 : OGR_DS_ReleaseResultSet(self, layer);
3462 : }
3463 : SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
3464 0 : return OGR_L_GetRefCount(self);
3465 : }
3466 : SWIGINTERN void OGRLayerShadow_SetSpatialFilter(OGRLayerShadow *self,OGRGeometryShadow *filter){
3467 65 : OGR_L_SetSpatialFilter (self, filter);
3468 : }
3469 : SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
3470 17519 : OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);
3471 : }
3472 : SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
3473 0 : return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
3474 : }
3475 : SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
3476 241 : return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
3477 : }
3478 : SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
3479 18986 : OGR_L_ResetReading(self);
3480 : }
3481 : SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
3482 2058 : return OGR_L_GetName(self);
3483 : }
3484 : SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
3485 116 : return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
3486 : }
3487 : SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
3488 31 : return OGR_L_GetGeometryColumn(self);
3489 : }
3490 : SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
3491 21 : return OGR_L_GetFIDColumn(self);
3492 : }
3493 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,long fid){
3494 100 : return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
3495 : }
3496 : SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
3497 60899 : return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
3498 : }
3499 : SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,long new_index){
3500 10 : return OGR_L_SetNextByIndex(self, new_index);
3501 : }
3502 : SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
3503 2057 : return OGR_L_SetFeature(self, feature);
3504 : }
3505 : SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
3506 32930 : return OGR_L_CreateFeature(self, feature);
3507 : }
3508 : SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,long fid){
3509 73 : return OGR_L_DeleteFeature(self, fid);
3510 : }
3511 : SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
3512 3 : return OGR_L_SyncToDisk(self);
3513 : }
3514 : SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
3515 31790 : return (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
3516 : }
3517 : SWIGINTERN int OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
3518 685 : return OGR_L_GetFeatureCount(self, force);
3519 : }
3520 : SWIGINTERN void OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int *isvalid=NULL,int force=1,int can_return_null=0){
3521 90 : OGRErr eErr = OGR_L_GetExtent(self, (OGREnvelope*)argout, force);
3522 90 : if (can_return_null)
3523 9 : *isvalid = (eErr == OGRERR_NONE);
3524 : else
3525 81 : *isvalid = TRUE;
3526 : return;
3527 : }
3528 : SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
3529 140 : return (OGR_L_TestCapability(self, cap) > 0);
3530 : }
3531 : SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
3532 4649 : return OGR_L_CreateField(self, field_def, approx_ok);
3533 : }
3534 : SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
3535 29 : return OGR_L_DeleteField(self, iField);
3536 : }
3537 : SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
3538 24 : return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
3539 : }
3540 : SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
3541 15 : if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
3542 : {
3543 : CPLError(CE_Failure, CPLE_IllegalArg,
3544 : "List should have %d elements",
3545 0 : OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
3546 0 : return OGRERR_FAILURE;
3547 : }
3548 15 : return OGR_L_ReorderFields(self, pList);
3549 : }
3550 : SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
3551 34 : return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
3552 : }
3553 : SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
3554 70 : return OGR_L_StartTransaction(self);
3555 : }
3556 : SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
3557 67 : return OGR_L_CommitTransaction(self);
3558 : }
3559 : SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
3560 4 : return OGR_L_RollbackTransaction(self);
3561 : }
3562 : SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
3563 254 : OGRSpatialReferenceH ref = OGR_L_GetSpatialRef(self);
3564 254 : if( ref )
3565 224 : OSRReference(ref);
3566 254 : return (OSRSpatialReferenceShadow*) ref;
3567 : }
3568 : SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
3569 0 : return OGR_L_GetFeaturesRead(self);
3570 : }
3571 : SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
3572 4 : return OGR_L_SetIgnoredFields( self, options );
3573 : }
3574 : SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
3575 3 : return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data );
3576 : }
3577 : SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
3578 4 : return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data );
3579 : }
3580 : SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
3581 3 : return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data );
3582 : }
3583 : SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
3584 3 : return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data );
3585 : }
3586 : SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
3587 4 : return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data );
3588 : }
3589 : SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
3590 2 : return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data );
3591 : }
3592 : SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
3593 3 : return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data );
3594 : }
3595 : SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
3596 93100 : OGR_F_Destroy(self);
3597 : }
3598 : SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
3599 32773 : return (OGRFeatureShadow*) OGR_F_Create( feature_def );
3600 : }
3601 : SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
3602 76 : return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
3603 : }
3604 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
3605 28984 : return OGR_F_SetGeometry(self, geom);
3606 : }
3607 : SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
3608 250 : return OGR_F_SetGeometryDirectly(self, geom);
3609 : }
3610 : SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
3611 55793 : return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
3612 : }
3613 : SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
3614 36 : return (OGRFeatureShadow*) OGR_F_Clone(self);
3615 : }
3616 : SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
3617 52 : return (OGR_F_Equal(self, feature) > 0);
3618 : }
3619 : SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
3620 4694 : return OGR_F_GetFieldCount(self);
3621 : }
3622 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
3623 11 : return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
3624 : }
3625 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *name){
3626 0 : int i = OGR_F_GetFieldIndex(self, name);
3627 0 : if (i == -1)
3628 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3629 : else
3630 0 : return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
3631 0 : return NULL;
3632 : }
3633 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
3634 3304 : return (const char *) OGR_F_GetFieldAsString(self, id);
3635 : }
3636 : SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *name){
3637 426 : int i = OGR_F_GetFieldIndex(self, name);
3638 426 : if (i == -1)
3639 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3640 : else
3641 426 : return (const char *) OGR_F_GetFieldAsString(self, i);
3642 0 : return NULL;
3643 : }
3644 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
3645 2762 : return OGR_F_GetFieldAsInteger(self, id);
3646 : }
3647 : SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *name){
3648 169 : int i = OGR_F_GetFieldIndex(self, name);
3649 169 : if (i == -1)
3650 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3651 : else
3652 169 : return OGR_F_GetFieldAsInteger(self, i);
3653 0 : return 0;
3654 : }
3655 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
3656 644 : return OGR_F_GetFieldAsDouble(self, id);
3657 : }
3658 :
3659 : #define SWIG_From_double PyFloat_FromDouble
3660 :
3661 : SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *name){
3662 12 : int i = OGR_F_GetFieldIndex(self, name);
3663 12 : if (i == -1)
3664 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3665 : else
3666 12 : return OGR_F_GetFieldAsDouble(self, i);
3667 0 : return 0;
3668 : }
3669 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,int *pnSecond,int *pnTZFlag){
3670 : OGR_F_GetFieldAsDateTime(self, id, pnYear, pnMonth, pnDay,
3671 : pnHour, pnMinute, pnSecond,
3672 1 : pnTZFlag);
3673 : }
3674 : SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
3675 6 : *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
3676 : }
3677 : SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
3678 19 : *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
3679 : }
3680 : SWIGINTERN char **OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id){
3681 3 : return OGR_F_GetFieldAsStringList(self, id);
3682 : }
3683 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
3684 4876 : return (OGR_F_IsFieldSet(self, id) > 0);
3685 : }
3686 : SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *name){
3687 112 : int i = OGR_F_GetFieldIndex(self, name);
3688 112 : if (i == -1)
3689 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3690 : else
3691 112 : return (OGR_F_IsFieldSet(self, i) > 0);
3692 0 : return false;
3693 : }
3694 : SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *name){
3695 2842 : return OGR_F_GetFieldIndex(self, name);
3696 : }
3697 : SWIGINTERN int OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
3698 382 : return OGR_F_GetFID(self);
3699 : }
3700 : SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,int fid){
3701 52 : return OGR_F_SetFID(self, fid);
3702 : }
3703 : SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
3704 0 : OGR_F_DumpReadable(self, NULL);
3705 : }
3706 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
3707 0 : OGR_F_UnsetField(self, id);
3708 : }
3709 : SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *name){
3710 1 : int i = OGR_F_GetFieldIndex(self, name);
3711 1 : if (i == -1)
3712 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3713 : else
3714 1 : OGR_F_UnsetField(self, i);
3715 : }
3716 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
3717 3278 : OGR_F_SetFieldString(self, id, value);
3718 : }
3719 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *name,char const *value){
3720 404 : int i = OGR_F_GetFieldIndex(self, name);
3721 404 : if (i == -1)
3722 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3723 : else
3724 404 : OGR_F_SetFieldString(self, i, value);
3725 : }
3726 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,int value){
3727 9273 : OGR_F_SetFieldInteger(self, id, value);
3728 : }
3729 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *name,int value){
3730 228 : int i = OGR_F_GetFieldIndex(self, name);
3731 228 : if (i == -1)
3732 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3733 : else
3734 228 : OGR_F_SetFieldInteger(self, i, value);
3735 : }
3736 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,double value){
3737 9 : OGR_F_SetFieldDouble(self, id, value);
3738 : }
3739 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *name,double value){
3740 112 : int i = OGR_F_GetFieldIndex(self, name);
3741 112 : if (i == -1)
3742 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3743 : else
3744 112 : OGR_F_SetFieldDouble(self, i, value);
3745 : }
3746 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_6(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,int second,int tzflag){
3747 : OGR_F_SetFieldDateTime(self, id, year, month, day,
3748 : hour, minute, second,
3749 24 : tzflag);
3750 : }
3751 : SWIGINTERN void OGRFeatureShadow_SetField__SWIG_7(OGRFeatureShadow *self,char const *name,int year,int month,int day,int hour,int minute,int second,int tzflag){
3752 1 : int i = OGR_F_GetFieldIndex(self, name);
3753 1 : if (i == -1)
3754 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3755 : else
3756 : OGR_F_SetFieldDateTime(self, i, year, month, day,
3757 : hour, minute, second,
3758 1 : tzflag);
3759 : }
3760 : SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
3761 6 : OGR_F_SetFieldIntegerList(self, id, nList, pList);
3762 : }
3763 : SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList(OGRFeatureShadow *self,int id,int nList,double *pList){
3764 29 : OGR_F_SetFieldDoubleList(self, id, nList, pList);
3765 : }
3766 : SWIGINTERN void OGRFeatureShadow_SetFieldStringList(OGRFeatureShadow *self,int id,char **pList){
3767 14 : OGR_F_SetFieldStringList(self, id, pList);
3768 : }
3769 : SWIGINTERN OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
3770 241 : return OGR_F_SetFrom(self, other, forgiving);
3771 : }
3772 : SWIGINTERN OGRErr OGRFeatureShadow_SetFromWithMap(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving,int nList,int *pList){
3773 381 : if (nList != OGR_F_GetFieldCount(other))
3774 : {
3775 : CPLError(CE_Failure, CPLE_AppDefined,
3776 0 : "The size of map doesn't match with the field count of the source feature");
3777 0 : return OGRERR_FAILURE;
3778 : }
3779 381 : return OGR_F_SetFromWithMap(self, other, forgiving, pList);
3780 : }
3781 : SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
3782 89 : return (const char*) OGR_F_GetStyleString(self);
3783 : }
3784 : SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
3785 35 : OGR_F_SetStyleString(self, the_string);
3786 : }
3787 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
3788 4136 : return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, id));
3789 : }
3790 : SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *name){
3791 0 : int i = OGR_F_GetFieldIndex(self, name);
3792 0 : if (i == -1) {
3793 0 : CPLError(CE_Failure, 1, "No such field: '%s'", name);
3794 0 : return (OGRFieldType)0;
3795 : } else
3796 : return (OGRFieldType) OGR_Fld_GetType(
3797 : OGR_F_GetFieldDefnRef( self, i )
3798 0 : );
3799 : }
3800 : SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
3801 : /*OGR_FD_Destroy(self);*/
3802 24 : OGR_FD_Release( OGRFeatureDefnH(self) );
3803 : }
3804 : SWIGINTERN OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name_null_ok=NULL){
3805 24 : OGRFeatureDefnH h = OGR_FD_Create(name_null_ok);
3806 24 : OGR_FD_Reference(h);
3807 24 : return (OGRFeatureDefnShadow* )h;
3808 : }
3809 : SWIGINTERN char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
3810 114 : return OGR_FD_GetName(self);
3811 : }
3812 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
3813 418 : return OGR_FD_GetFieldCount(self);
3814 : }
3815 : SWIGINTERN OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
3816 1294 : return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
3817 : }
3818 : SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *name){
3819 836 : return OGR_FD_GetFieldIndex(self, name);
3820 : }
3821 : SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
3822 210 : OGR_FD_AddFieldDefn(self, defn);
3823 : }
3824 : SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
3825 135 : return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
3826 : }
3827 : SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
3828 0 : OGR_FD_SetGeomType(self, geom_type);
3829 : }
3830 : SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
3831 0 : return OGR_FD_GetReferenceCount(self);
3832 : }
3833 : SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
3834 6 : return OGR_FD_IsGeometryIgnored(self);
3835 : }
3836 : SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
3837 3 : return OGR_FD_SetGeometryIgnored(self,bIgnored);
3838 : }
3839 : SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
3840 3 : return OGR_FD_IsStyleIgnored(self);
3841 : }
3842 : SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
3843 0 : return OGR_FD_SetStyleIgnored(self,bIgnored);
3844 : }
3845 :
3846 : static int ValidateOGRFieldType(OGRFieldType field_type)
3847 : {
3848 4724 : switch(field_type)
3849 : {
3850 : case OFTInteger:
3851 : case OFTIntegerList:
3852 : case OFTReal:
3853 : case OFTRealList:
3854 : case OFTString:
3855 : case OFTStringList:
3856 : case OFTBinary:
3857 : case OFTDate:
3858 : case OFTTime:
3859 : case OFTDateTime:
3860 4724 : return TRUE;
3861 : default:
3862 0 : CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
3863 0 : return FALSE;
3864 : }
3865 : }
3866 :
3867 : SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
3868 4724 : OGR_Fld_Destroy(self);
3869 : }
3870 : SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
3871 4724 : if (ValidateOGRFieldType(field_type))
3872 4724 : return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
3873 : else
3874 0 : return NULL;
3875 : }
3876 : SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
3877 258 : return (const char *) OGR_Fld_GetNameRef(self);
3878 : }
3879 : SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
3880 526 : return (const char *) OGR_Fld_GetNameRef(self);
3881 : }
3882 : SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
3883 1 : OGR_Fld_SetName(self, name);
3884 : }
3885 : SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
3886 601 : return OGR_Fld_GetType(self);
3887 : }
3888 : SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
3889 0 : if (ValidateOGRFieldType(type))
3890 0 : OGR_Fld_SetType(self, type);
3891 : }
3892 : SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
3893 0 : return OGR_Fld_GetJustify(self);
3894 : }
3895 : SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
3896 0 : OGR_Fld_SetJustify(self, justify);
3897 : }
3898 : SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
3899 520 : return OGR_Fld_GetWidth(self);
3900 : }
3901 : SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
3902 191 : OGR_Fld_SetWidth(self, width);
3903 : }
3904 : SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
3905 210 : return OGR_Fld_GetPrecision(self);
3906 : }
3907 : SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
3908 128 : OGR_Fld_SetPrecision(self, precision);
3909 : }
3910 : SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
3911 0 : return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
3912 : }
3913 : SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
3914 32 : return OGR_GetFieldTypeName(type);
3915 : }
3916 : SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
3917 6 : return OGR_Fld_IsIgnored( self );
3918 : }
3919 : SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
3920 0 : return OGR_Fld_SetIgnored( self, bIgnored );
3921 : }
3922 :
3923 72 : OGRGeometryShadow* CreateGeometryFromWkb( int len, char *bin_string,
3924 : OSRSpatialReferenceShadow *reference=NULL ) {
3925 72 : OGRGeometryH geom = NULL;
3926 : OGRErr err = OGR_G_CreateFromWkb( (unsigned char *) bin_string,
3927 : reference,
3928 : &geom,
3929 72 : len );
3930 72 : if (err != 0 ) {
3931 2 : CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
3932 2 : return NULL;
3933 : }
3934 70 : return (OGRGeometryShadow*) geom;
3935 : }
3936 :
3937 :
3938 :
3939 30325 : OGRGeometryShadow* CreateGeometryFromWkt( char **val,
3940 : OSRSpatialReferenceShadow *reference=NULL ) {
3941 30325 : OGRGeometryH geom = NULL;
3942 : OGRErr err = OGR_G_CreateFromWkt(val,
3943 : reference,
3944 30325 : &geom);
3945 30325 : if (err != 0 ) {
3946 175 : CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
3947 175 : return NULL;
3948 : }
3949 30150 : return (OGRGeometryShadow*) geom;
3950 : }
3951 :
3952 :
3953 :
3954 171 : OGRGeometryShadow *CreateGeometryFromGML( const char * input_string ) {
3955 171 : OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateFromGML(input_string);
3956 171 : return geom;
3957 : }
3958 :
3959 :
3960 :
3961 0 : OGRGeometryShadow *CreateGeometryFromJson( const char * input_string ) {
3962 0 : OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromJson(input_string);
3963 0 : return geom;
3964 : }
3965 :
3966 :
3967 :
3968 5 : OGRGeometryShadow* BuildPolygonFromEdges( OGRGeometryShadow* hLineCollection,
3969 : int bBestEffort = 0,
3970 : int bAutoClose = 0,
3971 : double dfTolerance=0) {
3972 :
3973 5 : OGRGeometryH hPolygon = NULL;
3974 :
3975 : OGRErr eErr;
3976 :
3977 : hPolygon = OGRBuildPolygonFromEdges( hLineCollection, bBestEffort,
3978 5 : bAutoClose, dfTolerance, &eErr );
3979 :
3980 5 : if (eErr != OGRERR_NONE ) {
3981 2 : CPLError(CE_Failure, eErr, "%s", OGRErrMessages(eErr));
3982 2 : return NULL;
3983 : }
3984 :
3985 3 : return (OGRGeometryShadow* )hPolygon;
3986 : }
3987 :
3988 :
3989 1 : OGRGeometryShadow* ApproximateArcAngles(
3990 : double dfCenterX, double dfCenterY, double dfZ,
3991 : double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation,
3992 : double dfStartAngle, double dfEndAngle,
3993 : double dfMaxAngleStepSizeDegrees ) {
3994 :
3995 : return (OGRGeometryShadow* )OGR_G_ApproximateArcAngles(
3996 : dfCenterX, dfCenterY, dfZ,
3997 : dfPrimaryRadius, dfSecondaryAxis, dfRotation,
3998 1 : dfStartAngle, dfEndAngle, dfMaxAngleStepSizeDegrees );
3999 : }
4000 :
4001 :
4002 36 : OGRGeometryShadow* ForceToPolygon( OGRGeometryShadow *geom_in ) {
4003 36 : if (geom_in == NULL)
4004 1 : return NULL;
4005 35 : return (OGRGeometryShadow* )OGR_G_ForceToPolygon( OGR_G_Clone(geom_in) );
4006 : }
4007 :
4008 :
4009 32 : OGRGeometryShadow* ForceToLineString( OGRGeometryShadow *geom_in ) {
4010 32 : if (geom_in == NULL)
4011 1 : return NULL;
4012 31 : return (OGRGeometryShadow* )OGR_G_ForceToLineString( OGR_G_Clone(geom_in) );
4013 : }
4014 :
4015 :
4016 31 : OGRGeometryShadow* ForceToMultiPolygon( OGRGeometryShadow *geom_in ) {
4017 31 : if (geom_in == NULL)
4018 1 : return NULL;
4019 30 : return (OGRGeometryShadow* )OGR_G_ForceToMultiPolygon( OGR_G_Clone(geom_in) );
4020 : }
4021 :
4022 :
4023 27 : OGRGeometryShadow* ForceToMultiPoint( OGRGeometryShadow *geom_in ) {
4024 27 : if (geom_in == NULL)
4025 1 : return NULL;
4026 26 : return (OGRGeometryShadow* )OGR_G_ForceToMultiPoint( OGR_G_Clone(geom_in) );
4027 : }
4028 :
4029 :
4030 29 : OGRGeometryShadow* ForceToMultiLineString( OGRGeometryShadow *geom_in ) {
4031 29 : if (geom_in == NULL)
4032 1 : return NULL;
4033 28 : return (OGRGeometryShadow* )OGR_G_ForceToMultiLineString( OGR_G_Clone(geom_in) );
4034 : }
4035 :
4036 : SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){
4037 49014 : OGR_G_DestroyGeometry( self );
4038 : }
4039 : SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow(OGRwkbGeometryType type=wkbUnknown,char *wkt=0,int wkb=0,char *wkb_buf=0,char *gml=0){
4040 67 : if (type != wkbUnknown ) {
4041 40 : return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
4042 : }
4043 27 : else if ( wkt != 0 ) {
4044 26 : return CreateGeometryFromWkt( &wkt );
4045 : }
4046 1 : else if ( wkb != 0 ) {
4047 0 : return CreateGeometryFromWkb( wkb, wkb_buf );
4048 : }
4049 1 : else if ( gml != 0 ) {
4050 0 : return CreateGeometryFromGML( gml );
4051 : }
4052 : // throw?
4053 : else {
4054 1 : CPLError(CE_Failure, 1, "Empty geometries cannot be constructed");
4055 1 : return NULL;}
4056 :
4057 : }
4058 :
4059 : #define t_output_helper SWIG_Python_AppendOutput
4060 :
4061 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
4062 1168 : return OGR_G_ExportToWkt(self, argout);
4063 : }
4064 : SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
4065 57 : *nLen = OGR_G_WkbSize( self );
4066 57 : *pBuf = (char *) malloc( *nLen * sizeof(unsigned char) );
4067 57 : return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
4068 : }
4069 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self,char **options=0){
4070 41 : return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
4071 : }
4072 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
4073 0 : return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
4074 : }
4075 : SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self,char **options=0){
4076 2 : return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
4077 : }
4078 : SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
4079 10 : OGR_G_AddPoint( self, x, y, z );
4080 : }
4081 : SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
4082 40 : OGR_G_AddPoint_2D( self, x, y );
4083 : }
4084 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
4085 1 : return OGR_G_AddGeometryDirectly( self, other_disown );
4086 : }
4087 : SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
4088 49 : return OGR_G_AddGeometry( self, other );
4089 : }
4090 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
4091 18653 : return (OGRGeometryShadow*) OGR_G_Clone(self);
4092 : }
4093 : SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
4094 183 : return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
4095 : }
4096 : SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
4097 2992 : return (const char *) OGR_G_GetGeometryName(self);
4098 : }
4099 : SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
4100 12 : return OGR_G_Length(self);
4101 : }
4102 : SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
4103 3 : return OGR_G_Area(self);
4104 : }
4105 : SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
4106 5 : return OGR_G_Area(self);
4107 : }
4108 : SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
4109 3906 : return OGR_G_GetPointCount(self);
4110 : }
4111 11 : SWIGINTERN void OGRGeometryShadow_GetPoints(OGRGeometryShadow *self,int *pnCount,double **ppadfXY,double **ppadfZ,int nCoordDimension=0){
4112 11 : int nPoints = OGR_G_GetPointCount(self);
4113 11 : *pnCount = nPoints;
4114 11 : if (nPoints == 0)
4115 : {
4116 0 : *ppadfXY = NULL;
4117 0 : *ppadfZ = NULL;
4118 : }
4119 11 : *ppadfXY = (double*)VSIMalloc(2 * sizeof(double) * nPoints);
4120 11 : if (*ppadfXY == NULL)
4121 : {
4122 0 : CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate resulting array");
4123 0 : *pnCount = 0;
4124 0 : return;
4125 : }
4126 11 : if (nCoordDimension <= 0)
4127 7 : nCoordDimension = OGR_G_GetCoordinateDimension(self);
4128 11 : *ppadfZ = (nCoordDimension == 3) ? (double*)VSIMalloc(sizeof(double) * nPoints) : NULL;
4129 : OGR_G_GetPoints(self,
4130 : *ppadfXY, 2 * sizeof(double),
4131 : (*ppadfXY) + 1, 2 * sizeof(double),
4132 11 : *ppadfZ, sizeof(double));
4133 : }
4134 : SWIGINTERN double OGRGeometryShadow_GetX(OGRGeometryShadow *self,int point=0){
4135 17620 : return OGR_G_GetX(self, point);
4136 : }
4137 : SWIGINTERN double OGRGeometryShadow_GetY(OGRGeometryShadow *self,int point=0){
4138 17620 : return OGR_G_GetY(self, point);
4139 : }
4140 : SWIGINTERN double OGRGeometryShadow_GetZ(OGRGeometryShadow *self,int point=0){
4141 17374 : return OGR_G_GetZ(self, point);
4142 : }
4143 :
4144 : static PyObject *
4145 17574 : CreateTupleFromDoubleArray( double *first, unsigned int size ) {
4146 17574 : PyObject *out = PyTuple_New( size );
4147 87876 : for( unsigned int i=0; i<size; i++ ) {
4148 70302 : PyObject *val = PyFloat_FromDouble( *first );
4149 70302 : ++first;
4150 70302 : PyTuple_SetItem( out, i, val );
4151 : }
4152 17574 : return out;
4153 : }
4154 :
4155 : SWIGINTERN void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint=0,double argout[3]=NULL){
4156 :
4157 4 : OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
4158 : }
4159 : SWIGINTERN void OGRGeometryShadow_GetPoint_2D(OGRGeometryShadow *self,int iPoint=0,double argout[2]=NULL){
4160 :
4161 2 : OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
4162 : }
4163 : SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
4164 4891 : return OGR_G_GetGeometryCount(self);
4165 : }
4166 : SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
4167 250 : OGR_G_SetPoint(self, point, x, y, z);
4168 : }
4169 : SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
4170 1 : OGR_G_SetPoint_2D(self, point, x, y);
4171 : }
4172 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
4173 1567 : return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
4174 : }
4175 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
4176 1 : return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
4177 : }
4178 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SimplifyPreserveTopology(OGRGeometryShadow *self,double tolerance){
4179 1 : return (OGRGeometryShadow*) OGR_G_SimplifyPreserveTopology(self, tolerance);
4180 : }
4181 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Boundary(OGRGeometryShadow *self){
4182 1 : return (OGRGeometryShadow*) OGR_G_Boundary(self);
4183 : }
4184 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
4185 5 : return (OGRGeometryShadow*) OGR_G_Boundary(self);
4186 : }
4187 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
4188 1 : return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
4189 : }
4190 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
4191 2 : return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
4192 : }
4193 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
4194 49 : return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
4195 : }
4196 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
4197 7 : return (OGRGeometryShadow*) OGR_G_Union( self, other );
4198 : }
4199 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
4200 1 : return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
4201 : }
4202 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
4203 5 : return (OGRGeometryShadow*) OGR_G_Difference( self, other );
4204 : }
4205 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
4206 5 : return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
4207 : }
4208 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
4209 1 : return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
4210 : }
4211 : SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
4212 1 : return OGR_G_Distance(self, other);
4213 : }
4214 : SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
4215 2 : OGR_G_Empty(self);
4216 : }
4217 : SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
4218 63 : return (OGR_G_IsEmpty(self) > 0);
4219 : }
4220 : SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
4221 6 : return (OGR_G_IsValid(self) > 0);
4222 : }
4223 : SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
4224 5 : return (OGR_G_IsSimple(self) > 0);
4225 : }
4226 : SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
4227 1 : return (OGR_G_IsRing(self) > 0);
4228 : }
4229 : SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
4230 4 : return (OGR_G_Intersects(self, other) > 0);
4231 : }
4232 : SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
4233 2 : return (OGR_G_Intersects(self, other) > 0);
4234 : }
4235 : SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
4236 35565 : return (OGR_G_Equals(self, other) > 0);
4237 : }
4238 : SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
4239 1 : return (OGR_G_Equals(self, other) > 0);
4240 : }
4241 : SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
4242 6 : return (OGR_G_Disjoint(self, other) > 0);
4243 : }
4244 : SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
4245 6 : return (OGR_G_Touches(self, other) > 0);
4246 : }
4247 : SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
4248 6 : return (OGR_G_Crosses(self, other) > 0);
4249 : }
4250 : SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
4251 7 : return (OGR_G_Within(self, other) > 0);
4252 : }
4253 : SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
4254 6 : return (OGR_G_Contains(self, other) > 0);
4255 : }
4256 : SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
4257 6 : return (OGR_G_Overlaps(self, other) > 0);
4258 : }
4259 : SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
4260 1 : return OGR_G_TransformTo(self, reference);
4261 : }
4262 : SWIGINTERN OGRErr OGRGeometryShadow_Transform(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
4263 12 : return OGR_G_Transform(self, trans);
4264 : }
4265 : SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
4266 10 : OGRSpatialReferenceH ref = OGR_G_GetSpatialReference(self);
4267 10 : if( ref )
4268 10 : OSRReference(ref);
4269 10 : return (OSRSpatialReferenceShadow*) ref;
4270 : }
4271 : SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
4272 332 : OGR_G_AssignSpatialReference(self, reference);
4273 : }
4274 : SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
4275 4 : OGR_G_CloseRings(self);
4276 : }
4277 : SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
4278 1 : OGR_G_FlattenTo2D(self);
4279 : }
4280 : SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
4281 1 : OGR_G_Segmentize(self, dfMaxLength);
4282 : }
4283 : SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
4284 17471 : OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
4285 : }
4286 : SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
4287 7 : OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
4288 : }
4289 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
4290 4 : OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
4291 4 : OGR_G_Centroid( self, pt );
4292 4 : return pt;
4293 : }
4294 : SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){
4295 1 : return (OGRGeometryShadow*) OGR_G_PointOnSurface( self );
4296 : }
4297 : SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
4298 0 : return OGR_G_WkbSize(self);
4299 : }
4300 : SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
4301 41 : return OGR_G_GetCoordinateDimension(self);
4302 : }
4303 : SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
4304 20 : OGR_G_SetCoordinateDimension(self, dimension);
4305 : }
4306 : SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
4307 1 : return OGR_G_GetDimension(self);
4308 : }
4309 :
4310 0 : char const *OGRDriverShadow_get_name( OGRDriverShadow *h ) {
4311 0 : return OGR_Dr_GetName( h );
4312 : }
4313 :
4314 0 : char const *OGRDataSourceShadow_get_name( OGRDataSourceShadow *h ) {
4315 0 : return OGR_DS_GetName( h );
4316 : }
4317 :
4318 0 : char const *OGRDriverShadow_name_get( OGRDriverShadow *h ) {
4319 0 : return OGR_Dr_GetName( h );
4320 : }
4321 :
4322 0 : char const *OGRDataSourceShadow_name_get( OGRDataSourceShadow *h ) {
4323 0 : return OGR_DS_GetName( h );
4324 : }
4325 :
4326 :
4327 1 : OGRDataSourceShadow* GetOpenDS(int ds_number) {
4328 1 : OGRDataSourceShadow* layer = (OGRDataSourceShadow*) OGRGetOpenDS(ds_number);
4329 1 : return layer;
4330 : }
4331 :
4332 :
4333 921 : OGRDataSourceShadow* Open( const char *utf8_path, int update =0 ) {
4334 921 : CPLErrorReset();
4335 921 : OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpen(utf8_path,update,NULL);
4336 921 : if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
4337 : {
4338 : CPLDebug( "SWIG",
4339 : "OGROpen() succeeded, but an error is posted, so we destroy"
4340 4 : " the datasource and fail at swig level." );
4341 4 : OGRReleaseDataSource(ds);
4342 4 : ds = NULL;
4343 : }
4344 :
4345 921 : return ds;
4346 : }
4347 :
4348 :
4349 9 : OGRDataSourceShadow* OpenShared( const char *utf8_path, int update =0 ) {
4350 9 : CPLErrorReset();
4351 9 : OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpenShared(utf8_path,update,NULL);
4352 9 : if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
4353 : {
4354 0 : OGRReleaseDataSource(ds);
4355 0 : ds = NULL;
4356 : }
4357 :
4358 9 : return ds;
4359 : }
4360 :
4361 :
4362 528 : OGRDriverShadow* GetDriverByName( char const *name ) {
4363 528 : return (OGRDriverShadow*) OGRGetDriverByName( name );
4364 : }
4365 :
4366 0 : OGRDriverShadow* GetDriver(int driver_number) {
4367 0 : return (OGRDriverShadow*) OGRGetDriver(driver_number);
4368 : }
4369 :
4370 :
4371 55 : char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
4372 : int nResArgCount;
4373 :
4374 : nResArgCount =
4375 55 : OGRGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );
4376 :
4377 55 : if( nResArgCount <= 0 )
4378 0 : return NULL;
4379 : else
4380 55 : return papszArgv;
4381 : }
4382 :
4383 :
4384 0 : int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
4385 0 : return GDALTermProgress( dfProgress, pszMessage, pData);
4386 : }
4387 :
4388 : #ifdef __cplusplus
4389 : extern "C" {
4390 : #endif
4391 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4392 0 : PyObject *resultobj = 0;
4393 : int result;
4394 :
4395 0 : if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
4396 0 : result = (int)GetUseExceptions();
4397 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4398 0 : return resultobj;
4399 : fail:
4400 0 : return NULL;
4401 : }
4402 :
4403 :
4404 0 : SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4405 0 : PyObject *resultobj = 0;
4406 :
4407 0 : if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
4408 0 : UseExceptions();
4409 0 : resultobj = SWIG_Py_Void();
4410 0 : return resultobj;
4411 : fail:
4412 0 : return NULL;
4413 : }
4414 :
4415 :
4416 0 : SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4417 0 : PyObject *resultobj = 0;
4418 :
4419 0 : if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
4420 0 : DontUseExceptions();
4421 0 : resultobj = SWIG_Py_Void();
4422 0 : return resultobj;
4423 : fail:
4424 0 : return NULL;
4425 : }
4426 :
4427 :
4428 0 : SWIGINTERN PyObject *_wrap_Driver_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4429 0 : PyObject *resultobj = 0;
4430 0 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4431 0 : void *argp1 = 0 ;
4432 0 : int res1 = 0 ;
4433 0 : PyObject * obj0 = 0 ;
4434 0 : char *result = 0 ;
4435 :
4436 0 : if (!PyArg_ParseTuple(args,(char *)"O:Driver_name_get",&obj0)) SWIG_fail;
4437 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4438 0 : if (!SWIG_IsOK(res1)) {
4439 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_name_get" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4440 : }
4441 0 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4442 : {
4443 0 : if ( bUseExceptions ) {
4444 0 : CPLErrorReset();
4445 : }
4446 0 : result = (char *)OGRDriverShadow_name_get(arg1);
4447 0 : if ( bUseExceptions ) {
4448 0 : CPLErr eclass = CPLGetLastErrorType();
4449 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4450 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4451 : }
4452 : }
4453 : }
4454 0 : resultobj = SWIG_FromCharPtr((const char *)result);
4455 0 : return resultobj;
4456 : fail:
4457 0 : return NULL;
4458 : }
4459 :
4460 :
4461 289 : SWIGINTERN PyObject *_wrap_Driver_CreateDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4462 289 : PyObject *resultobj = 0;
4463 289 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4464 289 : char *arg2 = (char *) 0 ;
4465 289 : char **arg3 = (char **) 0 ;
4466 289 : void *argp1 = 0 ;
4467 289 : int res1 = 0 ;
4468 289 : int bToFree2 = 0 ;
4469 289 : PyObject * obj0 = 0 ;
4470 289 : PyObject * obj1 = 0 ;
4471 289 : PyObject * obj2 = 0 ;
4472 : char * kwnames[] = {
4473 : (char *) "self",(char *) "utf8_path",(char *) "options", NULL
4474 289 : };
4475 289 : OGRDataSourceShadow *result = 0 ;
4476 :
4477 289 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_CreateDataSource",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
4478 289 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4479 289 : if (!SWIG_IsOK(res1)) {
4480 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4481 : }
4482 289 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4483 : {
4484 : /* %typemap(in) (const char *utf8_path) */
4485 289 : arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
4486 289 : if (arg2 == NULL)
4487 : {
4488 0 : PyErr_SetString( PyExc_RuntimeError, "not a string" );
4489 0 : SWIG_fail;
4490 : }
4491 : }
4492 289 : if (obj2) {
4493 : {
4494 : /* %typemap(in) char **options */
4495 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
4496 74 : if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
4497 : #if PY_VERSION_HEX < 0x03000000
4498 : || PyString_Check(obj2)
4499 : #endif
4500 : ) {
4501 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
4502 0 : SWIG_fail;
4503 : }
4504 :
4505 74 : int size = PySequence_Size(obj2);
4506 120 : for (int i = 0; i < size; i++) {
4507 46 : PyObject* pyObj = PySequence_GetItem(obj2,i);
4508 46 : if (PyUnicode_Check(pyObj))
4509 : {
4510 : char *pszStr;
4511 : Py_ssize_t nLen;
4512 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
4513 : #if PY_VERSION_HEX >= 0x03000000
4514 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
4515 : #else
4516 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
4517 : #endif
4518 0 : arg3 = CSLAddString( arg3, pszStr );
4519 0 : Py_XDECREF(pyUTF8Str);
4520 : }
4521 : #if PY_VERSION_HEX >= 0x03000000
4522 : else if (PyBytes_Check(pyObj))
4523 : arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
4524 : #else
4525 46 : else if (PyString_Check(pyObj))
4526 46 : arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
4527 : #endif
4528 : else
4529 : {
4530 0 : Py_DECREF(pyObj);
4531 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
4532 0 : SWIG_fail;
4533 : }
4534 46 : Py_DECREF(pyObj);
4535 : }
4536 : }
4537 : }
4538 : {
4539 289 : if ( bUseExceptions ) {
4540 0 : CPLErrorReset();
4541 : }
4542 289 : result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource(arg1,(char const *)arg2,arg3);
4543 289 : if ( bUseExceptions ) {
4544 0 : CPLErr eclass = CPLGetLastErrorType();
4545 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4546 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4547 : }
4548 : }
4549 : }
4550 289 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN | 0 );
4551 : {
4552 : /* %typemap(freearg) (const char *utf8_path) */
4553 289 : GDALPythonFreeCStr(arg2, bToFree2);
4554 : }
4555 : {
4556 : /* %typemap(freearg) char **options */
4557 289 : CSLDestroy( arg3 );
4558 : }
4559 289 : return resultobj;
4560 : fail:
4561 : {
4562 : /* %typemap(freearg) (const char *utf8_path) */
4563 0 : GDALPythonFreeCStr(arg2, bToFree2);
4564 : }
4565 : {
4566 : /* %typemap(freearg) char **options */
4567 0 : CSLDestroy( arg3 );
4568 : }
4569 0 : return NULL;
4570 : }
4571 :
4572 :
4573 1 : SWIGINTERN PyObject *_wrap_Driver_CopyDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4574 1 : PyObject *resultobj = 0;
4575 1 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4576 1 : OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
4577 1 : char *arg3 = (char *) 0 ;
4578 1 : char **arg4 = (char **) 0 ;
4579 1 : void *argp1 = 0 ;
4580 1 : int res1 = 0 ;
4581 1 : void *argp2 = 0 ;
4582 1 : int res2 = 0 ;
4583 1 : int bToFree3 = 0 ;
4584 1 : PyObject * obj0 = 0 ;
4585 1 : PyObject * obj1 = 0 ;
4586 1 : PyObject * obj2 = 0 ;
4587 1 : PyObject * obj3 = 0 ;
4588 : char * kwnames[] = {
4589 : (char *) "self",(char *) "copy_ds",(char *) "utf8_path",(char *) "options", NULL
4590 1 : };
4591 1 : OGRDataSourceShadow *result = 0 ;
4592 :
4593 1 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Driver_CopyDataSource",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4594 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4595 1 : if (!SWIG_IsOK(res1)) {
4596 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4597 : }
4598 1 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4599 1 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
4600 1 : if (!SWIG_IsOK(res2)) {
4601 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyDataSource" "', argument " "2"" of type '" "OGRDataSourceShadow *""'");
4602 : }
4603 1 : arg2 = reinterpret_cast< OGRDataSourceShadow * >(argp2);
4604 : {
4605 : /* %typemap(in) (const char *utf8_path) */
4606 1 : arg3 = GDALPythonObjectToCStr( obj2, &bToFree3 );
4607 1 : if (arg3 == NULL)
4608 : {
4609 0 : PyErr_SetString( PyExc_RuntimeError, "not a string" );
4610 0 : SWIG_fail;
4611 : }
4612 : }
4613 1 : if (obj3) {
4614 : {
4615 : /* %typemap(in) char **options */
4616 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
4617 0 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
4618 : #if PY_VERSION_HEX < 0x03000000
4619 : || PyString_Check(obj3)
4620 : #endif
4621 : ) {
4622 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
4623 0 : SWIG_fail;
4624 : }
4625 :
4626 0 : int size = PySequence_Size(obj3);
4627 0 : for (int i = 0; i < size; i++) {
4628 0 : PyObject* pyObj = PySequence_GetItem(obj3,i);
4629 0 : if (PyUnicode_Check(pyObj))
4630 : {
4631 : char *pszStr;
4632 : Py_ssize_t nLen;
4633 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
4634 : #if PY_VERSION_HEX >= 0x03000000
4635 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
4636 : #else
4637 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
4638 : #endif
4639 0 : arg4 = CSLAddString( arg4, pszStr );
4640 0 : Py_XDECREF(pyUTF8Str);
4641 : }
4642 : #if PY_VERSION_HEX >= 0x03000000
4643 : else if (PyBytes_Check(pyObj))
4644 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
4645 : #else
4646 0 : else if (PyString_Check(pyObj))
4647 0 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
4648 : #endif
4649 : else
4650 : {
4651 0 : Py_DECREF(pyObj);
4652 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
4653 0 : SWIG_fail;
4654 : }
4655 0 : Py_DECREF(pyObj);
4656 : }
4657 : }
4658 : }
4659 : {
4660 1 : if ( bUseExceptions ) {
4661 0 : CPLErrorReset();
4662 : }
4663 1 : result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource(arg1,arg2,(char const *)arg3,arg4);
4664 1 : if ( bUseExceptions ) {
4665 0 : CPLErr eclass = CPLGetLastErrorType();
4666 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4667 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4668 : }
4669 : }
4670 : }
4671 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN | 0 );
4672 : {
4673 : /* %typemap(freearg) (const char *utf8_path) */
4674 1 : GDALPythonFreeCStr(arg3, bToFree3);
4675 : }
4676 : {
4677 : /* %typemap(freearg) char **options */
4678 1 : CSLDestroy( arg4 );
4679 : }
4680 1 : return resultobj;
4681 : fail:
4682 : {
4683 : /* %typemap(freearg) (const char *utf8_path) */
4684 0 : GDALPythonFreeCStr(arg3, bToFree3);
4685 : }
4686 : {
4687 : /* %typemap(freearg) char **options */
4688 0 : CSLDestroy( arg4 );
4689 : }
4690 0 : return NULL;
4691 : }
4692 :
4693 :
4694 56 : SWIGINTERN PyObject *_wrap_Driver_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4695 56 : PyObject *resultobj = 0;
4696 56 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4697 56 : char *arg2 = (char *) 0 ;
4698 56 : int arg3 = (int) 0 ;
4699 56 : void *argp1 = 0 ;
4700 56 : int res1 = 0 ;
4701 56 : int bToFree2 = 0 ;
4702 : int val3 ;
4703 56 : int ecode3 = 0 ;
4704 56 : PyObject * obj0 = 0 ;
4705 56 : PyObject * obj1 = 0 ;
4706 56 : PyObject * obj2 = 0 ;
4707 : char * kwnames[] = {
4708 : (char *) "self",(char *) "utf8_path",(char *) "update", NULL
4709 56 : };
4710 56 : OGRDataSourceShadow *result = 0 ;
4711 :
4712 56 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_Open",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
4713 56 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4714 56 : if (!SWIG_IsOK(res1)) {
4715 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Open" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4716 : }
4717 56 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4718 : {
4719 : /* %typemap(in) (const char *utf8_path) */
4720 56 : arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
4721 56 : if (arg2 == NULL)
4722 : {
4723 0 : PyErr_SetString( PyExc_RuntimeError, "not a string" );
4724 0 : SWIG_fail;
4725 : }
4726 : }
4727 56 : if (obj2) {
4728 48 : ecode3 = SWIG_AsVal_int(obj2, &val3);
4729 48 : if (!SWIG_IsOK(ecode3)) {
4730 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Open" "', argument " "3"" of type '" "int""'");
4731 : }
4732 48 : arg3 = static_cast< int >(val3);
4733 : }
4734 : {
4735 56 : if ( bUseExceptions ) {
4736 0 : CPLErrorReset();
4737 : }
4738 56 : result = (OGRDataSourceShadow *)OGRDriverShadow_Open(arg1,(char const *)arg2,arg3);
4739 56 : if ( bUseExceptions ) {
4740 0 : CPLErr eclass = CPLGetLastErrorType();
4741 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4742 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4743 : }
4744 : }
4745 : }
4746 56 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN | 0 );
4747 : {
4748 : /* %typemap(freearg) (const char *utf8_path) */
4749 56 : GDALPythonFreeCStr(arg2, bToFree2);
4750 : }
4751 56 : return resultobj;
4752 : fail:
4753 : {
4754 : /* %typemap(freearg) (const char *utf8_path) */
4755 0 : GDALPythonFreeCStr(arg2, bToFree2);
4756 : }
4757 0 : return NULL;
4758 : }
4759 :
4760 :
4761 166 : SWIGINTERN PyObject *_wrap_Driver_DeleteDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4762 166 : PyObject *resultobj = 0;
4763 166 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4764 166 : char *arg2 = (char *) 0 ;
4765 166 : void *argp1 = 0 ;
4766 166 : int res1 = 0 ;
4767 166 : int bToFree2 = 0 ;
4768 166 : PyObject * obj0 = 0 ;
4769 166 : PyObject * obj1 = 0 ;
4770 : int result;
4771 :
4772 166 : if (!PyArg_ParseTuple(args,(char *)"OO:Driver_DeleteDataSource",&obj0,&obj1)) SWIG_fail;
4773 166 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4774 166 : if (!SWIG_IsOK(res1)) {
4775 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_DeleteDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4776 : }
4777 166 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4778 : {
4779 : /* %typemap(in) (const char *utf8_path) */
4780 166 : arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
4781 166 : if (arg2 == NULL)
4782 : {
4783 0 : PyErr_SetString( PyExc_RuntimeError, "not a string" );
4784 0 : SWIG_fail;
4785 : }
4786 : }
4787 : {
4788 166 : if ( bUseExceptions ) {
4789 0 : CPLErrorReset();
4790 : }
4791 166 : result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
4792 166 : if ( bUseExceptions ) {
4793 0 : CPLErr eclass = CPLGetLastErrorType();
4794 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4795 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4796 : }
4797 : }
4798 : }
4799 166 : resultobj = SWIG_From_int(static_cast< int >(result));
4800 : {
4801 : /* %typemap(freearg) (const char *utf8_path) */
4802 166 : GDALPythonFreeCStr(arg2, bToFree2);
4803 : }
4804 166 : return resultobj;
4805 : fail:
4806 : {
4807 : /* %typemap(freearg) (const char *utf8_path) */
4808 0 : GDALPythonFreeCStr(arg2, bToFree2);
4809 : }
4810 0 : return NULL;
4811 : }
4812 :
4813 :
4814 41 : SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4815 41 : PyObject *resultobj = 0;
4816 41 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4817 41 : char *arg2 = (char *) 0 ;
4818 41 : void *argp1 = 0 ;
4819 41 : int res1 = 0 ;
4820 : int res2 ;
4821 41 : char *buf2 = 0 ;
4822 41 : int alloc2 = 0 ;
4823 41 : PyObject * obj0 = 0 ;
4824 41 : PyObject * obj1 = 0 ;
4825 : bool result;
4826 :
4827 41 : if (!PyArg_ParseTuple(args,(char *)"OO:Driver_TestCapability",&obj0,&obj1)) SWIG_fail;
4828 41 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4829 41 : if (!SWIG_IsOK(res1)) {
4830 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4831 : }
4832 41 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4833 41 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4834 41 : if (!SWIG_IsOK(res2)) {
4835 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
4836 : }
4837 41 : arg2 = reinterpret_cast< char * >(buf2);
4838 : {
4839 41 : if (!arg2) {
4840 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4841 : }
4842 : }
4843 : {
4844 41 : if ( bUseExceptions ) {
4845 0 : CPLErrorReset();
4846 : }
4847 41 : result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
4848 41 : if ( bUseExceptions ) {
4849 0 : CPLErr eclass = CPLGetLastErrorType();
4850 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4851 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4852 : }
4853 : }
4854 : }
4855 41 : resultobj = SWIG_From_bool(static_cast< bool >(result));
4856 41 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4857 41 : return resultobj;
4858 : fail:
4859 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4860 0 : return NULL;
4861 : }
4862 :
4863 :
4864 154 : SWIGINTERN PyObject *_wrap_Driver_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4865 154 : PyObject *resultobj = 0;
4866 154 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4867 154 : void *argp1 = 0 ;
4868 154 : int res1 = 0 ;
4869 154 : PyObject * obj0 = 0 ;
4870 154 : char *result = 0 ;
4871 :
4872 154 : if (!PyArg_ParseTuple(args,(char *)"O:Driver_GetName",&obj0)) SWIG_fail;
4873 154 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4874 154 : if (!SWIG_IsOK(res1)) {
4875 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_GetName" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4876 : }
4877 154 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4878 : {
4879 154 : if ( bUseExceptions ) {
4880 0 : CPLErrorReset();
4881 : }
4882 154 : result = (char *)OGRDriverShadow_GetName(arg1);
4883 154 : if ( bUseExceptions ) {
4884 0 : CPLErr eclass = CPLGetLastErrorType();
4885 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4886 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4887 : }
4888 : }
4889 : }
4890 154 : resultobj = SWIG_FromCharPtr((const char *)result);
4891 154 : return resultobj;
4892 : fail:
4893 0 : return NULL;
4894 : }
4895 :
4896 :
4897 5 : SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4898 5 : PyObject *resultobj = 0;
4899 5 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4900 5 : void *argp1 = 0 ;
4901 5 : int res1 = 0 ;
4902 5 : PyObject * obj0 = 0 ;
4903 :
4904 5 : if (!PyArg_ParseTuple(args,(char *)"O:Driver_Register",&obj0)) SWIG_fail;
4905 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4906 5 : if (!SWIG_IsOK(res1)) {
4907 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4908 : }
4909 5 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4910 : {
4911 5 : if ( bUseExceptions ) {
4912 0 : CPLErrorReset();
4913 : }
4914 : OGRDriverShadow_Register(arg1);
4915 5 : if ( bUseExceptions ) {
4916 0 : CPLErr eclass = CPLGetLastErrorType();
4917 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4918 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4919 : }
4920 : }
4921 : }
4922 5 : resultobj = SWIG_Py_Void();
4923 5 : return resultobj;
4924 : fail:
4925 0 : return NULL;
4926 : }
4927 :
4928 :
4929 5 : SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4930 5 : PyObject *resultobj = 0;
4931 5 : OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
4932 5 : void *argp1 = 0 ;
4933 5 : int res1 = 0 ;
4934 5 : PyObject * obj0 = 0 ;
4935 :
4936 5 : if (!PyArg_ParseTuple(args,(char *)"O:Driver_Deregister",&obj0)) SWIG_fail;
4937 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
4938 5 : if (!SWIG_IsOK(res1)) {
4939 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "OGRDriverShadow *""'");
4940 : }
4941 5 : arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
4942 : {
4943 5 : if ( bUseExceptions ) {
4944 0 : CPLErrorReset();
4945 : }
4946 : OGRDriverShadow_Deregister(arg1);
4947 5 : if ( bUseExceptions ) {
4948 0 : CPLErr eclass = CPLGetLastErrorType();
4949 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4950 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4951 : }
4952 : }
4953 : }
4954 5 : resultobj = SWIG_Py_Void();
4955 5 : return resultobj;
4956 : fail:
4957 0 : return NULL;
4958 : }
4959 :
4960 :
4961 2 : SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4962 : PyObject *obj;
4963 2 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4964 2 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRDriverShadow, SWIG_NewClientData(obj));
4965 2 : return SWIG_Py_Void();
4966 : }
4967 :
4968 0 : SWIGINTERN PyObject *_wrap_DataSource_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4969 0 : PyObject *resultobj = 0;
4970 0 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
4971 0 : void *argp1 = 0 ;
4972 0 : int res1 = 0 ;
4973 0 : PyObject * obj0 = 0 ;
4974 0 : char *result = 0 ;
4975 :
4976 0 : if (!PyArg_ParseTuple(args,(char *)"O:DataSource_name_get",&obj0)) SWIG_fail;
4977 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
4978 0 : if (!SWIG_IsOK(res1)) {
4979 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_name_get" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
4980 : }
4981 0 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
4982 : {
4983 0 : if ( bUseExceptions ) {
4984 0 : CPLErrorReset();
4985 : }
4986 0 : result = (char *)OGRDataSourceShadow_name_get(arg1);
4987 0 : if ( bUseExceptions ) {
4988 0 : CPLErr eclass = CPLGetLastErrorType();
4989 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4990 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4991 : }
4992 : }
4993 : }
4994 0 : resultobj = SWIG_FromCharPtr((const char *)result);
4995 0 : return resultobj;
4996 : fail:
4997 0 : return NULL;
4998 : }
4999 :
5000 :
5001 1241 : SWIGINTERN PyObject *_wrap_delete_DataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5002 1241 : PyObject *resultobj = 0;
5003 1241 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5004 1241 : void *argp1 = 0 ;
5005 1241 : int res1 = 0 ;
5006 1241 : PyObject * obj0 = 0 ;
5007 :
5008 1241 : if (!PyArg_ParseTuple(args,(char *)"O:delete_DataSource",&obj0)) SWIG_fail;
5009 1241 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_DISOWN | 0 );
5010 1241 : if (!SWIG_IsOK(res1)) {
5011 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DataSource" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5012 : }
5013 1241 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5014 : {
5015 1241 : if ( bUseExceptions ) {
5016 0 : CPLErrorReset();
5017 : }
5018 : delete_OGRDataSourceShadow(arg1);
5019 1241 : if ( bUseExceptions ) {
5020 0 : CPLErr eclass = CPLGetLastErrorType();
5021 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5022 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5023 : }
5024 : }
5025 : }
5026 1241 : resultobj = SWIG_Py_Void();
5027 1241 : return resultobj;
5028 : fail:
5029 0 : return NULL;
5030 : }
5031 :
5032 :
5033 4 : SWIGINTERN PyObject *_wrap_DataSource_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5034 4 : PyObject *resultobj = 0;
5035 4 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5036 4 : void *argp1 = 0 ;
5037 4 : int res1 = 0 ;
5038 4 : PyObject * obj0 = 0 ;
5039 : int result;
5040 :
5041 4 : if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetRefCount",&obj0)) SWIG_fail;
5042 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5043 4 : if (!SWIG_IsOK(res1)) {
5044 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetRefCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5045 : }
5046 4 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5047 : {
5048 4 : if ( bUseExceptions ) {
5049 0 : CPLErrorReset();
5050 : }
5051 4 : result = (int)OGRDataSourceShadow_GetRefCount(arg1);
5052 4 : if ( bUseExceptions ) {
5053 0 : CPLErr eclass = CPLGetLastErrorType();
5054 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5055 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5056 : }
5057 : }
5058 : }
5059 4 : resultobj = SWIG_From_int(static_cast< int >(result));
5060 4 : return resultobj;
5061 : fail:
5062 0 : return NULL;
5063 : }
5064 :
5065 :
5066 0 : SWIGINTERN PyObject *_wrap_DataSource_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5067 0 : PyObject *resultobj = 0;
5068 0 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5069 0 : void *argp1 = 0 ;
5070 0 : int res1 = 0 ;
5071 0 : PyObject * obj0 = 0 ;
5072 : int result;
5073 :
5074 0 : if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetSummaryRefCount",&obj0)) SWIG_fail;
5075 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5076 0 : if (!SWIG_IsOK(res1)) {
5077 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetSummaryRefCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5078 : }
5079 0 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5080 : {
5081 0 : if ( bUseExceptions ) {
5082 0 : CPLErrorReset();
5083 : }
5084 0 : result = (int)OGRDataSourceShadow_GetSummaryRefCount(arg1);
5085 0 : if ( bUseExceptions ) {
5086 0 : CPLErr eclass = CPLGetLastErrorType();
5087 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5088 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5089 : }
5090 : }
5091 : }
5092 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5093 0 : return resultobj;
5094 : fail:
5095 0 : return NULL;
5096 : }
5097 :
5098 :
5099 234 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5100 234 : PyObject *resultobj = 0;
5101 234 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5102 234 : void *argp1 = 0 ;
5103 234 : int res1 = 0 ;
5104 234 : PyObject * obj0 = 0 ;
5105 : int result;
5106 :
5107 234 : if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetLayerCount",&obj0)) SWIG_fail;
5108 234 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5109 234 : if (!SWIG_IsOK(res1)) {
5110 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5111 : }
5112 234 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5113 : {
5114 234 : if ( bUseExceptions ) {
5115 0 : CPLErrorReset();
5116 : }
5117 234 : result = (int)OGRDataSourceShadow_GetLayerCount(arg1);
5118 234 : if ( bUseExceptions ) {
5119 0 : CPLErr eclass = CPLGetLastErrorType();
5120 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5121 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5122 : }
5123 : }
5124 : }
5125 234 : resultobj = SWIG_From_int(static_cast< int >(result));
5126 234 : return resultobj;
5127 : fail:
5128 0 : return NULL;
5129 : }
5130 :
5131 :
5132 123 : SWIGINTERN PyObject *_wrap_DataSource_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5133 123 : PyObject *resultobj = 0;
5134 123 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5135 123 : void *argp1 = 0 ;
5136 123 : int res1 = 0 ;
5137 123 : PyObject * obj0 = 0 ;
5138 123 : OGRDriverShadow *result = 0 ;
5139 :
5140 123 : if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetDriver",&obj0)) SWIG_fail;
5141 123 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5142 123 : if (!SWIG_IsOK(res1)) {
5143 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetDriver" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5144 : }
5145 123 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5146 : {
5147 123 : if ( bUseExceptions ) {
5148 0 : CPLErrorReset();
5149 : }
5150 123 : result = (OGRDriverShadow *)OGRDataSourceShadow_GetDriver(arg1);
5151 123 : if ( bUseExceptions ) {
5152 0 : CPLErr eclass = CPLGetLastErrorType();
5153 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5154 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5155 : }
5156 : }
5157 : }
5158 123 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
5159 123 : return resultobj;
5160 : fail:
5161 0 : return NULL;
5162 : }
5163 :
5164 :
5165 11 : SWIGINTERN PyObject *_wrap_DataSource_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5166 11 : PyObject *resultobj = 0;
5167 11 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5168 11 : void *argp1 = 0 ;
5169 11 : int res1 = 0 ;
5170 11 : PyObject * obj0 = 0 ;
5171 11 : char *result = 0 ;
5172 :
5173 11 : if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetName",&obj0)) SWIG_fail;
5174 11 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5175 11 : if (!SWIG_IsOK(res1)) {
5176 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetName" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5177 : }
5178 11 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5179 : {
5180 11 : if ( bUseExceptions ) {
5181 0 : CPLErrorReset();
5182 : }
5183 11 : result = (char *)OGRDataSourceShadow_GetName(arg1);
5184 11 : if ( bUseExceptions ) {
5185 0 : CPLErr eclass = CPLGetLastErrorType();
5186 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5187 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5188 : }
5189 : }
5190 : }
5191 11 : resultobj = SWIG_FromCharPtr((const char *)result);
5192 11 : return resultobj;
5193 : fail:
5194 0 : return NULL;
5195 : }
5196 :
5197 :
5198 15 : SWIGINTERN PyObject *_wrap_DataSource_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5199 15 : PyObject *resultobj = 0;
5200 15 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5201 : int arg2 ;
5202 15 : void *argp1 = 0 ;
5203 15 : int res1 = 0 ;
5204 : int val2 ;
5205 15 : int ecode2 = 0 ;
5206 15 : PyObject * obj0 = 0 ;
5207 15 : PyObject * obj1 = 0 ;
5208 : OGRErr result;
5209 :
5210 15 : if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_DeleteLayer",&obj0,&obj1)) SWIG_fail;
5211 15 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5212 15 : if (!SWIG_IsOK(res1)) {
5213 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_DeleteLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5214 : }
5215 15 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5216 15 : ecode2 = SWIG_AsVal_int(obj1, &val2);
5217 15 : if (!SWIG_IsOK(ecode2)) {
5218 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_DeleteLayer" "', argument " "2"" of type '" "int""'");
5219 : }
5220 15 : arg2 = static_cast< int >(val2);
5221 : {
5222 15 : if ( bUseExceptions ) {
5223 0 : CPLErrorReset();
5224 : }
5225 15 : result = (OGRErr)OGRDataSourceShadow_DeleteLayer(arg1,arg2);
5226 15 : if ( bUseExceptions ) {
5227 0 : CPLErr eclass = CPLGetLastErrorType();
5228 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5229 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5230 : }
5231 : }
5232 : }
5233 : {
5234 : /* %typemap(out) OGRErr */
5235 15 : if ( result != 0 && bUseExceptions) {
5236 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5237 0 : SWIG_fail;
5238 : }
5239 : }
5240 : {
5241 : /* %typemap(ret) OGRErr */
5242 15 : if (resultobj == Py_None ) {
5243 0 : Py_DECREF(resultobj);
5244 0 : resultobj = 0;
5245 : }
5246 15 : if (resultobj == 0) {
5247 15 : resultobj = PyInt_FromLong( result );
5248 : }
5249 : }
5250 15 : return resultobj;
5251 : fail:
5252 0 : return NULL;
5253 : }
5254 :
5255 :
5256 0 : SWIGINTERN PyObject *_wrap_DataSource_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5257 0 : PyObject *resultobj = 0;
5258 0 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5259 0 : void *argp1 = 0 ;
5260 0 : int res1 = 0 ;
5261 0 : PyObject * obj0 = 0 ;
5262 : OGRErr result;
5263 :
5264 0 : if (!PyArg_ParseTuple(args,(char *)"O:DataSource_SyncToDisk",&obj0)) SWIG_fail;
5265 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5266 0 : if (!SWIG_IsOK(res1)) {
5267 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_SyncToDisk" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5268 : }
5269 0 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5270 : {
5271 0 : if ( bUseExceptions ) {
5272 0 : CPLErrorReset();
5273 : }
5274 0 : result = (OGRErr)OGRDataSourceShadow_SyncToDisk(arg1);
5275 0 : if ( bUseExceptions ) {
5276 0 : CPLErr eclass = CPLGetLastErrorType();
5277 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5278 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5279 : }
5280 : }
5281 : }
5282 : {
5283 : /* %typemap(out) OGRErr */
5284 0 : if ( result != 0 && bUseExceptions) {
5285 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5286 0 : SWIG_fail;
5287 : }
5288 : }
5289 : {
5290 : /* %typemap(ret) OGRErr */
5291 0 : if (resultobj == Py_None ) {
5292 0 : Py_DECREF(resultobj);
5293 0 : resultobj = 0;
5294 : }
5295 0 : if (resultobj == 0) {
5296 0 : resultobj = PyInt_FromLong( result );
5297 : }
5298 : }
5299 0 : return resultobj;
5300 : fail:
5301 0 : return NULL;
5302 : }
5303 :
5304 :
5305 1531 : SWIGINTERN PyObject *_wrap_DataSource_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5306 1531 : PyObject *resultobj = 0;
5307 1531 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5308 1531 : char *arg2 = (char *) 0 ;
5309 1531 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
5310 1531 : OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
5311 1531 : char **arg5 = (char **) 0 ;
5312 1531 : void *argp1 = 0 ;
5313 1531 : int res1 = 0 ;
5314 : int res2 ;
5315 1531 : char *buf2 = 0 ;
5316 1531 : int alloc2 = 0 ;
5317 1531 : void *argp3 = 0 ;
5318 1531 : int res3 = 0 ;
5319 : int val4 ;
5320 1531 : int ecode4 = 0 ;
5321 1531 : PyObject * obj0 = 0 ;
5322 1531 : PyObject * obj1 = 0 ;
5323 1531 : PyObject * obj2 = 0 ;
5324 1531 : PyObject * obj3 = 0 ;
5325 1531 : PyObject * obj4 = 0 ;
5326 : char * kwnames[] = {
5327 : (char *) "self",(char *) "name",(char *) "srs",(char *) "geom_type",(char *) "options", NULL
5328 1531 : };
5329 1531 : OGRLayerShadow *result = 0 ;
5330 :
5331 1531 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:DataSource_CreateLayer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5332 1531 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5333 1531 : if (!SWIG_IsOK(res1)) {
5334 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CreateLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5335 : }
5336 1531 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5337 1531 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5338 1531 : if (!SWIG_IsOK(res2)) {
5339 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CreateLayer" "', argument " "2"" of type '" "char const *""'");
5340 : }
5341 1531 : arg2 = reinterpret_cast< char * >(buf2);
5342 1531 : if (obj2) {
5343 222 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5344 222 : if (!SWIG_IsOK(res3)) {
5345 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
5346 : }
5347 222 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
5348 : }
5349 1531 : if (obj3) {
5350 236 : ecode4 = SWIG_AsVal_int(obj3, &val4);
5351 236 : if (!SWIG_IsOK(ecode4)) {
5352 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DataSource_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
5353 : }
5354 236 : arg4 = static_cast< OGRwkbGeometryType >(val4);
5355 : }
5356 1531 : if (obj4) {
5357 : {
5358 : /* %typemap(in) char **options */
5359 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
5360 165 : if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
5361 : #if PY_VERSION_HEX < 0x03000000
5362 : || PyString_Check(obj4)
5363 : #endif
5364 : ) {
5365 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
5366 0 : SWIG_fail;
5367 : }
5368 :
5369 165 : int size = PySequence_Size(obj4);
5370 276 : for (int i = 0; i < size; i++) {
5371 111 : PyObject* pyObj = PySequence_GetItem(obj4,i);
5372 111 : if (PyUnicode_Check(pyObj))
5373 : {
5374 : char *pszStr;
5375 : Py_ssize_t nLen;
5376 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
5377 : #if PY_VERSION_HEX >= 0x03000000
5378 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
5379 : #else
5380 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
5381 : #endif
5382 0 : arg5 = CSLAddString( arg5, pszStr );
5383 0 : Py_XDECREF(pyUTF8Str);
5384 : }
5385 : #if PY_VERSION_HEX >= 0x03000000
5386 : else if (PyBytes_Check(pyObj))
5387 : arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
5388 : #else
5389 111 : else if (PyString_Check(pyObj))
5390 111 : arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
5391 : #endif
5392 : else
5393 : {
5394 0 : Py_DECREF(pyObj);
5395 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
5396 0 : SWIG_fail;
5397 : }
5398 111 : Py_DECREF(pyObj);
5399 : }
5400 : }
5401 : }
5402 : {
5403 1531 : if (!arg2) {
5404 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5405 : }
5406 : }
5407 : {
5408 1531 : if ( bUseExceptions ) {
5409 0 : CPLErrorReset();
5410 : }
5411 1531 : result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
5412 1531 : if ( bUseExceptions ) {
5413 0 : CPLErr eclass = CPLGetLastErrorType();
5414 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5415 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5416 : }
5417 : }
5418 : }
5419 1531 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5420 1531 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5421 : {
5422 : /* %typemap(freearg) char **options */
5423 1531 : CSLDestroy( arg5 );
5424 : }
5425 1531 : return resultobj;
5426 : fail:
5427 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5428 : {
5429 : /* %typemap(freearg) char **options */
5430 0 : CSLDestroy( arg5 );
5431 : }
5432 0 : return NULL;
5433 : }
5434 :
5435 :
5436 4 : SWIGINTERN PyObject *_wrap_DataSource_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5437 4 : PyObject *resultobj = 0;
5438 4 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5439 4 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
5440 4 : char *arg3 = (char *) 0 ;
5441 4 : char **arg4 = (char **) 0 ;
5442 4 : void *argp1 = 0 ;
5443 4 : int res1 = 0 ;
5444 4 : void *argp2 = 0 ;
5445 4 : int res2 = 0 ;
5446 : int res3 ;
5447 4 : char *buf3 = 0 ;
5448 4 : int alloc3 = 0 ;
5449 4 : PyObject * obj0 = 0 ;
5450 4 : PyObject * obj1 = 0 ;
5451 4 : PyObject * obj2 = 0 ;
5452 4 : PyObject * obj3 = 0 ;
5453 : char * kwnames[] = {
5454 : (char *) "self",(char *) "src_layer",(char *) "new_name",(char *) "options", NULL
5455 4 : };
5456 4 : OGRLayerShadow *result = 0 ;
5457 :
5458 4 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:DataSource_CopyLayer",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5459 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5460 4 : if (!SWIG_IsOK(res1)) {
5461 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CopyLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5462 : }
5463 4 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5464 4 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5465 4 : if (!SWIG_IsOK(res2)) {
5466 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'");
5467 : }
5468 4 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
5469 4 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
5470 4 : if (!SWIG_IsOK(res3)) {
5471 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CopyLayer" "', argument " "3"" of type '" "char const *""'");
5472 : }
5473 4 : arg3 = reinterpret_cast< char * >(buf3);
5474 4 : if (obj3) {
5475 : {
5476 : /* %typemap(in) char **options */
5477 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
5478 0 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
5479 : #if PY_VERSION_HEX < 0x03000000
5480 : || PyString_Check(obj3)
5481 : #endif
5482 : ) {
5483 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
5484 0 : SWIG_fail;
5485 : }
5486 :
5487 0 : int size = PySequence_Size(obj3);
5488 0 : for (int i = 0; i < size; i++) {
5489 0 : PyObject* pyObj = PySequence_GetItem(obj3,i);
5490 0 : if (PyUnicode_Check(pyObj))
5491 : {
5492 : char *pszStr;
5493 : Py_ssize_t nLen;
5494 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
5495 : #if PY_VERSION_HEX >= 0x03000000
5496 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
5497 : #else
5498 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
5499 : #endif
5500 0 : arg4 = CSLAddString( arg4, pszStr );
5501 0 : Py_XDECREF(pyUTF8Str);
5502 : }
5503 : #if PY_VERSION_HEX >= 0x03000000
5504 : else if (PyBytes_Check(pyObj))
5505 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
5506 : #else
5507 0 : else if (PyString_Check(pyObj))
5508 0 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
5509 : #endif
5510 : else
5511 : {
5512 0 : Py_DECREF(pyObj);
5513 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
5514 0 : SWIG_fail;
5515 : }
5516 0 : Py_DECREF(pyObj);
5517 : }
5518 : }
5519 : }
5520 : {
5521 4 : if (!arg2) {
5522 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5523 : }
5524 : }
5525 : {
5526 4 : if ( bUseExceptions ) {
5527 0 : CPLErrorReset();
5528 : }
5529 4 : result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
5530 4 : if ( bUseExceptions ) {
5531 0 : CPLErr eclass = CPLGetLastErrorType();
5532 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5533 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5534 : }
5535 : }
5536 : }
5537 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5538 4 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
5539 : {
5540 : /* %typemap(freearg) char **options */
5541 4 : CSLDestroy( arg4 );
5542 : }
5543 4 : return resultobj;
5544 : fail:
5545 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
5546 : {
5547 : /* %typemap(freearg) char **options */
5548 0 : CSLDestroy( arg4 );
5549 : }
5550 0 : return NULL;
5551 : }
5552 :
5553 :
5554 2636 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5555 2636 : PyObject *resultobj = 0;
5556 2636 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5557 2636 : int arg2 = (int) 0 ;
5558 2636 : void *argp1 = 0 ;
5559 2636 : int res1 = 0 ;
5560 : int val2 ;
5561 2636 : int ecode2 = 0 ;
5562 2636 : PyObject * obj0 = 0 ;
5563 2636 : PyObject * obj1 = 0 ;
5564 2636 : OGRLayerShadow *result = 0 ;
5565 :
5566 2636 : if (!PyArg_ParseTuple(args,(char *)"O|O:DataSource_GetLayerByIndex",&obj0,&obj1)) SWIG_fail;
5567 2636 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5568 2636 : if (!SWIG_IsOK(res1)) {
5569 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerByIndex" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5570 : }
5571 2636 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5572 2636 : if (obj1) {
5573 2636 : ecode2 = SWIG_AsVal_int(obj1, &val2);
5574 2636 : if (!SWIG_IsOK(ecode2)) {
5575 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
5576 : }
5577 2636 : arg2 = static_cast< int >(val2);
5578 : }
5579 : {
5580 2636 : if ( bUseExceptions ) {
5581 0 : CPLErrorReset();
5582 : }
5583 2636 : result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByIndex(arg1,arg2);
5584 2636 : if ( bUseExceptions ) {
5585 0 : CPLErr eclass = CPLGetLastErrorType();
5586 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5587 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5588 : }
5589 : }
5590 : }
5591 2636 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5592 2636 : return resultobj;
5593 : fail:
5594 0 : return NULL;
5595 : }
5596 :
5597 :
5598 1720 : SWIGINTERN PyObject *_wrap_DataSource_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5599 1720 : PyObject *resultobj = 0;
5600 1720 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5601 1720 : char *arg2 = (char *) 0 ;
5602 1720 : void *argp1 = 0 ;
5603 1720 : int res1 = 0 ;
5604 : int res2 ;
5605 1720 : char *buf2 = 0 ;
5606 1720 : int alloc2 = 0 ;
5607 1720 : PyObject * obj0 = 0 ;
5608 1720 : PyObject * obj1 = 0 ;
5609 1720 : OGRLayerShadow *result = 0 ;
5610 :
5611 1720 : if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_GetLayerByName",&obj0,&obj1)) SWIG_fail;
5612 1720 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5613 1720 : if (!SWIG_IsOK(res1)) {
5614 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerByName" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5615 : }
5616 1720 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5617 1720 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5618 1720 : if (!SWIG_IsOK(res2)) {
5619 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
5620 : }
5621 1720 : arg2 = reinterpret_cast< char * >(buf2);
5622 : {
5623 1720 : if ( bUseExceptions ) {
5624 0 : CPLErrorReset();
5625 : }
5626 1720 : result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2);
5627 1720 : if ( bUseExceptions ) {
5628 0 : CPLErr eclass = CPLGetLastErrorType();
5629 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5630 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5631 : }
5632 : }
5633 : }
5634 1720 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5635 1720 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5636 1720 : return resultobj;
5637 : fail:
5638 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5639 0 : return NULL;
5640 : }
5641 :
5642 :
5643 54 : SWIGINTERN PyObject *_wrap_DataSource_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5644 54 : PyObject *resultobj = 0;
5645 54 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5646 54 : char *arg2 = (char *) 0 ;
5647 54 : void *argp1 = 0 ;
5648 54 : int res1 = 0 ;
5649 : int res2 ;
5650 54 : char *buf2 = 0 ;
5651 54 : int alloc2 = 0 ;
5652 54 : PyObject * obj0 = 0 ;
5653 54 : PyObject * obj1 = 0 ;
5654 : bool result;
5655 :
5656 54 : if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_TestCapability",&obj0,&obj1)) SWIG_fail;
5657 54 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5658 54 : if (!SWIG_IsOK(res1)) {
5659 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_TestCapability" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5660 : }
5661 54 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5662 54 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5663 54 : if (!SWIG_IsOK(res2)) {
5664 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_TestCapability" "', argument " "2"" of type '" "char const *""'");
5665 : }
5666 54 : arg2 = reinterpret_cast< char * >(buf2);
5667 : {
5668 54 : if (!arg2) {
5669 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5670 : }
5671 : }
5672 : {
5673 54 : if ( bUseExceptions ) {
5674 0 : CPLErrorReset();
5675 : }
5676 54 : result = (bool)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2);
5677 54 : if ( bUseExceptions ) {
5678 0 : CPLErr eclass = CPLGetLastErrorType();
5679 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5680 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5681 : }
5682 : }
5683 : }
5684 54 : resultobj = SWIG_From_bool(static_cast< bool >(result));
5685 54 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5686 54 : return resultobj;
5687 : fail:
5688 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5689 0 : return NULL;
5690 : }
5691 :
5692 :
5693 2052 : SWIGINTERN PyObject *_wrap_DataSource_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5694 2052 : PyObject *resultobj = 0;
5695 2052 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5696 2052 : char *arg2 = (char *) 0 ;
5697 2052 : OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
5698 2052 : char *arg4 = (char *) "" ;
5699 2052 : void *argp1 = 0 ;
5700 2052 : int res1 = 0 ;
5701 : int res2 ;
5702 2052 : char *buf2 = 0 ;
5703 2052 : int alloc2 = 0 ;
5704 2052 : void *argp3 = 0 ;
5705 2052 : int res3 = 0 ;
5706 : int res4 ;
5707 2052 : char *buf4 = 0 ;
5708 2052 : int alloc4 = 0 ;
5709 2052 : PyObject * obj0 = 0 ;
5710 2052 : PyObject * obj1 = 0 ;
5711 2052 : PyObject * obj2 = 0 ;
5712 2052 : PyObject * obj3 = 0 ;
5713 : char * kwnames[] = {
5714 : (char *) "self",(char *) "statement",(char *) "spatialFilter",(char *) "dialect", NULL
5715 2052 : };
5716 2052 : OGRLayerShadow *result = 0 ;
5717 :
5718 2052 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DataSource_ExecuteSQL",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5719 2052 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5720 2052 : if (!SWIG_IsOK(res1)) {
5721 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_ExecuteSQL" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5722 : }
5723 2052 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5724 2052 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5725 2052 : if (!SWIG_IsOK(res2)) {
5726 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
5727 : }
5728 2052 : arg2 = reinterpret_cast< char * >(buf2);
5729 2052 : if (obj2) {
5730 6 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
5731 6 : if (!SWIG_IsOK(res3)) {
5732 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
5733 : }
5734 6 : arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
5735 : }
5736 2052 : if (obj3) {
5737 499 : res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5738 499 : if (!SWIG_IsOK(res4)) {
5739 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DataSource_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
5740 : }
5741 499 : arg4 = reinterpret_cast< char * >(buf4);
5742 : }
5743 : {
5744 2052 : if (!arg2) {
5745 1 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5746 : }
5747 : }
5748 : {
5749 2051 : if ( bUseExceptions ) {
5750 0 : CPLErrorReset();
5751 : }
5752 2051 : result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
5753 2051 : if ( bUseExceptions ) {
5754 0 : CPLErr eclass = CPLGetLastErrorType();
5755 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5756 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5757 : }
5758 : }
5759 : }
5760 2051 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5761 2051 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5762 2051 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
5763 2051 : return resultobj;
5764 : fail:
5765 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5766 1 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
5767 1 : return NULL;
5768 : }
5769 :
5770 :
5771 998 : SWIGINTERN PyObject *_wrap_DataSource_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5772 998 : PyObject *resultobj = 0;
5773 998 : OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
5774 998 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
5775 998 : void *argp1 = 0 ;
5776 998 : int res1 = 0 ;
5777 998 : int res2 = 0 ;
5778 998 : PyObject * obj0 = 0 ;
5779 998 : PyObject * obj1 = 0 ;
5780 :
5781 998 : if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_ReleaseResultSet",&obj0,&obj1)) SWIG_fail;
5782 998 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
5783 998 : if (!SWIG_IsOK(res1)) {
5784 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_ReleaseResultSet" "', argument " "1"" of type '" "OGRDataSourceShadow *""'");
5785 : }
5786 998 : arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
5787 998 : res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN | 0 );
5788 998 : if (!SWIG_IsOK(res2)) {
5789 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
5790 : }
5791 : {
5792 998 : if ( bUseExceptions ) {
5793 0 : CPLErrorReset();
5794 : }
5795 998 : OGRDataSourceShadow_ReleaseResultSet(arg1,arg2);
5796 998 : if ( bUseExceptions ) {
5797 0 : CPLErr eclass = CPLGetLastErrorType();
5798 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5799 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5800 : }
5801 : }
5802 : }
5803 998 : resultobj = SWIG_Py_Void();
5804 998 : return resultobj;
5805 : fail:
5806 0 : return NULL;
5807 : }
5808 :
5809 :
5810 2 : SWIGINTERN PyObject *DataSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5811 : PyObject *obj;
5812 2 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
5813 2 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRDataSourceShadow, SWIG_NewClientData(obj));
5814 2 : return SWIG_Py_Void();
5815 : }
5816 :
5817 0 : SWIGINTERN PyObject *_wrap_Layer_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5818 0 : PyObject *resultobj = 0;
5819 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
5820 0 : void *argp1 = 0 ;
5821 0 : int res1 = 0 ;
5822 0 : PyObject * obj0 = 0 ;
5823 : int result;
5824 :
5825 0 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetRefCount",&obj0)) SWIG_fail;
5826 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5827 0 : if (!SWIG_IsOK(res1)) {
5828 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetRefCount" "', argument " "1"" of type '" "OGRLayerShadow *""'");
5829 : }
5830 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
5831 : {
5832 0 : if ( bUseExceptions ) {
5833 0 : CPLErrorReset();
5834 : }
5835 0 : result = (int)OGRLayerShadow_GetRefCount(arg1);
5836 0 : if ( bUseExceptions ) {
5837 0 : CPLErr eclass = CPLGetLastErrorType();
5838 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5839 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5840 : }
5841 : }
5842 : }
5843 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5844 0 : return resultobj;
5845 : fail:
5846 0 : return NULL;
5847 : }
5848 :
5849 :
5850 65 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5851 65 : PyObject *resultobj = 0;
5852 65 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
5853 65 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
5854 65 : void *argp1 = 0 ;
5855 65 : int res1 = 0 ;
5856 65 : void *argp2 = 0 ;
5857 65 : int res2 = 0 ;
5858 65 : PyObject * obj0 = 0 ;
5859 65 : PyObject * obj1 = 0 ;
5860 :
5861 65 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetSpatialFilter",&obj0,&obj1)) SWIG_fail;
5862 65 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5863 65 : if (!SWIG_IsOK(res1)) {
5864 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
5865 : }
5866 65 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
5867 65 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
5868 65 : if (!SWIG_IsOK(res2)) {
5869 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
5870 : }
5871 65 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
5872 : {
5873 65 : if ( bUseExceptions ) {
5874 0 : CPLErrorReset();
5875 : }
5876 : OGRLayerShadow_SetSpatialFilter(arg1,arg2);
5877 65 : if ( bUseExceptions ) {
5878 0 : CPLErr eclass = CPLGetLastErrorType();
5879 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5880 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5881 : }
5882 : }
5883 : }
5884 65 : resultobj = SWIG_Py_Void();
5885 65 : return resultobj;
5886 : fail:
5887 0 : return NULL;
5888 : }
5889 :
5890 :
5891 17519 : SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5892 17519 : PyObject *resultobj = 0;
5893 17519 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
5894 : double arg2 ;
5895 : double arg3 ;
5896 : double arg4 ;
5897 : double arg5 ;
5898 17519 : void *argp1 = 0 ;
5899 17519 : int res1 = 0 ;
5900 : double val2 ;
5901 17519 : int ecode2 = 0 ;
5902 : double val3 ;
5903 17519 : int ecode3 = 0 ;
5904 : double val4 ;
5905 17519 : int ecode4 = 0 ;
5906 : double val5 ;
5907 17519 : int ecode5 = 0 ;
5908 17519 : PyObject * obj0 = 0 ;
5909 17519 : PyObject * obj1 = 0 ;
5910 17519 : PyObject * obj2 = 0 ;
5911 17519 : PyObject * obj3 = 0 ;
5912 17519 : PyObject * obj4 = 0 ;
5913 :
5914 17519 : if (!PyArg_ParseTuple(args,(char *)"OOOOO:Layer_SetSpatialFilterRect",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5915 17519 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5916 17519 : if (!SWIG_IsOK(res1)) {
5917 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'");
5918 : }
5919 17519 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
5920 17519 : ecode2 = SWIG_AsVal_double(obj1, &val2);
5921 17519 : if (!SWIG_IsOK(ecode2)) {
5922 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "double""'");
5923 : }
5924 17519 : arg2 = static_cast< double >(val2);
5925 17519 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5926 17519 : if (!SWIG_IsOK(ecode3)) {
5927 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
5928 : }
5929 17519 : arg3 = static_cast< double >(val3);
5930 17519 : ecode4 = SWIG_AsVal_double(obj3, &val4);
5931 17519 : if (!SWIG_IsOK(ecode4)) {
5932 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
5933 : }
5934 17519 : arg4 = static_cast< double >(val4);
5935 17519 : ecode5 = SWIG_AsVal_double(obj4, &val5);
5936 17519 : if (!SWIG_IsOK(ecode5)) {
5937 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
5938 : }
5939 17519 : arg5 = static_cast< double >(val5);
5940 : {
5941 17519 : if ( bUseExceptions ) {
5942 0 : CPLErrorReset();
5943 : }
5944 : OGRLayerShadow_SetSpatialFilterRect(arg1,arg2,arg3,arg4,arg5);
5945 17519 : if ( bUseExceptions ) {
5946 0 : CPLErr eclass = CPLGetLastErrorType();
5947 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5948 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5949 : }
5950 : }
5951 : }
5952 17519 : resultobj = SWIG_Py_Void();
5953 17519 : return resultobj;
5954 : fail:
5955 0 : return NULL;
5956 : }
5957 :
5958 :
5959 0 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5960 0 : PyObject *resultobj = 0;
5961 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
5962 0 : void *argp1 = 0 ;
5963 0 : int res1 = 0 ;
5964 0 : PyObject * obj0 = 0 ;
5965 0 : OGRGeometryShadow *result = 0 ;
5966 :
5967 0 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetSpatialFilter",&obj0)) SWIG_fail;
5968 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
5969 0 : if (!SWIG_IsOK(res1)) {
5970 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
5971 : }
5972 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
5973 : {
5974 0 : if ( bUseExceptions ) {
5975 0 : CPLErrorReset();
5976 : }
5977 0 : result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
5978 0 : if ( bUseExceptions ) {
5979 0 : CPLErr eclass = CPLGetLastErrorType();
5980 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5981 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5982 : }
5983 : }
5984 : }
5985 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
5986 0 : return resultobj;
5987 : fail:
5988 0 : return NULL;
5989 : }
5990 :
5991 :
5992 241 : SWIGINTERN PyObject *_wrap_Layer_SetAttributeFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5993 241 : PyObject *resultobj = 0;
5994 241 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
5995 241 : char *arg2 = (char *) 0 ;
5996 241 : void *argp1 = 0 ;
5997 241 : int res1 = 0 ;
5998 : int res2 ;
5999 241 : char *buf2 = 0 ;
6000 241 : int alloc2 = 0 ;
6001 241 : PyObject * obj0 = 0 ;
6002 241 : PyObject * obj1 = 0 ;
6003 : OGRErr result;
6004 :
6005 241 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetAttributeFilter",&obj0,&obj1)) SWIG_fail;
6006 241 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6007 241 : if (!SWIG_IsOK(res1)) {
6008 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetAttributeFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6009 : }
6010 241 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6011 241 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6012 241 : if (!SWIG_IsOK(res2)) {
6013 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetAttributeFilter" "', argument " "2"" of type '" "char *""'");
6014 : }
6015 241 : arg2 = reinterpret_cast< char * >(buf2);
6016 : {
6017 241 : if ( bUseExceptions ) {
6018 0 : CPLErrorReset();
6019 : }
6020 241 : result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
6021 241 : if ( bUseExceptions ) {
6022 0 : CPLErr eclass = CPLGetLastErrorType();
6023 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6024 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6025 : }
6026 : }
6027 : }
6028 : {
6029 : /* %typemap(out) OGRErr */
6030 241 : if ( result != 0 && bUseExceptions) {
6031 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6032 0 : SWIG_fail;
6033 : }
6034 : }
6035 241 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6036 : {
6037 : /* %typemap(ret) OGRErr */
6038 241 : if (resultobj == Py_None ) {
6039 0 : Py_DECREF(resultobj);
6040 0 : resultobj = 0;
6041 : }
6042 241 : if (resultobj == 0) {
6043 241 : resultobj = PyInt_FromLong( result );
6044 : }
6045 : }
6046 241 : return resultobj;
6047 : fail:
6048 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6049 0 : return NULL;
6050 : }
6051 :
6052 :
6053 18986 : SWIGINTERN PyObject *_wrap_Layer_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6054 18986 : PyObject *resultobj = 0;
6055 18986 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6056 18986 : void *argp1 = 0 ;
6057 18986 : int res1 = 0 ;
6058 18986 : PyObject * obj0 = 0 ;
6059 :
6060 18986 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_ResetReading",&obj0)) SWIG_fail;
6061 18986 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6062 18986 : if (!SWIG_IsOK(res1)) {
6063 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ResetReading" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6064 : }
6065 18986 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6066 : {
6067 18986 : if ( bUseExceptions ) {
6068 0 : CPLErrorReset();
6069 : }
6070 : OGRLayerShadow_ResetReading(arg1);
6071 18986 : if ( bUseExceptions ) {
6072 0 : CPLErr eclass = CPLGetLastErrorType();
6073 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6074 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6075 : }
6076 : }
6077 : }
6078 18986 : resultobj = SWIG_Py_Void();
6079 18986 : return resultobj;
6080 : fail:
6081 0 : return NULL;
6082 : }
6083 :
6084 :
6085 2058 : SWIGINTERN PyObject *_wrap_Layer_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6086 2058 : PyObject *resultobj = 0;
6087 2058 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6088 2058 : void *argp1 = 0 ;
6089 2058 : int res1 = 0 ;
6090 2058 : PyObject * obj0 = 0 ;
6091 2058 : char *result = 0 ;
6092 :
6093 2058 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetName",&obj0)) SWIG_fail;
6094 2058 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6095 2058 : if (!SWIG_IsOK(res1)) {
6096 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetName" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6097 : }
6098 2058 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6099 : {
6100 2058 : if ( bUseExceptions ) {
6101 0 : CPLErrorReset();
6102 : }
6103 2058 : result = (char *)OGRLayerShadow_GetName(arg1);
6104 2058 : if ( bUseExceptions ) {
6105 0 : CPLErr eclass = CPLGetLastErrorType();
6106 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6107 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6108 : }
6109 : }
6110 : }
6111 2058 : resultobj = SWIG_FromCharPtr((const char *)result);
6112 2058 : return resultobj;
6113 : fail:
6114 0 : return NULL;
6115 : }
6116 :
6117 :
6118 116 : SWIGINTERN PyObject *_wrap_Layer_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6119 116 : PyObject *resultobj = 0;
6120 116 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6121 116 : void *argp1 = 0 ;
6122 116 : int res1 = 0 ;
6123 116 : PyObject * obj0 = 0 ;
6124 : OGRwkbGeometryType result;
6125 :
6126 116 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetGeomType",&obj0)) SWIG_fail;
6127 116 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6128 116 : if (!SWIG_IsOK(res1)) {
6129 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeomType" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6130 : }
6131 116 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6132 : {
6133 116 : if ( bUseExceptions ) {
6134 0 : CPLErrorReset();
6135 : }
6136 116 : result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
6137 116 : if ( bUseExceptions ) {
6138 0 : CPLErr eclass = CPLGetLastErrorType();
6139 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6140 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6141 : }
6142 : }
6143 : }
6144 232 : resultobj = SWIG_From_int(static_cast< int >(result));
6145 116 : return resultobj;
6146 : fail:
6147 0 : return NULL;
6148 : }
6149 :
6150 :
6151 31 : SWIGINTERN PyObject *_wrap_Layer_GetGeometryColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6152 31 : PyObject *resultobj = 0;
6153 31 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6154 31 : void *argp1 = 0 ;
6155 31 : int res1 = 0 ;
6156 31 : PyObject * obj0 = 0 ;
6157 31 : char *result = 0 ;
6158 :
6159 31 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetGeometryColumn",&obj0)) SWIG_fail;
6160 31 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6161 31 : if (!SWIG_IsOK(res1)) {
6162 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeometryColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6163 : }
6164 31 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6165 : {
6166 31 : if ( bUseExceptions ) {
6167 0 : CPLErrorReset();
6168 : }
6169 31 : result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
6170 31 : if ( bUseExceptions ) {
6171 0 : CPLErr eclass = CPLGetLastErrorType();
6172 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6173 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6174 : }
6175 : }
6176 : }
6177 31 : resultobj = SWIG_FromCharPtr((const char *)result);
6178 31 : return resultobj;
6179 : fail:
6180 0 : return NULL;
6181 : }
6182 :
6183 :
6184 21 : SWIGINTERN PyObject *_wrap_Layer_GetFIDColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6185 21 : PyObject *resultobj = 0;
6186 21 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6187 21 : void *argp1 = 0 ;
6188 21 : int res1 = 0 ;
6189 21 : PyObject * obj0 = 0 ;
6190 21 : char *result = 0 ;
6191 :
6192 21 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFIDColumn",&obj0)) SWIG_fail;
6193 21 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6194 21 : if (!SWIG_IsOK(res1)) {
6195 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFIDColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6196 : }
6197 21 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6198 : {
6199 21 : if ( bUseExceptions ) {
6200 0 : CPLErrorReset();
6201 : }
6202 21 : result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
6203 21 : if ( bUseExceptions ) {
6204 0 : CPLErr eclass = CPLGetLastErrorType();
6205 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6206 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6207 : }
6208 : }
6209 : }
6210 21 : resultobj = SWIG_FromCharPtr((const char *)result);
6211 21 : return resultobj;
6212 : fail:
6213 0 : return NULL;
6214 : }
6215 :
6216 :
6217 100 : SWIGINTERN PyObject *_wrap_Layer_GetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6218 100 : PyObject *resultobj = 0;
6219 100 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6220 : long arg2 ;
6221 100 : void *argp1 = 0 ;
6222 100 : int res1 = 0 ;
6223 : long val2 ;
6224 100 : int ecode2 = 0 ;
6225 100 : PyObject * obj0 = 0 ;
6226 100 : PyObject * obj1 = 0 ;
6227 100 : OGRFeatureShadow *result = 0 ;
6228 :
6229 100 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_GetFeature",&obj0,&obj1)) SWIG_fail;
6230 100 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6231 100 : if (!SWIG_IsOK(res1)) {
6232 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6233 : }
6234 100 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6235 100 : ecode2 = SWIG_AsVal_long(obj1, &val2);
6236 100 : if (!SWIG_IsOK(ecode2)) {
6237 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeature" "', argument " "2"" of type '" "long""'");
6238 : }
6239 100 : arg2 = static_cast< long >(val2);
6240 : {
6241 100 : if ( bUseExceptions ) {
6242 0 : CPLErrorReset();
6243 : }
6244 100 : result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
6245 100 : if ( bUseExceptions ) {
6246 0 : CPLErr eclass = CPLGetLastErrorType();
6247 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6248 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6249 : }
6250 : }
6251 : }
6252 100 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
6253 100 : return resultobj;
6254 : fail:
6255 0 : return NULL;
6256 : }
6257 :
6258 :
6259 60899 : SWIGINTERN PyObject *_wrap_Layer_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6260 60899 : PyObject *resultobj = 0;
6261 60899 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6262 60899 : void *argp1 = 0 ;
6263 60899 : int res1 = 0 ;
6264 60899 : PyObject * obj0 = 0 ;
6265 60899 : OGRFeatureShadow *result = 0 ;
6266 :
6267 60899 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetNextFeature",&obj0)) SWIG_fail;
6268 60899 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6269 60899 : if (!SWIG_IsOK(res1)) {
6270 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetNextFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6271 : }
6272 60899 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6273 : {
6274 60899 : if ( bUseExceptions ) {
6275 0 : CPLErrorReset();
6276 : }
6277 60899 : result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
6278 60899 : if ( bUseExceptions ) {
6279 0 : CPLErr eclass = CPLGetLastErrorType();
6280 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6281 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6282 : }
6283 : }
6284 : }
6285 60899 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
6286 60899 : return resultobj;
6287 : fail:
6288 0 : return NULL;
6289 : }
6290 :
6291 :
6292 10 : SWIGINTERN PyObject *_wrap_Layer_SetNextByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6293 10 : PyObject *resultobj = 0;
6294 10 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6295 : long arg2 ;
6296 10 : void *argp1 = 0 ;
6297 10 : int res1 = 0 ;
6298 : long val2 ;
6299 10 : int ecode2 = 0 ;
6300 10 : PyObject * obj0 = 0 ;
6301 10 : PyObject * obj1 = 0 ;
6302 : OGRErr result;
6303 :
6304 10 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetNextByIndex",&obj0,&obj1)) SWIG_fail;
6305 10 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6306 10 : if (!SWIG_IsOK(res1)) {
6307 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetNextByIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6308 : }
6309 10 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6310 10 : ecode2 = SWIG_AsVal_long(obj1, &val2);
6311 10 : if (!SWIG_IsOK(ecode2)) {
6312 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetNextByIndex" "', argument " "2"" of type '" "long""'");
6313 : }
6314 10 : arg2 = static_cast< long >(val2);
6315 : {
6316 10 : if ( bUseExceptions ) {
6317 0 : CPLErrorReset();
6318 : }
6319 10 : result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
6320 10 : if ( bUseExceptions ) {
6321 0 : CPLErr eclass = CPLGetLastErrorType();
6322 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6323 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6324 : }
6325 : }
6326 : }
6327 : {
6328 : /* %typemap(out) OGRErr */
6329 10 : if ( result != 0 && bUseExceptions) {
6330 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6331 0 : SWIG_fail;
6332 : }
6333 : }
6334 : {
6335 : /* %typemap(ret) OGRErr */
6336 10 : if (resultobj == Py_None ) {
6337 0 : Py_DECREF(resultobj);
6338 0 : resultobj = 0;
6339 : }
6340 10 : if (resultobj == 0) {
6341 10 : resultobj = PyInt_FromLong( result );
6342 : }
6343 : }
6344 10 : return resultobj;
6345 : fail:
6346 0 : return NULL;
6347 : }
6348 :
6349 :
6350 2057 : SWIGINTERN PyObject *_wrap_Layer_SetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6351 2057 : PyObject *resultobj = 0;
6352 2057 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6353 2057 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
6354 2057 : void *argp1 = 0 ;
6355 2057 : int res1 = 0 ;
6356 2057 : void *argp2 = 0 ;
6357 2057 : int res2 = 0 ;
6358 2057 : PyObject * obj0 = 0 ;
6359 2057 : PyObject * obj1 = 0 ;
6360 : OGRErr result;
6361 :
6362 2057 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetFeature",&obj0,&obj1)) SWIG_fail;
6363 2057 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6364 2057 : if (!SWIG_IsOK(res1)) {
6365 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6366 : }
6367 2057 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6368 2057 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
6369 2057 : if (!SWIG_IsOK(res2)) {
6370 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
6371 : }
6372 2057 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
6373 : {
6374 2057 : if (!arg2) {
6375 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6376 : }
6377 : }
6378 : {
6379 2057 : if ( bUseExceptions ) {
6380 0 : CPLErrorReset();
6381 : }
6382 2057 : result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
6383 2057 : if ( bUseExceptions ) {
6384 0 : CPLErr eclass = CPLGetLastErrorType();
6385 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6386 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6387 : }
6388 : }
6389 : }
6390 : {
6391 : /* %typemap(out) OGRErr */
6392 2057 : if ( result != 0 && bUseExceptions) {
6393 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6394 0 : SWIG_fail;
6395 : }
6396 : }
6397 : {
6398 : /* %typemap(ret) OGRErr */
6399 2057 : if (resultobj == Py_None ) {
6400 0 : Py_DECREF(resultobj);
6401 0 : resultobj = 0;
6402 : }
6403 2057 : if (resultobj == 0) {
6404 2057 : resultobj = PyInt_FromLong( result );
6405 : }
6406 : }
6407 2057 : return resultobj;
6408 : fail:
6409 0 : return NULL;
6410 : }
6411 :
6412 :
6413 32930 : SWIGINTERN PyObject *_wrap_Layer_CreateFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6414 32930 : PyObject *resultobj = 0;
6415 32930 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6416 32930 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
6417 32930 : void *argp1 = 0 ;
6418 32930 : int res1 = 0 ;
6419 32930 : void *argp2 = 0 ;
6420 32930 : int res2 = 0 ;
6421 32930 : PyObject * obj0 = 0 ;
6422 32930 : PyObject * obj1 = 0 ;
6423 : OGRErr result;
6424 :
6425 32930 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_CreateFeature",&obj0,&obj1)) SWIG_fail;
6426 32930 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6427 32930 : if (!SWIG_IsOK(res1)) {
6428 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6429 : }
6430 32930 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6431 32930 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
6432 32930 : if (!SWIG_IsOK(res2)) {
6433 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
6434 : }
6435 32930 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
6436 : {
6437 32930 : if (!arg2) {
6438 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6439 : }
6440 : }
6441 : {
6442 32930 : if ( bUseExceptions ) {
6443 0 : CPLErrorReset();
6444 : }
6445 32930 : result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
6446 32930 : if ( bUseExceptions ) {
6447 0 : CPLErr eclass = CPLGetLastErrorType();
6448 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6449 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6450 : }
6451 : }
6452 : }
6453 : {
6454 : /* %typemap(out) OGRErr */
6455 32930 : if ( result != 0 && bUseExceptions) {
6456 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6457 0 : SWIG_fail;
6458 : }
6459 : }
6460 : {
6461 : /* %typemap(ret) OGRErr */
6462 32930 : if (resultobj == Py_None ) {
6463 0 : Py_DECREF(resultobj);
6464 0 : resultobj = 0;
6465 : }
6466 32930 : if (resultobj == 0) {
6467 32930 : resultobj = PyInt_FromLong( result );
6468 : }
6469 : }
6470 32930 : return resultobj;
6471 : fail:
6472 0 : return NULL;
6473 : }
6474 :
6475 :
6476 73 : SWIGINTERN PyObject *_wrap_Layer_DeleteFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6477 73 : PyObject *resultobj = 0;
6478 73 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6479 : long arg2 ;
6480 73 : void *argp1 = 0 ;
6481 73 : int res1 = 0 ;
6482 : long val2 ;
6483 73 : int ecode2 = 0 ;
6484 73 : PyObject * obj0 = 0 ;
6485 73 : PyObject * obj1 = 0 ;
6486 : OGRErr result;
6487 :
6488 73 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteFeature",&obj0,&obj1)) SWIG_fail;
6489 73 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6490 73 : if (!SWIG_IsOK(res1)) {
6491 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6492 : }
6493 73 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6494 73 : ecode2 = SWIG_AsVal_long(obj1, &val2);
6495 73 : if (!SWIG_IsOK(ecode2)) {
6496 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteFeature" "', argument " "2"" of type '" "long""'");
6497 : }
6498 73 : arg2 = static_cast< long >(val2);
6499 : {
6500 73 : if ( bUseExceptions ) {
6501 0 : CPLErrorReset();
6502 : }
6503 73 : result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
6504 73 : if ( bUseExceptions ) {
6505 0 : CPLErr eclass = CPLGetLastErrorType();
6506 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6507 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6508 : }
6509 : }
6510 : }
6511 : {
6512 : /* %typemap(out) OGRErr */
6513 73 : if ( result != 0 && bUseExceptions) {
6514 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6515 0 : SWIG_fail;
6516 : }
6517 : }
6518 : {
6519 : /* %typemap(ret) OGRErr */
6520 73 : if (resultobj == Py_None ) {
6521 0 : Py_DECREF(resultobj);
6522 0 : resultobj = 0;
6523 : }
6524 73 : if (resultobj == 0) {
6525 73 : resultobj = PyInt_FromLong( result );
6526 : }
6527 : }
6528 73 : return resultobj;
6529 : fail:
6530 0 : return NULL;
6531 : }
6532 :
6533 :
6534 3 : SWIGINTERN PyObject *_wrap_Layer_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6535 3 : PyObject *resultobj = 0;
6536 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6537 3 : void *argp1 = 0 ;
6538 3 : int res1 = 0 ;
6539 3 : PyObject * obj0 = 0 ;
6540 : OGRErr result;
6541 :
6542 3 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_SyncToDisk",&obj0)) SWIG_fail;
6543 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6544 3 : if (!SWIG_IsOK(res1)) {
6545 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SyncToDisk" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6546 : }
6547 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6548 : {
6549 3 : if ( bUseExceptions ) {
6550 0 : CPLErrorReset();
6551 : }
6552 3 : result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
6553 3 : if ( bUseExceptions ) {
6554 0 : CPLErr eclass = CPLGetLastErrorType();
6555 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6556 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6557 : }
6558 : }
6559 : }
6560 : {
6561 : /* %typemap(out) OGRErr */
6562 3 : if ( result != 0 && bUseExceptions) {
6563 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6564 0 : SWIG_fail;
6565 : }
6566 : }
6567 : {
6568 : /* %typemap(ret) OGRErr */
6569 3 : if (resultobj == Py_None ) {
6570 0 : Py_DECREF(resultobj);
6571 0 : resultobj = 0;
6572 : }
6573 3 : if (resultobj == 0) {
6574 3 : resultobj = PyInt_FromLong( result );
6575 : }
6576 : }
6577 3 : return resultobj;
6578 : fail:
6579 0 : return NULL;
6580 : }
6581 :
6582 :
6583 31790 : SWIGINTERN PyObject *_wrap_Layer_GetLayerDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6584 31790 : PyObject *resultobj = 0;
6585 31790 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6586 31790 : void *argp1 = 0 ;
6587 31790 : int res1 = 0 ;
6588 31790 : PyObject * obj0 = 0 ;
6589 31790 : OGRFeatureDefnShadow *result = 0 ;
6590 :
6591 31790 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetLayerDefn",&obj0)) SWIG_fail;
6592 31790 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6593 31790 : if (!SWIG_IsOK(res1)) {
6594 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetLayerDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6595 : }
6596 31790 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6597 : {
6598 31790 : if ( bUseExceptions ) {
6599 0 : CPLErrorReset();
6600 : }
6601 31790 : result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
6602 31790 : if ( bUseExceptions ) {
6603 0 : CPLErr eclass = CPLGetLastErrorType();
6604 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6605 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6606 : }
6607 : }
6608 : }
6609 31790 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
6610 31790 : return resultobj;
6611 : fail:
6612 0 : return NULL;
6613 : }
6614 :
6615 :
6616 685 : SWIGINTERN PyObject *_wrap_Layer_GetFeatureCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6617 685 : PyObject *resultobj = 0;
6618 685 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6619 685 : int arg2 = (int) 1 ;
6620 685 : void *argp1 = 0 ;
6621 685 : int res1 = 0 ;
6622 : int val2 ;
6623 685 : int ecode2 = 0 ;
6624 685 : PyObject * obj0 = 0 ;
6625 685 : PyObject * obj1 = 0 ;
6626 : char * kwnames[] = {
6627 : (char *) "self",(char *) "force", NULL
6628 685 : };
6629 : int result;
6630 :
6631 685 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Layer_GetFeatureCount",kwnames,&obj0,&obj1)) SWIG_fail;
6632 685 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6633 685 : if (!SWIG_IsOK(res1)) {
6634 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeatureCount" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6635 : }
6636 685 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6637 685 : if (obj1) {
6638 13 : ecode2 = SWIG_AsVal_int(obj1, &val2);
6639 13 : if (!SWIG_IsOK(ecode2)) {
6640 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeatureCount" "', argument " "2"" of type '" "int""'");
6641 : }
6642 13 : arg2 = static_cast< int >(val2);
6643 : }
6644 : {
6645 685 : if ( bUseExceptions ) {
6646 0 : CPLErrorReset();
6647 : }
6648 685 : result = (int)OGRLayerShadow_GetFeatureCount(arg1,arg2);
6649 685 : if ( bUseExceptions ) {
6650 0 : CPLErr eclass = CPLGetLastErrorType();
6651 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6652 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6653 : }
6654 : }
6655 : }
6656 685 : resultobj = SWIG_From_int(static_cast< int >(result));
6657 685 : return resultobj;
6658 : fail:
6659 0 : return NULL;
6660 : }
6661 :
6662 :
6663 90 : SWIGINTERN PyObject *_wrap_Layer_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6664 90 : PyObject *resultobj = 0;
6665 90 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6666 : double *arg2 ;
6667 90 : int *arg3 = (int *) NULL ;
6668 90 : int arg4 = (int) 1 ;
6669 90 : int arg5 = (int) 0 ;
6670 90 : void *argp1 = 0 ;
6671 90 : int res1 = 0 ;
6672 : double argout2[6] ;
6673 : int isvalid2 ;
6674 : int val4 ;
6675 90 : int ecode4 = 0 ;
6676 : int val5 ;
6677 90 : int ecode5 = 0 ;
6678 90 : PyObject * obj0 = 0 ;
6679 90 : PyObject * obj1 = 0 ;
6680 90 : PyObject * obj2 = 0 ;
6681 : char * kwnames[] = {
6682 : (char *) "self",(char *) "force",(char *) "can_return_null", NULL
6683 90 : };
6684 :
6685 : {
6686 : /* %typemap(in) (double argout2[4], int* isvalid2) */
6687 90 : arg2 = argout2;
6688 90 : arg3 = &isvalid2;
6689 : }
6690 90 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Layer_GetExtent",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
6691 90 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6692 90 : if (!SWIG_IsOK(res1)) {
6693 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6694 : }
6695 90 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6696 90 : if (obj1) {
6697 9 : ecode4 = SWIG_AsVal_int(obj1, &val4);
6698 9 : if (!SWIG_IsOK(ecode4)) {
6699 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetExtent" "', argument " "4"" of type '" "int""'");
6700 : }
6701 9 : arg4 = static_cast< int >(val4);
6702 : }
6703 90 : if (obj2) {
6704 9 : ecode5 = SWIG_AsVal_int(obj2, &val5);
6705 9 : if (!SWIG_IsOK(ecode5)) {
6706 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetExtent" "', argument " "5"" of type '" "int""'");
6707 : }
6708 9 : arg5 = static_cast< int >(val5);
6709 : }
6710 : {
6711 90 : if ( bUseExceptions ) {
6712 0 : CPLErrorReset();
6713 : }
6714 : OGRLayerShadow_GetExtent(arg1,arg2,arg3,arg4,arg5);
6715 90 : if ( bUseExceptions ) {
6716 0 : CPLErr eclass = CPLGetLastErrorType();
6717 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6718 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6719 : }
6720 : }
6721 : }
6722 90 : resultobj = SWIG_Py_Void();
6723 : {
6724 : /* %typemap(argout) (double argout[4], int* isvalid) */
6725 : PyObject *r;
6726 90 : if ( !*arg3 ) {
6727 0 : Py_INCREF(Py_None);
6728 0 : r = Py_None;
6729 : }
6730 : else {
6731 90 : r = CreateTupleFromDoubleArray(arg2, 4);
6732 : }
6733 90 : resultobj = t_output_helper(resultobj,r);
6734 : }
6735 90 : return resultobj;
6736 : fail:
6737 0 : return NULL;
6738 : }
6739 :
6740 :
6741 140 : SWIGINTERN PyObject *_wrap_Layer_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6742 140 : PyObject *resultobj = 0;
6743 140 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6744 140 : char *arg2 = (char *) 0 ;
6745 140 : void *argp1 = 0 ;
6746 140 : int res1 = 0 ;
6747 : int res2 ;
6748 140 : char *buf2 = 0 ;
6749 140 : int alloc2 = 0 ;
6750 140 : PyObject * obj0 = 0 ;
6751 140 : PyObject * obj1 = 0 ;
6752 : bool result;
6753 :
6754 140 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_TestCapability",&obj0,&obj1)) SWIG_fail;
6755 140 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6756 140 : if (!SWIG_IsOK(res1)) {
6757 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_TestCapability" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6758 : }
6759 140 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6760 140 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
6761 140 : if (!SWIG_IsOK(res2)) {
6762 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_TestCapability" "', argument " "2"" of type '" "char const *""'");
6763 : }
6764 140 : arg2 = reinterpret_cast< char * >(buf2);
6765 : {
6766 140 : if (!arg2) {
6767 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6768 : }
6769 : }
6770 : {
6771 140 : if ( bUseExceptions ) {
6772 0 : CPLErrorReset();
6773 : }
6774 140 : result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
6775 140 : if ( bUseExceptions ) {
6776 0 : CPLErr eclass = CPLGetLastErrorType();
6777 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6778 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6779 : }
6780 : }
6781 : }
6782 140 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6783 140 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6784 140 : return resultobj;
6785 : fail:
6786 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6787 0 : return NULL;
6788 : }
6789 :
6790 :
6791 4649 : SWIGINTERN PyObject *_wrap_Layer_CreateField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6792 4649 : PyObject *resultobj = 0;
6793 4649 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6794 4649 : OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
6795 4649 : int arg3 = (int) 1 ;
6796 4649 : void *argp1 = 0 ;
6797 4649 : int res1 = 0 ;
6798 4649 : void *argp2 = 0 ;
6799 4649 : int res2 = 0 ;
6800 : int val3 ;
6801 4649 : int ecode3 = 0 ;
6802 4649 : PyObject * obj0 = 0 ;
6803 4649 : PyObject * obj1 = 0 ;
6804 4649 : PyObject * obj2 = 0 ;
6805 : char * kwnames[] = {
6806 : (char *) "self",(char *) "field_def",(char *) "approx_ok", NULL
6807 4649 : };
6808 : OGRErr result;
6809 :
6810 4649 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Layer_CreateField",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
6811 4649 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6812 4649 : if (!SWIG_IsOK(res1)) {
6813 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6814 : }
6815 4649 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6816 4649 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
6817 4649 : if (!SWIG_IsOK(res2)) {
6818 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateField" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'");
6819 : }
6820 4649 : arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
6821 4649 : if (obj2) {
6822 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
6823 0 : if (!SWIG_IsOK(ecode3)) {
6824 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateField" "', argument " "3"" of type '" "int""'");
6825 : }
6826 0 : arg3 = static_cast< int >(val3);
6827 : }
6828 : {
6829 4649 : if (!arg2) {
6830 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6831 : }
6832 : }
6833 : {
6834 4649 : if ( bUseExceptions ) {
6835 0 : CPLErrorReset();
6836 : }
6837 4649 : result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
6838 4649 : if ( bUseExceptions ) {
6839 0 : CPLErr eclass = CPLGetLastErrorType();
6840 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6841 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6842 : }
6843 : }
6844 : }
6845 : {
6846 : /* %typemap(out) OGRErr */
6847 4649 : if ( result != 0 && bUseExceptions) {
6848 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6849 0 : SWIG_fail;
6850 : }
6851 : }
6852 : {
6853 : /* %typemap(ret) OGRErr */
6854 4649 : if (resultobj == Py_None ) {
6855 0 : Py_DECREF(resultobj);
6856 0 : resultobj = 0;
6857 : }
6858 4649 : if (resultobj == 0) {
6859 4649 : resultobj = PyInt_FromLong( result );
6860 : }
6861 : }
6862 4649 : return resultobj;
6863 : fail:
6864 0 : return NULL;
6865 : }
6866 :
6867 :
6868 29 : SWIGINTERN PyObject *_wrap_Layer_DeleteField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6869 29 : PyObject *resultobj = 0;
6870 29 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6871 : int arg2 ;
6872 29 : void *argp1 = 0 ;
6873 29 : int res1 = 0 ;
6874 : int val2 ;
6875 29 : int ecode2 = 0 ;
6876 29 : PyObject * obj0 = 0 ;
6877 29 : PyObject * obj1 = 0 ;
6878 : OGRErr result;
6879 :
6880 29 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteField",&obj0,&obj1)) SWIG_fail;
6881 29 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6882 29 : if (!SWIG_IsOK(res1)) {
6883 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6884 : }
6885 29 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6886 29 : ecode2 = SWIG_AsVal_int(obj1, &val2);
6887 29 : if (!SWIG_IsOK(ecode2)) {
6888 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteField" "', argument " "2"" of type '" "int""'");
6889 : }
6890 29 : arg2 = static_cast< int >(val2);
6891 : {
6892 29 : if ( bUseExceptions ) {
6893 0 : CPLErrorReset();
6894 : }
6895 29 : result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
6896 29 : if ( bUseExceptions ) {
6897 0 : CPLErr eclass = CPLGetLastErrorType();
6898 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6899 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6900 : }
6901 : }
6902 : }
6903 : {
6904 : /* %typemap(out) OGRErr */
6905 29 : if ( result != 0 && bUseExceptions) {
6906 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6907 0 : SWIG_fail;
6908 : }
6909 : }
6910 : {
6911 : /* %typemap(ret) OGRErr */
6912 29 : if (resultobj == Py_None ) {
6913 0 : Py_DECREF(resultobj);
6914 0 : resultobj = 0;
6915 : }
6916 29 : if (resultobj == 0) {
6917 29 : resultobj = PyInt_FromLong( result );
6918 : }
6919 : }
6920 29 : return resultobj;
6921 : fail:
6922 0 : return NULL;
6923 : }
6924 :
6925 :
6926 24 : SWIGINTERN PyObject *_wrap_Layer_ReorderField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6927 24 : PyObject *resultobj = 0;
6928 24 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6929 : int arg2 ;
6930 : int arg3 ;
6931 24 : void *argp1 = 0 ;
6932 24 : int res1 = 0 ;
6933 : int val2 ;
6934 24 : int ecode2 = 0 ;
6935 : int val3 ;
6936 24 : int ecode3 = 0 ;
6937 24 : PyObject * obj0 = 0 ;
6938 24 : PyObject * obj1 = 0 ;
6939 24 : PyObject * obj2 = 0 ;
6940 : OGRErr result;
6941 :
6942 24 : if (!PyArg_ParseTuple(args,(char *)"OOO:Layer_ReorderField",&obj0,&obj1,&obj2)) SWIG_fail;
6943 24 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
6944 24 : if (!SWIG_IsOK(res1)) {
6945 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderField" "', argument " "1"" of type '" "OGRLayerShadow *""'");
6946 : }
6947 24 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
6948 24 : ecode2 = SWIG_AsVal_int(obj1, &val2);
6949 24 : if (!SWIG_IsOK(ecode2)) {
6950 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_ReorderField" "', argument " "2"" of type '" "int""'");
6951 : }
6952 24 : arg2 = static_cast< int >(val2);
6953 24 : ecode3 = SWIG_AsVal_int(obj2, &val3);
6954 24 : if (!SWIG_IsOK(ecode3)) {
6955 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_ReorderField" "', argument " "3"" of type '" "int""'");
6956 : }
6957 24 : arg3 = static_cast< int >(val3);
6958 : {
6959 24 : if ( bUseExceptions ) {
6960 0 : CPLErrorReset();
6961 : }
6962 24 : result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
6963 24 : if ( bUseExceptions ) {
6964 0 : CPLErr eclass = CPLGetLastErrorType();
6965 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6966 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6967 : }
6968 : }
6969 : }
6970 : {
6971 : /* %typemap(out) OGRErr */
6972 24 : if ( result != 0 && bUseExceptions) {
6973 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6974 0 : SWIG_fail;
6975 : }
6976 : }
6977 : {
6978 : /* %typemap(ret) OGRErr */
6979 24 : if (resultobj == Py_None ) {
6980 0 : Py_DECREF(resultobj);
6981 0 : resultobj = 0;
6982 : }
6983 24 : if (resultobj == 0) {
6984 24 : resultobj = PyInt_FromLong( result );
6985 : }
6986 : }
6987 24 : return resultobj;
6988 : fail:
6989 0 : return NULL;
6990 : }
6991 :
6992 :
6993 15 : SWIGINTERN PyObject *_wrap_Layer_ReorderFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6994 15 : PyObject *resultobj = 0;
6995 15 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
6996 : int arg2 ;
6997 15 : int *arg3 = (int *) 0 ;
6998 15 : void *argp1 = 0 ;
6999 15 : int res1 = 0 ;
7000 15 : PyObject * obj0 = 0 ;
7001 15 : PyObject * obj1 = 0 ;
7002 : OGRErr result;
7003 :
7004 15 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_ReorderFields",&obj0,&obj1)) SWIG_fail;
7005 15 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7006 15 : if (!SWIG_IsOK(res1)) {
7007 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderFields" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7008 : }
7009 15 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7010 : {
7011 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
7012 : /* check if is List */
7013 15 : if ( !PySequence_Check(obj1) ) {
7014 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
7015 0 : SWIG_fail;
7016 : }
7017 15 : arg2 = PySequence_Size(obj1);
7018 15 : arg3 = (int*) malloc(arg2*sizeof(int));
7019 53 : for( int i = 0; i<arg2; i++ ) {
7020 38 : PyObject *o = PySequence_GetItem(obj1,i);
7021 38 : if ( !PyArg_Parse(o,"i",&arg3[i]) ) {
7022 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
7023 0 : Py_DECREF(o);
7024 : SWIG_fail;
7025 : }
7026 38 : Py_DECREF(o);
7027 : }
7028 : }
7029 : {
7030 15 : if ( bUseExceptions ) {
7031 0 : CPLErrorReset();
7032 : }
7033 15 : result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
7034 15 : if ( bUseExceptions ) {
7035 0 : CPLErr eclass = CPLGetLastErrorType();
7036 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7037 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7038 : }
7039 : }
7040 : }
7041 : {
7042 : /* %typemap(out) OGRErr */
7043 15 : if ( result != 0 && bUseExceptions) {
7044 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7045 0 : SWIG_fail;
7046 : }
7047 : }
7048 : {
7049 : /* %typemap(freearg) (int nList, int* pList) */
7050 15 : if (arg3) {
7051 15 : free((void*) arg3);
7052 : }
7053 : }
7054 : {
7055 : /* %typemap(ret) OGRErr */
7056 15 : if (resultobj == Py_None ) {
7057 0 : Py_DECREF(resultobj);
7058 0 : resultobj = 0;
7059 : }
7060 15 : if (resultobj == 0) {
7061 15 : resultobj = PyInt_FromLong( result );
7062 : }
7063 : }
7064 15 : return resultobj;
7065 : fail:
7066 : {
7067 : /* %typemap(freearg) (int nList, int* pList) */
7068 0 : if (arg3) {
7069 0 : free((void*) arg3);
7070 : }
7071 : }
7072 0 : return NULL;
7073 : }
7074 :
7075 :
7076 34 : SWIGINTERN PyObject *_wrap_Layer_AlterFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7077 34 : PyObject *resultobj = 0;
7078 34 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7079 : int arg2 ;
7080 34 : OGRFieldDefnShadow *arg3 = (OGRFieldDefnShadow *) 0 ;
7081 : int arg4 ;
7082 34 : void *argp1 = 0 ;
7083 34 : int res1 = 0 ;
7084 : int val2 ;
7085 34 : int ecode2 = 0 ;
7086 34 : void *argp3 = 0 ;
7087 34 : int res3 = 0 ;
7088 : int val4 ;
7089 34 : int ecode4 = 0 ;
7090 34 : PyObject * obj0 = 0 ;
7091 34 : PyObject * obj1 = 0 ;
7092 34 : PyObject * obj2 = 0 ;
7093 34 : PyObject * obj3 = 0 ;
7094 : OGRErr result;
7095 :
7096 34 : if (!PyArg_ParseTuple(args,(char *)"OOOO:Layer_AlterFieldDefn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7097 34 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7098 34 : if (!SWIG_IsOK(res1)) {
7099 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_AlterFieldDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7100 : }
7101 34 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7102 34 : ecode2 = SWIG_AsVal_int(obj1, &val2);
7103 34 : if (!SWIG_IsOK(ecode2)) {
7104 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_AlterFieldDefn" "', argument " "2"" of type '" "int""'");
7105 : }
7106 34 : arg2 = static_cast< int >(val2);
7107 34 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
7108 34 : if (!SWIG_IsOK(res3)) {
7109 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_AlterFieldDefn" "', argument " "3"" of type '" "OGRFieldDefnShadow *""'");
7110 : }
7111 34 : arg3 = reinterpret_cast< OGRFieldDefnShadow * >(argp3);
7112 34 : ecode4 = SWIG_AsVal_int(obj3, &val4);
7113 34 : if (!SWIG_IsOK(ecode4)) {
7114 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_AlterFieldDefn" "', argument " "4"" of type '" "int""'");
7115 : }
7116 34 : arg4 = static_cast< int >(val4);
7117 : {
7118 34 : if (!arg3) {
7119 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7120 : }
7121 : }
7122 : {
7123 34 : if ( bUseExceptions ) {
7124 0 : CPLErrorReset();
7125 : }
7126 34 : result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
7127 34 : if ( bUseExceptions ) {
7128 0 : CPLErr eclass = CPLGetLastErrorType();
7129 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7130 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7131 : }
7132 : }
7133 : }
7134 : {
7135 : /* %typemap(out) OGRErr */
7136 34 : if ( result != 0 && bUseExceptions) {
7137 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7138 0 : SWIG_fail;
7139 : }
7140 : }
7141 : {
7142 : /* %typemap(ret) OGRErr */
7143 34 : if (resultobj == Py_None ) {
7144 0 : Py_DECREF(resultobj);
7145 0 : resultobj = 0;
7146 : }
7147 34 : if (resultobj == 0) {
7148 34 : resultobj = PyInt_FromLong( result );
7149 : }
7150 : }
7151 34 : return resultobj;
7152 : fail:
7153 0 : return NULL;
7154 : }
7155 :
7156 :
7157 70 : SWIGINTERN PyObject *_wrap_Layer_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7158 70 : PyObject *resultobj = 0;
7159 70 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7160 70 : void *argp1 = 0 ;
7161 70 : int res1 = 0 ;
7162 70 : PyObject * obj0 = 0 ;
7163 : OGRErr result;
7164 :
7165 70 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_StartTransaction",&obj0)) SWIG_fail;
7166 70 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7167 70 : if (!SWIG_IsOK(res1)) {
7168 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_StartTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7169 : }
7170 70 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7171 : {
7172 70 : if ( bUseExceptions ) {
7173 0 : CPLErrorReset();
7174 : }
7175 70 : result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
7176 70 : if ( bUseExceptions ) {
7177 0 : CPLErr eclass = CPLGetLastErrorType();
7178 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7179 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7180 : }
7181 : }
7182 : }
7183 : {
7184 : /* %typemap(out) OGRErr */
7185 70 : if ( result != 0 && bUseExceptions) {
7186 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7187 0 : SWIG_fail;
7188 : }
7189 : }
7190 : {
7191 : /* %typemap(ret) OGRErr */
7192 70 : if (resultobj == Py_None ) {
7193 0 : Py_DECREF(resultobj);
7194 0 : resultobj = 0;
7195 : }
7196 70 : if (resultobj == 0) {
7197 70 : resultobj = PyInt_FromLong( result );
7198 : }
7199 : }
7200 70 : return resultobj;
7201 : fail:
7202 0 : return NULL;
7203 : }
7204 :
7205 :
7206 67 : SWIGINTERN PyObject *_wrap_Layer_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7207 67 : PyObject *resultobj = 0;
7208 67 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7209 67 : void *argp1 = 0 ;
7210 67 : int res1 = 0 ;
7211 67 : PyObject * obj0 = 0 ;
7212 : OGRErr result;
7213 :
7214 67 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_CommitTransaction",&obj0)) SWIG_fail;
7215 67 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7216 67 : if (!SWIG_IsOK(res1)) {
7217 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CommitTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7218 : }
7219 67 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7220 : {
7221 67 : if ( bUseExceptions ) {
7222 0 : CPLErrorReset();
7223 : }
7224 67 : result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
7225 67 : if ( bUseExceptions ) {
7226 0 : CPLErr eclass = CPLGetLastErrorType();
7227 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7228 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7229 : }
7230 : }
7231 : }
7232 : {
7233 : /* %typemap(out) OGRErr */
7234 67 : if ( result != 0 && bUseExceptions) {
7235 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7236 0 : SWIG_fail;
7237 : }
7238 : }
7239 : {
7240 : /* %typemap(ret) OGRErr */
7241 67 : if (resultobj == Py_None ) {
7242 0 : Py_DECREF(resultobj);
7243 0 : resultobj = 0;
7244 : }
7245 67 : if (resultobj == 0) {
7246 67 : resultobj = PyInt_FromLong( result );
7247 : }
7248 : }
7249 67 : return resultobj;
7250 : fail:
7251 0 : return NULL;
7252 : }
7253 :
7254 :
7255 4 : SWIGINTERN PyObject *_wrap_Layer_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7256 4 : PyObject *resultobj = 0;
7257 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7258 4 : void *argp1 = 0 ;
7259 4 : int res1 = 0 ;
7260 4 : PyObject * obj0 = 0 ;
7261 : OGRErr result;
7262 :
7263 4 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_RollbackTransaction",&obj0)) SWIG_fail;
7264 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7265 4 : if (!SWIG_IsOK(res1)) {
7266 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_RollbackTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7267 : }
7268 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7269 : {
7270 4 : if ( bUseExceptions ) {
7271 0 : CPLErrorReset();
7272 : }
7273 4 : result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
7274 4 : if ( bUseExceptions ) {
7275 0 : CPLErr eclass = CPLGetLastErrorType();
7276 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7277 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7278 : }
7279 : }
7280 : }
7281 : {
7282 : /* %typemap(out) OGRErr */
7283 4 : if ( result != 0 && bUseExceptions) {
7284 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7285 0 : SWIG_fail;
7286 : }
7287 : }
7288 : {
7289 : /* %typemap(ret) OGRErr */
7290 4 : if (resultobj == Py_None ) {
7291 0 : Py_DECREF(resultobj);
7292 0 : resultobj = 0;
7293 : }
7294 4 : if (resultobj == 0) {
7295 4 : resultobj = PyInt_FromLong( result );
7296 : }
7297 : }
7298 4 : return resultobj;
7299 : fail:
7300 0 : return NULL;
7301 : }
7302 :
7303 :
7304 254 : SWIGINTERN PyObject *_wrap_Layer_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7305 254 : PyObject *resultobj = 0;
7306 254 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7307 254 : void *argp1 = 0 ;
7308 254 : int res1 = 0 ;
7309 254 : PyObject * obj0 = 0 ;
7310 254 : OSRSpatialReferenceShadow *result = 0 ;
7311 :
7312 254 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetSpatialRef",&obj0)) SWIG_fail;
7313 254 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7314 254 : if (!SWIG_IsOK(res1)) {
7315 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialRef" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7316 : }
7317 254 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7318 : {
7319 254 : if ( bUseExceptions ) {
7320 0 : CPLErrorReset();
7321 : }
7322 254 : result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
7323 254 : if ( bUseExceptions ) {
7324 0 : CPLErr eclass = CPLGetLastErrorType();
7325 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7326 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7327 : }
7328 : }
7329 : }
7330 254 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
7331 254 : return resultobj;
7332 : fail:
7333 0 : return NULL;
7334 : }
7335 :
7336 :
7337 0 : SWIGINTERN PyObject *_wrap_Layer_GetFeaturesRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7338 0 : PyObject *resultobj = 0;
7339 0 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7340 0 : void *argp1 = 0 ;
7341 0 : int res1 = 0 ;
7342 0 : PyObject * obj0 = 0 ;
7343 : GIntBig result;
7344 :
7345 0 : if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFeaturesRead",&obj0)) SWIG_fail;
7346 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7347 0 : if (!SWIG_IsOK(res1)) {
7348 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeaturesRead" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7349 : }
7350 0 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7351 : {
7352 0 : if ( bUseExceptions ) {
7353 0 : CPLErrorReset();
7354 : }
7355 0 : result = OGRLayerShadow_GetFeaturesRead(arg1);
7356 0 : if ( bUseExceptions ) {
7357 0 : CPLErr eclass = CPLGetLastErrorType();
7358 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7359 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7360 : }
7361 : }
7362 : }
7363 0 : resultobj = SWIG_NewPointerObj((new GIntBig(static_cast< const GIntBig& >(result))), SWIGTYPE_p_GIntBig, SWIG_POINTER_OWN | 0 );
7364 0 : return resultobj;
7365 : fail:
7366 0 : return NULL;
7367 : }
7368 :
7369 :
7370 4 : SWIGINTERN PyObject *_wrap_Layer_SetIgnoredFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7371 4 : PyObject *resultobj = 0;
7372 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7373 4 : char **arg2 = (char **) 0 ;
7374 4 : void *argp1 = 0 ;
7375 4 : int res1 = 0 ;
7376 4 : PyObject * obj0 = 0 ;
7377 4 : PyObject * obj1 = 0 ;
7378 : OGRErr result;
7379 :
7380 4 : if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetIgnoredFields",&obj0,&obj1)) SWIG_fail;
7381 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7382 4 : if (!SWIG_IsOK(res1)) {
7383 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetIgnoredFields" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7384 : }
7385 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7386 : {
7387 : /* %typemap(in) char **options */
7388 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
7389 4 : if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
7390 : #if PY_VERSION_HEX < 0x03000000
7391 : || PyString_Check(obj1)
7392 : #endif
7393 : ) {
7394 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
7395 0 : SWIG_fail;
7396 : }
7397 :
7398 4 : int size = PySequence_Size(obj1);
7399 8 : for (int i = 0; i < size; i++) {
7400 4 : PyObject* pyObj = PySequence_GetItem(obj1,i);
7401 4 : if (PyUnicode_Check(pyObj))
7402 : {
7403 : char *pszStr;
7404 : Py_ssize_t nLen;
7405 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
7406 : #if PY_VERSION_HEX >= 0x03000000
7407 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
7408 : #else
7409 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
7410 : #endif
7411 0 : arg2 = CSLAddString( arg2, pszStr );
7412 0 : Py_XDECREF(pyUTF8Str);
7413 : }
7414 : #if PY_VERSION_HEX >= 0x03000000
7415 : else if (PyBytes_Check(pyObj))
7416 : arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
7417 : #else
7418 4 : else if (PyString_Check(pyObj))
7419 4 : arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
7420 : #endif
7421 : else
7422 : {
7423 0 : Py_DECREF(pyObj);
7424 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
7425 0 : SWIG_fail;
7426 : }
7427 4 : Py_DECREF(pyObj);
7428 : }
7429 : }
7430 : {
7431 4 : if ( bUseExceptions ) {
7432 0 : CPLErrorReset();
7433 : }
7434 4 : result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
7435 4 : if ( bUseExceptions ) {
7436 0 : CPLErr eclass = CPLGetLastErrorType();
7437 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7438 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7439 : }
7440 : }
7441 : }
7442 : {
7443 : /* %typemap(out) OGRErr */
7444 4 : if ( result != 0 && bUseExceptions) {
7445 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7446 0 : SWIG_fail;
7447 : }
7448 : }
7449 : {
7450 : /* %typemap(freearg) char **options */
7451 4 : CSLDestroy( arg2 );
7452 : }
7453 : {
7454 : /* %typemap(ret) OGRErr */
7455 4 : if (resultobj == Py_None ) {
7456 0 : Py_DECREF(resultobj);
7457 0 : resultobj = 0;
7458 : }
7459 4 : if (resultobj == 0) {
7460 4 : resultobj = PyInt_FromLong( result );
7461 : }
7462 : }
7463 4 : return resultobj;
7464 : fail:
7465 : {
7466 : /* %typemap(freearg) char **options */
7467 0 : CSLDestroy( arg2 );
7468 : }
7469 0 : return NULL;
7470 : }
7471 :
7472 :
7473 3 : SWIGINTERN PyObject *_wrap_Layer_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7474 3 : PyObject *resultobj = 0;
7475 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7476 3 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
7477 3 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
7478 3 : char **arg4 = (char **) NULL ;
7479 3 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
7480 3 : void *arg6 = (void *) NULL ;
7481 3 : void *argp1 = 0 ;
7482 3 : int res1 = 0 ;
7483 3 : void *argp2 = 0 ;
7484 3 : int res2 = 0 ;
7485 3 : void *argp3 = 0 ;
7486 3 : int res3 = 0 ;
7487 3 : PyObject * obj0 = 0 ;
7488 3 : PyObject * obj1 = 0 ;
7489 3 : PyObject * obj2 = 0 ;
7490 3 : PyObject * obj3 = 0 ;
7491 3 : PyObject * obj4 = 0 ;
7492 3 : PyObject * obj5 = 0 ;
7493 : char * kwnames[] = {
7494 : (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL
7495 3 : };
7496 : OGRErr result;
7497 :
7498 : /* %typemap(arginit) ( const char* callback_data=NULL) */
7499 : PyProgressData *psProgressInfo;
7500 3 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
7501 3 : psProgressInfo->nLastReported = -1;
7502 3 : psProgressInfo->psPyCallback = NULL;
7503 3 : psProgressInfo->psPyCallbackData = NULL;
7504 3 : arg6 = psProgressInfo;
7505 3 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Intersection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7506 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7507 3 : if (!SWIG_IsOK(res1)) {
7508 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Intersection" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7509 : }
7510 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7511 3 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7512 3 : if (!SWIG_IsOK(res2)) {
7513 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Intersection" "', argument " "2"" of type '" "OGRLayerShadow *""'");
7514 : }
7515 3 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
7516 3 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7517 3 : if (!SWIG_IsOK(res3)) {
7518 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Intersection" "', argument " "3"" of type '" "OGRLayerShadow *""'");
7519 : }
7520 3 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
7521 3 : if (obj3) {
7522 : {
7523 : /* %typemap(in) char **options */
7524 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
7525 1 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
7526 : #if PY_VERSION_HEX < 0x03000000
7527 : || PyString_Check(obj3)
7528 : #endif
7529 : ) {
7530 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
7531 0 : SWIG_fail;
7532 : }
7533 :
7534 1 : int size = PySequence_Size(obj3);
7535 2 : for (int i = 0; i < size; i++) {
7536 1 : PyObject* pyObj = PySequence_GetItem(obj3,i);
7537 1 : if (PyUnicode_Check(pyObj))
7538 : {
7539 : char *pszStr;
7540 : Py_ssize_t nLen;
7541 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
7542 : #if PY_VERSION_HEX >= 0x03000000
7543 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
7544 : #else
7545 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
7546 : #endif
7547 0 : arg4 = CSLAddString( arg4, pszStr );
7548 0 : Py_XDECREF(pyUTF8Str);
7549 : }
7550 : #if PY_VERSION_HEX >= 0x03000000
7551 : else if (PyBytes_Check(pyObj))
7552 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
7553 : #else
7554 1 : else if (PyString_Check(pyObj))
7555 1 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
7556 : #endif
7557 : else
7558 : {
7559 0 : Py_DECREF(pyObj);
7560 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
7561 0 : SWIG_fail;
7562 : }
7563 1 : Py_DECREF(pyObj);
7564 : }
7565 : }
7566 : }
7567 3 : if (obj4) {
7568 : {
7569 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
7570 : /* callback_func typemap */
7571 0 : if (obj4 && obj4 != Py_None ) {
7572 0 : void* cbfunction = NULL;
7573 : SWIG_ConvertPtr( obj4,
7574 : (void**)&cbfunction,
7575 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
7576 0 : SWIG_POINTER_EXCEPTION | 0 );
7577 :
7578 0 : if ( cbfunction == GDALTermProgress ) {
7579 0 : arg5 = GDALTermProgress;
7580 : } else {
7581 0 : if (!PyCallable_Check(obj4)) {
7582 : PyErr_SetString( PyExc_RuntimeError,
7583 0 : "Object given is not a Python function" );
7584 0 : SWIG_fail;
7585 : }
7586 0 : psProgressInfo->psPyCallback = obj4;
7587 0 : arg5 = PyProgressProxy;
7588 : }
7589 :
7590 : }
7591 :
7592 : }
7593 : }
7594 3 : if (obj5) {
7595 : {
7596 : /* %typemap(in) ( void* callback_data=NULL) */
7597 0 : psProgressInfo->psPyCallbackData = obj5 ;
7598 : }
7599 : }
7600 : {
7601 3 : if ( bUseExceptions ) {
7602 0 : CPLErrorReset();
7603 : }
7604 3 : result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,arg5,arg6);
7605 3 : if ( bUseExceptions ) {
7606 0 : CPLErr eclass = CPLGetLastErrorType();
7607 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7608 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7609 : }
7610 : }
7611 : }
7612 : {
7613 : /* %typemap(out) OGRErr */
7614 3 : if ( result != 0 && bUseExceptions) {
7615 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7616 0 : SWIG_fail;
7617 : }
7618 : }
7619 : {
7620 : /* %typemap(freearg) char **options */
7621 3 : CSLDestroy( arg4 );
7622 : }
7623 : {
7624 : /* %typemap(freearg) ( void* callback_data=NULL) */
7625 :
7626 3 : CPLFree(psProgressInfo);
7627 :
7628 : }
7629 : {
7630 : /* %typemap(ret) OGRErr */
7631 3 : if (resultobj == Py_None ) {
7632 0 : Py_DECREF(resultobj);
7633 0 : resultobj = 0;
7634 : }
7635 3 : if (resultobj == 0) {
7636 3 : resultobj = PyInt_FromLong( result );
7637 : }
7638 : }
7639 3 : return resultobj;
7640 : fail:
7641 : {
7642 : /* %typemap(freearg) char **options */
7643 0 : CSLDestroy( arg4 );
7644 : }
7645 : {
7646 : /* %typemap(freearg) ( void* callback_data=NULL) */
7647 :
7648 0 : CPLFree(psProgressInfo);
7649 :
7650 : }
7651 0 : return NULL;
7652 : }
7653 :
7654 :
7655 4 : SWIGINTERN PyObject *_wrap_Layer_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7656 4 : PyObject *resultobj = 0;
7657 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7658 4 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
7659 4 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
7660 4 : char **arg4 = (char **) NULL ;
7661 4 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
7662 4 : void *arg6 = (void *) NULL ;
7663 4 : void *argp1 = 0 ;
7664 4 : int res1 = 0 ;
7665 4 : void *argp2 = 0 ;
7666 4 : int res2 = 0 ;
7667 4 : void *argp3 = 0 ;
7668 4 : int res3 = 0 ;
7669 4 : PyObject * obj0 = 0 ;
7670 4 : PyObject * obj1 = 0 ;
7671 4 : PyObject * obj2 = 0 ;
7672 4 : PyObject * obj3 = 0 ;
7673 4 : PyObject * obj4 = 0 ;
7674 4 : PyObject * obj5 = 0 ;
7675 : char * kwnames[] = {
7676 : (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL
7677 4 : };
7678 : OGRErr result;
7679 :
7680 : /* %typemap(arginit) ( const char* callback_data=NULL) */
7681 : PyProgressData *psProgressInfo;
7682 4 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
7683 4 : psProgressInfo->nLastReported = -1;
7684 4 : psProgressInfo->psPyCallback = NULL;
7685 4 : psProgressInfo->psPyCallbackData = NULL;
7686 4 : arg6 = psProgressInfo;
7687 4 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Union",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7688 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7689 4 : if (!SWIG_IsOK(res1)) {
7690 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Union" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7691 : }
7692 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7693 4 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7694 4 : if (!SWIG_IsOK(res2)) {
7695 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Union" "', argument " "2"" of type '" "OGRLayerShadow *""'");
7696 : }
7697 4 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
7698 4 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7699 4 : if (!SWIG_IsOK(res3)) {
7700 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Union" "', argument " "3"" of type '" "OGRLayerShadow *""'");
7701 : }
7702 4 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
7703 4 : if (obj3) {
7704 : {
7705 : /* %typemap(in) char **options */
7706 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
7707 1 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
7708 : #if PY_VERSION_HEX < 0x03000000
7709 : || PyString_Check(obj3)
7710 : #endif
7711 : ) {
7712 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
7713 0 : SWIG_fail;
7714 : }
7715 :
7716 1 : int size = PySequence_Size(obj3);
7717 2 : for (int i = 0; i < size; i++) {
7718 1 : PyObject* pyObj = PySequence_GetItem(obj3,i);
7719 1 : if (PyUnicode_Check(pyObj))
7720 : {
7721 : char *pszStr;
7722 : Py_ssize_t nLen;
7723 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
7724 : #if PY_VERSION_HEX >= 0x03000000
7725 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
7726 : #else
7727 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
7728 : #endif
7729 0 : arg4 = CSLAddString( arg4, pszStr );
7730 0 : Py_XDECREF(pyUTF8Str);
7731 : }
7732 : #if PY_VERSION_HEX >= 0x03000000
7733 : else if (PyBytes_Check(pyObj))
7734 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
7735 : #else
7736 1 : else if (PyString_Check(pyObj))
7737 1 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
7738 : #endif
7739 : else
7740 : {
7741 0 : Py_DECREF(pyObj);
7742 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
7743 0 : SWIG_fail;
7744 : }
7745 1 : Py_DECREF(pyObj);
7746 : }
7747 : }
7748 : }
7749 4 : if (obj4) {
7750 : {
7751 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
7752 : /* callback_func typemap */
7753 0 : if (obj4 && obj4 != Py_None ) {
7754 0 : void* cbfunction = NULL;
7755 : SWIG_ConvertPtr( obj4,
7756 : (void**)&cbfunction,
7757 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
7758 0 : SWIG_POINTER_EXCEPTION | 0 );
7759 :
7760 0 : if ( cbfunction == GDALTermProgress ) {
7761 0 : arg5 = GDALTermProgress;
7762 : } else {
7763 0 : if (!PyCallable_Check(obj4)) {
7764 : PyErr_SetString( PyExc_RuntimeError,
7765 0 : "Object given is not a Python function" );
7766 0 : SWIG_fail;
7767 : }
7768 0 : psProgressInfo->psPyCallback = obj4;
7769 0 : arg5 = PyProgressProxy;
7770 : }
7771 :
7772 : }
7773 :
7774 : }
7775 : }
7776 4 : if (obj5) {
7777 : {
7778 : /* %typemap(in) ( void* callback_data=NULL) */
7779 0 : psProgressInfo->psPyCallbackData = obj5 ;
7780 : }
7781 : }
7782 : {
7783 4 : if ( bUseExceptions ) {
7784 0 : CPLErrorReset();
7785 : }
7786 4 : result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,arg5,arg6);
7787 4 : if ( bUseExceptions ) {
7788 0 : CPLErr eclass = CPLGetLastErrorType();
7789 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7790 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7791 : }
7792 : }
7793 : }
7794 : {
7795 : /* %typemap(out) OGRErr */
7796 4 : if ( result != 0 && bUseExceptions) {
7797 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7798 0 : SWIG_fail;
7799 : }
7800 : }
7801 : {
7802 : /* %typemap(freearg) char **options */
7803 4 : CSLDestroy( arg4 );
7804 : }
7805 : {
7806 : /* %typemap(freearg) ( void* callback_data=NULL) */
7807 :
7808 4 : CPLFree(psProgressInfo);
7809 :
7810 : }
7811 : {
7812 : /* %typemap(ret) OGRErr */
7813 4 : if (resultobj == Py_None ) {
7814 0 : Py_DECREF(resultobj);
7815 0 : resultobj = 0;
7816 : }
7817 4 : if (resultobj == 0) {
7818 4 : resultobj = PyInt_FromLong( result );
7819 : }
7820 : }
7821 4 : return resultobj;
7822 : fail:
7823 : {
7824 : /* %typemap(freearg) char **options */
7825 0 : CSLDestroy( arg4 );
7826 : }
7827 : {
7828 : /* %typemap(freearg) ( void* callback_data=NULL) */
7829 :
7830 0 : CPLFree(psProgressInfo);
7831 :
7832 : }
7833 0 : return NULL;
7834 : }
7835 :
7836 :
7837 3 : SWIGINTERN PyObject *_wrap_Layer_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7838 3 : PyObject *resultobj = 0;
7839 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
7840 3 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
7841 3 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
7842 3 : char **arg4 = (char **) NULL ;
7843 3 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
7844 3 : void *arg6 = (void *) NULL ;
7845 3 : void *argp1 = 0 ;
7846 3 : int res1 = 0 ;
7847 3 : void *argp2 = 0 ;
7848 3 : int res2 = 0 ;
7849 3 : void *argp3 = 0 ;
7850 3 : int res3 = 0 ;
7851 3 : PyObject * obj0 = 0 ;
7852 3 : PyObject * obj1 = 0 ;
7853 3 : PyObject * obj2 = 0 ;
7854 3 : PyObject * obj3 = 0 ;
7855 3 : PyObject * obj4 = 0 ;
7856 3 : PyObject * obj5 = 0 ;
7857 : char * kwnames[] = {
7858 : (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL
7859 3 : };
7860 : OGRErr result;
7861 :
7862 : /* %typemap(arginit) ( const char* callback_data=NULL) */
7863 : PyProgressData *psProgressInfo;
7864 3 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
7865 3 : psProgressInfo->nLastReported = -1;
7866 3 : psProgressInfo->psPyCallback = NULL;
7867 3 : psProgressInfo->psPyCallbackData = NULL;
7868 3 : arg6 = psProgressInfo;
7869 3 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_SymDifference",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7870 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7871 3 : if (!SWIG_IsOK(res1)) {
7872 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SymDifference" "', argument " "1"" of type '" "OGRLayerShadow *""'");
7873 : }
7874 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
7875 3 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7876 3 : if (!SWIG_IsOK(res2)) {
7877 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SymDifference" "', argument " "2"" of type '" "OGRLayerShadow *""'");
7878 : }
7879 3 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
7880 3 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
7881 3 : if (!SWIG_IsOK(res3)) {
7882 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SymDifference" "', argument " "3"" of type '" "OGRLayerShadow *""'");
7883 : }
7884 3 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
7885 3 : if (obj3) {
7886 : {
7887 : /* %typemap(in) char **options */
7888 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
7889 1 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
7890 : #if PY_VERSION_HEX < 0x03000000
7891 : || PyString_Check(obj3)
7892 : #endif
7893 : ) {
7894 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
7895 0 : SWIG_fail;
7896 : }
7897 :
7898 1 : int size = PySequence_Size(obj3);
7899 2 : for (int i = 0; i < size; i++) {
7900 1 : PyObject* pyObj = PySequence_GetItem(obj3,i);
7901 1 : if (PyUnicode_Check(pyObj))
7902 : {
7903 : char *pszStr;
7904 : Py_ssize_t nLen;
7905 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
7906 : #if PY_VERSION_HEX >= 0x03000000
7907 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
7908 : #else
7909 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
7910 : #endif
7911 0 : arg4 = CSLAddString( arg4, pszStr );
7912 0 : Py_XDECREF(pyUTF8Str);
7913 : }
7914 : #if PY_VERSION_HEX >= 0x03000000
7915 : else if (PyBytes_Check(pyObj))
7916 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
7917 : #else
7918 1 : else if (PyString_Check(pyObj))
7919 1 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
7920 : #endif
7921 : else
7922 : {
7923 0 : Py_DECREF(pyObj);
7924 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
7925 0 : SWIG_fail;
7926 : }
7927 1 : Py_DECREF(pyObj);
7928 : }
7929 : }
7930 : }
7931 3 : if (obj4) {
7932 : {
7933 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
7934 : /* callback_func typemap */
7935 0 : if (obj4 && obj4 != Py_None ) {
7936 0 : void* cbfunction = NULL;
7937 : SWIG_ConvertPtr( obj4,
7938 : (void**)&cbfunction,
7939 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
7940 0 : SWIG_POINTER_EXCEPTION | 0 );
7941 :
7942 0 : if ( cbfunction == GDALTermProgress ) {
7943 0 : arg5 = GDALTermProgress;
7944 : } else {
7945 0 : if (!PyCallable_Check(obj4)) {
7946 : PyErr_SetString( PyExc_RuntimeError,
7947 0 : "Object given is not a Python function" );
7948 0 : SWIG_fail;
7949 : }
7950 0 : psProgressInfo->psPyCallback = obj4;
7951 0 : arg5 = PyProgressProxy;
7952 : }
7953 :
7954 : }
7955 :
7956 : }
7957 : }
7958 3 : if (obj5) {
7959 : {
7960 : /* %typemap(in) ( void* callback_data=NULL) */
7961 0 : psProgressInfo->psPyCallbackData = obj5 ;
7962 : }
7963 : }
7964 : {
7965 3 : if ( bUseExceptions ) {
7966 0 : CPLErrorReset();
7967 : }
7968 3 : result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,arg5,arg6);
7969 3 : if ( bUseExceptions ) {
7970 0 : CPLErr eclass = CPLGetLastErrorType();
7971 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7972 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7973 : }
7974 : }
7975 : }
7976 : {
7977 : /* %typemap(out) OGRErr */
7978 3 : if ( result != 0 && bUseExceptions) {
7979 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7980 0 : SWIG_fail;
7981 : }
7982 : }
7983 : {
7984 : /* %typemap(freearg) char **options */
7985 3 : CSLDestroy( arg4 );
7986 : }
7987 : {
7988 : /* %typemap(freearg) ( void* callback_data=NULL) */
7989 :
7990 3 : CPLFree(psProgressInfo);
7991 :
7992 : }
7993 : {
7994 : /* %typemap(ret) OGRErr */
7995 3 : if (resultobj == Py_None ) {
7996 0 : Py_DECREF(resultobj);
7997 0 : resultobj = 0;
7998 : }
7999 3 : if (resultobj == 0) {
8000 3 : resultobj = PyInt_FromLong( result );
8001 : }
8002 : }
8003 3 : return resultobj;
8004 : fail:
8005 : {
8006 : /* %typemap(freearg) char **options */
8007 0 : CSLDestroy( arg4 );
8008 : }
8009 : {
8010 : /* %typemap(freearg) ( void* callback_data=NULL) */
8011 :
8012 0 : CPLFree(psProgressInfo);
8013 :
8014 : }
8015 0 : return NULL;
8016 : }
8017 :
8018 :
8019 3 : SWIGINTERN PyObject *_wrap_Layer_Identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8020 3 : PyObject *resultobj = 0;
8021 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8022 3 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
8023 3 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
8024 3 : char **arg4 = (char **) NULL ;
8025 3 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
8026 3 : void *arg6 = (void *) NULL ;
8027 3 : void *argp1 = 0 ;
8028 3 : int res1 = 0 ;
8029 3 : void *argp2 = 0 ;
8030 3 : int res2 = 0 ;
8031 3 : void *argp3 = 0 ;
8032 3 : int res3 = 0 ;
8033 3 : PyObject * obj0 = 0 ;
8034 3 : PyObject * obj1 = 0 ;
8035 3 : PyObject * obj2 = 0 ;
8036 3 : PyObject * obj3 = 0 ;
8037 3 : PyObject * obj4 = 0 ;
8038 3 : PyObject * obj5 = 0 ;
8039 : char * kwnames[] = {
8040 : (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL
8041 3 : };
8042 : OGRErr result;
8043 :
8044 : /* %typemap(arginit) ( const char* callback_data=NULL) */
8045 : PyProgressData *psProgressInfo;
8046 3 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
8047 3 : psProgressInfo->nLastReported = -1;
8048 3 : psProgressInfo->psPyCallback = NULL;
8049 3 : psProgressInfo->psPyCallbackData = NULL;
8050 3 : arg6 = psProgressInfo;
8051 3 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Identity",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8052 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8053 3 : if (!SWIG_IsOK(res1)) {
8054 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Identity" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8055 : }
8056 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8057 3 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8058 3 : if (!SWIG_IsOK(res2)) {
8059 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Identity" "', argument " "2"" of type '" "OGRLayerShadow *""'");
8060 : }
8061 3 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
8062 3 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8063 3 : if (!SWIG_IsOK(res3)) {
8064 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Identity" "', argument " "3"" of type '" "OGRLayerShadow *""'");
8065 : }
8066 3 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
8067 3 : if (obj3) {
8068 : {
8069 : /* %typemap(in) char **options */
8070 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
8071 1 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
8072 : #if PY_VERSION_HEX < 0x03000000
8073 : || PyString_Check(obj3)
8074 : #endif
8075 : ) {
8076 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
8077 0 : SWIG_fail;
8078 : }
8079 :
8080 1 : int size = PySequence_Size(obj3);
8081 2 : for (int i = 0; i < size; i++) {
8082 1 : PyObject* pyObj = PySequence_GetItem(obj3,i);
8083 1 : if (PyUnicode_Check(pyObj))
8084 : {
8085 : char *pszStr;
8086 : Py_ssize_t nLen;
8087 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
8088 : #if PY_VERSION_HEX >= 0x03000000
8089 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
8090 : #else
8091 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
8092 : #endif
8093 0 : arg4 = CSLAddString( arg4, pszStr );
8094 0 : Py_XDECREF(pyUTF8Str);
8095 : }
8096 : #if PY_VERSION_HEX >= 0x03000000
8097 : else if (PyBytes_Check(pyObj))
8098 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
8099 : #else
8100 1 : else if (PyString_Check(pyObj))
8101 1 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
8102 : #endif
8103 : else
8104 : {
8105 0 : Py_DECREF(pyObj);
8106 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
8107 0 : SWIG_fail;
8108 : }
8109 1 : Py_DECREF(pyObj);
8110 : }
8111 : }
8112 : }
8113 3 : if (obj4) {
8114 : {
8115 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
8116 : /* callback_func typemap */
8117 0 : if (obj4 && obj4 != Py_None ) {
8118 0 : void* cbfunction = NULL;
8119 : SWIG_ConvertPtr( obj4,
8120 : (void**)&cbfunction,
8121 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
8122 0 : SWIG_POINTER_EXCEPTION | 0 );
8123 :
8124 0 : if ( cbfunction == GDALTermProgress ) {
8125 0 : arg5 = GDALTermProgress;
8126 : } else {
8127 0 : if (!PyCallable_Check(obj4)) {
8128 : PyErr_SetString( PyExc_RuntimeError,
8129 0 : "Object given is not a Python function" );
8130 0 : SWIG_fail;
8131 : }
8132 0 : psProgressInfo->psPyCallback = obj4;
8133 0 : arg5 = PyProgressProxy;
8134 : }
8135 :
8136 : }
8137 :
8138 : }
8139 : }
8140 3 : if (obj5) {
8141 : {
8142 : /* %typemap(in) ( void* callback_data=NULL) */
8143 0 : psProgressInfo->psPyCallbackData = obj5 ;
8144 : }
8145 : }
8146 : {
8147 3 : if ( bUseExceptions ) {
8148 0 : CPLErrorReset();
8149 : }
8150 3 : result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,arg5,arg6);
8151 3 : if ( bUseExceptions ) {
8152 0 : CPLErr eclass = CPLGetLastErrorType();
8153 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8154 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8155 : }
8156 : }
8157 : }
8158 : {
8159 : /* %typemap(out) OGRErr */
8160 3 : if ( result != 0 && bUseExceptions) {
8161 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8162 0 : SWIG_fail;
8163 : }
8164 : }
8165 : {
8166 : /* %typemap(freearg) char **options */
8167 3 : CSLDestroy( arg4 );
8168 : }
8169 : {
8170 : /* %typemap(freearg) ( void* callback_data=NULL) */
8171 :
8172 3 : CPLFree(psProgressInfo);
8173 :
8174 : }
8175 : {
8176 : /* %typemap(ret) OGRErr */
8177 3 : if (resultobj == Py_None ) {
8178 0 : Py_DECREF(resultobj);
8179 0 : resultobj = 0;
8180 : }
8181 3 : if (resultobj == 0) {
8182 3 : resultobj = PyInt_FromLong( result );
8183 : }
8184 : }
8185 3 : return resultobj;
8186 : fail:
8187 : {
8188 : /* %typemap(freearg) char **options */
8189 0 : CSLDestroy( arg4 );
8190 : }
8191 : {
8192 : /* %typemap(freearg) ( void* callback_data=NULL) */
8193 :
8194 0 : CPLFree(psProgressInfo);
8195 :
8196 : }
8197 0 : return NULL;
8198 : }
8199 :
8200 :
8201 4 : SWIGINTERN PyObject *_wrap_Layer_Update(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8202 4 : PyObject *resultobj = 0;
8203 4 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8204 4 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
8205 4 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
8206 4 : char **arg4 = (char **) NULL ;
8207 4 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
8208 4 : void *arg6 = (void *) NULL ;
8209 4 : void *argp1 = 0 ;
8210 4 : int res1 = 0 ;
8211 4 : void *argp2 = 0 ;
8212 4 : int res2 = 0 ;
8213 4 : void *argp3 = 0 ;
8214 4 : int res3 = 0 ;
8215 4 : PyObject * obj0 = 0 ;
8216 4 : PyObject * obj1 = 0 ;
8217 4 : PyObject * obj2 = 0 ;
8218 4 : PyObject * obj3 = 0 ;
8219 4 : PyObject * obj4 = 0 ;
8220 4 : PyObject * obj5 = 0 ;
8221 : char * kwnames[] = {
8222 : (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL
8223 4 : };
8224 : OGRErr result;
8225 :
8226 : /* %typemap(arginit) ( const char* callback_data=NULL) */
8227 : PyProgressData *psProgressInfo;
8228 4 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
8229 4 : psProgressInfo->nLastReported = -1;
8230 4 : psProgressInfo->psPyCallback = NULL;
8231 4 : psProgressInfo->psPyCallbackData = NULL;
8232 4 : arg6 = psProgressInfo;
8233 4 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Update",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8234 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8235 4 : if (!SWIG_IsOK(res1)) {
8236 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Update" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8237 : }
8238 4 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8239 4 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8240 4 : if (!SWIG_IsOK(res2)) {
8241 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Update" "', argument " "2"" of type '" "OGRLayerShadow *""'");
8242 : }
8243 4 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
8244 4 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8245 4 : if (!SWIG_IsOK(res3)) {
8246 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Update" "', argument " "3"" of type '" "OGRLayerShadow *""'");
8247 : }
8248 4 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
8249 4 : if (obj3) {
8250 : {
8251 : /* %typemap(in) char **options */
8252 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
8253 1 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
8254 : #if PY_VERSION_HEX < 0x03000000
8255 : || PyString_Check(obj3)
8256 : #endif
8257 : ) {
8258 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
8259 0 : SWIG_fail;
8260 : }
8261 :
8262 1 : int size = PySequence_Size(obj3);
8263 2 : for (int i = 0; i < size; i++) {
8264 1 : PyObject* pyObj = PySequence_GetItem(obj3,i);
8265 1 : if (PyUnicode_Check(pyObj))
8266 : {
8267 : char *pszStr;
8268 : Py_ssize_t nLen;
8269 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
8270 : #if PY_VERSION_HEX >= 0x03000000
8271 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
8272 : #else
8273 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
8274 : #endif
8275 0 : arg4 = CSLAddString( arg4, pszStr );
8276 0 : Py_XDECREF(pyUTF8Str);
8277 : }
8278 : #if PY_VERSION_HEX >= 0x03000000
8279 : else if (PyBytes_Check(pyObj))
8280 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
8281 : #else
8282 1 : else if (PyString_Check(pyObj))
8283 1 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
8284 : #endif
8285 : else
8286 : {
8287 0 : Py_DECREF(pyObj);
8288 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
8289 0 : SWIG_fail;
8290 : }
8291 1 : Py_DECREF(pyObj);
8292 : }
8293 : }
8294 : }
8295 4 : if (obj4) {
8296 : {
8297 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
8298 : /* callback_func typemap */
8299 0 : if (obj4 && obj4 != Py_None ) {
8300 0 : void* cbfunction = NULL;
8301 : SWIG_ConvertPtr( obj4,
8302 : (void**)&cbfunction,
8303 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
8304 0 : SWIG_POINTER_EXCEPTION | 0 );
8305 :
8306 0 : if ( cbfunction == GDALTermProgress ) {
8307 0 : arg5 = GDALTermProgress;
8308 : } else {
8309 0 : if (!PyCallable_Check(obj4)) {
8310 : PyErr_SetString( PyExc_RuntimeError,
8311 0 : "Object given is not a Python function" );
8312 0 : SWIG_fail;
8313 : }
8314 0 : psProgressInfo->psPyCallback = obj4;
8315 0 : arg5 = PyProgressProxy;
8316 : }
8317 :
8318 : }
8319 :
8320 : }
8321 : }
8322 4 : if (obj5) {
8323 : {
8324 : /* %typemap(in) ( void* callback_data=NULL) */
8325 0 : psProgressInfo->psPyCallbackData = obj5 ;
8326 : }
8327 : }
8328 : {
8329 4 : if ( bUseExceptions ) {
8330 0 : CPLErrorReset();
8331 : }
8332 4 : result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,arg5,arg6);
8333 4 : if ( bUseExceptions ) {
8334 0 : CPLErr eclass = CPLGetLastErrorType();
8335 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8336 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8337 : }
8338 : }
8339 : }
8340 : {
8341 : /* %typemap(out) OGRErr */
8342 4 : if ( result != 0 && bUseExceptions) {
8343 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8344 0 : SWIG_fail;
8345 : }
8346 : }
8347 : {
8348 : /* %typemap(freearg) char **options */
8349 4 : CSLDestroy( arg4 );
8350 : }
8351 : {
8352 : /* %typemap(freearg) ( void* callback_data=NULL) */
8353 :
8354 4 : CPLFree(psProgressInfo);
8355 :
8356 : }
8357 : {
8358 : /* %typemap(ret) OGRErr */
8359 4 : if (resultobj == Py_None ) {
8360 0 : Py_DECREF(resultobj);
8361 0 : resultobj = 0;
8362 : }
8363 4 : if (resultobj == 0) {
8364 4 : resultobj = PyInt_FromLong( result );
8365 : }
8366 : }
8367 4 : return resultobj;
8368 : fail:
8369 : {
8370 : /* %typemap(freearg) char **options */
8371 0 : CSLDestroy( arg4 );
8372 : }
8373 : {
8374 : /* %typemap(freearg) ( void* callback_data=NULL) */
8375 :
8376 0 : CPLFree(psProgressInfo);
8377 :
8378 : }
8379 0 : return NULL;
8380 : }
8381 :
8382 :
8383 2 : SWIGINTERN PyObject *_wrap_Layer_Clip(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8384 2 : PyObject *resultobj = 0;
8385 2 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8386 2 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
8387 2 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
8388 2 : char **arg4 = (char **) NULL ;
8389 2 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
8390 2 : void *arg6 = (void *) NULL ;
8391 2 : void *argp1 = 0 ;
8392 2 : int res1 = 0 ;
8393 2 : void *argp2 = 0 ;
8394 2 : int res2 = 0 ;
8395 2 : void *argp3 = 0 ;
8396 2 : int res3 = 0 ;
8397 2 : PyObject * obj0 = 0 ;
8398 2 : PyObject * obj1 = 0 ;
8399 2 : PyObject * obj2 = 0 ;
8400 2 : PyObject * obj3 = 0 ;
8401 2 : PyObject * obj4 = 0 ;
8402 2 : PyObject * obj5 = 0 ;
8403 : char * kwnames[] = {
8404 : (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL
8405 2 : };
8406 : OGRErr result;
8407 :
8408 : /* %typemap(arginit) ( const char* callback_data=NULL) */
8409 : PyProgressData *psProgressInfo;
8410 2 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
8411 2 : psProgressInfo->nLastReported = -1;
8412 2 : psProgressInfo->psPyCallback = NULL;
8413 2 : psProgressInfo->psPyCallbackData = NULL;
8414 2 : arg6 = psProgressInfo;
8415 2 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Clip",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8416 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8417 2 : if (!SWIG_IsOK(res1)) {
8418 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Clip" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8419 : }
8420 2 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8421 2 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8422 2 : if (!SWIG_IsOK(res2)) {
8423 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Clip" "', argument " "2"" of type '" "OGRLayerShadow *""'");
8424 : }
8425 2 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
8426 2 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8427 2 : if (!SWIG_IsOK(res3)) {
8428 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Clip" "', argument " "3"" of type '" "OGRLayerShadow *""'");
8429 : }
8430 2 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
8431 2 : if (obj3) {
8432 : {
8433 : /* %typemap(in) char **options */
8434 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
8435 1 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
8436 : #if PY_VERSION_HEX < 0x03000000
8437 : || PyString_Check(obj3)
8438 : #endif
8439 : ) {
8440 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
8441 0 : SWIG_fail;
8442 : }
8443 :
8444 1 : int size = PySequence_Size(obj3);
8445 2 : for (int i = 0; i < size; i++) {
8446 1 : PyObject* pyObj = PySequence_GetItem(obj3,i);
8447 1 : if (PyUnicode_Check(pyObj))
8448 : {
8449 : char *pszStr;
8450 : Py_ssize_t nLen;
8451 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
8452 : #if PY_VERSION_HEX >= 0x03000000
8453 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
8454 : #else
8455 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
8456 : #endif
8457 0 : arg4 = CSLAddString( arg4, pszStr );
8458 0 : Py_XDECREF(pyUTF8Str);
8459 : }
8460 : #if PY_VERSION_HEX >= 0x03000000
8461 : else if (PyBytes_Check(pyObj))
8462 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
8463 : #else
8464 1 : else if (PyString_Check(pyObj))
8465 1 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
8466 : #endif
8467 : else
8468 : {
8469 0 : Py_DECREF(pyObj);
8470 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
8471 0 : SWIG_fail;
8472 : }
8473 1 : Py_DECREF(pyObj);
8474 : }
8475 : }
8476 : }
8477 2 : if (obj4) {
8478 : {
8479 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
8480 : /* callback_func typemap */
8481 0 : if (obj4 && obj4 != Py_None ) {
8482 0 : void* cbfunction = NULL;
8483 : SWIG_ConvertPtr( obj4,
8484 : (void**)&cbfunction,
8485 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
8486 0 : SWIG_POINTER_EXCEPTION | 0 );
8487 :
8488 0 : if ( cbfunction == GDALTermProgress ) {
8489 0 : arg5 = GDALTermProgress;
8490 : } else {
8491 0 : if (!PyCallable_Check(obj4)) {
8492 : PyErr_SetString( PyExc_RuntimeError,
8493 0 : "Object given is not a Python function" );
8494 0 : SWIG_fail;
8495 : }
8496 0 : psProgressInfo->psPyCallback = obj4;
8497 0 : arg5 = PyProgressProxy;
8498 : }
8499 :
8500 : }
8501 :
8502 : }
8503 : }
8504 2 : if (obj5) {
8505 : {
8506 : /* %typemap(in) ( void* callback_data=NULL) */
8507 0 : psProgressInfo->psPyCallbackData = obj5 ;
8508 : }
8509 : }
8510 : {
8511 2 : if ( bUseExceptions ) {
8512 0 : CPLErrorReset();
8513 : }
8514 2 : result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,arg5,arg6);
8515 2 : if ( bUseExceptions ) {
8516 0 : CPLErr eclass = CPLGetLastErrorType();
8517 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8518 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8519 : }
8520 : }
8521 : }
8522 : {
8523 : /* %typemap(out) OGRErr */
8524 2 : if ( result != 0 && bUseExceptions) {
8525 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8526 0 : SWIG_fail;
8527 : }
8528 : }
8529 : {
8530 : /* %typemap(freearg) char **options */
8531 2 : CSLDestroy( arg4 );
8532 : }
8533 : {
8534 : /* %typemap(freearg) ( void* callback_data=NULL) */
8535 :
8536 2 : CPLFree(psProgressInfo);
8537 :
8538 : }
8539 : {
8540 : /* %typemap(ret) OGRErr */
8541 2 : if (resultobj == Py_None ) {
8542 0 : Py_DECREF(resultobj);
8543 0 : resultobj = 0;
8544 : }
8545 2 : if (resultobj == 0) {
8546 2 : resultobj = PyInt_FromLong( result );
8547 : }
8548 : }
8549 2 : return resultobj;
8550 : fail:
8551 : {
8552 : /* %typemap(freearg) char **options */
8553 0 : CSLDestroy( arg4 );
8554 : }
8555 : {
8556 : /* %typemap(freearg) ( void* callback_data=NULL) */
8557 :
8558 0 : CPLFree(psProgressInfo);
8559 :
8560 : }
8561 0 : return NULL;
8562 : }
8563 :
8564 :
8565 3 : SWIGINTERN PyObject *_wrap_Layer_Erase(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8566 3 : PyObject *resultobj = 0;
8567 3 : OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
8568 3 : OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
8569 3 : OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
8570 3 : char **arg4 = (char **) NULL ;
8571 3 : GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
8572 3 : void *arg6 = (void *) NULL ;
8573 3 : void *argp1 = 0 ;
8574 3 : int res1 = 0 ;
8575 3 : void *argp2 = 0 ;
8576 3 : int res2 = 0 ;
8577 3 : void *argp3 = 0 ;
8578 3 : int res3 = 0 ;
8579 3 : PyObject * obj0 = 0 ;
8580 3 : PyObject * obj1 = 0 ;
8581 3 : PyObject * obj2 = 0 ;
8582 3 : PyObject * obj3 = 0 ;
8583 3 : PyObject * obj4 = 0 ;
8584 3 : PyObject * obj5 = 0 ;
8585 : char * kwnames[] = {
8586 : (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL
8587 3 : };
8588 : OGRErr result;
8589 :
8590 : /* %typemap(arginit) ( const char* callback_data=NULL) */
8591 : PyProgressData *psProgressInfo;
8592 3 : psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
8593 3 : psProgressInfo->nLastReported = -1;
8594 3 : psProgressInfo->psPyCallback = NULL;
8595 3 : psProgressInfo->psPyCallbackData = NULL;
8596 3 : arg6 = psProgressInfo;
8597 3 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Erase",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8598 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8599 3 : if (!SWIG_IsOK(res1)) {
8600 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Erase" "', argument " "1"" of type '" "OGRLayerShadow *""'");
8601 : }
8602 3 : arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
8603 3 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8604 3 : if (!SWIG_IsOK(res2)) {
8605 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Erase" "', argument " "2"" of type '" "OGRLayerShadow *""'");
8606 : }
8607 3 : arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
8608 3 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 );
8609 3 : if (!SWIG_IsOK(res3)) {
8610 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Erase" "', argument " "3"" of type '" "OGRLayerShadow *""'");
8611 : }
8612 3 : arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
8613 3 : if (obj3) {
8614 : {
8615 : /* %typemap(in) char **options */
8616 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
8617 1 : if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
8618 : #if PY_VERSION_HEX < 0x03000000
8619 : || PyString_Check(obj3)
8620 : #endif
8621 : ) {
8622 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
8623 0 : SWIG_fail;
8624 : }
8625 :
8626 1 : int size = PySequence_Size(obj3);
8627 2 : for (int i = 0; i < size; i++) {
8628 1 : PyObject* pyObj = PySequence_GetItem(obj3,i);
8629 1 : if (PyUnicode_Check(pyObj))
8630 : {
8631 : char *pszStr;
8632 : Py_ssize_t nLen;
8633 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
8634 : #if PY_VERSION_HEX >= 0x03000000
8635 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
8636 : #else
8637 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
8638 : #endif
8639 0 : arg4 = CSLAddString( arg4, pszStr );
8640 0 : Py_XDECREF(pyUTF8Str);
8641 : }
8642 : #if PY_VERSION_HEX >= 0x03000000
8643 : else if (PyBytes_Check(pyObj))
8644 : arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
8645 : #else
8646 1 : else if (PyString_Check(pyObj))
8647 1 : arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
8648 : #endif
8649 : else
8650 : {
8651 0 : Py_DECREF(pyObj);
8652 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
8653 0 : SWIG_fail;
8654 : }
8655 1 : Py_DECREF(pyObj);
8656 : }
8657 : }
8658 : }
8659 3 : if (obj4) {
8660 : {
8661 : /* %typemap(in) (GDALProgressFunc callback = NULL) */
8662 : /* callback_func typemap */
8663 0 : if (obj4 && obj4 != Py_None ) {
8664 0 : void* cbfunction = NULL;
8665 : SWIG_ConvertPtr( obj4,
8666 : (void**)&cbfunction,
8667 : SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
8668 0 : SWIG_POINTER_EXCEPTION | 0 );
8669 :
8670 0 : if ( cbfunction == GDALTermProgress ) {
8671 0 : arg5 = GDALTermProgress;
8672 : } else {
8673 0 : if (!PyCallable_Check(obj4)) {
8674 : PyErr_SetString( PyExc_RuntimeError,
8675 0 : "Object given is not a Python function" );
8676 0 : SWIG_fail;
8677 : }
8678 0 : psProgressInfo->psPyCallback = obj4;
8679 0 : arg5 = PyProgressProxy;
8680 : }
8681 :
8682 : }
8683 :
8684 : }
8685 : }
8686 3 : if (obj5) {
8687 : {
8688 : /* %typemap(in) ( void* callback_data=NULL) */
8689 0 : psProgressInfo->psPyCallbackData = obj5 ;
8690 : }
8691 : }
8692 : {
8693 3 : if ( bUseExceptions ) {
8694 0 : CPLErrorReset();
8695 : }
8696 3 : result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,arg5,arg6);
8697 3 : if ( bUseExceptions ) {
8698 0 : CPLErr eclass = CPLGetLastErrorType();
8699 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8700 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8701 : }
8702 : }
8703 : }
8704 : {
8705 : /* %typemap(out) OGRErr */
8706 3 : if ( result != 0 && bUseExceptions) {
8707 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8708 0 : SWIG_fail;
8709 : }
8710 : }
8711 : {
8712 : /* %typemap(freearg) char **options */
8713 3 : CSLDestroy( arg4 );
8714 : }
8715 : {
8716 : /* %typemap(freearg) ( void* callback_data=NULL) */
8717 :
8718 3 : CPLFree(psProgressInfo);
8719 :
8720 : }
8721 : {
8722 : /* %typemap(ret) OGRErr */
8723 3 : if (resultobj == Py_None ) {
8724 0 : Py_DECREF(resultobj);
8725 0 : resultobj = 0;
8726 : }
8727 3 : if (resultobj == 0) {
8728 3 : resultobj = PyInt_FromLong( result );
8729 : }
8730 : }
8731 3 : return resultobj;
8732 : fail:
8733 : {
8734 : /* %typemap(freearg) char **options */
8735 0 : CSLDestroy( arg4 );
8736 : }
8737 : {
8738 : /* %typemap(freearg) ( void* callback_data=NULL) */
8739 :
8740 0 : CPLFree(psProgressInfo);
8741 :
8742 : }
8743 0 : return NULL;
8744 : }
8745 :
8746 :
8747 2 : SWIGINTERN PyObject *Layer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8748 : PyObject *obj;
8749 2 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
8750 2 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRLayerShadow, SWIG_NewClientData(obj));
8751 2 : return SWIG_Py_Void();
8752 : }
8753 :
8754 93100 : SWIGINTERN PyObject *_wrap_delete_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8755 93100 : PyObject *resultobj = 0;
8756 93100 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
8757 93100 : void *argp1 = 0 ;
8758 93100 : int res1 = 0 ;
8759 93100 : PyObject * obj0 = 0 ;
8760 :
8761 93100 : if (!PyArg_ParseTuple(args,(char *)"O:delete_Feature",&obj0)) SWIG_fail;
8762 93100 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_DISOWN | 0 );
8763 93100 : if (!SWIG_IsOK(res1)) {
8764 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Feature" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
8765 : }
8766 93100 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
8767 : {
8768 93100 : if ( bUseExceptions ) {
8769 0 : CPLErrorReset();
8770 : }
8771 : delete_OGRFeatureShadow(arg1);
8772 93100 : if ( bUseExceptions ) {
8773 0 : CPLErr eclass = CPLGetLastErrorType();
8774 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8775 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8776 : }
8777 : }
8778 : }
8779 93100 : resultobj = SWIG_Py_Void();
8780 93100 : return resultobj;
8781 : fail:
8782 0 : return NULL;
8783 : }
8784 :
8785 :
8786 32773 : SWIGINTERN PyObject *_wrap_new_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8787 32773 : PyObject *resultobj = 0;
8788 32773 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
8789 32773 : void *argp1 = 0 ;
8790 32773 : int res1 = 0 ;
8791 32773 : PyObject * obj0 = 0 ;
8792 : char * kwnames[] = {
8793 : (char *) "feature_def", NULL
8794 32773 : };
8795 32773 : OGRFeatureShadow *result = 0 ;
8796 :
8797 32773 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_Feature",kwnames,&obj0)) SWIG_fail;
8798 32773 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
8799 32773 : if (!SWIG_IsOK(res1)) {
8800 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Feature" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
8801 : }
8802 32773 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
8803 : {
8804 32773 : if (!arg1) {
8805 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8806 : }
8807 : }
8808 : {
8809 32773 : if ( bUseExceptions ) {
8810 0 : CPLErrorReset();
8811 : }
8812 32773 : result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
8813 32773 : if ( bUseExceptions ) {
8814 0 : CPLErr eclass = CPLGetLastErrorType();
8815 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8816 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8817 : }
8818 : }
8819 : }
8820 32773 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_NEW | 0 );
8821 32773 : return resultobj;
8822 : fail:
8823 0 : return NULL;
8824 : }
8825 :
8826 :
8827 76 : SWIGINTERN PyObject *_wrap_Feature_GetDefnRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8828 76 : PyObject *resultobj = 0;
8829 76 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
8830 76 : void *argp1 = 0 ;
8831 76 : int res1 = 0 ;
8832 76 : PyObject * obj0 = 0 ;
8833 76 : OGRFeatureDefnShadow *result = 0 ;
8834 :
8835 76 : if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetDefnRef",&obj0)) SWIG_fail;
8836 76 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
8837 76 : if (!SWIG_IsOK(res1)) {
8838 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
8839 : }
8840 76 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
8841 : {
8842 76 : if ( bUseExceptions ) {
8843 0 : CPLErrorReset();
8844 : }
8845 76 : result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
8846 76 : if ( bUseExceptions ) {
8847 0 : CPLErr eclass = CPLGetLastErrorType();
8848 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8849 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8850 : }
8851 : }
8852 : }
8853 76 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
8854 76 : return resultobj;
8855 : fail:
8856 0 : return NULL;
8857 : }
8858 :
8859 :
8860 28984 : SWIGINTERN PyObject *_wrap_Feature_SetGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8861 28984 : PyObject *resultobj = 0;
8862 28984 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
8863 28984 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
8864 28984 : void *argp1 = 0 ;
8865 28984 : int res1 = 0 ;
8866 28984 : void *argp2 = 0 ;
8867 28984 : int res2 = 0 ;
8868 28984 : PyObject * obj0 = 0 ;
8869 28984 : PyObject * obj1 = 0 ;
8870 : OGRErr result;
8871 :
8872 28984 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetGeometry",&obj0,&obj1)) SWIG_fail;
8873 28984 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
8874 28984 : if (!SWIG_IsOK(res1)) {
8875 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometry" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
8876 : }
8877 28984 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
8878 28984 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
8879 28984 : if (!SWIG_IsOK(res2)) {
8880 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
8881 : }
8882 28984 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
8883 : {
8884 28984 : if ( bUseExceptions ) {
8885 0 : CPLErrorReset();
8886 : }
8887 28984 : result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
8888 28984 : if ( bUseExceptions ) {
8889 0 : CPLErr eclass = CPLGetLastErrorType();
8890 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8891 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8892 : }
8893 : }
8894 : }
8895 : {
8896 : /* %typemap(out) OGRErr */
8897 28984 : if ( result != 0 && bUseExceptions) {
8898 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8899 0 : SWIG_fail;
8900 : }
8901 : }
8902 : {
8903 : /* %typemap(ret) OGRErr */
8904 28984 : if (resultobj == Py_None ) {
8905 0 : Py_DECREF(resultobj);
8906 0 : resultobj = 0;
8907 : }
8908 28984 : if (resultobj == 0) {
8909 28984 : resultobj = PyInt_FromLong( result );
8910 : }
8911 : }
8912 28984 : return resultobj;
8913 : fail:
8914 0 : return NULL;
8915 : }
8916 :
8917 :
8918 250 : SWIGINTERN PyObject *_wrap_Feature_SetGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8919 250 : PyObject *resultobj = 0;
8920 250 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
8921 250 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
8922 250 : void *argp1 = 0 ;
8923 250 : int res1 = 0 ;
8924 250 : int res2 = 0 ;
8925 250 : PyObject * obj0 = 0 ;
8926 250 : PyObject * obj1 = 0 ;
8927 : OGRErr result;
8928 :
8929 250 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetGeometryDirectly",&obj0,&obj1)) SWIG_fail;
8930 250 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
8931 250 : if (!SWIG_IsOK(res1)) {
8932 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometryDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
8933 : }
8934 250 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
8935 250 : res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
8936 250 : if (!SWIG_IsOK(res2)) {
8937 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
8938 : }
8939 : {
8940 250 : if ( bUseExceptions ) {
8941 0 : CPLErrorReset();
8942 : }
8943 500 : result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
8944 250 : if ( bUseExceptions ) {
8945 0 : CPLErr eclass = CPLGetLastErrorType();
8946 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8947 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8948 : }
8949 : }
8950 : }
8951 : {
8952 : /* %typemap(out) OGRErr */
8953 250 : if ( result != 0 && bUseExceptions) {
8954 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8955 0 : SWIG_fail;
8956 : }
8957 : }
8958 : {
8959 : /* %typemap(ret) OGRErr */
8960 250 : if (resultobj == Py_None ) {
8961 0 : Py_DECREF(resultobj);
8962 0 : resultobj = 0;
8963 : }
8964 250 : if (resultobj == 0) {
8965 250 : resultobj = PyInt_FromLong( result );
8966 : }
8967 : }
8968 250 : return resultobj;
8969 : fail:
8970 0 : return NULL;
8971 : }
8972 :
8973 :
8974 55793 : SWIGINTERN PyObject *_wrap_Feature_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8975 55793 : PyObject *resultobj = 0;
8976 55793 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
8977 55793 : void *argp1 = 0 ;
8978 55793 : int res1 = 0 ;
8979 55793 : PyObject * obj0 = 0 ;
8980 55793 : OGRGeometryShadow *result = 0 ;
8981 :
8982 55793 : if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetGeometryRef",&obj0)) SWIG_fail;
8983 55793 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
8984 55793 : if (!SWIG_IsOK(res1)) {
8985 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeometryRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
8986 : }
8987 55793 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
8988 : {
8989 55793 : if ( bUseExceptions ) {
8990 0 : CPLErrorReset();
8991 : }
8992 55793 : result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
8993 55793 : if ( bUseExceptions ) {
8994 0 : CPLErr eclass = CPLGetLastErrorType();
8995 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8996 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8997 : }
8998 : }
8999 : }
9000 55793 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
9001 55793 : return resultobj;
9002 : fail:
9003 0 : return NULL;
9004 : }
9005 :
9006 :
9007 36 : SWIGINTERN PyObject *_wrap_Feature_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9008 36 : PyObject *resultobj = 0;
9009 36 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9010 36 : void *argp1 = 0 ;
9011 36 : int res1 = 0 ;
9012 36 : PyObject * obj0 = 0 ;
9013 36 : OGRFeatureShadow *result = 0 ;
9014 :
9015 36 : if (!PyArg_ParseTuple(args,(char *)"O:Feature_Clone",&obj0)) SWIG_fail;
9016 36 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9017 36 : if (!SWIG_IsOK(res1)) {
9018 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Clone" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9019 : }
9020 36 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9021 : {
9022 36 : if ( bUseExceptions ) {
9023 0 : CPLErrorReset();
9024 : }
9025 36 : result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
9026 36 : if ( bUseExceptions ) {
9027 0 : CPLErr eclass = CPLGetLastErrorType();
9028 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9029 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9030 : }
9031 : }
9032 : }
9033 36 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN | 0 );
9034 36 : return resultobj;
9035 : fail:
9036 0 : return NULL;
9037 : }
9038 :
9039 :
9040 52 : SWIGINTERN PyObject *_wrap_Feature_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9041 52 : PyObject *resultobj = 0;
9042 52 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9043 52 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
9044 52 : void *argp1 = 0 ;
9045 52 : int res1 = 0 ;
9046 52 : void *argp2 = 0 ;
9047 52 : int res2 = 0 ;
9048 52 : PyObject * obj0 = 0 ;
9049 52 : PyObject * obj1 = 0 ;
9050 : bool result;
9051 :
9052 52 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_Equal",&obj0,&obj1)) SWIG_fail;
9053 52 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9054 52 : if (!SWIG_IsOK(res1)) {
9055 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Equal" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9056 : }
9057 52 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9058 52 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9059 52 : if (!SWIG_IsOK(res2)) {
9060 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_Equal" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
9061 : }
9062 52 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
9063 : {
9064 52 : if (!arg2) {
9065 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9066 : }
9067 : }
9068 : {
9069 52 : if ( bUseExceptions ) {
9070 0 : CPLErrorReset();
9071 : }
9072 52 : result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
9073 52 : if ( bUseExceptions ) {
9074 0 : CPLErr eclass = CPLGetLastErrorType();
9075 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9076 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9077 : }
9078 : }
9079 : }
9080 52 : resultobj = SWIG_From_bool(static_cast< bool >(result));
9081 52 : return resultobj;
9082 : fail:
9083 0 : return NULL;
9084 : }
9085 :
9086 :
9087 4694 : SWIGINTERN PyObject *_wrap_Feature_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9088 4694 : PyObject *resultobj = 0;
9089 4694 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9090 4694 : void *argp1 = 0 ;
9091 4694 : int res1 = 0 ;
9092 4694 : PyObject * obj0 = 0 ;
9093 : int result;
9094 :
9095 4694 : if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFieldCount",&obj0)) SWIG_fail;
9096 4694 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9097 4694 : if (!SWIG_IsOK(res1)) {
9098 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9099 : }
9100 4694 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9101 : {
9102 4694 : if ( bUseExceptions ) {
9103 0 : CPLErrorReset();
9104 : }
9105 4694 : result = (int)OGRFeatureShadow_GetFieldCount(arg1);
9106 4694 : if ( bUseExceptions ) {
9107 0 : CPLErr eclass = CPLGetLastErrorType();
9108 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9109 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9110 : }
9111 : }
9112 : }
9113 4694 : resultobj = SWIG_From_int(static_cast< int >(result));
9114 4694 : return resultobj;
9115 : fail:
9116 0 : return NULL;
9117 : }
9118 :
9119 :
9120 11 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9121 11 : PyObject *resultobj = 0;
9122 11 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9123 : int arg2 ;
9124 11 : void *argp1 = 0 ;
9125 11 : int res1 = 0 ;
9126 : int val2 ;
9127 11 : int ecode2 = 0 ;
9128 11 : PyObject * obj0 = 0 ;
9129 11 : PyObject * obj1 = 0 ;
9130 11 : OGRFieldDefnShadow *result = 0 ;
9131 :
9132 11 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
9133 11 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9134 11 : if (!SWIG_IsOK(res1)) {
9135 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9136 : }
9137 11 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9138 11 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9139 11 : if (!SWIG_IsOK(ecode2)) {
9140 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "int""'");
9141 : }
9142 11 : arg2 = static_cast< int >(val2);
9143 : {
9144 11 : if ( bUseExceptions ) {
9145 0 : CPLErrorReset();
9146 : }
9147 11 : result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
9148 11 : if ( bUseExceptions ) {
9149 0 : CPLErr eclass = CPLGetLastErrorType();
9150 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9151 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9152 : }
9153 : }
9154 : }
9155 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
9156 11 : return resultobj;
9157 : fail:
9158 0 : return NULL;
9159 : }
9160 :
9161 :
9162 0 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9163 0 : PyObject *resultobj = 0;
9164 0 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9165 0 : char *arg2 = (char *) 0 ;
9166 0 : void *argp1 = 0 ;
9167 0 : int res1 = 0 ;
9168 : int res2 ;
9169 0 : char *buf2 = 0 ;
9170 0 : int alloc2 = 0 ;
9171 0 : PyObject * obj0 = 0 ;
9172 0 : PyObject * obj1 = 0 ;
9173 0 : OGRFieldDefnShadow *result = 0 ;
9174 :
9175 0 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
9176 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9177 0 : if (!SWIG_IsOK(res1)) {
9178 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9179 : }
9180 0 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9181 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9182 0 : if (!SWIG_IsOK(res2)) {
9183 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "char const *""'");
9184 : }
9185 0 : arg2 = reinterpret_cast< char * >(buf2);
9186 : {
9187 0 : if (!arg2) {
9188 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9189 : }
9190 : }
9191 : {
9192 0 : if ( bUseExceptions ) {
9193 0 : CPLErrorReset();
9194 : }
9195 0 : result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
9196 0 : if ( bUseExceptions ) {
9197 0 : CPLErr eclass = CPLGetLastErrorType();
9198 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9199 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9200 : }
9201 : }
9202 : }
9203 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
9204 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9205 0 : return resultobj;
9206 : fail:
9207 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9208 0 : return NULL;
9209 : }
9210 :
9211 :
9212 11 : SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef(PyObject *self, PyObject *args) {
9213 : int argc;
9214 : PyObject *argv[3];
9215 : int ii;
9216 :
9217 11 : if (!PyTuple_Check(args)) SWIG_fail;
9218 11 : argc = (int)PyObject_Length(args);
9219 33 : for (ii = 0; (ii < argc) && (ii < 2); ii++) {
9220 22 : argv[ii] = PyTuple_GET_ITEM(args,ii);
9221 : }
9222 11 : if (argc == 2) {
9223 : int _v;
9224 11 : void *vptr = 0;
9225 11 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
9226 11 : _v = SWIG_CheckState(res);
9227 11 : if (_v) {
9228 : {
9229 11 : int res = SWIG_AsVal_int(argv[1], NULL);
9230 11 : _v = SWIG_CheckState(res);
9231 : }
9232 11 : if (_v) {
9233 11 : return _wrap_Feature_GetFieldDefnRef__SWIG_0(self, args);
9234 : }
9235 : }
9236 : }
9237 0 : if (argc == 2) {
9238 : int _v;
9239 0 : void *vptr = 0;
9240 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
9241 0 : _v = SWIG_CheckState(res);
9242 0 : if (_v) {
9243 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
9244 0 : _v = SWIG_CheckState(res);
9245 0 : if (_v) {
9246 0 : return _wrap_Feature_GetFieldDefnRef__SWIG_1(self, args);
9247 : }
9248 : }
9249 : }
9250 :
9251 : fail:
9252 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldDefnRef'.\n"
9253 : " Possible C/C++ prototypes are:\n"
9254 : " GetFieldDefnRef(OGRFeatureShadow *,int)\n"
9255 0 : " GetFieldDefnRef(OGRFeatureShadow *,char const *)\n");
9256 0 : return NULL;
9257 : }
9258 :
9259 :
9260 3304 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9261 3304 : PyObject *resultobj = 0;
9262 3304 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9263 : int arg2 ;
9264 3304 : void *argp1 = 0 ;
9265 3304 : int res1 = 0 ;
9266 : int val2 ;
9267 3304 : int ecode2 = 0 ;
9268 3304 : PyObject * obj0 = 0 ;
9269 3304 : PyObject * obj1 = 0 ;
9270 3304 : char *result = 0 ;
9271 :
9272 3304 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
9273 3304 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9274 3304 : if (!SWIG_IsOK(res1)) {
9275 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9276 : }
9277 3304 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9278 3304 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9279 3304 : if (!SWIG_IsOK(ecode2)) {
9280 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "int""'");
9281 : }
9282 3304 : arg2 = static_cast< int >(val2);
9283 : {
9284 3304 : if ( bUseExceptions ) {
9285 0 : CPLErrorReset();
9286 : }
9287 3304 : result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
9288 3304 : if ( bUseExceptions ) {
9289 0 : CPLErr eclass = CPLGetLastErrorType();
9290 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9291 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9292 : }
9293 : }
9294 : }
9295 3304 : resultobj = SWIG_FromCharPtr((const char *)result);
9296 3304 : return resultobj;
9297 : fail:
9298 0 : return NULL;
9299 : }
9300 :
9301 :
9302 426 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9303 426 : PyObject *resultobj = 0;
9304 426 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9305 426 : char *arg2 = (char *) 0 ;
9306 426 : void *argp1 = 0 ;
9307 426 : int res1 = 0 ;
9308 : int res2 ;
9309 426 : char *buf2 = 0 ;
9310 426 : int alloc2 = 0 ;
9311 426 : PyObject * obj0 = 0 ;
9312 426 : PyObject * obj1 = 0 ;
9313 426 : char *result = 0 ;
9314 :
9315 426 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
9316 426 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9317 426 : if (!SWIG_IsOK(res1)) {
9318 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9319 : }
9320 426 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9321 426 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9322 426 : if (!SWIG_IsOK(res2)) {
9323 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "char const *""'");
9324 : }
9325 426 : arg2 = reinterpret_cast< char * >(buf2);
9326 : {
9327 426 : if (!arg2) {
9328 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9329 : }
9330 : }
9331 : {
9332 426 : if ( bUseExceptions ) {
9333 0 : CPLErrorReset();
9334 : }
9335 426 : result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
9336 426 : if ( bUseExceptions ) {
9337 0 : CPLErr eclass = CPLGetLastErrorType();
9338 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9339 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9340 : }
9341 : }
9342 : }
9343 426 : resultobj = SWIG_FromCharPtr((const char *)result);
9344 426 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9345 426 : return resultobj;
9346 : fail:
9347 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9348 0 : return NULL;
9349 : }
9350 :
9351 :
9352 3730 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString(PyObject *self, PyObject *args) {
9353 : int argc;
9354 : PyObject *argv[3];
9355 : int ii;
9356 :
9357 3730 : if (!PyTuple_Check(args)) SWIG_fail;
9358 3730 : argc = (int)PyObject_Length(args);
9359 11190 : for (ii = 0; (ii < argc) && (ii < 2); ii++) {
9360 7460 : argv[ii] = PyTuple_GET_ITEM(args,ii);
9361 : }
9362 3730 : if (argc == 2) {
9363 : int _v;
9364 3730 : void *vptr = 0;
9365 3730 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
9366 3730 : _v = SWIG_CheckState(res);
9367 3730 : if (_v) {
9368 : {
9369 3730 : int res = SWIG_AsVal_int(argv[1], NULL);
9370 3730 : _v = SWIG_CheckState(res);
9371 : }
9372 3730 : if (_v) {
9373 3304 : return _wrap_Feature_GetFieldAsString__SWIG_0(self, args);
9374 : }
9375 : }
9376 : }
9377 426 : if (argc == 2) {
9378 : int _v;
9379 426 : void *vptr = 0;
9380 426 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
9381 426 : _v = SWIG_CheckState(res);
9382 426 : if (_v) {
9383 426 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
9384 426 : _v = SWIG_CheckState(res);
9385 426 : if (_v) {
9386 426 : return _wrap_Feature_GetFieldAsString__SWIG_1(self, args);
9387 : }
9388 : }
9389 : }
9390 :
9391 : fail:
9392 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsString'.\n"
9393 : " Possible C/C++ prototypes are:\n"
9394 : " GetFieldAsString(OGRFeatureShadow *,int)\n"
9395 0 : " GetFieldAsString(OGRFeatureShadow *,char const *)\n");
9396 0 : return NULL;
9397 : }
9398 :
9399 :
9400 2762 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9401 2762 : PyObject *resultobj = 0;
9402 2762 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9403 : int arg2 ;
9404 2762 : void *argp1 = 0 ;
9405 2762 : int res1 = 0 ;
9406 : int val2 ;
9407 2762 : int ecode2 = 0 ;
9408 2762 : PyObject * obj0 = 0 ;
9409 2762 : PyObject * obj1 = 0 ;
9410 : int result;
9411 :
9412 2762 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
9413 2762 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9414 2762 : if (!SWIG_IsOK(res1)) {
9415 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9416 : }
9417 2762 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9418 2762 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9419 2762 : if (!SWIG_IsOK(ecode2)) {
9420 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "int""'");
9421 : }
9422 2762 : arg2 = static_cast< int >(val2);
9423 : {
9424 2762 : if ( bUseExceptions ) {
9425 0 : CPLErrorReset();
9426 : }
9427 2762 : result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
9428 2762 : if ( bUseExceptions ) {
9429 0 : CPLErr eclass = CPLGetLastErrorType();
9430 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9431 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9432 : }
9433 : }
9434 : }
9435 2762 : resultobj = SWIG_From_int(static_cast< int >(result));
9436 2762 : return resultobj;
9437 : fail:
9438 0 : return NULL;
9439 : }
9440 :
9441 :
9442 169 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9443 169 : PyObject *resultobj = 0;
9444 169 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9445 169 : char *arg2 = (char *) 0 ;
9446 169 : void *argp1 = 0 ;
9447 169 : int res1 = 0 ;
9448 : int res2 ;
9449 169 : char *buf2 = 0 ;
9450 169 : int alloc2 = 0 ;
9451 169 : PyObject * obj0 = 0 ;
9452 169 : PyObject * obj1 = 0 ;
9453 : int result;
9454 :
9455 169 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
9456 169 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9457 169 : if (!SWIG_IsOK(res1)) {
9458 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9459 : }
9460 169 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9461 169 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9462 169 : if (!SWIG_IsOK(res2)) {
9463 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "char const *""'");
9464 : }
9465 169 : arg2 = reinterpret_cast< char * >(buf2);
9466 : {
9467 169 : if (!arg2) {
9468 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9469 : }
9470 : }
9471 : {
9472 169 : if ( bUseExceptions ) {
9473 0 : CPLErrorReset();
9474 : }
9475 169 : result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
9476 169 : if ( bUseExceptions ) {
9477 0 : CPLErr eclass = CPLGetLastErrorType();
9478 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9479 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9480 : }
9481 : }
9482 : }
9483 169 : resultobj = SWIG_From_int(static_cast< int >(result));
9484 169 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9485 169 : return resultobj;
9486 : fail:
9487 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9488 0 : return NULL;
9489 : }
9490 :
9491 :
9492 2931 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger(PyObject *self, PyObject *args) {
9493 : int argc;
9494 : PyObject *argv[3];
9495 : int ii;
9496 :
9497 2931 : if (!PyTuple_Check(args)) SWIG_fail;
9498 2931 : argc = (int)PyObject_Length(args);
9499 8793 : for (ii = 0; (ii < argc) && (ii < 2); ii++) {
9500 5862 : argv[ii] = PyTuple_GET_ITEM(args,ii);
9501 : }
9502 2931 : if (argc == 2) {
9503 : int _v;
9504 2931 : void *vptr = 0;
9505 2931 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
9506 2931 : _v = SWIG_CheckState(res);
9507 2931 : if (_v) {
9508 : {
9509 2931 : int res = SWIG_AsVal_int(argv[1], NULL);
9510 2931 : _v = SWIG_CheckState(res);
9511 : }
9512 2931 : if (_v) {
9513 2762 : return _wrap_Feature_GetFieldAsInteger__SWIG_0(self, args);
9514 : }
9515 : }
9516 : }
9517 169 : if (argc == 2) {
9518 : int _v;
9519 169 : void *vptr = 0;
9520 169 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
9521 169 : _v = SWIG_CheckState(res);
9522 169 : if (_v) {
9523 169 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
9524 169 : _v = SWIG_CheckState(res);
9525 169 : if (_v) {
9526 169 : return _wrap_Feature_GetFieldAsInteger__SWIG_1(self, args);
9527 : }
9528 : }
9529 : }
9530 :
9531 : fail:
9532 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsInteger'.\n"
9533 : " Possible C/C++ prototypes are:\n"
9534 : " GetFieldAsInteger(OGRFeatureShadow *,int)\n"
9535 0 : " GetFieldAsInteger(OGRFeatureShadow *,char const *)\n");
9536 0 : return NULL;
9537 : }
9538 :
9539 :
9540 644 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9541 644 : PyObject *resultobj = 0;
9542 644 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9543 : int arg2 ;
9544 644 : void *argp1 = 0 ;
9545 644 : int res1 = 0 ;
9546 : int val2 ;
9547 644 : int ecode2 = 0 ;
9548 644 : PyObject * obj0 = 0 ;
9549 644 : PyObject * obj1 = 0 ;
9550 : double result;
9551 :
9552 644 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
9553 644 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9554 644 : if (!SWIG_IsOK(res1)) {
9555 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9556 : }
9557 644 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9558 644 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9559 644 : if (!SWIG_IsOK(ecode2)) {
9560 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "int""'");
9561 : }
9562 644 : arg2 = static_cast< int >(val2);
9563 : {
9564 644 : if ( bUseExceptions ) {
9565 0 : CPLErrorReset();
9566 : }
9567 644 : result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
9568 644 : if ( bUseExceptions ) {
9569 0 : CPLErr eclass = CPLGetLastErrorType();
9570 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9571 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9572 : }
9573 : }
9574 : }
9575 644 : resultobj = SWIG_From_double(static_cast< double >(result));
9576 644 : return resultobj;
9577 : fail:
9578 0 : return NULL;
9579 : }
9580 :
9581 :
9582 12 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9583 12 : PyObject *resultobj = 0;
9584 12 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9585 12 : char *arg2 = (char *) 0 ;
9586 12 : void *argp1 = 0 ;
9587 12 : int res1 = 0 ;
9588 : int res2 ;
9589 12 : char *buf2 = 0 ;
9590 12 : int alloc2 = 0 ;
9591 12 : PyObject * obj0 = 0 ;
9592 12 : PyObject * obj1 = 0 ;
9593 : double result;
9594 :
9595 12 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
9596 12 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9597 12 : if (!SWIG_IsOK(res1)) {
9598 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9599 : }
9600 12 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9601 12 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9602 12 : if (!SWIG_IsOK(res2)) {
9603 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "char const *""'");
9604 : }
9605 12 : arg2 = reinterpret_cast< char * >(buf2);
9606 : {
9607 12 : if (!arg2) {
9608 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9609 : }
9610 : }
9611 : {
9612 12 : if ( bUseExceptions ) {
9613 0 : CPLErrorReset();
9614 : }
9615 12 : result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
9616 12 : if ( bUseExceptions ) {
9617 0 : CPLErr eclass = CPLGetLastErrorType();
9618 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9619 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9620 : }
9621 : }
9622 : }
9623 12 : resultobj = SWIG_From_double(static_cast< double >(result));
9624 12 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9625 12 : return resultobj;
9626 : fail:
9627 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9628 0 : return NULL;
9629 : }
9630 :
9631 :
9632 656 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble(PyObject *self, PyObject *args) {
9633 : int argc;
9634 : PyObject *argv[3];
9635 : int ii;
9636 :
9637 656 : if (!PyTuple_Check(args)) SWIG_fail;
9638 656 : argc = (int)PyObject_Length(args);
9639 1968 : for (ii = 0; (ii < argc) && (ii < 2); ii++) {
9640 1312 : argv[ii] = PyTuple_GET_ITEM(args,ii);
9641 : }
9642 656 : if (argc == 2) {
9643 : int _v;
9644 656 : void *vptr = 0;
9645 656 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
9646 656 : _v = SWIG_CheckState(res);
9647 656 : if (_v) {
9648 : {
9649 656 : int res = SWIG_AsVal_int(argv[1], NULL);
9650 656 : _v = SWIG_CheckState(res);
9651 : }
9652 656 : if (_v) {
9653 644 : return _wrap_Feature_GetFieldAsDouble__SWIG_0(self, args);
9654 : }
9655 : }
9656 : }
9657 12 : if (argc == 2) {
9658 : int _v;
9659 12 : void *vptr = 0;
9660 12 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
9661 12 : _v = SWIG_CheckState(res);
9662 12 : if (_v) {
9663 12 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
9664 12 : _v = SWIG_CheckState(res);
9665 12 : if (_v) {
9666 12 : return _wrap_Feature_GetFieldAsDouble__SWIG_1(self, args);
9667 : }
9668 : }
9669 : }
9670 :
9671 : fail:
9672 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsDouble'.\n"
9673 : " Possible C/C++ prototypes are:\n"
9674 : " GetFieldAsDouble(OGRFeatureShadow *,int)\n"
9675 0 : " GetFieldAsDouble(OGRFeatureShadow *,char const *)\n");
9676 0 : return NULL;
9677 : }
9678 :
9679 :
9680 1 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9681 1 : PyObject *resultobj = 0;
9682 1 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9683 : int arg2 ;
9684 1 : int *arg3 = (int *) 0 ;
9685 1 : int *arg4 = (int *) 0 ;
9686 1 : int *arg5 = (int *) 0 ;
9687 1 : int *arg6 = (int *) 0 ;
9688 1 : int *arg7 = (int *) 0 ;
9689 1 : int *arg8 = (int *) 0 ;
9690 1 : int *arg9 = (int *) 0 ;
9691 1 : void *argp1 = 0 ;
9692 1 : int res1 = 0 ;
9693 : int val2 ;
9694 1 : int ecode2 = 0 ;
9695 : int temp3 ;
9696 1 : int res3 = SWIG_TMPOBJ ;
9697 : int temp4 ;
9698 1 : int res4 = SWIG_TMPOBJ ;
9699 : int temp5 ;
9700 1 : int res5 = SWIG_TMPOBJ ;
9701 : int temp6 ;
9702 1 : int res6 = SWIG_TMPOBJ ;
9703 : int temp7 ;
9704 1 : int res7 = SWIG_TMPOBJ ;
9705 : int temp8 ;
9706 1 : int res8 = SWIG_TMPOBJ ;
9707 : int temp9 ;
9708 1 : int res9 = SWIG_TMPOBJ ;
9709 1 : PyObject * obj0 = 0 ;
9710 1 : PyObject * obj1 = 0 ;
9711 :
9712 1 : arg3 = &temp3;
9713 1 : arg4 = &temp4;
9714 1 : arg5 = &temp5;
9715 1 : arg6 = &temp6;
9716 1 : arg7 = &temp7;
9717 1 : arg8 = &temp8;
9718 1 : arg9 = &temp9;
9719 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDateTime",&obj0,&obj1)) SWIG_fail;
9720 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9721 1 : if (!SWIG_IsOK(res1)) {
9722 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9723 : }
9724 1 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9725 1 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9726 1 : if (!SWIG_IsOK(ecode2)) {
9727 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDateTime" "', argument " "2"" of type '" "int""'");
9728 : }
9729 1 : arg2 = static_cast< int >(val2);
9730 : {
9731 1 : if ( bUseExceptions ) {
9732 0 : CPLErrorReset();
9733 : }
9734 : OGRFeatureShadow_GetFieldAsDateTime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
9735 1 : if ( bUseExceptions ) {
9736 0 : CPLErr eclass = CPLGetLastErrorType();
9737 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9738 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9739 : }
9740 : }
9741 : }
9742 1 : resultobj = SWIG_Py_Void();
9743 2 : if (SWIG_IsTmpObj(res3)) {
9744 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
9745 : } else {
9746 0 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
9747 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
9748 : }
9749 2 : if (SWIG_IsTmpObj(res4)) {
9750 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
9751 : } else {
9752 0 : int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
9753 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
9754 : }
9755 2 : if (SWIG_IsTmpObj(res5)) {
9756 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
9757 : } else {
9758 0 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
9759 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
9760 : }
9761 2 : if (SWIG_IsTmpObj(res6)) {
9762 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
9763 : } else {
9764 0 : int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
9765 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
9766 : }
9767 2 : if (SWIG_IsTmpObj(res7)) {
9768 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
9769 : } else {
9770 0 : int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
9771 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
9772 : }
9773 2 : if (SWIG_IsTmpObj(res8)) {
9774 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8)));
9775 : } else {
9776 0 : int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
9777 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags));
9778 : }
9779 2 : if (SWIG_IsTmpObj(res9)) {
9780 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
9781 : } else {
9782 0 : int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
9783 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
9784 : }
9785 1 : return resultobj;
9786 : fail:
9787 0 : return NULL;
9788 : }
9789 :
9790 :
9791 6 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9792 6 : PyObject *resultobj = 0;
9793 6 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9794 : int arg2 ;
9795 6 : int *arg3 = (int *) 0 ;
9796 6 : int **arg4 = (int **) 0 ;
9797 6 : void *argp1 = 0 ;
9798 6 : int res1 = 0 ;
9799 : int val2 ;
9800 6 : int ecode2 = 0 ;
9801 : int nLen3 ;
9802 : int *pList3 ;
9803 6 : PyObject * obj0 = 0 ;
9804 6 : PyObject * obj1 = 0 ;
9805 :
9806 : {
9807 : /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
9808 6 : arg3 = &nLen3;
9809 6 : arg4 = &pList3;
9810 : }
9811 6 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsIntegerList",&obj0,&obj1)) SWIG_fail;
9812 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9813 6 : if (!SWIG_IsOK(res1)) {
9814 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9815 : }
9816 6 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9817 6 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9818 6 : if (!SWIG_IsOK(ecode2)) {
9819 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "2"" of type '" "int""'");
9820 : }
9821 6 : arg2 = static_cast< int >(val2);
9822 : {
9823 6 : if ( bUseExceptions ) {
9824 0 : CPLErrorReset();
9825 : }
9826 : OGRFeatureShadow_GetFieldAsIntegerList(arg1,arg2,arg3,(int const **)arg4);
9827 6 : if ( bUseExceptions ) {
9828 0 : CPLErr eclass = CPLGetLastErrorType();
9829 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9830 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9831 : }
9832 : }
9833 : }
9834 6 : resultobj = SWIG_Py_Void();
9835 : {
9836 : /* %typemap(argout) (int *nLen, const int **pList ) */
9837 6 : Py_DECREF(resultobj);
9838 6 : PyObject *out = PyList_New( *arg3 );
9839 17 : for( int i=0; i<*arg3; i++ ) {
9840 11 : PyObject *val = PyInt_FromLong( (*arg4)[i] );
9841 11 : PyList_SetItem( out, i, val );
9842 : }
9843 6 : resultobj = out;
9844 : }
9845 6 : return resultobj;
9846 : fail:
9847 0 : return NULL;
9848 : }
9849 :
9850 :
9851 19 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9852 19 : PyObject *resultobj = 0;
9853 19 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9854 : int arg2 ;
9855 19 : int *arg3 = (int *) 0 ;
9856 19 : double **arg4 = (double **) 0 ;
9857 19 : void *argp1 = 0 ;
9858 19 : int res1 = 0 ;
9859 : int val2 ;
9860 19 : int ecode2 = 0 ;
9861 : int nLen3 ;
9862 : double *pList3 ;
9863 19 : PyObject * obj0 = 0 ;
9864 19 : PyObject * obj1 = 0 ;
9865 :
9866 : {
9867 : /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
9868 19 : arg3 = &nLen3;
9869 19 : arg4 = &pList3;
9870 : }
9871 19 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDoubleList",&obj0,&obj1)) SWIG_fail;
9872 19 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9873 19 : if (!SWIG_IsOK(res1)) {
9874 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9875 : }
9876 19 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9877 19 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9878 19 : if (!SWIG_IsOK(ecode2)) {
9879 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "2"" of type '" "int""'");
9880 : }
9881 19 : arg2 = static_cast< int >(val2);
9882 : {
9883 19 : if ( bUseExceptions ) {
9884 0 : CPLErrorReset();
9885 : }
9886 : OGRFeatureShadow_GetFieldAsDoubleList(arg1,arg2,arg3,(double const **)arg4);
9887 19 : if ( bUseExceptions ) {
9888 0 : CPLErr eclass = CPLGetLastErrorType();
9889 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9890 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9891 : }
9892 : }
9893 : }
9894 19 : resultobj = SWIG_Py_Void();
9895 : {
9896 : /* %typemap(argout) (int *nLen, const double **pList ) */
9897 19 : Py_DECREF(resultobj);
9898 19 : PyObject *out = PyList_New( *arg3 );
9899 57 : for( int i=0; i<*arg3; i++ ) {
9900 38 : PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
9901 38 : PyList_SetItem( out, i, val );
9902 : }
9903 19 : resultobj = out;
9904 : }
9905 19 : return resultobj;
9906 : fail:
9907 0 : return NULL;
9908 : }
9909 :
9910 :
9911 3 : SWIGINTERN PyObject *_wrap_Feature_GetFieldAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9912 3 : PyObject *resultobj = 0;
9913 3 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9914 : int arg2 ;
9915 3 : void *argp1 = 0 ;
9916 3 : int res1 = 0 ;
9917 : int val2 ;
9918 3 : int ecode2 = 0 ;
9919 3 : PyObject * obj0 = 0 ;
9920 3 : PyObject * obj1 = 0 ;
9921 3 : char **result = 0 ;
9922 :
9923 3 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsStringList",&obj0,&obj1)) SWIG_fail;
9924 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9925 3 : if (!SWIG_IsOK(res1)) {
9926 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9927 : }
9928 3 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9929 3 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9930 3 : if (!SWIG_IsOK(ecode2)) {
9931 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsStringList" "', argument " "2"" of type '" "int""'");
9932 : }
9933 3 : arg2 = static_cast< int >(val2);
9934 : {
9935 3 : if ( bUseExceptions ) {
9936 0 : CPLErrorReset();
9937 : }
9938 3 : result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
9939 3 : if ( bUseExceptions ) {
9940 0 : CPLErr eclass = CPLGetLastErrorType();
9941 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9942 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9943 : }
9944 : }
9945 : }
9946 : {
9947 : /* %typemap(out) char **options -> ( string ) */
9948 3 : char **stringarray = result;
9949 3 : if ( stringarray == NULL ) {
9950 0 : resultobj = Py_None;
9951 0 : Py_INCREF( resultobj );
9952 : }
9953 : else {
9954 3 : int len = CSLCount( stringarray );
9955 3 : resultobj = PyList_New( len );
9956 9 : for ( int i = 0; i < len; ++i ) {
9957 6 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
9958 6 : PyList_SetItem(resultobj, i, o );
9959 : }
9960 : }
9961 : }
9962 3 : return resultobj;
9963 : fail:
9964 0 : return NULL;
9965 : }
9966 :
9967 :
9968 4876 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9969 4876 : PyObject *resultobj = 0;
9970 4876 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
9971 : int arg2 ;
9972 4876 : void *argp1 = 0 ;
9973 4876 : int res1 = 0 ;
9974 : int val2 ;
9975 4876 : int ecode2 = 0 ;
9976 4876 : PyObject * obj0 = 0 ;
9977 4876 : PyObject * obj1 = 0 ;
9978 : bool result;
9979 :
9980 4876 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
9981 4876 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
9982 4876 : if (!SWIG_IsOK(res1)) {
9983 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
9984 : }
9985 4876 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
9986 4876 : ecode2 = SWIG_AsVal_int(obj1, &val2);
9987 4876 : if (!SWIG_IsOK(ecode2)) {
9988 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "int""'");
9989 : }
9990 4876 : arg2 = static_cast< int >(val2);
9991 : {
9992 4876 : if ( bUseExceptions ) {
9993 0 : CPLErrorReset();
9994 : }
9995 4876 : result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
9996 4876 : if ( bUseExceptions ) {
9997 0 : CPLErr eclass = CPLGetLastErrorType();
9998 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9999 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10000 : }
10001 : }
10002 : }
10003 4876 : resultobj = SWIG_From_bool(static_cast< bool >(result));
10004 4876 : return resultobj;
10005 : fail:
10006 0 : return NULL;
10007 : }
10008 :
10009 :
10010 112 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10011 112 : PyObject *resultobj = 0;
10012 112 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10013 112 : char *arg2 = (char *) 0 ;
10014 112 : void *argp1 = 0 ;
10015 112 : int res1 = 0 ;
10016 : int res2 ;
10017 112 : char *buf2 = 0 ;
10018 112 : int alloc2 = 0 ;
10019 112 : PyObject * obj0 = 0 ;
10020 112 : PyObject * obj1 = 0 ;
10021 : bool result;
10022 :
10023 112 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
10024 112 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10025 112 : if (!SWIG_IsOK(res1)) {
10026 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10027 : }
10028 112 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10029 112 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10030 112 : if (!SWIG_IsOK(res2)) {
10031 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "char const *""'");
10032 : }
10033 112 : arg2 = reinterpret_cast< char * >(buf2);
10034 : {
10035 112 : if (!arg2) {
10036 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10037 : }
10038 : }
10039 : {
10040 112 : if ( bUseExceptions ) {
10041 0 : CPLErrorReset();
10042 : }
10043 112 : result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
10044 112 : if ( bUseExceptions ) {
10045 0 : CPLErr eclass = CPLGetLastErrorType();
10046 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10047 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10048 : }
10049 : }
10050 : }
10051 112 : resultobj = SWIG_From_bool(static_cast< bool >(result));
10052 112 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10053 112 : return resultobj;
10054 : fail:
10055 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10056 0 : return NULL;
10057 : }
10058 :
10059 :
10060 4988 : SWIGINTERN PyObject *_wrap_Feature_IsFieldSet(PyObject *self, PyObject *args) {
10061 : int argc;
10062 : PyObject *argv[3];
10063 : int ii;
10064 :
10065 4988 : if (!PyTuple_Check(args)) SWIG_fail;
10066 4988 : argc = (int)PyObject_Length(args);
10067 14964 : for (ii = 0; (ii < argc) && (ii < 2); ii++) {
10068 9976 : argv[ii] = PyTuple_GET_ITEM(args,ii);
10069 : }
10070 4988 : if (argc == 2) {
10071 : int _v;
10072 4988 : void *vptr = 0;
10073 4988 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
10074 4988 : _v = SWIG_CheckState(res);
10075 4988 : if (_v) {
10076 : {
10077 4988 : int res = SWIG_AsVal_int(argv[1], NULL);
10078 4988 : _v = SWIG_CheckState(res);
10079 : }
10080 4988 : if (_v) {
10081 4876 : return _wrap_Feature_IsFieldSet__SWIG_0(self, args);
10082 : }
10083 : }
10084 : }
10085 112 : if (argc == 2) {
10086 : int _v;
10087 112 : void *vptr = 0;
10088 112 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
10089 112 : _v = SWIG_CheckState(res);
10090 112 : if (_v) {
10091 112 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
10092 112 : _v = SWIG_CheckState(res);
10093 112 : if (_v) {
10094 112 : return _wrap_Feature_IsFieldSet__SWIG_1(self, args);
10095 : }
10096 : }
10097 : }
10098 :
10099 : fail:
10100 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_IsFieldSet'.\n"
10101 : " Possible C/C++ prototypes are:\n"
10102 : " IsFieldSet(OGRFeatureShadow *,int)\n"
10103 0 : " IsFieldSet(OGRFeatureShadow *,char const *)\n");
10104 0 : return NULL;
10105 : }
10106 :
10107 :
10108 2842 : SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10109 2842 : PyObject *resultobj = 0;
10110 2842 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10111 2842 : char *arg2 = (char *) 0 ;
10112 2842 : void *argp1 = 0 ;
10113 2842 : int res1 = 0 ;
10114 : int res2 ;
10115 2842 : char *buf2 = 0 ;
10116 2842 : int alloc2 = 0 ;
10117 2842 : PyObject * obj0 = 0 ;
10118 2842 : PyObject * obj1 = 0 ;
10119 : int result;
10120 :
10121 2842 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
10122 2842 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10123 2842 : if (!SWIG_IsOK(res1)) {
10124 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10125 : }
10126 2842 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10127 2842 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10128 2842 : if (!SWIG_IsOK(res2)) {
10129 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldIndex" "', argument " "2"" of type '" "char const *""'");
10130 : }
10131 2842 : arg2 = reinterpret_cast< char * >(buf2);
10132 : {
10133 2842 : if (!arg2) {
10134 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10135 : }
10136 : }
10137 : {
10138 2842 : if ( bUseExceptions ) {
10139 0 : CPLErrorReset();
10140 : }
10141 2842 : result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
10142 2842 : if ( bUseExceptions ) {
10143 0 : CPLErr eclass = CPLGetLastErrorType();
10144 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10145 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10146 : }
10147 : }
10148 : }
10149 2842 : resultobj = SWIG_From_int(static_cast< int >(result));
10150 2842 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10151 2842 : return resultobj;
10152 : fail:
10153 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10154 0 : return NULL;
10155 : }
10156 :
10157 :
10158 382 : SWIGINTERN PyObject *_wrap_Feature_GetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10159 382 : PyObject *resultobj = 0;
10160 382 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10161 382 : void *argp1 = 0 ;
10162 382 : int res1 = 0 ;
10163 382 : PyObject * obj0 = 0 ;
10164 : int result;
10165 :
10166 382 : if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFID",&obj0)) SWIG_fail;
10167 382 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10168 382 : if (!SWIG_IsOK(res1)) {
10169 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10170 : }
10171 382 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10172 : {
10173 382 : if ( bUseExceptions ) {
10174 0 : CPLErrorReset();
10175 : }
10176 382 : result = (int)OGRFeatureShadow_GetFID(arg1);
10177 382 : if ( bUseExceptions ) {
10178 0 : CPLErr eclass = CPLGetLastErrorType();
10179 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10180 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10181 : }
10182 : }
10183 : }
10184 382 : resultobj = SWIG_From_int(static_cast< int >(result));
10185 382 : return resultobj;
10186 : fail:
10187 0 : return NULL;
10188 : }
10189 :
10190 :
10191 52 : SWIGINTERN PyObject *_wrap_Feature_SetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10192 52 : PyObject *resultobj = 0;
10193 52 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10194 : int arg2 ;
10195 52 : void *argp1 = 0 ;
10196 52 : int res1 = 0 ;
10197 : int val2 ;
10198 52 : int ecode2 = 0 ;
10199 52 : PyObject * obj0 = 0 ;
10200 52 : PyObject * obj1 = 0 ;
10201 : OGRErr result;
10202 :
10203 52 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetFID",&obj0,&obj1)) SWIG_fail;
10204 52 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10205 52 : if (!SWIG_IsOK(res1)) {
10206 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10207 : }
10208 52 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10209 52 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10210 52 : if (!SWIG_IsOK(ecode2)) {
10211 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFID" "', argument " "2"" of type '" "int""'");
10212 : }
10213 52 : arg2 = static_cast< int >(val2);
10214 : {
10215 52 : if ( bUseExceptions ) {
10216 0 : CPLErrorReset();
10217 : }
10218 52 : result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
10219 52 : if ( bUseExceptions ) {
10220 0 : CPLErr eclass = CPLGetLastErrorType();
10221 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10222 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10223 : }
10224 : }
10225 : }
10226 : {
10227 : /* %typemap(out) OGRErr */
10228 52 : if ( result != 0 && bUseExceptions) {
10229 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10230 0 : SWIG_fail;
10231 : }
10232 : }
10233 : {
10234 : /* %typemap(ret) OGRErr */
10235 52 : if (resultobj == Py_None ) {
10236 0 : Py_DECREF(resultobj);
10237 0 : resultobj = 0;
10238 : }
10239 52 : if (resultobj == 0) {
10240 52 : resultobj = PyInt_FromLong( result );
10241 : }
10242 : }
10243 52 : return resultobj;
10244 : fail:
10245 0 : return NULL;
10246 : }
10247 :
10248 :
10249 0 : SWIGINTERN PyObject *_wrap_Feature_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10250 0 : PyObject *resultobj = 0;
10251 0 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10252 0 : void *argp1 = 0 ;
10253 0 : int res1 = 0 ;
10254 0 : PyObject * obj0 = 0 ;
10255 :
10256 0 : if (!PyArg_ParseTuple(args,(char *)"O:Feature_DumpReadable",&obj0)) SWIG_fail;
10257 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10258 0 : if (!SWIG_IsOK(res1)) {
10259 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadable" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10260 : }
10261 0 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10262 : {
10263 0 : if ( bUseExceptions ) {
10264 0 : CPLErrorReset();
10265 : }
10266 : OGRFeatureShadow_DumpReadable(arg1);
10267 0 : if ( bUseExceptions ) {
10268 0 : CPLErr eclass = CPLGetLastErrorType();
10269 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10270 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10271 : }
10272 : }
10273 : }
10274 0 : resultobj = SWIG_Py_Void();
10275 0 : return resultobj;
10276 : fail:
10277 0 : return NULL;
10278 : }
10279 :
10280 :
10281 0 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10282 0 : PyObject *resultobj = 0;
10283 0 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10284 : int arg2 ;
10285 0 : void *argp1 = 0 ;
10286 0 : int res1 = 0 ;
10287 : int val2 ;
10288 0 : int ecode2 = 0 ;
10289 0 : PyObject * obj0 = 0 ;
10290 0 : PyObject * obj1 = 0 ;
10291 :
10292 0 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
10293 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10294 0 : if (!SWIG_IsOK(res1)) {
10295 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10296 : }
10297 0 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10298 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10299 0 : if (!SWIG_IsOK(ecode2)) {
10300 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "int""'");
10301 : }
10302 0 : arg2 = static_cast< int >(val2);
10303 : {
10304 0 : if ( bUseExceptions ) {
10305 0 : CPLErrorReset();
10306 : }
10307 : OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
10308 0 : if ( bUseExceptions ) {
10309 0 : CPLErr eclass = CPLGetLastErrorType();
10310 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10311 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10312 : }
10313 : }
10314 : }
10315 0 : resultobj = SWIG_Py_Void();
10316 0 : return resultobj;
10317 : fail:
10318 0 : return NULL;
10319 : }
10320 :
10321 :
10322 1 : SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10323 1 : PyObject *resultobj = 0;
10324 1 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10325 1 : char *arg2 = (char *) 0 ;
10326 1 : void *argp1 = 0 ;
10327 1 : int res1 = 0 ;
10328 : int res2 ;
10329 1 : char *buf2 = 0 ;
10330 1 : int alloc2 = 0 ;
10331 1 : PyObject * obj0 = 0 ;
10332 1 : PyObject * obj1 = 0 ;
10333 :
10334 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
10335 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10336 1 : if (!SWIG_IsOK(res1)) {
10337 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10338 : }
10339 1 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10340 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10341 1 : if (!SWIG_IsOK(res2)) {
10342 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "char const *""'");
10343 : }
10344 1 : arg2 = reinterpret_cast< char * >(buf2);
10345 : {
10346 1 : if (!arg2) {
10347 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10348 : }
10349 : }
10350 : {
10351 1 : if ( bUseExceptions ) {
10352 0 : CPLErrorReset();
10353 : }
10354 : OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
10355 1 : if ( bUseExceptions ) {
10356 0 : CPLErr eclass = CPLGetLastErrorType();
10357 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10358 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10359 : }
10360 : }
10361 : }
10362 1 : resultobj = SWIG_Py_Void();
10363 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10364 1 : return resultobj;
10365 : fail:
10366 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10367 0 : return NULL;
10368 : }
10369 :
10370 :
10371 1 : SWIGINTERN PyObject *_wrap_Feature_UnsetField(PyObject *self, PyObject *args) {
10372 : int argc;
10373 : PyObject *argv[3];
10374 : int ii;
10375 :
10376 1 : if (!PyTuple_Check(args)) SWIG_fail;
10377 1 : argc = (int)PyObject_Length(args);
10378 3 : for (ii = 0; (ii < argc) && (ii < 2); ii++) {
10379 2 : argv[ii] = PyTuple_GET_ITEM(args,ii);
10380 : }
10381 1 : if (argc == 2) {
10382 : int _v;
10383 1 : void *vptr = 0;
10384 1 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
10385 1 : _v = SWIG_CheckState(res);
10386 1 : if (_v) {
10387 : {
10388 1 : int res = SWIG_AsVal_int(argv[1], NULL);
10389 1 : _v = SWIG_CheckState(res);
10390 : }
10391 1 : if (_v) {
10392 0 : return _wrap_Feature_UnsetField__SWIG_0(self, args);
10393 : }
10394 : }
10395 : }
10396 1 : if (argc == 2) {
10397 : int _v;
10398 1 : void *vptr = 0;
10399 1 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
10400 1 : _v = SWIG_CheckState(res);
10401 1 : if (_v) {
10402 1 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
10403 1 : _v = SWIG_CheckState(res);
10404 1 : if (_v) {
10405 1 : return _wrap_Feature_UnsetField__SWIG_1(self, args);
10406 : }
10407 : }
10408 : }
10409 :
10410 : fail:
10411 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_UnsetField'.\n"
10412 : " Possible C/C++ prototypes are:\n"
10413 : " UnsetField(OGRFeatureShadow *,int)\n"
10414 0 : " UnsetField(OGRFeatureShadow *,char const *)\n");
10415 0 : return NULL;
10416 : }
10417 :
10418 :
10419 3278 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10420 3278 : PyObject *resultobj = 0;
10421 3278 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10422 : int arg2 ;
10423 3278 : char *arg3 = (char *) 0 ;
10424 3278 : void *argp1 = 0 ;
10425 3278 : int res1 = 0 ;
10426 : int val2 ;
10427 3278 : int ecode2 = 0 ;
10428 3278 : PyObject *str3 = 0 ;
10429 3278 : int bToFree3 = 0 ;
10430 3278 : PyObject * obj0 = 0 ;
10431 3278 : PyObject * obj1 = 0 ;
10432 3278 : PyObject * obj2 = 0 ;
10433 :
10434 3278 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
10435 3278 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10436 3278 : if (!SWIG_IsOK(res1)) {
10437 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10438 : }
10439 3278 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10440 3278 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10441 3278 : if (!SWIG_IsOK(ecode2)) {
10442 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
10443 : }
10444 3278 : arg2 = static_cast< int >(val2);
10445 : {
10446 : /* %typemap(in) (tostring argin) */
10447 3278 : str3 = PyObject_Str( obj2 );
10448 3278 : if ( str3 == 0 ) {
10449 0 : PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
10450 0 : SWIG_fail;
10451 : }
10452 :
10453 3278 : arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
10454 : }
10455 : {
10456 3278 : if ( bUseExceptions ) {
10457 0 : CPLErrorReset();
10458 : }
10459 : OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
10460 3278 : if ( bUseExceptions ) {
10461 0 : CPLErr eclass = CPLGetLastErrorType();
10462 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10463 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10464 : }
10465 : }
10466 : }
10467 3278 : resultobj = SWIG_Py_Void();
10468 : {
10469 : /* %typemap(freearg) (tostring argin) */
10470 3278 : if ( str3 != NULL)
10471 : {
10472 3278 : Py_DECREF(str3);
10473 : }
10474 3278 : GDALPythonFreeCStr(arg3, bToFree3);
10475 : }
10476 3278 : return resultobj;
10477 : fail:
10478 : {
10479 : /* %typemap(freearg) (tostring argin) */
10480 0 : if ( str3 != NULL)
10481 : {
10482 0 : Py_DECREF(str3);
10483 : }
10484 0 : GDALPythonFreeCStr(arg3, bToFree3);
10485 : }
10486 0 : return NULL;
10487 : }
10488 :
10489 :
10490 404 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10491 404 : PyObject *resultobj = 0;
10492 404 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10493 404 : char *arg2 = (char *) 0 ;
10494 404 : char *arg3 = (char *) 0 ;
10495 404 : void *argp1 = 0 ;
10496 404 : int res1 = 0 ;
10497 : int res2 ;
10498 404 : char *buf2 = 0 ;
10499 404 : int alloc2 = 0 ;
10500 404 : PyObject *str3 = 0 ;
10501 404 : int bToFree3 = 0 ;
10502 404 : PyObject * obj0 = 0 ;
10503 404 : PyObject * obj1 = 0 ;
10504 404 : PyObject * obj2 = 0 ;
10505 :
10506 404 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
10507 404 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10508 404 : if (!SWIG_IsOK(res1)) {
10509 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10510 : }
10511 404 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10512 404 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10513 404 : if (!SWIG_IsOK(res2)) {
10514 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
10515 : }
10516 404 : arg2 = reinterpret_cast< char * >(buf2);
10517 : {
10518 : /* %typemap(in) (tostring argin) */
10519 404 : str3 = PyObject_Str( obj2 );
10520 404 : if ( str3 == 0 ) {
10521 0 : PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
10522 0 : SWIG_fail;
10523 : }
10524 :
10525 404 : arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
10526 : }
10527 : {
10528 404 : if (!arg2) {
10529 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10530 : }
10531 : }
10532 : {
10533 404 : if ( bUseExceptions ) {
10534 0 : CPLErrorReset();
10535 : }
10536 : OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
10537 404 : if ( bUseExceptions ) {
10538 0 : CPLErr eclass = CPLGetLastErrorType();
10539 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10540 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10541 : }
10542 : }
10543 : }
10544 404 : resultobj = SWIG_Py_Void();
10545 404 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10546 : {
10547 : /* %typemap(freearg) (tostring argin) */
10548 404 : if ( str3 != NULL)
10549 : {
10550 404 : Py_DECREF(str3);
10551 : }
10552 404 : GDALPythonFreeCStr(arg3, bToFree3);
10553 : }
10554 404 : return resultobj;
10555 : fail:
10556 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10557 : {
10558 : /* %typemap(freearg) (tostring argin) */
10559 0 : if ( str3 != NULL)
10560 : {
10561 0 : Py_DECREF(str3);
10562 : }
10563 0 : GDALPythonFreeCStr(arg3, bToFree3);
10564 : }
10565 0 : return NULL;
10566 : }
10567 :
10568 :
10569 9273 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10570 9273 : PyObject *resultobj = 0;
10571 9273 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10572 : int arg2 ;
10573 : int arg3 ;
10574 9273 : void *argp1 = 0 ;
10575 9273 : int res1 = 0 ;
10576 : int val2 ;
10577 9273 : int ecode2 = 0 ;
10578 : int val3 ;
10579 9273 : int ecode3 = 0 ;
10580 9273 : PyObject * obj0 = 0 ;
10581 9273 : PyObject * obj1 = 0 ;
10582 9273 : PyObject * obj2 = 0 ;
10583 :
10584 9273 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
10585 9273 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10586 9273 : if (!SWIG_IsOK(res1)) {
10587 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10588 : }
10589 9273 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10590 9273 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10591 9273 : if (!SWIG_IsOK(ecode2)) {
10592 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
10593 : }
10594 9273 : arg2 = static_cast< int >(val2);
10595 9273 : ecode3 = SWIG_AsVal_int(obj2, &val3);
10596 9273 : if (!SWIG_IsOK(ecode3)) {
10597 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
10598 : }
10599 9273 : arg3 = static_cast< int >(val3);
10600 : {
10601 9273 : if ( bUseExceptions ) {
10602 0 : CPLErrorReset();
10603 : }
10604 : OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
10605 9273 : if ( bUseExceptions ) {
10606 0 : CPLErr eclass = CPLGetLastErrorType();
10607 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10608 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10609 : }
10610 : }
10611 : }
10612 9273 : resultobj = SWIG_Py_Void();
10613 9273 : return resultobj;
10614 : fail:
10615 0 : return NULL;
10616 : }
10617 :
10618 :
10619 228 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10620 228 : PyObject *resultobj = 0;
10621 228 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10622 228 : char *arg2 = (char *) 0 ;
10623 : int arg3 ;
10624 228 : void *argp1 = 0 ;
10625 228 : int res1 = 0 ;
10626 : int res2 ;
10627 228 : char *buf2 = 0 ;
10628 228 : int alloc2 = 0 ;
10629 : int val3 ;
10630 228 : int ecode3 = 0 ;
10631 228 : PyObject * obj0 = 0 ;
10632 228 : PyObject * obj1 = 0 ;
10633 228 : PyObject * obj2 = 0 ;
10634 :
10635 228 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
10636 228 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10637 228 : if (!SWIG_IsOK(res1)) {
10638 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10639 : }
10640 228 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10641 228 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10642 228 : if (!SWIG_IsOK(res2)) {
10643 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
10644 : }
10645 228 : arg2 = reinterpret_cast< char * >(buf2);
10646 228 : ecode3 = SWIG_AsVal_int(obj2, &val3);
10647 228 : if (!SWIG_IsOK(ecode3)) {
10648 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
10649 : }
10650 228 : arg3 = static_cast< int >(val3);
10651 : {
10652 228 : if (!arg2) {
10653 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10654 : }
10655 : }
10656 : {
10657 228 : if ( bUseExceptions ) {
10658 0 : CPLErrorReset();
10659 : }
10660 : OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
10661 228 : if ( bUseExceptions ) {
10662 0 : CPLErr eclass = CPLGetLastErrorType();
10663 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10664 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10665 : }
10666 : }
10667 : }
10668 228 : resultobj = SWIG_Py_Void();
10669 228 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10670 228 : return resultobj;
10671 : fail:
10672 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10673 0 : return NULL;
10674 : }
10675 :
10676 :
10677 9 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10678 9 : PyObject *resultobj = 0;
10679 9 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10680 : int arg2 ;
10681 : double arg3 ;
10682 9 : void *argp1 = 0 ;
10683 9 : int res1 = 0 ;
10684 : int val2 ;
10685 9 : int ecode2 = 0 ;
10686 : double val3 ;
10687 9 : int ecode3 = 0 ;
10688 9 : PyObject * obj0 = 0 ;
10689 9 : PyObject * obj1 = 0 ;
10690 9 : PyObject * obj2 = 0 ;
10691 :
10692 9 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
10693 9 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10694 9 : if (!SWIG_IsOK(res1)) {
10695 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10696 : }
10697 9 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10698 9 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10699 9 : if (!SWIG_IsOK(ecode2)) {
10700 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
10701 : }
10702 9 : arg2 = static_cast< int >(val2);
10703 9 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10704 9 : if (!SWIG_IsOK(ecode3)) {
10705 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
10706 : }
10707 9 : arg3 = static_cast< double >(val3);
10708 : {
10709 9 : if ( bUseExceptions ) {
10710 0 : CPLErrorReset();
10711 : }
10712 : OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3);
10713 9 : if ( bUseExceptions ) {
10714 0 : CPLErr eclass = CPLGetLastErrorType();
10715 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10716 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10717 : }
10718 : }
10719 : }
10720 9 : resultobj = SWIG_Py_Void();
10721 9 : return resultobj;
10722 : fail:
10723 0 : return NULL;
10724 : }
10725 :
10726 :
10727 112 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10728 112 : PyObject *resultobj = 0;
10729 112 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10730 112 : char *arg2 = (char *) 0 ;
10731 : double arg3 ;
10732 112 : void *argp1 = 0 ;
10733 112 : int res1 = 0 ;
10734 : int res2 ;
10735 112 : char *buf2 = 0 ;
10736 112 : int alloc2 = 0 ;
10737 : double val3 ;
10738 112 : int ecode3 = 0 ;
10739 112 : PyObject * obj0 = 0 ;
10740 112 : PyObject * obj1 = 0 ;
10741 112 : PyObject * obj2 = 0 ;
10742 :
10743 112 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
10744 112 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10745 112 : if (!SWIG_IsOK(res1)) {
10746 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10747 : }
10748 112 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10749 112 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10750 112 : if (!SWIG_IsOK(res2)) {
10751 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
10752 : }
10753 112 : arg2 = reinterpret_cast< char * >(buf2);
10754 112 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10755 112 : if (!SWIG_IsOK(ecode3)) {
10756 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
10757 : }
10758 112 : arg3 = static_cast< double >(val3);
10759 : {
10760 112 : if (!arg2) {
10761 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10762 : }
10763 : }
10764 : {
10765 112 : if ( bUseExceptions ) {
10766 0 : CPLErrorReset();
10767 : }
10768 : OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3);
10769 112 : if ( bUseExceptions ) {
10770 0 : CPLErr eclass = CPLGetLastErrorType();
10771 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10772 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10773 : }
10774 : }
10775 : }
10776 112 : resultobj = SWIG_Py_Void();
10777 112 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10778 112 : return resultobj;
10779 : fail:
10780 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10781 0 : return NULL;
10782 : }
10783 :
10784 :
10785 24 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10786 24 : PyObject *resultobj = 0;
10787 24 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10788 : int arg2 ;
10789 : int arg3 ;
10790 : int arg4 ;
10791 : int arg5 ;
10792 : int arg6 ;
10793 : int arg7 ;
10794 : int arg8 ;
10795 : int arg9 ;
10796 24 : void *argp1 = 0 ;
10797 24 : int res1 = 0 ;
10798 : int val2 ;
10799 24 : int ecode2 = 0 ;
10800 : int val3 ;
10801 24 : int ecode3 = 0 ;
10802 : int val4 ;
10803 24 : int ecode4 = 0 ;
10804 : int val5 ;
10805 24 : int ecode5 = 0 ;
10806 : int val6 ;
10807 24 : int ecode6 = 0 ;
10808 : int val7 ;
10809 24 : int ecode7 = 0 ;
10810 : int val8 ;
10811 24 : int ecode8 = 0 ;
10812 : int val9 ;
10813 24 : int ecode9 = 0 ;
10814 24 : PyObject * obj0 = 0 ;
10815 24 : PyObject * obj1 = 0 ;
10816 24 : PyObject * obj2 = 0 ;
10817 24 : PyObject * obj3 = 0 ;
10818 24 : PyObject * obj4 = 0 ;
10819 24 : PyObject * obj5 = 0 ;
10820 24 : PyObject * obj6 = 0 ;
10821 24 : PyObject * obj7 = 0 ;
10822 24 : PyObject * obj8 = 0 ;
10823 :
10824 24 : if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
10825 24 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10826 24 : if (!SWIG_IsOK(res1)) {
10827 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10828 : }
10829 24 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10830 24 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10831 24 : if (!SWIG_IsOK(ecode2)) {
10832 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
10833 : }
10834 24 : arg2 = static_cast< int >(val2);
10835 24 : ecode3 = SWIG_AsVal_int(obj2, &val3);
10836 24 : if (!SWIG_IsOK(ecode3)) {
10837 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
10838 : }
10839 24 : arg3 = static_cast< int >(val3);
10840 24 : ecode4 = SWIG_AsVal_int(obj3, &val4);
10841 24 : if (!SWIG_IsOK(ecode4)) {
10842 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
10843 : }
10844 24 : arg4 = static_cast< int >(val4);
10845 24 : ecode5 = SWIG_AsVal_int(obj4, &val5);
10846 24 : if (!SWIG_IsOK(ecode5)) {
10847 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
10848 : }
10849 24 : arg5 = static_cast< int >(val5);
10850 24 : ecode6 = SWIG_AsVal_int(obj5, &val6);
10851 24 : if (!SWIG_IsOK(ecode6)) {
10852 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
10853 : }
10854 24 : arg6 = static_cast< int >(val6);
10855 24 : ecode7 = SWIG_AsVal_int(obj6, &val7);
10856 24 : if (!SWIG_IsOK(ecode7)) {
10857 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
10858 : }
10859 24 : arg7 = static_cast< int >(val7);
10860 24 : ecode8 = SWIG_AsVal_int(obj7, &val8);
10861 24 : if (!SWIG_IsOK(ecode8)) {
10862 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "int""'");
10863 : }
10864 24 : arg8 = static_cast< int >(val8);
10865 24 : ecode9 = SWIG_AsVal_int(obj8, &val9);
10866 24 : if (!SWIG_IsOK(ecode9)) {
10867 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
10868 : }
10869 24 : arg9 = static_cast< int >(val9);
10870 : {
10871 24 : if ( bUseExceptions ) {
10872 0 : CPLErrorReset();
10873 : }
10874 : OGRFeatureShadow_SetField__SWIG_6(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
10875 24 : if ( bUseExceptions ) {
10876 0 : CPLErr eclass = CPLGetLastErrorType();
10877 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10878 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10879 : }
10880 : }
10881 : }
10882 24 : resultobj = SWIG_Py_Void();
10883 24 : return resultobj;
10884 : fail:
10885 0 : return NULL;
10886 : }
10887 :
10888 :
10889 1 : SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10890 1 : PyObject *resultobj = 0;
10891 1 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
10892 1 : char *arg2 = (char *) 0 ;
10893 : int arg3 ;
10894 : int arg4 ;
10895 : int arg5 ;
10896 : int arg6 ;
10897 : int arg7 ;
10898 : int arg8 ;
10899 : int arg9 ;
10900 1 : void *argp1 = 0 ;
10901 1 : int res1 = 0 ;
10902 : int res2 ;
10903 1 : char *buf2 = 0 ;
10904 1 : int alloc2 = 0 ;
10905 : int val3 ;
10906 1 : int ecode3 = 0 ;
10907 : int val4 ;
10908 1 : int ecode4 = 0 ;
10909 : int val5 ;
10910 1 : int ecode5 = 0 ;
10911 : int val6 ;
10912 1 : int ecode6 = 0 ;
10913 : int val7 ;
10914 1 : int ecode7 = 0 ;
10915 : int val8 ;
10916 1 : int ecode8 = 0 ;
10917 : int val9 ;
10918 1 : int ecode9 = 0 ;
10919 1 : PyObject * obj0 = 0 ;
10920 1 : PyObject * obj1 = 0 ;
10921 1 : PyObject * obj2 = 0 ;
10922 1 : PyObject * obj3 = 0 ;
10923 1 : PyObject * obj4 = 0 ;
10924 1 : PyObject * obj5 = 0 ;
10925 1 : PyObject * obj6 = 0 ;
10926 1 : PyObject * obj7 = 0 ;
10927 1 : PyObject * obj8 = 0 ;
10928 :
10929 1 : if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
10930 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
10931 1 : if (!SWIG_IsOK(res1)) {
10932 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
10933 : }
10934 1 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
10935 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10936 1 : if (!SWIG_IsOK(res2)) {
10937 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
10938 : }
10939 1 : arg2 = reinterpret_cast< char * >(buf2);
10940 1 : ecode3 = SWIG_AsVal_int(obj2, &val3);
10941 1 : if (!SWIG_IsOK(ecode3)) {
10942 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
10943 : }
10944 1 : arg3 = static_cast< int >(val3);
10945 1 : ecode4 = SWIG_AsVal_int(obj3, &val4);
10946 1 : if (!SWIG_IsOK(ecode4)) {
10947 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
10948 : }
10949 1 : arg4 = static_cast< int >(val4);
10950 1 : ecode5 = SWIG_AsVal_int(obj4, &val5);
10951 1 : if (!SWIG_IsOK(ecode5)) {
10952 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
10953 : }
10954 1 : arg5 = static_cast< int >(val5);
10955 1 : ecode6 = SWIG_AsVal_int(obj5, &val6);
10956 1 : if (!SWIG_IsOK(ecode6)) {
10957 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
10958 : }
10959 1 : arg6 = static_cast< int >(val6);
10960 1 : ecode7 = SWIG_AsVal_int(obj6, &val7);
10961 1 : if (!SWIG_IsOK(ecode7)) {
10962 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
10963 : }
10964 1 : arg7 = static_cast< int >(val7);
10965 1 : ecode8 = SWIG_AsVal_int(obj7, &val8);
10966 1 : if (!SWIG_IsOK(ecode8)) {
10967 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "int""'");
10968 : }
10969 1 : arg8 = static_cast< int >(val8);
10970 1 : ecode9 = SWIG_AsVal_int(obj8, &val9);
10971 1 : if (!SWIG_IsOK(ecode9)) {
10972 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
10973 : }
10974 1 : arg9 = static_cast< int >(val9);
10975 : {
10976 1 : if (!arg2) {
10977 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10978 : }
10979 : }
10980 : {
10981 1 : if ( bUseExceptions ) {
10982 0 : CPLErrorReset();
10983 : }
10984 : OGRFeatureShadow_SetField__SWIG_7(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
10985 1 : if ( bUseExceptions ) {
10986 0 : CPLErr eclass = CPLGetLastErrorType();
10987 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10988 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10989 : }
10990 : }
10991 : }
10992 1 : resultobj = SWIG_Py_Void();
10993 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10994 1 : return resultobj;
10995 : fail:
10996 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10997 0 : return NULL;
10998 : }
10999 :
11000 :
11001 13329 : SWIGINTERN PyObject *_wrap_Feature_SetField(PyObject *self, PyObject *args) {
11002 : int argc;
11003 : PyObject *argv[10];
11004 : int ii;
11005 :
11006 13329 : if (!PyTuple_Check(args)) SWIG_fail;
11007 13329 : argc = (int)PyObject_Length(args);
11008 53466 : for (ii = 0; (ii < argc) && (ii < 9); ii++) {
11009 40137 : argv[ii] = PyTuple_GET_ITEM(args,ii);
11010 : }
11011 13329 : if (argc == 3) {
11012 : int _v;
11013 13304 : void *vptr = 0;
11014 13304 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11015 13304 : _v = SWIG_CheckState(res);
11016 13304 : if (_v) {
11017 : {
11018 13304 : int res = SWIG_AsVal_int(argv[1], NULL);
11019 13304 : _v = SWIG_CheckState(res);
11020 : }
11021 13304 : if (_v) {
11022 : {
11023 12560 : int res = SWIG_AsVal_int(argv[2], NULL);
11024 12560 : _v = SWIG_CheckState(res);
11025 : }
11026 12560 : if (_v) {
11027 9273 : return _wrap_Feature_SetField__SWIG_2(self, args);
11028 : }
11029 : }
11030 : }
11031 : }
11032 4056 : if (argc == 3) {
11033 : int _v;
11034 4031 : void *vptr = 0;
11035 4031 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11036 4031 : _v = SWIG_CheckState(res);
11037 4031 : if (_v) {
11038 : {
11039 4031 : int res = SWIG_AsVal_int(argv[1], NULL);
11040 4031 : _v = SWIG_CheckState(res);
11041 : }
11042 4031 : if (_v) {
11043 : {
11044 3287 : int res = SWIG_AsVal_double(argv[2], NULL);
11045 3287 : _v = SWIG_CheckState(res);
11046 : }
11047 3287 : if (_v) {
11048 9 : return _wrap_Feature_SetField__SWIG_4(self, args);
11049 : }
11050 : }
11051 : }
11052 : }
11053 4047 : if (argc == 3) {
11054 : int _v;
11055 4022 : void *vptr = 0;
11056 4022 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11057 4022 : _v = SWIG_CheckState(res);
11058 4022 : if (_v) {
11059 : {
11060 4022 : int res = SWIG_AsVal_int(argv[1], NULL);
11061 4022 : _v = SWIG_CheckState(res);
11062 : }
11063 4022 : if (_v) {
11064 3278 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
11065 3278 : _v = SWIG_CheckState(res);
11066 3278 : if (_v) {
11067 3278 : return _wrap_Feature_SetField__SWIG_0(self, args);
11068 : }
11069 : }
11070 : }
11071 : }
11072 769 : if (argc == 3) {
11073 : int _v;
11074 744 : void *vptr = 0;
11075 744 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11076 744 : _v = SWIG_CheckState(res);
11077 744 : if (_v) {
11078 744 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
11079 744 : _v = SWIG_CheckState(res);
11080 744 : if (_v) {
11081 : {
11082 744 : int res = SWIG_AsVal_int(argv[2], NULL);
11083 744 : _v = SWIG_CheckState(res);
11084 : }
11085 744 : if (_v) {
11086 228 : return _wrap_Feature_SetField__SWIG_3(self, args);
11087 : }
11088 : }
11089 : }
11090 : }
11091 541 : if (argc == 3) {
11092 : int _v;
11093 516 : void *vptr = 0;
11094 516 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11095 516 : _v = SWIG_CheckState(res);
11096 516 : if (_v) {
11097 516 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
11098 516 : _v = SWIG_CheckState(res);
11099 516 : if (_v) {
11100 : {
11101 516 : int res = SWIG_AsVal_double(argv[2], NULL);
11102 516 : _v = SWIG_CheckState(res);
11103 : }
11104 516 : if (_v) {
11105 112 : return _wrap_Feature_SetField__SWIG_5(self, args);
11106 : }
11107 : }
11108 : }
11109 : }
11110 429 : if (argc == 3) {
11111 : int _v;
11112 404 : void *vptr = 0;
11113 404 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11114 404 : _v = SWIG_CheckState(res);
11115 404 : if (_v) {
11116 404 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
11117 404 : _v = SWIG_CheckState(res);
11118 404 : if (_v) {
11119 404 : int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
11120 404 : _v = SWIG_CheckState(res);
11121 404 : if (_v) {
11122 404 : return _wrap_Feature_SetField__SWIG_1(self, args);
11123 : }
11124 : }
11125 : }
11126 : }
11127 25 : if (argc == 9) {
11128 : int _v;
11129 25 : void *vptr = 0;
11130 25 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11131 25 : _v = SWIG_CheckState(res);
11132 25 : if (_v) {
11133 : {
11134 25 : int res = SWIG_AsVal_int(argv[1], NULL);
11135 25 : _v = SWIG_CheckState(res);
11136 : }
11137 25 : if (_v) {
11138 : {
11139 24 : int res = SWIG_AsVal_int(argv[2], NULL);
11140 24 : _v = SWIG_CheckState(res);
11141 : }
11142 24 : if (_v) {
11143 : {
11144 24 : int res = SWIG_AsVal_int(argv[3], NULL);
11145 24 : _v = SWIG_CheckState(res);
11146 : }
11147 24 : if (_v) {
11148 : {
11149 24 : int res = SWIG_AsVal_int(argv[4], NULL);
11150 24 : _v = SWIG_CheckState(res);
11151 : }
11152 24 : if (_v) {
11153 : {
11154 24 : int res = SWIG_AsVal_int(argv[5], NULL);
11155 24 : _v = SWIG_CheckState(res);
11156 : }
11157 24 : if (_v) {
11158 : {
11159 24 : int res = SWIG_AsVal_int(argv[6], NULL);
11160 24 : _v = SWIG_CheckState(res);
11161 : }
11162 24 : if (_v) {
11163 : {
11164 24 : int res = SWIG_AsVal_int(argv[7], NULL);
11165 24 : _v = SWIG_CheckState(res);
11166 : }
11167 24 : if (_v) {
11168 : {
11169 24 : int res = SWIG_AsVal_int(argv[8], NULL);
11170 24 : _v = SWIG_CheckState(res);
11171 : }
11172 24 : if (_v) {
11173 24 : return _wrap_Feature_SetField__SWIG_6(self, args);
11174 : }
11175 : }
11176 : }
11177 : }
11178 : }
11179 : }
11180 : }
11181 : }
11182 : }
11183 : }
11184 1 : if (argc == 9) {
11185 : int _v;
11186 1 : void *vptr = 0;
11187 1 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11188 1 : _v = SWIG_CheckState(res);
11189 1 : if (_v) {
11190 1 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
11191 1 : _v = SWIG_CheckState(res);
11192 1 : if (_v) {
11193 : {
11194 1 : int res = SWIG_AsVal_int(argv[2], NULL);
11195 1 : _v = SWIG_CheckState(res);
11196 : }
11197 1 : if (_v) {
11198 : {
11199 1 : int res = SWIG_AsVal_int(argv[3], NULL);
11200 1 : _v = SWIG_CheckState(res);
11201 : }
11202 1 : if (_v) {
11203 : {
11204 1 : int res = SWIG_AsVal_int(argv[4], NULL);
11205 1 : _v = SWIG_CheckState(res);
11206 : }
11207 1 : if (_v) {
11208 : {
11209 1 : int res = SWIG_AsVal_int(argv[5], NULL);
11210 1 : _v = SWIG_CheckState(res);
11211 : }
11212 1 : if (_v) {
11213 : {
11214 1 : int res = SWIG_AsVal_int(argv[6], NULL);
11215 1 : _v = SWIG_CheckState(res);
11216 : }
11217 1 : if (_v) {
11218 : {
11219 1 : int res = SWIG_AsVal_int(argv[7], NULL);
11220 1 : _v = SWIG_CheckState(res);
11221 : }
11222 1 : if (_v) {
11223 : {
11224 1 : int res = SWIG_AsVal_int(argv[8], NULL);
11225 1 : _v = SWIG_CheckState(res);
11226 : }
11227 1 : if (_v) {
11228 1 : return _wrap_Feature_SetField__SWIG_7(self, args);
11229 : }
11230 : }
11231 : }
11232 : }
11233 : }
11234 : }
11235 : }
11236 : }
11237 : }
11238 : }
11239 :
11240 : fail:
11241 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_SetField'.\n"
11242 : " Possible C/C++ prototypes are:\n"
11243 : " SetField(OGRFeatureShadow *,int,char const *)\n"
11244 : " SetField(OGRFeatureShadow *,char const *,char const *)\n"
11245 : " SetField(OGRFeatureShadow *,int,int)\n"
11246 : " SetField(OGRFeatureShadow *,char const *,int)\n"
11247 : " SetField(OGRFeatureShadow *,int,double)\n"
11248 : " SetField(OGRFeatureShadow *,char const *,double)\n"
11249 : " SetField(OGRFeatureShadow *,int,int,int,int,int,int,int,int)\n"
11250 0 : " SetField(OGRFeatureShadow *,char const *,int,int,int,int,int,int,int)\n");
11251 0 : return NULL;
11252 : }
11253 :
11254 :
11255 6 : SWIGINTERN PyObject *_wrap_Feature_SetFieldIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11256 6 : PyObject *resultobj = 0;
11257 6 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11258 : int arg2 ;
11259 : int arg3 ;
11260 6 : int *arg4 = (int *) 0 ;
11261 6 : void *argp1 = 0 ;
11262 6 : int res1 = 0 ;
11263 : int val2 ;
11264 6 : int ecode2 = 0 ;
11265 6 : PyObject * obj0 = 0 ;
11266 6 : PyObject * obj1 = 0 ;
11267 6 : PyObject * obj2 = 0 ;
11268 :
11269 6 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldIntegerList",&obj0,&obj1,&obj2)) SWIG_fail;
11270 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11271 6 : if (!SWIG_IsOK(res1)) {
11272 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11273 : }
11274 6 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11275 6 : ecode2 = SWIG_AsVal_int(obj1, &val2);
11276 6 : if (!SWIG_IsOK(ecode2)) {
11277 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldIntegerList" "', argument " "2"" of type '" "int""'");
11278 : }
11279 6 : arg2 = static_cast< int >(val2);
11280 : {
11281 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
11282 : /* check if is List */
11283 6 : if ( !PySequence_Check(obj2) ) {
11284 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
11285 0 : SWIG_fail;
11286 : }
11287 6 : arg3 = PySequence_Size(obj2);
11288 6 : arg4 = (int*) malloc(arg3*sizeof(int));
11289 17 : for( int i = 0; i<arg3; i++ ) {
11290 11 : PyObject *o = PySequence_GetItem(obj2,i);
11291 11 : if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
11292 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
11293 0 : Py_DECREF(o);
11294 : SWIG_fail;
11295 : }
11296 11 : Py_DECREF(o);
11297 : }
11298 : }
11299 : {
11300 6 : if ( bUseExceptions ) {
11301 0 : CPLErrorReset();
11302 : }
11303 : OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
11304 6 : if ( bUseExceptions ) {
11305 0 : CPLErr eclass = CPLGetLastErrorType();
11306 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11307 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11308 : }
11309 : }
11310 : }
11311 6 : resultobj = SWIG_Py_Void();
11312 : {
11313 : /* %typemap(freearg) (int nList, int* pList) */
11314 6 : if (arg4) {
11315 6 : free((void*) arg4);
11316 : }
11317 : }
11318 6 : return resultobj;
11319 : fail:
11320 : {
11321 : /* %typemap(freearg) (int nList, int* pList) */
11322 0 : if (arg4) {
11323 0 : free((void*) arg4);
11324 : }
11325 : }
11326 0 : return NULL;
11327 : }
11328 :
11329 :
11330 29 : SWIGINTERN PyObject *_wrap_Feature_SetFieldDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11331 29 : PyObject *resultobj = 0;
11332 29 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11333 : int arg2 ;
11334 : int arg3 ;
11335 29 : double *arg4 = (double *) 0 ;
11336 29 : void *argp1 = 0 ;
11337 29 : int res1 = 0 ;
11338 : int val2 ;
11339 29 : int ecode2 = 0 ;
11340 29 : PyObject * obj0 = 0 ;
11341 29 : PyObject * obj1 = 0 ;
11342 29 : PyObject * obj2 = 0 ;
11343 :
11344 29 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldDoubleList",&obj0,&obj1,&obj2)) SWIG_fail;
11345 29 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11346 29 : if (!SWIG_IsOK(res1)) {
11347 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11348 : }
11349 29 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11350 29 : ecode2 = SWIG_AsVal_int(obj1, &val2);
11351 29 : if (!SWIG_IsOK(ecode2)) {
11352 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldDoubleList" "', argument " "2"" of type '" "int""'");
11353 : }
11354 29 : arg2 = static_cast< int >(val2);
11355 : {
11356 : /* %typemap(in,numinputs=1) (int nList, double* pList)*/
11357 : /* check if is List */
11358 29 : if ( !PySequence_Check(obj2) ) {
11359 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
11360 0 : SWIG_fail;
11361 : }
11362 29 : arg3 = PySequence_Size(obj2);
11363 29 : arg4 = (double*) malloc(arg3*sizeof(double));
11364 87 : for( int i = 0; i<arg3; i++ ) {
11365 58 : PyObject *o = PySequence_GetItem(obj2,i);
11366 58 : if ( !PyArg_Parse(o,"d",&arg4[i]) ) {
11367 0 : PyErr_SetString(PyExc_TypeError, "not a number");
11368 0 : Py_DECREF(o);
11369 : SWIG_fail;
11370 : }
11371 58 : Py_DECREF(o);
11372 : }
11373 : }
11374 : {
11375 29 : if ( bUseExceptions ) {
11376 0 : CPLErrorReset();
11377 : }
11378 : OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
11379 29 : if ( bUseExceptions ) {
11380 0 : CPLErr eclass = CPLGetLastErrorType();
11381 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11382 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11383 : }
11384 : }
11385 : }
11386 29 : resultobj = SWIG_Py_Void();
11387 : {
11388 : /* %typemap(freearg) (int nList, double* pList) */
11389 29 : if (arg4) {
11390 29 : free((void*) arg4);
11391 : }
11392 : }
11393 29 : return resultobj;
11394 : fail:
11395 : {
11396 : /* %typemap(freearg) (int nList, double* pList) */
11397 0 : if (arg4) {
11398 0 : free((void*) arg4);
11399 : }
11400 : }
11401 0 : return NULL;
11402 : }
11403 :
11404 :
11405 14 : SWIGINTERN PyObject *_wrap_Feature_SetFieldStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11406 14 : PyObject *resultobj = 0;
11407 14 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11408 : int arg2 ;
11409 14 : char **arg3 = (char **) 0 ;
11410 14 : void *argp1 = 0 ;
11411 14 : int res1 = 0 ;
11412 : int val2 ;
11413 14 : int ecode2 = 0 ;
11414 14 : PyObject * obj0 = 0 ;
11415 14 : PyObject * obj1 = 0 ;
11416 14 : PyObject * obj2 = 0 ;
11417 :
11418 14 : if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldStringList",&obj0,&obj1,&obj2)) SWIG_fail;
11419 14 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11420 14 : if (!SWIG_IsOK(res1)) {
11421 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11422 : }
11423 14 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11424 14 : ecode2 = SWIG_AsVal_int(obj1, &val2);
11425 14 : if (!SWIG_IsOK(ecode2)) {
11426 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
11427 : }
11428 14 : arg2 = static_cast< int >(val2);
11429 : {
11430 : /* %typemap(in) char **options */
11431 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
11432 14 : if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
11433 : #if PY_VERSION_HEX < 0x03000000
11434 : || PyString_Check(obj2)
11435 : #endif
11436 : ) {
11437 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
11438 0 : SWIG_fail;
11439 : }
11440 :
11441 14 : int size = PySequence_Size(obj2);
11442 43 : for (int i = 0; i < size; i++) {
11443 29 : PyObject* pyObj = PySequence_GetItem(obj2,i);
11444 29 : if (PyUnicode_Check(pyObj))
11445 : {
11446 : char *pszStr;
11447 : Py_ssize_t nLen;
11448 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
11449 : #if PY_VERSION_HEX >= 0x03000000
11450 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
11451 : #else
11452 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
11453 : #endif
11454 0 : arg3 = CSLAddString( arg3, pszStr );
11455 0 : Py_XDECREF(pyUTF8Str);
11456 : }
11457 : #if PY_VERSION_HEX >= 0x03000000
11458 : else if (PyBytes_Check(pyObj))
11459 : arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
11460 : #else
11461 29 : else if (PyString_Check(pyObj))
11462 29 : arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
11463 : #endif
11464 : else
11465 : {
11466 0 : Py_DECREF(pyObj);
11467 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
11468 0 : SWIG_fail;
11469 : }
11470 29 : Py_DECREF(pyObj);
11471 : }
11472 : }
11473 : {
11474 14 : if ( bUseExceptions ) {
11475 0 : CPLErrorReset();
11476 : }
11477 : OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
11478 14 : if ( bUseExceptions ) {
11479 0 : CPLErr eclass = CPLGetLastErrorType();
11480 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11481 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11482 : }
11483 : }
11484 : }
11485 14 : resultobj = SWIG_Py_Void();
11486 : {
11487 : /* %typemap(freearg) char **options */
11488 14 : CSLDestroy( arg3 );
11489 : }
11490 14 : return resultobj;
11491 : fail:
11492 : {
11493 : /* %typemap(freearg) char **options */
11494 0 : CSLDestroy( arg3 );
11495 : }
11496 0 : return NULL;
11497 : }
11498 :
11499 :
11500 241 : SWIGINTERN PyObject *_wrap_Feature_SetFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11501 241 : PyObject *resultobj = 0;
11502 241 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11503 241 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
11504 241 : int arg3 = (int) 1 ;
11505 241 : void *argp1 = 0 ;
11506 241 : int res1 = 0 ;
11507 241 : void *argp2 = 0 ;
11508 241 : int res2 = 0 ;
11509 : int val3 ;
11510 241 : int ecode3 = 0 ;
11511 241 : PyObject * obj0 = 0 ;
11512 241 : PyObject * obj1 = 0 ;
11513 241 : PyObject * obj2 = 0 ;
11514 : char * kwnames[] = {
11515 : (char *) "self",(char *) "other",(char *) "forgiving", NULL
11516 241 : };
11517 : OGRErr result;
11518 :
11519 241 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Feature_SetFrom",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
11520 241 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11521 241 : if (!SWIG_IsOK(res1)) {
11522 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFrom" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11523 : }
11524 241 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11525 241 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11526 241 : if (!SWIG_IsOK(res2)) {
11527 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFrom" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
11528 : }
11529 241 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
11530 241 : if (obj2) {
11531 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
11532 0 : if (!SWIG_IsOK(ecode3)) {
11533 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFrom" "', argument " "3"" of type '" "int""'");
11534 : }
11535 0 : arg3 = static_cast< int >(val3);
11536 : }
11537 : {
11538 241 : if (!arg2) {
11539 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11540 : }
11541 : }
11542 : {
11543 241 : if ( bUseExceptions ) {
11544 0 : CPLErrorReset();
11545 : }
11546 241 : result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
11547 241 : if ( bUseExceptions ) {
11548 0 : CPLErr eclass = CPLGetLastErrorType();
11549 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11550 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11551 : }
11552 : }
11553 : }
11554 : {
11555 : /* %typemap(out) OGRErr */
11556 241 : if ( result != 0 && bUseExceptions) {
11557 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11558 0 : SWIG_fail;
11559 : }
11560 : }
11561 : {
11562 : /* %typemap(ret) OGRErr */
11563 241 : if (resultobj == Py_None ) {
11564 0 : Py_DECREF(resultobj);
11565 0 : resultobj = 0;
11566 : }
11567 241 : if (resultobj == 0) {
11568 241 : resultobj = PyInt_FromLong( result );
11569 : }
11570 : }
11571 241 : return resultobj;
11572 : fail:
11573 0 : return NULL;
11574 : }
11575 :
11576 :
11577 381 : SWIGINTERN PyObject *_wrap_Feature_SetFromWithMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11578 381 : PyObject *resultobj = 0;
11579 381 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11580 381 : OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
11581 : int arg3 ;
11582 : int arg4 ;
11583 381 : int *arg5 = (int *) 0 ;
11584 381 : void *argp1 = 0 ;
11585 381 : int res1 = 0 ;
11586 381 : void *argp2 = 0 ;
11587 381 : int res2 = 0 ;
11588 : int val3 ;
11589 381 : int ecode3 = 0 ;
11590 381 : PyObject * obj0 = 0 ;
11591 381 : PyObject * obj1 = 0 ;
11592 381 : PyObject * obj2 = 0 ;
11593 381 : PyObject * obj3 = 0 ;
11594 : OGRErr result;
11595 :
11596 381 : if (!PyArg_ParseTuple(args,(char *)"OOOO:Feature_SetFromWithMap",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
11597 381 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11598 381 : if (!SWIG_IsOK(res1)) {
11599 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFromWithMap" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11600 : }
11601 381 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11602 381 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11603 381 : if (!SWIG_IsOK(res2)) {
11604 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFromWithMap" "', argument " "2"" of type '" "OGRFeatureShadow *""'");
11605 : }
11606 381 : arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
11607 381 : ecode3 = SWIG_AsVal_int(obj2, &val3);
11608 381 : if (!SWIG_IsOK(ecode3)) {
11609 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFromWithMap" "', argument " "3"" of type '" "int""'");
11610 : }
11611 381 : arg3 = static_cast< int >(val3);
11612 : {
11613 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
11614 : /* check if is List */
11615 381 : if ( !PySequence_Check(obj3) ) {
11616 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
11617 0 : SWIG_fail;
11618 : }
11619 381 : arg4 = PySequence_Size(obj3);
11620 381 : arg5 = (int*) malloc(arg4*sizeof(int));
11621 1503 : for( int i = 0; i<arg4; i++ ) {
11622 1122 : PyObject *o = PySequence_GetItem(obj3,i);
11623 1122 : if ( !PyArg_Parse(o,"i",&arg5[i]) ) {
11624 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
11625 0 : Py_DECREF(o);
11626 : SWIG_fail;
11627 : }
11628 1122 : Py_DECREF(o);
11629 : }
11630 : }
11631 : {
11632 381 : if (!arg2) {
11633 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11634 : }
11635 : }
11636 : {
11637 381 : if ( bUseExceptions ) {
11638 0 : CPLErrorReset();
11639 : }
11640 381 : result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
11641 381 : if ( bUseExceptions ) {
11642 0 : CPLErr eclass = CPLGetLastErrorType();
11643 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11644 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11645 : }
11646 : }
11647 : }
11648 : {
11649 : /* %typemap(out) OGRErr */
11650 381 : if ( result != 0 && bUseExceptions) {
11651 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11652 0 : SWIG_fail;
11653 : }
11654 : }
11655 : {
11656 : /* %typemap(freearg) (int nList, int* pList) */
11657 381 : if (arg5) {
11658 381 : free((void*) arg5);
11659 : }
11660 : }
11661 : {
11662 : /* %typemap(ret) OGRErr */
11663 381 : if (resultobj == Py_None ) {
11664 0 : Py_DECREF(resultobj);
11665 0 : resultobj = 0;
11666 : }
11667 381 : if (resultobj == 0) {
11668 381 : resultobj = PyInt_FromLong( result );
11669 : }
11670 : }
11671 381 : return resultobj;
11672 : fail:
11673 : {
11674 : /* %typemap(freearg) (int nList, int* pList) */
11675 0 : if (arg5) {
11676 0 : free((void*) arg5);
11677 : }
11678 : }
11679 0 : return NULL;
11680 : }
11681 :
11682 :
11683 89 : SWIGINTERN PyObject *_wrap_Feature_GetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11684 89 : PyObject *resultobj = 0;
11685 89 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11686 89 : void *argp1 = 0 ;
11687 89 : int res1 = 0 ;
11688 89 : PyObject * obj0 = 0 ;
11689 89 : char *result = 0 ;
11690 :
11691 89 : if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetStyleString",&obj0)) SWIG_fail;
11692 89 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11693 89 : if (!SWIG_IsOK(res1)) {
11694 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11695 : }
11696 89 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11697 : {
11698 89 : if ( bUseExceptions ) {
11699 0 : CPLErrorReset();
11700 : }
11701 89 : result = (char *)OGRFeatureShadow_GetStyleString(arg1);
11702 89 : if ( bUseExceptions ) {
11703 0 : CPLErr eclass = CPLGetLastErrorType();
11704 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11705 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11706 : }
11707 : }
11708 : }
11709 89 : resultobj = SWIG_FromCharPtr((const char *)result);
11710 89 : return resultobj;
11711 : fail:
11712 0 : return NULL;
11713 : }
11714 :
11715 :
11716 35 : SWIGINTERN PyObject *_wrap_Feature_SetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11717 35 : PyObject *resultobj = 0;
11718 35 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11719 35 : char *arg2 = (char *) 0 ;
11720 35 : void *argp1 = 0 ;
11721 35 : int res1 = 0 ;
11722 : int res2 ;
11723 35 : char *buf2 = 0 ;
11724 35 : int alloc2 = 0 ;
11725 35 : PyObject * obj0 = 0 ;
11726 35 : PyObject * obj1 = 0 ;
11727 :
11728 35 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetStyleString",&obj0,&obj1)) SWIG_fail;
11729 35 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11730 35 : if (!SWIG_IsOK(res1)) {
11731 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11732 : }
11733 35 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11734 35 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11735 35 : if (!SWIG_IsOK(res2)) {
11736 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetStyleString" "', argument " "2"" of type '" "char const *""'");
11737 : }
11738 35 : arg2 = reinterpret_cast< char * >(buf2);
11739 : {
11740 35 : if ( bUseExceptions ) {
11741 0 : CPLErrorReset();
11742 : }
11743 : OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
11744 35 : if ( bUseExceptions ) {
11745 0 : CPLErr eclass = CPLGetLastErrorType();
11746 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11747 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11748 : }
11749 : }
11750 : }
11751 35 : resultobj = SWIG_Py_Void();
11752 35 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11753 35 : return resultobj;
11754 : fail:
11755 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11756 0 : return NULL;
11757 : }
11758 :
11759 :
11760 4136 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11761 4136 : PyObject *resultobj = 0;
11762 4136 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11763 : int arg2 ;
11764 4136 : void *argp1 = 0 ;
11765 4136 : int res1 = 0 ;
11766 : int val2 ;
11767 4136 : int ecode2 = 0 ;
11768 4136 : PyObject * obj0 = 0 ;
11769 4136 : PyObject * obj1 = 0 ;
11770 : OGRFieldType result;
11771 :
11772 4136 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
11773 4136 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11774 4136 : if (!SWIG_IsOK(res1)) {
11775 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11776 : }
11777 4136 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11778 4136 : ecode2 = SWIG_AsVal_int(obj1, &val2);
11779 4136 : if (!SWIG_IsOK(ecode2)) {
11780 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "int""'");
11781 : }
11782 4136 : arg2 = static_cast< int >(val2);
11783 : {
11784 4136 : if ( bUseExceptions ) {
11785 0 : CPLErrorReset();
11786 : }
11787 4136 : result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
11788 4136 : if ( bUseExceptions ) {
11789 0 : CPLErr eclass = CPLGetLastErrorType();
11790 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11791 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11792 : }
11793 : }
11794 : }
11795 8272 : resultobj = SWIG_From_int(static_cast< int >(result));
11796 4136 : return resultobj;
11797 : fail:
11798 0 : return NULL;
11799 : }
11800 :
11801 :
11802 0 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11803 0 : PyObject *resultobj = 0;
11804 0 : OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
11805 0 : char *arg2 = (char *) 0 ;
11806 0 : void *argp1 = 0 ;
11807 0 : int res1 = 0 ;
11808 : int res2 ;
11809 0 : char *buf2 = 0 ;
11810 0 : int alloc2 = 0 ;
11811 0 : PyObject * obj0 = 0 ;
11812 0 : PyObject * obj1 = 0 ;
11813 : OGRFieldType result;
11814 :
11815 0 : if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
11816 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 | 0 );
11817 0 : if (!SWIG_IsOK(res1)) {
11818 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'");
11819 : }
11820 0 : arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
11821 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11822 0 : if (!SWIG_IsOK(res2)) {
11823 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "char const *""'");
11824 : }
11825 0 : arg2 = reinterpret_cast< char * >(buf2);
11826 : {
11827 0 : if (!arg2) {
11828 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11829 : }
11830 : }
11831 : {
11832 0 : if ( bUseExceptions ) {
11833 0 : CPLErrorReset();
11834 : }
11835 0 : result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
11836 0 : if ( bUseExceptions ) {
11837 0 : CPLErr eclass = CPLGetLastErrorType();
11838 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11839 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11840 : }
11841 : }
11842 : }
11843 0 : resultobj = SWIG_From_int(static_cast< int >(result));
11844 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11845 0 : return resultobj;
11846 : fail:
11847 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11848 0 : return NULL;
11849 : }
11850 :
11851 :
11852 4136 : SWIGINTERN PyObject *_wrap_Feature_GetFieldType(PyObject *self, PyObject *args) {
11853 : int argc;
11854 : PyObject *argv[3];
11855 : int ii;
11856 :
11857 4136 : if (!PyTuple_Check(args)) SWIG_fail;
11858 4136 : argc = (int)PyObject_Length(args);
11859 12408 : for (ii = 0; (ii < argc) && (ii < 2); ii++) {
11860 8272 : argv[ii] = PyTuple_GET_ITEM(args,ii);
11861 : }
11862 4136 : if (argc == 2) {
11863 : int _v;
11864 4136 : void *vptr = 0;
11865 4136 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11866 4136 : _v = SWIG_CheckState(res);
11867 4136 : if (_v) {
11868 : {
11869 4136 : int res = SWIG_AsVal_int(argv[1], NULL);
11870 4136 : _v = SWIG_CheckState(res);
11871 : }
11872 4136 : if (_v) {
11873 4136 : return _wrap_Feature_GetFieldType__SWIG_0(self, args);
11874 : }
11875 : }
11876 : }
11877 0 : if (argc == 2) {
11878 : int _v;
11879 0 : void *vptr = 0;
11880 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
11881 0 : _v = SWIG_CheckState(res);
11882 0 : if (_v) {
11883 0 : int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
11884 0 : _v = SWIG_CheckState(res);
11885 0 : if (_v) {
11886 0 : return _wrap_Feature_GetFieldType__SWIG_1(self, args);
11887 : }
11888 : }
11889 : }
11890 :
11891 : fail:
11892 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldType'.\n"
11893 : " Possible C/C++ prototypes are:\n"
11894 : " GetFieldType(OGRFeatureShadow *,int)\n"
11895 0 : " GetFieldType(OGRFeatureShadow *,char const *)\n");
11896 0 : return NULL;
11897 : }
11898 :
11899 :
11900 2 : SWIGINTERN PyObject *Feature_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11901 : PyObject *obj;
11902 2 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
11903 2 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureShadow, SWIG_NewClientData(obj));
11904 2 : return SWIG_Py_Void();
11905 : }
11906 :
11907 24 : SWIGINTERN PyObject *_wrap_delete_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11908 24 : PyObject *resultobj = 0;
11909 24 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
11910 24 : void *argp1 = 0 ;
11911 24 : int res1 = 0 ;
11912 24 : PyObject * obj0 = 0 ;
11913 :
11914 24 : if (!PyArg_ParseTuple(args,(char *)"O:delete_FeatureDefn",&obj0)) SWIG_fail;
11915 24 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_DISOWN | 0 );
11916 24 : if (!SWIG_IsOK(res1)) {
11917 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FeatureDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
11918 : }
11919 24 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
11920 : {
11921 24 : if ( bUseExceptions ) {
11922 0 : CPLErrorReset();
11923 : }
11924 : delete_OGRFeatureDefnShadow(arg1);
11925 24 : if ( bUseExceptions ) {
11926 0 : CPLErr eclass = CPLGetLastErrorType();
11927 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11928 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11929 : }
11930 : }
11931 : }
11932 24 : resultobj = SWIG_Py_Void();
11933 24 : return resultobj;
11934 : fail:
11935 0 : return NULL;
11936 : }
11937 :
11938 :
11939 24 : SWIGINTERN PyObject *_wrap_new_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11940 24 : PyObject *resultobj = 0;
11941 24 : char *arg1 = (char *) NULL ;
11942 : int res1 ;
11943 24 : char *buf1 = 0 ;
11944 24 : int alloc1 = 0 ;
11945 24 : PyObject * obj0 = 0 ;
11946 : char * kwnames[] = {
11947 : (char *) "name_null_ok", NULL
11948 24 : };
11949 24 : OGRFeatureDefnShadow *result = 0 ;
11950 :
11951 24 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_FeatureDefn",kwnames,&obj0)) SWIG_fail;
11952 24 : if (obj0) {
11953 20 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
11954 20 : if (!SWIG_IsOK(res1)) {
11955 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureDefn" "', argument " "1"" of type '" "char const *""'");
11956 : }
11957 20 : arg1 = reinterpret_cast< char * >(buf1);
11958 : }
11959 : {
11960 24 : if ( bUseExceptions ) {
11961 0 : CPLErrorReset();
11962 : }
11963 24 : result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
11964 24 : if ( bUseExceptions ) {
11965 0 : CPLErr eclass = CPLGetLastErrorType();
11966 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11967 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11968 : }
11969 : }
11970 : }
11971 24 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_NEW | 0 );
11972 24 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
11973 24 : return resultobj;
11974 : fail:
11975 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
11976 0 : return NULL;
11977 : }
11978 :
11979 :
11980 114 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11981 114 : PyObject *resultobj = 0;
11982 114 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
11983 114 : void *argp1 = 0 ;
11984 114 : int res1 = 0 ;
11985 114 : PyObject * obj0 = 0 ;
11986 114 : char *result = 0 ;
11987 :
11988 114 : if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetName",&obj0)) SWIG_fail;
11989 114 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
11990 114 : if (!SWIG_IsOK(res1)) {
11991 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetName" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
11992 : }
11993 114 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
11994 : {
11995 114 : if ( bUseExceptions ) {
11996 0 : CPLErrorReset();
11997 : }
11998 114 : result = (char *)OGRFeatureDefnShadow_GetName(arg1);
11999 114 : if ( bUseExceptions ) {
12000 0 : CPLErr eclass = CPLGetLastErrorType();
12001 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12002 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12003 : }
12004 : }
12005 : }
12006 114 : resultobj = SWIG_FromCharPtr((const char *)result);
12007 114 : return resultobj;
12008 : fail:
12009 0 : return NULL;
12010 : }
12011 :
12012 :
12013 418 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12014 418 : PyObject *resultobj = 0;
12015 418 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12016 418 : void *argp1 = 0 ;
12017 418 : int res1 = 0 ;
12018 418 : PyObject * obj0 = 0 ;
12019 : int result;
12020 :
12021 418 : if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetFieldCount",&obj0)) SWIG_fail;
12022 418 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12023 418 : if (!SWIG_IsOK(res1)) {
12024 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12025 : }
12026 418 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12027 : {
12028 418 : if ( bUseExceptions ) {
12029 0 : CPLErrorReset();
12030 : }
12031 418 : result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
12032 418 : if ( bUseExceptions ) {
12033 0 : CPLErr eclass = CPLGetLastErrorType();
12034 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12035 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12036 : }
12037 : }
12038 : }
12039 418 : resultobj = SWIG_From_int(static_cast< int >(result));
12040 418 : return resultobj;
12041 : fail:
12042 0 : return NULL;
12043 : }
12044 :
12045 :
12046 1294 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12047 1294 : PyObject *resultobj = 0;
12048 1294 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12049 : int arg2 ;
12050 1294 : void *argp1 = 0 ;
12051 1294 : int res1 = 0 ;
12052 : int val2 ;
12053 1294 : int ecode2 = 0 ;
12054 1294 : PyObject * obj0 = 0 ;
12055 1294 : PyObject * obj1 = 0 ;
12056 1294 : OGRFieldDefnShadow *result = 0 ;
12057 :
12058 1294 : if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldDefn",&obj0,&obj1)) SWIG_fail;
12059 1294 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12060 1294 : if (!SWIG_IsOK(res1)) {
12061 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12062 : }
12063 1294 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12064 1294 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12065 1294 : if (!SWIG_IsOK(ecode2)) {
12066 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "2"" of type '" "int""'");
12067 : }
12068 1294 : arg2 = static_cast< int >(val2);
12069 : {
12070 1294 : if ( bUseExceptions ) {
12071 0 : CPLErrorReset();
12072 : }
12073 1294 : result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
12074 1294 : if ( bUseExceptions ) {
12075 0 : CPLErr eclass = CPLGetLastErrorType();
12076 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12077 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12078 : }
12079 : }
12080 : }
12081 1294 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12082 1294 : return resultobj;
12083 : fail:
12084 0 : return NULL;
12085 : }
12086 :
12087 :
12088 836 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12089 836 : PyObject *resultobj = 0;
12090 836 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12091 836 : char *arg2 = (char *) 0 ;
12092 836 : void *argp1 = 0 ;
12093 836 : int res1 = 0 ;
12094 : int res2 ;
12095 836 : char *buf2 = 0 ;
12096 836 : int alloc2 = 0 ;
12097 836 : PyObject * obj0 = 0 ;
12098 836 : PyObject * obj1 = 0 ;
12099 : int result;
12100 :
12101 836 : if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
12102 836 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12103 836 : if (!SWIG_IsOK(res1)) {
12104 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12105 : }
12106 836 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12107 836 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12108 836 : if (!SWIG_IsOK(res2)) {
12109 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "2"" of type '" "char const *""'");
12110 : }
12111 836 : arg2 = reinterpret_cast< char * >(buf2);
12112 : {
12113 836 : if (!arg2) {
12114 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12115 : }
12116 : }
12117 : {
12118 836 : if ( bUseExceptions ) {
12119 0 : CPLErrorReset();
12120 : }
12121 836 : result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
12122 836 : if ( bUseExceptions ) {
12123 0 : CPLErr eclass = CPLGetLastErrorType();
12124 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12125 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12126 : }
12127 : }
12128 : }
12129 836 : resultobj = SWIG_From_int(static_cast< int >(result));
12130 836 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12131 836 : return resultobj;
12132 : fail:
12133 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12134 0 : return NULL;
12135 : }
12136 :
12137 :
12138 210 : SWIGINTERN PyObject *_wrap_FeatureDefn_AddFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12139 210 : PyObject *resultobj = 0;
12140 210 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12141 210 : OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
12142 210 : void *argp1 = 0 ;
12143 210 : int res1 = 0 ;
12144 210 : void *argp2 = 0 ;
12145 210 : int res2 = 0 ;
12146 210 : PyObject * obj0 = 0 ;
12147 210 : PyObject * obj1 = 0 ;
12148 :
12149 210 : if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_AddFieldDefn",&obj0,&obj1)) SWIG_fail;
12150 210 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12151 210 : if (!SWIG_IsOK(res1)) {
12152 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12153 : }
12154 210 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12155 210 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12156 210 : if (!SWIG_IsOK(res2)) {
12157 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'");
12158 : }
12159 210 : arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
12160 : {
12161 210 : if (!arg2) {
12162 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12163 : }
12164 : }
12165 : {
12166 210 : if ( bUseExceptions ) {
12167 0 : CPLErrorReset();
12168 : }
12169 : OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
12170 210 : if ( bUseExceptions ) {
12171 0 : CPLErr eclass = CPLGetLastErrorType();
12172 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12173 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12174 : }
12175 : }
12176 : }
12177 210 : resultobj = SWIG_Py_Void();
12178 210 : return resultobj;
12179 : fail:
12180 0 : return NULL;
12181 : }
12182 :
12183 :
12184 135 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12185 135 : PyObject *resultobj = 0;
12186 135 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12187 135 : void *argp1 = 0 ;
12188 135 : int res1 = 0 ;
12189 135 : PyObject * obj0 = 0 ;
12190 : OGRwkbGeometryType result;
12191 :
12192 135 : if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetGeomType",&obj0)) SWIG_fail;
12193 135 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12194 135 : if (!SWIG_IsOK(res1)) {
12195 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12196 : }
12197 135 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12198 : {
12199 135 : if ( bUseExceptions ) {
12200 0 : CPLErrorReset();
12201 : }
12202 135 : result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
12203 135 : if ( bUseExceptions ) {
12204 0 : CPLErr eclass = CPLGetLastErrorType();
12205 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12206 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12207 : }
12208 : }
12209 : }
12210 270 : resultobj = SWIG_From_int(static_cast< int >(result));
12211 135 : return resultobj;
12212 : fail:
12213 0 : return NULL;
12214 : }
12215 :
12216 :
12217 0 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12218 0 : PyObject *resultobj = 0;
12219 0 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12220 : OGRwkbGeometryType arg2 ;
12221 0 : void *argp1 = 0 ;
12222 0 : int res1 = 0 ;
12223 : int val2 ;
12224 0 : int ecode2 = 0 ;
12225 0 : PyObject * obj0 = 0 ;
12226 0 : PyObject * obj1 = 0 ;
12227 :
12228 0 : if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetGeomType",&obj0,&obj1)) SWIG_fail;
12229 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12230 0 : if (!SWIG_IsOK(res1)) {
12231 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12232 : }
12233 0 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12234 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12235 0 : if (!SWIG_IsOK(ecode2)) {
12236 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeomType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
12237 : }
12238 0 : arg2 = static_cast< OGRwkbGeometryType >(val2);
12239 : {
12240 0 : if ( bUseExceptions ) {
12241 0 : CPLErrorReset();
12242 : }
12243 : OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
12244 0 : if ( bUseExceptions ) {
12245 0 : CPLErr eclass = CPLGetLastErrorType();
12246 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12247 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12248 : }
12249 : }
12250 : }
12251 0 : resultobj = SWIG_Py_Void();
12252 0 : return resultobj;
12253 : fail:
12254 0 : return NULL;
12255 : }
12256 :
12257 :
12258 0 : SWIGINTERN PyObject *_wrap_FeatureDefn_GetReferenceCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12259 0 : PyObject *resultobj = 0;
12260 0 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12261 0 : void *argp1 = 0 ;
12262 0 : int res1 = 0 ;
12263 0 : PyObject * obj0 = 0 ;
12264 : int result;
12265 :
12266 0 : if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetReferenceCount",&obj0)) SWIG_fail;
12267 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12268 0 : if (!SWIG_IsOK(res1)) {
12269 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetReferenceCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12270 : }
12271 0 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12272 : {
12273 0 : if ( bUseExceptions ) {
12274 0 : CPLErrorReset();
12275 : }
12276 0 : result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
12277 0 : if ( bUseExceptions ) {
12278 0 : CPLErr eclass = CPLGetLastErrorType();
12279 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12280 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12281 : }
12282 : }
12283 : }
12284 0 : resultobj = SWIG_From_int(static_cast< int >(result));
12285 0 : return resultobj;
12286 : fail:
12287 0 : return NULL;
12288 : }
12289 :
12290 :
12291 6 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12292 6 : PyObject *resultobj = 0;
12293 6 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12294 6 : void *argp1 = 0 ;
12295 6 : int res1 = 0 ;
12296 6 : PyObject * obj0 = 0 ;
12297 : int result;
12298 :
12299 6 : if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_IsGeometryIgnored",&obj0)) SWIG_fail;
12300 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12301 6 : if (!SWIG_IsOK(res1)) {
12302 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12303 : }
12304 6 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12305 : {
12306 6 : if ( bUseExceptions ) {
12307 0 : CPLErrorReset();
12308 : }
12309 6 : result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
12310 6 : if ( bUseExceptions ) {
12311 0 : CPLErr eclass = CPLGetLastErrorType();
12312 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12313 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12314 : }
12315 : }
12316 : }
12317 6 : resultobj = SWIG_From_int(static_cast< int >(result));
12318 6 : return resultobj;
12319 : fail:
12320 0 : return NULL;
12321 : }
12322 :
12323 :
12324 3 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12325 3 : PyObject *resultobj = 0;
12326 3 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12327 : int arg2 ;
12328 3 : void *argp1 = 0 ;
12329 3 : int res1 = 0 ;
12330 : int val2 ;
12331 3 : int ecode2 = 0 ;
12332 3 : PyObject * obj0 = 0 ;
12333 3 : PyObject * obj1 = 0 ;
12334 :
12335 3 : if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetGeometryIgnored",&obj0,&obj1)) SWIG_fail;
12336 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12337 3 : if (!SWIG_IsOK(res1)) {
12338 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12339 : }
12340 3 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12341 3 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12342 3 : if (!SWIG_IsOK(ecode2)) {
12343 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "2"" of type '" "int""'");
12344 : }
12345 3 : arg2 = static_cast< int >(val2);
12346 : {
12347 3 : if ( bUseExceptions ) {
12348 0 : CPLErrorReset();
12349 : }
12350 : OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
12351 3 : if ( bUseExceptions ) {
12352 0 : CPLErr eclass = CPLGetLastErrorType();
12353 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12354 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12355 : }
12356 : }
12357 : }
12358 3 : resultobj = SWIG_Py_Void();
12359 3 : return resultobj;
12360 : fail:
12361 0 : return NULL;
12362 : }
12363 :
12364 :
12365 3 : SWIGINTERN PyObject *_wrap_FeatureDefn_IsStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12366 3 : PyObject *resultobj = 0;
12367 3 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12368 3 : void *argp1 = 0 ;
12369 3 : int res1 = 0 ;
12370 3 : PyObject * obj0 = 0 ;
12371 : int result;
12372 :
12373 3 : if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_IsStyleIgnored",&obj0)) SWIG_fail;
12374 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12375 3 : if (!SWIG_IsOK(res1)) {
12376 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12377 : }
12378 3 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12379 : {
12380 3 : if ( bUseExceptions ) {
12381 0 : CPLErrorReset();
12382 : }
12383 3 : result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
12384 3 : if ( bUseExceptions ) {
12385 0 : CPLErr eclass = CPLGetLastErrorType();
12386 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12387 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12388 : }
12389 : }
12390 : }
12391 3 : resultobj = SWIG_From_int(static_cast< int >(result));
12392 3 : return resultobj;
12393 : fail:
12394 0 : return NULL;
12395 : }
12396 :
12397 :
12398 0 : SWIGINTERN PyObject *_wrap_FeatureDefn_SetStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12399 0 : PyObject *resultobj = 0;
12400 0 : OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
12401 : int arg2 ;
12402 0 : void *argp1 = 0 ;
12403 0 : int res1 = 0 ;
12404 : int val2 ;
12405 0 : int ecode2 = 0 ;
12406 0 : PyObject * obj0 = 0 ;
12407 0 : PyObject * obj1 = 0 ;
12408 :
12409 0 : if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetStyleIgnored",&obj0,&obj1)) SWIG_fail;
12410 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 | 0 );
12411 0 : if (!SWIG_IsOK(res1)) {
12412 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'");
12413 : }
12414 0 : arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
12415 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12416 0 : if (!SWIG_IsOK(ecode2)) {
12417 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "2"" of type '" "int""'");
12418 : }
12419 0 : arg2 = static_cast< int >(val2);
12420 : {
12421 0 : if ( bUseExceptions ) {
12422 0 : CPLErrorReset();
12423 : }
12424 : OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
12425 0 : if ( bUseExceptions ) {
12426 0 : CPLErr eclass = CPLGetLastErrorType();
12427 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12428 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12429 : }
12430 : }
12431 : }
12432 0 : resultobj = SWIG_Py_Void();
12433 0 : return resultobj;
12434 : fail:
12435 0 : return NULL;
12436 : }
12437 :
12438 :
12439 2 : SWIGINTERN PyObject *FeatureDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12440 : PyObject *obj;
12441 2 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
12442 2 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_NewClientData(obj));
12443 2 : return SWIG_Py_Void();
12444 : }
12445 :
12446 4724 : SWIGINTERN PyObject *_wrap_delete_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12447 4724 : PyObject *resultobj = 0;
12448 4724 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12449 4724 : void *argp1 = 0 ;
12450 4724 : int res1 = 0 ;
12451 4724 : PyObject * obj0 = 0 ;
12452 :
12453 4724 : if (!PyArg_ParseTuple(args,(char *)"O:delete_FieldDefn",&obj0)) SWIG_fail;
12454 4724 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_DISOWN | 0 );
12455 4724 : if (!SWIG_IsOK(res1)) {
12456 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDefn" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12457 : }
12458 4724 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12459 : {
12460 4724 : if ( bUseExceptions ) {
12461 0 : CPLErrorReset();
12462 : }
12463 : delete_OGRFieldDefnShadow(arg1);
12464 4724 : if ( bUseExceptions ) {
12465 0 : CPLErr eclass = CPLGetLastErrorType();
12466 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12467 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12468 : }
12469 : }
12470 : }
12471 4724 : resultobj = SWIG_Py_Void();
12472 4724 : return resultobj;
12473 : fail:
12474 0 : return NULL;
12475 : }
12476 :
12477 :
12478 4724 : SWIGINTERN PyObject *_wrap_new_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12479 4724 : PyObject *resultobj = 0;
12480 4724 : char *arg1 = (char *) "unnamed" ;
12481 4724 : OGRFieldType arg2 = (OGRFieldType) OFTString ;
12482 : int res1 ;
12483 4724 : char *buf1 = 0 ;
12484 4724 : int alloc1 = 0 ;
12485 : int val2 ;
12486 4724 : int ecode2 = 0 ;
12487 4724 : PyObject * obj0 = 0 ;
12488 4724 : PyObject * obj1 = 0 ;
12489 : char * kwnames[] = {
12490 : (char *) "name_null_ok",(char *) "field_type", NULL
12491 4724 : };
12492 4724 : OGRFieldDefnShadow *result = 0 ;
12493 :
12494 4724 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_FieldDefn",kwnames,&obj0,&obj1)) SWIG_fail;
12495 4724 : if (obj0) {
12496 4723 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
12497 4723 : if (!SWIG_IsOK(res1)) {
12498 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FieldDefn" "', argument " "1"" of type '" "char const *""'");
12499 : }
12500 4723 : arg1 = reinterpret_cast< char * >(buf1);
12501 : }
12502 4724 : if (obj1) {
12503 4711 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12504 4711 : if (!SWIG_IsOK(ecode2)) {
12505 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FieldDefn" "', argument " "2"" of type '" "OGRFieldType""'");
12506 : }
12507 4711 : arg2 = static_cast< OGRFieldType >(val2);
12508 : }
12509 : {
12510 4724 : if ( bUseExceptions ) {
12511 0 : CPLErrorReset();
12512 : }
12513 4724 : result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
12514 4724 : if ( bUseExceptions ) {
12515 0 : CPLErr eclass = CPLGetLastErrorType();
12516 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12517 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12518 : }
12519 : }
12520 : }
12521 4724 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_NEW | 0 );
12522 4724 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
12523 4724 : return resultobj;
12524 : fail:
12525 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
12526 0 : return NULL;
12527 : }
12528 :
12529 :
12530 258 : SWIGINTERN PyObject *_wrap_FieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12531 258 : PyObject *resultobj = 0;
12532 258 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12533 258 : void *argp1 = 0 ;
12534 258 : int res1 = 0 ;
12535 258 : PyObject * obj0 = 0 ;
12536 258 : char *result = 0 ;
12537 :
12538 258 : if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetName",&obj0)) SWIG_fail;
12539 258 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12540 258 : if (!SWIG_IsOK(res1)) {
12541 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12542 : }
12543 258 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12544 : {
12545 258 : if ( bUseExceptions ) {
12546 0 : CPLErrorReset();
12547 : }
12548 258 : result = (char *)OGRFieldDefnShadow_GetName(arg1);
12549 258 : if ( bUseExceptions ) {
12550 0 : CPLErr eclass = CPLGetLastErrorType();
12551 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12552 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12553 : }
12554 : }
12555 : }
12556 258 : resultobj = SWIG_FromCharPtr((const char *)result);
12557 258 : return resultobj;
12558 : fail:
12559 0 : return NULL;
12560 : }
12561 :
12562 :
12563 526 : SWIGINTERN PyObject *_wrap_FieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12564 526 : PyObject *resultobj = 0;
12565 526 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12566 526 : void *argp1 = 0 ;
12567 526 : int res1 = 0 ;
12568 526 : PyObject * obj0 = 0 ;
12569 526 : char *result = 0 ;
12570 :
12571 526 : if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetNameRef",&obj0)) SWIG_fail;
12572 526 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12573 526 : if (!SWIG_IsOK(res1)) {
12574 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12575 : }
12576 526 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12577 : {
12578 526 : if ( bUseExceptions ) {
12579 0 : CPLErrorReset();
12580 : }
12581 526 : result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
12582 526 : if ( bUseExceptions ) {
12583 0 : CPLErr eclass = CPLGetLastErrorType();
12584 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12585 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12586 : }
12587 : }
12588 : }
12589 526 : resultobj = SWIG_FromCharPtr((const char *)result);
12590 526 : return resultobj;
12591 : fail:
12592 0 : return NULL;
12593 : }
12594 :
12595 :
12596 1 : SWIGINTERN PyObject *_wrap_FieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12597 1 : PyObject *resultobj = 0;
12598 1 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12599 1 : char *arg2 = (char *) 0 ;
12600 1 : void *argp1 = 0 ;
12601 1 : int res1 = 0 ;
12602 : int res2 ;
12603 1 : char *buf2 = 0 ;
12604 1 : int alloc2 = 0 ;
12605 1 : PyObject * obj0 = 0 ;
12606 1 : PyObject * obj1 = 0 ;
12607 :
12608 1 : if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetName",&obj0,&obj1)) SWIG_fail;
12609 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12610 1 : if (!SWIG_IsOK(res1)) {
12611 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12612 : }
12613 1 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12614 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12615 1 : if (!SWIG_IsOK(res2)) {
12616 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
12617 : }
12618 1 : arg2 = reinterpret_cast< char * >(buf2);
12619 : {
12620 1 : if (!arg2) {
12621 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12622 : }
12623 : }
12624 : {
12625 1 : if ( bUseExceptions ) {
12626 0 : CPLErrorReset();
12627 : }
12628 : OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
12629 1 : if ( bUseExceptions ) {
12630 0 : CPLErr eclass = CPLGetLastErrorType();
12631 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12632 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12633 : }
12634 : }
12635 : }
12636 1 : resultobj = SWIG_Py_Void();
12637 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12638 1 : return resultobj;
12639 : fail:
12640 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12641 0 : return NULL;
12642 : }
12643 :
12644 :
12645 601 : SWIGINTERN PyObject *_wrap_FieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12646 601 : PyObject *resultobj = 0;
12647 601 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12648 601 : void *argp1 = 0 ;
12649 601 : int res1 = 0 ;
12650 601 : PyObject * obj0 = 0 ;
12651 : OGRFieldType result;
12652 :
12653 601 : if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetType",&obj0)) SWIG_fail;
12654 601 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12655 601 : if (!SWIG_IsOK(res1)) {
12656 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12657 : }
12658 601 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12659 : {
12660 601 : if ( bUseExceptions ) {
12661 0 : CPLErrorReset();
12662 : }
12663 601 : result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
12664 601 : if ( bUseExceptions ) {
12665 0 : CPLErr eclass = CPLGetLastErrorType();
12666 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12667 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12668 : }
12669 : }
12670 : }
12671 1202 : resultobj = SWIG_From_int(static_cast< int >(result));
12672 601 : return resultobj;
12673 : fail:
12674 0 : return NULL;
12675 : }
12676 :
12677 :
12678 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12679 0 : PyObject *resultobj = 0;
12680 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12681 : OGRFieldType arg2 ;
12682 0 : void *argp1 = 0 ;
12683 0 : int res1 = 0 ;
12684 : int val2 ;
12685 0 : int ecode2 = 0 ;
12686 0 : PyObject * obj0 = 0 ;
12687 0 : PyObject * obj1 = 0 ;
12688 :
12689 0 : if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetType",&obj0,&obj1)) SWIG_fail;
12690 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12691 0 : if (!SWIG_IsOK(res1)) {
12692 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12693 : }
12694 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12695 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12696 0 : if (!SWIG_IsOK(ecode2)) {
12697 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetType" "', argument " "2"" of type '" "OGRFieldType""'");
12698 : }
12699 0 : arg2 = static_cast< OGRFieldType >(val2);
12700 : {
12701 0 : if ( bUseExceptions ) {
12702 0 : CPLErrorReset();
12703 : }
12704 : OGRFieldDefnShadow_SetType(arg1,arg2);
12705 0 : if ( bUseExceptions ) {
12706 0 : CPLErr eclass = CPLGetLastErrorType();
12707 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12708 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12709 : }
12710 : }
12711 : }
12712 0 : resultobj = SWIG_Py_Void();
12713 0 : return resultobj;
12714 : fail:
12715 0 : return NULL;
12716 : }
12717 :
12718 :
12719 0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12720 0 : PyObject *resultobj = 0;
12721 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12722 0 : void *argp1 = 0 ;
12723 0 : int res1 = 0 ;
12724 0 : PyObject * obj0 = 0 ;
12725 : OGRJustification result;
12726 :
12727 0 : if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetJustify",&obj0)) SWIG_fail;
12728 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12729 0 : if (!SWIG_IsOK(res1)) {
12730 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12731 : }
12732 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12733 : {
12734 0 : if ( bUseExceptions ) {
12735 0 : CPLErrorReset();
12736 : }
12737 0 : result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
12738 0 : if ( bUseExceptions ) {
12739 0 : CPLErr eclass = CPLGetLastErrorType();
12740 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12741 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12742 : }
12743 : }
12744 : }
12745 0 : resultobj = SWIG_From_int(static_cast< int >(result));
12746 0 : return resultobj;
12747 : fail:
12748 0 : return NULL;
12749 : }
12750 :
12751 :
12752 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12753 0 : PyObject *resultobj = 0;
12754 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12755 : OGRJustification arg2 ;
12756 0 : void *argp1 = 0 ;
12757 0 : int res1 = 0 ;
12758 : int val2 ;
12759 0 : int ecode2 = 0 ;
12760 0 : PyObject * obj0 = 0 ;
12761 0 : PyObject * obj1 = 0 ;
12762 :
12763 0 : if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetJustify",&obj0,&obj1)) SWIG_fail;
12764 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12765 0 : if (!SWIG_IsOK(res1)) {
12766 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12767 : }
12768 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12769 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12770 0 : if (!SWIG_IsOK(ecode2)) {
12771 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetJustify" "', argument " "2"" of type '" "OGRJustification""'");
12772 : }
12773 0 : arg2 = static_cast< OGRJustification >(val2);
12774 : {
12775 0 : if ( bUseExceptions ) {
12776 0 : CPLErrorReset();
12777 : }
12778 : OGRFieldDefnShadow_SetJustify(arg1,arg2);
12779 0 : if ( bUseExceptions ) {
12780 0 : CPLErr eclass = CPLGetLastErrorType();
12781 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12782 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12783 : }
12784 : }
12785 : }
12786 0 : resultobj = SWIG_Py_Void();
12787 0 : return resultobj;
12788 : fail:
12789 0 : return NULL;
12790 : }
12791 :
12792 :
12793 520 : SWIGINTERN PyObject *_wrap_FieldDefn_GetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12794 520 : PyObject *resultobj = 0;
12795 520 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12796 520 : void *argp1 = 0 ;
12797 520 : int res1 = 0 ;
12798 520 : PyObject * obj0 = 0 ;
12799 : int result;
12800 :
12801 520 : if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetWidth",&obj0)) SWIG_fail;
12802 520 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12803 520 : if (!SWIG_IsOK(res1)) {
12804 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12805 : }
12806 520 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12807 : {
12808 520 : if ( bUseExceptions ) {
12809 0 : CPLErrorReset();
12810 : }
12811 520 : result = (int)OGRFieldDefnShadow_GetWidth(arg1);
12812 520 : if ( bUseExceptions ) {
12813 0 : CPLErr eclass = CPLGetLastErrorType();
12814 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12815 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12816 : }
12817 : }
12818 : }
12819 520 : resultobj = SWIG_From_int(static_cast< int >(result));
12820 520 : return resultobj;
12821 : fail:
12822 0 : return NULL;
12823 : }
12824 :
12825 :
12826 191 : SWIGINTERN PyObject *_wrap_FieldDefn_SetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12827 191 : PyObject *resultobj = 0;
12828 191 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12829 : int arg2 ;
12830 191 : void *argp1 = 0 ;
12831 191 : int res1 = 0 ;
12832 : int val2 ;
12833 191 : int ecode2 = 0 ;
12834 191 : PyObject * obj0 = 0 ;
12835 191 : PyObject * obj1 = 0 ;
12836 :
12837 191 : if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetWidth",&obj0,&obj1)) SWIG_fail;
12838 191 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12839 191 : if (!SWIG_IsOK(res1)) {
12840 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12841 : }
12842 191 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12843 191 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12844 191 : if (!SWIG_IsOK(ecode2)) {
12845 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetWidth" "', argument " "2"" of type '" "int""'");
12846 : }
12847 191 : arg2 = static_cast< int >(val2);
12848 : {
12849 191 : if ( bUseExceptions ) {
12850 0 : CPLErrorReset();
12851 : }
12852 : OGRFieldDefnShadow_SetWidth(arg1,arg2);
12853 191 : if ( bUseExceptions ) {
12854 0 : CPLErr eclass = CPLGetLastErrorType();
12855 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12856 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12857 : }
12858 : }
12859 : }
12860 191 : resultobj = SWIG_Py_Void();
12861 191 : return resultobj;
12862 : fail:
12863 0 : return NULL;
12864 : }
12865 :
12866 :
12867 210 : SWIGINTERN PyObject *_wrap_FieldDefn_GetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12868 210 : PyObject *resultobj = 0;
12869 210 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12870 210 : void *argp1 = 0 ;
12871 210 : int res1 = 0 ;
12872 210 : PyObject * obj0 = 0 ;
12873 : int result;
12874 :
12875 210 : if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetPrecision",&obj0)) SWIG_fail;
12876 210 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12877 210 : if (!SWIG_IsOK(res1)) {
12878 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12879 : }
12880 210 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12881 : {
12882 210 : if ( bUseExceptions ) {
12883 0 : CPLErrorReset();
12884 : }
12885 210 : result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
12886 210 : if ( bUseExceptions ) {
12887 0 : CPLErr eclass = CPLGetLastErrorType();
12888 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12889 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12890 : }
12891 : }
12892 : }
12893 210 : resultobj = SWIG_From_int(static_cast< int >(result));
12894 210 : return resultobj;
12895 : fail:
12896 0 : return NULL;
12897 : }
12898 :
12899 :
12900 128 : SWIGINTERN PyObject *_wrap_FieldDefn_SetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12901 128 : PyObject *resultobj = 0;
12902 128 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12903 : int arg2 ;
12904 128 : void *argp1 = 0 ;
12905 128 : int res1 = 0 ;
12906 : int val2 ;
12907 128 : int ecode2 = 0 ;
12908 128 : PyObject * obj0 = 0 ;
12909 128 : PyObject * obj1 = 0 ;
12910 :
12911 128 : if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetPrecision",&obj0,&obj1)) SWIG_fail;
12912 128 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12913 128 : if (!SWIG_IsOK(res1)) {
12914 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12915 : }
12916 128 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12917 128 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12918 128 : if (!SWIG_IsOK(ecode2)) {
12919 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetPrecision" "', argument " "2"" of type '" "int""'");
12920 : }
12921 128 : arg2 = static_cast< int >(val2);
12922 : {
12923 128 : if ( bUseExceptions ) {
12924 0 : CPLErrorReset();
12925 : }
12926 : OGRFieldDefnShadow_SetPrecision(arg1,arg2);
12927 128 : if ( bUseExceptions ) {
12928 0 : CPLErr eclass = CPLGetLastErrorType();
12929 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12930 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12931 : }
12932 : }
12933 : }
12934 128 : resultobj = SWIG_Py_Void();
12935 128 : return resultobj;
12936 : fail:
12937 0 : return NULL;
12938 : }
12939 :
12940 :
12941 0 : SWIGINTERN PyObject *_wrap_FieldDefn_GetTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12942 0 : PyObject *resultobj = 0;
12943 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12944 0 : void *argp1 = 0 ;
12945 0 : int res1 = 0 ;
12946 0 : PyObject * obj0 = 0 ;
12947 0 : char *result = 0 ;
12948 :
12949 0 : if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetTypeName",&obj0)) SWIG_fail;
12950 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12951 0 : if (!SWIG_IsOK(res1)) {
12952 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12953 : }
12954 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12955 : {
12956 0 : if ( bUseExceptions ) {
12957 0 : CPLErrorReset();
12958 : }
12959 0 : result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
12960 0 : if ( bUseExceptions ) {
12961 0 : CPLErr eclass = CPLGetLastErrorType();
12962 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12963 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12964 : }
12965 : }
12966 : }
12967 0 : resultobj = SWIG_FromCharPtr((const char *)result);
12968 0 : return resultobj;
12969 : fail:
12970 0 : return NULL;
12971 : }
12972 :
12973 :
12974 32 : SWIGINTERN PyObject *_wrap_FieldDefn_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12975 32 : PyObject *resultobj = 0;
12976 32 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
12977 : OGRFieldType arg2 ;
12978 32 : void *argp1 = 0 ;
12979 32 : int res1 = 0 ;
12980 : int val2 ;
12981 32 : int ecode2 = 0 ;
12982 32 : PyObject * obj0 = 0 ;
12983 32 : PyObject * obj1 = 0 ;
12984 32 : char *result = 0 ;
12985 :
12986 32 : if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_GetFieldTypeName",&obj0,&obj1)) SWIG_fail;
12987 32 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
12988 32 : if (!SWIG_IsOK(res1)) {
12989 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
12990 : }
12991 32 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
12992 32 : ecode2 = SWIG_AsVal_int(obj1, &val2);
12993 32 : if (!SWIG_IsOK(ecode2)) {
12994 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "2"" of type '" "OGRFieldType""'");
12995 : }
12996 32 : arg2 = static_cast< OGRFieldType >(val2);
12997 : {
12998 32 : if ( bUseExceptions ) {
12999 0 : CPLErrorReset();
13000 : }
13001 32 : result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
13002 32 : if ( bUseExceptions ) {
13003 0 : CPLErr eclass = CPLGetLastErrorType();
13004 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13005 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13006 : }
13007 : }
13008 : }
13009 32 : resultobj = SWIG_FromCharPtr((const char *)result);
13010 32 : return resultobj;
13011 : fail:
13012 0 : return NULL;
13013 : }
13014 :
13015 :
13016 6 : SWIGINTERN PyObject *_wrap_FieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13017 6 : PyObject *resultobj = 0;
13018 6 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
13019 6 : void *argp1 = 0 ;
13020 6 : int res1 = 0 ;
13021 6 : PyObject * obj0 = 0 ;
13022 : int result;
13023 :
13024 6 : if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_IsIgnored",&obj0)) SWIG_fail;
13025 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
13026 6 : if (!SWIG_IsOK(res1)) {
13027 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
13028 : }
13029 6 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
13030 : {
13031 6 : if ( bUseExceptions ) {
13032 0 : CPLErrorReset();
13033 : }
13034 6 : result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
13035 6 : if ( bUseExceptions ) {
13036 0 : CPLErr eclass = CPLGetLastErrorType();
13037 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13038 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13039 : }
13040 : }
13041 : }
13042 6 : resultobj = SWIG_From_int(static_cast< int >(result));
13043 6 : return resultobj;
13044 : fail:
13045 0 : return NULL;
13046 : }
13047 :
13048 :
13049 0 : SWIGINTERN PyObject *_wrap_FieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13050 0 : PyObject *resultobj = 0;
13051 0 : OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
13052 : int arg2 ;
13053 0 : void *argp1 = 0 ;
13054 0 : int res1 = 0 ;
13055 : int val2 ;
13056 0 : int ecode2 = 0 ;
13057 0 : PyObject * obj0 = 0 ;
13058 0 : PyObject * obj1 = 0 ;
13059 :
13060 0 : if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetIgnored",&obj0,&obj1)) SWIG_fail;
13061 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 | 0 );
13062 0 : if (!SWIG_IsOK(res1)) {
13063 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'");
13064 : }
13065 0 : arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
13066 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
13067 0 : if (!SWIG_IsOK(ecode2)) {
13068 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
13069 : }
13070 0 : arg2 = static_cast< int >(val2);
13071 : {
13072 0 : if ( bUseExceptions ) {
13073 0 : CPLErrorReset();
13074 : }
13075 : OGRFieldDefnShadow_SetIgnored(arg1,arg2);
13076 0 : if ( bUseExceptions ) {
13077 0 : CPLErr eclass = CPLGetLastErrorType();
13078 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13079 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13080 : }
13081 : }
13082 : }
13083 0 : resultobj = SWIG_Py_Void();
13084 0 : return resultobj;
13085 : fail:
13086 0 : return NULL;
13087 : }
13088 :
13089 :
13090 2 : SWIGINTERN PyObject *FieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13091 : PyObject *obj;
13092 2 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
13093 2 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDefnShadow, SWIG_NewClientData(obj));
13094 2 : return SWIG_Py_Void();
13095 : }
13096 :
13097 72 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13098 72 : PyObject *resultobj = 0;
13099 : int arg1 ;
13100 72 : char *arg2 = (char *) 0 ;
13101 72 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
13102 72 : int alloc1 = 0 ;
13103 72 : void *argp3 = 0 ;
13104 72 : int res3 = 0 ;
13105 72 : PyObject * obj0 = 0 ;
13106 72 : PyObject * obj1 = 0 ;
13107 : char * kwnames[] = {
13108 : (char *) "len",(char *) "reference", NULL
13109 72 : };
13110 72 : OGRGeometryShadow *result = 0 ;
13111 :
13112 72 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkb",kwnames,&obj0,&obj1)) SWIG_fail;
13113 : {
13114 : /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
13115 : #if PY_VERSION_HEX>=0x03000000
13116 : if (PyUnicode_Check(obj0))
13117 : {
13118 : size_t safeLen = 0;
13119 : int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
13120 : if (!SWIG_IsOK(ret)) {
13121 : SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
13122 : }
13123 :
13124 : if (safeLen) safeLen--;
13125 : arg1 = (int) safeLen;
13126 : }
13127 : else if (PyBytes_Check(obj0))
13128 : {
13129 : Py_ssize_t safeLen = 0;
13130 : PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
13131 : arg1 = (int) safeLen;
13132 : }
13133 : else
13134 : {
13135 : PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
13136 : SWIG_fail;
13137 : }
13138 : #else
13139 72 : if (PyString_Check(obj0))
13140 : {
13141 72 : Py_ssize_t safeLen = 0;
13142 72 : PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
13143 72 : arg1 = (int) safeLen;
13144 : }
13145 : else
13146 : {
13147 0 : PyErr_SetString(PyExc_TypeError, "not a string");
13148 0 : SWIG_fail;
13149 : }
13150 : #endif
13151 : }
13152 72 : if (obj1) {
13153 0 : res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13154 0 : if (!SWIG_IsOK(res3)) {
13155 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateGeometryFromWkb" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
13156 : }
13157 0 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
13158 : }
13159 : {
13160 72 : if ( bUseExceptions ) {
13161 0 : CPLErrorReset();
13162 : }
13163 72 : result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
13164 72 : if ( bUseExceptions ) {
13165 0 : CPLErr eclass = CPLGetLastErrorType();
13166 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13167 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13168 : }
13169 : }
13170 : }
13171 72 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13172 : {
13173 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
13174 72 : if( alloc1 == SWIG_NEWOBJ ) {
13175 0 : delete[] arg2;
13176 : }
13177 : }
13178 72 : return resultobj;
13179 : fail:
13180 : {
13181 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
13182 0 : if( alloc1 == SWIG_NEWOBJ ) {
13183 0 : delete[] arg2;
13184 : }
13185 : }
13186 0 : return NULL;
13187 : }
13188 :
13189 :
13190 30299 : SWIGINTERN PyObject *_wrap_CreateGeometryFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13191 30299 : PyObject *resultobj = 0;
13192 30299 : char **arg1 = (char **) 0 ;
13193 30299 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
13194 : char *val1 ;
13195 30299 : void *argp2 = 0 ;
13196 30299 : int res2 = 0 ;
13197 30299 : PyObject * obj0 = 0 ;
13198 30299 : PyObject * obj1 = 0 ;
13199 : char * kwnames[] = {
13200 : (char *) "val",(char *) "reference", NULL
13201 30299 : };
13202 30299 : OGRGeometryShadow *result = 0 ;
13203 :
13204 30299 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkt",kwnames,&obj0,&obj1)) SWIG_fail;
13205 : {
13206 : /* %typemap(in) (char **ignorechange) */
13207 30299 : PyArg_Parse( obj0, "s", &val1 );
13208 30299 : arg1 = &val1;
13209 : }
13210 30299 : if (obj1) {
13211 9 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13212 9 : if (!SWIG_IsOK(res2)) {
13213 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGeometryFromWkt" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
13214 : }
13215 9 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
13216 : }
13217 : {
13218 30299 : if ( bUseExceptions ) {
13219 0 : CPLErrorReset();
13220 : }
13221 30299 : result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
13222 30299 : if ( bUseExceptions ) {
13223 0 : CPLErr eclass = CPLGetLastErrorType();
13224 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13225 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13226 : }
13227 : }
13228 : }
13229 30299 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13230 30299 : return resultobj;
13231 : fail:
13232 0 : return NULL;
13233 : }
13234 :
13235 :
13236 171 : SWIGINTERN PyObject *_wrap_CreateGeometryFromGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13237 171 : PyObject *resultobj = 0;
13238 171 : char *arg1 = (char *) 0 ;
13239 : int res1 ;
13240 171 : char *buf1 = 0 ;
13241 171 : int alloc1 = 0 ;
13242 171 : PyObject * obj0 = 0 ;
13243 171 : OGRGeometryShadow *result = 0 ;
13244 :
13245 171 : if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromGML",&obj0)) SWIG_fail;
13246 171 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
13247 171 : if (!SWIG_IsOK(res1)) {
13248 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromGML" "', argument " "1"" of type '" "char const *""'");
13249 : }
13250 171 : arg1 = reinterpret_cast< char * >(buf1);
13251 : {
13252 171 : if ( bUseExceptions ) {
13253 0 : CPLErrorReset();
13254 : }
13255 171 : result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
13256 171 : if ( bUseExceptions ) {
13257 0 : CPLErr eclass = CPLGetLastErrorType();
13258 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13259 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13260 : }
13261 : }
13262 : }
13263 171 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13264 171 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
13265 171 : return resultobj;
13266 : fail:
13267 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
13268 0 : return NULL;
13269 : }
13270 :
13271 :
13272 0 : SWIGINTERN PyObject *_wrap_CreateGeometryFromJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13273 0 : PyObject *resultobj = 0;
13274 0 : char *arg1 = (char *) 0 ;
13275 : int res1 ;
13276 0 : char *buf1 = 0 ;
13277 0 : int alloc1 = 0 ;
13278 0 : PyObject * obj0 = 0 ;
13279 0 : OGRGeometryShadow *result = 0 ;
13280 :
13281 0 : if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromJson",&obj0)) SWIG_fail;
13282 0 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
13283 0 : if (!SWIG_IsOK(res1)) {
13284 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromJson" "', argument " "1"" of type '" "char const *""'");
13285 : }
13286 0 : arg1 = reinterpret_cast< char * >(buf1);
13287 : {
13288 0 : if ( bUseExceptions ) {
13289 0 : CPLErrorReset();
13290 : }
13291 0 : result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
13292 0 : if ( bUseExceptions ) {
13293 0 : CPLErr eclass = CPLGetLastErrorType();
13294 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13295 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13296 : }
13297 : }
13298 : }
13299 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13300 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
13301 0 : return resultobj;
13302 : fail:
13303 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
13304 0 : return NULL;
13305 : }
13306 :
13307 :
13308 5 : SWIGINTERN PyObject *_wrap_BuildPolygonFromEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13309 5 : PyObject *resultobj = 0;
13310 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13311 5 : int arg2 = (int) 0 ;
13312 5 : int arg3 = (int) 0 ;
13313 5 : double arg4 = (double) 0 ;
13314 5 : void *argp1 = 0 ;
13315 5 : int res1 = 0 ;
13316 : int val2 ;
13317 5 : int ecode2 = 0 ;
13318 : int val3 ;
13319 5 : int ecode3 = 0 ;
13320 : double val4 ;
13321 5 : int ecode4 = 0 ;
13322 5 : PyObject * obj0 = 0 ;
13323 5 : PyObject * obj1 = 0 ;
13324 5 : PyObject * obj2 = 0 ;
13325 5 : PyObject * obj3 = 0 ;
13326 : char * kwnames[] = {
13327 : (char *) "hLineCollection",(char *) "bBestEffort",(char *) "bAutoClose",(char *) "dfTolerance", NULL
13328 5 : };
13329 5 : OGRGeometryShadow *result = 0 ;
13330 :
13331 5 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:BuildPolygonFromEdges",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
13332 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13333 5 : if (!SWIG_IsOK(res1)) {
13334 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BuildPolygonFromEdges" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13335 : }
13336 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13337 5 : if (obj1) {
13338 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
13339 0 : if (!SWIG_IsOK(ecode2)) {
13340 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BuildPolygonFromEdges" "', argument " "2"" of type '" "int""'");
13341 : }
13342 0 : arg2 = static_cast< int >(val2);
13343 : }
13344 5 : if (obj2) {
13345 0 : ecode3 = SWIG_AsVal_int(obj2, &val3);
13346 0 : if (!SWIG_IsOK(ecode3)) {
13347 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BuildPolygonFromEdges" "', argument " "3"" of type '" "int""'");
13348 : }
13349 0 : arg3 = static_cast< int >(val3);
13350 : }
13351 5 : if (obj3) {
13352 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
13353 0 : if (!SWIG_IsOK(ecode4)) {
13354 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BuildPolygonFromEdges" "', argument " "4"" of type '" "double""'");
13355 : }
13356 0 : arg4 = static_cast< double >(val4);
13357 : }
13358 : {
13359 5 : if ( bUseExceptions ) {
13360 0 : CPLErrorReset();
13361 : }
13362 5 : result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
13363 5 : if ( bUseExceptions ) {
13364 0 : CPLErr eclass = CPLGetLastErrorType();
13365 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13366 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13367 : }
13368 : }
13369 : }
13370 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13371 5 : return resultobj;
13372 : fail:
13373 0 : return NULL;
13374 : }
13375 :
13376 :
13377 1 : SWIGINTERN PyObject *_wrap_ApproximateArcAngles(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13378 1 : PyObject *resultobj = 0;
13379 : double arg1 ;
13380 : double arg2 ;
13381 : double arg3 ;
13382 : double arg4 ;
13383 : double arg5 ;
13384 : double arg6 ;
13385 : double arg7 ;
13386 : double arg8 ;
13387 : double arg9 ;
13388 : double val1 ;
13389 1 : int ecode1 = 0 ;
13390 : double val2 ;
13391 1 : int ecode2 = 0 ;
13392 : double val3 ;
13393 1 : int ecode3 = 0 ;
13394 : double val4 ;
13395 1 : int ecode4 = 0 ;
13396 : double val5 ;
13397 1 : int ecode5 = 0 ;
13398 : double val6 ;
13399 1 : int ecode6 = 0 ;
13400 : double val7 ;
13401 1 : int ecode7 = 0 ;
13402 : double val8 ;
13403 1 : int ecode8 = 0 ;
13404 : double val9 ;
13405 1 : int ecode9 = 0 ;
13406 1 : PyObject * obj0 = 0 ;
13407 1 : PyObject * obj1 = 0 ;
13408 1 : PyObject * obj2 = 0 ;
13409 1 : PyObject * obj3 = 0 ;
13410 1 : PyObject * obj4 = 0 ;
13411 1 : PyObject * obj5 = 0 ;
13412 1 : PyObject * obj6 = 0 ;
13413 1 : PyObject * obj7 = 0 ;
13414 1 : PyObject * obj8 = 0 ;
13415 : char * kwnames[] = {
13416 : (char *) "dfCenterX",(char *) "dfCenterY",(char *) "dfZ",(char *) "dfPrimaryRadius",(char *) "dfSecondaryAxis",(char *) "dfRotation",(char *) "dfStartAngle",(char *) "dfEndAngle",(char *) "dfMaxAngleStepSizeDegrees", NULL
13417 1 : };
13418 1 : OGRGeometryShadow *result = 0 ;
13419 :
13420 1 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO:ApproximateArcAngles",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
13421 1 : ecode1 = SWIG_AsVal_double(obj0, &val1);
13422 1 : if (!SWIG_IsOK(ecode1)) {
13423 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ApproximateArcAngles" "', argument " "1"" of type '" "double""'");
13424 : }
13425 1 : arg1 = static_cast< double >(val1);
13426 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
13427 1 : if (!SWIG_IsOK(ecode2)) {
13428 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApproximateArcAngles" "', argument " "2"" of type '" "double""'");
13429 : }
13430 1 : arg2 = static_cast< double >(val2);
13431 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
13432 1 : if (!SWIG_IsOK(ecode3)) {
13433 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApproximateArcAngles" "', argument " "3"" of type '" "double""'");
13434 : }
13435 1 : arg3 = static_cast< double >(val3);
13436 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
13437 1 : if (!SWIG_IsOK(ecode4)) {
13438 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ApproximateArcAngles" "', argument " "4"" of type '" "double""'");
13439 : }
13440 1 : arg4 = static_cast< double >(val4);
13441 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
13442 1 : if (!SWIG_IsOK(ecode5)) {
13443 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ApproximateArcAngles" "', argument " "5"" of type '" "double""'");
13444 : }
13445 1 : arg5 = static_cast< double >(val5);
13446 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
13447 1 : if (!SWIG_IsOK(ecode6)) {
13448 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ApproximateArcAngles" "', argument " "6"" of type '" "double""'");
13449 : }
13450 1 : arg6 = static_cast< double >(val6);
13451 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
13452 1 : if (!SWIG_IsOK(ecode7)) {
13453 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ApproximateArcAngles" "', argument " "7"" of type '" "double""'");
13454 : }
13455 1 : arg7 = static_cast< double >(val7);
13456 1 : ecode8 = SWIG_AsVal_double(obj7, &val8);
13457 1 : if (!SWIG_IsOK(ecode8)) {
13458 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ApproximateArcAngles" "', argument " "8"" of type '" "double""'");
13459 : }
13460 1 : arg8 = static_cast< double >(val8);
13461 1 : ecode9 = SWIG_AsVal_double(obj8, &val9);
13462 1 : if (!SWIG_IsOK(ecode9)) {
13463 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ApproximateArcAngles" "', argument " "9"" of type '" "double""'");
13464 : }
13465 1 : arg9 = static_cast< double >(val9);
13466 : {
13467 1 : if ( bUseExceptions ) {
13468 0 : CPLErrorReset();
13469 : }
13470 1 : result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
13471 1 : if ( bUseExceptions ) {
13472 0 : CPLErr eclass = CPLGetLastErrorType();
13473 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13474 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13475 : }
13476 : }
13477 : }
13478 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13479 1 : return resultobj;
13480 : fail:
13481 0 : return NULL;
13482 : }
13483 :
13484 :
13485 36 : SWIGINTERN PyObject *_wrap_ForceToPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13486 36 : PyObject *resultobj = 0;
13487 36 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13488 36 : void *argp1 = 0 ;
13489 36 : int res1 = 0 ;
13490 36 : PyObject * obj0 = 0 ;
13491 36 : OGRGeometryShadow *result = 0 ;
13492 :
13493 36 : if (!PyArg_ParseTuple(args,(char *)"O:ForceToPolygon",&obj0)) SWIG_fail;
13494 36 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13495 36 : if (!SWIG_IsOK(res1)) {
13496 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13497 : }
13498 36 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13499 : {
13500 36 : if ( bUseExceptions ) {
13501 0 : CPLErrorReset();
13502 : }
13503 36 : result = (OGRGeometryShadow *)ForceToPolygon(arg1);
13504 36 : if ( bUseExceptions ) {
13505 0 : CPLErr eclass = CPLGetLastErrorType();
13506 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13507 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13508 : }
13509 : }
13510 : }
13511 36 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13512 36 : return resultobj;
13513 : fail:
13514 0 : return NULL;
13515 : }
13516 :
13517 :
13518 32 : SWIGINTERN PyObject *_wrap_ForceToLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13519 32 : PyObject *resultobj = 0;
13520 32 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13521 32 : void *argp1 = 0 ;
13522 32 : int res1 = 0 ;
13523 32 : PyObject * obj0 = 0 ;
13524 32 : OGRGeometryShadow *result = 0 ;
13525 :
13526 32 : if (!PyArg_ParseTuple(args,(char *)"O:ForceToLineString",&obj0)) SWIG_fail;
13527 32 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13528 32 : if (!SWIG_IsOK(res1)) {
13529 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13530 : }
13531 32 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13532 : {
13533 32 : if ( bUseExceptions ) {
13534 0 : CPLErrorReset();
13535 : }
13536 32 : result = (OGRGeometryShadow *)ForceToLineString(arg1);
13537 32 : if ( bUseExceptions ) {
13538 0 : CPLErr eclass = CPLGetLastErrorType();
13539 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13540 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13541 : }
13542 : }
13543 : }
13544 32 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13545 32 : return resultobj;
13546 : fail:
13547 0 : return NULL;
13548 : }
13549 :
13550 :
13551 31 : SWIGINTERN PyObject *_wrap_ForceToMultiPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13552 31 : PyObject *resultobj = 0;
13553 31 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13554 31 : void *argp1 = 0 ;
13555 31 : int res1 = 0 ;
13556 31 : PyObject * obj0 = 0 ;
13557 31 : OGRGeometryShadow *result = 0 ;
13558 :
13559 31 : if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiPolygon",&obj0)) SWIG_fail;
13560 31 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13561 31 : if (!SWIG_IsOK(res1)) {
13562 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13563 : }
13564 31 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13565 : {
13566 31 : if ( bUseExceptions ) {
13567 0 : CPLErrorReset();
13568 : }
13569 31 : result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
13570 31 : if ( bUseExceptions ) {
13571 0 : CPLErr eclass = CPLGetLastErrorType();
13572 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13573 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13574 : }
13575 : }
13576 : }
13577 31 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13578 31 : return resultobj;
13579 : fail:
13580 0 : return NULL;
13581 : }
13582 :
13583 :
13584 27 : SWIGINTERN PyObject *_wrap_ForceToMultiPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13585 27 : PyObject *resultobj = 0;
13586 27 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13587 27 : void *argp1 = 0 ;
13588 27 : int res1 = 0 ;
13589 27 : PyObject * obj0 = 0 ;
13590 27 : OGRGeometryShadow *result = 0 ;
13591 :
13592 27 : if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiPoint",&obj0)) SWIG_fail;
13593 27 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13594 27 : if (!SWIG_IsOK(res1)) {
13595 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13596 : }
13597 27 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13598 : {
13599 27 : if ( bUseExceptions ) {
13600 0 : CPLErrorReset();
13601 : }
13602 27 : result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
13603 27 : if ( bUseExceptions ) {
13604 0 : CPLErr eclass = CPLGetLastErrorType();
13605 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13606 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13607 : }
13608 : }
13609 : }
13610 27 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13611 27 : return resultobj;
13612 : fail:
13613 0 : return NULL;
13614 : }
13615 :
13616 :
13617 29 : SWIGINTERN PyObject *_wrap_ForceToMultiLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13618 29 : PyObject *resultobj = 0;
13619 29 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13620 29 : void *argp1 = 0 ;
13621 29 : int res1 = 0 ;
13622 29 : PyObject * obj0 = 0 ;
13623 29 : OGRGeometryShadow *result = 0 ;
13624 :
13625 29 : if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiLineString",&obj0)) SWIG_fail;
13626 29 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13627 29 : if (!SWIG_IsOK(res1)) {
13628 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13629 : }
13630 29 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13631 : {
13632 29 : if ( bUseExceptions ) {
13633 0 : CPLErrorReset();
13634 : }
13635 29 : result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
13636 29 : if ( bUseExceptions ) {
13637 0 : CPLErr eclass = CPLGetLastErrorType();
13638 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13639 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13640 : }
13641 : }
13642 : }
13643 29 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
13644 29 : return resultobj;
13645 : fail:
13646 0 : return NULL;
13647 : }
13648 :
13649 :
13650 49014 : SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13651 49014 : PyObject *resultobj = 0;
13652 49014 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13653 49014 : void *argp1 = 0 ;
13654 49014 : int res1 = 0 ;
13655 49014 : PyObject * obj0 = 0 ;
13656 :
13657 49014 : if (!PyArg_ParseTuple(args,(char *)"O:delete_Geometry",&obj0)) SWIG_fail;
13658 49014 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
13659 49014 : if (!SWIG_IsOK(res1)) {
13660 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13661 : }
13662 49014 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13663 : {
13664 49014 : if ( bUseExceptions ) {
13665 0 : CPLErrorReset();
13666 : }
13667 : delete_OGRGeometryShadow(arg1);
13668 49014 : if ( bUseExceptions ) {
13669 0 : CPLErr eclass = CPLGetLastErrorType();
13670 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13671 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13672 : }
13673 : }
13674 : }
13675 49014 : resultobj = SWIG_Py_Void();
13676 49014 : return resultobj;
13677 : fail:
13678 0 : return NULL;
13679 : }
13680 :
13681 :
13682 67 : SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13683 67 : PyObject *resultobj = 0;
13684 67 : OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
13685 67 : char *arg2 = (char *) 0 ;
13686 67 : int arg3 = (int) 0 ;
13687 67 : char *arg4 = (char *) 0 ;
13688 67 : char *arg5 = (char *) 0 ;
13689 : int val1 ;
13690 67 : int ecode1 = 0 ;
13691 : int res2 ;
13692 67 : char *buf2 = 0 ;
13693 67 : int alloc2 = 0 ;
13694 67 : int alloc3 = 0 ;
13695 : int res5 ;
13696 67 : char *buf5 = 0 ;
13697 67 : int alloc5 = 0 ;
13698 67 : PyObject * obj0 = 0 ;
13699 67 : PyObject * obj1 = 0 ;
13700 67 : PyObject * obj2 = 0 ;
13701 67 : PyObject * obj3 = 0 ;
13702 : char * kwnames[] = {
13703 : (char *) "type",(char *) "wkt",(char *) "wkb",(char *) "gml", NULL
13704 67 : };
13705 67 : OGRGeometryShadow *result = 0 ;
13706 :
13707 67 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_Geometry",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
13708 67 : if (obj0) {
13709 40 : ecode1 = SWIG_AsVal_int(obj0, &val1);
13710 40 : if (!SWIG_IsOK(ecode1)) {
13711 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Geometry" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
13712 : }
13713 40 : arg1 = static_cast< OGRwkbGeometryType >(val1);
13714 : }
13715 67 : if (obj1) {
13716 26 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
13717 26 : if (!SWIG_IsOK(res2)) {
13718 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'");
13719 : }
13720 26 : arg2 = reinterpret_cast< char * >(buf2);
13721 : }
13722 67 : if (obj2) {
13723 : {
13724 : /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
13725 : #if PY_VERSION_HEX>=0x03000000
13726 : if (PyUnicode_Check(obj2))
13727 : {
13728 : size_t safeLen = 0;
13729 : int ret = SWIG_AsCharPtrAndSize(obj2, (char**) &arg4, &safeLen, &alloc3);
13730 : if (!SWIG_IsOK(ret)) {
13731 : SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
13732 : }
13733 :
13734 : if (safeLen) safeLen--;
13735 : arg3 = (int) safeLen;
13736 : }
13737 : else if (PyBytes_Check(obj2))
13738 : {
13739 : Py_ssize_t safeLen = 0;
13740 : PyBytes_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
13741 : arg3 = (int) safeLen;
13742 : }
13743 : else
13744 : {
13745 : PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
13746 : SWIG_fail;
13747 : }
13748 : #else
13749 0 : if (PyString_Check(obj2))
13750 : {
13751 0 : Py_ssize_t safeLen = 0;
13752 0 : PyString_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
13753 0 : arg3 = (int) safeLen;
13754 : }
13755 : else
13756 : {
13757 0 : PyErr_SetString(PyExc_TypeError, "not a string");
13758 0 : SWIG_fail;
13759 : }
13760 : #endif
13761 : }
13762 : }
13763 67 : if (obj3) {
13764 0 : res5 = SWIG_AsCharPtrAndSize(obj3, &buf5, NULL, &alloc5);
13765 0 : if (!SWIG_IsOK(res5)) {
13766 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Geometry" "', argument " "5"" of type '" "char *""'");
13767 : }
13768 0 : arg5 = reinterpret_cast< char * >(buf5);
13769 : }
13770 : {
13771 67 : if ( bUseExceptions ) {
13772 0 : CPLErrorReset();
13773 : }
13774 134 : result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
13775 67 : if ( bUseExceptions ) {
13776 0 : CPLErr eclass = CPLGetLastErrorType();
13777 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13778 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13779 : }
13780 : }
13781 : }
13782 67 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_NEW | 0 );
13783 67 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13784 : {
13785 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
13786 67 : if( alloc3 == SWIG_NEWOBJ ) {
13787 0 : delete[] arg4;
13788 : }
13789 : }
13790 67 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
13791 67 : return resultobj;
13792 : fail:
13793 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13794 : {
13795 : /* %typemap(freearg) (int *nLen, char *pBuf ) */
13796 0 : if( alloc3 == SWIG_NEWOBJ ) {
13797 0 : delete[] arg4;
13798 : }
13799 : }
13800 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
13801 0 : return NULL;
13802 : }
13803 :
13804 :
13805 1168 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13806 1168 : PyObject *resultobj = 0;
13807 1168 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13808 1168 : char **arg2 = (char **) 0 ;
13809 1168 : void *argp1 = 0 ;
13810 1168 : int res1 = 0 ;
13811 1168 : char *argout2 = 0 ;
13812 1168 : PyObject * obj0 = 0 ;
13813 : OGRErr result;
13814 :
13815 : {
13816 : /* %typemap(in,numinputs=0) (char **argout2) */
13817 1168 : arg2 = &argout2;
13818 : }
13819 1168 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ExportToWkt",&obj0)) SWIG_fail;
13820 1168 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13821 1168 : if (!SWIG_IsOK(res1)) {
13822 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13823 : }
13824 1168 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13825 : {
13826 1168 : if ( bUseExceptions ) {
13827 0 : CPLErrorReset();
13828 : }
13829 1168 : result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
13830 1168 : if ( bUseExceptions ) {
13831 0 : CPLErr eclass = CPLGetLastErrorType();
13832 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13833 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13834 : }
13835 : }
13836 : }
13837 : {
13838 : /* %typemap(out) OGRErr */
13839 1168 : if ( result != 0 && bUseExceptions) {
13840 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13841 0 : SWIG_fail;
13842 : }
13843 : }
13844 : {
13845 : /* %typemap(argout) (char **argout) */
13846 : PyObject *o;
13847 2336 : if ( arg2 != NULL && *arg2 != NULL) {
13848 1168 : o = GDALPythonObjectFromCStr( *arg2 );
13849 : }
13850 : else {
13851 0 : o = Py_None;
13852 0 : Py_INCREF( o );
13853 : }
13854 1168 : resultobj = t_output_helper(resultobj, o);
13855 : }
13856 : {
13857 : /* %typemap(freearg) (char **argout) */
13858 1168 : if ( *arg2 )
13859 1168 : CPLFree( *arg2 );
13860 : }
13861 : {
13862 : /* %typemap(ret) OGRErr */
13863 1168 : if (resultobj == Py_None ) {
13864 0 : Py_DECREF(resultobj);
13865 0 : resultobj = 0;
13866 : }
13867 1168 : if (resultobj == 0) {
13868 0 : resultobj = PyInt_FromLong( result );
13869 : }
13870 : }
13871 1168 : return resultobj;
13872 : fail:
13873 : {
13874 : /* %typemap(freearg) (char **argout) */
13875 0 : if ( *arg2 )
13876 0 : CPLFree( *arg2 );
13877 : }
13878 0 : return NULL;
13879 : }
13880 :
13881 :
13882 57 : SWIGINTERN PyObject *_wrap_Geometry_ExportToWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13883 57 : PyObject *resultobj = 0;
13884 57 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13885 57 : int *arg2 = (int *) 0 ;
13886 57 : char **arg3 = (char **) 0 ;
13887 57 : OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
13888 57 : void *argp1 = 0 ;
13889 57 : int res1 = 0 ;
13890 57 : int nLen2 = 0 ;
13891 57 : char *pBuf2 = 0 ;
13892 : int val4 ;
13893 57 : int ecode4 = 0 ;
13894 57 : PyObject * obj0 = 0 ;
13895 57 : PyObject * obj1 = 0 ;
13896 : char * kwnames[] = {
13897 : (char *) "self",(char *) "byte_order", NULL
13898 57 : };
13899 : OGRErr result;
13900 :
13901 : {
13902 : /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
13903 57 : arg2 = &nLen2;
13904 57 : arg3 = &pBuf2;
13905 : }
13906 57 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToWkb",kwnames,&obj0,&obj1)) SWIG_fail;
13907 57 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13908 57 : if (!SWIG_IsOK(res1)) {
13909 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13910 : }
13911 57 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13912 57 : if (obj1) {
13913 36 : ecode4 = SWIG_AsVal_int(obj1, &val4);
13914 36 : if (!SWIG_IsOK(ecode4)) {
13915 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
13916 : }
13917 36 : arg4 = static_cast< OGRwkbByteOrder >(val4);
13918 : }
13919 : {
13920 57 : if ( bUseExceptions ) {
13921 0 : CPLErrorReset();
13922 : }
13923 57 : result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
13924 57 : if ( bUseExceptions ) {
13925 0 : CPLErr eclass = CPLGetLastErrorType();
13926 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13927 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13928 : }
13929 : }
13930 : }
13931 : {
13932 : /* %typemap(out) OGRErr */
13933 57 : if ( result != 0 && bUseExceptions) {
13934 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13935 0 : SWIG_fail;
13936 : }
13937 : }
13938 : {
13939 : /* %typemap(argout) (int *nLen, char **pBuf ) */
13940 57 : Py_XDECREF(resultobj);
13941 : #if PY_VERSION_HEX >= 0x03000000
13942 : resultobj = PyBytes_FromStringAndSize( *arg3, *arg2 );
13943 : #else
13944 57 : resultobj = PyString_FromStringAndSize( *arg3, *arg2 );
13945 : #endif
13946 : }
13947 : {
13948 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
13949 57 : if( *arg2 ) {
13950 57 : free( *arg3 );
13951 : }
13952 : }
13953 : {
13954 : /* %typemap(ret) OGRErr */
13955 57 : if (resultobj == Py_None ) {
13956 0 : Py_DECREF(resultobj);
13957 0 : resultobj = 0;
13958 : }
13959 57 : if (resultobj == 0) {
13960 0 : resultobj = PyInt_FromLong( result );
13961 : }
13962 : }
13963 57 : return resultobj;
13964 : fail:
13965 : {
13966 : /* %typemap(freearg) (int *nLen, char **pBuf ) */
13967 0 : if( *arg2 ) {
13968 0 : free( *arg3 );
13969 : }
13970 : }
13971 0 : return NULL;
13972 : }
13973 :
13974 :
13975 41 : SWIGINTERN PyObject *_wrap_Geometry_ExportToGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
13976 41 : PyObject *resultobj = 0;
13977 41 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
13978 41 : char **arg2 = (char **) 0 ;
13979 41 : void *argp1 = 0 ;
13980 41 : int res1 = 0 ;
13981 41 : PyObject * obj0 = 0 ;
13982 41 : PyObject * obj1 = 0 ;
13983 : char * kwnames[] = {
13984 : (char *) "self",(char *) "options", NULL
13985 41 : };
13986 41 : retStringAndCPLFree *result = 0 ;
13987 :
13988 41 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToGML",kwnames,&obj0,&obj1)) SWIG_fail;
13989 41 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
13990 41 : if (!SWIG_IsOK(res1)) {
13991 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToGML" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
13992 : }
13993 41 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
13994 41 : if (obj1) {
13995 : {
13996 : /* %typemap(in) char **options */
13997 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
13998 17 : if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
13999 : #if PY_VERSION_HEX < 0x03000000
14000 : || PyString_Check(obj1)
14001 : #endif
14002 : ) {
14003 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
14004 0 : SWIG_fail;
14005 : }
14006 :
14007 17 : int size = PySequence_Size(obj1);
14008 38 : for (int i = 0; i < size; i++) {
14009 21 : PyObject* pyObj = PySequence_GetItem(obj1,i);
14010 21 : if (PyUnicode_Check(pyObj))
14011 : {
14012 : char *pszStr;
14013 : Py_ssize_t nLen;
14014 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
14015 : #if PY_VERSION_HEX >= 0x03000000
14016 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
14017 : #else
14018 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
14019 : #endif
14020 0 : arg2 = CSLAddString( arg2, pszStr );
14021 0 : Py_XDECREF(pyUTF8Str);
14022 : }
14023 : #if PY_VERSION_HEX >= 0x03000000
14024 : else if (PyBytes_Check(pyObj))
14025 : arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
14026 : #else
14027 21 : else if (PyString_Check(pyObj))
14028 21 : arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
14029 : #endif
14030 : else
14031 : {
14032 0 : Py_DECREF(pyObj);
14033 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
14034 0 : SWIG_fail;
14035 : }
14036 21 : Py_DECREF(pyObj);
14037 : }
14038 : }
14039 : }
14040 : {
14041 41 : if ( bUseExceptions ) {
14042 0 : CPLErrorReset();
14043 : }
14044 41 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML(arg1,arg2);
14045 41 : if ( bUseExceptions ) {
14046 0 : CPLErr eclass = CPLGetLastErrorType();
14047 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14048 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14049 : }
14050 : }
14051 : }
14052 : {
14053 : /* %typemap(out) (retStringAndCPLFree*) */
14054 41 : if(result)
14055 : {
14056 41 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
14057 41 : CPLFree(result);
14058 : }
14059 : }
14060 : {
14061 : /* %typemap(freearg) char **options */
14062 41 : CSLDestroy( arg2 );
14063 : }
14064 41 : return resultobj;
14065 : fail:
14066 : {
14067 : /* %typemap(freearg) char **options */
14068 0 : CSLDestroy( arg2 );
14069 : }
14070 0 : return NULL;
14071 : }
14072 :
14073 :
14074 0 : SWIGINTERN PyObject *_wrap_Geometry_ExportToKML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14075 0 : PyObject *resultobj = 0;
14076 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14077 0 : char *arg2 = (char *) NULL ;
14078 0 : void *argp1 = 0 ;
14079 0 : int res1 = 0 ;
14080 : int res2 ;
14081 0 : char *buf2 = 0 ;
14082 0 : int alloc2 = 0 ;
14083 0 : PyObject * obj0 = 0 ;
14084 0 : PyObject * obj1 = 0 ;
14085 0 : retStringAndCPLFree *result = 0 ;
14086 :
14087 0 : if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_ExportToKML",&obj0,&obj1)) SWIG_fail;
14088 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14089 0 : if (!SWIG_IsOK(res1)) {
14090 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToKML" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14091 : }
14092 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14093 0 : if (obj1) {
14094 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
14095 0 : if (!SWIG_IsOK(res2)) {
14096 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_ExportToKML" "', argument " "2"" of type '" "char const *""'");
14097 : }
14098 0 : arg2 = reinterpret_cast< char * >(buf2);
14099 : }
14100 : {
14101 0 : if ( bUseExceptions ) {
14102 0 : CPLErrorReset();
14103 : }
14104 0 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
14105 0 : if ( bUseExceptions ) {
14106 0 : CPLErr eclass = CPLGetLastErrorType();
14107 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14108 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14109 : }
14110 : }
14111 : }
14112 : {
14113 : /* %typemap(out) (retStringAndCPLFree*) */
14114 0 : if(result)
14115 : {
14116 0 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
14117 0 : CPLFree(result);
14118 : }
14119 : }
14120 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14121 0 : return resultobj;
14122 : fail:
14123 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14124 0 : return NULL;
14125 : }
14126 :
14127 :
14128 2 : SWIGINTERN PyObject *_wrap_Geometry_ExportToJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
14129 2 : PyObject *resultobj = 0;
14130 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14131 2 : char **arg2 = (char **) 0 ;
14132 2 : void *argp1 = 0 ;
14133 2 : int res1 = 0 ;
14134 2 : PyObject * obj0 = 0 ;
14135 2 : PyObject * obj1 = 0 ;
14136 : char * kwnames[] = {
14137 : (char *) "self",(char *) "options", NULL
14138 2 : };
14139 2 : retStringAndCPLFree *result = 0 ;
14140 :
14141 2 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToJson",kwnames,&obj0,&obj1)) SWIG_fail;
14142 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14143 2 : if (!SWIG_IsOK(res1)) {
14144 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToJson" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14145 : }
14146 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14147 2 : if (obj1) {
14148 : {
14149 : /* %typemap(in) char **options */
14150 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
14151 2 : if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
14152 : #if PY_VERSION_HEX < 0x03000000
14153 : || PyString_Check(obj1)
14154 : #endif
14155 : ) {
14156 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
14157 0 : SWIG_fail;
14158 : }
14159 :
14160 2 : int size = PySequence_Size(obj1);
14161 2 : for (int i = 0; i < size; i++) {
14162 0 : PyObject* pyObj = PySequence_GetItem(obj1,i);
14163 0 : if (PyUnicode_Check(pyObj))
14164 : {
14165 : char *pszStr;
14166 : Py_ssize_t nLen;
14167 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
14168 : #if PY_VERSION_HEX >= 0x03000000
14169 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
14170 : #else
14171 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
14172 : #endif
14173 0 : arg2 = CSLAddString( arg2, pszStr );
14174 0 : Py_XDECREF(pyUTF8Str);
14175 : }
14176 : #if PY_VERSION_HEX >= 0x03000000
14177 : else if (PyBytes_Check(pyObj))
14178 : arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
14179 : #else
14180 0 : else if (PyString_Check(pyObj))
14181 0 : arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
14182 : #endif
14183 : else
14184 : {
14185 0 : Py_DECREF(pyObj);
14186 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
14187 0 : SWIG_fail;
14188 : }
14189 0 : Py_DECREF(pyObj);
14190 : }
14191 : }
14192 : }
14193 : {
14194 2 : if ( bUseExceptions ) {
14195 0 : CPLErrorReset();
14196 : }
14197 2 : result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
14198 2 : if ( bUseExceptions ) {
14199 0 : CPLErr eclass = CPLGetLastErrorType();
14200 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14201 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14202 : }
14203 : }
14204 : }
14205 : {
14206 : /* %typemap(out) (retStringAndCPLFree*) */
14207 2 : if(result)
14208 : {
14209 2 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
14210 2 : CPLFree(result);
14211 : }
14212 : }
14213 : {
14214 : /* %typemap(freearg) char **options */
14215 2 : CSLDestroy( arg2 );
14216 : }
14217 2 : return resultobj;
14218 : fail:
14219 : {
14220 : /* %typemap(freearg) char **options */
14221 0 : CSLDestroy( arg2 );
14222 : }
14223 0 : return NULL;
14224 : }
14225 :
14226 :
14227 10 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
14228 10 : PyObject *resultobj = 0;
14229 10 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14230 : double arg2 ;
14231 : double arg3 ;
14232 10 : double arg4 = (double) 0 ;
14233 10 : void *argp1 = 0 ;
14234 10 : int res1 = 0 ;
14235 : double val2 ;
14236 10 : int ecode2 = 0 ;
14237 : double val3 ;
14238 10 : int ecode3 = 0 ;
14239 : double val4 ;
14240 10 : int ecode4 = 0 ;
14241 10 : PyObject * obj0 = 0 ;
14242 10 : PyObject * obj1 = 0 ;
14243 10 : PyObject * obj2 = 0 ;
14244 10 : PyObject * obj3 = 0 ;
14245 : char * kwnames[] = {
14246 : (char *) "self",(char *) "x",(char *) "y",(char *) "z", NULL
14247 10 : };
14248 :
14249 10 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Geometry_AddPoint",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
14250 10 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14251 10 : if (!SWIG_IsOK(res1)) {
14252 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14253 : }
14254 10 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14255 10 : ecode2 = SWIG_AsVal_double(obj1, &val2);
14256 10 : if (!SWIG_IsOK(ecode2)) {
14257 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint" "', argument " "2"" of type '" "double""'");
14258 : }
14259 10 : arg2 = static_cast< double >(val2);
14260 10 : ecode3 = SWIG_AsVal_double(obj2, &val3);
14261 10 : if (!SWIG_IsOK(ecode3)) {
14262 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint" "', argument " "3"" of type '" "double""'");
14263 : }
14264 10 : arg3 = static_cast< double >(val3);
14265 10 : if (obj3) {
14266 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
14267 0 : if (!SWIG_IsOK(ecode4)) {
14268 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPoint" "', argument " "4"" of type '" "double""'");
14269 : }
14270 0 : arg4 = static_cast< double >(val4);
14271 : }
14272 : {
14273 10 : if ( bUseExceptions ) {
14274 0 : CPLErrorReset();
14275 : }
14276 : OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
14277 10 : if ( bUseExceptions ) {
14278 0 : CPLErr eclass = CPLGetLastErrorType();
14279 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14280 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14281 : }
14282 : }
14283 : }
14284 10 : resultobj = SWIG_Py_Void();
14285 10 : return resultobj;
14286 : fail:
14287 0 : return NULL;
14288 : }
14289 :
14290 :
14291 40 : SWIGINTERN PyObject *_wrap_Geometry_AddPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14292 40 : PyObject *resultobj = 0;
14293 40 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14294 : double arg2 ;
14295 : double arg3 ;
14296 40 : void *argp1 = 0 ;
14297 40 : int res1 = 0 ;
14298 : double val2 ;
14299 40 : int ecode2 = 0 ;
14300 : double val3 ;
14301 40 : int ecode3 = 0 ;
14302 40 : PyObject * obj0 = 0 ;
14303 40 : PyObject * obj1 = 0 ;
14304 40 : PyObject * obj2 = 0 ;
14305 :
14306 40 : if (!PyArg_ParseTuple(args,(char *)"OOO:Geometry_AddPoint_2D",&obj0,&obj1,&obj2)) SWIG_fail;
14307 40 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14308 40 : if (!SWIG_IsOK(res1)) {
14309 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14310 : }
14311 40 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14312 40 : ecode2 = SWIG_AsVal_double(obj1, &val2);
14313 40 : if (!SWIG_IsOK(ecode2)) {
14314 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint_2D" "', argument " "2"" of type '" "double""'");
14315 : }
14316 40 : arg2 = static_cast< double >(val2);
14317 40 : ecode3 = SWIG_AsVal_double(obj2, &val3);
14318 40 : if (!SWIG_IsOK(ecode3)) {
14319 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint_2D" "', argument " "3"" of type '" "double""'");
14320 : }
14321 40 : arg3 = static_cast< double >(val3);
14322 : {
14323 40 : if ( bUseExceptions ) {
14324 0 : CPLErrorReset();
14325 : }
14326 : OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
14327 40 : if ( bUseExceptions ) {
14328 0 : CPLErr eclass = CPLGetLastErrorType();
14329 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14330 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14331 : }
14332 : }
14333 : }
14334 40 : resultobj = SWIG_Py_Void();
14335 40 : return resultobj;
14336 : fail:
14337 0 : return NULL;
14338 : }
14339 :
14340 :
14341 1 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14342 1 : PyObject *resultobj = 0;
14343 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14344 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
14345 1 : void *argp1 = 0 ;
14346 1 : int res1 = 0 ;
14347 1 : int res2 = 0 ;
14348 1 : PyObject * obj0 = 0 ;
14349 1 : PyObject * obj1 = 0 ;
14350 : OGRErr result;
14351 :
14352 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AddGeometryDirectly",&obj0,&obj1)) SWIG_fail;
14353 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14354 1 : if (!SWIG_IsOK(res1)) {
14355 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometryDirectly" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14356 : }
14357 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14358 1 : res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN | 0 );
14359 1 : if (!SWIG_IsOK(res2)) {
14360 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
14361 : }
14362 : {
14363 1 : if (!arg2) {
14364 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14365 : }
14366 : }
14367 : {
14368 1 : if ( bUseExceptions ) {
14369 0 : CPLErrorReset();
14370 : }
14371 2 : result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
14372 1 : if ( bUseExceptions ) {
14373 0 : CPLErr eclass = CPLGetLastErrorType();
14374 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14375 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14376 : }
14377 : }
14378 : }
14379 : {
14380 : /* %typemap(out) OGRErr */
14381 1 : if ( result != 0 && bUseExceptions) {
14382 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14383 0 : SWIG_fail;
14384 : }
14385 : }
14386 : {
14387 : /* %typemap(ret) OGRErr */
14388 1 : if (resultobj == Py_None ) {
14389 0 : Py_DECREF(resultobj);
14390 0 : resultobj = 0;
14391 : }
14392 1 : if (resultobj == 0) {
14393 1 : resultobj = PyInt_FromLong( result );
14394 : }
14395 : }
14396 1 : return resultobj;
14397 : fail:
14398 0 : return NULL;
14399 : }
14400 :
14401 :
14402 49 : SWIGINTERN PyObject *_wrap_Geometry_AddGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14403 49 : PyObject *resultobj = 0;
14404 49 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14405 49 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
14406 49 : void *argp1 = 0 ;
14407 49 : int res1 = 0 ;
14408 49 : void *argp2 = 0 ;
14409 49 : int res2 = 0 ;
14410 49 : PyObject * obj0 = 0 ;
14411 49 : PyObject * obj1 = 0 ;
14412 : OGRErr result;
14413 :
14414 49 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AddGeometry",&obj0,&obj1)) SWIG_fail;
14415 49 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14416 49 : if (!SWIG_IsOK(res1)) {
14417 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14418 : }
14419 49 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14420 49 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14421 49 : if (!SWIG_IsOK(res2)) {
14422 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
14423 : }
14424 49 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
14425 : {
14426 49 : if (!arg2) {
14427 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14428 : }
14429 : }
14430 : {
14431 49 : if ( bUseExceptions ) {
14432 0 : CPLErrorReset();
14433 : }
14434 49 : result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
14435 49 : if ( bUseExceptions ) {
14436 0 : CPLErr eclass = CPLGetLastErrorType();
14437 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14438 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14439 : }
14440 : }
14441 : }
14442 : {
14443 : /* %typemap(out) OGRErr */
14444 49 : if ( result != 0 && bUseExceptions) {
14445 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14446 0 : SWIG_fail;
14447 : }
14448 : }
14449 : {
14450 : /* %typemap(ret) OGRErr */
14451 49 : if (resultobj == Py_None ) {
14452 0 : Py_DECREF(resultobj);
14453 0 : resultobj = 0;
14454 : }
14455 49 : if (resultobj == 0) {
14456 49 : resultobj = PyInt_FromLong( result );
14457 : }
14458 : }
14459 49 : return resultobj;
14460 : fail:
14461 0 : return NULL;
14462 : }
14463 :
14464 :
14465 18653 : SWIGINTERN PyObject *_wrap_Geometry_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14466 18653 : PyObject *resultobj = 0;
14467 18653 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14468 18653 : void *argp1 = 0 ;
14469 18653 : int res1 = 0 ;
14470 18653 : PyObject * obj0 = 0 ;
14471 18653 : OGRGeometryShadow *result = 0 ;
14472 :
14473 18653 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Clone",&obj0)) SWIG_fail;
14474 18653 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14475 18653 : if (!SWIG_IsOK(res1)) {
14476 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Clone" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14477 : }
14478 18653 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14479 : {
14480 18653 : if ( bUseExceptions ) {
14481 0 : CPLErrorReset();
14482 : }
14483 18653 : result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
14484 18653 : if ( bUseExceptions ) {
14485 0 : CPLErr eclass = CPLGetLastErrorType();
14486 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14487 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14488 : }
14489 : }
14490 : }
14491 18653 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
14492 18653 : return resultobj;
14493 : fail:
14494 0 : return NULL;
14495 : }
14496 :
14497 :
14498 183 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14499 183 : PyObject *resultobj = 0;
14500 183 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14501 183 : void *argp1 = 0 ;
14502 183 : int res1 = 0 ;
14503 183 : PyObject * obj0 = 0 ;
14504 : OGRwkbGeometryType result;
14505 :
14506 183 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryType",&obj0)) SWIG_fail;
14507 183 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14508 183 : if (!SWIG_IsOK(res1)) {
14509 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryType" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14510 : }
14511 183 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14512 : {
14513 183 : if ( bUseExceptions ) {
14514 0 : CPLErrorReset();
14515 : }
14516 183 : result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
14517 183 : if ( bUseExceptions ) {
14518 0 : CPLErr eclass = CPLGetLastErrorType();
14519 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14520 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14521 : }
14522 : }
14523 : }
14524 366 : resultobj = SWIG_From_int(static_cast< int >(result));
14525 183 : return resultobj;
14526 : fail:
14527 0 : return NULL;
14528 : }
14529 :
14530 :
14531 2992 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14532 2992 : PyObject *resultobj = 0;
14533 2992 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14534 2992 : void *argp1 = 0 ;
14535 2992 : int res1 = 0 ;
14536 2992 : PyObject * obj0 = 0 ;
14537 2992 : char *result = 0 ;
14538 :
14539 2992 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryName",&obj0)) SWIG_fail;
14540 2992 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14541 2992 : if (!SWIG_IsOK(res1)) {
14542 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryName" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14543 : }
14544 2992 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14545 : {
14546 2992 : if ( bUseExceptions ) {
14547 0 : CPLErrorReset();
14548 : }
14549 2992 : result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
14550 2992 : if ( bUseExceptions ) {
14551 0 : CPLErr eclass = CPLGetLastErrorType();
14552 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14553 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14554 : }
14555 : }
14556 : }
14557 2992 : resultobj = SWIG_FromCharPtr((const char *)result);
14558 2992 : return resultobj;
14559 : fail:
14560 0 : return NULL;
14561 : }
14562 :
14563 :
14564 12 : SWIGINTERN PyObject *_wrap_Geometry_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14565 12 : PyObject *resultobj = 0;
14566 12 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14567 12 : void *argp1 = 0 ;
14568 12 : int res1 = 0 ;
14569 12 : PyObject * obj0 = 0 ;
14570 : double result;
14571 :
14572 12 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Length",&obj0)) SWIG_fail;
14573 12 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14574 12 : if (!SWIG_IsOK(res1)) {
14575 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Length" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14576 : }
14577 12 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14578 : {
14579 12 : if ( bUseExceptions ) {
14580 0 : CPLErrorReset();
14581 : }
14582 12 : result = (double)OGRGeometryShadow_Length(arg1);
14583 12 : if ( bUseExceptions ) {
14584 0 : CPLErr eclass = CPLGetLastErrorType();
14585 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14586 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14587 : }
14588 : }
14589 : }
14590 12 : resultobj = SWIG_From_double(static_cast< double >(result));
14591 12 : return resultobj;
14592 : fail:
14593 0 : return NULL;
14594 : }
14595 :
14596 :
14597 3 : SWIGINTERN PyObject *_wrap_Geometry_Area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14598 3 : PyObject *resultobj = 0;
14599 3 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14600 3 : void *argp1 = 0 ;
14601 3 : int res1 = 0 ;
14602 3 : PyObject * obj0 = 0 ;
14603 : double result;
14604 :
14605 3 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Area",&obj0)) SWIG_fail;
14606 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14607 3 : if (!SWIG_IsOK(res1)) {
14608 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Area" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14609 : }
14610 3 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14611 : {
14612 3 : if ( bUseExceptions ) {
14613 0 : CPLErrorReset();
14614 : }
14615 3 : result = (double)OGRGeometryShadow_Area(arg1);
14616 3 : if ( bUseExceptions ) {
14617 0 : CPLErr eclass = CPLGetLastErrorType();
14618 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14619 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14620 : }
14621 : }
14622 : }
14623 3 : resultobj = SWIG_From_double(static_cast< double >(result));
14624 3 : return resultobj;
14625 : fail:
14626 0 : return NULL;
14627 : }
14628 :
14629 :
14630 5 : SWIGINTERN PyObject *_wrap_Geometry_GetArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14631 5 : PyObject *resultobj = 0;
14632 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14633 5 : void *argp1 = 0 ;
14634 5 : int res1 = 0 ;
14635 5 : PyObject * obj0 = 0 ;
14636 : double result;
14637 :
14638 5 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetArea",&obj0)) SWIG_fail;
14639 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14640 5 : if (!SWIG_IsOK(res1)) {
14641 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14642 : }
14643 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14644 : {
14645 5 : if ( bUseExceptions ) {
14646 0 : CPLErrorReset();
14647 : }
14648 5 : result = (double)OGRGeometryShadow_GetArea(arg1);
14649 5 : if ( bUseExceptions ) {
14650 0 : CPLErr eclass = CPLGetLastErrorType();
14651 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14652 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14653 : }
14654 : }
14655 : }
14656 5 : resultobj = SWIG_From_double(static_cast< double >(result));
14657 5 : return resultobj;
14658 : fail:
14659 0 : return NULL;
14660 : }
14661 :
14662 :
14663 3906 : SWIGINTERN PyObject *_wrap_Geometry_GetPointCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14664 3906 : PyObject *resultobj = 0;
14665 3906 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14666 3906 : void *argp1 = 0 ;
14667 3906 : int res1 = 0 ;
14668 3906 : PyObject * obj0 = 0 ;
14669 : int result;
14670 :
14671 3906 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetPointCount",&obj0)) SWIG_fail;
14672 3906 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14673 3906 : if (!SWIG_IsOK(res1)) {
14674 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14675 : }
14676 3906 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14677 : {
14678 3906 : if ( bUseExceptions ) {
14679 0 : CPLErrorReset();
14680 : }
14681 3906 : result = (int)OGRGeometryShadow_GetPointCount(arg1);
14682 3906 : if ( bUseExceptions ) {
14683 0 : CPLErr eclass = CPLGetLastErrorType();
14684 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14685 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14686 : }
14687 : }
14688 : }
14689 3906 : resultobj = SWIG_From_int(static_cast< int >(result));
14690 3906 : return resultobj;
14691 : fail:
14692 0 : return NULL;
14693 : }
14694 :
14695 :
14696 11 : SWIGINTERN PyObject *_wrap_Geometry_GetPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
14697 11 : PyObject *resultobj = 0;
14698 11 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14699 11 : int *arg2 = (int *) 0 ;
14700 11 : double **arg3 = (double **) 0 ;
14701 11 : double **arg4 = (double **) 0 ;
14702 11 : int arg5 = (int) 0 ;
14703 11 : void *argp1 = 0 ;
14704 11 : int res1 = 0 ;
14705 11 : int nPoints2 = 0 ;
14706 11 : double *padfXY2 = NULL ;
14707 11 : double *padfZ2 = NULL ;
14708 : int val5 ;
14709 11 : int ecode5 = 0 ;
14710 11 : PyObject * obj0 = 0 ;
14711 11 : PyObject * obj1 = 0 ;
14712 : char * kwnames[] = {
14713 : (char *) "self",(char *) "nCoordDimension", NULL
14714 11 : };
14715 :
14716 : {
14717 : /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
14718 11 : arg2 = &nPoints2;
14719 11 : arg3 = &padfXY2;
14720 11 : arg4 = &padfZ2;
14721 : }
14722 11 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetPoints",kwnames,&obj0,&obj1)) SWIG_fail;
14723 11 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14724 11 : if (!SWIG_IsOK(res1)) {
14725 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoints" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14726 : }
14727 11 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14728 11 : if (obj1) {
14729 4 : ecode5 = SWIG_AsVal_int(obj1, &val5);
14730 4 : if (!SWIG_IsOK(ecode5)) {
14731 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_GetPoints" "', argument " "5"" of type '" "int""'");
14732 : }
14733 4 : arg5 = static_cast< int >(val5);
14734 : }
14735 : {
14736 11 : if ( bUseExceptions ) {
14737 0 : CPLErrorReset();
14738 : }
14739 11 : OGRGeometryShadow_GetPoints(arg1,arg2,arg3,arg4,arg5);
14740 11 : if ( bUseExceptions ) {
14741 0 : CPLErr eclass = CPLGetLastErrorType();
14742 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14743 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14744 : }
14745 : }
14746 : }
14747 11 : resultobj = SWIG_Py_Void();
14748 : {
14749 : /* %typemap(argout) (int* pnCount, double** ppadfXY, double** ppadfZ) */
14750 11 : Py_DECREF(resultobj);
14751 11 : int nPointCount = *(arg2);
14752 11 : if (nPointCount == 0)
14753 : {
14754 0 : resultobj = Py_None;
14755 : }
14756 : else
14757 : {
14758 11 : PyObject *xyz = PyList_New( nPointCount );
14759 11 : int nDimensions = (*arg4 != NULL) ? 3 : 2;
14760 939 : for( int i=0; i< nPointCount; i++ ) {
14761 928 : PyObject *tuple = PyTuple_New( nDimensions );
14762 928 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (*arg3)[2*i] ) );
14763 928 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (*arg3)[2*i+1] ) );
14764 928 : if (nDimensions == 3)
14765 922 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (*arg4)[i] ) );
14766 928 : PyList_SetItem( xyz, i, tuple );
14767 : }
14768 11 : resultobj = xyz;
14769 : }
14770 : }
14771 : {
14772 : /* %typemap(freearg) (int* pnCount, double** ppadfXY, double** ppadfZ) */
14773 11 : VSIFree(*arg3);
14774 11 : VSIFree(*arg4);
14775 : }
14776 11 : return resultobj;
14777 : fail:
14778 : {
14779 : /* %typemap(freearg) (int* pnCount, double** ppadfXY, double** ppadfZ) */
14780 0 : VSIFree(*arg3);
14781 0 : VSIFree(*arg4);
14782 : }
14783 0 : return NULL;
14784 : }
14785 :
14786 :
14787 17620 : SWIGINTERN PyObject *_wrap_Geometry_GetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
14788 17620 : PyObject *resultobj = 0;
14789 17620 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14790 17620 : int arg2 = (int) 0 ;
14791 17620 : void *argp1 = 0 ;
14792 17620 : int res1 = 0 ;
14793 : int val2 ;
14794 17620 : int ecode2 = 0 ;
14795 17620 : PyObject * obj0 = 0 ;
14796 17620 : PyObject * obj1 = 0 ;
14797 : char * kwnames[] = {
14798 : (char *) "self",(char *) "point", NULL
14799 17620 : };
14800 : double result;
14801 :
14802 17620 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetX",kwnames,&obj0,&obj1)) SWIG_fail;
14803 17620 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14804 17620 : if (!SWIG_IsOK(res1)) {
14805 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetX" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14806 : }
14807 17620 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14808 17620 : if (obj1) {
14809 17618 : ecode2 = SWIG_AsVal_int(obj1, &val2);
14810 17618 : if (!SWIG_IsOK(ecode2)) {
14811 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetX" "', argument " "2"" of type '" "int""'");
14812 : }
14813 17618 : arg2 = static_cast< int >(val2);
14814 : }
14815 : {
14816 17620 : if ( bUseExceptions ) {
14817 0 : CPLErrorReset();
14818 : }
14819 17620 : result = (double)OGRGeometryShadow_GetX(arg1,arg2);
14820 17620 : if ( bUseExceptions ) {
14821 0 : CPLErr eclass = CPLGetLastErrorType();
14822 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14823 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14824 : }
14825 : }
14826 : }
14827 17620 : resultobj = SWIG_From_double(static_cast< double >(result));
14828 17620 : return resultobj;
14829 : fail:
14830 0 : return NULL;
14831 : }
14832 :
14833 :
14834 17620 : SWIGINTERN PyObject *_wrap_Geometry_GetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
14835 17620 : PyObject *resultobj = 0;
14836 17620 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14837 17620 : int arg2 = (int) 0 ;
14838 17620 : void *argp1 = 0 ;
14839 17620 : int res1 = 0 ;
14840 : int val2 ;
14841 17620 : int ecode2 = 0 ;
14842 17620 : PyObject * obj0 = 0 ;
14843 17620 : PyObject * obj1 = 0 ;
14844 : char * kwnames[] = {
14845 : (char *) "self",(char *) "point", NULL
14846 17620 : };
14847 : double result;
14848 :
14849 17620 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetY",kwnames,&obj0,&obj1)) SWIG_fail;
14850 17620 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14851 17620 : if (!SWIG_IsOK(res1)) {
14852 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetY" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14853 : }
14854 17620 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14855 17620 : if (obj1) {
14856 17618 : ecode2 = SWIG_AsVal_int(obj1, &val2);
14857 17618 : if (!SWIG_IsOK(ecode2)) {
14858 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetY" "', argument " "2"" of type '" "int""'");
14859 : }
14860 17618 : arg2 = static_cast< int >(val2);
14861 : }
14862 : {
14863 17620 : if ( bUseExceptions ) {
14864 0 : CPLErrorReset();
14865 : }
14866 17620 : result = (double)OGRGeometryShadow_GetY(arg1,arg2);
14867 17620 : if ( bUseExceptions ) {
14868 0 : CPLErr eclass = CPLGetLastErrorType();
14869 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14870 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14871 : }
14872 : }
14873 : }
14874 17620 : resultobj = SWIG_From_double(static_cast< double >(result));
14875 17620 : return resultobj;
14876 : fail:
14877 0 : return NULL;
14878 : }
14879 :
14880 :
14881 17374 : SWIGINTERN PyObject *_wrap_Geometry_GetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
14882 17374 : PyObject *resultobj = 0;
14883 17374 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14884 17374 : int arg2 = (int) 0 ;
14885 17374 : void *argp1 = 0 ;
14886 17374 : int res1 = 0 ;
14887 : int val2 ;
14888 17374 : int ecode2 = 0 ;
14889 17374 : PyObject * obj0 = 0 ;
14890 17374 : PyObject * obj1 = 0 ;
14891 : char * kwnames[] = {
14892 : (char *) "self",(char *) "point", NULL
14893 17374 : };
14894 : double result;
14895 :
14896 17374 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetZ",kwnames,&obj0,&obj1)) SWIG_fail;
14897 17374 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14898 17374 : if (!SWIG_IsOK(res1)) {
14899 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetZ" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14900 : }
14901 17374 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14902 17374 : if (obj1) {
14903 17374 : ecode2 = SWIG_AsVal_int(obj1, &val2);
14904 17374 : if (!SWIG_IsOK(ecode2)) {
14905 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetZ" "', argument " "2"" of type '" "int""'");
14906 : }
14907 17374 : arg2 = static_cast< int >(val2);
14908 : }
14909 : {
14910 17374 : if ( bUseExceptions ) {
14911 0 : CPLErrorReset();
14912 : }
14913 17374 : result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
14914 17374 : if ( bUseExceptions ) {
14915 0 : CPLErr eclass = CPLGetLastErrorType();
14916 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14917 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14918 : }
14919 : }
14920 : }
14921 17374 : resultobj = SWIG_From_double(static_cast< double >(result));
14922 17374 : return resultobj;
14923 : fail:
14924 0 : return NULL;
14925 : }
14926 :
14927 :
14928 4 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14929 4 : PyObject *resultobj = 0;
14930 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14931 4 : int arg2 = (int) 0 ;
14932 4 : double *arg3 = (double *) (double *)NULL ;
14933 4 : void *argp1 = 0 ;
14934 4 : int res1 = 0 ;
14935 : int val2 ;
14936 4 : int ecode2 = 0 ;
14937 : double argout3[3] ;
14938 4 : PyObject * obj0 = 0 ;
14939 4 : PyObject * obj1 = 0 ;
14940 :
14941 : {
14942 : /* %typemap(in,numinputs=0) (double argout3[ANY]) */
14943 4 : arg3 = argout3;
14944 : }
14945 4 : if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPoint",&obj0,&obj1)) SWIG_fail;
14946 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
14947 4 : if (!SWIG_IsOK(res1)) {
14948 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
14949 : }
14950 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
14951 4 : if (obj1) {
14952 4 : ecode2 = SWIG_AsVal_int(obj1, &val2);
14953 4 : if (!SWIG_IsOK(ecode2)) {
14954 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint" "', argument " "2"" of type '" "int""'");
14955 : }
14956 4 : arg2 = static_cast< int >(val2);
14957 : }
14958 : {
14959 4 : if ( bUseExceptions ) {
14960 0 : CPLErrorReset();
14961 : }
14962 : OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
14963 4 : if ( bUseExceptions ) {
14964 0 : CPLErr eclass = CPLGetLastErrorType();
14965 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14966 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14967 : }
14968 : }
14969 : }
14970 4 : resultobj = SWIG_Py_Void();
14971 : {
14972 : /* %typemap(argout) (double argout[ANY]) */
14973 4 : PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
14974 4 : resultobj = t_output_helper(resultobj,out);
14975 : }
14976 4 : return resultobj;
14977 : fail:
14978 0 : return NULL;
14979 : }
14980 :
14981 :
14982 2 : SWIGINTERN PyObject *_wrap_Geometry_GetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14983 2 : PyObject *resultobj = 0;
14984 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
14985 2 : int arg2 = (int) 0 ;
14986 2 : double *arg3 = (double *) (double *)NULL ;
14987 2 : void *argp1 = 0 ;
14988 2 : int res1 = 0 ;
14989 : int val2 ;
14990 2 : int ecode2 = 0 ;
14991 : double argout3[2] ;
14992 2 : PyObject * obj0 = 0 ;
14993 2 : PyObject * obj1 = 0 ;
14994 :
14995 : {
14996 : /* %typemap(in,numinputs=0) (double argout3[ANY]) */
14997 2 : arg3 = argout3;
14998 : }
14999 2 : if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPoint_2D",&obj0,&obj1)) SWIG_fail;
15000 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15001 2 : if (!SWIG_IsOK(res1)) {
15002 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15003 : }
15004 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15005 2 : if (obj1) {
15006 2 : ecode2 = SWIG_AsVal_int(obj1, &val2);
15007 2 : if (!SWIG_IsOK(ecode2)) {
15008 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint_2D" "', argument " "2"" of type '" "int""'");
15009 : }
15010 2 : arg2 = static_cast< int >(val2);
15011 : }
15012 : {
15013 2 : if ( bUseExceptions ) {
15014 0 : CPLErrorReset();
15015 : }
15016 : OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
15017 2 : if ( bUseExceptions ) {
15018 0 : CPLErr eclass = CPLGetLastErrorType();
15019 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15020 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15021 : }
15022 : }
15023 : }
15024 2 : resultobj = SWIG_Py_Void();
15025 : {
15026 : /* %typemap(argout) (double argout[ANY]) */
15027 2 : PyObject *out = CreateTupleFromDoubleArray( arg3, 2 );
15028 2 : resultobj = t_output_helper(resultobj,out);
15029 : }
15030 2 : return resultobj;
15031 : fail:
15032 0 : return NULL;
15033 : }
15034 :
15035 :
15036 4891 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15037 4891 : PyObject *resultobj = 0;
15038 4891 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15039 4891 : void *argp1 = 0 ;
15040 4891 : int res1 = 0 ;
15041 4891 : PyObject * obj0 = 0 ;
15042 : int result;
15043 :
15044 4891 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryCount",&obj0)) SWIG_fail;
15045 4891 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15046 4891 : if (!SWIG_IsOK(res1)) {
15047 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15048 : }
15049 4891 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15050 : {
15051 4891 : if ( bUseExceptions ) {
15052 0 : CPLErrorReset();
15053 : }
15054 4891 : result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
15055 4891 : if ( bUseExceptions ) {
15056 0 : CPLErr eclass = CPLGetLastErrorType();
15057 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15058 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15059 : }
15060 : }
15061 : }
15062 4891 : resultobj = SWIG_From_int(static_cast< int >(result));
15063 4891 : return resultobj;
15064 : fail:
15065 0 : return NULL;
15066 : }
15067 :
15068 :
15069 250 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
15070 250 : PyObject *resultobj = 0;
15071 250 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15072 : int arg2 ;
15073 : double arg3 ;
15074 : double arg4 ;
15075 250 : double arg5 = (double) 0 ;
15076 250 : void *argp1 = 0 ;
15077 250 : int res1 = 0 ;
15078 : int val2 ;
15079 250 : int ecode2 = 0 ;
15080 : double val3 ;
15081 250 : int ecode3 = 0 ;
15082 : double val4 ;
15083 250 : int ecode4 = 0 ;
15084 : double val5 ;
15085 250 : int ecode5 = 0 ;
15086 250 : PyObject * obj0 = 0 ;
15087 250 : PyObject * obj1 = 0 ;
15088 250 : PyObject * obj2 = 0 ;
15089 250 : PyObject * obj3 = 0 ;
15090 250 : PyObject * obj4 = 0 ;
15091 : char * kwnames[] = {
15092 : (char *) "self",(char *) "point",(char *) "x",(char *) "y",(char *) "z", NULL
15093 250 : };
15094 :
15095 250 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:Geometry_SetPoint",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15096 250 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15097 250 : if (!SWIG_IsOK(res1)) {
15098 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15099 : }
15100 250 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15101 250 : ecode2 = SWIG_AsVal_int(obj1, &val2);
15102 250 : if (!SWIG_IsOK(ecode2)) {
15103 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint" "', argument " "2"" of type '" "int""'");
15104 : }
15105 250 : arg2 = static_cast< int >(val2);
15106 250 : ecode3 = SWIG_AsVal_double(obj2, &val3);
15107 250 : if (!SWIG_IsOK(ecode3)) {
15108 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint" "', argument " "3"" of type '" "double""'");
15109 : }
15110 250 : arg3 = static_cast< double >(val3);
15111 250 : ecode4 = SWIG_AsVal_double(obj3, &val4);
15112 250 : if (!SWIG_IsOK(ecode4)) {
15113 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint" "', argument " "4"" of type '" "double""'");
15114 : }
15115 250 : arg4 = static_cast< double >(val4);
15116 250 : if (obj4) {
15117 248 : ecode5 = SWIG_AsVal_double(obj4, &val5);
15118 248 : if (!SWIG_IsOK(ecode5)) {
15119 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPoint" "', argument " "5"" of type '" "double""'");
15120 : }
15121 248 : arg5 = static_cast< double >(val5);
15122 : }
15123 : {
15124 250 : if ( bUseExceptions ) {
15125 0 : CPLErrorReset();
15126 : }
15127 : OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
15128 250 : if ( bUseExceptions ) {
15129 0 : CPLErr eclass = CPLGetLastErrorType();
15130 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15131 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15132 : }
15133 : }
15134 : }
15135 250 : resultobj = SWIG_Py_Void();
15136 250 : return resultobj;
15137 : fail:
15138 0 : return NULL;
15139 : }
15140 :
15141 :
15142 1 : SWIGINTERN PyObject *_wrap_Geometry_SetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
15143 1 : PyObject *resultobj = 0;
15144 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15145 : int arg2 ;
15146 : double arg3 ;
15147 : double arg4 ;
15148 1 : void *argp1 = 0 ;
15149 1 : int res1 = 0 ;
15150 : int val2 ;
15151 1 : int ecode2 = 0 ;
15152 : double val3 ;
15153 1 : int ecode3 = 0 ;
15154 : double val4 ;
15155 1 : int ecode4 = 0 ;
15156 1 : PyObject * obj0 = 0 ;
15157 1 : PyObject * obj1 = 0 ;
15158 1 : PyObject * obj2 = 0 ;
15159 1 : PyObject * obj3 = 0 ;
15160 : char * kwnames[] = {
15161 : (char *) "self",(char *) "point",(char *) "x",(char *) "y", NULL
15162 1 : };
15163 :
15164 1 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Geometry_SetPoint_2D",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
15165 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15166 1 : if (!SWIG_IsOK(res1)) {
15167 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15168 : }
15169 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15170 1 : ecode2 = SWIG_AsVal_int(obj1, &val2);
15171 1 : if (!SWIG_IsOK(ecode2)) {
15172 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint_2D" "', argument " "2"" of type '" "int""'");
15173 : }
15174 1 : arg2 = static_cast< int >(val2);
15175 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
15176 1 : if (!SWIG_IsOK(ecode3)) {
15177 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint_2D" "', argument " "3"" of type '" "double""'");
15178 : }
15179 1 : arg3 = static_cast< double >(val3);
15180 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
15181 1 : if (!SWIG_IsOK(ecode4)) {
15182 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint_2D" "', argument " "4"" of type '" "double""'");
15183 : }
15184 1 : arg4 = static_cast< double >(val4);
15185 : {
15186 1 : if ( bUseExceptions ) {
15187 0 : CPLErrorReset();
15188 : }
15189 : OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
15190 1 : if ( bUseExceptions ) {
15191 0 : CPLErr eclass = CPLGetLastErrorType();
15192 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15193 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15194 : }
15195 : }
15196 : }
15197 1 : resultobj = SWIG_Py_Void();
15198 1 : return resultobj;
15199 : fail:
15200 0 : return NULL;
15201 : }
15202 :
15203 :
15204 2397 : SWIGINTERN PyObject *_wrap_Geometry_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15205 2397 : PyObject *resultobj = 0;
15206 2397 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15207 : int arg2 ;
15208 2397 : void *argp1 = 0 ;
15209 2397 : int res1 = 0 ;
15210 : int val2 ;
15211 2397 : int ecode2 = 0 ;
15212 2397 : PyObject * obj0 = 0 ;
15213 2397 : PyObject * obj1 = 0 ;
15214 2397 : OGRGeometryShadow *result = 0 ;
15215 :
15216 2397 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_GetGeometryRef",&obj0,&obj1)) SWIG_fail;
15217 1567 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15218 1567 : if (!SWIG_IsOK(res1)) {
15219 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryRef" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15220 : }
15221 1567 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15222 1567 : ecode2 = SWIG_AsVal_int(obj1, &val2);
15223 1567 : if (!SWIG_IsOK(ecode2)) {
15224 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetGeometryRef" "', argument " "2"" of type '" "int""'");
15225 : }
15226 1567 : arg2 = static_cast< int >(val2);
15227 : {
15228 1567 : if ( bUseExceptions ) {
15229 0 : CPLErrorReset();
15230 : }
15231 1567 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
15232 1567 : if ( bUseExceptions ) {
15233 0 : CPLErr eclass = CPLGetLastErrorType();
15234 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15235 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15236 : }
15237 : }
15238 : }
15239 1567 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15240 1567 : return resultobj;
15241 : fail:
15242 830 : return NULL;
15243 : }
15244 :
15245 :
15246 1 : SWIGINTERN PyObject *_wrap_Geometry_Simplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15247 1 : PyObject *resultobj = 0;
15248 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15249 : double arg2 ;
15250 1 : void *argp1 = 0 ;
15251 1 : int res1 = 0 ;
15252 : double val2 ;
15253 1 : int ecode2 = 0 ;
15254 1 : PyObject * obj0 = 0 ;
15255 1 : PyObject * obj1 = 0 ;
15256 1 : OGRGeometryShadow *result = 0 ;
15257 :
15258 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Simplify",&obj0,&obj1)) SWIG_fail;
15259 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15260 1 : if (!SWIG_IsOK(res1)) {
15261 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Simplify" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15262 : }
15263 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15264 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
15265 1 : if (!SWIG_IsOK(ecode2)) {
15266 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Simplify" "', argument " "2"" of type '" "double""'");
15267 : }
15268 1 : arg2 = static_cast< double >(val2);
15269 : {
15270 1 : if ( bUseExceptions ) {
15271 0 : CPLErrorReset();
15272 : }
15273 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
15274 1 : if ( bUseExceptions ) {
15275 0 : CPLErr eclass = CPLGetLastErrorType();
15276 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15277 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15278 : }
15279 : }
15280 : }
15281 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15282 1 : return resultobj;
15283 : fail:
15284 0 : return NULL;
15285 : }
15286 :
15287 :
15288 1 : SWIGINTERN PyObject *_wrap_Geometry_SimplifyPreserveTopology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15289 1 : PyObject *resultobj = 0;
15290 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15291 : double arg2 ;
15292 1 : void *argp1 = 0 ;
15293 1 : int res1 = 0 ;
15294 : double val2 ;
15295 1 : int ecode2 = 0 ;
15296 1 : PyObject * obj0 = 0 ;
15297 1 : PyObject * obj1 = 0 ;
15298 1 : OGRGeometryShadow *result = 0 ;
15299 :
15300 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SimplifyPreserveTopology",&obj0,&obj1)) SWIG_fail;
15301 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15302 1 : if (!SWIG_IsOK(res1)) {
15303 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15304 : }
15305 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15306 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
15307 1 : if (!SWIG_IsOK(ecode2)) {
15308 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "2"" of type '" "double""'");
15309 : }
15310 1 : arg2 = static_cast< double >(val2);
15311 : {
15312 1 : if ( bUseExceptions ) {
15313 0 : CPLErrorReset();
15314 : }
15315 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
15316 1 : if ( bUseExceptions ) {
15317 0 : CPLErr eclass = CPLGetLastErrorType();
15318 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15319 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15320 : }
15321 : }
15322 : }
15323 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15324 1 : return resultobj;
15325 : fail:
15326 0 : return NULL;
15327 : }
15328 :
15329 :
15330 1 : SWIGINTERN PyObject *_wrap_Geometry_Boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15331 1 : PyObject *resultobj = 0;
15332 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15333 1 : void *argp1 = 0 ;
15334 1 : int res1 = 0 ;
15335 1 : PyObject * obj0 = 0 ;
15336 1 : OGRGeometryShadow *result = 0 ;
15337 :
15338 1 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Boundary",&obj0)) SWIG_fail;
15339 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15340 1 : if (!SWIG_IsOK(res1)) {
15341 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Boundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15342 : }
15343 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15344 : {
15345 1 : if ( bUseExceptions ) {
15346 0 : CPLErrorReset();
15347 : }
15348 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
15349 1 : if ( bUseExceptions ) {
15350 0 : CPLErr eclass = CPLGetLastErrorType();
15351 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15352 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15353 : }
15354 : }
15355 : }
15356 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15357 1 : return resultobj;
15358 : fail:
15359 0 : return NULL;
15360 : }
15361 :
15362 :
15363 5 : SWIGINTERN PyObject *_wrap_Geometry_GetBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15364 5 : PyObject *resultobj = 0;
15365 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15366 5 : void *argp1 = 0 ;
15367 5 : int res1 = 0 ;
15368 5 : PyObject * obj0 = 0 ;
15369 5 : OGRGeometryShadow *result = 0 ;
15370 :
15371 5 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetBoundary",&obj0)) SWIG_fail;
15372 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15373 5 : if (!SWIG_IsOK(res1)) {
15374 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetBoundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15375 : }
15376 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15377 : {
15378 5 : if ( bUseExceptions ) {
15379 0 : CPLErrorReset();
15380 : }
15381 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
15382 5 : if ( bUseExceptions ) {
15383 0 : CPLErr eclass = CPLGetLastErrorType();
15384 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15385 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15386 : }
15387 : }
15388 : }
15389 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15390 5 : return resultobj;
15391 : fail:
15392 0 : return NULL;
15393 : }
15394 :
15395 :
15396 1 : SWIGINTERN PyObject *_wrap_Geometry_ConvexHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15397 1 : PyObject *resultobj = 0;
15398 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15399 1 : void *argp1 = 0 ;
15400 1 : int res1 = 0 ;
15401 1 : PyObject * obj0 = 0 ;
15402 1 : OGRGeometryShadow *result = 0 ;
15403 :
15404 1 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ConvexHull",&obj0)) SWIG_fail;
15405 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15406 1 : if (!SWIG_IsOK(res1)) {
15407 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConvexHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15408 : }
15409 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15410 : {
15411 1 : if ( bUseExceptions ) {
15412 0 : CPLErrorReset();
15413 : }
15414 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
15415 1 : if ( bUseExceptions ) {
15416 0 : CPLErr eclass = CPLGetLastErrorType();
15417 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15418 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15419 : }
15420 : }
15421 : }
15422 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15423 1 : return resultobj;
15424 : fail:
15425 0 : return NULL;
15426 : }
15427 :
15428 :
15429 2 : SWIGINTERN PyObject *_wrap_Geometry_Buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
15430 2 : PyObject *resultobj = 0;
15431 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15432 : double arg2 ;
15433 2 : int arg3 = (int) 30 ;
15434 2 : void *argp1 = 0 ;
15435 2 : int res1 = 0 ;
15436 : double val2 ;
15437 2 : int ecode2 = 0 ;
15438 : int val3 ;
15439 2 : int ecode3 = 0 ;
15440 2 : PyObject * obj0 = 0 ;
15441 2 : PyObject * obj1 = 0 ;
15442 2 : PyObject * obj2 = 0 ;
15443 : char * kwnames[] = {
15444 : (char *) "self",(char *) "distance",(char *) "quadsecs", NULL
15445 2 : };
15446 2 : OGRGeometryShadow *result = 0 ;
15447 :
15448 2 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Geometry_Buffer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
15449 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15450 2 : if (!SWIG_IsOK(res1)) {
15451 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15452 : }
15453 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15454 2 : ecode2 = SWIG_AsVal_double(obj1, &val2);
15455 2 : if (!SWIG_IsOK(ecode2)) {
15456 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
15457 : }
15458 2 : arg2 = static_cast< double >(val2);
15459 2 : if (obj2) {
15460 1 : ecode3 = SWIG_AsVal_int(obj2, &val3);
15461 1 : if (!SWIG_IsOK(ecode3)) {
15462 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Buffer" "', argument " "3"" of type '" "int""'");
15463 : }
15464 1 : arg3 = static_cast< int >(val3);
15465 : }
15466 : {
15467 2 : if ( bUseExceptions ) {
15468 0 : CPLErrorReset();
15469 : }
15470 2 : result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
15471 2 : if ( bUseExceptions ) {
15472 0 : CPLErr eclass = CPLGetLastErrorType();
15473 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15474 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15475 : }
15476 : }
15477 : }
15478 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15479 2 : return resultobj;
15480 : fail:
15481 0 : return NULL;
15482 : }
15483 :
15484 :
15485 49 : SWIGINTERN PyObject *_wrap_Geometry_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15486 49 : PyObject *resultobj = 0;
15487 49 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15488 49 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
15489 49 : void *argp1 = 0 ;
15490 49 : int res1 = 0 ;
15491 49 : void *argp2 = 0 ;
15492 49 : int res2 = 0 ;
15493 49 : PyObject * obj0 = 0 ;
15494 49 : PyObject * obj1 = 0 ;
15495 49 : OGRGeometryShadow *result = 0 ;
15496 :
15497 49 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersection",&obj0,&obj1)) SWIG_fail;
15498 49 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15499 49 : if (!SWIG_IsOK(res1)) {
15500 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersection" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15501 : }
15502 49 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15503 49 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15504 49 : if (!SWIG_IsOK(res2)) {
15505 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersection" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
15506 : }
15507 49 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
15508 : {
15509 49 : if (!arg2) {
15510 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
15511 : }
15512 : }
15513 : {
15514 49 : if ( bUseExceptions ) {
15515 0 : CPLErrorReset();
15516 : }
15517 49 : result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
15518 49 : if ( bUseExceptions ) {
15519 0 : CPLErr eclass = CPLGetLastErrorType();
15520 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15521 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15522 : }
15523 : }
15524 : }
15525 49 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15526 49 : return resultobj;
15527 : fail:
15528 0 : return NULL;
15529 : }
15530 :
15531 :
15532 7 : SWIGINTERN PyObject *_wrap_Geometry_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15533 7 : PyObject *resultobj = 0;
15534 7 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15535 7 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
15536 7 : void *argp1 = 0 ;
15537 7 : int res1 = 0 ;
15538 7 : void *argp2 = 0 ;
15539 7 : int res2 = 0 ;
15540 7 : PyObject * obj0 = 0 ;
15541 7 : PyObject * obj1 = 0 ;
15542 7 : OGRGeometryShadow *result = 0 ;
15543 :
15544 7 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Union",&obj0,&obj1)) SWIG_fail;
15545 7 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15546 7 : if (!SWIG_IsOK(res1)) {
15547 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Union" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15548 : }
15549 7 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15550 7 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15551 7 : if (!SWIG_IsOK(res2)) {
15552 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Union" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
15553 : }
15554 7 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
15555 : {
15556 7 : if (!arg2) {
15557 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
15558 : }
15559 : }
15560 : {
15561 7 : if ( bUseExceptions ) {
15562 0 : CPLErrorReset();
15563 : }
15564 7 : result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
15565 7 : if ( bUseExceptions ) {
15566 0 : CPLErr eclass = CPLGetLastErrorType();
15567 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15568 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15569 : }
15570 : }
15571 : }
15572 7 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15573 7 : return resultobj;
15574 : fail:
15575 0 : return NULL;
15576 : }
15577 :
15578 :
15579 1 : SWIGINTERN PyObject *_wrap_Geometry_UnionCascaded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15580 1 : PyObject *resultobj = 0;
15581 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15582 1 : void *argp1 = 0 ;
15583 1 : int res1 = 0 ;
15584 1 : PyObject * obj0 = 0 ;
15585 1 : OGRGeometryShadow *result = 0 ;
15586 :
15587 1 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_UnionCascaded",&obj0)) SWIG_fail;
15588 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15589 1 : if (!SWIG_IsOK(res1)) {
15590 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnionCascaded" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15591 : }
15592 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15593 : {
15594 1 : if ( bUseExceptions ) {
15595 0 : CPLErrorReset();
15596 : }
15597 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
15598 1 : if ( bUseExceptions ) {
15599 0 : CPLErr eclass = CPLGetLastErrorType();
15600 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15601 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15602 : }
15603 : }
15604 : }
15605 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15606 1 : return resultobj;
15607 : fail:
15608 0 : return NULL;
15609 : }
15610 :
15611 :
15612 5 : SWIGINTERN PyObject *_wrap_Geometry_Difference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15613 5 : PyObject *resultobj = 0;
15614 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15615 5 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
15616 5 : void *argp1 = 0 ;
15617 5 : int res1 = 0 ;
15618 5 : void *argp2 = 0 ;
15619 5 : int res2 = 0 ;
15620 5 : PyObject * obj0 = 0 ;
15621 5 : PyObject * obj1 = 0 ;
15622 5 : OGRGeometryShadow *result = 0 ;
15623 :
15624 5 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Difference",&obj0,&obj1)) SWIG_fail;
15625 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15626 5 : if (!SWIG_IsOK(res1)) {
15627 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Difference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15628 : }
15629 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15630 5 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15631 5 : if (!SWIG_IsOK(res2)) {
15632 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Difference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
15633 : }
15634 5 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
15635 : {
15636 5 : if (!arg2) {
15637 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
15638 : }
15639 : }
15640 : {
15641 5 : if ( bUseExceptions ) {
15642 0 : CPLErrorReset();
15643 : }
15644 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
15645 5 : if ( bUseExceptions ) {
15646 0 : CPLErr eclass = CPLGetLastErrorType();
15647 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15648 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15649 : }
15650 : }
15651 : }
15652 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15653 5 : return resultobj;
15654 : fail:
15655 0 : return NULL;
15656 : }
15657 :
15658 :
15659 5 : SWIGINTERN PyObject *_wrap_Geometry_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15660 5 : PyObject *resultobj = 0;
15661 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15662 5 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
15663 5 : void *argp1 = 0 ;
15664 5 : int res1 = 0 ;
15665 5 : void *argp2 = 0 ;
15666 5 : int res2 = 0 ;
15667 5 : PyObject * obj0 = 0 ;
15668 5 : PyObject * obj1 = 0 ;
15669 5 : OGRGeometryShadow *result = 0 ;
15670 :
15671 5 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymDifference",&obj0,&obj1)) SWIG_fail;
15672 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15673 5 : if (!SWIG_IsOK(res1)) {
15674 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15675 : }
15676 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15677 5 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15678 5 : if (!SWIG_IsOK(res2)) {
15679 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
15680 : }
15681 5 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
15682 : {
15683 5 : if (!arg2) {
15684 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
15685 : }
15686 : }
15687 : {
15688 5 : if ( bUseExceptions ) {
15689 0 : CPLErrorReset();
15690 : }
15691 5 : result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
15692 5 : if ( bUseExceptions ) {
15693 0 : CPLErr eclass = CPLGetLastErrorType();
15694 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15695 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15696 : }
15697 : }
15698 : }
15699 5 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15700 5 : return resultobj;
15701 : fail:
15702 0 : return NULL;
15703 : }
15704 :
15705 :
15706 1 : SWIGINTERN PyObject *_wrap_Geometry_SymmetricDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15707 1 : PyObject *resultobj = 0;
15708 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15709 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
15710 1 : void *argp1 = 0 ;
15711 1 : int res1 = 0 ;
15712 1 : void *argp2 = 0 ;
15713 1 : int res2 = 0 ;
15714 1 : PyObject * obj0 = 0 ;
15715 1 : PyObject * obj1 = 0 ;
15716 1 : OGRGeometryShadow *result = 0 ;
15717 :
15718 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymmetricDifference",&obj0,&obj1)) SWIG_fail;
15719 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15720 1 : if (!SWIG_IsOK(res1)) {
15721 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymmetricDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15722 : }
15723 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15724 1 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15725 1 : if (!SWIG_IsOK(res2)) {
15726 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymmetricDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
15727 : }
15728 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
15729 : {
15730 1 : if (!arg2) {
15731 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
15732 : }
15733 : }
15734 : {
15735 1 : if ( bUseExceptions ) {
15736 0 : CPLErrorReset();
15737 : }
15738 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
15739 1 : if ( bUseExceptions ) {
15740 0 : CPLErr eclass = CPLGetLastErrorType();
15741 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15742 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15743 : }
15744 : }
15745 : }
15746 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
15747 1 : return resultobj;
15748 : fail:
15749 0 : return NULL;
15750 : }
15751 :
15752 :
15753 1 : SWIGINTERN PyObject *_wrap_Geometry_Distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15754 1 : PyObject *resultobj = 0;
15755 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15756 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
15757 1 : void *argp1 = 0 ;
15758 1 : int res1 = 0 ;
15759 1 : void *argp2 = 0 ;
15760 1 : int res2 = 0 ;
15761 1 : PyObject * obj0 = 0 ;
15762 1 : PyObject * obj1 = 0 ;
15763 : double result;
15764 :
15765 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Distance",&obj0,&obj1)) SWIG_fail;
15766 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15767 1 : if (!SWIG_IsOK(res1)) {
15768 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15769 : }
15770 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15771 1 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15772 1 : if (!SWIG_IsOK(res2)) {
15773 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
15774 : }
15775 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
15776 : {
15777 1 : if (!arg2) {
15778 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
15779 : }
15780 : }
15781 : {
15782 1 : if ( bUseExceptions ) {
15783 0 : CPLErrorReset();
15784 : }
15785 1 : result = (double)OGRGeometryShadow_Distance(arg1,arg2);
15786 1 : if ( bUseExceptions ) {
15787 0 : CPLErr eclass = CPLGetLastErrorType();
15788 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15789 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15790 : }
15791 : }
15792 : }
15793 1 : resultobj = SWIG_From_double(static_cast< double >(result));
15794 1 : return resultobj;
15795 : fail:
15796 0 : return NULL;
15797 : }
15798 :
15799 :
15800 2 : SWIGINTERN PyObject *_wrap_Geometry_Empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15801 2 : PyObject *resultobj = 0;
15802 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15803 2 : void *argp1 = 0 ;
15804 2 : int res1 = 0 ;
15805 2 : PyObject * obj0 = 0 ;
15806 :
15807 2 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Empty",&obj0)) SWIG_fail;
15808 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15809 2 : if (!SWIG_IsOK(res1)) {
15810 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Empty" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15811 : }
15812 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15813 : {
15814 2 : if ( bUseExceptions ) {
15815 0 : CPLErrorReset();
15816 : }
15817 : OGRGeometryShadow_Empty(arg1);
15818 2 : if ( bUseExceptions ) {
15819 0 : CPLErr eclass = CPLGetLastErrorType();
15820 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15821 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15822 : }
15823 : }
15824 : }
15825 2 : resultobj = SWIG_Py_Void();
15826 2 : return resultobj;
15827 : fail:
15828 0 : return NULL;
15829 : }
15830 :
15831 :
15832 63 : SWIGINTERN PyObject *_wrap_Geometry_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15833 63 : PyObject *resultobj = 0;
15834 63 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15835 63 : void *argp1 = 0 ;
15836 63 : int res1 = 0 ;
15837 63 : PyObject * obj0 = 0 ;
15838 : bool result;
15839 :
15840 63 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsEmpty",&obj0)) SWIG_fail;
15841 63 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15842 63 : if (!SWIG_IsOK(res1)) {
15843 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsEmpty" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15844 : }
15845 63 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15846 : {
15847 63 : if ( bUseExceptions ) {
15848 0 : CPLErrorReset();
15849 : }
15850 63 : result = (bool)OGRGeometryShadow_IsEmpty(arg1);
15851 63 : if ( bUseExceptions ) {
15852 0 : CPLErr eclass = CPLGetLastErrorType();
15853 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15854 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15855 : }
15856 : }
15857 : }
15858 63 : resultobj = SWIG_From_bool(static_cast< bool >(result));
15859 63 : return resultobj;
15860 : fail:
15861 0 : return NULL;
15862 : }
15863 :
15864 :
15865 6 : SWIGINTERN PyObject *_wrap_Geometry_IsValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15866 6 : PyObject *resultobj = 0;
15867 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15868 6 : void *argp1 = 0 ;
15869 6 : int res1 = 0 ;
15870 6 : PyObject * obj0 = 0 ;
15871 : bool result;
15872 :
15873 6 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsValid",&obj0)) SWIG_fail;
15874 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15875 6 : if (!SWIG_IsOK(res1)) {
15876 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15877 : }
15878 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15879 : {
15880 6 : if ( bUseExceptions ) {
15881 0 : CPLErrorReset();
15882 : }
15883 6 : result = (bool)OGRGeometryShadow_IsValid(arg1);
15884 6 : if ( bUseExceptions ) {
15885 0 : CPLErr eclass = CPLGetLastErrorType();
15886 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15887 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15888 : }
15889 : }
15890 : }
15891 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
15892 6 : return resultobj;
15893 : fail:
15894 0 : return NULL;
15895 : }
15896 :
15897 :
15898 5 : SWIGINTERN PyObject *_wrap_Geometry_IsSimple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15899 5 : PyObject *resultobj = 0;
15900 5 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15901 5 : void *argp1 = 0 ;
15902 5 : int res1 = 0 ;
15903 5 : PyObject * obj0 = 0 ;
15904 : bool result;
15905 :
15906 5 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsSimple",&obj0)) SWIG_fail;
15907 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15908 5 : if (!SWIG_IsOK(res1)) {
15909 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsSimple" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15910 : }
15911 5 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15912 : {
15913 5 : if ( bUseExceptions ) {
15914 0 : CPLErrorReset();
15915 : }
15916 5 : result = (bool)OGRGeometryShadow_IsSimple(arg1);
15917 5 : if ( bUseExceptions ) {
15918 0 : CPLErr eclass = CPLGetLastErrorType();
15919 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15920 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15921 : }
15922 : }
15923 : }
15924 5 : resultobj = SWIG_From_bool(static_cast< bool >(result));
15925 5 : return resultobj;
15926 : fail:
15927 0 : return NULL;
15928 : }
15929 :
15930 :
15931 1 : SWIGINTERN PyObject *_wrap_Geometry_IsRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15932 1 : PyObject *resultobj = 0;
15933 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15934 1 : void *argp1 = 0 ;
15935 1 : int res1 = 0 ;
15936 1 : PyObject * obj0 = 0 ;
15937 : bool result;
15938 :
15939 1 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsRing",&obj0)) SWIG_fail;
15940 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15941 1 : if (!SWIG_IsOK(res1)) {
15942 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsRing" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15943 : }
15944 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15945 : {
15946 1 : if ( bUseExceptions ) {
15947 0 : CPLErrorReset();
15948 : }
15949 1 : result = (bool)OGRGeometryShadow_IsRing(arg1);
15950 1 : if ( bUseExceptions ) {
15951 0 : CPLErr eclass = CPLGetLastErrorType();
15952 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15953 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15954 : }
15955 : }
15956 : }
15957 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
15958 1 : return resultobj;
15959 : fail:
15960 0 : return NULL;
15961 : }
15962 :
15963 :
15964 4 : SWIGINTERN PyObject *_wrap_Geometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15965 4 : PyObject *resultobj = 0;
15966 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
15967 4 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
15968 4 : void *argp1 = 0 ;
15969 4 : int res1 = 0 ;
15970 4 : void *argp2 = 0 ;
15971 4 : int res2 = 0 ;
15972 4 : PyObject * obj0 = 0 ;
15973 4 : PyObject * obj1 = 0 ;
15974 : bool result;
15975 :
15976 4 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersects",&obj0,&obj1)) SWIG_fail;
15977 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15978 4 : if (!SWIG_IsOK(res1)) {
15979 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersects" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
15980 : }
15981 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
15982 4 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
15983 4 : if (!SWIG_IsOK(res2)) {
15984 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
15985 : }
15986 4 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
15987 : {
15988 4 : if (!arg2) {
15989 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
15990 : }
15991 : }
15992 : {
15993 4 : if ( bUseExceptions ) {
15994 0 : CPLErrorReset();
15995 : }
15996 4 : result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
15997 4 : if ( bUseExceptions ) {
15998 0 : CPLErr eclass = CPLGetLastErrorType();
15999 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16000 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16001 : }
16002 : }
16003 : }
16004 4 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16005 4 : return resultobj;
16006 : fail:
16007 0 : return NULL;
16008 : }
16009 :
16010 :
16011 2 : SWIGINTERN PyObject *_wrap_Geometry_Intersect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16012 2 : PyObject *resultobj = 0;
16013 2 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16014 2 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16015 2 : void *argp1 = 0 ;
16016 2 : int res1 = 0 ;
16017 2 : void *argp2 = 0 ;
16018 2 : int res2 = 0 ;
16019 2 : PyObject * obj0 = 0 ;
16020 2 : PyObject * obj1 = 0 ;
16021 : bool result;
16022 :
16023 2 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersect",&obj0,&obj1)) SWIG_fail;
16024 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16025 2 : if (!SWIG_IsOK(res1)) {
16026 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersect" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16027 : }
16028 2 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16029 2 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16030 2 : if (!SWIG_IsOK(res2)) {
16031 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersect" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16032 : }
16033 2 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16034 : {
16035 2 : if (!arg2) {
16036 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16037 : }
16038 : }
16039 : {
16040 2 : if ( bUseExceptions ) {
16041 0 : CPLErrorReset();
16042 : }
16043 2 : result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
16044 2 : if ( bUseExceptions ) {
16045 0 : CPLErr eclass = CPLGetLastErrorType();
16046 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16047 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16048 : }
16049 : }
16050 : }
16051 2 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16052 2 : return resultobj;
16053 : fail:
16054 0 : return NULL;
16055 : }
16056 :
16057 :
16058 35565 : SWIGINTERN PyObject *_wrap_Geometry_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16059 35565 : PyObject *resultobj = 0;
16060 35565 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16061 35565 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16062 35565 : void *argp1 = 0 ;
16063 35565 : int res1 = 0 ;
16064 35565 : void *argp2 = 0 ;
16065 35565 : int res2 = 0 ;
16066 35565 : PyObject * obj0 = 0 ;
16067 35565 : PyObject * obj1 = 0 ;
16068 : bool result;
16069 :
16070 35565 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equals",&obj0,&obj1)) SWIG_fail;
16071 35565 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16072 35565 : if (!SWIG_IsOK(res1)) {
16073 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equals" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16074 : }
16075 35565 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16076 35565 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16077 35565 : if (!SWIG_IsOK(res2)) {
16078 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equals" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16079 : }
16080 35565 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16081 : {
16082 35565 : if (!arg2) {
16083 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16084 : }
16085 : }
16086 : {
16087 35565 : if ( bUseExceptions ) {
16088 0 : CPLErrorReset();
16089 : }
16090 35565 : result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
16091 35565 : if ( bUseExceptions ) {
16092 0 : CPLErr eclass = CPLGetLastErrorType();
16093 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16094 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16095 : }
16096 : }
16097 : }
16098 35565 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16099 35565 : return resultobj;
16100 : fail:
16101 0 : return NULL;
16102 : }
16103 :
16104 :
16105 1 : SWIGINTERN PyObject *_wrap_Geometry_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16106 1 : PyObject *resultobj = 0;
16107 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16108 1 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16109 1 : void *argp1 = 0 ;
16110 1 : int res1 = 0 ;
16111 1 : void *argp2 = 0 ;
16112 1 : int res2 = 0 ;
16113 1 : PyObject * obj0 = 0 ;
16114 1 : PyObject * obj1 = 0 ;
16115 : bool result;
16116 :
16117 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equal",&obj0,&obj1)) SWIG_fail;
16118 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16119 1 : if (!SWIG_IsOK(res1)) {
16120 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equal" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16121 : }
16122 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16123 1 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16124 1 : if (!SWIG_IsOK(res2)) {
16125 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equal" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16126 : }
16127 1 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16128 : {
16129 1 : if (!arg2) {
16130 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16131 : }
16132 : }
16133 : {
16134 1 : if ( bUseExceptions ) {
16135 0 : CPLErrorReset();
16136 : }
16137 1 : result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
16138 1 : if ( bUseExceptions ) {
16139 0 : CPLErr eclass = CPLGetLastErrorType();
16140 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16141 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16142 : }
16143 : }
16144 : }
16145 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16146 1 : return resultobj;
16147 : fail:
16148 0 : return NULL;
16149 : }
16150 :
16151 :
16152 6 : SWIGINTERN PyObject *_wrap_Geometry_Disjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16153 6 : PyObject *resultobj = 0;
16154 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16155 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16156 6 : void *argp1 = 0 ;
16157 6 : int res1 = 0 ;
16158 6 : void *argp2 = 0 ;
16159 6 : int res2 = 0 ;
16160 6 : PyObject * obj0 = 0 ;
16161 6 : PyObject * obj1 = 0 ;
16162 : bool result;
16163 :
16164 6 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Disjoint",&obj0,&obj1)) SWIG_fail;
16165 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16166 6 : if (!SWIG_IsOK(res1)) {
16167 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Disjoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16168 : }
16169 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16170 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16171 6 : if (!SWIG_IsOK(res2)) {
16172 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Disjoint" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16173 : }
16174 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16175 : {
16176 6 : if (!arg2) {
16177 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16178 : }
16179 : }
16180 : {
16181 6 : if ( bUseExceptions ) {
16182 0 : CPLErrorReset();
16183 : }
16184 6 : result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
16185 6 : if ( bUseExceptions ) {
16186 0 : CPLErr eclass = CPLGetLastErrorType();
16187 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16188 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16189 : }
16190 : }
16191 : }
16192 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16193 6 : return resultobj;
16194 : fail:
16195 0 : return NULL;
16196 : }
16197 :
16198 :
16199 6 : SWIGINTERN PyObject *_wrap_Geometry_Touches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16200 6 : PyObject *resultobj = 0;
16201 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16202 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16203 6 : void *argp1 = 0 ;
16204 6 : int res1 = 0 ;
16205 6 : void *argp2 = 0 ;
16206 6 : int res2 = 0 ;
16207 6 : PyObject * obj0 = 0 ;
16208 6 : PyObject * obj1 = 0 ;
16209 : bool result;
16210 :
16211 6 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Touches",&obj0,&obj1)) SWIG_fail;
16212 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16213 6 : if (!SWIG_IsOK(res1)) {
16214 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Touches" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16215 : }
16216 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16217 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16218 6 : if (!SWIG_IsOK(res2)) {
16219 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Touches" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16220 : }
16221 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16222 : {
16223 6 : if (!arg2) {
16224 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16225 : }
16226 : }
16227 : {
16228 6 : if ( bUseExceptions ) {
16229 0 : CPLErrorReset();
16230 : }
16231 6 : result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
16232 6 : if ( bUseExceptions ) {
16233 0 : CPLErr eclass = CPLGetLastErrorType();
16234 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16235 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16236 : }
16237 : }
16238 : }
16239 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16240 6 : return resultobj;
16241 : fail:
16242 0 : return NULL;
16243 : }
16244 :
16245 :
16246 6 : SWIGINTERN PyObject *_wrap_Geometry_Crosses(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16247 6 : PyObject *resultobj = 0;
16248 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16249 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16250 6 : void *argp1 = 0 ;
16251 6 : int res1 = 0 ;
16252 6 : void *argp2 = 0 ;
16253 6 : int res2 = 0 ;
16254 6 : PyObject * obj0 = 0 ;
16255 6 : PyObject * obj1 = 0 ;
16256 : bool result;
16257 :
16258 6 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Crosses",&obj0,&obj1)) SWIG_fail;
16259 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16260 6 : if (!SWIG_IsOK(res1)) {
16261 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Crosses" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16262 : }
16263 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16264 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16265 6 : if (!SWIG_IsOK(res2)) {
16266 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Crosses" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16267 : }
16268 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16269 : {
16270 6 : if (!arg2) {
16271 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16272 : }
16273 : }
16274 : {
16275 6 : if ( bUseExceptions ) {
16276 0 : CPLErrorReset();
16277 : }
16278 6 : result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
16279 6 : if ( bUseExceptions ) {
16280 0 : CPLErr eclass = CPLGetLastErrorType();
16281 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16282 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16283 : }
16284 : }
16285 : }
16286 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16287 6 : return resultobj;
16288 : fail:
16289 0 : return NULL;
16290 : }
16291 :
16292 :
16293 7 : SWIGINTERN PyObject *_wrap_Geometry_Within(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16294 7 : PyObject *resultobj = 0;
16295 7 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16296 7 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16297 7 : void *argp1 = 0 ;
16298 7 : int res1 = 0 ;
16299 7 : void *argp2 = 0 ;
16300 7 : int res2 = 0 ;
16301 7 : PyObject * obj0 = 0 ;
16302 7 : PyObject * obj1 = 0 ;
16303 : bool result;
16304 :
16305 7 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Within",&obj0,&obj1)) SWIG_fail;
16306 7 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16307 7 : if (!SWIG_IsOK(res1)) {
16308 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Within" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16309 : }
16310 7 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16311 7 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16312 7 : if (!SWIG_IsOK(res2)) {
16313 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Within" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16314 : }
16315 7 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16316 : {
16317 7 : if (!arg2) {
16318 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16319 : }
16320 : }
16321 : {
16322 7 : if ( bUseExceptions ) {
16323 0 : CPLErrorReset();
16324 : }
16325 7 : result = (bool)OGRGeometryShadow_Within(arg1,arg2);
16326 7 : if ( bUseExceptions ) {
16327 0 : CPLErr eclass = CPLGetLastErrorType();
16328 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16329 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16330 : }
16331 : }
16332 : }
16333 7 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16334 7 : return resultobj;
16335 : fail:
16336 0 : return NULL;
16337 : }
16338 :
16339 :
16340 6 : SWIGINTERN PyObject *_wrap_Geometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16341 6 : PyObject *resultobj = 0;
16342 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16343 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16344 6 : void *argp1 = 0 ;
16345 6 : int res1 = 0 ;
16346 6 : void *argp2 = 0 ;
16347 6 : int res2 = 0 ;
16348 6 : PyObject * obj0 = 0 ;
16349 6 : PyObject * obj1 = 0 ;
16350 : bool result;
16351 :
16352 6 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Contains",&obj0,&obj1)) SWIG_fail;
16353 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16354 6 : if (!SWIG_IsOK(res1)) {
16355 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Contains" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16356 : }
16357 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16358 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16359 6 : if (!SWIG_IsOK(res2)) {
16360 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16361 : }
16362 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16363 : {
16364 6 : if (!arg2) {
16365 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16366 : }
16367 : }
16368 : {
16369 6 : if ( bUseExceptions ) {
16370 0 : CPLErrorReset();
16371 : }
16372 6 : result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
16373 6 : if ( bUseExceptions ) {
16374 0 : CPLErr eclass = CPLGetLastErrorType();
16375 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16376 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16377 : }
16378 : }
16379 : }
16380 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16381 6 : return resultobj;
16382 : fail:
16383 0 : return NULL;
16384 : }
16385 :
16386 :
16387 6 : SWIGINTERN PyObject *_wrap_Geometry_Overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16388 6 : PyObject *resultobj = 0;
16389 6 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16390 6 : OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
16391 6 : void *argp1 = 0 ;
16392 6 : int res1 = 0 ;
16393 6 : void *argp2 = 0 ;
16394 6 : int res2 = 0 ;
16395 6 : PyObject * obj0 = 0 ;
16396 6 : PyObject * obj1 = 0 ;
16397 : bool result;
16398 :
16399 6 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Overlaps",&obj0,&obj1)) SWIG_fail;
16400 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16401 6 : if (!SWIG_IsOK(res1)) {
16402 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Overlaps" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16403 : }
16404 6 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16405 6 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16406 6 : if (!SWIG_IsOK(res2)) {
16407 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Overlaps" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
16408 : }
16409 6 : arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
16410 : {
16411 6 : if (!arg2) {
16412 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16413 : }
16414 : }
16415 : {
16416 6 : if ( bUseExceptions ) {
16417 0 : CPLErrorReset();
16418 : }
16419 6 : result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
16420 6 : if ( bUseExceptions ) {
16421 0 : CPLErr eclass = CPLGetLastErrorType();
16422 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16423 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16424 : }
16425 : }
16426 : }
16427 6 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16428 6 : return resultobj;
16429 : fail:
16430 0 : return NULL;
16431 : }
16432 :
16433 :
16434 1 : SWIGINTERN PyObject *_wrap_Geometry_TransformTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16435 1 : PyObject *resultobj = 0;
16436 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16437 1 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
16438 1 : void *argp1 = 0 ;
16439 1 : int res1 = 0 ;
16440 1 : void *argp2 = 0 ;
16441 1 : int res2 = 0 ;
16442 1 : PyObject * obj0 = 0 ;
16443 1 : PyObject * obj1 = 0 ;
16444 : OGRErr result;
16445 :
16446 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_TransformTo",&obj0,&obj1)) SWIG_fail;
16447 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16448 1 : if (!SWIG_IsOK(res1)) {
16449 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_TransformTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16450 : }
16451 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16452 1 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16453 1 : if (!SWIG_IsOK(res2)) {
16454 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_TransformTo" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
16455 : }
16456 1 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
16457 : {
16458 1 : if (!arg2) {
16459 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16460 : }
16461 : }
16462 : {
16463 1 : if ( bUseExceptions ) {
16464 0 : CPLErrorReset();
16465 : }
16466 1 : result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
16467 1 : if ( bUseExceptions ) {
16468 0 : CPLErr eclass = CPLGetLastErrorType();
16469 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16470 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16471 : }
16472 : }
16473 : }
16474 : {
16475 : /* %typemap(out) OGRErr */
16476 1 : if ( result != 0 && bUseExceptions) {
16477 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16478 0 : SWIG_fail;
16479 : }
16480 : }
16481 : {
16482 : /* %typemap(ret) OGRErr */
16483 1 : if (resultobj == Py_None ) {
16484 0 : Py_DECREF(resultobj);
16485 0 : resultobj = 0;
16486 : }
16487 1 : if (resultobj == 0) {
16488 1 : resultobj = PyInt_FromLong( result );
16489 : }
16490 : }
16491 1 : return resultobj;
16492 : fail:
16493 0 : return NULL;
16494 : }
16495 :
16496 :
16497 12 : SWIGINTERN PyObject *_wrap_Geometry_Transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16498 12 : PyObject *resultobj = 0;
16499 12 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16500 12 : OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
16501 12 : void *argp1 = 0 ;
16502 12 : int res1 = 0 ;
16503 12 : void *argp2 = 0 ;
16504 12 : int res2 = 0 ;
16505 12 : PyObject * obj0 = 0 ;
16506 12 : PyObject * obj1 = 0 ;
16507 : OGRErr result;
16508 :
16509 12 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Transform",&obj0,&obj1)) SWIG_fail;
16510 12 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16511 12 : if (!SWIG_IsOK(res1)) {
16512 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16513 : }
16514 12 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16515 12 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
16516 12 : if (!SWIG_IsOK(res2)) {
16517 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OSRCoordinateTransformationShadow *""'");
16518 : }
16519 12 : arg2 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp2);
16520 : {
16521 12 : if (!arg2) {
16522 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
16523 : }
16524 : }
16525 : {
16526 12 : if ( bUseExceptions ) {
16527 0 : CPLErrorReset();
16528 : }
16529 12 : result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
16530 12 : if ( bUseExceptions ) {
16531 0 : CPLErr eclass = CPLGetLastErrorType();
16532 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16533 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16534 : }
16535 : }
16536 : }
16537 : {
16538 : /* %typemap(out) OGRErr */
16539 12 : if ( result != 0 && bUseExceptions) {
16540 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16541 0 : SWIG_fail;
16542 : }
16543 : }
16544 : {
16545 : /* %typemap(ret) OGRErr */
16546 12 : if (resultobj == Py_None ) {
16547 0 : Py_DECREF(resultobj);
16548 0 : resultobj = 0;
16549 : }
16550 12 : if (resultobj == 0) {
16551 12 : resultobj = PyInt_FromLong( result );
16552 : }
16553 : }
16554 12 : return resultobj;
16555 : fail:
16556 0 : return NULL;
16557 : }
16558 :
16559 :
16560 10 : SWIGINTERN PyObject *_wrap_Geometry_GetSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16561 10 : PyObject *resultobj = 0;
16562 10 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16563 10 : void *argp1 = 0 ;
16564 10 : int res1 = 0 ;
16565 10 : PyObject * obj0 = 0 ;
16566 10 : OSRSpatialReferenceShadow *result = 0 ;
16567 :
16568 10 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetSpatialReference",&obj0)) SWIG_fail;
16569 10 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16570 10 : if (!SWIG_IsOK(res1)) {
16571 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16572 : }
16573 10 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16574 : {
16575 10 : if ( bUseExceptions ) {
16576 0 : CPLErrorReset();
16577 : }
16578 10 : result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
16579 10 : if ( bUseExceptions ) {
16580 0 : CPLErr eclass = CPLGetLastErrorType();
16581 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16582 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16583 : }
16584 : }
16585 : }
16586 10 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16587 10 : return resultobj;
16588 : fail:
16589 0 : return NULL;
16590 : }
16591 :
16592 :
16593 332 : SWIGINTERN PyObject *_wrap_Geometry_AssignSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16594 332 : PyObject *resultobj = 0;
16595 332 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16596 332 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
16597 332 : void *argp1 = 0 ;
16598 332 : int res1 = 0 ;
16599 332 : void *argp2 = 0 ;
16600 332 : int res2 = 0 ;
16601 332 : PyObject * obj0 = 0 ;
16602 332 : PyObject * obj1 = 0 ;
16603 :
16604 332 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AssignSpatialReference",&obj0,&obj1)) SWIG_fail;
16605 332 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16606 332 : if (!SWIG_IsOK(res1)) {
16607 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AssignSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16608 : }
16609 332 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16610 332 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16611 332 : if (!SWIG_IsOK(res2)) {
16612 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AssignSpatialReference" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
16613 : }
16614 332 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
16615 : {
16616 332 : if ( bUseExceptions ) {
16617 0 : CPLErrorReset();
16618 : }
16619 : OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
16620 332 : if ( bUseExceptions ) {
16621 0 : CPLErr eclass = CPLGetLastErrorType();
16622 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16623 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16624 : }
16625 : }
16626 : }
16627 332 : resultobj = SWIG_Py_Void();
16628 332 : return resultobj;
16629 : fail:
16630 0 : return NULL;
16631 : }
16632 :
16633 :
16634 4 : SWIGINTERN PyObject *_wrap_Geometry_CloseRings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16635 4 : PyObject *resultobj = 0;
16636 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16637 4 : void *argp1 = 0 ;
16638 4 : int res1 = 0 ;
16639 4 : PyObject * obj0 = 0 ;
16640 :
16641 4 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_CloseRings",&obj0)) SWIG_fail;
16642 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16643 4 : if (!SWIG_IsOK(res1)) {
16644 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CloseRings" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16645 : }
16646 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16647 : {
16648 4 : if ( bUseExceptions ) {
16649 0 : CPLErrorReset();
16650 : }
16651 : OGRGeometryShadow_CloseRings(arg1);
16652 4 : if ( bUseExceptions ) {
16653 0 : CPLErr eclass = CPLGetLastErrorType();
16654 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16655 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16656 : }
16657 : }
16658 : }
16659 4 : resultobj = SWIG_Py_Void();
16660 4 : return resultobj;
16661 : fail:
16662 0 : return NULL;
16663 : }
16664 :
16665 :
16666 1 : SWIGINTERN PyObject *_wrap_Geometry_FlattenTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16667 1 : PyObject *resultobj = 0;
16668 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16669 1 : void *argp1 = 0 ;
16670 1 : int res1 = 0 ;
16671 1 : PyObject * obj0 = 0 ;
16672 :
16673 1 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_FlattenTo2D",&obj0)) SWIG_fail;
16674 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16675 1 : if (!SWIG_IsOK(res1)) {
16676 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FlattenTo2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16677 : }
16678 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16679 : {
16680 1 : if ( bUseExceptions ) {
16681 0 : CPLErrorReset();
16682 : }
16683 : OGRGeometryShadow_FlattenTo2D(arg1);
16684 1 : if ( bUseExceptions ) {
16685 0 : CPLErr eclass = CPLGetLastErrorType();
16686 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16687 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16688 : }
16689 : }
16690 : }
16691 1 : resultobj = SWIG_Py_Void();
16692 1 : return resultobj;
16693 : fail:
16694 0 : return NULL;
16695 : }
16696 :
16697 :
16698 1 : SWIGINTERN PyObject *_wrap_Geometry_Segmentize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16699 1 : PyObject *resultobj = 0;
16700 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16701 : double arg2 ;
16702 1 : void *argp1 = 0 ;
16703 1 : int res1 = 0 ;
16704 : double val2 ;
16705 1 : int ecode2 = 0 ;
16706 1 : PyObject * obj0 = 0 ;
16707 1 : PyObject * obj1 = 0 ;
16708 :
16709 1 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Segmentize",&obj0,&obj1)) SWIG_fail;
16710 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16711 1 : if (!SWIG_IsOK(res1)) {
16712 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Segmentize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16713 : }
16714 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16715 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
16716 1 : if (!SWIG_IsOK(ecode2)) {
16717 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Segmentize" "', argument " "2"" of type '" "double""'");
16718 : }
16719 1 : arg2 = static_cast< double >(val2);
16720 : {
16721 1 : if ( bUseExceptions ) {
16722 0 : CPLErrorReset();
16723 : }
16724 : OGRGeometryShadow_Segmentize(arg1,arg2);
16725 1 : if ( bUseExceptions ) {
16726 0 : CPLErr eclass = CPLGetLastErrorType();
16727 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16728 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16729 : }
16730 : }
16731 : }
16732 1 : resultobj = SWIG_Py_Void();
16733 1 : return resultobj;
16734 : fail:
16735 0 : return NULL;
16736 : }
16737 :
16738 :
16739 17471 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16740 17471 : PyObject *resultobj = 0;
16741 17471 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16742 : double *arg2 ;
16743 17471 : void *argp1 = 0 ;
16744 17471 : int res1 = 0 ;
16745 : double argout2[4] ;
16746 17471 : PyObject * obj0 = 0 ;
16747 :
16748 : {
16749 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
16750 17471 : arg2 = argout2;
16751 : }
16752 17471 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope",&obj0)) SWIG_fail;
16753 17471 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16754 17471 : if (!SWIG_IsOK(res1)) {
16755 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16756 : }
16757 17471 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16758 : {
16759 17471 : if ( bUseExceptions ) {
16760 0 : CPLErrorReset();
16761 : }
16762 : OGRGeometryShadow_GetEnvelope(arg1,arg2);
16763 17471 : if ( bUseExceptions ) {
16764 0 : CPLErr eclass = CPLGetLastErrorType();
16765 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16766 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16767 : }
16768 : }
16769 : }
16770 17471 : resultobj = SWIG_Py_Void();
16771 : {
16772 : /* %typemap(argout) (double argout[ANY]) */
16773 17471 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
16774 17471 : resultobj = t_output_helper(resultobj,out);
16775 : }
16776 17471 : return resultobj;
16777 : fail:
16778 0 : return NULL;
16779 : }
16780 :
16781 :
16782 7 : SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16783 7 : PyObject *resultobj = 0;
16784 7 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16785 : double *arg2 ;
16786 7 : void *argp1 = 0 ;
16787 7 : int res1 = 0 ;
16788 : double argout2[6] ;
16789 7 : PyObject * obj0 = 0 ;
16790 :
16791 : {
16792 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
16793 7 : arg2 = argout2;
16794 : }
16795 7 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope3D",&obj0)) SWIG_fail;
16796 7 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16797 7 : if (!SWIG_IsOK(res1)) {
16798 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16799 : }
16800 7 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16801 : {
16802 7 : if ( bUseExceptions ) {
16803 0 : CPLErrorReset();
16804 : }
16805 : OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
16806 7 : if ( bUseExceptions ) {
16807 0 : CPLErr eclass = CPLGetLastErrorType();
16808 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16809 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16810 : }
16811 : }
16812 : }
16813 7 : resultobj = SWIG_Py_Void();
16814 : {
16815 : /* %typemap(argout) (double argout[ANY]) */
16816 7 : PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
16817 7 : resultobj = t_output_helper(resultobj,out);
16818 : }
16819 7 : return resultobj;
16820 : fail:
16821 0 : return NULL;
16822 : }
16823 :
16824 :
16825 4 : SWIGINTERN PyObject *_wrap_Geometry_Centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16826 4 : PyObject *resultobj = 0;
16827 4 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16828 4 : void *argp1 = 0 ;
16829 4 : int res1 = 0 ;
16830 4 : PyObject * obj0 = 0 ;
16831 4 : OGRGeometryShadow *result = 0 ;
16832 :
16833 4 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Centroid",&obj0)) SWIG_fail;
16834 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16835 4 : if (!SWIG_IsOK(res1)) {
16836 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Centroid" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16837 : }
16838 4 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16839 : {
16840 4 : if ( bUseExceptions ) {
16841 0 : CPLErrorReset();
16842 : }
16843 4 : result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
16844 4 : if ( bUseExceptions ) {
16845 0 : CPLErr eclass = CPLGetLastErrorType();
16846 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16847 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16848 : }
16849 : }
16850 : }
16851 4 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
16852 4 : return resultobj;
16853 : fail:
16854 0 : return NULL;
16855 : }
16856 :
16857 :
16858 1 : SWIGINTERN PyObject *_wrap_Geometry_PointOnSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16859 1 : PyObject *resultobj = 0;
16860 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16861 1 : void *argp1 = 0 ;
16862 1 : int res1 = 0 ;
16863 1 : PyObject * obj0 = 0 ;
16864 1 : OGRGeometryShadow *result = 0 ;
16865 :
16866 1 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_PointOnSurface",&obj0)) SWIG_fail;
16867 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16868 1 : if (!SWIG_IsOK(res1)) {
16869 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_PointOnSurface" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16870 : }
16871 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16872 : {
16873 1 : if ( bUseExceptions ) {
16874 0 : CPLErrorReset();
16875 : }
16876 1 : result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
16877 1 : if ( bUseExceptions ) {
16878 0 : CPLErr eclass = CPLGetLastErrorType();
16879 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16880 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16881 : }
16882 : }
16883 : }
16884 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 );
16885 1 : return resultobj;
16886 : fail:
16887 0 : return NULL;
16888 : }
16889 :
16890 :
16891 0 : SWIGINTERN PyObject *_wrap_Geometry_WkbSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16892 0 : PyObject *resultobj = 0;
16893 0 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16894 0 : void *argp1 = 0 ;
16895 0 : int res1 = 0 ;
16896 0 : PyObject * obj0 = 0 ;
16897 : int result;
16898 :
16899 0 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_WkbSize",&obj0)) SWIG_fail;
16900 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16901 0 : if (!SWIG_IsOK(res1)) {
16902 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_WkbSize" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16903 : }
16904 0 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16905 : {
16906 0 : if ( bUseExceptions ) {
16907 0 : CPLErrorReset();
16908 : }
16909 0 : result = (int)OGRGeometryShadow_WkbSize(arg1);
16910 0 : if ( bUseExceptions ) {
16911 0 : CPLErr eclass = CPLGetLastErrorType();
16912 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16913 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16914 : }
16915 : }
16916 : }
16917 0 : resultobj = SWIG_From_int(static_cast< int >(result));
16918 0 : return resultobj;
16919 : fail:
16920 0 : return NULL;
16921 : }
16922 :
16923 :
16924 41 : SWIGINTERN PyObject *_wrap_Geometry_GetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16925 41 : PyObject *resultobj = 0;
16926 41 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16927 41 : void *argp1 = 0 ;
16928 41 : int res1 = 0 ;
16929 41 : PyObject * obj0 = 0 ;
16930 : int result;
16931 :
16932 41 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetCoordinateDimension",&obj0)) SWIG_fail;
16933 41 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16934 41 : if (!SWIG_IsOK(res1)) {
16935 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16936 : }
16937 41 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16938 : {
16939 41 : if ( bUseExceptions ) {
16940 0 : CPLErrorReset();
16941 : }
16942 41 : result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
16943 41 : if ( bUseExceptions ) {
16944 0 : CPLErr eclass = CPLGetLastErrorType();
16945 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16946 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16947 : }
16948 : }
16949 : }
16950 41 : resultobj = SWIG_From_int(static_cast< int >(result));
16951 41 : return resultobj;
16952 : fail:
16953 0 : return NULL;
16954 : }
16955 :
16956 :
16957 20 : SWIGINTERN PyObject *_wrap_Geometry_SetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16958 20 : PyObject *resultobj = 0;
16959 20 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
16960 : int arg2 ;
16961 20 : void *argp1 = 0 ;
16962 20 : int res1 = 0 ;
16963 : int val2 ;
16964 20 : int ecode2 = 0 ;
16965 20 : PyObject * obj0 = 0 ;
16966 20 : PyObject * obj1 = 0 ;
16967 :
16968 20 : if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SetCoordinateDimension",&obj0,&obj1)) SWIG_fail;
16969 20 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
16970 20 : if (!SWIG_IsOK(res1)) {
16971 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
16972 : }
16973 20 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
16974 20 : ecode2 = SWIG_AsVal_int(obj1, &val2);
16975 20 : if (!SWIG_IsOK(ecode2)) {
16976 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetCoordinateDimension" "', argument " "2"" of type '" "int""'");
16977 : }
16978 20 : arg2 = static_cast< int >(val2);
16979 : {
16980 20 : if ( bUseExceptions ) {
16981 0 : CPLErrorReset();
16982 : }
16983 : OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
16984 20 : if ( bUseExceptions ) {
16985 0 : CPLErr eclass = CPLGetLastErrorType();
16986 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16987 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16988 : }
16989 : }
16990 : }
16991 20 : resultobj = SWIG_Py_Void();
16992 20 : return resultobj;
16993 : fail:
16994 0 : return NULL;
16995 : }
16996 :
16997 :
16998 1 : SWIGINTERN PyObject *_wrap_Geometry_GetDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16999 1 : PyObject *resultobj = 0;
17000 1 : OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
17001 1 : void *argp1 = 0 ;
17002 1 : int res1 = 0 ;
17003 1 : PyObject * obj0 = 0 ;
17004 : int result;
17005 :
17006 1 : if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetDimension",&obj0)) SWIG_fail;
17007 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 );
17008 1 : if (!SWIG_IsOK(res1)) {
17009 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'");
17010 : }
17011 1 : arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
17012 : {
17013 1 : if ( bUseExceptions ) {
17014 0 : CPLErrorReset();
17015 : }
17016 1 : result = (int)OGRGeometryShadow_GetDimension(arg1);
17017 1 : if ( bUseExceptions ) {
17018 0 : CPLErr eclass = CPLGetLastErrorType();
17019 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17020 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17021 : }
17022 : }
17023 : }
17024 1 : resultobj = SWIG_From_int(static_cast< int >(result));
17025 1 : return resultobj;
17026 : fail:
17027 0 : return NULL;
17028 : }
17029 :
17030 :
17031 2 : SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17032 : PyObject *obj;
17033 2 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
17034 2 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeometryShadow, SWIG_NewClientData(obj));
17035 2 : return SWIG_Py_Void();
17036 : }
17037 :
17038 0 : SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17039 0 : PyObject *resultobj = 0;
17040 : int result;
17041 :
17042 0 : if (!PyArg_ParseTuple(args,(char *)":GetDriverCount")) SWIG_fail;
17043 : {
17044 0 : if ( bUseExceptions ) {
17045 0 : CPLErrorReset();
17046 : }
17047 0 : result = (int)OGRGetDriverCount();
17048 0 : if ( bUseExceptions ) {
17049 0 : CPLErr eclass = CPLGetLastErrorType();
17050 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17051 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17052 : }
17053 : }
17054 : }
17055 0 : resultobj = SWIG_From_int(static_cast< int >(result));
17056 0 : return resultobj;
17057 : fail:
17058 0 : return NULL;
17059 : }
17060 :
17061 :
17062 5 : SWIGINTERN PyObject *_wrap_GetOpenDSCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17063 5 : PyObject *resultobj = 0;
17064 : int result;
17065 :
17066 5 : if (!PyArg_ParseTuple(args,(char *)":GetOpenDSCount")) SWIG_fail;
17067 : {
17068 5 : if ( bUseExceptions ) {
17069 0 : CPLErrorReset();
17070 : }
17071 5 : result = (int)OGRGetOpenDSCount();
17072 5 : if ( bUseExceptions ) {
17073 0 : CPLErr eclass = CPLGetLastErrorType();
17074 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17075 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17076 : }
17077 : }
17078 : }
17079 5 : resultobj = SWIG_From_int(static_cast< int >(result));
17080 5 : return resultobj;
17081 : fail:
17082 0 : return NULL;
17083 : }
17084 :
17085 :
17086 4 : SWIGINTERN PyObject *_wrap_SetGenerate_DB2_V72_BYTE_ORDER(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17087 4 : PyObject *resultobj = 0;
17088 : int arg1 ;
17089 : int val1 ;
17090 4 : int ecode1 = 0 ;
17091 4 : PyObject * obj0 = 0 ;
17092 : OGRErr result;
17093 :
17094 4 : if (!PyArg_ParseTuple(args,(char *)"O:SetGenerate_DB2_V72_BYTE_ORDER",&obj0)) SWIG_fail;
17095 4 : ecode1 = SWIG_AsVal_int(obj0, &val1);
17096 4 : if (!SWIG_IsOK(ecode1)) {
17097 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetGenerate_DB2_V72_BYTE_ORDER" "', argument " "1"" of type '" "int""'");
17098 : }
17099 4 : arg1 = static_cast< int >(val1);
17100 : {
17101 4 : if ( bUseExceptions ) {
17102 0 : CPLErrorReset();
17103 : }
17104 4 : result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
17105 4 : if ( bUseExceptions ) {
17106 0 : CPLErr eclass = CPLGetLastErrorType();
17107 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17108 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17109 : }
17110 : }
17111 : }
17112 : {
17113 : /* %typemap(out) OGRErr */
17114 4 : if ( result != 0 && bUseExceptions) {
17115 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
17116 0 : SWIG_fail;
17117 : }
17118 : }
17119 : {
17120 : /* %typemap(ret) OGRErr */
17121 4 : if (resultobj == Py_None ) {
17122 0 : Py_DECREF(resultobj);
17123 0 : resultobj = 0;
17124 : }
17125 4 : if (resultobj == 0) {
17126 4 : resultobj = PyInt_FromLong( result );
17127 : }
17128 : }
17129 4 : return resultobj;
17130 : fail:
17131 0 : return NULL;
17132 : }
17133 :
17134 :
17135 3 : SWIGINTERN PyObject *_wrap_RegisterAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17136 3 : PyObject *resultobj = 0;
17137 :
17138 3 : if (!PyArg_ParseTuple(args,(char *)":RegisterAll")) SWIG_fail;
17139 : {
17140 3 : if ( bUseExceptions ) {
17141 0 : CPLErrorReset();
17142 : }
17143 3 : OGRRegisterAll();
17144 3 : if ( bUseExceptions ) {
17145 0 : CPLErr eclass = CPLGetLastErrorType();
17146 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17147 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17148 : }
17149 : }
17150 : }
17151 3 : resultobj = SWIG_Py_Void();
17152 3 : return resultobj;
17153 : fail:
17154 0 : return NULL;
17155 : }
17156 :
17157 :
17158 29 : SWIGINTERN PyObject *_wrap_GeometryTypeToName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17159 29 : PyObject *resultobj = 0;
17160 : OGRwkbGeometryType arg1 ;
17161 : int val1 ;
17162 29 : int ecode1 = 0 ;
17163 29 : PyObject * obj0 = 0 ;
17164 29 : char *result = 0 ;
17165 :
17166 29 : if (!PyArg_ParseTuple(args,(char *)"O:GeometryTypeToName",&obj0)) SWIG_fail;
17167 29 : ecode1 = SWIG_AsVal_int(obj0, &val1);
17168 29 : if (!SWIG_IsOK(ecode1)) {
17169 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GeometryTypeToName" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
17170 : }
17171 29 : arg1 = static_cast< OGRwkbGeometryType >(val1);
17172 : {
17173 29 : if ( bUseExceptions ) {
17174 0 : CPLErrorReset();
17175 : }
17176 29 : result = (char *)OGRGeometryTypeToName(arg1);
17177 29 : if ( bUseExceptions ) {
17178 0 : CPLErr eclass = CPLGetLastErrorType();
17179 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17180 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17181 : }
17182 : }
17183 : }
17184 29 : resultobj = SWIG_FromCharPtr((const char *)result);
17185 29 : return resultobj;
17186 : fail:
17187 0 : return NULL;
17188 : }
17189 :
17190 :
17191 294 : SWIGINTERN PyObject *_wrap_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17192 294 : PyObject *resultobj = 0;
17193 : OGRFieldType arg1 ;
17194 : int val1 ;
17195 294 : int ecode1 = 0 ;
17196 294 : PyObject * obj0 = 0 ;
17197 294 : char *result = 0 ;
17198 :
17199 294 : if (!PyArg_ParseTuple(args,(char *)"O:GetFieldTypeName",&obj0)) SWIG_fail;
17200 294 : ecode1 = SWIG_AsVal_int(obj0, &val1);
17201 294 : if (!SWIG_IsOK(ecode1)) {
17202 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldType""'");
17203 : }
17204 294 : arg1 = static_cast< OGRFieldType >(val1);
17205 : {
17206 294 : if ( bUseExceptions ) {
17207 0 : CPLErrorReset();
17208 : }
17209 294 : result = (char *)OGR_GetFieldTypeName(arg1);
17210 294 : if ( bUseExceptions ) {
17211 0 : CPLErr eclass = CPLGetLastErrorType();
17212 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17213 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17214 : }
17215 : }
17216 : }
17217 294 : resultobj = SWIG_FromCharPtr((const char *)result);
17218 294 : return resultobj;
17219 : fail:
17220 0 : return NULL;
17221 : }
17222 :
17223 :
17224 1 : SWIGINTERN PyObject *_wrap_GetOpenDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17225 1 : PyObject *resultobj = 0;
17226 : int arg1 ;
17227 : int val1 ;
17228 1 : int ecode1 = 0 ;
17229 1 : PyObject * obj0 = 0 ;
17230 1 : OGRDataSourceShadow *result = 0 ;
17231 :
17232 1 : if (!PyArg_ParseTuple(args,(char *)"O:GetOpenDS",&obj0)) SWIG_fail;
17233 1 : ecode1 = SWIG_AsVal_int(obj0, &val1);
17234 1 : if (!SWIG_IsOK(ecode1)) {
17235 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetOpenDS" "', argument " "1"" of type '" "int""'");
17236 : }
17237 1 : arg1 = static_cast< int >(val1);
17238 : {
17239 1 : if ( bUseExceptions ) {
17240 0 : CPLErrorReset();
17241 : }
17242 1 : result = (OGRDataSourceShadow *)GetOpenDS(arg1);
17243 1 : if ( bUseExceptions ) {
17244 0 : CPLErr eclass = CPLGetLastErrorType();
17245 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17246 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17247 : }
17248 : }
17249 : }
17250 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, 0 | 0 );
17251 1 : return resultobj;
17252 : fail:
17253 0 : return NULL;
17254 : }
17255 :
17256 :
17257 921 : SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
17258 921 : PyObject *resultobj = 0;
17259 921 : char *arg1 = (char *) 0 ;
17260 921 : int arg2 = (int) 0 ;
17261 921 : int bToFree1 = 0 ;
17262 : int val2 ;
17263 921 : int ecode2 = 0 ;
17264 921 : PyObject * obj0 = 0 ;
17265 921 : PyObject * obj1 = 0 ;
17266 : char * kwnames[] = {
17267 : (char *) "utf8_path",(char *) "update", NULL
17268 921 : };
17269 921 : OGRDataSourceShadow *result = 0 ;
17270 :
17271 921 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Open",kwnames,&obj0,&obj1)) SWIG_fail;
17272 : {
17273 : /* %typemap(in) (const char *utf8_path) */
17274 921 : arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
17275 921 : if (arg1 == NULL)
17276 : {
17277 0 : PyErr_SetString( PyExc_RuntimeError, "not a string" );
17278 0 : SWIG_fail;
17279 : }
17280 : }
17281 921 : if (obj1) {
17282 239 : ecode2 = SWIG_AsVal_int(obj1, &val2);
17283 239 : if (!SWIG_IsOK(ecode2)) {
17284 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "int""'");
17285 : }
17286 239 : arg2 = static_cast< int >(val2);
17287 : }
17288 : {
17289 921 : if ( bUseExceptions ) {
17290 0 : CPLErrorReset();
17291 : }
17292 921 : result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
17293 921 : if ( bUseExceptions ) {
17294 0 : CPLErr eclass = CPLGetLastErrorType();
17295 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17296 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17297 : }
17298 : }
17299 : }
17300 921 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN | 0 );
17301 : {
17302 : /* %typemap(freearg) (const char *utf8_path) */
17303 921 : GDALPythonFreeCStr(arg1, bToFree1);
17304 : }
17305 921 : return resultobj;
17306 : fail:
17307 : {
17308 : /* %typemap(freearg) (const char *utf8_path) */
17309 0 : GDALPythonFreeCStr(arg1, bToFree1);
17310 : }
17311 0 : return NULL;
17312 : }
17313 :
17314 :
17315 9 : SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
17316 9 : PyObject *resultobj = 0;
17317 9 : char *arg1 = (char *) 0 ;
17318 9 : int arg2 = (int) 0 ;
17319 9 : int bToFree1 = 0 ;
17320 : int val2 ;
17321 9 : int ecode2 = 0 ;
17322 9 : PyObject * obj0 = 0 ;
17323 9 : PyObject * obj1 = 0 ;
17324 : char * kwnames[] = {
17325 : (char *) "utf8_path",(char *) "update", NULL
17326 9 : };
17327 9 : OGRDataSourceShadow *result = 0 ;
17328 :
17329 9 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:OpenShared",kwnames,&obj0,&obj1)) SWIG_fail;
17330 : {
17331 : /* %typemap(in) (const char *utf8_path) */
17332 9 : arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
17333 9 : if (arg1 == NULL)
17334 : {
17335 0 : PyErr_SetString( PyExc_RuntimeError, "not a string" );
17336 0 : SWIG_fail;
17337 : }
17338 : }
17339 9 : if (obj1) {
17340 5 : ecode2 = SWIG_AsVal_int(obj1, &val2);
17341 5 : if (!SWIG_IsOK(ecode2)) {
17342 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "int""'");
17343 : }
17344 5 : arg2 = static_cast< int >(val2);
17345 : }
17346 : {
17347 9 : if ( bUseExceptions ) {
17348 0 : CPLErrorReset();
17349 : }
17350 9 : result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
17351 9 : if ( bUseExceptions ) {
17352 0 : CPLErr eclass = CPLGetLastErrorType();
17353 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17354 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17355 : }
17356 : }
17357 : }
17358 9 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN | 0 );
17359 : {
17360 : /* %typemap(freearg) (const char *utf8_path) */
17361 9 : GDALPythonFreeCStr(arg1, bToFree1);
17362 : }
17363 9 : return resultobj;
17364 : fail:
17365 : {
17366 : /* %typemap(freearg) (const char *utf8_path) */
17367 0 : GDALPythonFreeCStr(arg1, bToFree1);
17368 : }
17369 0 : return NULL;
17370 : }
17371 :
17372 :
17373 528 : SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17374 528 : PyObject *resultobj = 0;
17375 528 : char *arg1 = (char *) 0 ;
17376 : int res1 ;
17377 528 : char *buf1 = 0 ;
17378 528 : int alloc1 = 0 ;
17379 528 : PyObject * obj0 = 0 ;
17380 528 : OGRDriverShadow *result = 0 ;
17381 :
17382 528 : if (!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) SWIG_fail;
17383 528 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
17384 528 : if (!SWIG_IsOK(res1)) {
17385 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
17386 : }
17387 528 : arg1 = reinterpret_cast< char * >(buf1);
17388 : {
17389 528 : if (!arg1) {
17390 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
17391 : }
17392 : }
17393 : {
17394 528 : if ( bUseExceptions ) {
17395 0 : CPLErrorReset();
17396 : }
17397 528 : result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
17398 528 : if ( bUseExceptions ) {
17399 0 : CPLErr eclass = CPLGetLastErrorType();
17400 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17401 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17402 : }
17403 : }
17404 : }
17405 528 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
17406 528 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
17407 528 : return resultobj;
17408 : fail:
17409 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
17410 0 : return NULL;
17411 : }
17412 :
17413 :
17414 0 : SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17415 0 : PyObject *resultobj = 0;
17416 : int arg1 ;
17417 : int val1 ;
17418 0 : int ecode1 = 0 ;
17419 0 : PyObject * obj0 = 0 ;
17420 0 : OGRDriverShadow *result = 0 ;
17421 :
17422 0 : if (!PyArg_ParseTuple(args,(char *)"O:GetDriver",&obj0)) SWIG_fail;
17423 0 : ecode1 = SWIG_AsVal_int(obj0, &val1);
17424 0 : if (!SWIG_IsOK(ecode1)) {
17425 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
17426 : }
17427 0 : arg1 = static_cast< int >(val1);
17428 : {
17429 0 : if ( bUseExceptions ) {
17430 0 : CPLErrorReset();
17431 : }
17432 0 : result = (OGRDriverShadow *)GetDriver(arg1);
17433 0 : if ( bUseExceptions ) {
17434 0 : CPLErr eclass = CPLGetLastErrorType();
17435 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17436 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17437 : }
17438 : }
17439 : }
17440 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 | 0 );
17441 0 : return resultobj;
17442 : fail:
17443 0 : return NULL;
17444 : }
17445 :
17446 :
17447 55 : SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17448 55 : PyObject *resultobj = 0;
17449 55 : char **arg1 = (char **) 0 ;
17450 55 : int arg2 = (int) 0 ;
17451 : int val2 ;
17452 55 : int ecode2 = 0 ;
17453 55 : PyObject * obj0 = 0 ;
17454 55 : PyObject * obj1 = 0 ;
17455 55 : char **result = 0 ;
17456 :
17457 55 : if (!PyArg_ParseTuple(args,(char *)"O|O:GeneralCmdLineProcessor",&obj0,&obj1)) SWIG_fail;
17458 : {
17459 : /* %typemap(in) char **options */
17460 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
17461 55 : if ( ! PySequence_Check(obj0) || PyUnicode_Check(obj0)
17462 : #if PY_VERSION_HEX < 0x03000000
17463 : || PyString_Check(obj0)
17464 : #endif
17465 : ) {
17466 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
17467 0 : SWIG_fail;
17468 : }
17469 :
17470 55 : int size = PySequence_Size(obj0);
17471 335 : for (int i = 0; i < size; i++) {
17472 280 : PyObject* pyObj = PySequence_GetItem(obj0,i);
17473 280 : if (PyUnicode_Check(pyObj))
17474 : {
17475 : char *pszStr;
17476 : Py_ssize_t nLen;
17477 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
17478 : #if PY_VERSION_HEX >= 0x03000000
17479 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
17480 : #else
17481 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
17482 : #endif
17483 0 : arg1 = CSLAddString( arg1, pszStr );
17484 0 : Py_XDECREF(pyUTF8Str);
17485 : }
17486 : #if PY_VERSION_HEX >= 0x03000000
17487 : else if (PyBytes_Check(pyObj))
17488 : arg1 = CSLAddString( arg1, PyBytes_AsString(pyObj) );
17489 : #else
17490 280 : else if (PyString_Check(pyObj))
17491 280 : arg1 = CSLAddString( arg1, PyString_AsString(pyObj) );
17492 : #endif
17493 : else
17494 : {
17495 0 : Py_DECREF(pyObj);
17496 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
17497 0 : SWIG_fail;
17498 : }
17499 280 : Py_DECREF(pyObj);
17500 : }
17501 : }
17502 55 : if (obj1) {
17503 0 : ecode2 = SWIG_AsVal_int(obj1, &val2);
17504 0 : if (!SWIG_IsOK(ecode2)) {
17505 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
17506 : }
17507 0 : arg2 = static_cast< int >(val2);
17508 : }
17509 : {
17510 55 : if ( bUseExceptions ) {
17511 0 : CPLErrorReset();
17512 : }
17513 55 : result = (char **)GeneralCmdLineProcessor(arg1,arg2);
17514 55 : if ( bUseExceptions ) {
17515 0 : CPLErr eclass = CPLGetLastErrorType();
17516 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17517 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17518 : }
17519 : }
17520 : }
17521 : {
17522 : /* %typemap(out) char **CSL -> ( string ) */
17523 55 : char **stringarray = result;
17524 55 : if ( stringarray == NULL ) {
17525 0 : resultobj = Py_None;
17526 0 : Py_INCREF( resultobj );
17527 : }
17528 : else {
17529 55 : int len = CSLCount( stringarray );
17530 55 : resultobj = PyList_New( len );
17531 335 : for ( int i = 0; i < len; ++i ) {
17532 280 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
17533 280 : PyList_SetItem(resultobj, i, o );
17534 : }
17535 : }
17536 55 : CSLDestroy(result);
17537 : }
17538 : {
17539 : /* %typemap(freearg) char **options */
17540 55 : CSLDestroy( arg1 );
17541 : }
17542 55 : return resultobj;
17543 : fail:
17544 : {
17545 : /* %typemap(freearg) char **options */
17546 0 : CSLDestroy( arg1 );
17547 : }
17548 0 : return NULL;
17549 : }
17550 :
17551 :
17552 0 : SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
17553 0 : PyObject *resultobj = 0;
17554 : double arg1 ;
17555 0 : char *arg2 = (char *) NULL ;
17556 0 : void *arg3 = (void *) NULL ;
17557 : double val1 ;
17558 0 : int ecode1 = 0 ;
17559 : int res2 ;
17560 0 : char *buf2 = 0 ;
17561 0 : int alloc2 = 0 ;
17562 : int res3 ;
17563 0 : PyObject * obj0 = 0 ;
17564 0 : PyObject * obj1 = 0 ;
17565 0 : PyObject * obj2 = 0 ;
17566 : char * kwnames[] = {
17567 : (char *) "dfProgress",(char *) "pszMessage",(char *) "pData", NULL
17568 0 : };
17569 : int result;
17570 :
17571 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:TermProgress_nocb",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
17572 0 : ecode1 = SWIG_AsVal_double(obj0, &val1);
17573 0 : if (!SWIG_IsOK(ecode1)) {
17574 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
17575 : }
17576 0 : arg1 = static_cast< double >(val1);
17577 0 : if (obj1) {
17578 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
17579 0 : if (!SWIG_IsOK(res2)) {
17580 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
17581 : }
17582 0 : arg2 = reinterpret_cast< char * >(buf2);
17583 : }
17584 0 : if (obj2) {
17585 0 : res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
17586 0 : if (!SWIG_IsOK(res3)) {
17587 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'");
17588 : }
17589 : }
17590 : {
17591 0 : if ( bUseExceptions ) {
17592 0 : CPLErrorReset();
17593 : }
17594 0 : result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
17595 0 : if ( bUseExceptions ) {
17596 0 : CPLErr eclass = CPLGetLastErrorType();
17597 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17598 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17599 : }
17600 : }
17601 : }
17602 0 : resultobj = SWIG_From_int(static_cast< int >(result));
17603 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
17604 0 : return resultobj;
17605 : fail:
17606 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
17607 0 : return NULL;
17608 : }
17609 :
17610 :
17611 : static PyMethodDef SwigMethods[] = {
17612 : { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
17613 : { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
17614 : { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
17615 : { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
17616 : { (char *)"Driver_name_get", _wrap_Driver_name_get, METH_VARARGS, (char *)"Driver_name_get(Driver self) -> char"},
17617 : { (char *)"Driver_CreateDataSource", (PyCFunction) _wrap_Driver_CreateDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
17618 : "Driver_CreateDataSource(Driver self, char utf8_path, char options = None) -> DataSource\n"
17619 : "\n"
17620 : "OGRDataSourceH\n"
17621 : "OGR_Dr_CreateDataSource(OGRSFDriverH hDriver, const char *pszName,\n"
17622 : "char **papszOptions)\n"
17623 : "\n"
17624 : "This function attempts to create a new data source based on the passed\n"
17625 : "driver.\n"
17626 : "\n"
17627 : "The papszOptions argument can be used to control driver specific\n"
17628 : "creation options. These options are normally documented in the format\n"
17629 : "specific documentation.\n"
17630 : "\n"
17631 : "It is important to call OGR_DS_Destroy() when the datasource is no\n"
17632 : "longer used to ensure that all data has been properly flushed to disk.\n"
17633 : "\n"
17634 : "This function is the same as the C++ method\n"
17635 : "OGRSFDriver::CreateDataSource().\n"
17636 : "\n"
17637 : "Parameters:\n"
17638 : "-----------\n"
17639 : "\n"
17640 : "hDriver: handle to the driver on which data source creation is based.\n"
17641 : "\n"
17642 : "pszName: the name for the new data source. UTF-8 encoded.\n"
17643 : "\n"
17644 : "papszOptions: a StringList of name=value options. Options are driver\n"
17645 : "specific, and driver information can be found at the following\n"
17646 : "url:http://www.gdal.org/ogr/ogr_formats.html\n"
17647 : "\n"
17648 : "NULL is returned on failure, or a new OGRDataSource handle on success.\n"
17649 : "\n"
17650 : ""},
17651 : { (char *)"Driver_CopyDataSource", (PyCFunction) _wrap_Driver_CopyDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
17652 : "Driver_CopyDataSource(Driver self, DataSource copy_ds, char utf8_path, char options = None) -> DataSource\n"
17653 : "\n"
17654 : "OGRDataSourceH\n"
17655 : "OGR_Dr_CopyDataSource(OGRSFDriverH hDriver, OGRDataSourceH hSrcDS,\n"
17656 : "const char *pszNewName, char **papszOptions)\n"
17657 : "\n"
17658 : "This function creates a new datasource by copying all the layers from\n"
17659 : "the source datasource.\n"
17660 : "\n"
17661 : "It is important to call OGR_DS_Destroy() when the datasource is no\n"
17662 : "longer used to ensure that all data has been properly flushed to disk.\n"
17663 : "\n"
17664 : "This function is the same as the C++ method\n"
17665 : "OGRSFDriver::CopyDataSource().\n"
17666 : "\n"
17667 : "Parameters:\n"
17668 : "-----------\n"
17669 : "\n"
17670 : "hDriver: handle to the driver on which data source creation is based.\n"
17671 : "\n"
17672 : "hSrcDS: source datasource\n"
17673 : "\n"
17674 : "pszNewName: the name for the new data source.\n"
17675 : "\n"
17676 : "papszOptions: a StringList of name=value options. Options are driver\n"
17677 : "specific, and driver information can be found at the following\n"
17678 : "url:http://www.gdal.org/ogr/ogr_formats.html\n"
17679 : "\n"
17680 : "NULL is returned on failure, or a new OGRDataSource handle on success.\n"
17681 : "\n"
17682 : ""},
17683 : { (char *)"Driver_Open", (PyCFunction) _wrap_Driver_Open, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
17684 : "Driver_Open(Driver self, char utf8_path, int update = 0) -> DataSource\n"
17685 : "\n"
17686 : "OGRDataSourceH OGR_Dr_Open(OGRSFDriverH\n"
17687 : "hDriver, const char *pszName, int bUpdate)\n"
17688 : "\n"
17689 : "Attempt to open file with this driver.\n"
17690 : "\n"
17691 : "This function is the same as the C++ method OGRSFDriver::Open().\n"
17692 : "\n"
17693 : "Parameters:\n"
17694 : "-----------\n"
17695 : "\n"
17696 : "hDriver: handle to the driver that is used to open file.\n"
17697 : "\n"
17698 : "pszName: the name of the file, or data source to try and open.\n"
17699 : "\n"
17700 : "bUpdate: TRUE if update access is required, otherwise FALSE (the\n"
17701 : "default).\n"
17702 : "\n"
17703 : "NULL on error or if the pass name is not supported by this driver,\n"
17704 : "otherwise an handle to an OGRDataSource. This OGRDataSource should be\n"
17705 : "closed by deleting the object when it is no longer needed. \n"
17706 : ""},
17707 : { (char *)"Driver_DeleteDataSource", _wrap_Driver_DeleteDataSource, METH_VARARGS, (char *)"\n"
17708 : "Driver_DeleteDataSource(Driver self, char utf8_path) -> int\n"
17709 : "\n"
17710 : "OGRErr\n"
17711 : "OGR_Dr_DeleteDataSource(OGRSFDriverH hDriver, const char\n"
17712 : "*pszDataSource)\n"
17713 : "\n"
17714 : "Delete a datasource.\n"
17715 : "\n"
17716 : "Delete (from the disk, in the database, ...) the named datasource.\n"
17717 : "Normally it would be safest if the datasource was not open at the\n"
17718 : "time.\n"
17719 : "\n"
17720 : "Whether this is a supported operation on this driver case be tested\n"
17721 : "using TestCapability() on ODrCDeleteDataSource.\n"
17722 : "\n"
17723 : "This method is the same as the C++ method\n"
17724 : "OGRSFDriver::DeleteDataSource().\n"
17725 : "\n"
17726 : "Parameters:\n"
17727 : "-----------\n"
17728 : "\n"
17729 : "hDriver: handle to the driver on which data source deletion is based.\n"
17730 : "\n"
17731 : "pszDataSource: the name of the datasource to delete.\n"
17732 : "\n"
17733 : "OGRERR_NONE on success, and OGRERR_UNSUPPORTED_OPERATION if this is\n"
17734 : "not supported by this driver. \n"
17735 : ""},
17736 : { (char *)"Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, (char *)"\n"
17737 : "Driver_TestCapability(Driver self, char cap) -> bool\n"
17738 : "\n"
17739 : "int\n"
17740 : "OGR_Dr_TestCapability(OGRSFDriverH hDriver, const char *pszCap)\n"
17741 : "\n"
17742 : "Test if capability is available.\n"
17743 : "\n"
17744 : "One of the following data source capability names can be passed into\n"
17745 : "this function, and a TRUE or FALSE value will be returned indicating\n"
17746 : "whether or not the capability is available for this object.\n"
17747 : "\n"
17748 : "ODrCCreateDataSource: True if this driver can support creating data\n"
17749 : "sources.\n"
17750 : "\n"
17751 : "ODrCDeleteDataSource: True if this driver supports deleting data\n"
17752 : "sources.\n"
17753 : "\n"
17754 : "The #define macro forms of the capability names should be used in\n"
17755 : "preference to the strings themselves to avoid mispelling.\n"
17756 : "\n"
17757 : "This function is the same as the C++ method\n"
17758 : "OGRSFDriver::TestCapability().\n"
17759 : "\n"
17760 : "Parameters:\n"
17761 : "-----------\n"
17762 : "\n"
17763 : "hDriver: handle to the driver to test the capability against.\n"
17764 : "\n"
17765 : "pszCap: the capability to test.\n"
17766 : "\n"
17767 : "TRUE if capability available otherwise FALSE. \n"
17768 : ""},
17769 : { (char *)"Driver_GetName", _wrap_Driver_GetName, METH_VARARGS, (char *)"\n"
17770 : "Driver_GetName(Driver self) -> char\n"
17771 : "\n"
17772 : "const char*\n"
17773 : "OGR_Dr_GetName(OGRSFDriverH hDriver)\n"
17774 : "\n"
17775 : "Fetch name of driver (file format). This name should be relatively\n"
17776 : "short (10-40 characters), and should reflect the underlying file\n"
17777 : "format. For instance \"ESRI Shapefile\".\n"
17778 : "\n"
17779 : "This function is the same as the C++ method OGRSFDriver::GetName().\n"
17780 : "\n"
17781 : "Parameters:\n"
17782 : "-----------\n"
17783 : "\n"
17784 : "hDriver: handle to the the driver to get the name from.\n"
17785 : "\n"
17786 : "driver name. This is an internal string and should not be modified or\n"
17787 : "freed. \n"
17788 : ""},
17789 : { (char *)"Driver_Register", _wrap_Driver_Register, METH_VARARGS, (char *)"Driver_Register(Driver self)"},
17790 : { (char *)"Driver_Deregister", _wrap_Driver_Deregister, METH_VARARGS, (char *)"Driver_Deregister(Driver self)"},
17791 : { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
17792 : { (char *)"DataSource_name_get", _wrap_DataSource_name_get, METH_VARARGS, (char *)"DataSource_name_get(DataSource self) -> char"},
17793 : { (char *)"delete_DataSource", _wrap_delete_DataSource, METH_VARARGS, (char *)"delete_DataSource(DataSource self)"},
17794 : { (char *)"DataSource_GetRefCount", _wrap_DataSource_GetRefCount, METH_VARARGS, (char *)"\n"
17795 : "DataSource_GetRefCount(DataSource self) -> int\n"
17796 : "\n"
17797 : "int\n"
17798 : "OGR_DS_GetRefCount(OGRDataSourceH hDataSource) \n"
17799 : ""},
17800 : { (char *)"DataSource_GetSummaryRefCount", _wrap_DataSource_GetSummaryRefCount, METH_VARARGS, (char *)"\n"
17801 : "DataSource_GetSummaryRefCount(DataSource self) -> int\n"
17802 : "\n"
17803 : "int\n"
17804 : "OGR_DS_GetSummaryRefCount(OGRDataSourceH hDataSource) \n"
17805 : ""},
17806 : { (char *)"DataSource_GetLayerCount", _wrap_DataSource_GetLayerCount, METH_VARARGS, (char *)"\n"
17807 : "DataSource_GetLayerCount(DataSource self) -> int\n"
17808 : "\n"
17809 : "int\n"
17810 : "OGR_DS_GetLayerCount(OGRDataSourceH hDS)\n"
17811 : "\n"
17812 : "Get the number of layers in this data source.\n"
17813 : "\n"
17814 : "This function is the same as the C++ method\n"
17815 : "OGRDataSource::GetLayerCount().\n"
17816 : "\n"
17817 : "Parameters:\n"
17818 : "-----------\n"
17819 : "\n"
17820 : "hDS: handle to the data source from which to get the number of\n"
17821 : "layers.\n"
17822 : "\n"
17823 : "layer count. \n"
17824 : ""},
17825 : { (char *)"DataSource_GetDriver", _wrap_DataSource_GetDriver, METH_VARARGS, (char *)"\n"
17826 : "DataSource_GetDriver(DataSource self) -> Driver\n"
17827 : "\n"
17828 : "OGRSFDriverH\n"
17829 : "OGR_DS_GetDriver(OGRDataSourceH hDS)\n"
17830 : "\n"
17831 : "Returns the driver that the dataset was opened with.\n"
17832 : "\n"
17833 : "This method is the same as the C++ method OGRDataSource::GetDriver()\n"
17834 : "\n"
17835 : "Parameters:\n"
17836 : "-----------\n"
17837 : "\n"
17838 : "hDS: handle to the datasource\n"
17839 : "\n"
17840 : "NULL if driver info is not available, or pointer to a driver owned by\n"
17841 : "the OGRSFDriverManager. \n"
17842 : ""},
17843 : { (char *)"DataSource_GetName", _wrap_DataSource_GetName, METH_VARARGS, (char *)"\n"
17844 : "DataSource_GetName(DataSource self) -> char\n"
17845 : "\n"
17846 : "const char*\n"
17847 : "OGR_DS_GetName(OGRDataSourceH hDS)\n"
17848 : "\n"
17849 : "Returns the name of the data source.\n"
17850 : "\n"
17851 : "This string should be sufficient to open the data source if passed to\n"
17852 : "the same OGRSFDriver that this data source was opened with, but it\n"
17853 : "need not be exactly the same string that was used to open the data\n"
17854 : "source. Normally this is a filename.\n"
17855 : "\n"
17856 : "This function is the same as the C++ method OGRDataSource::GetName().\n"
17857 : "\n"
17858 : "Parameters:\n"
17859 : "-----------\n"
17860 : "\n"
17861 : "hDS: handle to the data source to get the name from.\n"
17862 : "\n"
17863 : "pointer to an internal name string which should not be modified or\n"
17864 : "freed by the caller. \n"
17865 : ""},
17866 : { (char *)"DataSource_DeleteLayer", _wrap_DataSource_DeleteLayer, METH_VARARGS, (char *)"\n"
17867 : "DataSource_DeleteLayer(DataSource self, int index) -> OGRErr\n"
17868 : "\n"
17869 : "OGRErr\n"
17870 : "OGR_DS_DeleteLayer(OGRDataSourceH hDS, int iLayer)\n"
17871 : "\n"
17872 : "Delete the indicated layer from the datasource.\n"
17873 : "\n"
17874 : "If this method is supported the ODsCDeleteLayer capability will test\n"
17875 : "TRUE on the OGRDataSource.\n"
17876 : "\n"
17877 : "This method is the same as the C++ method\n"
17878 : "OGRDataSource::DeleteLayer().\n"
17879 : "\n"
17880 : "Parameters:\n"
17881 : "-----------\n"
17882 : "\n"
17883 : "hDS: handle to the datasource\n"
17884 : "\n"
17885 : "iLayer: the index of the layer to delete.\n"
17886 : "\n"
17887 : "OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting\n"
17888 : "layers is not supported for this datasource. \n"
17889 : ""},
17890 : { (char *)"DataSource_SyncToDisk", _wrap_DataSource_SyncToDisk, METH_VARARGS, (char *)"\n"
17891 : "DataSource_SyncToDisk(DataSource self) -> OGRErr\n"
17892 : "\n"
17893 : "OGRErr\n"
17894 : "OGR_DS_SyncToDisk(OGRDataSourceH hDS)\n"
17895 : "\n"
17896 : "Flush pending changes to disk.\n"
17897 : "\n"
17898 : "This call is intended to force the datasource to flush any pending\n"
17899 : "writes to disk, and leave the disk file in a consistent state. It\n"
17900 : "would not normally have any effect on read-only datasources.\n"
17901 : "\n"
17902 : "Some data sources do not implement this method, and will still return\n"
17903 : "OGRERR_NONE. An error is only returned if an error occurs while\n"
17904 : "attempting to flush to disk.\n"
17905 : "\n"
17906 : "The default implementation of this method just calls the SyncToDisk()\n"
17907 : "method on each of the layers. Conceptionally, calling SyncToDisk() on\n"
17908 : "a datasource should include any work that might be accomplished by\n"
17909 : "calling SyncToDisk() on layers in that data source.\n"
17910 : "\n"
17911 : "In any event, you should always close any opened datasource with\n"
17912 : "OGR_DS_Destroy() that will ensure all data is correctly flushed.\n"
17913 : "\n"
17914 : "This method is the same as the C++ method OGRDataSource::SyncToDisk()\n"
17915 : "\n"
17916 : "Parameters:\n"
17917 : "-----------\n"
17918 : "\n"
17919 : "hDS: handle to the data source\n"
17920 : "\n"
17921 : "OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
17922 : "code. \n"
17923 : ""},
17924 : { (char *)"DataSource_CreateLayer", (PyCFunction) _wrap_DataSource_CreateLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
17925 : "DataSource_CreateLayer(DataSource self, char name, SpatialReference srs = None, \n"
17926 : " OGRwkbGeometryType geom_type = wkbUnknown, \n"
17927 : " char options = None) -> Layer\n"
17928 : "\n"
17929 : "OGRLayerH\n"
17930 : "OGR_DS_CreateLayer(OGRDataSourceH hDS, const char *pszName,\n"
17931 : "OGRSpatialReferenceH hSpatialRef, OGRwkbGeometryType eType, char\n"
17932 : "**papszOptions)\n"
17933 : "\n"
17934 : "This function attempts to create a new layer on the data source with\n"
17935 : "the indicated name, coordinate system, geometry type.\n"
17936 : "\n"
17937 : "The papszOptions argument can be used to control driver specific\n"
17938 : "creation options. These options are normally documented in the format\n"
17939 : "specific documentation.\n"
17940 : "\n"
17941 : "This function is the same as the C++ method\n"
17942 : "OGRDataSource::CreateLayer().\n"
17943 : "\n"
17944 : "Parameters:\n"
17945 : "-----------\n"
17946 : "\n"
17947 : "hDS: The dataset handle.\n"
17948 : "\n"
17949 : "pszName: the name for the new layer. This should ideally not match\n"
17950 : "any existing layer on the datasource.\n"
17951 : "\n"
17952 : "hSpatialRef: handle to the coordinate system to use for the new\n"
17953 : "layer, or NULL if no coordinate system is available.\n"
17954 : "\n"
17955 : "eType: the geometry type for the layer. Use wkbUnknown if there are\n"
17956 : "no constraints on the types geometry to be written.\n"
17957 : "\n"
17958 : "papszOptions: a StringList of name=value options. Options are driver\n"
17959 : "specific, and driver information can be found at the following\n"
17960 : "url:http://www.gdal.org/ogr/ogr_formats.html\n"
17961 : "\n"
17962 : "NULL is returned on failure, or a new OGRLayer handle on success.\n"
17963 : "Example: \n"
17964 : ""},
17965 : { (char *)"DataSource_CopyLayer", (PyCFunction) _wrap_DataSource_CopyLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
17966 : "DataSource_CopyLayer(DataSource self, Layer src_layer, char new_name, char options = None) -> Layer\n"
17967 : "\n"
17968 : "OGRLayerH\n"
17969 : "OGR_DS_CopyLayer(OGRDataSourceH hDS, OGRLayerH hSrcLayer, const char\n"
17970 : "*pszNewName, char **papszOptions)\n"
17971 : "\n"
17972 : "Duplicate an existing layer.\n"
17973 : "\n"
17974 : "This function creates a new layer, duplicate the field definitions of\n"
17975 : "the source layer and then duplicate each features of the source layer.\n"
17976 : "The papszOptions argument can be used to control driver specific\n"
17977 : "creation options. These options are normally documented in the format\n"
17978 : "specific documentation. The source layer may come from another\n"
17979 : "dataset.\n"
17980 : "\n"
17981 : "This function is the same as the C++ method OGRDataSource::CopyLayer\n"
17982 : "\n"
17983 : "Parameters:\n"
17984 : "-----------\n"
17985 : "\n"
17986 : "hDS: handle to the data source where to create the new layer\n"
17987 : "\n"
17988 : "hSrcLayer: handle to the source layer.\n"
17989 : "\n"
17990 : "pszNewName: the name of the layer to create.\n"
17991 : "\n"
17992 : "papszOptions: a StringList of name=value options. Options are driver\n"
17993 : "specific.\n"
17994 : "\n"
17995 : "an handle to the layer, or NULL if an error occurs. \n"
17996 : ""},
17997 : { (char *)"DataSource_GetLayerByIndex", _wrap_DataSource_GetLayerByIndex, METH_VARARGS, (char *)"DataSource_GetLayerByIndex(DataSource self, int index = 0) -> Layer"},
17998 : { (char *)"DataSource_GetLayerByName", _wrap_DataSource_GetLayerByName, METH_VARARGS, (char *)"\n"
17999 : "DataSource_GetLayerByName(DataSource self, char layer_name) -> Layer\n"
18000 : "\n"
18001 : "OGRLayerH\n"
18002 : "OGR_DS_GetLayerByName(OGRDataSourceH hDS, const char *pszName)\n"
18003 : "\n"
18004 : "Fetch a layer by name.\n"
18005 : "\n"
18006 : "The returned layer remains owned by the OGRDataSource and should not\n"
18007 : "be deleted by the application.\n"
18008 : "\n"
18009 : "This function is the same as the C++ method\n"
18010 : "OGRDataSource::GetLayerByName().\n"
18011 : "\n"
18012 : "Parameters:\n"
18013 : "-----------\n"
18014 : "\n"
18015 : "hDS: handle to the data source from which to get the layer.\n"
18016 : "\n"
18017 : "pszLayerName: Layer the layer name of the layer to fetch.\n"
18018 : "\n"
18019 : "an handle to the layer, or NULL if the layer is not found or an error\n"
18020 : "occurs. \n"
18021 : ""},
18022 : { (char *)"DataSource_TestCapability", _wrap_DataSource_TestCapability, METH_VARARGS, (char *)"\n"
18023 : "DataSource_TestCapability(DataSource self, char cap) -> bool\n"
18024 : "\n"
18025 : "int\n"
18026 : "OGR_DS_TestCapability(OGRDataSourceH hDS, const char *pszCap)\n"
18027 : "\n"
18028 : "Test if capability is available.\n"
18029 : "\n"
18030 : "One of the following data source capability names can be passed into\n"
18031 : "this function, and a TRUE or FALSE value will be returned indicating\n"
18032 : "whether or not the capability is available for this object.\n"
18033 : "\n"
18034 : "ODsCCreateLayer: True if this datasource can create new layers.\n"
18035 : "\n"
18036 : "The #define macro forms of the capability names should be used in\n"
18037 : "preference to the strings themselves to avoid mispelling.\n"
18038 : "\n"
18039 : "This function is the same as the C++ method\n"
18040 : "OGRDataSource::TestCapability().\n"
18041 : "\n"
18042 : "Parameters:\n"
18043 : "-----------\n"
18044 : "\n"
18045 : "hDS: handle to the data source against which to test the capability.\n"
18046 : "\n"
18047 : "pszCapability: the capability to test.\n"
18048 : "\n"
18049 : "TRUE if capability available otherwise FALSE. \n"
18050 : ""},
18051 : { (char *)"DataSource_ExecuteSQL", (PyCFunction) _wrap_DataSource_ExecuteSQL, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
18052 : "DataSource_ExecuteSQL(DataSource self, char statement, Geometry spatialFilter = None, \n"
18053 : " char dialect = \"\") -> Layer\n"
18054 : "\n"
18055 : "OGRLayerH\n"
18056 : "OGR_DS_ExecuteSQL(OGRDataSourceH hDS, const char *pszStatement,\n"
18057 : "OGRGeometryH hSpatialFilter, const char *pszDialect)\n"
18058 : "\n"
18059 : "Execute an SQL statement against the data store.\n"
18060 : "\n"
18061 : "The result of an SQL query is either NULL for statements that are in\n"
18062 : "error, or that have no results set, or an OGRLayer handle representing\n"
18063 : "a results set from the query. Note that this OGRLayer is in addition\n"
18064 : "to the layers in the data store and must be destroyed with\n"
18065 : "OGR_DS_ReleaseResultSet() before the data source is closed\n"
18066 : "(destroyed).\n"
18067 : "\n"
18068 : "For more information on the SQL dialect supported internally by OGR\n"
18069 : "review theOGR SQL document. Some drivers (ie. Oracle and PostGIS) pass\n"
18070 : "the SQL directly through to the underlying RDBMS.\n"
18071 : "\n"
18072 : "This function is the same as the C++ method\n"
18073 : "OGRDataSource::ExecuteSQL();\n"
18074 : "\n"
18075 : "Parameters:\n"
18076 : "-----------\n"
18077 : "\n"
18078 : "hDS: handle to the data source on which the SQL query is executed.\n"
18079 : "\n"
18080 : "pszSQLCommand: the SQL statement to execute.\n"
18081 : "\n"
18082 : "hSpatialFilter: handle to a geometry which represents a spatial\n"
18083 : "filter. Can be NULL.\n"
18084 : "\n"
18085 : "pszDialect: allows control of the statement dialect. If set to NULL,\n"
18086 : "the OGR SQL engine will be used, except for RDBMS drivers that will\n"
18087 : "use their dedicated SQL engine, unless OGRSQL is explicitely passed as\n"
18088 : "the dialect.\n"
18089 : "\n"
18090 : "an handle to a OGRLayer containing the results of the query.\n"
18091 : "Deallocate with OGR_DS_ReleaseResultSet(). \n"
18092 : ""},
18093 : { (char *)"DataSource_ReleaseResultSet", _wrap_DataSource_ReleaseResultSet, METH_VARARGS, (char *)"\n"
18094 : "DataSource_ReleaseResultSet(DataSource self, Layer layer)\n"
18095 : "\n"
18096 : "void\n"
18097 : "OGR_DS_ReleaseResultSet(OGRDataSourceH hDS, OGRLayerH hLayer)\n"
18098 : "\n"
18099 : "Release results of OGR_DS_ExecuteSQL().\n"
18100 : "\n"
18101 : "This function should only be used to deallocate OGRLayers resulting\n"
18102 : "from an OGR_DS_ExecuteSQL() call on the same OGRDataSource. Failure to\n"
18103 : "deallocate a results set before destroying the OGRDataSource may cause\n"
18104 : "errors.\n"
18105 : "\n"
18106 : "This function is the same as the C++ method\n"
18107 : "OGRDataSource::ReleaseResultSet().\n"
18108 : "\n"
18109 : "Parameters:\n"
18110 : "-----------\n"
18111 : "\n"
18112 : "hDS: an handle to the data source on which was executed an SQL query.\n"
18113 : "\n"
18114 : "hLayer: handle to the result of a previous OGR_DS_ExecuteSQL() call.\n"
18115 : "\n"
18116 : ""},
18117 : { (char *)"DataSource_swigregister", DataSource_swigregister, METH_VARARGS, NULL},
18118 : { (char *)"Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_VARARGS, (char *)"\n"
18119 : "Layer_GetRefCount(Layer self) -> int\n"
18120 : "\n"
18121 : "int OGR_L_GetRefCount(OGRLayerH\n"
18122 : "hLayer) \n"
18123 : ""},
18124 : { (char *)"Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, (char *)"\n"
18125 : "Layer_SetSpatialFilter(Layer self, Geometry filter)\n"
18126 : "\n"
18127 : "void\n"
18128 : "OGR_L_SetSpatialFilter(OGRLayerH hLayer, OGRGeometryH hGeom)\n"
18129 : "\n"
18130 : "Set a new spatial filter.\n"
18131 : "\n"
18132 : "This function set the geometry to be used as a spatial filter when\n"
18133 : "fetching features via the OGR_L_GetNextFeature() function. Only\n"
18134 : "features that geometrically intersect the filter geometry will be\n"
18135 : "returned.\n"
18136 : "\n"
18137 : "Currently this test is may be inaccurately implemented, but it is\n"
18138 : "guaranteed that all features who's envelope (as returned by\n"
18139 : "OGR_G_GetEnvelope()) overlaps the envelope of the spatial filter will\n"
18140 : "be returned. This can result in more shapes being returned that should\n"
18141 : "strictly be the case.\n"
18142 : "\n"
18143 : "This function makes an internal copy of the passed geometry. The\n"
18144 : "passed geometry remains the responsibility of the caller, and may be\n"
18145 : "safely destroyed.\n"
18146 : "\n"
18147 : "For the time being the passed filter geometry should be in the same\n"
18148 : "SRS as the layer (as returned by OGR_L_GetSpatialRef()). In the future\n"
18149 : "this may be generalized.\n"
18150 : "\n"
18151 : "This function is the same as the C++ method\n"
18152 : "OGRLayer::SetSpatialFilter.\n"
18153 : "\n"
18154 : "Parameters:\n"
18155 : "-----------\n"
18156 : "\n"
18157 : "hLayer: handle to the layer on which to set the spatial filter.\n"
18158 : "\n"
18159 : "hGeom: handle to the geometry to use as a filtering region. NULL may\n"
18160 : "be passed indicating that the current spatial filter should be\n"
18161 : "cleared, but no new one instituted. \n"
18162 : ""},
18163 : { (char *)"Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, (char *)"\n"
18164 : "Layer_SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, \n"
18165 : " double maxy)\n"
18166 : "\n"
18167 : "void\n"
18168 : "OGR_L_SetSpatialFilterRect(OGRLayerH hLayer, double dfMinX, double\n"
18169 : "dfMinY, double dfMaxX, double dfMaxY)\n"
18170 : "\n"
18171 : "Set a new rectangular spatial filter.\n"
18172 : "\n"
18173 : "This method set rectangle to be used as a spatial filter when fetching\n"
18174 : "features via the OGR_L_GetNextFeature() method. Only features that\n"
18175 : "geometrically intersect the given rectangle will be returned.\n"
18176 : "\n"
18177 : "The x/y values should be in the same coordinate system as the layer as\n"
18178 : "a whole (as returned by OGRLayer::GetSpatialRef()). Internally this\n"
18179 : "method is normally implemented as creating a 5 vertex closed\n"
18180 : "rectangular polygon and passing it to OGRLayer::SetSpatialFilter(). It\n"
18181 : "exists as a convenience.\n"
18182 : "\n"
18183 : "The only way to clear a spatial filter set with this method is to call\n"
18184 : "OGRLayer::SetSpatialFilter(NULL).\n"
18185 : "\n"
18186 : "This method is the same as the C++ method\n"
18187 : "OGRLayer::SetSpatialFilterRect().\n"
18188 : "\n"
18189 : "Parameters:\n"
18190 : "-----------\n"
18191 : "\n"
18192 : "hLayer: handle to the layer on which to set the spatial filter.\n"
18193 : "\n"
18194 : "dfMinX: the minimum X coordinate for the rectangular region.\n"
18195 : "\n"
18196 : "dfMinY: the minimum Y coordinate for the rectangular region.\n"
18197 : "\n"
18198 : "dfMaxX: the maximum X coordinate for the rectangular region.\n"
18199 : "\n"
18200 : "dfMaxY: the maximum Y coordinate for the rectangular region. \n"
18201 : ""},
18202 : { (char *)"Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_VARARGS, (char *)"\n"
18203 : "Layer_GetSpatialFilter(Layer self) -> Geometry\n"
18204 : "\n"
18205 : "OGRGeometryH\n"
18206 : "OGR_L_GetSpatialFilter(OGRLayerH hLayer)\n"
18207 : "\n"
18208 : "This function returns the current spatial filter for this layer.\n"
18209 : "\n"
18210 : "The returned pointer is to an internally owned object, and should not\n"
18211 : "be altered or deleted by the caller.\n"
18212 : "\n"
18213 : "This function is the same as the C++ method\n"
18214 : "OGRLayer::GetSpatialFilter().\n"
18215 : "\n"
18216 : "Parameters:\n"
18217 : "-----------\n"
18218 : "\n"
18219 : "hLayer: handle to the layer to get the spatial filter from.\n"
18220 : "\n"
18221 : "an handle to the spatial filter geometry. \n"
18222 : ""},
18223 : { (char *)"Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, (char *)"\n"
18224 : "Layer_SetAttributeFilter(Layer self, char filter_string) -> OGRErr\n"
18225 : "\n"
18226 : "OGRErr\n"
18227 : "OGR_L_SetAttributeFilter(OGRLayerH hLayer, const char *pszQuery)\n"
18228 : "\n"
18229 : "Set a new attribute query.\n"
18230 : "\n"
18231 : "This function sets the attribute query string to be used when fetching\n"
18232 : "features via the OGR_L_GetNextFeature() function. Only features for\n"
18233 : "which the query evaluates as true will be returned.\n"
18234 : "\n"
18235 : "The query string should be in the format of an SQL WHERE clause. For\n"
18236 : "instance \"population > 1000000 and population < 5000000\" where\n"
18237 : "population is an attribute in the layer. The query format is a\n"
18238 : "restricted form of SQL WHERE clause as defined\n"
18239 : "\"eq_format=restricted_where\" about half way through this document:\n"
18240 : "\n"
18241 : "http://ogdi.sourceforge.net/prop/6.2.CapabilitiesMetadata.html\n"
18242 : "\n"
18243 : "Note that installing a query string will generally result in resetting\n"
18244 : "the current reading position (ala OGR_L_ResetReading()).\n"
18245 : "\n"
18246 : "This function is the same as the C++ method\n"
18247 : "OGRLayer::SetAttributeFilter().\n"
18248 : "\n"
18249 : "Parameters:\n"
18250 : "-----------\n"
18251 : "\n"
18252 : "hLayer: handle to the layer on which attribute query will be\n"
18253 : "executed.\n"
18254 : "\n"
18255 : "pszQuery: query in restricted SQL WHERE format, or NULL to clear the\n"
18256 : "current query.\n"
18257 : "\n"
18258 : "OGRERR_NONE if successfully installed, or an error code if the query\n"
18259 : "expression is in error, or some other failure occurs. \n"
18260 : ""},
18261 : { (char *)"Layer_ResetReading", _wrap_Layer_ResetReading, METH_VARARGS, (char *)"\n"
18262 : "Layer_ResetReading(Layer self)\n"
18263 : "\n"
18264 : "void\n"
18265 : "OGR_L_ResetReading(OGRLayerH hLayer)\n"
18266 : "\n"
18267 : "Reset feature reading to start on the first feature.\n"
18268 : "\n"
18269 : "This affects GetNextFeature().\n"
18270 : "\n"
18271 : "This function is the same as the C++ method OGRLayer::ResetReading().\n"
18272 : "\n"
18273 : "Parameters:\n"
18274 : "-----------\n"
18275 : "\n"
18276 : "hLayer: handle to the layer on which features are read. \n"
18277 : ""},
18278 : { (char *)"Layer_GetName", _wrap_Layer_GetName, METH_VARARGS, (char *)"\n"
18279 : "Layer_GetName(Layer self) -> char\n"
18280 : "\n"
18281 : "const char* OGR_L_GetName(OGRLayerH\n"
18282 : "hLayer)\n"
18283 : "\n"
18284 : "Return the layer name.\n"
18285 : "\n"
18286 : "This returns the same content as\n"
18287 : "OGR_FD_GetName(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
18288 : "calling OGR_L_GetName() directly can avoid lengthy layer definition\n"
18289 : "initialization.\n"
18290 : "\n"
18291 : "This function is the same as the C++ method OGRLayer::GetName().\n"
18292 : "\n"
18293 : "Parameters:\n"
18294 : "-----------\n"
18295 : "\n"
18296 : "hLayer: handle to the layer.\n"
18297 : "\n"
18298 : "the layer name (must not been freed)\n"
18299 : "\n"
18300 : "OGR 1.8.0 \n"
18301 : ""},
18302 : { (char *)"Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_VARARGS, (char *)"\n"
18303 : "Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\n"
18304 : "\n"
18305 : "OGRwkbGeometryType\n"
18306 : "OGR_L_GetGeomType(OGRLayerH hLayer)\n"
18307 : "\n"
18308 : "Return the layer geometry type.\n"
18309 : "\n"
18310 : "This returns the same result as\n"
18311 : "OGR_FD_GetGeomType(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
18312 : "calling OGR_L_GetGeomType() directly can avoid lengthy layer\n"
18313 : "definition initialization.\n"
18314 : "\n"
18315 : "This function is the same as the C++ method OGRLayer::GetGeomType().\n"
18316 : "\n"
18317 : "Parameters:\n"
18318 : "-----------\n"
18319 : "\n"
18320 : "hLayer: handle to the layer.\n"
18321 : "\n"
18322 : "the geometry type\n"
18323 : "\n"
18324 : "OGR 1.8.0 \n"
18325 : ""},
18326 : { (char *)"Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_VARARGS, (char *)"\n"
18327 : "Layer_GetGeometryColumn(Layer self) -> char\n"
18328 : "\n"
18329 : "const char*\n"
18330 : "OGR_L_GetGeometryColumn(OGRLayerH hLayer)\n"
18331 : "\n"
18332 : "This method returns the name of the underlying database column being\n"
18333 : "used as the geometry column, or \"\" if not supported.\n"
18334 : "\n"
18335 : "This method is the same as the C++ method\n"
18336 : "OGRLayer::GetGeometryColumn()\n"
18337 : "\n"
18338 : "Parameters:\n"
18339 : "-----------\n"
18340 : "\n"
18341 : "hLayer: handle to the layer\n"
18342 : "\n"
18343 : "geometry column name. \n"
18344 : ""},
18345 : { (char *)"Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_VARARGS, (char *)"\n"
18346 : "Layer_GetFIDColumn(Layer self) -> char\n"
18347 : "\n"
18348 : "const char*\n"
18349 : "OGR_L_GetFIDColumn(OGRLayerH hLayer)\n"
18350 : "\n"
18351 : "This method returns the name of the underlying database column being\n"
18352 : "used as the FID column, or \"\" if not supported.\n"
18353 : "\n"
18354 : "This method is the same as the C++ method OGRLayer::GetFIDColumn()\n"
18355 : "\n"
18356 : "Parameters:\n"
18357 : "-----------\n"
18358 : "\n"
18359 : "hLayer: handle to the layer\n"
18360 : "\n"
18361 : "fid column name. \n"
18362 : ""},
18363 : { (char *)"Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, (char *)"\n"
18364 : "Layer_GetFeature(Layer self, long fid) -> Feature\n"
18365 : "\n"
18366 : "OGRFeatureH\n"
18367 : "OGR_L_GetFeature(OGRLayerH hLayer, long nFeatureId)\n"
18368 : "\n"
18369 : "Fetch a feature by its identifier.\n"
18370 : "\n"
18371 : "This function will attempt to read the identified feature. The nFID\n"
18372 : "value cannot be OGRNullFID. Success or failure of this operation is\n"
18373 : "unaffected by the spatial or attribute filters.\n"
18374 : "\n"
18375 : "If this function returns a non-NULL feature, it is guaranteed that its\n"
18376 : "feature id ( OGR_F_GetFID()) will be the same as nFID.\n"
18377 : "\n"
18378 : "Use OGR_L_TestCapability(OLCRandomRead) to establish if this layer\n"
18379 : "supports efficient random access reading via OGR_L_GetFeature();\n"
18380 : "however, the call should always work if the feature exists as a\n"
18381 : "fallback implementation just scans all the features in the layer\n"
18382 : "looking for the desired feature.\n"
18383 : "\n"
18384 : "Sequential reads are generally considered interrupted by a\n"
18385 : "OGR_L_GetFeature() call.\n"
18386 : "\n"
18387 : "The returned feature should be free with OGR_F_Destroy().\n"
18388 : "\n"
18389 : "This function is the same as the C++ method OGRLayer::GetFeature( ).\n"
18390 : "\n"
18391 : "Parameters:\n"
18392 : "-----------\n"
18393 : "\n"
18394 : "hLayer: handle to the layer that owned the feature.\n"
18395 : "\n"
18396 : "nFeatureId: the feature id of the feature to read.\n"
18397 : "\n"
18398 : "an handle to a feature now owned by the caller, or NULL on failure. \n"
18399 : ""},
18400 : { (char *)"Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_VARARGS, (char *)"\n"
18401 : "Layer_GetNextFeature(Layer self) -> Feature\n"
18402 : "\n"
18403 : "OGRFeatureH\n"
18404 : "OGR_L_GetNextFeature(OGRLayerH hLayer)\n"
18405 : "\n"
18406 : "Fetch the next available feature from this layer.\n"
18407 : "\n"
18408 : "The returned feature becomes the responsiblity of the caller to delete\n"
18409 : "with OGR_F_Destroy(). It is critical that all features associated with\n"
18410 : "an OGRLayer (more specifically an OGRFeatureDefn) be deleted before\n"
18411 : "that layer/datasource is deleted.\n"
18412 : "\n"
18413 : "Only features matching the current spatial filter (set with\n"
18414 : "SetSpatialFilter()) will be returned.\n"
18415 : "\n"
18416 : "This function implements sequential access to the features of a layer.\n"
18417 : "The OGR_L_ResetReading() function can be used to start at the\n"
18418 : "beginning again.\n"
18419 : "\n"
18420 : "This function is the same as the C++ method\n"
18421 : "OGRLayer::GetNextFeature().\n"
18422 : "\n"
18423 : "Parameters:\n"
18424 : "-----------\n"
18425 : "\n"
18426 : "hLayer: handle to the layer from which feature are read.\n"
18427 : "\n"
18428 : "an handle to a feature, or NULL if no more features are available. \n"
18429 : ""},
18430 : { (char *)"Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, (char *)"\n"
18431 : "Layer_SetNextByIndex(Layer self, long new_index) -> OGRErr\n"
18432 : "\n"
18433 : "OGRErr\n"
18434 : "OGR_L_SetNextByIndex(OGRLayerH hLayer, long nIndex)\n"
18435 : "\n"
18436 : "Move read cursor to the nIndex'th feature in the current resultset.\n"
18437 : "\n"
18438 : "This method allows positioning of a layer such that the\n"
18439 : "GetNextFeature() call will read the requested feature, where nIndex is\n"
18440 : "an absolute index into the current result set. So, setting it to 3\n"
18441 : "would mean the next feature read with GetNextFeature() would have been\n"
18442 : "the 4th feature to have been read if sequential reading took place\n"
18443 : "from the beginning of the layer, including accounting for spatial and\n"
18444 : "attribute filters.\n"
18445 : "\n"
18446 : "Only in rare circumstances is SetNextByIndex() efficiently\n"
18447 : "implemented. In all other cases the default implementation which calls\n"
18448 : "ResetReading() and then calls GetNextFeature() nIndex times is used.\n"
18449 : "To determine if fast seeking is available on the current layer use the\n"
18450 : "TestCapability() method with a value of OLCFastSetNextByIndex.\n"
18451 : "\n"
18452 : "This method is the same as the C++ method OGRLayer::SetNextByIndex()\n"
18453 : "\n"
18454 : "Parameters:\n"
18455 : "-----------\n"
18456 : "\n"
18457 : "hLayer: handle to the layer\n"
18458 : "\n"
18459 : "nIndex: the index indicating how many steps into the result set to\n"
18460 : "seek.\n"
18461 : "\n"
18462 : "OGRERR_NONE on success or an error code. \n"
18463 : ""},
18464 : { (char *)"Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, (char *)"\n"
18465 : "Layer_SetFeature(Layer self, Feature feature) -> OGRErr\n"
18466 : "\n"
18467 : "OGRErr OGR_L_SetFeature(OGRLayerH\n"
18468 : "hLayer, OGRFeatureH hFeat)\n"
18469 : "\n"
18470 : "Rewrite an existing feature.\n"
18471 : "\n"
18472 : "This function will write a feature to the layer, based on the feature\n"
18473 : "id within the OGRFeature.\n"
18474 : "\n"
18475 : "Use OGR_L_TestCapability(OLCRandomWrite) to establish if this layer\n"
18476 : "supports random access writing via OGR_L_SetFeature().\n"
18477 : "\n"
18478 : "This function is the same as the C++ method OGRLayer::SetFeature().\n"
18479 : "\n"
18480 : "Parameters:\n"
18481 : "-----------\n"
18482 : "\n"
18483 : "hLayer: handle to the layer to write the feature.\n"
18484 : "\n"
18485 : "hFeat: the feature to write.\n"
18486 : "\n"
18487 : "OGRERR_NONE if the operation works, otherwise an appropriate error\n"
18488 : "code. \n"
18489 : ""},
18490 : { (char *)"Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, (char *)"\n"
18491 : "Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\n"
18492 : "\n"
18493 : "OGRErr\n"
18494 : "OGR_L_CreateFeature(OGRLayerH hLayer, OGRFeatureH hFeat)\n"
18495 : "\n"
18496 : "Create and write a new feature within a layer.\n"
18497 : "\n"
18498 : "The passed feature is written to the layer as a new feature, rather\n"
18499 : "than overwriting an existing one. If the feature has a feature id\n"
18500 : "other than OGRNullFID, then the native implementation may use that as\n"
18501 : "the feature id of the new feature, but not necessarily. Upon\n"
18502 : "successful return the passed feature will have been updated with the\n"
18503 : "new feature id.\n"
18504 : "\n"
18505 : "This function is the same as the C++ method OGRLayer::CreateFeature().\n"
18506 : "\n"
18507 : "Parameters:\n"
18508 : "-----------\n"
18509 : "\n"
18510 : "hLayer: handle to the layer to write the feature to.\n"
18511 : "\n"
18512 : "hFeat: the handle of the feature to write to disk.\n"
18513 : "\n"
18514 : "OGRERR_NONE on success. \n"
18515 : ""},
18516 : { (char *)"Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, (char *)"\n"
18517 : "Layer_DeleteFeature(Layer self, long fid) -> OGRErr\n"
18518 : "\n"
18519 : "OGRErr\n"
18520 : "OGR_L_DeleteFeature(OGRLayerH hDS, long nFID)\n"
18521 : "\n"
18522 : "Delete feature from layer.\n"
18523 : "\n"
18524 : "The feature with the indicated feature id is deleted from the layer if\n"
18525 : "supported by the driver. Most drivers do not support feature deletion,\n"
18526 : "and will return OGRERR_UNSUPPORTED_OPERATION. The\n"
18527 : "OGR_L_TestCapability() function may be called with OLCDeleteFeature to\n"
18528 : "check if the driver supports feature deletion.\n"
18529 : "\n"
18530 : "This method is the same as the C++ method OGRLayer::DeleteFeature().\n"
18531 : "\n"
18532 : "Parameters:\n"
18533 : "-----------\n"
18534 : "\n"
18535 : "hLayer: handle to the layer\n"
18536 : "\n"
18537 : "nFID: the feature id to be deleted from the layer\n"
18538 : "\n"
18539 : "OGRERR_NONE on success. \n"
18540 : ""},
18541 : { (char *)"Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_VARARGS, (char *)"\n"
18542 : "Layer_SyncToDisk(Layer self) -> OGRErr\n"
18543 : "\n"
18544 : "OGRErr OGR_L_SyncToDisk(OGRLayerH\n"
18545 : "hDS)\n"
18546 : "\n"
18547 : "Flush pending changes to disk.\n"
18548 : "\n"
18549 : "This call is intended to force the layer to flush any pending writes\n"
18550 : "to disk, and leave the disk file in a consistent state. It would not\n"
18551 : "normally have any effect on read-only datasources.\n"
18552 : "\n"
18553 : "Some layers do not implement this method, and will still return\n"
18554 : "OGRERR_NONE. The default implementation just returns OGRERR_NONE. An\n"
18555 : "error is only returned if an error occurs while attempting to flush to\n"
18556 : "disk.\n"
18557 : "\n"
18558 : "In any event, you should always close any opened datasource with\n"
18559 : "OGR_DS_Destroy() that will ensure all data is correctly flushed.\n"
18560 : "\n"
18561 : "This method is the same as the C++ method OGRLayer::SyncToDisk()\n"
18562 : "\n"
18563 : "Parameters:\n"
18564 : "-----------\n"
18565 : "\n"
18566 : "hLayer: handle to the layer\n"
18567 : "\n"
18568 : "OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
18569 : "code. \n"
18570 : ""},
18571 : { (char *)"Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_VARARGS, (char *)"\n"
18572 : "Layer_GetLayerDefn(Layer self) -> FeatureDefn\n"
18573 : "\n"
18574 : "OGRFeatureDefnH\n"
18575 : "OGR_L_GetLayerDefn(OGRLayerH hLayer)\n"
18576 : "\n"
18577 : "Fetch the schema information for this layer.\n"
18578 : "\n"
18579 : "The returned handle to the OGRFeatureDefn is owned by the OGRLayer,\n"
18580 : "and should not be modified or freed by the application. It\n"
18581 : "encapsulates the attribute schema of the features of the layer.\n"
18582 : "\n"
18583 : "This function is the same as the C++ method OGRLayer::GetLayerDefn().\n"
18584 : "\n"
18585 : "Parameters:\n"
18586 : "-----------\n"
18587 : "\n"
18588 : "hLayer: handle to the layer to get the schema information.\n"
18589 : "\n"
18590 : "an handle to the feature definition. \n"
18591 : ""},
18592 : { (char *)"Layer_GetFeatureCount", (PyCFunction) _wrap_Layer_GetFeatureCount, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
18593 : "Layer_GetFeatureCount(Layer self, int force = 1) -> int\n"
18594 : "\n"
18595 : "int\n"
18596 : "OGR_L_GetFeatureCount(OGRLayerH hLayer, int bForce)\n"
18597 : "\n"
18598 : "Fetch the feature count in this layer.\n"
18599 : "\n"
18600 : "Returns the number of features in the layer. For dynamic databases the\n"
18601 : "count may not be exact. If bForce is FALSE, and it would be expensive\n"
18602 : "to establish the feature count a value of -1 may be returned\n"
18603 : "indicating that the count isn't know. If bForce is TRUE some\n"
18604 : "implementations will actually scan the entire layer once to count\n"
18605 : "objects.\n"
18606 : "\n"
18607 : "The returned count takes the spatial filter into account.\n"
18608 : "\n"
18609 : "Note that some implementations of this method may alter the read\n"
18610 : "cursor of the layer.\n"
18611 : "\n"
18612 : "This function is the same as the CPP OGRLayer::GetFeatureCount().\n"
18613 : "\n"
18614 : "Parameters:\n"
18615 : "-----------\n"
18616 : "\n"
18617 : "hLayer: handle to the layer that owned the features.\n"
18618 : "\n"
18619 : "bForce: Flag indicating whether the count should be computed even if\n"
18620 : "it is expensive.\n"
18621 : "\n"
18622 : "feature count, -1 if count not known. \n"
18623 : ""},
18624 : { (char *)"Layer_GetExtent", (PyCFunction) _wrap_Layer_GetExtent, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
18625 : "Layer_GetExtent(Layer self, int force = 1, int can_return_null = 0)\n"
18626 : "\n"
18627 : "OGRErr OGR_L_GetExtent(OGRLayerH\n"
18628 : "hLayer, OGREnvelope *psExtent, int bForce)\n"
18629 : "\n"
18630 : "Fetch the extent of this layer.\n"
18631 : "\n"
18632 : "Returns the extent (MBR) of the data in the layer. If bForce is FALSE,\n"
18633 : "and it would be expensive to establish the extent then OGRERR_FAILURE\n"
18634 : "will be returned indicating that the extent isn't know. If bForce is\n"
18635 : "TRUE then some implementations will actually scan the entire layer\n"
18636 : "once to compute the MBR of all the features in the layer.\n"
18637 : "\n"
18638 : "Depending on the drivers, the returned extent may or may not take the\n"
18639 : "spatial filter into account. So it is safer to call OGR_L_GetExtent()\n"
18640 : "without setting a spatial filter.\n"
18641 : "\n"
18642 : "Layers without any geometry may return OGRERR_FAILURE just indicating\n"
18643 : "that no meaningful extents could be collected.\n"
18644 : "\n"
18645 : "Note that some implementations of this method may alter the read\n"
18646 : "cursor of the layer.\n"
18647 : "\n"
18648 : "This function is the same as the C++ method OGRLayer::GetExtent().\n"
18649 : "\n"
18650 : "Parameters:\n"
18651 : "-----------\n"
18652 : "\n"
18653 : "hLayer: handle to the layer from which to get extent.\n"
18654 : "\n"
18655 : "psExtent: the structure in which the extent value will be returned.\n"
18656 : "\n"
18657 : "bForce: Flag indicating whether the extent should be computed even if\n"
18658 : "it is expensive.\n"
18659 : "\n"
18660 : "OGRERR_NONE on success, OGRERR_FAILURE if extent not known. \n"
18661 : ""},
18662 : { (char *)"Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, (char *)"\n"
18663 : "Layer_TestCapability(Layer self, char cap) -> bool\n"
18664 : "\n"
18665 : "int\n"
18666 : "OGR_L_TestCapability(OGRLayerH hLayer, const char *pszCap)\n"
18667 : "\n"
18668 : "Test if this layer supported the named capability.\n"
18669 : "\n"
18670 : "The capability codes that can be tested are represented as strings,\n"
18671 : "but #defined constants exists to ensure correct spelling. Specific\n"
18672 : "layer types may implement class specific capabilities, but this can't\n"
18673 : "generally be discovered by the caller.\n"
18674 : "\n"
18675 : "OLCRandomRead / \"RandomRead\": TRUE if the GetFeature() method is\n"
18676 : "implemented in an optimized way for this layer, as opposed to the\n"
18677 : "default implementation using ResetReading() and GetNextFeature() to\n"
18678 : "find the requested feature id.\n"
18679 : "\n"
18680 : "OLCSequentialWrite / \"SequentialWrite\": TRUE if the CreateFeature()\n"
18681 : "method works for this layer. Note this means that this particular\n"
18682 : "layer is writable. The same OGRLayer class may returned FALSE for\n"
18683 : "other layer instances that are effectively read-only.\n"
18684 : "\n"
18685 : "OLCRandomWrite / \"RandomWrite\": TRUE if the SetFeature() method is\n"
18686 : "operational on this layer. Note this means that this particular layer\n"
18687 : "is writable. The same OGRLayer class may returned FALSE for other\n"
18688 : "layer instances that are effectively read-only.\n"
18689 : "\n"
18690 : "OLCFastSpatialFilter / \"FastSpatialFilter\": TRUE if this layer\n"
18691 : "implements spatial filtering efficiently. Layers that effectively read\n"
18692 : "all features, and test them with the OGRFeature intersection methods\n"
18693 : "should return FALSE. This can be used as a clue by the application\n"
18694 : "whether it should build and maintain its own spatial index for\n"
18695 : "features in this layer.\n"
18696 : "\n"
18697 : "OLCFastFeatureCount / \"FastFeatureCount\": TRUE if this layer can\n"
18698 : "return a feature count (via OGR_L_GetFeatureCount()) efficiently ...\n"
18699 : "ie. without counting the features. In some cases this will return TRUE\n"
18700 : "until a spatial filter is installed after which it will return FALSE.\n"
18701 : "\n"
18702 : "OLCFastGetExtent / \"FastGetExtent\": TRUE if this layer can return\n"
18703 : "its data extent (via OGR_L_GetExtent()) efficiently ... ie. without\n"
18704 : "scanning all the features. In some cases this will return TRUE until a\n"
18705 : "spatial filter is installed after which it will return FALSE.\n"
18706 : "\n"
18707 : "OLCFastSetNextByIndex / \"FastSetNextByIndex\": TRUE if this layer can\n"
18708 : "perform the SetNextByIndex() call efficiently, otherwise FALSE.\n"
18709 : "\n"
18710 : "OLCCreateField / \"CreateField\": TRUE if this layer can create new\n"
18711 : "fields on the current layer using CreateField(), otherwise FALSE.\n"
18712 : "\n"
18713 : "OLCDeleteField / \"DeleteField\": TRUE if this layer can delete\n"
18714 : "existing fields on the current layer using DeleteField(), otherwise\n"
18715 : "FALSE.\n"
18716 : "\n"
18717 : "OLCReorderFields / \"ReorderFields\": TRUE if this layer can reorder\n"
18718 : "existing fields on the current layer using ReorderField() or\n"
18719 : "ReorderFields(), otherwise FALSE.\n"
18720 : "\n"
18721 : "OLCAlterFieldDefn / \"AlterFieldDefn\": TRUE if this layer can alter\n"
18722 : "the definition of an existing field on the current layer using\n"
18723 : "AlterFieldDefn(), otherwise FALSE.\n"
18724 : "\n"
18725 : "OLCDeleteFeature / \"DeleteFeature\": TRUE if the DeleteFeature()\n"
18726 : "method is supported on this layer, otherwise FALSE.\n"
18727 : "\n"
18728 : "OLCStringsAsUTF8 / \"StringsAsUTF8\": TRUE if values of OFTString\n"
18729 : "fields are assured to be in UTF-8 format. If FALSE the encoding of\n"
18730 : "fields is uncertain, though it might still be UTF-8.\n"
18731 : "\n"
18732 : "OLCTransactions / \"Transactions\": TRUE if the StartTransaction(),\n"
18733 : "CommitTransaction() and RollbackTransaction() methods work in a\n"
18734 : "meaningful way, otherwise FALSE.\n"
18735 : "\n"
18736 : "This function is the same as the C++ method\n"
18737 : "OGRLayer::TestCapability().\n"
18738 : "\n"
18739 : "Parameters:\n"
18740 : "-----------\n"
18741 : "\n"
18742 : "hLayer: handle to the layer to get the capability from.\n"
18743 : "\n"
18744 : "pszCap: the name of the capability to test.\n"
18745 : "\n"
18746 : "TRUE if the layer has the requested capability, or FALSE otherwise.\n"
18747 : "OGRLayers will return FALSE for any unrecognised capabilities. \n"
18748 : ""},
18749 : { (char *)"Layer_CreateField", (PyCFunction) _wrap_Layer_CreateField, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
18750 : "Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok = 1) -> OGRErr\n"
18751 : "\n"
18752 : "OGRErr\n"
18753 : "OGR_L_CreateField(OGRLayerH hLayer, OGRFieldDefnH hField, int\n"
18754 : "bApproxOK)\n"
18755 : "\n"
18756 : "Create a new field on a layer.\n"
18757 : "\n"
18758 : "You must use this to create new fields on a real layer. Internally the\n"
18759 : "OGRFeatureDefn for the layer will be updated to reflect the new field.\n"
18760 : "Applications should never modify the OGRFeatureDefn used by a layer\n"
18761 : "directly.\n"
18762 : "\n"
18763 : "This function should not be called while there are feature objects in\n"
18764 : "existance that were obtained or created with the previous layer\n"
18765 : "definition.\n"
18766 : "\n"
18767 : "Not all drivers support this function. You can query a layer to check\n"
18768 : "if it supports it with the OLCCreateField capability. Some drivers may\n"
18769 : "only support this method while there are still no features in the\n"
18770 : "layer. When it is supported, the existings features of the backing\n"
18771 : "file/database should be updated accordingly.\n"
18772 : "\n"
18773 : "This function is the same as the C++ method OGRLayer::CreateField().\n"
18774 : "\n"
18775 : "Parameters:\n"
18776 : "-----------\n"
18777 : "\n"
18778 : "hLayer: handle to the layer to write the field definition.\n"
18779 : "\n"
18780 : "hField: handle of the field definition to write to disk.\n"
18781 : "\n"
18782 : "bApproxOK: If TRUE, the field may be created in a slightly different\n"
18783 : "form depending on the limitations of the format driver.\n"
18784 : "\n"
18785 : "OGRERR_NONE on success. \n"
18786 : ""},
18787 : { (char *)"Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, (char *)"\n"
18788 : "Layer_DeleteField(Layer self, int iField) -> OGRErr\n"
18789 : "\n"
18790 : "OGRErr\n"
18791 : "OGR_L_DeleteField(OGRLayerH hLayer, int iField)\n"
18792 : "\n"
18793 : "Create a new field on a layer.\n"
18794 : "\n"
18795 : "You must use this to delete existing fields on a real layer.\n"
18796 : "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
18797 : "the deleted field. Applications should never modify the OGRFeatureDefn\n"
18798 : "used by a layer directly.\n"
18799 : "\n"
18800 : "This function should not be called while there are feature objects in\n"
18801 : "existance that were obtained or created with the previous layer\n"
18802 : "definition.\n"
18803 : "\n"
18804 : "Not all drivers support this function. You can query a layer to check\n"
18805 : "if it supports it with the OLCDeleteField capability. Some drivers may\n"
18806 : "only support this method while there are still no features in the\n"
18807 : "layer. When it is supported, the existings features of the backing\n"
18808 : "file/database should be updated accordingly.\n"
18809 : "\n"
18810 : "This function is the same as the C++ method OGRLayer::DeleteField().\n"
18811 : "\n"
18812 : "Parameters:\n"
18813 : "-----------\n"
18814 : "\n"
18815 : "hLayer: handle to the layer.\n"
18816 : "\n"
18817 : "iField: index of the field to delete.\n"
18818 : "\n"
18819 : "OGRERR_NONE on success.\n"
18820 : "\n"
18821 : "OGR 1.9.0 \n"
18822 : ""},
18823 : { (char *)"Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, (char *)"\n"
18824 : "Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\n"
18825 : "\n"
18826 : "OGRErr\n"
18827 : "OGR_L_ReorderField(OGRLayerH hLayer, int iOldFieldPos, int\n"
18828 : "iNewFieldPos)\n"
18829 : "\n"
18830 : "Reorder an existing field on a layer.\n"
18831 : "\n"
18832 : "This function is a conveniency wrapper of OGR_L_ReorderFields()\n"
18833 : "dedicated to move a single field.\n"
18834 : "\n"
18835 : "You must use this to reorder existing fields on a real layer.\n"
18836 : "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
18837 : "the reordering of the fields. Applications should never modify the\n"
18838 : "OGRFeatureDefn used by a layer directly.\n"
18839 : "\n"
18840 : "This function should not be called while there are feature objects in\n"
18841 : "existance that were obtained or created with the previous layer\n"
18842 : "definition.\n"
18843 : "\n"
18844 : "The field definition that was at initial position iOldFieldPos will be\n"
18845 : "moved at position iNewFieldPos, and elements between will be shuffled\n"
18846 : "accordingly.\n"
18847 : "\n"
18848 : "For example, let suppose the fields were \"0\",\"1\",\"2\",\"3\",\"4\"\n"
18849 : "initially. ReorderField(1, 3) will reorder them as\n"
18850 : "\"0\",\"2\",\"3\",\"1\",\"4\".\n"
18851 : "\n"
18852 : "Not all drivers support this function. You can query a layer to check\n"
18853 : "if it supports it with the OLCReorderFields capability. Some drivers\n"
18854 : "may only support this method while there are still no features in the\n"
18855 : "layer. When it is supported, the existings features of the backing\n"
18856 : "file/database should be updated accordingly.\n"
18857 : "\n"
18858 : "This function is the same as the C++ method OGRLayer::ReorderField().\n"
18859 : "\n"
18860 : "Parameters:\n"
18861 : "-----------\n"
18862 : "\n"
18863 : "hLayer: handle to the layer.\n"
18864 : "\n"
18865 : "iOldFieldPos: previous position of the field to move. Must be in the\n"
18866 : "range [0,GetFieldCount()-1].\n"
18867 : "\n"
18868 : "iNewFieldPos: new position of the field to move. Must be in the range\n"
18869 : "[0,GetFieldCount()-1].\n"
18870 : "\n"
18871 : "OGRERR_NONE on success.\n"
18872 : "\n"
18873 : "OGR 1.9.0 \n"
18874 : ""},
18875 : { (char *)"Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, (char *)"\n"
18876 : "Layer_ReorderFields(Layer self, int nList) -> OGRErr\n"
18877 : "\n"
18878 : "OGRErr\n"
18879 : "OGR_L_ReorderFields(OGRLayerH hLayer, int *panMap)\n"
18880 : "\n"
18881 : "Reorder all the fields of a layer.\n"
18882 : "\n"
18883 : "You must use this to reorder existing fields on a real layer.\n"
18884 : "Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
18885 : "the reordering of the fields. Applications should never modify the\n"
18886 : "OGRFeatureDefn used by a layer directly.\n"
18887 : "\n"
18888 : "This function should not be called while there are feature objects in\n"
18889 : "existance that were obtained or created with the previous layer\n"
18890 : "definition.\n"
18891 : "\n"
18892 : "panMap is such that,for each field definition at position i after\n"
18893 : "reordering, its position before reordering was panMap[i].\n"
18894 : "\n"
18895 : "For example, let suppose the fields were \"0\",\"1\",\"2\",\"3\",\"4\"\n"
18896 : "initially. ReorderFields([0,2,3,1,4]) will reorder them as\n"
18897 : "\"0\",\"2\",\"3\",\"1\",\"4\".\n"
18898 : "\n"
18899 : "Not all drivers support this function. You can query a layer to check\n"
18900 : "if it supports it with the OLCReorderFields capability. Some drivers\n"
18901 : "may only support this method while there are still no features in the\n"
18902 : "layer. When it is supported, the existings features of the backing\n"
18903 : "file/database should be updated accordingly.\n"
18904 : "\n"
18905 : "This function is the same as the C++ method OGRLayer::ReorderFields().\n"
18906 : "\n"
18907 : "Parameters:\n"
18908 : "-----------\n"
18909 : "\n"
18910 : "hLayer: handle to the layer.\n"
18911 : "\n"
18912 : "panMap: an array of GetLayerDefn()->GetFieldCount() elements which is\n"
18913 : "a permutation of [0, GetLayerDefn()->GetFieldCount()-1].\n"
18914 : "\n"
18915 : "OGRERR_NONE on success.\n"
18916 : "\n"
18917 : "OGR 1.9.0 \n"
18918 : ""},
18919 : { (char *)"Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, (char *)"\n"
18920 : "Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\n"
18921 : "\n"
18922 : "OGRErr\n"
18923 : "OGR_L_AlterFieldDefn(OGRLayerH hLayer, int iField, OGRFieldDefnH\n"
18924 : "hNewFieldDefn, int nFlags)\n"
18925 : "\n"
18926 : "Alter the definition of an existing field on a layer.\n"
18927 : "\n"
18928 : "You must use this to alter the definition of an existing field of a\n"
18929 : "real layer. Internally the OGRFeatureDefn for the layer will be\n"
18930 : "updated to reflect the altered field. Applications should never modify\n"
18931 : "the OGRFeatureDefn used by a layer directly.\n"
18932 : "\n"
18933 : "This function should not be called while there are feature objects in\n"
18934 : "existance that were obtained or created with the previous layer\n"
18935 : "definition.\n"
18936 : "\n"
18937 : "Not all drivers support this function. You can query a layer to check\n"
18938 : "if it supports it with the OLCAlterFieldDefn capability. Some drivers\n"
18939 : "may only support this method while there are still no features in the\n"
18940 : "layer. When it is supported, the existings features of the backing\n"
18941 : "file/database should be updated accordingly. Some drivers might also\n"
18942 : "not support all update flags.\n"
18943 : "\n"
18944 : "This function is the same as the C++ method\n"
18945 : "OGRLayer::AlterFieldDefn().\n"
18946 : "\n"
18947 : "Parameters:\n"
18948 : "-----------\n"
18949 : "\n"
18950 : "hLayer: handle to the layer.\n"
18951 : "\n"
18952 : "iField: index of the field whose definition must be altered.\n"
18953 : "\n"
18954 : "hNewFieldDefn: new field definition\n"
18955 : "\n"
18956 : "nFlags: combination of ALTER_NAME_FLAG, ALTER_TYPE_FLAG and\n"
18957 : "ALTER_WIDTH_PRECISION_FLAG to indicate which of the name and/or type\n"
18958 : "and/or width and precision fields from the new field definition must\n"
18959 : "be taken into account.\n"
18960 : "\n"
18961 : "OGRERR_NONE on success.\n"
18962 : "\n"
18963 : "OGR 1.9.0 \n"
18964 : ""},
18965 : { (char *)"Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_VARARGS, (char *)"\n"
18966 : "Layer_StartTransaction(Layer self) -> OGRErr\n"
18967 : "\n"
18968 : "OGRErr\n"
18969 : "OGR_L_StartTransaction(OGRLayerH hLayer)\n"
18970 : "\n"
18971 : "For datasources which support transactions, StartTransaction creates a\n"
18972 : "transaction.\n"
18973 : "\n"
18974 : "If starting the transaction fails, will return OGRERR_FAILURE.\n"
18975 : "Datasources which do not support transactions will always return\n"
18976 : "OGRERR_NONE.\n"
18977 : "\n"
18978 : "This function is the same as the C++ method\n"
18979 : "OGRLayer::StartTransaction().\n"
18980 : "\n"
18981 : "Parameters:\n"
18982 : "-----------\n"
18983 : "\n"
18984 : "hLayer: handle to the layer\n"
18985 : "\n"
18986 : "OGRERR_NONE on success. \n"
18987 : ""},
18988 : { (char *)"Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_VARARGS, (char *)"\n"
18989 : "Layer_CommitTransaction(Layer self) -> OGRErr\n"
18990 : "\n"
18991 : "OGRErr\n"
18992 : "OGR_L_CommitTransaction(OGRLayerH hLayer)\n"
18993 : "\n"
18994 : "For datasources which support transactions, CommitTransaction commits\n"
18995 : "a transaction.\n"
18996 : "\n"
18997 : "If no transaction is active, or the commit fails, will return\n"
18998 : "OGRERR_FAILURE. Datasources which do not support transactions will\n"
18999 : "always return OGRERR_NONE.\n"
19000 : "\n"
19001 : "This function is the same as the C++ method\n"
19002 : "OGRLayer::CommitTransaction().\n"
19003 : "\n"
19004 : "Parameters:\n"
19005 : "-----------\n"
19006 : "\n"
19007 : "hLayer: handle to the layer\n"
19008 : "\n"
19009 : "OGRERR_NONE on success. \n"
19010 : ""},
19011 : { (char *)"Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_VARARGS, (char *)"\n"
19012 : "Layer_RollbackTransaction(Layer self) -> OGRErr\n"
19013 : "\n"
19014 : "OGRErr\n"
19015 : "OGR_L_RollbackTransaction(OGRLayerH hLayer)\n"
19016 : "\n"
19017 : "For datasources which support transactions, RollbackTransaction will\n"
19018 : "roll back a datasource to its state before the start of the current\n"
19019 : "transaction. If no transaction is active, or the rollback fails, will\n"
19020 : "return OGRERR_FAILURE. Datasources which do not support transactions\n"
19021 : "will always return OGRERR_NONE.\n"
19022 : "\n"
19023 : "This function is the same as the C++ method\n"
19024 : "OGRLayer::RollbackTransaction().\n"
19025 : "\n"
19026 : "Parameters:\n"
19027 : "-----------\n"
19028 : "\n"
19029 : "hLayer: handle to the layer\n"
19030 : "\n"
19031 : "OGRERR_NONE on success. \n"
19032 : ""},
19033 : { (char *)"Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_VARARGS, (char *)"\n"
19034 : "Layer_GetSpatialRef(Layer self) -> SpatialReference\n"
19035 : "\n"
19036 : "OGRSpatialReferenceH\n"
19037 : "OGR_L_GetSpatialRef(OGRLayerH hLayer)\n"
19038 : "\n"
19039 : "Fetch the spatial reference system for this layer.\n"
19040 : "\n"
19041 : "The returned object is owned by the OGRLayer and should not be\n"
19042 : "modified or freed by the application.\n"
19043 : "\n"
19044 : "This function is the same as the C++ method OGRLayer::GetSpatialRef().\n"
19045 : "\n"
19046 : "Parameters:\n"
19047 : "-----------\n"
19048 : "\n"
19049 : "hLayer: handle to the layer to get the spatial reference from.\n"
19050 : "\n"
19051 : "spatial reference, or NULL if there isn't one. \n"
19052 : ""},
19053 : { (char *)"Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_VARARGS, (char *)"\n"
19054 : "Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
19055 : "\n"
19056 : "GIntBig\n"
19057 : "OGR_L_GetFeaturesRead(OGRLayerH hLayer) \n"
19058 : ""},
19059 : { (char *)"Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, (char *)"\n"
19060 : "Layer_SetIgnoredFields(Layer self, char options) -> OGRErr\n"
19061 : "\n"
19062 : "OGRErr\n"
19063 : "OGR_L_SetIgnoredFields(OGRLayerH hLayer, const char **papszFields)\n"
19064 : "\n"
19065 : "Set which fields can be omitted when retrieving features from the\n"
19066 : "layer.\n"
19067 : "\n"
19068 : "If the driver supports this functionality (testable using\n"
19069 : "OLCIgnoreFields capability), it will not fetch the specified fields in\n"
19070 : "subsequent calls to GetFeature() / GetNextFeature() and thus save some\n"
19071 : "processing time and/or bandwidth.\n"
19072 : "\n"
19073 : "Besides field names of the layers, the following special fields can be\n"
19074 : "passed: \"OGR_GEOMETRY\" to ignore geometry and \"OGR_STYLE\" to\n"
19075 : "ignore layer style.\n"
19076 : "\n"
19077 : "By default, no fields are ignored.\n"
19078 : "\n"
19079 : "This method is the same as the C++ method OGRLayer::SetIgnoredFields()\n"
19080 : "\n"
19081 : "Parameters:\n"
19082 : "-----------\n"
19083 : "\n"
19084 : "papszFields: an array of field names terminated by NULL item. If NULL\n"
19085 : "is passed, the ignored list is cleared.\n"
19086 : "\n"
19087 : "OGRERR_NONE if all field names have been resolved (even if the driver\n"
19088 : "does not support this method) \n"
19089 : ""},
19090 : { (char *)"Layer_Intersection", (PyCFunction) _wrap_Layer_Intersection, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
19091 : "Layer_Intersection(Layer self, Layer method_layer, Layer result_layer, \n"
19092 : " char options = None, GDALProgressFunc callback = None, \n"
19093 : " void callback_data = None) -> OGRErr\n"
19094 : ""},
19095 : { (char *)"Layer_Union", (PyCFunction) _wrap_Layer_Union, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
19096 : "Layer_Union(Layer self, Layer method_layer, Layer result_layer, \n"
19097 : " char options = None, GDALProgressFunc callback = None, \n"
19098 : " void callback_data = None) -> OGRErr\n"
19099 : ""},
19100 : { (char *)"Layer_SymDifference", (PyCFunction) _wrap_Layer_SymDifference, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
19101 : "Layer_SymDifference(Layer self, Layer method_layer, Layer result_layer, \n"
19102 : " char options = None, GDALProgressFunc callback = None, \n"
19103 : " void callback_data = None) -> OGRErr\n"
19104 : ""},
19105 : { (char *)"Layer_Identity", (PyCFunction) _wrap_Layer_Identity, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
19106 : "Layer_Identity(Layer self, Layer method_layer, Layer result_layer, \n"
19107 : " char options = None, GDALProgressFunc callback = None, \n"
19108 : " void callback_data = None) -> OGRErr\n"
19109 : ""},
19110 : { (char *)"Layer_Update", (PyCFunction) _wrap_Layer_Update, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
19111 : "Layer_Update(Layer self, Layer method_layer, Layer result_layer, \n"
19112 : " char options = None, GDALProgressFunc callback = None, \n"
19113 : " void callback_data = None) -> OGRErr\n"
19114 : ""},
19115 : { (char *)"Layer_Clip", (PyCFunction) _wrap_Layer_Clip, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
19116 : "Layer_Clip(Layer self, Layer method_layer, Layer result_layer, \n"
19117 : " char options = None, GDALProgressFunc callback = None, \n"
19118 : " void callback_data = None) -> OGRErr\n"
19119 : ""},
19120 : { (char *)"Layer_Erase", (PyCFunction) _wrap_Layer_Erase, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
19121 : "Layer_Erase(Layer self, Layer method_layer, Layer result_layer, \n"
19122 : " char options = None, GDALProgressFunc callback = None, \n"
19123 : " void callback_data = None) -> OGRErr\n"
19124 : ""},
19125 : { (char *)"Layer_swigregister", Layer_swigregister, METH_VARARGS, NULL},
19126 : { (char *)"delete_Feature", _wrap_delete_Feature, METH_VARARGS, (char *)"delete_Feature(Feature self)"},
19127 : { (char *)"new_Feature", (PyCFunction) _wrap_new_Feature, METH_VARARGS | METH_KEYWORDS, (char *)"new_Feature(FeatureDefn feature_def) -> Feature"},
19128 : { (char *)"Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_VARARGS, (char *)"\n"
19129 : "Feature_GetDefnRef(Feature self) -> FeatureDefn\n"
19130 : "\n"
19131 : "OGRFeatureDefnH\n"
19132 : "OGR_F_GetDefnRef(OGRFeatureH hFeat)\n"
19133 : "\n"
19134 : "Fetch feature definition.\n"
19135 : "\n"
19136 : "This function is the same as the C++ method OGRFeature::GetDefnRef().\n"
19137 : "\n"
19138 : "Parameters:\n"
19139 : "-----------\n"
19140 : "\n"
19141 : "hFeat: handle to the feature to get the feature definition from.\n"
19142 : "\n"
19143 : "an handle to the feature definition object on which feature depends.\n"
19144 : "\n"
19145 : ""},
19146 : { (char *)"Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, (char *)"\n"
19147 : "Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\n"
19148 : "\n"
19149 : "OGRErr\n"
19150 : "OGR_F_SetGeometry(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
19151 : "\n"
19152 : "Set feature geometry.\n"
19153 : "\n"
19154 : "This function updates the features geometry, and operate exactly as\n"
19155 : "SetGeometryDirectly(), except that this function does not assume\n"
19156 : "ownership of the passed geometry, but instead makes a copy of it.\n"
19157 : "\n"
19158 : "This function is the same as the C++ OGRFeature::SetGeometry().\n"
19159 : "\n"
19160 : "Parameters:\n"
19161 : "-----------\n"
19162 : "\n"
19163 : "hFeat: handle to the feature on which new geometry is applied to.\n"
19164 : "\n"
19165 : "hGeom: handle to the new geometry to apply to feature.\n"
19166 : "\n"
19167 : "OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
19168 : "geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
19169 : "implemented). \n"
19170 : ""},
19171 : { (char *)"Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, (char *)"\n"
19172 : "Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr\n"
19173 : "\n"
19174 : "OGRErr\n"
19175 : "OGR_F_SetGeometryDirectly(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
19176 : "\n"
19177 : "Set feature geometry.\n"
19178 : "\n"
19179 : "This function updates the features geometry, and operate exactly as\n"
19180 : "SetGeometry(), except that this function assumes ownership of the\n"
19181 : "passed geometry.\n"
19182 : "\n"
19183 : "This function is the same as the C++ method\n"
19184 : "OGRFeature::SetGeometryDirectly.\n"
19185 : "\n"
19186 : "Parameters:\n"
19187 : "-----------\n"
19188 : "\n"
19189 : "hFeat: handle to the feature on which to apply the geometry.\n"
19190 : "\n"
19191 : "hGeom: handle to the new geometry to apply to feature.\n"
19192 : "\n"
19193 : "OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
19194 : "geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
19195 : "implemented). \n"
19196 : ""},
19197 : { (char *)"Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_VARARGS, (char *)"\n"
19198 : "Feature_GetGeometryRef(Feature self) -> Geometry\n"
19199 : "\n"
19200 : "OGRGeometryH\n"
19201 : "OGR_F_GetGeometryRef(OGRFeatureH hFeat)\n"
19202 : "\n"
19203 : "Fetch an handle to feature geometry.\n"
19204 : "\n"
19205 : "This function is the same as the C++ method\n"
19206 : "OGRFeature::GetGeometryRef().\n"
19207 : "\n"
19208 : "Parameters:\n"
19209 : "-----------\n"
19210 : "\n"
19211 : "hFeat: handle to the feature to get geometry from.\n"
19212 : "\n"
19213 : "an handle to internal feature geometry. This object should not be\n"
19214 : "modified. \n"
19215 : ""},
19216 : { (char *)"Feature_Clone", _wrap_Feature_Clone, METH_VARARGS, (char *)"\n"
19217 : "Feature_Clone(Feature self) -> Feature\n"
19218 : "\n"
19219 : "OGRFeatureH OGR_F_Clone(OGRFeatureH\n"
19220 : "hFeat)\n"
19221 : "\n"
19222 : "Duplicate feature.\n"
19223 : "\n"
19224 : "The newly created feature is owned by the caller, and will have it's\n"
19225 : "own reference to the OGRFeatureDefn.\n"
19226 : "\n"
19227 : "This function is the same as the C++ method OGRFeature::Clone().\n"
19228 : "\n"
19229 : "Parameters:\n"
19230 : "-----------\n"
19231 : "\n"
19232 : "hFeat: handle to the feature to clone.\n"
19233 : "\n"
19234 : "an handle to the new feature, exactly matching this feature. \n"
19235 : ""},
19236 : { (char *)"Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, (char *)"\n"
19237 : "Feature_Equal(Feature self, Feature feature) -> bool\n"
19238 : "\n"
19239 : "int OGR_F_Equal(OGRFeatureH hFeat,\n"
19240 : "OGRFeatureH hOtherFeat)\n"
19241 : "\n"
19242 : "Test if two features are the same.\n"
19243 : "\n"
19244 : "Two features are considered equal if the share them (handle equality)\n"
19245 : "same OGRFeatureDefn, have the same field values, and the same geometry\n"
19246 : "(as tested by OGR_G_Equal()) as well as the same feature id.\n"
19247 : "\n"
19248 : "This function is the same as the C++ method OGRFeature::Equal().\n"
19249 : "\n"
19250 : "Parameters:\n"
19251 : "-----------\n"
19252 : "\n"
19253 : "hFeat: handle to one of the feature.\n"
19254 : "\n"
19255 : "hOtherFeat: handle to the other feature to test this one against.\n"
19256 : "\n"
19257 : "TRUE if they are equal, otherwise FALSE. \n"
19258 : ""},
19259 : { (char *)"Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_VARARGS, (char *)"\n"
19260 : "Feature_GetFieldCount(Feature self) -> int\n"
19261 : "\n"
19262 : "int\n"
19263 : "OGR_F_GetFieldCount(OGRFeatureH hFeat)\n"
19264 : "\n"
19265 : "Fetch number of fields on this feature This will always be the same as\n"
19266 : "the field count for the OGRFeatureDefn.\n"
19267 : "\n"
19268 : "This function is the same as the C++ method\n"
19269 : "OGRFeature::GetFieldCount().\n"
19270 : "\n"
19271 : "Parameters:\n"
19272 : "-----------\n"
19273 : "\n"
19274 : "hFeat: handle to the feature to get the fields count from.\n"
19275 : "\n"
19276 : "count of fields. \n"
19277 : ""},
19278 : { (char *)"Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, (char *)"\n"
19279 : "GetFieldDefnRef(int id) -> FieldDefn\n"
19280 : "Feature_GetFieldDefnRef(Feature self, char name) -> FieldDefn\n"
19281 : "\n"
19282 : "OGRFieldDefnH\n"
19283 : "OGR_F_GetFieldDefnRef(OGRFeatureH hFeat, int i)\n"
19284 : "\n"
19285 : "Fetch definition for this field.\n"
19286 : "\n"
19287 : "This function is the same as the C++ method\n"
19288 : "OGRFeature::GetFieldDefnRef().\n"
19289 : "\n"
19290 : "Parameters:\n"
19291 : "-----------\n"
19292 : "\n"
19293 : "hFeat: handle to the feature on which the field is found.\n"
19294 : "\n"
19295 : "i: the field to fetch, from 0 to GetFieldCount()-1.\n"
19296 : "\n"
19297 : "an handle to the field definition (from the OGRFeatureDefn). This is\n"
19298 : "an internal reference, and should not be deleted or modified. \n"
19299 : ""},
19300 : { (char *)"Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, (char *)"\n"
19301 : "GetFieldAsString(int id) -> char\n"
19302 : "Feature_GetFieldAsString(Feature self, char name) -> char\n"
19303 : "\n"
19304 : "const char*\n"
19305 : "OGR_F_GetFieldAsString(OGRFeatureH hFeat, int iField)\n"
19306 : "\n"
19307 : "Fetch field value as a string.\n"
19308 : "\n"
19309 : "OFTReal and OFTInteger fields will be translated to string using\n"
19310 : "sprintf(), but not necessarily using the established formatting rules.\n"
19311 : "Other field types, or errors will result in a return value of zero.\n"
19312 : "\n"
19313 : "This function is the same as the C++ method\n"
19314 : "OGRFeature::GetFieldAsString().\n"
19315 : "\n"
19316 : "Parameters:\n"
19317 : "-----------\n"
19318 : "\n"
19319 : "hFeat: handle to the feature that owned the field.\n"
19320 : "\n"
19321 : "iField: the field to fetch, from 0 to GetFieldCount()-1.\n"
19322 : "\n"
19323 : "the field value. This string is internal, and should not be modified,\n"
19324 : "or freed. Its lifetime may be very brief. \n"
19325 : ""},
19326 : { (char *)"Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, (char *)"\n"
19327 : "GetFieldAsInteger(int id) -> int\n"
19328 : "Feature_GetFieldAsInteger(Feature self, char name) -> int\n"
19329 : "\n"
19330 : "int\n"
19331 : "OGR_F_GetFieldAsInteger(OGRFeatureH hFeat, int iField)\n"
19332 : "\n"
19333 : "Fetch field value as integer.\n"
19334 : "\n"
19335 : "OFTString features will be translated using atoi(). OFTReal fields\n"
19336 : "will be cast to integer. Other field types, or errors will result in a\n"
19337 : "return value of zero.\n"
19338 : "\n"
19339 : "This function is the same as the C++ method\n"
19340 : "OGRFeature::GetFieldAsInteger().\n"
19341 : "\n"
19342 : "Parameters:\n"
19343 : "-----------\n"
19344 : "\n"
19345 : "hFeat: handle to the feature that owned the field.\n"
19346 : "\n"
19347 : "iField: the field to fetch, from 0 to GetFieldCount()-1.\n"
19348 : "\n"
19349 : "the field value. \n"
19350 : ""},
19351 : { (char *)"Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, (char *)"\n"
19352 : "GetFieldAsDouble(int id) -> double\n"
19353 : "Feature_GetFieldAsDouble(Feature self, char name) -> double\n"
19354 : "\n"
19355 : "double\n"
19356 : "OGR_F_GetFieldAsDouble(OGRFeatureH hFeat, int iField)\n"
19357 : "\n"
19358 : "Fetch field value as a double.\n"
19359 : "\n"
19360 : "OFTString features will be translated using atof(). OFTInteger fields\n"
19361 : "will be cast to double. Other field types, or errors will result in a\n"
19362 : "return value of zero.\n"
19363 : "\n"
19364 : "This function is the same as the C++ method\n"
19365 : "OGRFeature::GetFieldAsDouble().\n"
19366 : "\n"
19367 : "Parameters:\n"
19368 : "-----------\n"
19369 : "\n"
19370 : "hFeat: handle to the feature that owned the field.\n"
19371 : "\n"
19372 : "iField: the field to fetch, from 0 to GetFieldCount()-1.\n"
19373 : "\n"
19374 : "the field value. \n"
19375 : ""},
19376 : { (char *)"Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, (char *)"\n"
19377 : "Feature_GetFieldAsDateTime(Feature self, int id)\n"
19378 : "\n"
19379 : "int\n"
19380 : "OGR_F_GetFieldAsDateTime(OGRFeatureH hFeat, int iField, int *pnYear,\n"
19381 : "int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, int *pnSecond,\n"
19382 : "int *pnTZFlag)\n"
19383 : "\n"
19384 : "Fetch field value as date and time.\n"
19385 : "\n"
19386 : "Currently this method only works for OFTDate, OFTTime and OFTDateTime\n"
19387 : "fields.\n"
19388 : "\n"
19389 : "This function is the same as the C++ method\n"
19390 : "OGRFeature::GetFieldAsDateTime().\n"
19391 : "\n"
19392 : "Parameters:\n"
19393 : "-----------\n"
19394 : "\n"
19395 : "hFeat: handle to the feature that owned the field.\n"
19396 : "\n"
19397 : "iField: the field to fetch, from 0 to GetFieldCount()-1.\n"
19398 : "\n"
19399 : "pnYear: (including century)\n"
19400 : "\n"
19401 : "pnMonth: (1-12)\n"
19402 : "\n"
19403 : "pnDay: (1-31)\n"
19404 : "\n"
19405 : "pnHour: (0-23)\n"
19406 : "\n"
19407 : "pnMinute: (0-59)\n"
19408 : "\n"
19409 : "pnSecond: (0-59)\n"
19410 : "\n"
19411 : "pnTZFlag: (0=unknown, 1=localtime, 100=GMT, see data model for\n"
19412 : "details)\n"
19413 : "\n"
19414 : "TRUE on success or FALSE on failure. \n"
19415 : ""},
19416 : { (char *)"Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, (char *)"\n"
19417 : "Feature_GetFieldAsIntegerList(Feature self, int id)\n"
19418 : "\n"
19419 : "const int*\n"
19420 : "OGR_F_GetFieldAsIntegerList(OGRFeatureH hFeat, int iField, int\n"
19421 : "*pnCount)\n"
19422 : "\n"
19423 : "Fetch field value as a list of integers.\n"
19424 : "\n"
19425 : "Currently this function only works for OFTIntegerList fields.\n"
19426 : "\n"
19427 : "This function is the same as the C++ method\n"
19428 : "OGRFeature::GetFieldAsIntegerList().\n"
19429 : "\n"
19430 : "Parameters:\n"
19431 : "-----------\n"
19432 : "\n"
19433 : "hFeat: handle to the feature that owned the field.\n"
19434 : "\n"
19435 : "iField: the field to fetch, from 0 to GetFieldCount()-1.\n"
19436 : "\n"
19437 : "pnCount: an integer to put the list count (number of integers) into.\n"
19438 : "\n"
19439 : "the field value. This list is internal, and should not be modified, or\n"
19440 : "freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
19441 : "the returned pointer may be NULL or non-NULL. \n"
19442 : ""},
19443 : { (char *)"Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, (char *)"\n"
19444 : "Feature_GetFieldAsDoubleList(Feature self, int id)\n"
19445 : "\n"
19446 : "const double*\n"
19447 : "OGR_F_GetFieldAsDoubleList(OGRFeatureH hFeat, int iField, int\n"
19448 : "*pnCount)\n"
19449 : "\n"
19450 : "Fetch field value as a list of doubles.\n"
19451 : "\n"
19452 : "Currently this function only works for OFTRealList fields.\n"
19453 : "\n"
19454 : "This function is the same as the C++ method\n"
19455 : "OGRFeature::GetFieldAsDoubleList().\n"
19456 : "\n"
19457 : "Parameters:\n"
19458 : "-----------\n"
19459 : "\n"
19460 : "hFeat: handle to the feature that owned the field.\n"
19461 : "\n"
19462 : "iField: the field to fetch, from 0 to GetFieldCount()-1.\n"
19463 : "\n"
19464 : "pnCount: an integer to put the list count (number of doubles) into.\n"
19465 : "\n"
19466 : "the field value. This list is internal, and should not be modified, or\n"
19467 : "freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
19468 : "the returned pointer may be NULL or non-NULL. \n"
19469 : ""},
19470 : { (char *)"Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, (char *)"\n"
19471 : "Feature_GetFieldAsStringList(Feature self, int id) -> char\n"
19472 : "\n"
19473 : "char**\n"
19474 : "OGR_F_GetFieldAsStringList(OGRFeatureH hFeat, int iField)\n"
19475 : "\n"
19476 : "Fetch field value as a list of strings.\n"
19477 : "\n"
19478 : "Currently this method only works for OFTStringList fields.\n"
19479 : "\n"
19480 : "The returned list is terminated by a NULL pointer. The number of\n"
19481 : "elements can also be calculated using CSLCount().\n"
19482 : "\n"
19483 : "This function is the same as the C++ method\n"
19484 : "OGRFeature::GetFieldAsStringList().\n"
19485 : "\n"
19486 : "Parameters:\n"
19487 : "-----------\n"
19488 : "\n"
19489 : "hFeat: handle to the feature that owned the field.\n"
19490 : "\n"
19491 : "iField: the field to fetch, from 0 to GetFieldCount()-1.\n"
19492 : "\n"
19493 : "the field value. This list is internal, and should not be modified, or\n"
19494 : "freed. Its lifetime may be very brief. \n"
19495 : ""},
19496 : { (char *)"Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, (char *)"\n"
19497 : "IsFieldSet(int id) -> bool\n"
19498 : "Feature_IsFieldSet(Feature self, char name) -> bool\n"
19499 : "\n"
19500 : "int OGR_F_IsFieldSet(OGRFeatureH\n"
19501 : "hFeat, int iField)\n"
19502 : "\n"
19503 : "Test if a field has ever been assigned a value or not.\n"
19504 : "\n"
19505 : "This function is the same as the C++ method OGRFeature::IsFieldSet().\n"
19506 : "\n"
19507 : "Parameters:\n"
19508 : "-----------\n"
19509 : "\n"
19510 : "hFeat: handle to the feature on which the field is.\n"
19511 : "\n"
19512 : "iField: the field to test.\n"
19513 : "\n"
19514 : "TRUE if the field has been set, otherwise false. \n"
19515 : ""},
19516 : { (char *)"Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, (char *)"\n"
19517 : "Feature_GetFieldIndex(Feature self, char name) -> int\n"
19518 : "\n"
19519 : "int\n"
19520 : "OGR_F_GetFieldIndex(OGRFeatureH hFeat, const char *pszName)\n"
19521 : "\n"
19522 : "Fetch the field index given field name.\n"
19523 : "\n"
19524 : "This is a cover for the OGRFeatureDefn::GetFieldIndex() method.\n"
19525 : "\n"
19526 : "This function is the same as the C++ method\n"
19527 : "OGRFeature::GetFieldIndex().\n"
19528 : "\n"
19529 : "Parameters:\n"
19530 : "-----------\n"
19531 : "\n"
19532 : "hFeat: handle to the feature on which the field is found.\n"
19533 : "\n"
19534 : "pszName: the name of the field to search for.\n"
19535 : "\n"
19536 : "the field index, or -1 if no matching field is found. \n"
19537 : ""},
19538 : { (char *)"Feature_GetFID", _wrap_Feature_GetFID, METH_VARARGS, (char *)"\n"
19539 : "Feature_GetFID(Feature self) -> int\n"
19540 : "\n"
19541 : "long OGR_F_GetFID(OGRFeatureH hFeat)\n"
19542 : "\n"
19543 : "Get feature identifier.\n"
19544 : "\n"
19545 : "This function is the same as the C++ method OGRFeature::GetFID().\n"
19546 : "\n"
19547 : "Parameters:\n"
19548 : "-----------\n"
19549 : "\n"
19550 : "hFeat: handle to the feature from which to get the feature\n"
19551 : "identifier.\n"
19552 : "\n"
19553 : "feature id or OGRNullFID if none has been assigned. \n"
19554 : ""},
19555 : { (char *)"Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, (char *)"\n"
19556 : "Feature_SetFID(Feature self, int fid) -> OGRErr\n"
19557 : "\n"
19558 : "OGRErr OGR_F_SetFID(OGRFeatureH hFeat,\n"
19559 : "long nFID)\n"
19560 : "\n"
19561 : "Set the feature identifier.\n"
19562 : "\n"
19563 : "For specific types of features this operation may fail on illegal\n"
19564 : "features ids. Generally it always succeeds. Feature ids should be\n"
19565 : "greater than or equal to zero, with the exception of OGRNullFID (-1)\n"
19566 : "indicating that the feature id is unknown.\n"
19567 : "\n"
19568 : "This function is the same as the C++ method OGRFeature::SetFID().\n"
19569 : "\n"
19570 : "Parameters:\n"
19571 : "-----------\n"
19572 : "\n"
19573 : "hFeat: handle to the feature to set the feature id to.\n"
19574 : "\n"
19575 : "nFID: the new feature identifier value to assign.\n"
19576 : "\n"
19577 : "On success OGRERR_NONE, or on failure some other value. \n"
19578 : ""},
19579 : { (char *)"Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_VARARGS, (char *)"\n"
19580 : "Feature_DumpReadable(Feature self)\n"
19581 : "\n"
19582 : "void\n"
19583 : "OGR_F_DumpReadable(OGRFeatureH hFeat, FILE *fpOut)\n"
19584 : "\n"
19585 : "Dump this feature in a human readable form.\n"
19586 : "\n"
19587 : "This dumps the attributes, and geometry; however, it doesn't\n"
19588 : "definition information (other than field types and names), nor does it\n"
19589 : "report the geometry spatial reference system.\n"
19590 : "\n"
19591 : "This function is the same as the C++ method\n"
19592 : "OGRFeature::DumpReadable().\n"
19593 : "\n"
19594 : "Parameters:\n"
19595 : "-----------\n"
19596 : "\n"
19597 : "hFeat: handle to the feature to dump.\n"
19598 : "\n"
19599 : "fpOut: the stream to write to, such as strout. \n"
19600 : ""},
19601 : { (char *)"Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, (char *)"\n"
19602 : "UnsetField(int id)\n"
19603 : "Feature_UnsetField(Feature self, char name)\n"
19604 : "\n"
19605 : "void OGR_F_UnsetField(OGRFeatureH\n"
19606 : "hFeat, int iField)\n"
19607 : "\n"
19608 : "Clear a field, marking it as unset.\n"
19609 : "\n"
19610 : "This function is the same as the C++ method OGRFeature::UnsetField().\n"
19611 : "\n"
19612 : "Parameters:\n"
19613 : "-----------\n"
19614 : "\n"
19615 : "hFeat: handle to the feature on which the field is.\n"
19616 : "\n"
19617 : "iField: the field to unset. \n"
19618 : ""},
19619 : { (char *)"Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, (char *)"\n"
19620 : "SetField(int id, char value)\n"
19621 : "SetField(char name, char value)\n"
19622 : "SetField(int id, int value)\n"
19623 : "SetField(char name, int value)\n"
19624 : "SetField(int id, double value)\n"
19625 : "SetField(char name, double value)\n"
19626 : "SetField(int id, int year, int month, int day, int hour, int minute, \n"
19627 : " int second, int tzflag)\n"
19628 : "Feature_SetField(Feature self, char name, int year, int month, int day, \n"
19629 : " int hour, int minute, int second, int tzflag)\n"
19630 : ""},
19631 : { (char *)"Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, (char *)"\n"
19632 : "Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
19633 : "\n"
19634 : "void\n"
19635 : "OGR_F_SetFieldIntegerList(OGRFeatureH hFeat, int iField, int nCount,\n"
19636 : "int *panValues)\n"
19637 : "\n"
19638 : "Set field to list of integers value.\n"
19639 : "\n"
19640 : "This function currently on has an effect of OFTIntegerList fields.\n"
19641 : "\n"
19642 : "This function is the same as the C++ method OGRFeature::SetField().\n"
19643 : "\n"
19644 : "Parameters:\n"
19645 : "-----------\n"
19646 : "\n"
19647 : "hFeat: handle to the feature that owned the field.\n"
19648 : "\n"
19649 : "iField: the field to set, from 0 to GetFieldCount()-1.\n"
19650 : "\n"
19651 : "nCount: the number of values in the list being assigned.\n"
19652 : "\n"
19653 : "panValues: the values to assign. \n"
19654 : ""},
19655 : { (char *)"Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, (char *)"\n"
19656 : "Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
19657 : "\n"
19658 : "void\n"
19659 : "OGR_F_SetFieldDoubleList(OGRFeatureH hFeat, int iField, int nCount,\n"
19660 : "double *padfValues)\n"
19661 : "\n"
19662 : "Set field to list of doubles value.\n"
19663 : "\n"
19664 : "This function currently on has an effect of OFTRealList fields.\n"
19665 : "\n"
19666 : "This function is the same as the C++ method OGRFeature::SetField().\n"
19667 : "\n"
19668 : "Parameters:\n"
19669 : "-----------\n"
19670 : "\n"
19671 : "hFeat: handle to the feature that owned the field.\n"
19672 : "\n"
19673 : "iField: the field to set, from 0 to GetFieldCount()-1.\n"
19674 : "\n"
19675 : "nCount: the number of values in the list being assigned.\n"
19676 : "\n"
19677 : "padfValues: the values to assign. \n"
19678 : ""},
19679 : { (char *)"Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, (char *)"\n"
19680 : "Feature_SetFieldStringList(Feature self, int id, char pList)\n"
19681 : "\n"
19682 : "void\n"
19683 : "OGR_F_SetFieldStringList(OGRFeatureH hFeat, int iField, char\n"
19684 : "**papszValues)\n"
19685 : "\n"
19686 : "Set field to list of strings value.\n"
19687 : "\n"
19688 : "This function currently on has an effect of OFTStringList fields.\n"
19689 : "\n"
19690 : "This function is the same as the C++ method OGRFeature::SetField().\n"
19691 : "\n"
19692 : "Parameters:\n"
19693 : "-----------\n"
19694 : "\n"
19695 : "hFeat: handle to the feature that owned the field.\n"
19696 : "\n"
19697 : "iField: the field to set, from 0 to GetFieldCount()-1.\n"
19698 : "\n"
19699 : "papszValues: the values to assign. \n"
19700 : ""},
19701 : { (char *)"Feature_SetFrom", (PyCFunction) _wrap_Feature_SetFrom, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
19702 : "Feature_SetFrom(Feature self, Feature other, int forgiving = 1) -> OGRErr\n"
19703 : "\n"
19704 : "OGRErr OGR_F_SetFrom(OGRFeatureH\n"
19705 : "hFeat, OGRFeatureH hOtherFeat, int bForgiving)\n"
19706 : "\n"
19707 : "Set one feature from another.\n"
19708 : "\n"
19709 : "Overwrite the contents of this feature from the geometry and\n"
19710 : "attributes of another. The hOtherFeature does not need to have the\n"
19711 : "same OGRFeatureDefn. Field values are copied by corresponding field\n"
19712 : "names. Field types do not have to exactly match. OGR_F_SetField*()\n"
19713 : "function conversion rules will be applied as needed.\n"
19714 : "\n"
19715 : "This function is the same as the C++ method OGRFeature::SetFrom().\n"
19716 : "\n"
19717 : "Parameters:\n"
19718 : "-----------\n"
19719 : "\n"
19720 : "hFeat: handle to the feature to set to.\n"
19721 : "\n"
19722 : "hOtherFeat: handle to the feature from which geometry, and field\n"
19723 : "values will be copied.\n"
19724 : "\n"
19725 : "bForgiving: TRUE if the operation should continue despite lacking\n"
19726 : "output fields matching some of the source fields.\n"
19727 : "\n"
19728 : "OGRERR_NONE if the operation succeeds, even if some values are not\n"
19729 : "transferred, otherwise an error code. \n"
19730 : ""},
19731 : { (char *)"Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, (char *)"\n"
19732 : "Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
19733 : "\n"
19734 : "OGRErr\n"
19735 : "OGR_F_SetFromWithMap(OGRFeatureH hFeat, OGRFeatureH hOtherFeat, int\n"
19736 : "bForgiving, int *panMap)\n"
19737 : "\n"
19738 : "Set one feature from another.\n"
19739 : "\n"
19740 : "Overwrite the contents of this feature from the geometry and\n"
19741 : "attributes of another. The hOtherFeature does not need to have the\n"
19742 : "same OGRFeatureDefn. Field values are copied according to the provided\n"
19743 : "indices map. Field types do not have to exactly match.\n"
19744 : "OGR_F_SetField*() function conversion rules will be applied as needed.\n"
19745 : "This is more efficient than OGR_F_SetFrom() in that this doesn't\n"
19746 : "lookup the fields by their names. Particularly useful when the field\n"
19747 : "names don't match.\n"
19748 : "\n"
19749 : "This function is the same as the C++ method OGRFeature::SetFrom().\n"
19750 : "\n"
19751 : "Parameters:\n"
19752 : "-----------\n"
19753 : "\n"
19754 : "hFeat: handle to the feature to set to.\n"
19755 : "\n"
19756 : "hOtherFeat: handle to the feature from which geometry, and field\n"
19757 : "values will be copied.\n"
19758 : "\n"
19759 : "panMap: Array of the indices of the destination feature's fields\n"
19760 : "stored at the corresponding index of the source feature's fields. A\n"
19761 : "value of -1 should be used to ignore the source's field. The array\n"
19762 : "should not be NULL and be as long as the number of fields in the\n"
19763 : "source feature.\n"
19764 : "\n"
19765 : "bForgiving: TRUE if the operation should continue despite lacking\n"
19766 : "output fields matching some of the source fields.\n"
19767 : "\n"
19768 : "OGRERR_NONE if the operation succeeds, even if some values are not\n"
19769 : "transferred, otherwise an error code. \n"
19770 : ""},
19771 : { (char *)"Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_VARARGS, (char *)"\n"
19772 : "Feature_GetStyleString(Feature self) -> char\n"
19773 : "\n"
19774 : "const char*\n"
19775 : "OGR_F_GetStyleString(OGRFeatureH hFeat)\n"
19776 : "\n"
19777 : "Fetch style string for this feature.\n"
19778 : "\n"
19779 : "Set the OGR Feature Style Specification for details on the format of\n"
19780 : "this string, and ogr_featurestyle.h for services available to parse\n"
19781 : "it.\n"
19782 : "\n"
19783 : "This function is the same as the C++ method\n"
19784 : "OGRFeature::GetStyleString().\n"
19785 : "\n"
19786 : "Parameters:\n"
19787 : "-----------\n"
19788 : "\n"
19789 : "hFeat: handle to the feature to get the style from.\n"
19790 : "\n"
19791 : "a reference to a representation in string format, or NULL if there\n"
19792 : "isn't one. \n"
19793 : ""},
19794 : { (char *)"Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, (char *)"\n"
19795 : "Feature_SetStyleString(Feature self, char the_string)\n"
19796 : "\n"
19797 : "void\n"
19798 : "OGR_F_SetStyleString(OGRFeatureH hFeat, const char *pszStyle)\n"
19799 : "\n"
19800 : "Set feature style string. This method operate exactly as\n"
19801 : "OGR_F_SetStyleStringDirectly() except that it does not assume\n"
19802 : "ownership of the passed string, but instead makes a copy of it.\n"
19803 : "\n"
19804 : "This function is the same as the C++ method\n"
19805 : "OGRFeature::SetStyleString().\n"
19806 : "\n"
19807 : "Parameters:\n"
19808 : "-----------\n"
19809 : "\n"
19810 : "hFeat: handle to the feature to set style to.\n"
19811 : "\n"
19812 : "pszStyle: the style string to apply to this feature, cannot be NULL.\n"
19813 : "\n"
19814 : ""},
19815 : { (char *)"Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, (char *)"\n"
19816 : "GetFieldType(int id) -> OGRFieldType\n"
19817 : "Feature_GetFieldType(Feature self, char name) -> OGRFieldType\n"
19818 : ""},
19819 : { (char *)"Feature_swigregister", Feature_swigregister, METH_VARARGS, NULL},
19820 : { (char *)"delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_VARARGS, (char *)"delete_FeatureDefn(FeatureDefn self)"},
19821 : { (char *)"new_FeatureDefn", (PyCFunction) _wrap_new_FeatureDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FeatureDefn(char name_null_ok = None) -> FeatureDefn"},
19822 : { (char *)"FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_VARARGS, (char *)"\n"
19823 : "FeatureDefn_GetName(FeatureDefn self) -> char\n"
19824 : "\n"
19825 : "const char*\n"
19826 : "OGR_FD_GetName(OGRFeatureDefnH hDefn)\n"
19827 : "\n"
19828 : "Get name of the OGRFeatureDefn passed as an argument.\n"
19829 : "\n"
19830 : "This function is the same as the C++ method OGRFeatureDefn::GetName().\n"
19831 : "\n"
19832 : "Parameters:\n"
19833 : "-----------\n"
19834 : "\n"
19835 : "hDefn: handle to the feature definition to get the name from.\n"
19836 : "\n"
19837 : "the name. This name is internal and should not be modified, or freed.\n"
19838 : "\n"
19839 : ""},
19840 : { (char *)"FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_VARARGS, (char *)"\n"
19841 : "FeatureDefn_GetFieldCount(FeatureDefn self) -> int\n"
19842 : "\n"
19843 : "int\n"
19844 : "OGR_FD_GetFieldCount(OGRFeatureDefnH hDefn)\n"
19845 : "\n"
19846 : "Fetch number of fields on the passed feature definition.\n"
19847 : "\n"
19848 : "This function is the same as the C++ OGRFeatureDefn::GetFieldCount().\n"
19849 : "\n"
19850 : "Parameters:\n"
19851 : "-----------\n"
19852 : "\n"
19853 : "hDefn: handle to the feature definition to get the fields count from.\n"
19854 : "\n"
19855 : "count of fields. \n"
19856 : ""},
19857 : { (char *)"FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, (char *)"\n"
19858 : "FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\n"
19859 : "\n"
19860 : "OGRFieldDefnH\n"
19861 : "OGR_FD_GetFieldDefn(OGRFeatureDefnH hDefn, int iField)\n"
19862 : "\n"
19863 : "Fetch field definition of the passed feature definition.\n"
19864 : "\n"
19865 : "This function is the same as the C++ method\n"
19866 : "OGRFeatureDefn::GetFieldDefn().\n"
19867 : "\n"
19868 : "Starting with GDAL 1.7.0, this method will also issue an error if the\n"
19869 : "index is not valid.\n"
19870 : "\n"
19871 : "Parameters:\n"
19872 : "-----------\n"
19873 : "\n"
19874 : "hDefn: handle to the feature definition to get the field definition\n"
19875 : "from.\n"
19876 : "\n"
19877 : "iField: the field to fetch, between 0 and GetFieldCount()-1.\n"
19878 : "\n"
19879 : "an handle to an internal field definition object or NULL if invalid\n"
19880 : "index. This object should not be modified or freed by the application.\n"
19881 : "\n"
19882 : ""},
19883 : { (char *)"FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, (char *)"\n"
19884 : "FeatureDefn_GetFieldIndex(FeatureDefn self, char name) -> int\n"
19885 : "\n"
19886 : "int\n"
19887 : "OGR_FD_GetFieldIndex(OGRFeatureDefnH hDefn, const char *pszFieldName)\n"
19888 : "\n"
19889 : "Find field by name.\n"
19890 : "\n"
19891 : "The field index of the first field matching the passed field name\n"
19892 : "(case insensitively) is returned.\n"
19893 : "\n"
19894 : "This function is the same as the C++ method\n"
19895 : "OGRFeatureDefn::GetFieldIndex.\n"
19896 : "\n"
19897 : "Parameters:\n"
19898 : "-----------\n"
19899 : "\n"
19900 : "hDefn: handle to the feature definition to get field index from.\n"
19901 : "\n"
19902 : "pszFieldName: the field name to search for.\n"
19903 : "\n"
19904 : "the field index, or -1 if no match found. \n"
19905 : ""},
19906 : { (char *)"FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, (char *)"\n"
19907 : "FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\n"
19908 : "\n"
19909 : "void\n"
19910 : "OGR_FD_AddFieldDefn(OGRFeatureDefnH hDefn, OGRFieldDefnH hNewField)\n"
19911 : "\n"
19912 : "Add a new field definition to the passed feature definition.\n"
19913 : "\n"
19914 : "To add a new field definition to a layer definition, do not use this\n"
19915 : "function directly, but use OGR_L_CreateField() instead.\n"
19916 : "\n"
19917 : "This function should only be called while there are no OGRFeature\n"
19918 : "objects in existance based on this OGRFeatureDefn. The OGRFieldDefn\n"
19919 : "passed in is copied, and remains the responsibility of the caller.\n"
19920 : "\n"
19921 : "This function is the same as the C++ method\n"
19922 : "OGRFeatureDefn::AddFieldDefn().\n"
19923 : "\n"
19924 : "Parameters:\n"
19925 : "-----------\n"
19926 : "\n"
19927 : "hDefn: handle to the feature definition to add the field definition\n"
19928 : "to.\n"
19929 : "\n"
19930 : "hNewField: handle to the new field definition. \n"
19931 : ""},
19932 : { (char *)"FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_VARARGS, (char *)"\n"
19933 : "FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\n"
19934 : "\n"
19935 : "OGRwkbGeometryType\n"
19936 : "OGR_FD_GetGeomType(OGRFeatureDefnH hDefn)\n"
19937 : "\n"
19938 : "Fetch the geometry base type of the passed feature definition.\n"
19939 : "\n"
19940 : "This function is the same as the C++ method\n"
19941 : "OGRFeatureDefn::GetGeomType().\n"
19942 : "\n"
19943 : "Parameters:\n"
19944 : "-----------\n"
19945 : "\n"
19946 : "hDefn: handle to the feature definition to get the geometry type\n"
19947 : "from.\n"
19948 : "\n"
19949 : "the base type for all geometry related to this definition. \n"
19950 : ""},
19951 : { (char *)"FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, (char *)"\n"
19952 : "FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\n"
19953 : "\n"
19954 : "void\n"
19955 : "OGR_FD_SetGeomType(OGRFeatureDefnH hDefn, OGRwkbGeometryType eType)\n"
19956 : "\n"
19957 : "Assign the base geometry type for the passed layer (the same as the\n"
19958 : "feature definition).\n"
19959 : "\n"
19960 : "All geometry objects using this type must be of the defined type or a\n"
19961 : "derived type. The default upon creation is wkbUnknown which allows for\n"
19962 : "any geometry type. The geometry type should generally not be changed\n"
19963 : "after any OGRFeatures have been created against this definition.\n"
19964 : "\n"
19965 : "This function is the same as the C++ method\n"
19966 : "OGRFeatureDefn::SetGeomType().\n"
19967 : "\n"
19968 : "Parameters:\n"
19969 : "-----------\n"
19970 : "\n"
19971 : "hDefn: handle to the layer or feature definition to set the geometry\n"
19972 : "type to.\n"
19973 : "\n"
19974 : "eType: the new type to assign. \n"
19975 : ""},
19976 : { (char *)"FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_VARARGS, (char *)"\n"
19977 : "FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\n"
19978 : "\n"
19979 : "int\n"
19980 : "OGR_FD_GetReferenceCount(OGRFeatureDefnH hDefn)\n"
19981 : "\n"
19982 : "Fetch current reference count.\n"
19983 : "\n"
19984 : "This function is the same as the C++ method\n"
19985 : "OGRFeatureDefn::GetReferenceCount().\n"
19986 : "\n"
19987 : "Parameters:\n"
19988 : "-----------\n"
19989 : "\n"
19990 : "hDefn: hanlde to the feature definition on witch OGRFeature are based\n"
19991 : "on.\n"
19992 : "\n"
19993 : "the current reference count. \n"
19994 : ""},
19995 : { (char *)"FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_VARARGS, (char *)"\n"
19996 : "FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\n"
19997 : "\n"
19998 : "int\n"
19999 : "OGR_FD_IsGeometryIgnored(OGRFeatureDefnH hDefn)\n"
20000 : "\n"
20001 : "Determine whether the geometry can be omitted when fetching features.\n"
20002 : "\n"
20003 : "This function is the same as the C++ method\n"
20004 : "OGRFeatureDefn::IsGeometryIgnored().\n"
20005 : "\n"
20006 : "Parameters:\n"
20007 : "-----------\n"
20008 : "\n"
20009 : "hDefn: hanlde to the feature definition on witch OGRFeature are based\n"
20010 : "on.\n"
20011 : "\n"
20012 : "ignore state \n"
20013 : ""},
20014 : { (char *)"FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, (char *)"\n"
20015 : "FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\n"
20016 : "\n"
20017 : "void\n"
20018 : "OGR_FD_SetGeometryIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
20019 : "\n"
20020 : "Set whether the geometry can be omitted when fetching features.\n"
20021 : "\n"
20022 : "This function is the same as the C++ method\n"
20023 : "OGRFeatureDefn::SetGeometryIgnored().\n"
20024 : "\n"
20025 : "Parameters:\n"
20026 : "-----------\n"
20027 : "\n"
20028 : "hDefn: hanlde to the feature definition on witch OGRFeature are based\n"
20029 : "on.\n"
20030 : "\n"
20031 : "bIgnore: ignore state \n"
20032 : ""},
20033 : { (char *)"FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_VARARGS, (char *)"\n"
20034 : "FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\n"
20035 : "\n"
20036 : "int\n"
20037 : "OGR_FD_IsStyleIgnored(OGRFeatureDefnH hDefn)\n"
20038 : "\n"
20039 : "Determine whether the style can be omitted when fetching features.\n"
20040 : "\n"
20041 : "This function is the same as the C++ method\n"
20042 : "OGRFeatureDefn::IsStyleIgnored().\n"
20043 : "\n"
20044 : "Parameters:\n"
20045 : "-----------\n"
20046 : "\n"
20047 : "hDefn: handle to the feature definition on which OGRFeature are based\n"
20048 : "on.\n"
20049 : "\n"
20050 : "ignore state \n"
20051 : ""},
20052 : { (char *)"FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, (char *)"\n"
20053 : "FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\n"
20054 : "\n"
20055 : "void\n"
20056 : "OGR_FD_SetStyleIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
20057 : "\n"
20058 : "Set whether the style can be omitted when fetching features.\n"
20059 : "\n"
20060 : "This function is the same as the C++ method\n"
20061 : "OGRFeatureDefn::SetStyleIgnored().\n"
20062 : "\n"
20063 : "Parameters:\n"
20064 : "-----------\n"
20065 : "\n"
20066 : "hDefn: hanlde to the feature definition on witch OGRFeature are based\n"
20067 : "on.\n"
20068 : "\n"
20069 : "bIgnore: ignore state \n"
20070 : ""},
20071 : { (char *)"FeatureDefn_swigregister", FeatureDefn_swigregister, METH_VARARGS, NULL},
20072 : { (char *)"delete_FieldDefn", _wrap_delete_FieldDefn, METH_VARARGS, (char *)"delete_FieldDefn(FieldDefn self)"},
20073 : { (char *)"new_FieldDefn", (PyCFunction) _wrap_new_FieldDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FieldDefn(char name_null_ok = \"unnamed\", OGRFieldType field_type = OFTString) -> FieldDefn"},
20074 : { (char *)"FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_VARARGS, (char *)"FieldDefn_GetName(FieldDefn self) -> char"},
20075 : { (char *)"FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_VARARGS, (char *)"\n"
20076 : "FieldDefn_GetNameRef(FieldDefn self) -> char\n"
20077 : "\n"
20078 : "const char*\n"
20079 : "OGR_Fld_GetNameRef(OGRFieldDefnH hDefn)\n"
20080 : "\n"
20081 : "Fetch name of this field.\n"
20082 : "\n"
20083 : "This function is the same as the CPP method\n"
20084 : "OGRFieldDefn::GetNameRef().\n"
20085 : "\n"
20086 : "Parameters:\n"
20087 : "-----------\n"
20088 : "\n"
20089 : "hDefn: handle to the field definition.\n"
20090 : "\n"
20091 : "the name of the field definition. \n"
20092 : ""},
20093 : { (char *)"FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, (char *)"\n"
20094 : "FieldDefn_SetName(FieldDefn self, char name)\n"
20095 : "\n"
20096 : "void OGR_Fld_SetName(OGRFieldDefnH\n"
20097 : "hDefn, const char *pszName)\n"
20098 : "\n"
20099 : "Reset the name of this field.\n"
20100 : "\n"
20101 : "This function is the same as the CPP method OGRFieldDefn::SetName().\n"
20102 : "\n"
20103 : "Parameters:\n"
20104 : "-----------\n"
20105 : "\n"
20106 : "hDefn: handle to the field definition to apply the new name to.\n"
20107 : "\n"
20108 : "pszName: the new name to apply. \n"
20109 : ""},
20110 : { (char *)"FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_VARARGS, (char *)"\n"
20111 : "FieldDefn_GetType(FieldDefn self) -> OGRFieldType\n"
20112 : "\n"
20113 : "OGRFieldType\n"
20114 : "OGR_Fld_GetType(OGRFieldDefnH hDefn)\n"
20115 : "\n"
20116 : "Fetch type of this field.\n"
20117 : "\n"
20118 : "This function is the same as the CPP method OGRFieldDefn::GetType().\n"
20119 : "\n"
20120 : "Parameters:\n"
20121 : "-----------\n"
20122 : "\n"
20123 : "hDefn: handle to the field definition to get type from.\n"
20124 : "\n"
20125 : "field type. \n"
20126 : ""},
20127 : { (char *)"FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, (char *)"\n"
20128 : "FieldDefn_SetType(FieldDefn self, OGRFieldType type)\n"
20129 : "\n"
20130 : "void OGR_Fld_SetType(OGRFieldDefnH\n"
20131 : "hDefn, OGRFieldType eType)\n"
20132 : "\n"
20133 : "Set the type of this field. This should never be done to an\n"
20134 : "OGRFieldDefn that is already part of an OGRFeatureDefn.\n"
20135 : "\n"
20136 : "This function is the same as the CPP method OGRFieldDefn::SetType().\n"
20137 : "\n"
20138 : "Parameters:\n"
20139 : "-----------\n"
20140 : "\n"
20141 : "hDefn: handle to the field definition to set type to.\n"
20142 : "\n"
20143 : "eType: the new field type. \n"
20144 : ""},
20145 : { (char *)"FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_VARARGS, (char *)"\n"
20146 : "FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\n"
20147 : "\n"
20148 : "OGRJustification\n"
20149 : "OGR_Fld_GetJustify(OGRFieldDefnH hDefn)\n"
20150 : "\n"
20151 : "Get the justification for this field.\n"
20152 : "\n"
20153 : "This function is the same as the CPP method\n"
20154 : "OGRFieldDefn::GetJustify().\n"
20155 : "\n"
20156 : "Parameters:\n"
20157 : "-----------\n"
20158 : "\n"
20159 : "hDefn: handle to the field definition to get justification from.\n"
20160 : "\n"
20161 : "the justification. \n"
20162 : ""},
20163 : { (char *)"FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, (char *)"\n"
20164 : "FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\n"
20165 : "\n"
20166 : "void\n"
20167 : "OGR_Fld_SetJustify(OGRFieldDefnH hDefn, OGRJustification eJustify)\n"
20168 : "\n"
20169 : "Set the justification for this field.\n"
20170 : "\n"
20171 : "This function is the same as the CPP method\n"
20172 : "OGRFieldDefn::SetJustify().\n"
20173 : "\n"
20174 : "Parameters:\n"
20175 : "-----------\n"
20176 : "\n"
20177 : "hDefn: handle to the field definition to set justification to.\n"
20178 : "\n"
20179 : "eJustify: the new justification. \n"
20180 : ""},
20181 : { (char *)"FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_VARARGS, (char *)"\n"
20182 : "FieldDefn_GetWidth(FieldDefn self) -> int\n"
20183 : "\n"
20184 : "int OGR_Fld_GetWidth(OGRFieldDefnH\n"
20185 : "hDefn)\n"
20186 : "\n"
20187 : "Get the formatting width for this field.\n"
20188 : "\n"
20189 : "This function is the same as the CPP method OGRFieldDefn::GetWidth().\n"
20190 : "\n"
20191 : "Parameters:\n"
20192 : "-----------\n"
20193 : "\n"
20194 : "hDefn: handle to the field definition to get width from.\n"
20195 : "\n"
20196 : "the width, zero means no specified width. \n"
20197 : ""},
20198 : { (char *)"FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, (char *)"\n"
20199 : "FieldDefn_SetWidth(FieldDefn self, int width)\n"
20200 : "\n"
20201 : "void OGR_Fld_SetWidth(OGRFieldDefnH\n"
20202 : "hDefn, int nNewWidth)\n"
20203 : "\n"
20204 : "Set the formatting width for this field in characters.\n"
20205 : "\n"
20206 : "This function is the same as the CPP method OGRFieldDefn::SetWidth().\n"
20207 : "\n"
20208 : "Parameters:\n"
20209 : "-----------\n"
20210 : "\n"
20211 : "hDefn: handle to the field definition to set width to.\n"
20212 : "\n"
20213 : "nNewWidth: the new width. \n"
20214 : ""},
20215 : { (char *)"FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_VARARGS, (char *)"\n"
20216 : "FieldDefn_GetPrecision(FieldDefn self) -> int\n"
20217 : "\n"
20218 : "int\n"
20219 : "OGR_Fld_GetPrecision(OGRFieldDefnH hDefn)\n"
20220 : "\n"
20221 : "Get the formatting precision for this field. This should normally be\n"
20222 : "zero for fields of types other than OFTReal.\n"
20223 : "\n"
20224 : "This function is the same as the CPP method\n"
20225 : "OGRFieldDefn::GetPrecision().\n"
20226 : "\n"
20227 : "Parameters:\n"
20228 : "-----------\n"
20229 : "\n"
20230 : "hDefn: handle to the field definition to get precision from.\n"
20231 : "\n"
20232 : "the precision. \n"
20233 : ""},
20234 : { (char *)"FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, (char *)"\n"
20235 : "FieldDefn_SetPrecision(FieldDefn self, int precision)\n"
20236 : "\n"
20237 : "void\n"
20238 : "OGR_Fld_SetPrecision(OGRFieldDefnH hDefn, int nPrecision)\n"
20239 : "\n"
20240 : "Set the formatting precision for this field in characters.\n"
20241 : "\n"
20242 : "This should normally be zero for fields of types other than OFTReal.\n"
20243 : "\n"
20244 : "This function is the same as the CPP method\n"
20245 : "OGRFieldDefn::SetPrecision().\n"
20246 : "\n"
20247 : "Parameters:\n"
20248 : "-----------\n"
20249 : "\n"
20250 : "hDefn: handle to the field definition to set precision to.\n"
20251 : "\n"
20252 : "nPrecision: the new precision. \n"
20253 : ""},
20254 : { (char *)"FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_VARARGS, (char *)"FieldDefn_GetTypeName(FieldDefn self) -> char"},
20255 : { (char *)"FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, (char *)"FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char"},
20256 : { (char *)"FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_VARARGS, (char *)"\n"
20257 : "FieldDefn_IsIgnored(FieldDefn self) -> int\n"
20258 : "\n"
20259 : "int OGR_Fld_IsIgnored(OGRFieldDefnH\n"
20260 : "hDefn)\n"
20261 : "\n"
20262 : "Return whether this field should be omitted when fetching features.\n"
20263 : "\n"
20264 : "This method is the same as the C++ method OGRFieldDefn::IsIgnored().\n"
20265 : "\n"
20266 : "Parameters:\n"
20267 : "-----------\n"
20268 : "\n"
20269 : "hDefn: handle to the field definition\n"
20270 : "\n"
20271 : "ignore state \n"
20272 : ""},
20273 : { (char *)"FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, (char *)"\n"
20274 : "FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\n"
20275 : "\n"
20276 : "void\n"
20277 : "OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int ignore)\n"
20278 : "\n"
20279 : "Set whether this field should be omitted when fetching features.\n"
20280 : "\n"
20281 : "This method is the same as the C function OGRFieldDefn::SetIgnored().\n"
20282 : "\n"
20283 : "Parameters:\n"
20284 : "-----------\n"
20285 : "\n"
20286 : "hDefn: handle to the field definition\n"
20287 : "\n"
20288 : "ignore: ignore state \n"
20289 : ""},
20290 : { (char *)"FieldDefn_swigregister", FieldDefn_swigregister, METH_VARARGS, NULL},
20291 : { (char *)"CreateGeometryFromWkb", (PyCFunction) _wrap_CreateGeometryFromWkb, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkb(int len, SpatialReference reference = None) -> Geometry"},
20292 : { (char *)"CreateGeometryFromWkt", (PyCFunction) _wrap_CreateGeometryFromWkt, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkt(char val, SpatialReference reference = None) -> Geometry"},
20293 : { (char *)"CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_VARARGS, (char *)"CreateGeometryFromGML(char input_string) -> Geometry"},
20294 : { (char *)"CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_VARARGS, (char *)"CreateGeometryFromJson(char input_string) -> Geometry"},
20295 : { (char *)"BuildPolygonFromEdges", (PyCFunction) _wrap_BuildPolygonFromEdges, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
20296 : "BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort = 0, int bAutoClose = 0, \n"
20297 : " double dfTolerance = 0) -> Geometry\n"
20298 : ""},
20299 : { (char *)"ApproximateArcAngles", (PyCFunction) _wrap_ApproximateArcAngles, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
20300 : "ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, \n"
20301 : " double dfSecondaryAxis, \n"
20302 : " double dfRotation, double dfStartAngle, double dfEndAngle, \n"
20303 : " double dfMaxAngleStepSizeDegrees) -> Geometry\n"
20304 : ""},
20305 : { (char *)"ForceToPolygon", _wrap_ForceToPolygon, METH_VARARGS, (char *)"ForceToPolygon(Geometry geom_in) -> Geometry"},
20306 : { (char *)"ForceToLineString", _wrap_ForceToLineString, METH_VARARGS, (char *)"ForceToLineString(Geometry geom_in) -> Geometry"},
20307 : { (char *)"ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_VARARGS, (char *)"ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
20308 : { (char *)"ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_VARARGS, (char *)"ForceToMultiPoint(Geometry geom_in) -> Geometry"},
20309 : { (char *)"ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_VARARGS, (char *)"ForceToMultiLineString(Geometry geom_in) -> Geometry"},
20310 : { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, (char *)"delete_Geometry(Geometry self)"},
20311 : { (char *)"new_Geometry", (PyCFunction) _wrap_new_Geometry, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
20312 : "new_Geometry(OGRwkbGeometryType type = wkbUnknown, char wkt = None, \n"
20313 : " int wkb = 0, char gml = None) -> Geometry\n"
20314 : ""},
20315 : { (char *)"Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_VARARGS, (char *)"\n"
20316 : "Geometry_ExportToWkt(Geometry self) -> OGRErr\n"
20317 : "\n"
20318 : "OGRErr\n"
20319 : "OGR_G_ExportToWkt(OGRGeometryH hGeom, char **ppszSrcText)\n"
20320 : "\n"
20321 : "Convert a geometry into well known text format.\n"
20322 : "\n"
20323 : "This function relates to the SFCOM IWks::ExportToWKT() method.\n"
20324 : "\n"
20325 : "This function is the same as the CPP method\n"
20326 : "OGRGeometry::exportToWkt().\n"
20327 : "\n"
20328 : "Parameters:\n"
20329 : "-----------\n"
20330 : "\n"
20331 : "hGeom: handle on the geometry to convert to a text format from.\n"
20332 : "\n"
20333 : "ppszSrcText: a text buffer is allocated by the program, and assigned\n"
20334 : "to the passed pointer.\n"
20335 : "\n"
20336 : "Currently OGRERR_NONE is always returned. \n"
20337 : ""},
20338 : { (char *)"Geometry_ExportToWkb", (PyCFunction) _wrap_Geometry_ExportToWkb, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
20339 : "Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order = wkbXDR) -> OGRErr\n"
20340 : "\n"
20341 : "OGRErr\n"
20342 : "OGR_G_ExportToWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder, unsigned\n"
20343 : "char *pabyDstBuffer)\n"
20344 : "\n"
20345 : "Convert a geometry into well known binary format.\n"
20346 : "\n"
20347 : "This function relates to the SFCOM IWks::ExportToWKB() method.\n"
20348 : "\n"
20349 : "This function is the same as the CPP method\n"
20350 : "OGRGeometry::exportToWkb().\n"
20351 : "\n"
20352 : "Parameters:\n"
20353 : "-----------\n"
20354 : "\n"
20355 : "hGeom: handle on the geometry to convert to a well know binary data\n"
20356 : "from.\n"
20357 : "\n"
20358 : "eOrder: One of wkbXDR or wkbNDR indicating MSB or LSB byte order\n"
20359 : "respectively.\n"
20360 : "\n"
20361 : "pabyDstBuffer: a buffer into which the binary representation is\n"
20362 : "written. This buffer must be at least OGR_G_WkbSize() byte in size.\n"
20363 : "\n"
20364 : "Currently OGRERR_NONE is always returned. \n"
20365 : ""},
20366 : { (char *)"Geometry_ExportToGML", (PyCFunction) _wrap_Geometry_ExportToGML, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToGML(Geometry self, char options = None) -> retStringAndCPLFree"},
20367 : { (char *)"Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, (char *)"Geometry_ExportToKML(Geometry self, char altitude_mode = None) -> retStringAndCPLFree"},
20368 : { (char *)"Geometry_ExportToJson", (PyCFunction) _wrap_Geometry_ExportToJson, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToJson(Geometry self, char options = None) -> retStringAndCPLFree"},
20369 : { (char *)"Geometry_AddPoint", (PyCFunction) _wrap_Geometry_AddPoint, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_AddPoint(Geometry self, double x, double y, double z = 0)"},
20370 : { (char *)"Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, (char *)"Geometry_AddPoint_2D(Geometry self, double x, double y)"},
20371 : { (char *)"Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, (char *)"Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
20372 : { (char *)"Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, (char *)"Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
20373 : { (char *)"Geometry_Clone", _wrap_Geometry_Clone, METH_VARARGS, (char *)"\n"
20374 : "Geometry_Clone(Geometry self) -> Geometry\n"
20375 : "\n"
20376 : "OGRGeometryH OGR_G_Clone(OGRGeometryH\n"
20377 : "hGeom)\n"
20378 : "\n"
20379 : "Make a copy of this object.\n"
20380 : "\n"
20381 : "This function relates to the SFCOM IGeometry::clone() method.\n"
20382 : "\n"
20383 : "This function is the same as the CPP method OGRGeometry::clone().\n"
20384 : "\n"
20385 : "Parameters:\n"
20386 : "-----------\n"
20387 : "\n"
20388 : "hGeom: handle on the geometry to clone from.\n"
20389 : "\n"
20390 : "an handle on the copy of the geometry with the spatial reference\n"
20391 : "system as the original. \n"
20392 : ""},
20393 : { (char *)"Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_VARARGS, (char *)"\n"
20394 : "Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\n"
20395 : "\n"
20396 : "OGRwkbGeometryType\n"
20397 : "OGR_G_GetGeometryType(OGRGeometryH hGeom)\n"
20398 : "\n"
20399 : "Fetch geometry type.\n"
20400 : "\n"
20401 : "Note that the geometry type may include the 2.5D flag. To get a 2D\n"
20402 : "flattened version of the geometry type apply the wkbFlatten() macro to\n"
20403 : "the return result.\n"
20404 : "\n"
20405 : "This function is the same as the CPP method\n"
20406 : "OGRGeometry::getGeometryType().\n"
20407 : "\n"
20408 : "Parameters:\n"
20409 : "-----------\n"
20410 : "\n"
20411 : "hGeom: handle on the geometry to get type from.\n"
20412 : "\n"
20413 : "the geometry type code. \n"
20414 : ""},
20415 : { (char *)"Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_VARARGS, (char *)"\n"
20416 : "Geometry_GetGeometryName(Geometry self) -> char\n"
20417 : "\n"
20418 : "const char*\n"
20419 : "OGR_G_GetGeometryName(OGRGeometryH hGeom)\n"
20420 : "\n"
20421 : "Fetch WKT name for geometry type.\n"
20422 : "\n"
20423 : "There is no SFCOM analog to this function.\n"
20424 : "\n"
20425 : "This function is the same as the CPP method\n"
20426 : "OGRGeometry::getGeometryName().\n"
20427 : "\n"
20428 : "Parameters:\n"
20429 : "-----------\n"
20430 : "\n"
20431 : "hGeom: handle on the geometry to get name from.\n"
20432 : "\n"
20433 : "name used for this geometry type in well known text format. \n"
20434 : ""},
20435 : { (char *)"Geometry_Length", _wrap_Geometry_Length, METH_VARARGS, (char *)"Geometry_Length(Geometry self) -> double"},
20436 : { (char *)"Geometry_Area", _wrap_Geometry_Area, METH_VARARGS, (char *)"Geometry_Area(Geometry self) -> double"},
20437 : { (char *)"Geometry_GetArea", _wrap_Geometry_GetArea, METH_VARARGS, (char *)"Geometry_GetArea(Geometry self) -> double"},
20438 : { (char *)"Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_VARARGS, (char *)"Geometry_GetPointCount(Geometry self) -> int"},
20439 : { (char *)"Geometry_GetPoints", (PyCFunction) _wrap_Geometry_GetPoints, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetPoints(Geometry self, int nCoordDimension = 0)"},
20440 : { (char *)"Geometry_GetX", (PyCFunction) _wrap_Geometry_GetX, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetX(Geometry self, int point = 0) -> double"},
20441 : { (char *)"Geometry_GetY", (PyCFunction) _wrap_Geometry_GetY, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetY(Geometry self, int point = 0) -> double"},
20442 : { (char *)"Geometry_GetZ", (PyCFunction) _wrap_Geometry_GetZ, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetZ(Geometry self, int point = 0) -> double"},
20443 : { (char *)"Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, (char *)"Geometry_GetPoint(Geometry self, int iPoint = 0)"},
20444 : { (char *)"Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, (char *)"Geometry_GetPoint_2D(Geometry self, int iPoint = 0)"},
20445 : { (char *)"Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_VARARGS, (char *)"Geometry_GetGeometryCount(Geometry self) -> int"},
20446 : { (char *)"Geometry_SetPoint", (PyCFunction) _wrap_Geometry_SetPoint, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_SetPoint(Geometry self, int point, double x, double y, double z = 0)"},
20447 : { (char *)"Geometry_SetPoint_2D", (PyCFunction) _wrap_Geometry_SetPoint_2D, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_SetPoint_2D(Geometry self, int point, double x, double y)"},
20448 : { (char *)"Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, (char *)"Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
20449 : { (char *)"Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, (char *)"\n"
20450 : "Geometry_Simplify(Geometry self, double tolerance) -> Geometry\n"
20451 : "\n"
20452 : "OGRGeometryH\n"
20453 : "OGR_G_Simplify(OGRGeometryH hThis, double dTolerance)\n"
20454 : "\n"
20455 : "Compute a simplified geometry.\n"
20456 : "\n"
20457 : "This function is the same as the C++ method OGRGeometry::Simplify().\n"
20458 : "\n"
20459 : "This function is built on the GEOS library, check it for the\n"
20460 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20461 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20462 : "error.\n"
20463 : "\n"
20464 : "Parameters:\n"
20465 : "-----------\n"
20466 : "\n"
20467 : "hThis: the geometry.\n"
20468 : "\n"
20469 : "dTolerance: the distance tolerance for the simplification.\n"
20470 : "\n"
20471 : "the simplified geometry or NULL if an error occurs.\n"
20472 : "\n"
20473 : "OGR 1.8.0 \n"
20474 : ""},
20475 : { (char *)"Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, (char *)"\n"
20476 : "Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\n"
20477 : "\n"
20478 : "OGRGeometryH\n"
20479 : "OGR_G_SimplifyPreserveTopology(OGRGeometryH hThis, double dTolerance)\n"
20480 : "\n"
20481 : "Compute a simplified geometry.\n"
20482 : "\n"
20483 : "This function is the same as the C++ method\n"
20484 : "OGRGeometry::SimplifyPreserveTopology().\n"
20485 : "\n"
20486 : "This function is built on the GEOS library, check it for the\n"
20487 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20488 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20489 : "error.\n"
20490 : "\n"
20491 : "Parameters:\n"
20492 : "-----------\n"
20493 : "\n"
20494 : "hThis: the geometry.\n"
20495 : "\n"
20496 : "dTolerance: the distance tolerance for the simplification.\n"
20497 : "\n"
20498 : "the simplified geometry or NULL if an error occurs.\n"
20499 : "\n"
20500 : "OGR 1.9.0 \n"
20501 : ""},
20502 : { (char *)"Geometry_Boundary", _wrap_Geometry_Boundary, METH_VARARGS, (char *)"\n"
20503 : "Geometry_Boundary(Geometry self) -> Geometry\n"
20504 : "\n"
20505 : "OGRGeometryH\n"
20506 : "OGR_G_Boundary(OGRGeometryH hTarget)\n"
20507 : "\n"
20508 : "Compute boundary.\n"
20509 : "\n"
20510 : "A new geometry object is created and returned containing the boundary\n"
20511 : "of the geometry on which the method is invoked.\n"
20512 : "\n"
20513 : "This function is the same as the C++ method OGR_G_Boundary().\n"
20514 : "\n"
20515 : "This function is built on the GEOS library, check it for the\n"
20516 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20517 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20518 : "error.\n"
20519 : "\n"
20520 : "Parameters:\n"
20521 : "-----------\n"
20522 : "\n"
20523 : "hTarget: The Geometry to calculate the boundary of.\n"
20524 : "\n"
20525 : "a handle to a newly allocated geometry now owned by the caller, or\n"
20526 : "NULL on failure.\n"
20527 : "\n"
20528 : "OGR 1.8.0 \n"
20529 : ""},
20530 : { (char *)"Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_VARARGS, (char *)"\n"
20531 : "Geometry_GetBoundary(Geometry self) -> Geometry\n"
20532 : "\n"
20533 : "OGRGeometryH\n"
20534 : "OGR_G_GetBoundary(OGRGeometryH hTarget)\n"
20535 : "\n"
20536 : "Compute boundary (deprecated).\n"
20537 : "\n"
20538 : "Deprecated See: OGR_G_Boundary() \n"
20539 : ""},
20540 : { (char *)"Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_VARARGS, (char *)"\n"
20541 : "Geometry_ConvexHull(Geometry self) -> Geometry\n"
20542 : "\n"
20543 : "OGRGeometryH\n"
20544 : "OGR_G_ConvexHull(OGRGeometryH hTarget)\n"
20545 : "\n"
20546 : "Compute convex hull.\n"
20547 : "\n"
20548 : "A new geometry object is created and returned containing the convex\n"
20549 : "hull of the geometry on which the method is invoked.\n"
20550 : "\n"
20551 : "This function is the same as the C++ method OGRGeometry::ConvexHull().\n"
20552 : "\n"
20553 : "This function is built on the GEOS library, check it for the\n"
20554 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20555 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20556 : "error.\n"
20557 : "\n"
20558 : "Parameters:\n"
20559 : "-----------\n"
20560 : "\n"
20561 : "hTarget: The Geometry to calculate the convex hull of.\n"
20562 : "\n"
20563 : "a handle to a newly allocated geometry now owned by the caller, or\n"
20564 : "NULL on failure. \n"
20565 : ""},
20566 : { (char *)"Geometry_Buffer", (PyCFunction) _wrap_Geometry_Buffer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
20567 : "Geometry_Buffer(Geometry self, double distance, int quadsecs = 30) -> Geometry\n"
20568 : "\n"
20569 : "OGRGeometryH OGR_G_Buffer(OGRGeometryH\n"
20570 : "hTarget, double dfDist, int nQuadSegs)\n"
20571 : "\n"
20572 : "Compute buffer of geometry.\n"
20573 : "\n"
20574 : "Builds a new geometry containing the buffer region around the geometry\n"
20575 : "on which it is invoked. The buffer is a polygon containing the region\n"
20576 : "within the buffer distance of the original geometry.\n"
20577 : "\n"
20578 : "Some buffer sections are properly described as curves, but are\n"
20579 : "converted to approximate polygons. The nQuadSegs parameter can be used\n"
20580 : "to control how many segements should be used to define a 90 degree\n"
20581 : "curve - a quadrant of a circle. A value of 30 is a reasonable default.\n"
20582 : "Large values result in large numbers of vertices in the resulting\n"
20583 : "buffer geometry while small numbers reduce the accuracy of the result.\n"
20584 : "\n"
20585 : "This function is the same as the C++ method OGRGeometry::Buffer().\n"
20586 : "\n"
20587 : "This function is built on the GEOS library, check it for the\n"
20588 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20589 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20590 : "error.\n"
20591 : "\n"
20592 : "Parameters:\n"
20593 : "-----------\n"
20594 : "\n"
20595 : "hTarget: the geometry.\n"
20596 : "\n"
20597 : "dfDist: the buffer distance to be applied.\n"
20598 : "\n"
20599 : "nQuadSegs: the number of segments used to approximate a 90 degree\n"
20600 : "(quadrant) of curvature.\n"
20601 : "\n"
20602 : "the newly created geometry, or NULL if an error occurs. \n"
20603 : ""},
20604 : { (char *)"Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, (char *)"\n"
20605 : "Geometry_Intersection(Geometry self, Geometry other) -> Geometry\n"
20606 : "\n"
20607 : "OGRGeometryH\n"
20608 : "OGR_G_Intersection(OGRGeometryH hThis, OGRGeometryH hOther)\n"
20609 : "\n"
20610 : "Compute intersection.\n"
20611 : "\n"
20612 : "Generates a new geometry which is the region of intersection of the\n"
20613 : "two geometries operated on. The OGR_G_Intersects() function can be\n"
20614 : "used to test if two geometries intersect.\n"
20615 : "\n"
20616 : "This function is the same as the C++ method\n"
20617 : "OGRGeometry::Intersection().\n"
20618 : "\n"
20619 : "This function is built on the GEOS library, check it for the\n"
20620 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20621 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20622 : "error.\n"
20623 : "\n"
20624 : "Parameters:\n"
20625 : "-----------\n"
20626 : "\n"
20627 : "hThis: the geometry.\n"
20628 : "\n"
20629 : "hOther: the other geometry.\n"
20630 : "\n"
20631 : "a new geometry representing the intersection or NULL if there is no\n"
20632 : "intersection or an error occurs. \n"
20633 : ""},
20634 : { (char *)"Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, (char *)"\n"
20635 : "Geometry_Union(Geometry self, Geometry other) -> Geometry\n"
20636 : "\n"
20637 : "OGRGeometryH OGR_G_Union(OGRGeometryH\n"
20638 : "hThis, OGRGeometryH hOther)\n"
20639 : "\n"
20640 : "Compute union.\n"
20641 : "\n"
20642 : "Generates a new geometry which is the region of union of the two\n"
20643 : "geometries operated on.\n"
20644 : "\n"
20645 : "This function is the same as the C++ method OGRGeometry::Union().\n"
20646 : "\n"
20647 : "This function is built on the GEOS library, check it for the\n"
20648 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20649 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20650 : "error.\n"
20651 : "\n"
20652 : "Parameters:\n"
20653 : "-----------\n"
20654 : "\n"
20655 : "hThis: the geometry.\n"
20656 : "\n"
20657 : "hOther: the other geometry.\n"
20658 : "\n"
20659 : "a new geometry representing the union or NULL if an error occurs. \n"
20660 : ""},
20661 : { (char *)"Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_VARARGS, (char *)"\n"
20662 : "Geometry_UnionCascaded(Geometry self) -> Geometry\n"
20663 : "\n"
20664 : "OGRGeometryH\n"
20665 : "OGR_G_UnionCascaded(OGRGeometryH hThis)\n"
20666 : "\n"
20667 : "Compute union using cascading.\n"
20668 : "\n"
20669 : "This function is the same as the C++ method\n"
20670 : "OGRGeometry::UnionCascaded().\n"
20671 : "\n"
20672 : "This function is built on the GEOS library, check it for the\n"
20673 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20674 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20675 : "error.\n"
20676 : "\n"
20677 : "Parameters:\n"
20678 : "-----------\n"
20679 : "\n"
20680 : "hThis: the geometry.\n"
20681 : "\n"
20682 : "a new geometry representing the union or NULL if an error occurs. \n"
20683 : ""},
20684 : { (char *)"Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, (char *)"\n"
20685 : "Geometry_Difference(Geometry self, Geometry other) -> Geometry\n"
20686 : "\n"
20687 : "OGRGeometryH\n"
20688 : "OGR_G_Difference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
20689 : "\n"
20690 : "Compute difference.\n"
20691 : "\n"
20692 : "Generates a new geometry which is the region of this geometry with the\n"
20693 : "region of the other geometry removed.\n"
20694 : "\n"
20695 : "This function is the same as the C++ method OGRGeometry::Difference().\n"
20696 : "\n"
20697 : "This function is built on the GEOS library, check it for the\n"
20698 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20699 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20700 : "error.\n"
20701 : "\n"
20702 : "Parameters:\n"
20703 : "-----------\n"
20704 : "\n"
20705 : "hThis: the geometry.\n"
20706 : "\n"
20707 : "hOther: the other geometry.\n"
20708 : "\n"
20709 : "a new geometry representing the difference or NULL if the difference\n"
20710 : "is empty or an error occurs. \n"
20711 : ""},
20712 : { (char *)"Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, (char *)"\n"
20713 : "Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\n"
20714 : "\n"
20715 : "OGRGeometryH\n"
20716 : "OGR_G_SymDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
20717 : "\n"
20718 : "Compute symmetric difference.\n"
20719 : "\n"
20720 : "Generates a new geometry which is the symmetric difference of this\n"
20721 : "geometry and the other geometry.\n"
20722 : "\n"
20723 : "This function is the same as the C++ method\n"
20724 : "OGRGeometry::SymmetricDifference().\n"
20725 : "\n"
20726 : "This function is built on the GEOS library, check it for the\n"
20727 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20728 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20729 : "error.\n"
20730 : "\n"
20731 : "Parameters:\n"
20732 : "-----------\n"
20733 : "\n"
20734 : "hThis: the geometry.\n"
20735 : "\n"
20736 : "hOther: the other geometry.\n"
20737 : "\n"
20738 : "a new geometry representing the symmetric difference or NULL if the\n"
20739 : "difference is empty or an error occurs.\n"
20740 : "\n"
20741 : "OGR 1.8.0 \n"
20742 : ""},
20743 : { (char *)"Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, (char *)"\n"
20744 : "Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\n"
20745 : "\n"
20746 : "OGRGeometryH\n"
20747 : "OGR_G_SymmetricDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
20748 : "\n"
20749 : "Compute symmetric difference (deprecated).\n"
20750 : "\n"
20751 : "Deprecated See: OGR_G_SymmetricDifference() \n"
20752 : ""},
20753 : { (char *)"Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, (char *)"\n"
20754 : "Geometry_Distance(Geometry self, Geometry other) -> double\n"
20755 : "\n"
20756 : "double OGR_G_Distance(OGRGeometryH\n"
20757 : "hFirst, OGRGeometryH hOther)\n"
20758 : "\n"
20759 : "Compute distance between two geometries.\n"
20760 : "\n"
20761 : "Returns the shortest distance between the two geometries.\n"
20762 : "\n"
20763 : "This function is the same as the C++ method OGRGeometry::Distance().\n"
20764 : "\n"
20765 : "This function is built on the GEOS library, check it for the\n"
20766 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20767 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20768 : "error.\n"
20769 : "\n"
20770 : "Parameters:\n"
20771 : "-----------\n"
20772 : "\n"
20773 : "hFirst: the first geometry to compare against.\n"
20774 : "\n"
20775 : "hOther: the other geometry to compare against.\n"
20776 : "\n"
20777 : "the distance between the geometries or -1 if an error occurs. \n"
20778 : ""},
20779 : { (char *)"Geometry_Empty", _wrap_Geometry_Empty, METH_VARARGS, (char *)"\n"
20780 : "Geometry_Empty(Geometry self)\n"
20781 : "\n"
20782 : "void OGR_G_Empty(OGRGeometryH hGeom)\n"
20783 : "\n"
20784 : "Clear geometry information. This restores the geometry to it's initial\n"
20785 : "state after construction, and before assignment of actual geometry.\n"
20786 : "\n"
20787 : "This function relates to the SFCOM IGeometry::Empty() method.\n"
20788 : "\n"
20789 : "This function is the same as the CPP method OGRGeometry::empty().\n"
20790 : "\n"
20791 : "Parameters:\n"
20792 : "-----------\n"
20793 : "\n"
20794 : "hGeom: handle on the geometry to empty. \n"
20795 : ""},
20796 : { (char *)"Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_VARARGS, (char *)"\n"
20797 : "Geometry_IsEmpty(Geometry self) -> bool\n"
20798 : "\n"
20799 : "int OGR_G_IsEmpty(OGRGeometryH hGeom)\n"
20800 : "\n"
20801 : "Test if the geometry is empty.\n"
20802 : "\n"
20803 : "This method is the same as the CPP method OGRGeometry::IsEmpty().\n"
20804 : "\n"
20805 : "Parameters:\n"
20806 : "-----------\n"
20807 : "\n"
20808 : "hGeom: The Geometry to test.\n"
20809 : "\n"
20810 : "TRUE if the geometry has no points, otherwise FALSE. \n"
20811 : ""},
20812 : { (char *)"Geometry_IsValid", _wrap_Geometry_IsValid, METH_VARARGS, (char *)"\n"
20813 : "Geometry_IsValid(Geometry self) -> bool\n"
20814 : "\n"
20815 : "int OGR_G_IsValid(OGRGeometryH hGeom)\n"
20816 : "\n"
20817 : "Test if the geometry is valid.\n"
20818 : "\n"
20819 : "This function is the same as the C++ method OGRGeometry::IsValid().\n"
20820 : "\n"
20821 : "This function is built on the GEOS library, check it for the\n"
20822 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20823 : "library, this function will always return FALSE.\n"
20824 : "\n"
20825 : "Parameters:\n"
20826 : "-----------\n"
20827 : "\n"
20828 : "hGeom: The Geometry to test.\n"
20829 : "\n"
20830 : "TRUE if the geometry has no points, otherwise FALSE. \n"
20831 : ""},
20832 : { (char *)"Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_VARARGS, (char *)"\n"
20833 : "Geometry_IsSimple(Geometry self) -> bool\n"
20834 : "\n"
20835 : "int OGR_G_IsSimple(OGRGeometryH\n"
20836 : "hGeom)\n"
20837 : "\n"
20838 : "Returns TRUE if the geometry is simple.\n"
20839 : "\n"
20840 : "Returns TRUE if the geometry has no anomalous geometric points, such\n"
20841 : "as self intersection or self tangency. The description of each\n"
20842 : "instantiable geometric class will include the specific conditions that\n"
20843 : "cause an instance of that class to be classified as not simple.\n"
20844 : "\n"
20845 : "This function is the same as the c++ method OGRGeometry::IsSimple()\n"
20846 : "method.\n"
20847 : "\n"
20848 : "If OGR is built without the GEOS library, this function will always\n"
20849 : "return FALSE.\n"
20850 : "\n"
20851 : "Parameters:\n"
20852 : "-----------\n"
20853 : "\n"
20854 : "hGeom: The Geometry to test.\n"
20855 : "\n"
20856 : "TRUE if object is simple, otherwise FALSE. \n"
20857 : ""},
20858 : { (char *)"Geometry_IsRing", _wrap_Geometry_IsRing, METH_VARARGS, (char *)"\n"
20859 : "Geometry_IsRing(Geometry self) -> bool\n"
20860 : "\n"
20861 : "int OGR_G_IsRing(OGRGeometryH hGeom)\n"
20862 : "\n"
20863 : "Test if the geometry is a ring.\n"
20864 : "\n"
20865 : "This function is the same as the C++ method OGRGeometry::IsRing().\n"
20866 : "\n"
20867 : "This function is built on the GEOS library, check it for the\n"
20868 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20869 : "library, this function will always return FALSE.\n"
20870 : "\n"
20871 : "Parameters:\n"
20872 : "-----------\n"
20873 : "\n"
20874 : "hGeom: The Geometry to test.\n"
20875 : "\n"
20876 : "TRUE if the geometry has no points, otherwise FALSE. \n"
20877 : ""},
20878 : { (char *)"Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, (char *)"\n"
20879 : "Geometry_Intersects(Geometry self, Geometry other) -> bool\n"
20880 : "\n"
20881 : "int OGR_G_Intersects(OGRGeometryH\n"
20882 : "hGeom, OGRGeometryH hOtherGeom)\n"
20883 : "\n"
20884 : "Do these features intersect?\n"
20885 : "\n"
20886 : "Currently this is not implemented in a rigerous fashion, and generally\n"
20887 : "just tests whether the envelopes of the two features intersect.\n"
20888 : "Eventually this will be made rigerous.\n"
20889 : "\n"
20890 : "This function is the same as the CPP method OGRGeometry::Intersects.\n"
20891 : "\n"
20892 : "Parameters:\n"
20893 : "-----------\n"
20894 : "\n"
20895 : "hGeom: handle on the first geometry.\n"
20896 : "\n"
20897 : "hOtherGeom: handle on the other geometry to test against.\n"
20898 : "\n"
20899 : "TRUE if the geometries intersect, otherwise FALSE. \n"
20900 : ""},
20901 : { (char *)"Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, (char *)"\n"
20902 : "Geometry_Intersect(Geometry self, Geometry other) -> bool\n"
20903 : "\n"
20904 : "int OGR_G_Intersect(OGRGeometryH\n"
20905 : "hGeom, OGRGeometryH hOtherGeom) \n"
20906 : ""},
20907 : { (char *)"Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, (char *)"\n"
20908 : "Geometry_Equals(Geometry self, Geometry other) -> bool\n"
20909 : "\n"
20910 : "int OGR_G_Equals(OGRGeometryH hGeom,\n"
20911 : "OGRGeometryH hOther)\n"
20912 : "\n"
20913 : "Returns TRUE if two geometries are equivalent.\n"
20914 : "\n"
20915 : "This function is the same as the CPP method OGRGeometry::Equals()\n"
20916 : "method.\n"
20917 : "\n"
20918 : "Parameters:\n"
20919 : "-----------\n"
20920 : "\n"
20921 : "hGeom: handle on the first geometry.\n"
20922 : "\n"
20923 : "hOther: handle on the other geometry to test against.\n"
20924 : "\n"
20925 : "TRUE if equivalent or FALSE otherwise. \n"
20926 : ""},
20927 : { (char *)"Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, (char *)"\n"
20928 : "Geometry_Equal(Geometry self, Geometry other) -> bool\n"
20929 : "\n"
20930 : "int OGR_G_Equal(OGRGeometryH hGeom,\n"
20931 : "OGRGeometryH hOther) \n"
20932 : ""},
20933 : { (char *)"Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, (char *)"\n"
20934 : "Geometry_Disjoint(Geometry self, Geometry other) -> bool\n"
20935 : "\n"
20936 : "int OGR_G_Disjoint(OGRGeometryH\n"
20937 : "hThis, OGRGeometryH hOther)\n"
20938 : "\n"
20939 : "Test for disjointness.\n"
20940 : "\n"
20941 : "Tests if this geometry and the other geometry are disjoint.\n"
20942 : "\n"
20943 : "This function is the same as the C++ method OGRGeometry::Disjoint().\n"
20944 : "\n"
20945 : "This function is built on the GEOS library, check it for the\n"
20946 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20947 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20948 : "error.\n"
20949 : "\n"
20950 : "Parameters:\n"
20951 : "-----------\n"
20952 : "\n"
20953 : "hThis: the geometry to compare.\n"
20954 : "\n"
20955 : "hOther: the other geometry to compare.\n"
20956 : "\n"
20957 : "TRUE if they are disjoint, otherwise FALSE. \n"
20958 : ""},
20959 : { (char *)"Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, (char *)"\n"
20960 : "Geometry_Touches(Geometry self, Geometry other) -> bool\n"
20961 : "\n"
20962 : "int OGR_G_Touches(OGRGeometryH hThis,\n"
20963 : "OGRGeometryH hOther)\n"
20964 : "\n"
20965 : "Test for touching.\n"
20966 : "\n"
20967 : "Tests if this geometry and the other geometry are touching.\n"
20968 : "\n"
20969 : "This function is the same as the C++ method OGRGeometry::Touches().\n"
20970 : "\n"
20971 : "This function is built on the GEOS library, check it for the\n"
20972 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20973 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
20974 : "error.\n"
20975 : "\n"
20976 : "Parameters:\n"
20977 : "-----------\n"
20978 : "\n"
20979 : "hThis: the geometry to compare.\n"
20980 : "\n"
20981 : "hOther: the other geometry to compare.\n"
20982 : "\n"
20983 : "TRUE if they are touching, otherwise FALSE. \n"
20984 : ""},
20985 : { (char *)"Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, (char *)"\n"
20986 : "Geometry_Crosses(Geometry self, Geometry other) -> bool\n"
20987 : "\n"
20988 : "int OGR_G_Crosses(OGRGeometryH hThis,\n"
20989 : "OGRGeometryH hOther)\n"
20990 : "\n"
20991 : "Test for crossing.\n"
20992 : "\n"
20993 : "Tests if this geometry and the other geometry are crossing.\n"
20994 : "\n"
20995 : "This function is the same as the C++ method OGRGeometry::Crosses().\n"
20996 : "\n"
20997 : "This function is built on the GEOS library, check it for the\n"
20998 : "definition of the geometry operation. If OGR is built without the GEOS\n"
20999 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
21000 : "error.\n"
21001 : "\n"
21002 : "Parameters:\n"
21003 : "-----------\n"
21004 : "\n"
21005 : "hThis: the geometry to compare.\n"
21006 : "\n"
21007 : "hOther: the other geometry to compare.\n"
21008 : "\n"
21009 : "TRUE if they are crossing, otherwise FALSE. \n"
21010 : ""},
21011 : { (char *)"Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, (char *)"\n"
21012 : "Geometry_Within(Geometry self, Geometry other) -> bool\n"
21013 : "\n"
21014 : "int OGR_G_Within(OGRGeometryH hThis,\n"
21015 : "OGRGeometryH hOther)\n"
21016 : "\n"
21017 : "Test for containment.\n"
21018 : "\n"
21019 : "Tests if this geometry is within the other geometry.\n"
21020 : "\n"
21021 : "This function is the same as the C++ method OGRGeometry::Within().\n"
21022 : "\n"
21023 : "This function is built on the GEOS library, check it for the\n"
21024 : "definition of the geometry operation. If OGR is built without the GEOS\n"
21025 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
21026 : "error.\n"
21027 : "\n"
21028 : "Parameters:\n"
21029 : "-----------\n"
21030 : "\n"
21031 : "hThis: the geometry to compare.\n"
21032 : "\n"
21033 : "hOther: the other geometry to compare.\n"
21034 : "\n"
21035 : "TRUE if hThis is within hOther, otherwise FALSE. \n"
21036 : ""},
21037 : { (char *)"Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, (char *)"\n"
21038 : "Geometry_Contains(Geometry self, Geometry other) -> bool\n"
21039 : "\n"
21040 : "int OGR_G_Contains(OGRGeometryH\n"
21041 : "hThis, OGRGeometryH hOther)\n"
21042 : "\n"
21043 : "Test for containment.\n"
21044 : "\n"
21045 : "Tests if this geometry contains the other geometry.\n"
21046 : "\n"
21047 : "This function is the same as the C++ method OGRGeometry::Contains().\n"
21048 : "\n"
21049 : "This function is built on the GEOS library, check it for the\n"
21050 : "definition of the geometry operation. If OGR is built without the GEOS\n"
21051 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
21052 : "error.\n"
21053 : "\n"
21054 : "Parameters:\n"
21055 : "-----------\n"
21056 : "\n"
21057 : "hThis: the geometry to compare.\n"
21058 : "\n"
21059 : "hOther: the other geometry to compare.\n"
21060 : "\n"
21061 : "TRUE if hThis contains hOther geometry, otherwise FALSE. \n"
21062 : ""},
21063 : { (char *)"Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, (char *)"\n"
21064 : "Geometry_Overlaps(Geometry self, Geometry other) -> bool\n"
21065 : "\n"
21066 : "int OGR_G_Overlaps(OGRGeometryH\n"
21067 : "hThis, OGRGeometryH hOther)\n"
21068 : "\n"
21069 : "Test for overlap.\n"
21070 : "\n"
21071 : "Tests if this geometry and the other geometry overlap, that is their\n"
21072 : "intersection has a non-zero area.\n"
21073 : "\n"
21074 : "This function is the same as the C++ method OGRGeometry::Overlaps().\n"
21075 : "\n"
21076 : "This function is built on the GEOS library, check it for the\n"
21077 : "definition of the geometry operation. If OGR is built without the GEOS\n"
21078 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
21079 : "error.\n"
21080 : "\n"
21081 : "Parameters:\n"
21082 : "-----------\n"
21083 : "\n"
21084 : "hThis: the geometry to compare.\n"
21085 : "\n"
21086 : "hOther: the other geometry to compare.\n"
21087 : "\n"
21088 : "TRUE if they are overlapping, otherwise FALSE. \n"
21089 : ""},
21090 : { (char *)"Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, (char *)"\n"
21091 : "Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\n"
21092 : "\n"
21093 : "OGRErr\n"
21094 : "OGR_G_TransformTo(OGRGeometryH hGeom, OGRSpatialReferenceH hSRS)\n"
21095 : "\n"
21096 : "Transform geometry to new spatial reference system.\n"
21097 : "\n"
21098 : "This function will transform the coordinates of a geometry from their\n"
21099 : "current spatial reference system to a new target spatial reference\n"
21100 : "system. Normally this means reprojecting the vectors, but it could\n"
21101 : "include datum shifts, and changes of units.\n"
21102 : "\n"
21103 : "This function will only work if the geometry already has an assigned\n"
21104 : "spatial reference system, and if it is transformable to the target\n"
21105 : "coordinate system.\n"
21106 : "\n"
21107 : "Because this function requires internal creation and initialization of\n"
21108 : "an OGRCoordinateTransformation object it is significantly more\n"
21109 : "expensive to use this function to transform many geometries than it is\n"
21110 : "to create the OGRCoordinateTransformation in advance, and call\n"
21111 : "transform() with that transformation. This function exists primarily\n"
21112 : "for convenience when only transforming a single geometry.\n"
21113 : "\n"
21114 : "This function is the same as the CPP method OGRGeometry::transformTo.\n"
21115 : "\n"
21116 : "Parameters:\n"
21117 : "-----------\n"
21118 : "\n"
21119 : "hGeom: handle on the geometry to apply the transform to.\n"
21120 : "\n"
21121 : "hSRS: handle on the spatial reference system to apply.\n"
21122 : "\n"
21123 : "OGRERR_NONE on success, or an error code. \n"
21124 : ""},
21125 : { (char *)"Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, (char *)"\n"
21126 : "Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
21127 : "\n"
21128 : "OGRErr OGR_G_Transform(OGRGeometryH\n"
21129 : "hGeom, OGRCoordinateTransformationH hTransform)\n"
21130 : "\n"
21131 : "Apply arbitrary coordinate transformation to geometry.\n"
21132 : "\n"
21133 : "This function will transform the coordinates of a geometry from their\n"
21134 : "current spatial reference system to a new target spatial reference\n"
21135 : "system. Normally this means reprojecting the vectors, but it could\n"
21136 : "include datum shifts, and changes of units.\n"
21137 : "\n"
21138 : "Note that this function does not require that the geometry already\n"
21139 : "have a spatial reference system. It will be assumed that they can be\n"
21140 : "treated as having the source spatial reference system of the\n"
21141 : "OGRCoordinateTransformation object, and the actual SRS of the geometry\n"
21142 : "will be ignored. On successful completion the output\n"
21143 : "OGRSpatialReference of the OGRCoordinateTransformation will be\n"
21144 : "assigned to the geometry.\n"
21145 : "\n"
21146 : "This function is the same as the CPP method OGRGeometry::transform.\n"
21147 : "\n"
21148 : "Parameters:\n"
21149 : "-----------\n"
21150 : "\n"
21151 : "hGeom: handle on the geometry to apply the transform to.\n"
21152 : "\n"
21153 : "hTransform: handle on the transformation to apply.\n"
21154 : "\n"
21155 : "OGRERR_NONE on success or an error code. \n"
21156 : ""},
21157 : { (char *)"Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_VARARGS, (char *)"\n"
21158 : "Geometry_GetSpatialReference(Geometry self) -> SpatialReference\n"
21159 : "\n"
21160 : "OGRSpatialReferenceH\n"
21161 : "OGR_G_GetSpatialReference(OGRGeometryH hGeom)\n"
21162 : "\n"
21163 : "Returns spatial reference system for geometry.\n"
21164 : "\n"
21165 : "This function relates to the SFCOM IGeometry::get_SpatialReference()\n"
21166 : "method.\n"
21167 : "\n"
21168 : "This function is the same as the CPP method\n"
21169 : "OGRGeometry::getSpatialReference().\n"
21170 : "\n"
21171 : "Parameters:\n"
21172 : "-----------\n"
21173 : "\n"
21174 : "hGeom: handle on the geometry to get spatial reference from.\n"
21175 : "\n"
21176 : "a reference to the spatial reference geometry. \n"
21177 : ""},
21178 : { (char *)"Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, (char *)"\n"
21179 : "Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\n"
21180 : "\n"
21181 : "void\n"
21182 : "OGR_G_AssignSpatialReference(OGRGeometryH hGeom, OGRSpatialReferenceH\n"
21183 : "hSRS)\n"
21184 : "\n"
21185 : "Assign spatial reference to this object.\n"
21186 : "\n"
21187 : "Any existing spatial reference is replaced, but under no circumstances\n"
21188 : "does this result in the object being reprojected. It is just changing\n"
21189 : "the interpretation of the existing geometry. Note that assigning a\n"
21190 : "spatial reference increments the reference count on the\n"
21191 : "OGRSpatialReference, but does not copy it.\n"
21192 : "\n"
21193 : "This is similar to the SFCOM IGeometry::put_SpatialReference() method.\n"
21194 : "\n"
21195 : "This function is the same as the CPP method\n"
21196 : "OGRGeometry::assignSpatialReference.\n"
21197 : "\n"
21198 : "Parameters:\n"
21199 : "-----------\n"
21200 : "\n"
21201 : "hGeom: handle on the geometry to apply the new spatial reference\n"
21202 : "system.\n"
21203 : "\n"
21204 : "hSRS: handle on the new spatial reference system to apply. \n"
21205 : ""},
21206 : { (char *)"Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_VARARGS, (char *)"\n"
21207 : "Geometry_CloseRings(Geometry self)\n"
21208 : "\n"
21209 : "void OGR_G_CloseRings(OGRGeometryH\n"
21210 : "hGeom)\n"
21211 : "\n"
21212 : "Force rings to be closed.\n"
21213 : "\n"
21214 : "If this geometry, or any contained geometries has polygon rings that\n"
21215 : "are not closed, they will be closed by adding the starting point at\n"
21216 : "the end.\n"
21217 : "\n"
21218 : "Parameters:\n"
21219 : "-----------\n"
21220 : "\n"
21221 : "hGeom: handle to the geometry. \n"
21222 : ""},
21223 : { (char *)"Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_VARARGS, (char *)"\n"
21224 : "Geometry_FlattenTo2D(Geometry self)\n"
21225 : "\n"
21226 : "void\n"
21227 : "OGR_G_FlattenTo2D(OGRGeometryH hGeom)\n"
21228 : "\n"
21229 : "Convert geometry to strictly 2D. In a sense this converts all Z\n"
21230 : "coordinates to 0.0.\n"
21231 : "\n"
21232 : "This function is the same as the CPP method\n"
21233 : "OGRGeometry::flattenTo2D().\n"
21234 : "\n"
21235 : "Parameters:\n"
21236 : "-----------\n"
21237 : "\n"
21238 : "hGeom: handle on the geometry to convert. \n"
21239 : ""},
21240 : { (char *)"Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, (char *)"\n"
21241 : "Geometry_Segmentize(Geometry self, double dfMaxLength)\n"
21242 : "\n"
21243 : "void OGR_G_Segmentize(OGRGeometryH\n"
21244 : "hGeom, double dfMaxLength)\n"
21245 : "\n"
21246 : "Modify the geometry such it has no segment longer then the given\n"
21247 : "distance.\n"
21248 : "\n"
21249 : "Interpolated points will have Z and M values (if needed) set to 0.\n"
21250 : "Distance computation is performed in 2d only\n"
21251 : "\n"
21252 : "This function is the same as the CPP method OGRGeometry::segmentize().\n"
21253 : "\n"
21254 : "Parameters:\n"
21255 : "-----------\n"
21256 : "\n"
21257 : "hGeom: handle on the geometry to segmentize\n"
21258 : "\n"
21259 : "dfMaxLength: the maximum distance between 2 points after\n"
21260 : "segmentization \n"
21261 : ""},
21262 : { (char *)"Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_VARARGS, (char *)"\n"
21263 : "Geometry_GetEnvelope(Geometry self)\n"
21264 : "\n"
21265 : "void\n"
21266 : "OGR_G_GetEnvelope(OGRGeometryH hGeom, OGREnvelope *psEnvelope)\n"
21267 : "\n"
21268 : "Computes and returns the bounding envelope for this geometry in the\n"
21269 : "passed psEnvelope structure.\n"
21270 : "\n"
21271 : "This function is the same as the CPP method\n"
21272 : "OGRGeometry::getEnvelope().\n"
21273 : "\n"
21274 : "Parameters:\n"
21275 : "-----------\n"
21276 : "\n"
21277 : "hGeom: handle of the geometry to get envelope from.\n"
21278 : "\n"
21279 : "psEnvelope: the structure in which to place the results. \n"
21280 : ""},
21281 : { (char *)"Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_VARARGS, (char *)"\n"
21282 : "Geometry_GetEnvelope3D(Geometry self)\n"
21283 : "\n"
21284 : "void\n"
21285 : "OGR_G_GetEnvelope3D(OGRGeometryH hGeom, OGREnvelope3D *psEnvelope)\n"
21286 : "\n"
21287 : "Computes and returns the bounding envelope (3D) for this geometry in\n"
21288 : "the passed psEnvelope structure.\n"
21289 : "\n"
21290 : "This function is the same as the CPP method\n"
21291 : "OGRGeometry::getEnvelope().\n"
21292 : "\n"
21293 : "Parameters:\n"
21294 : "-----------\n"
21295 : "\n"
21296 : "hGeom: handle of the geometry to get envelope from.\n"
21297 : "\n"
21298 : "psEnvelope: the structure in which to place the results.\n"
21299 : "\n"
21300 : "OGR 1.9.0 \n"
21301 : ""},
21302 : { (char *)"Geometry_Centroid", _wrap_Geometry_Centroid, METH_VARARGS, (char *)"\n"
21303 : "Geometry_Centroid(Geometry self) -> Geometry\n"
21304 : "\n"
21305 : "int OGR_G_Centroid(OGRGeometryH\n"
21306 : "hGeom, OGRGeometryH hCentroidPoint)\n"
21307 : "\n"
21308 : "Compute the geometry centroid.\n"
21309 : "\n"
21310 : "The centroid location is applied to the passed in OGRPoint object. The\n"
21311 : "centroid is not necessarily within the geometry.\n"
21312 : "\n"
21313 : "This method relates to the SFCOM ISurface::get_Centroid() method\n"
21314 : "however the current implementation based on GEOS can operate on other\n"
21315 : "geometry types such as multipoint, linestring, geometrycollection such\n"
21316 : "as multipolygons. OGC SF SQL 1.1 defines the operation for surfaces\n"
21317 : "(polygons). SQL/MM-Part 3 defines the operation for surfaces and\n"
21318 : "multisurfaces (multipolygons).\n"
21319 : "\n"
21320 : "This function is the same as the C++ method OGRGeometry::Centroid().\n"
21321 : "\n"
21322 : "This function is built on the GEOS library, check it for the\n"
21323 : "definition of the geometry operation. If OGR is built without the GEOS\n"
21324 : "library, this function will always fail, issuing a CPLE_NotSupported\n"
21325 : "error.\n"
21326 : "\n"
21327 : "OGRERR_NONE on success or OGRERR_FAILURE on error. \n"
21328 : ""},
21329 : { (char *)"Geometry_PointOnSurface", _wrap_Geometry_PointOnSurface, METH_VARARGS, (char *)"Geometry_PointOnSurface(Geometry self) -> Geometry"},
21330 : { (char *)"Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_VARARGS, (char *)"\n"
21331 : "Geometry_WkbSize(Geometry self) -> int\n"
21332 : "\n"
21333 : "int OGR_G_WkbSize(OGRGeometryH hGeom)\n"
21334 : "\n"
21335 : "Returns size of related binary representation.\n"
21336 : "\n"
21337 : "This function returns the exact number of bytes required to hold the\n"
21338 : "well known binary representation of this geometry object. Its\n"
21339 : "computation may be slightly expensive for complex geometries.\n"
21340 : "\n"
21341 : "This function relates to the SFCOM IWks::WkbSize() method.\n"
21342 : "\n"
21343 : "This function is the same as the CPP method OGRGeometry::WkbSize().\n"
21344 : "\n"
21345 : "Parameters:\n"
21346 : "-----------\n"
21347 : "\n"
21348 : "hGeom: handle on the geometry to get the binary size from.\n"
21349 : "\n"
21350 : "size of binary representation in bytes. \n"
21351 : ""},
21352 : { (char *)"Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_VARARGS, (char *)"\n"
21353 : "Geometry_GetCoordinateDimension(Geometry self) -> int\n"
21354 : "\n"
21355 : "int\n"
21356 : "OGR_G_GetCoordinateDimension(OGRGeometryH hGeom)\n"
21357 : "\n"
21358 : "Get the dimension of the coordinates in this geometry.\n"
21359 : "\n"
21360 : "This function corresponds to the SFCOM IGeometry::GetDimension()\n"
21361 : "method.\n"
21362 : "\n"
21363 : "This function is the same as the CPP method\n"
21364 : "OGRGeometry::getCoordinateDimension().\n"
21365 : "\n"
21366 : "Parameters:\n"
21367 : "-----------\n"
21368 : "\n"
21369 : "hGeom: handle on the geometry to get the dimension of the coordinates\n"
21370 : "from.\n"
21371 : "\n"
21372 : "in practice this will return 2 or 3. It can also return 0 in the case\n"
21373 : "of an empty point. \n"
21374 : ""},
21375 : { (char *)"Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, (char *)"\n"
21376 : "Geometry_SetCoordinateDimension(Geometry self, int dimension)\n"
21377 : "\n"
21378 : "void\n"
21379 : "OGR_G_SetCoordinateDimension(OGRGeometryH hGeom, int nNewDimension)\n"
21380 : "\n"
21381 : "Set the coordinate dimension.\n"
21382 : "\n"
21383 : "This method sets the explicit coordinate dimension. Setting the\n"
21384 : "coordinate dimension of a geometry to 2 should zero out any existing Z\n"
21385 : "values. Setting the dimension of a geometry collection will not\n"
21386 : "necessarily affect the children geometries.\n"
21387 : "\n"
21388 : "Parameters:\n"
21389 : "-----------\n"
21390 : "\n"
21391 : "hGeom: handle on the geometry to set the dimension of the\n"
21392 : "coordinates.\n"
21393 : "\n"
21394 : "nNewDimension: New coordinate dimension value, either 2 or 3. \n"
21395 : ""},
21396 : { (char *)"Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_VARARGS, (char *)"\n"
21397 : "Geometry_GetDimension(Geometry self) -> int\n"
21398 : "\n"
21399 : "int\n"
21400 : "OGR_G_GetDimension(OGRGeometryH hGeom)\n"
21401 : "\n"
21402 : "Get the dimension of this geometry.\n"
21403 : "\n"
21404 : "This function corresponds to the SFCOM IGeometry::GetDimension()\n"
21405 : "method. It indicates the dimension of the geometry, but does not\n"
21406 : "indicate the dimension of the underlying space (as indicated by\n"
21407 : "OGR_G_GetCoordinateDimension() function).\n"
21408 : "\n"
21409 : "This function is the same as the CPP method\n"
21410 : "OGRGeometry::getDimension().\n"
21411 : "\n"
21412 : "Parameters:\n"
21413 : "-----------\n"
21414 : "\n"
21415 : "hGeom: handle on the geometry to get the dimension from.\n"
21416 : "\n"
21417 : "0 for points, 1 for lines and 2 for surfaces. \n"
21418 : ""},
21419 : { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL},
21420 : { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, (char *)"GetDriverCount() -> int"},
21421 : { (char *)"GetOpenDSCount", _wrap_GetOpenDSCount, METH_VARARGS, (char *)"GetOpenDSCount() -> int"},
21422 : { (char *)"SetGenerate_DB2_V72_BYTE_ORDER", _wrap_SetGenerate_DB2_V72_BYTE_ORDER, METH_VARARGS, (char *)"SetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER) -> OGRErr"},
21423 : { (char *)"RegisterAll", _wrap_RegisterAll, METH_VARARGS, (char *)"RegisterAll()"},
21424 : { (char *)"GeometryTypeToName", _wrap_GeometryTypeToName, METH_VARARGS, (char *)"GeometryTypeToName(OGRwkbGeometryType eType) -> char"},
21425 : { (char *)"GetFieldTypeName", _wrap_GetFieldTypeName, METH_VARARGS, (char *)"GetFieldTypeName(OGRFieldType type) -> char"},
21426 : { (char *)"GetOpenDS", _wrap_GetOpenDS, METH_VARARGS, (char *)"GetOpenDS(int ds_number) -> DataSource"},
21427 : { (char *)"Open", (PyCFunction) _wrap_Open, METH_VARARGS | METH_KEYWORDS, (char *)"Open(char utf8_path, int update = 0) -> DataSource"},
21428 : { (char *)"OpenShared", (PyCFunction) _wrap_OpenShared, METH_VARARGS | METH_KEYWORDS, (char *)"OpenShared(char utf8_path, int update = 0) -> DataSource"},
21429 : { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, (char *)"GetDriverByName(char name) -> Driver"},
21430 : { (char *)"GetDriver", _wrap_GetDriver, METH_VARARGS, (char *)"GetDriver(int driver_number) -> Driver"},
21431 : { (char *)"GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, (char *)"GeneralCmdLineProcessor(char papszArgv, int nOptions = 0) -> char"},
21432 : { (char *)"TermProgress_nocb", (PyCFunction) _wrap_TermProgress_nocb, METH_VARARGS | METH_KEYWORDS, (char *)"TermProgress_nocb(double dfProgress, char pszMessage = None, void pData = None) -> int"},
21433 : { NULL, NULL, 0, NULL }
21434 : };
21435 :
21436 :
21437 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
21438 :
21439 : static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
21440 : static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
21441 : static swig_type_info _swigt__p_OGRDataSourceShadow = {"_p_OGRDataSourceShadow", "OGRDataSourceShadow *", 0, 0, (void*)0, 0};
21442 : static swig_type_info _swigt__p_OGRDriverShadow = {"_p_OGRDriverShadow", "OGRDriverShadow *", 0, 0, (void*)0, 0};
21443 : static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
21444 : static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
21445 : static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
21446 : static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
21447 : static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
21448 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
21449 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
21450 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
21451 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
21452 : 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};
21453 : static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldType *|int *|OGRwkbGeometryType *|OGRJustification *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0};
21454 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
21455 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
21456 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
21457 :
21458 : static swig_type_info *swig_type_initial[] = {
21459 : &_swigt__p_GDALProgressFunc,
21460 : &_swigt__p_GIntBig,
21461 : &_swigt__p_OGRDataSourceShadow,
21462 : &_swigt__p_OGRDriverShadow,
21463 : &_swigt__p_OGRFeatureDefnShadow,
21464 : &_swigt__p_OGRFeatureShadow,
21465 : &_swigt__p_OGRFieldDefnShadow,
21466 : &_swigt__p_OGRGeometryShadow,
21467 : &_swigt__p_OGRLayerShadow,
21468 : &_swigt__p_OSRCoordinateTransformationShadow,
21469 : &_swigt__p_OSRSpatialReferenceShadow,
21470 : &_swigt__p_char,
21471 : &_swigt__p_double,
21472 : &_swigt__p_f_double_p_q_const__char_p_void__int,
21473 : &_swigt__p_int,
21474 : &_swigt__p_p_char,
21475 : &_swigt__p_p_double,
21476 : &_swigt__p_p_int,
21477 : };
21478 :
21479 : static swig_cast_info _swigc__p_GDALProgressFunc[] = { {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
21480 : static swig_cast_info _swigc__p_GIntBig[] = { {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
21481 : static swig_cast_info _swigc__p_OGRDataSourceShadow[] = { {&_swigt__p_OGRDataSourceShadow, 0, 0, 0},{0, 0, 0, 0}};
21482 : static swig_cast_info _swigc__p_OGRDriverShadow[] = { {&_swigt__p_OGRDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
21483 : static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = { {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
21484 : static swig_cast_info _swigc__p_OGRFeatureShadow[] = { {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
21485 : static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = { {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
21486 : static swig_cast_info _swigc__p_OGRGeometryShadow[] = { {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
21487 : static swig_cast_info _swigc__p_OGRLayerShadow[] = { {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
21488 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
21489 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21490 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
21491 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
21492 : 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}};
21493 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
21494 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
21495 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
21496 : static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
21497 :
21498 : static swig_cast_info *swig_cast_initial[] = {
21499 : _swigc__p_GDALProgressFunc,
21500 : _swigc__p_GIntBig,
21501 : _swigc__p_OGRDataSourceShadow,
21502 : _swigc__p_OGRDriverShadow,
21503 : _swigc__p_OGRFeatureDefnShadow,
21504 : _swigc__p_OGRFeatureShadow,
21505 : _swigc__p_OGRFieldDefnShadow,
21506 : _swigc__p_OGRGeometryShadow,
21507 : _swigc__p_OGRLayerShadow,
21508 : _swigc__p_OSRCoordinateTransformationShadow,
21509 : _swigc__p_OSRSpatialReferenceShadow,
21510 : _swigc__p_char,
21511 : _swigc__p_double,
21512 : _swigc__p_f_double_p_q_const__char_p_void__int,
21513 : _swigc__p_int,
21514 : _swigc__p_p_char,
21515 : _swigc__p_p_double,
21516 : _swigc__p_p_int,
21517 : };
21518 :
21519 :
21520 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
21521 :
21522 : static swig_const_info swig_const_table[] = {
21523 : { SWIG_PY_POINTER, (char*)"TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
21524 : {0, 0, 0, 0.0, 0, 0}};
21525 :
21526 : #ifdef __cplusplus
21527 : }
21528 : #endif
21529 : /* -----------------------------------------------------------------------------
21530 : * Type initialization:
21531 : * This problem is tough by the requirement that no dynamic
21532 : * memory is used. Also, since swig_type_info structures store pointers to
21533 : * swig_cast_info structures and swig_cast_info structures store pointers back
21534 : * to swig_type_info structures, we need some lookup code at initialization.
21535 : * The idea is that swig generates all the structures that are needed.
21536 : * The runtime then collects these partially filled structures.
21537 : * The SWIG_InitializeModule function takes these initial arrays out of
21538 : * swig_module, and does all the lookup, filling in the swig_module.types
21539 : * array with the correct data and linking the correct swig_cast_info
21540 : * structures together.
21541 : *
21542 : * The generated swig_type_info structures are assigned staticly to an initial
21543 : * array. We just loop through that array, and handle each type individually.
21544 : * First we lookup if this type has been already loaded, and if so, use the
21545 : * loaded structure instead of the generated one. Then we have to fill in the
21546 : * cast linked list. The cast data is initially stored in something like a
21547 : * two-dimensional array. Each row corresponds to a type (there are the same
21548 : * number of rows as there are in the swig_type_initial array). Each entry in
21549 : * a column is one of the swig_cast_info structures for that type.
21550 : * The cast_initial array is actually an array of arrays, because each row has
21551 : * a variable number of columns. So to actually build the cast linked list,
21552 : * we find the array of casts associated with the type, and loop through it
21553 : * adding the casts to the list. The one last trick we need to do is making
21554 : * sure the type pointer in the swig_cast_info struct is correct.
21555 : *
21556 : * First off, we lookup the cast->type name to see if it is already loaded.
21557 : * There are three cases to handle:
21558 : * 1) If the cast->type has already been loaded AND the type we are adding
21559 : * casting info to has not been loaded (it is in this module), THEN we
21560 : * replace the cast->type pointer with the type pointer that has already
21561 : * been loaded.
21562 : * 2) If BOTH types (the one we are adding casting info to, and the
21563 : * cast->type) are loaded, THEN the cast info has already been loaded by
21564 : * the previous module so we just ignore it.
21565 : * 3) Finally, if cast->type has not already been loaded, then we add that
21566 : * swig_cast_info to the linked list (because the cast->type) pointer will
21567 : * be correct.
21568 : * ----------------------------------------------------------------------------- */
21569 :
21570 : #ifdef __cplusplus
21571 : extern "C" {
21572 : #if 0
21573 : } /* c-mode */
21574 : #endif
21575 : #endif
21576 :
21577 : #if 0
21578 : #define SWIGRUNTIME_DEBUG
21579 : #endif
21580 :
21581 :
21582 : SWIGRUNTIME void
21583 2 : SWIG_InitializeModule(void *clientdata) {
21584 : size_t i;
21585 : swig_module_info *module_head, *iter;
21586 : int found, init;
21587 :
21588 2 : clientdata = clientdata;
21589 :
21590 : /* check to see if the circular list has been setup, if not, set it up */
21591 2 : if (swig_module.next==0) {
21592 : /* Initialize the swig_module */
21593 2 : swig_module.type_initial = swig_type_initial;
21594 2 : swig_module.cast_initial = swig_cast_initial;
21595 2 : swig_module.next = &swig_module;
21596 2 : init = 1;
21597 : } else {
21598 0 : init = 0;
21599 : }
21600 :
21601 : /* Try and load any already created modules */
21602 2 : module_head = SWIG_GetModule(clientdata);
21603 2 : if (!module_head) {
21604 : /* This is the first module loaded for this interpreter */
21605 : /* so set the swig module into the interpreter */
21606 : SWIG_SetModule(clientdata, &swig_module);
21607 0 : module_head = &swig_module;
21608 : } else {
21609 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
21610 2 : found=0;
21611 2 : iter=module_head;
21612 4 : do {
21613 4 : if (iter==&swig_module) {
21614 0 : found=1;
21615 0 : break;
21616 : }
21617 4 : iter=iter->next;
21618 : } while (iter!= module_head);
21619 :
21620 : /* if the is found in the list, then all is done and we may leave */
21621 2 : if (found) return;
21622 : /* otherwise we must add out module into the list */
21623 2 : swig_module.next = module_head->next;
21624 2 : module_head->next = &swig_module;
21625 : }
21626 :
21627 : /* When multiple interpeters are used, a module could have already been initialized in
21628 : a different interpreter, but not yet have a pointer in this interpreter.
21629 : In this case, we do not want to continue adding types... everything should be
21630 : set up already */
21631 2 : if (init == 0) return;
21632 :
21633 : /* Now work on filling in swig_module.types */
21634 : #ifdef SWIGRUNTIME_DEBUG
21635 : printf("SWIG_InitializeModule: size %d\n", swig_module.size);
21636 : #endif
21637 38 : for (i = 0; i < swig_module.size; ++i) {
21638 36 : swig_type_info *type = 0;
21639 : swig_type_info *ret;
21640 : swig_cast_info *cast;
21641 :
21642 : #ifdef SWIGRUNTIME_DEBUG
21643 : printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
21644 : #endif
21645 :
21646 : /* if there is another module already loaded */
21647 36 : if (swig_module.next != &swig_module) {
21648 36 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
21649 : }
21650 36 : if (type) {
21651 : /* Overwrite clientdata field */
21652 : #ifdef SWIGRUNTIME_DEBUG
21653 : printf("SWIG_InitializeModule: found type %s\n", type->name);
21654 : #endif
21655 21 : if (swig_module.type_initial[i]->clientdata) {
21656 0 : type->clientdata = swig_module.type_initial[i]->clientdata;
21657 : #ifdef SWIGRUNTIME_DEBUG
21658 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
21659 : #endif
21660 : }
21661 : } else {
21662 15 : type = swig_module.type_initial[i];
21663 : }
21664 :
21665 : /* Insert casting types */
21666 36 : cast = swig_module.cast_initial[i];
21667 108 : while (cast->type) {
21668 : /* Don't need to add information already in the list */
21669 36 : ret = 0;
21670 : #ifdef SWIGRUNTIME_DEBUG
21671 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
21672 : #endif
21673 36 : if (swig_module.next != &swig_module) {
21674 36 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
21675 : #ifdef SWIGRUNTIME_DEBUG
21676 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
21677 : #endif
21678 : }
21679 36 : if (ret) {
21680 21 : if (type == swig_module.type_initial[i]) {
21681 : #ifdef SWIGRUNTIME_DEBUG
21682 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
21683 : #endif
21684 0 : cast->type = ret;
21685 0 : ret = 0;
21686 : } else {
21687 : /* Check for casting already in the list */
21688 21 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
21689 : #ifdef SWIGRUNTIME_DEBUG
21690 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
21691 : #endif
21692 21 : if (!ocast) ret = 0;
21693 : }
21694 : }
21695 :
21696 36 : if (!ret) {
21697 : #ifdef SWIGRUNTIME_DEBUG
21698 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
21699 : #endif
21700 15 : if (type->cast) {
21701 0 : type->cast->prev = cast;
21702 0 : cast->next = type->cast;
21703 : }
21704 15 : type->cast = cast;
21705 : }
21706 36 : cast++;
21707 : }
21708 : /* Set entry in modules->types array equal to the type */
21709 36 : swig_module.types[i] = type;
21710 : }
21711 2 : swig_module.types[i] = 0;
21712 :
21713 : #ifdef SWIGRUNTIME_DEBUG
21714 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21715 : for (i = 0; i < swig_module.size; ++i) {
21716 : int j = 0;
21717 : swig_cast_info *cast = swig_module.cast_initial[i];
21718 : printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
21719 : while (cast->type) {
21720 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
21721 : cast++;
21722 : ++j;
21723 : }
21724 : printf("---- Total casts: %d\n",j);
21725 : }
21726 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21727 : #endif
21728 : }
21729 :
21730 : /* This function will propagate the clientdata field of type to
21731 : * any new swig_type_info structures that have been added into the list
21732 : * of equivalent types. It is like calling
21733 : * SWIG_TypeClientData(type, clientdata) a second time.
21734 : */
21735 : SWIGRUNTIME void
21736 : SWIG_PropagateClientData(void) {
21737 : size_t i;
21738 : swig_cast_info *equiv;
21739 : static int init_run = 0;
21740 :
21741 : if (init_run) return;
21742 : init_run = 1;
21743 :
21744 : for (i = 0; i < swig_module.size; i++) {
21745 : if (swig_module.types[i]->clientdata) {
21746 : equiv = swig_module.types[i]->cast;
21747 : while (equiv) {
21748 : if (!equiv->converter) {
21749 : if (equiv->type && !equiv->type->clientdata)
21750 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
21751 : }
21752 : equiv = equiv->next;
21753 : }
21754 : }
21755 : }
21756 : }
21757 :
21758 : #ifdef __cplusplus
21759 : #if 0
21760 : {
21761 : /* c-mode */
21762 : #endif
21763 : }
21764 : #endif
21765 :
21766 :
21767 :
21768 : #ifdef __cplusplus
21769 : extern "C" {
21770 : #endif
21771 :
21772 : /* Python-specific SWIG API */
21773 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
21774 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
21775 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
21776 :
21777 : /* -----------------------------------------------------------------------------
21778 : * global variable support code.
21779 : * ----------------------------------------------------------------------------- */
21780 :
21781 : typedef struct swig_globalvar {
21782 : char *name; /* Name of global variable */
21783 : PyObject *(*get_attr)(void); /* Return the current value */
21784 : int (*set_attr)(PyObject *); /* Set the value */
21785 : struct swig_globalvar *next;
21786 : } swig_globalvar;
21787 :
21788 : typedef struct swig_varlinkobject {
21789 : PyObject_HEAD
21790 : swig_globalvar *vars;
21791 : } swig_varlinkobject;
21792 :
21793 : SWIGINTERN PyObject *
21794 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
21795 : #if PY_VERSION_HEX >= 0x03000000
21796 : return PyUnicode_InternFromString("<Swig global variables>");
21797 : #else
21798 : return PyString_FromString("<Swig global variables>");
21799 : #endif
21800 : }
21801 :
21802 : SWIGINTERN PyObject *
21803 : swig_varlink_str(swig_varlinkobject *v) {
21804 : #if PY_VERSION_HEX >= 0x03000000
21805 : PyObject *str = PyUnicode_InternFromString("(");
21806 : PyObject *tail;
21807 : PyObject *joined;
21808 : swig_globalvar *var;
21809 : for (var = v->vars; var; var=var->next) {
21810 : tail = PyUnicode_FromString(var->name);
21811 : joined = PyUnicode_Concat(str, tail);
21812 : Py_DecRef(str);
21813 : Py_DecRef(tail);
21814 : str = joined;
21815 : if (var->next) {
21816 : tail = PyUnicode_InternFromString(", ");
21817 : joined = PyUnicode_Concat(str, tail);
21818 : Py_DecRef(str);
21819 : Py_DecRef(tail);
21820 : str = joined;
21821 : }
21822 : }
21823 : tail = PyUnicode_InternFromString(")");
21824 : joined = PyUnicode_Concat(str, tail);
21825 : Py_DecRef(str);
21826 : Py_DecRef(tail);
21827 : str = joined;
21828 : #else
21829 : PyObject *str = PyString_FromString("(");
21830 : swig_globalvar *var;
21831 : for (var = v->vars; var; var=var->next) {
21832 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
21833 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
21834 : }
21835 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
21836 : #endif
21837 : return str;
21838 : }
21839 :
21840 : SWIGINTERN int
21841 : swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
21842 : char *tmp;
21843 : PyObject *str = swig_varlink_str(v);
21844 : fprintf(fp,"Swig global variables ");
21845 : fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
21846 : SWIG_Python_str_DelForPy3(tmp);
21847 : Py_DECREF(str);
21848 : return 0;
21849 : }
21850 :
21851 : SWIGINTERN void
21852 : swig_varlink_dealloc(swig_varlinkobject *v) {
21853 : swig_globalvar *var = v->vars;
21854 : while (var) {
21855 : swig_globalvar *n = var->next;
21856 : free(var->name);
21857 : free(var);
21858 : var = n;
21859 : }
21860 : }
21861 :
21862 : SWIGINTERN PyObject *
21863 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
21864 : PyObject *res = NULL;
21865 : swig_globalvar *var = v->vars;
21866 : while (var) {
21867 : if (strcmp(var->name,n) == 0) {
21868 : res = (*var->get_attr)();
21869 : break;
21870 : }
21871 : var = var->next;
21872 : }
21873 : if (res == NULL && !PyErr_Occurred()) {
21874 : PyErr_SetString(PyExc_NameError,"Unknown C global variable");
21875 : }
21876 : return res;
21877 : }
21878 :
21879 : SWIGINTERN int
21880 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
21881 : int res = 1;
21882 : swig_globalvar *var = v->vars;
21883 : while (var) {
21884 : if (strcmp(var->name,n) == 0) {
21885 : res = (*var->set_attr)(p);
21886 : break;
21887 : }
21888 : var = var->next;
21889 : }
21890 : if (res == 1 && !PyErr_Occurred()) {
21891 : PyErr_SetString(PyExc_NameError,"Unknown C global variable");
21892 : }
21893 : return res;
21894 : }
21895 :
21896 : SWIGINTERN PyTypeObject*
21897 : swig_varlink_type(void) {
21898 : static char varlink__doc__[] = "Swig var link object";
21899 : static PyTypeObject varlink_type;
21900 : static int type_init = 0;
21901 : if (!type_init) {
21902 : const PyTypeObject tmp
21903 : = {
21904 : /* PyObject header changed in Python 3 */
21905 : #if PY_VERSION_HEX >= 0x03000000
21906 : PyVarObject_HEAD_INIT(&PyType_Type, 0)
21907 : #else
21908 : PyObject_HEAD_INIT(NULL)
21909 : 0, /* Number of items in variable part (ob_size) */
21910 : #endif
21911 : (char *)"swigvarlink", /* Type name (tp_name) */
21912 : sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
21913 : 0, /* Itemsize (tp_itemsize) */
21914 : (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
21915 : (printfunc) swig_varlink_print, /* Print (tp_print) */
21916 : (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
21917 : (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
21918 : 0, /* tp_compare */
21919 : (reprfunc) swig_varlink_repr, /* tp_repr */
21920 : 0, /* tp_as_number */
21921 : 0, /* tp_as_sequence */
21922 : 0, /* tp_as_mapping */
21923 : 0, /* tp_hash */
21924 : 0, /* tp_call */
21925 : (reprfunc) swig_varlink_str, /* tp_str */
21926 : 0, /* tp_getattro */
21927 : 0, /* tp_setattro */
21928 : 0, /* tp_as_buffer */
21929 : 0, /* tp_flags */
21930 : varlink__doc__, /* tp_doc */
21931 : 0, /* tp_traverse */
21932 : 0, /* tp_clear */
21933 : 0, /* tp_richcompare */
21934 : 0, /* tp_weaklistoffset */
21935 : #if PY_VERSION_HEX >= 0x02020000
21936 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
21937 : #endif
21938 : #if PY_VERSION_HEX >= 0x02030000
21939 : 0, /* tp_del */
21940 : #endif
21941 : #ifdef COUNT_ALLOCS
21942 : 0,0,0,0 /* tp_alloc -> tp_next */
21943 : #endif
21944 : };
21945 : varlink_type = tmp;
21946 : /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
21947 : #if PY_VERSION_HEX < 0x03000000
21948 : varlink_type.ob_type = &PyType_Type;
21949 : #endif
21950 : type_init = 1;
21951 : }
21952 : return &varlink_type;
21953 : }
21954 :
21955 : /* Create a variable linking object for use later */
21956 : SWIGINTERN PyObject *
21957 : SWIG_Python_newvarlink(void) {
21958 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
21959 : if (result) {
21960 : result->vars = 0;
21961 : }
21962 : return ((PyObject*) result);
21963 : }
21964 :
21965 : SWIGINTERN void
21966 : SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
21967 : swig_varlinkobject *v = (swig_varlinkobject *) p;
21968 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
21969 : if (gv) {
21970 : size_t size = strlen(name)+1;
21971 : gv->name = (char *)malloc(size);
21972 : if (gv->name) {
21973 : strncpy(gv->name,name,size);
21974 : gv->get_attr = get_attr;
21975 : gv->set_attr = set_attr;
21976 : gv->next = v->vars;
21977 : }
21978 : }
21979 : v->vars = gv;
21980 : }
21981 :
21982 : SWIGINTERN PyObject *
21983 : SWIG_globals(void) {
21984 : static PyObject *_SWIG_globals = 0;
21985 : if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
21986 : return _SWIG_globals;
21987 : }
21988 :
21989 : /* -----------------------------------------------------------------------------
21990 : * constants/methods manipulation
21991 : * ----------------------------------------------------------------------------- */
21992 :
21993 : /* Install Constants */
21994 : SWIGINTERN void
21995 2 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
21996 2 : PyObject *obj = 0;
21997 : size_t i;
21998 4 : for (i = 0; constants[i].type; ++i) {
21999 2 : switch(constants[i].type) {
22000 : case SWIG_PY_POINTER:
22001 2 : obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
22002 2 : break;
22003 : case SWIG_PY_BINARY:
22004 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
22005 0 : break;
22006 : default:
22007 0 : obj = 0;
22008 : break;
22009 : }
22010 2 : if (obj) {
22011 2 : PyDict_SetItemString(d, constants[i].name, obj);
22012 2 : Py_DECREF(obj);
22013 : }
22014 : }
22015 2 : }
22016 :
22017 : /* -----------------------------------------------------------------------------*/
22018 : /* Fix SwigMethods to carry the callback ptrs when needed */
22019 : /* -----------------------------------------------------------------------------*/
22020 :
22021 : SWIGINTERN void
22022 2 : SWIG_Python_FixMethods(PyMethodDef *methods,
22023 : swig_const_info *const_table,
22024 : swig_type_info **types,
22025 : swig_type_info **types_initial) {
22026 : size_t i;
22027 468 : for (i = 0; methods[i].ml_name; ++i) {
22028 466 : const char *c = methods[i].ml_doc;
22029 916 : if (c && (c = strstr(c, "swig_ptr: "))) {
22030 : int j;
22031 0 : swig_const_info *ci = 0;
22032 0 : const char *name = c + 10;
22033 0 : for (j = 0; const_table[j].type; ++j) {
22034 0 : if (strncmp(const_table[j].name, name,
22035 0 : strlen(const_table[j].name)) == 0) {
22036 0 : ci = &(const_table[j]);
22037 0 : break;
22038 : }
22039 : }
22040 0 : if (ci) {
22041 0 : size_t shift = (ci->ptype) - types;
22042 0 : swig_type_info *ty = types_initial[shift];
22043 0 : size_t ldoc = (c - methods[i].ml_doc);
22044 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
22045 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
22046 0 : if (ndoc) {
22047 0 : char *buff = ndoc;
22048 0 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
22049 0 : if (ptr) {
22050 0 : strncpy(buff, methods[i].ml_doc, ldoc);
22051 0 : buff += ldoc;
22052 : strncpy(buff, "swig_ptr: ", 10);
22053 0 : buff += 10;
22054 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
22055 0 : methods[i].ml_doc = ndoc;
22056 : }
22057 : }
22058 : }
22059 : }
22060 : }
22061 2 : }
22062 :
22063 : #ifdef __cplusplus
22064 : }
22065 : #endif
22066 :
22067 : /* -----------------------------------------------------------------------------*
22068 : * Partial Init method
22069 : * -----------------------------------------------------------------------------*/
22070 :
22071 : #ifdef __cplusplus
22072 : extern "C"
22073 : #endif
22074 :
22075 : SWIGEXPORT
22076 : #if PY_VERSION_HEX >= 0x03000000
22077 : PyObject*
22078 : #else
22079 : void
22080 : #endif
22081 2 : SWIG_init(void) {
22082 : PyObject *m, *d;
22083 : #if PY_VERSION_HEX >= 0x03000000
22084 : static struct PyModuleDef SWIG_module = {
22085 : PyModuleDef_HEAD_INIT,
22086 : (char *) SWIG_name,
22087 : NULL,
22088 : -1,
22089 : SwigMethods,
22090 : NULL,
22091 : NULL,
22092 : NULL,
22093 : NULL
22094 : };
22095 : #endif
22096 :
22097 : /* Fix SwigMethods to carry the callback ptrs when needed */
22098 2 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
22099 :
22100 : #if PY_VERSION_HEX >= 0x03000000
22101 : m = PyModule_Create(&SWIG_module);
22102 : #else
22103 2 : m = Py_InitModule((char *) SWIG_name, SwigMethods);
22104 : #endif
22105 2 : d = PyModule_GetDict(m);
22106 :
22107 2 : SWIG_InitializeModule(0);
22108 2 : SWIG_InstallConstants(d,swig_const_table);
22109 :
22110 :
22111 2 : SWIG_Python_SetConstant(d, "wkb25DBit",SWIG_From_int(static_cast< int >(0x80000000)));
22112 2 : SWIG_Python_SetConstant(d, "wkb25Bit",SWIG_From_int(static_cast< int >(0x80000000)));
22113 2 : SWIG_Python_SetConstant(d, "wkbUnknown",SWIG_From_int(static_cast< int >(0)));
22114 2 : SWIG_Python_SetConstant(d, "wkbPoint",SWIG_From_int(static_cast< int >(1)));
22115 2 : SWIG_Python_SetConstant(d, "wkbLineString",SWIG_From_int(static_cast< int >(2)));
22116 2 : SWIG_Python_SetConstant(d, "wkbPolygon",SWIG_From_int(static_cast< int >(3)));
22117 2 : SWIG_Python_SetConstant(d, "wkbMultiPoint",SWIG_From_int(static_cast< int >(4)));
22118 2 : SWIG_Python_SetConstant(d, "wkbMultiLineString",SWIG_From_int(static_cast< int >(5)));
22119 2 : SWIG_Python_SetConstant(d, "wkbMultiPolygon",SWIG_From_int(static_cast< int >(6)));
22120 2 : SWIG_Python_SetConstant(d, "wkbGeometryCollection",SWIG_From_int(static_cast< int >(7)));
22121 2 : SWIG_Python_SetConstant(d, "wkbNone",SWIG_From_int(static_cast< int >(100)));
22122 2 : SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
22123 2 : SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(wkbPoint+wkb25DBit)));
22124 2 : SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(wkbLineString+wkb25DBit)));
22125 2 : SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(wkbPolygon+wkb25DBit)));
22126 2 : SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(wkbMultiPoint+wkb25DBit)));
22127 2 : SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(wkbMultiLineString+wkb25DBit)));
22128 2 : SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(wkbMultiPolygon+wkb25DBit)));
22129 2 : SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(wkbGeometryCollection+wkb25DBit)));
22130 2 : SWIG_Python_SetConstant(d, "OFTInteger",SWIG_From_int(static_cast< int >(0)));
22131 2 : SWIG_Python_SetConstant(d, "OFTIntegerList",SWIG_From_int(static_cast< int >(1)));
22132 2 : SWIG_Python_SetConstant(d, "OFTReal",SWIG_From_int(static_cast< int >(2)));
22133 2 : SWIG_Python_SetConstant(d, "OFTRealList",SWIG_From_int(static_cast< int >(3)));
22134 2 : SWIG_Python_SetConstant(d, "OFTString",SWIG_From_int(static_cast< int >(4)));
22135 2 : SWIG_Python_SetConstant(d, "OFTStringList",SWIG_From_int(static_cast< int >(5)));
22136 2 : SWIG_Python_SetConstant(d, "OFTWideString",SWIG_From_int(static_cast< int >(6)));
22137 2 : SWIG_Python_SetConstant(d, "OFTWideStringList",SWIG_From_int(static_cast< int >(7)));
22138 2 : SWIG_Python_SetConstant(d, "OFTBinary",SWIG_From_int(static_cast< int >(8)));
22139 2 : SWIG_Python_SetConstant(d, "OFTDate",SWIG_From_int(static_cast< int >(9)));
22140 2 : SWIG_Python_SetConstant(d, "OFTTime",SWIG_From_int(static_cast< int >(10)));
22141 2 : SWIG_Python_SetConstant(d, "OFTDateTime",SWIG_From_int(static_cast< int >(11)));
22142 2 : SWIG_Python_SetConstant(d, "OJUndefined",SWIG_From_int(static_cast< int >(0)));
22143 2 : SWIG_Python_SetConstant(d, "OJLeft",SWIG_From_int(static_cast< int >(1)));
22144 2 : SWIG_Python_SetConstant(d, "OJRight",SWIG_From_int(static_cast< int >(2)));
22145 2 : SWIG_Python_SetConstant(d, "wkbXDR",SWIG_From_int(static_cast< int >(0)));
22146 2 : SWIG_Python_SetConstant(d, "wkbNDR",SWIG_From_int(static_cast< int >(1)));
22147 2 : SWIG_Python_SetConstant(d, "NullFID",SWIG_From_int(static_cast< int >(-1)));
22148 2 : SWIG_Python_SetConstant(d, "ALTER_NAME_FLAG",SWIG_From_int(static_cast< int >(1)));
22149 2 : SWIG_Python_SetConstant(d, "ALTER_TYPE_FLAG",SWIG_From_int(static_cast< int >(2)));
22150 2 : SWIG_Python_SetConstant(d, "ALTER_WIDTH_PRECISION_FLAG",SWIG_From_int(static_cast< int >(4)));
22151 2 : SWIG_Python_SetConstant(d, "ALTER_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4)));
22152 2 : SWIG_Python_SetConstant(d, "OLCRandomRead",SWIG_FromCharPtr("RandomRead"));
22153 2 : SWIG_Python_SetConstant(d, "OLCSequentialWrite",SWIG_FromCharPtr("SequentialWrite"));
22154 2 : SWIG_Python_SetConstant(d, "OLCRandomWrite",SWIG_FromCharPtr("RandomWrite"));
22155 2 : SWIG_Python_SetConstant(d, "OLCFastSpatialFilter",SWIG_FromCharPtr("FastSpatialFilter"));
22156 2 : SWIG_Python_SetConstant(d, "OLCFastFeatureCount",SWIG_FromCharPtr("FastFeatureCount"));
22157 2 : SWIG_Python_SetConstant(d, "OLCFastGetExtent",SWIG_FromCharPtr("FastGetExtent"));
22158 2 : SWIG_Python_SetConstant(d, "OLCCreateField",SWIG_FromCharPtr("CreateField"));
22159 2 : SWIG_Python_SetConstant(d, "OLCDeleteField",SWIG_FromCharPtr("DeleteField"));
22160 2 : SWIG_Python_SetConstant(d, "OLCReorderFields",SWIG_FromCharPtr("ReorderFields"));
22161 2 : SWIG_Python_SetConstant(d, "OLCAlterFieldDefn",SWIG_FromCharPtr("AlterFieldDefn"));
22162 2 : SWIG_Python_SetConstant(d, "OLCTransactions",SWIG_FromCharPtr("Transactions"));
22163 2 : SWIG_Python_SetConstant(d, "OLCDeleteFeature",SWIG_FromCharPtr("DeleteFeature"));
22164 2 : SWIG_Python_SetConstant(d, "OLCFastSetNextByIndex",SWIG_FromCharPtr("FastSetNextByIndex"));
22165 2 : SWIG_Python_SetConstant(d, "OLCStringsAsUTF8",SWIG_FromCharPtr("StringsAsUTF8"));
22166 2 : SWIG_Python_SetConstant(d, "OLCIgnoreFields",SWIG_FromCharPtr("IgnoreFields"));
22167 2 : SWIG_Python_SetConstant(d, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
22168 2 : SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
22169 2 : SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
22170 2 : SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
22171 :
22172 :
22173 2 : if ( OGRGetDriverCount() == 0 ) {
22174 2 : OGRRegisterAll();
22175 : }
22176 :
22177 :
22178 :
22179 : #if PY_VERSION_HEX >= 0x03000000
22180 : return m;
22181 : #else
22182 : return;
22183 : #endif
22184 4 : }
22185 :
|