1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
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 * ----------------------------------------------------------------------------- */
12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
16 /* SwigValueWrapper is described in swig.swg */
17 template<typename T
> class SwigValueWrapper
{
18 struct SwigMovePointer
{
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; }
24 SwigValueWrapper
& operator=(const SwigValueWrapper
<T
>& rhs
);
25 SwigValueWrapper(const SwigValueWrapper
<T
>& rhs
);
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
; }
33 template <typename T
> T
SwigValueInit() {
38 /* -----------------------------------------------------------------------------
39 * This section contains generic SWIG labels for method/variable
40 * declarations/attributes, and other compiler dependent labels.
41 * ----------------------------------------------------------------------------- */
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
52 # define SWIGTEMPLATEDISAMBIGUATOR
56 /* inline attribute */
58 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
59 # define SWIGINLINE inline
65 /* attribute recognised by some compilers to avoid 'unused' warnings */
67 # if defined(__GNUC__)
68 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
69 # define SWIGUNUSED __attribute__ ((__unused__))
74 # define SWIGUNUSED __attribute__ ((__unused__))
80 #ifndef SWIG_MSC_UNSUPPRESS_4505
81 # if defined(_MSC_VER)
82 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
86 #ifndef SWIGUNUSEDPARM
88 # define SWIGUNUSEDPARM(p)
90 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
94 /* internal SWIG method */
96 # define SWIGINTERN static SWIGUNUSED
99 /* internal inline SWIG method */
100 #ifndef SWIGINTERNINLINE
101 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
104 /* exporting methods */
105 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
106 # ifndef GCC_HASCLASSVISIBILITY
107 # define GCC_HASCLASSVISIBILITY
112 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113 # if defined(STATIC_LINKED)
116 # define SWIGEXPORT __declspec(dllexport)
119 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
120 # define SWIGEXPORT __attribute__ ((visibility("default")))
127 /* calling conventions for Windows */
129 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
130 # define SWIGSTDCALL __stdcall
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
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
148 /* Python.h has to appear first */
151 /* -----------------------------------------------------------------------------
154 * This file contains generic C API SWIG runtime support for pointer
156 * ----------------------------------------------------------------------------- */
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"
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)
168 # define SWIG_TYPE_TABLE_NAME
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'.
176 But only do this if strictly necessary, ie, if you have problems
177 with your compiler or suchlike.
181 # define SWIGRUNTIME SWIGINTERN
184 #ifndef SWIGRUNTIMEINLINE
185 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
188 /* Generic buffer size */
189 #ifndef SWIG_BUFFER_SIZE
190 # define SWIG_BUFFER_SIZE 1024
193 /* Flags for pointer conversions */
194 #define SWIG_POINTER_DISOWN 0x1
195 #define SWIG_CAST_NEW_MEMORY 0x2
197 /* Flags for new pointer objects */
198 #define SWIG_POINTER_OWN 0x1
202 Flags/methods for returning states.
204 The SWIG conversion methods, as ConvertPtr, return an 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).
208 Use the following macros/flags to set or process the returning
211 In old versions of SWIG, code such as the following was usually written:
213 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
219 Now you can be more explicit:
221 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
222 if (SWIG_IsOK(res)) {
228 which is the same really, but now you can also do
231 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
232 if (SWIG_IsOK(res)) {
234 if (SWIG_IsNewObj(res) {
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
248 int SWIG_ConvertPtr(obj, ptr,...) {
250 if (<need new object>) {
251 *ptr = <ptr to new allocated object>;
254 *ptr = <ptr to old object>;
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
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
274 food(1) // cast rank '1' (1 -> 1.0)
275 fooi(1) // cast rank '0'
277 just use the SWIG_AddCast()/SWIG_CheckState()
281 #define SWIG_ERROR (-1)
282 #define SWIG_IsOK(r) (r >= 0)
283 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
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))
305 #if defined(SWIG_CASTRANK_MODE)
306 # ifndef SWIG_TypeRank
307 # define SWIG_TypeRank unsigned long
309 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
310 # define SWIG_MAXCASTRANK (2)
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
;
317 SWIGINTERNINLINE
int SWIG_CheckState(int r
) {
318 return SWIG_IsOK(r
) ? SWIG_CastRank(r
) + 1 : 0;
320 #else /* no cast-rank mode */
321 # define SWIG_AddCast(r) (r)
322 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
332 typedef void *(*swig_converter_func
)(void *, int *);
333 typedef struct swig_type_info
*(*swig_dycast_func
)(void **);
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 */
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 */
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 */
366 Compare two type names skipping the space characters, therefore
367 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
369 Return 0 when the two name types are equivalent, as in
370 strncmp, but skipping ' '.
373 SWIG_TypeNameComp(const char *f1
, const char *l1
,
374 const char *f2
, const char *l2
) {
375 for (;(f1
!= l1
) && (f2
!= l2
); ++f1
, ++f2
) {
376 while ((*f1
== ' ') && (f1
!= l1
)) ++f1
;
377 while ((*f2
== ' ') && (f2
!= l2
)) ++f2
;
378 if (*f1
!= *f2
) return (*f1
> *f2
) ? 1 : -1;
380 return (int)((l1
- f1
) - (l2
- f2
));
384 Check type equivalence in a name list like <name1>|<name2>|...
385 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
388 SWIG_TypeCmp(const char *nb
, const char *tb
) {
390 const char* te
= tb
+ strlen(tb
);
392 while (equiv
!= 0 && *ne
) {
393 for (nb
= ne
; *ne
; ++ne
) {
394 if (*ne
== '|') break;
396 equiv
= SWIG_TypeNameComp(nb
, ne
, tb
, te
);
403 Check type equivalence in a name list like <name1>|<name2>|...
404 Return 0 if not equal, 1 if equal
407 SWIG_TypeEquiv(const char *nb
, const char *tb
) {
408 return SWIG_TypeCmp(nb
, tb
) == 0 ? 1 : 0;
414 SWIGRUNTIME swig_cast_info
*
415 SWIG_TypeCheck(const char *c
, swig_type_info
*ty
) {
417 swig_cast_info
*iter
= ty
->cast
;
419 if (strcmp(iter
->type
->name
, c
) == 0) {
420 if (iter
== ty
->cast
)
422 /* Move iter to the top of the linked list */
423 iter
->prev
->next
= iter
->next
;
425 iter
->next
->prev
= iter
->prev
;
426 iter
->next
= ty
->cast
;
428 if (ty
->cast
) ty
->cast
->prev
= iter
;
439 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
441 SWIGRUNTIME swig_cast_info
*
442 SWIG_TypeCheckStruct(swig_type_info
*from
, swig_type_info
*ty
) {
444 swig_cast_info
*iter
= ty
->cast
;
446 if (iter
->type
== from
) {
447 if (iter
== ty
->cast
)
449 /* Move iter to the top of the linked list */
450 iter
->prev
->next
= iter
->next
;
452 iter
->next
->prev
= iter
->prev
;
453 iter
->next
= ty
->cast
;
455 if (ty
->cast
) ty
->cast
->prev
= iter
;
466 Cast a pointer up an inheritance hierarchy
468 SWIGRUNTIMEINLINE
void *
469 SWIG_TypeCast(swig_cast_info
*ty
, void *ptr
, int *newmemory
) {
470 return ((!ty
) || (!ty
->converter
)) ? ptr
: (*ty
->converter
)(ptr
, newmemory
);
474 Dynamic pointer casting. Down an inheritance hierarchy
476 SWIGRUNTIME swig_type_info
*
477 SWIG_TypeDynamicCast(swig_type_info
*ty
, void **ptr
) {
478 swig_type_info
*lastty
= ty
;
479 if (!ty
|| !ty
->dcast
) return ty
;
480 while (ty
&& (ty
->dcast
)) {
481 ty
= (*ty
->dcast
)(ptr
);
488 Return the name associated with this type
490 SWIGRUNTIMEINLINE
const char *
491 SWIG_TypeName(const swig_type_info
*ty
) {
496 Return the pretty name associated with this type,
497 that is an unmangled type name in a form presentable to the user.
499 SWIGRUNTIME
const char *
500 SWIG_TypePrettyName(const swig_type_info
*type
) {
501 /* The "str" field contains the equivalent pretty names of the
502 type, separated by vertical-bar characters. We choose
503 to print the last name, as it is often (?) the most
505 if (!type
) return NULL
;
506 if (type
->str
!= NULL
) {
507 const char *last_name
= type
->str
;
509 for (s
= type
->str
; *s
; s
++)
510 if (*s
== '|') last_name
= s
+1;
518 Set the clientdata field for a type
521 SWIG_TypeClientData(swig_type_info
*ti
, void *clientdata
) {
522 swig_cast_info
*cast
= ti
->cast
;
523 /* if (ti->clientdata == clientdata) return; */
524 ti
->clientdata
= clientdata
;
527 if (!cast
->converter
) {
528 swig_type_info
*tc
= cast
->type
;
529 if (!tc
->clientdata
) {
530 SWIG_TypeClientData(tc
, clientdata
);
537 SWIG_TypeNewClientData(swig_type_info
*ti
, void *clientdata
) {
538 SWIG_TypeClientData(ti
, clientdata
);
543 Search for a swig_type_info structure only by mangled name
544 Search is a O(log #types)
546 We start searching at module start, and finish searching when start == end.
547 Note: if start == end at the beginning of the function, we go all the way around
550 SWIGRUNTIME swig_type_info
*
551 SWIG_MangledTypeQueryModule(swig_module_info
*start
,
552 swig_module_info
*end
,
554 swig_module_info
*iter
= start
;
557 register size_t l
= 0;
558 register size_t r
= iter
->size
- 1;
560 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
561 register size_t i
= (l
+ r
) >> 1;
562 const char *iname
= iter
->types
[i
]->name
;
564 register int compare
= strcmp(name
, iname
);
566 return iter
->types
[i
];
567 } else if (compare
< 0) {
573 } else if (compare
> 0) {
577 break; /* should never happen */
582 } while (iter
!= end
);
587 Search for a swig_type_info structure for either a mangled name or a human readable name.
588 It first searches the mangled names of the types, which is a O(log #types)
589 If a type is not found it then searches the human readable names, which is O(#types).
591 We start searching at module start, and finish searching when start == end.
592 Note: if start == end at the beginning of the function, we go all the way around
595 SWIGRUNTIME swig_type_info
*
596 SWIG_TypeQueryModule(swig_module_info
*start
,
597 swig_module_info
*end
,
599 /* STEP 1: Search the name field using binary search */
600 swig_type_info
*ret
= SWIG_MangledTypeQueryModule(start
, end
, name
);
604 /* STEP 2: If the type hasn't been found, do a complete search
605 of the str field (the human readable name) */
606 swig_module_info
*iter
= start
;
608 register size_t i
= 0;
609 for (; i
< iter
->size
; ++i
) {
610 if (iter
->types
[i
]->str
&& (SWIG_TypeEquiv(iter
->types
[i
]->str
, name
)))
611 return iter
->types
[i
];
614 } while (iter
!= end
);
617 /* neither found a match */
622 Pack binary data into a string
625 SWIG_PackData(char *c
, void *ptr
, size_t sz
) {
626 static const char hex
[17] = "0123456789abcdef";
627 register const unsigned char *u
= (unsigned char *) ptr
;
628 register const unsigned char *eu
= u
+ sz
;
629 for (; u
!= eu
; ++u
) {
630 register unsigned char uu
= *u
;
631 *(c
++) = hex
[(uu
& 0xf0) >> 4];
632 *(c
++) = hex
[uu
& 0xf];
638 Unpack binary data from a string
640 SWIGRUNTIME
const char *
641 SWIG_UnpackData(const char *c
, void *ptr
, size_t sz
) {
642 register unsigned char *u
= (unsigned char *) ptr
;
643 register const unsigned char *eu
= u
+ sz
;
644 for (; u
!= eu
; ++u
) {
645 register char d
= *(c
++);
646 register unsigned char uu
;
647 if ((d
>= '0') && (d
<= '9'))
648 uu
= ((d
- '0') << 4);
649 else if ((d
>= 'a') && (d
<= 'f'))
650 uu
= ((d
- ('a'-10)) << 4);
654 if ((d
>= '0') && (d
<= '9'))
656 else if ((d
>= 'a') && (d
<= 'f'))
657 uu
|= (d
- ('a'-10));
666 Pack 'void *' into a string buffer.
669 SWIG_PackVoidPtr(char *buff
, void *ptr
, const char *name
, size_t bsz
) {
671 if ((2*sizeof(void *) + 2) > bsz
) return 0;
673 r
= SWIG_PackData(r
,&ptr
,sizeof(void *));
674 if (strlen(name
) + 1 > (bsz
- (r
- buff
))) return 0;
679 SWIGRUNTIME
const char *
680 SWIG_UnpackVoidPtr(const char *c
, void **ptr
, const char *name
) {
682 if (strcmp(c
,"NULL") == 0) {
689 return SWIG_UnpackData(++c
,ptr
,sizeof(void *));
693 SWIG_PackDataName(char *buff
, void *ptr
, size_t sz
, const char *name
, size_t bsz
) {
695 size_t lname
= (name
? strlen(name
) : 0);
696 if ((2*sz
+ 2 + lname
) > bsz
) return 0;
698 r
= SWIG_PackData(r
,ptr
,sz
);
700 strncpy(r
,name
,lname
+1);
707 SWIGRUNTIME
const char *
708 SWIG_UnpackDataName(const char *c
, void *ptr
, size_t sz
, const char *name
) {
710 if (strcmp(c
,"NULL") == 0) {
717 return SWIG_UnpackData(++c
,ptr
,sz
);
725 #define SWIG_UnknownError -1
726 #define SWIG_IOError -2
727 #define SWIG_RuntimeError -3
728 #define SWIG_IndexError -4
729 #define SWIG_TypeError -5
730 #define SWIG_DivisionByZero -6
731 #define SWIG_OverflowError -7
732 #define SWIG_SyntaxError -8
733 #define SWIG_ValueError -9
734 #define SWIG_SystemError -10
735 #define SWIG_AttributeError -11
736 #define SWIG_MemoryError -12
737 #define SWIG_NullReferenceError -13
741 /* Compatibility macros for Python 3 */
742 #if PY_VERSION_HEX >= 0x03000000
744 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
745 #define PyInt_Check(x) PyLong_Check(x)
746 #define PyInt_AsLong(x) PyLong_AsLong(x)
747 #define PyInt_FromLong(x) PyLong_FromLong(x)
748 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
749 #define PyString_Check(name) PyBytes_Check(name)
750 #define PyString_FromString(x) PyUnicode_FromString(x)
751 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
752 #define PyString_AsString(str) PyBytes_AsString(str)
753 #define PyString_Size(str) PyBytes_Size(str)
754 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
755 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
756 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
757 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
762 # define Py_TYPE(op) ((op)->ob_type)
765 /* SWIG APIs for compatibility of both Python 2 & 3 */
767 #if PY_VERSION_HEX >= 0x03000000
768 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
770 # define SWIG_Python_str_FromFormat PyString_FromFormat
774 /* Warning: This function will allocate a new string in Python 3,
775 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
778 SWIG_Python_str_AsChar(PyObject
*str
)
780 #if PY_VERSION_HEX >= 0x03000000
784 str
= PyUnicode_AsUTF8String(str
);
785 PyBytes_AsStringAndSize(str
, &cstr
, &len
);
786 newstr
= (char *) malloc(len
+1);
787 memcpy(newstr
, cstr
, len
+1);
791 return PyString_AsString(str
);
795 #if PY_VERSION_HEX >= 0x03000000
796 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
798 # define SWIG_Python_str_DelForPy3(x)
803 SWIG_Python_str_FromChar(const char *c
)
805 #if PY_VERSION_HEX >= 0x03000000
806 return PyUnicode_FromString(c
);
808 return PyString_FromString(c
);
812 /* Add PyOS_snprintf for old Pythons */
813 #if PY_VERSION_HEX < 0x02020000
814 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
815 # define PyOS_snprintf _snprintf
817 # define PyOS_snprintf snprintf
821 /* A crude PyString_FromFormat implementation for old Pythons */
822 #if PY_VERSION_HEX < 0x02020000
824 #ifndef SWIG_PYBUFFER_SIZE
825 # define SWIG_PYBUFFER_SIZE 1024
829 PyString_FromFormat(const char *fmt
, ...) {
831 char buf
[SWIG_PYBUFFER_SIZE
* 2];
834 res
= vsnprintf(buf
, sizeof(buf
), fmt
, ap
);
836 return (res
< 0 || res
>= (int)sizeof(buf
)) ? 0 : PyString_FromString(buf
);
840 /* Add PyObject_Del for old Pythons */
841 #if PY_VERSION_HEX < 0x01060000
842 # define PyObject_Del(op) PyMem_DEL((op))
845 # define PyObject_DEL PyObject_Del
848 /* A crude PyExc_StopIteration exception for old Pythons */
849 #if PY_VERSION_HEX < 0x02020000
850 # ifndef PyExc_StopIteration
851 # define PyExc_StopIteration PyExc_RuntimeError
853 # ifndef PyObject_GenericGetAttr
854 # define PyObject_GenericGetAttr 0
858 /* Py_NotImplemented is defined in 2.1 and up. */
859 #if PY_VERSION_HEX < 0x02010000
860 # ifndef Py_NotImplemented
861 # define Py_NotImplemented PyExc_RuntimeError
865 /* A crude PyString_AsStringAndSize implementation for old Pythons */
866 #if PY_VERSION_HEX < 0x02010000
867 # ifndef PyString_AsStringAndSize
868 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
872 /* PySequence_Size for old Pythons */
873 #if PY_VERSION_HEX < 0x02000000
874 # ifndef PySequence_Size
875 # define PySequence_Size PySequence_Length
879 /* PyBool_FromLong for old Pythons */
880 #if PY_VERSION_HEX < 0x02030000
882 PyObject
*PyBool_FromLong(long ok
)
884 PyObject
*result
= ok
? Py_True
: Py_False
;
890 /* Py_ssize_t for old Pythons */
891 /* This code is as recommended by: */
892 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
893 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
894 typedef int Py_ssize_t
;
895 # define PY_SSIZE_T_MAX INT_MAX
896 # define PY_SSIZE_T_MIN INT_MIN
897 typedef inquiry lenfunc
;
898 typedef intargfunc ssizeargfunc
;
899 typedef intintargfunc ssizessizeargfunc
;
900 typedef intobjargproc ssizeobjargproc
;
901 typedef intintobjargproc ssizessizeobjargproc
;
902 typedef getreadbufferproc readbufferproc
;
903 typedef getwritebufferproc writebufferproc
;
904 typedef getsegcountproc segcountproc
;
905 typedef getcharbufferproc charbufferproc
;
906 static long PyNumber_AsSsize_t (PyObject
*x
, void *SWIGUNUSEDPARM(exc
))
909 PyObject
*i
= PyNumber_Int(x
);
911 result
= PyInt_AsLong(i
);
918 #if PY_VERSION_HEX < 0x02050000
919 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
922 #if PY_VERSION_HEX < 0x02040000
923 #define Py_VISIT(op) \
926 int vret = visit((op), arg); \
933 #if PY_VERSION_HEX < 0x02030000
936 PyNumberMethods as_number
;
937 PyMappingMethods as_mapping
;
938 PySequenceMethods as_sequence
;
939 PyBufferProcs as_buffer
;
940 PyObject
*name
, *slots
;
944 #if PY_VERSION_HEX < 0x02030000
945 typedef destructor freefunc
;
948 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
949 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
950 (PY_MAJOR_VERSION > 3))
951 # define SWIGPY_USE_CAPSULE
952 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
955 #if PY_VERSION_HEX < 0x03020000
956 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
957 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
960 /* -----------------------------------------------------------------------------
962 * ----------------------------------------------------------------------------- */
964 SWIGRUNTIME PyObject
*
965 SWIG_Python_ErrorType(int code
) {
968 case SWIG_MemoryError
:
969 type
= PyExc_MemoryError
;
972 type
= PyExc_IOError
;
974 case SWIG_RuntimeError
:
975 type
= PyExc_RuntimeError
;
977 case SWIG_IndexError
:
978 type
= PyExc_IndexError
;
981 type
= PyExc_TypeError
;
983 case SWIG_DivisionByZero
:
984 type
= PyExc_ZeroDivisionError
;
986 case SWIG_OverflowError
:
987 type
= PyExc_OverflowError
;
989 case SWIG_SyntaxError
:
990 type
= PyExc_SyntaxError
;
992 case SWIG_ValueError
:
993 type
= PyExc_ValueError
;
995 case SWIG_SystemError
:
996 type
= PyExc_SystemError
;
998 case SWIG_AttributeError
:
999 type
= PyExc_AttributeError
;
1002 type
= PyExc_RuntimeError
;
1009 SWIG_Python_AddErrorMsg(const char* mesg
)
1012 PyObject
*value
= 0;
1013 PyObject
*traceback
= 0;
1015 if (PyErr_Occurred()) PyErr_Fetch(&type
, &value
, &traceback
);
1018 PyObject
*old_str
= PyObject_Str(value
);
1022 PyErr_Format(type
, "%s %s", tmp
= SWIG_Python_str_AsChar(old_str
), mesg
);
1023 SWIG_Python_str_DelForPy3(tmp
);
1027 PyErr_SetString(PyExc_RuntimeError
, mesg
);
1031 #if defined(SWIG_PYTHON_NO_THREADS)
1032 # if defined(SWIG_PYTHON_THREADS)
1033 # undef SWIG_PYTHON_THREADS
1036 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1037 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1038 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1039 # define SWIG_PYTHON_USE_GIL
1042 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1043 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1044 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1046 # ifdef __cplusplus /* C++ code */
1047 class SWIG_Python_Thread_Block
{
1049 PyGILState_STATE state
;
1051 void end() { if (status
) { PyGILState_Release(state
); status
= false;} }
1052 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1053 ~SWIG_Python_Thread_Block() { end(); }
1055 class SWIG_Python_Thread_Allow
{
1057 PyThreadState
*save
;
1059 void end() { if (status
) { PyEval_RestoreThread(save
); status
= false; }}
1060 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1061 ~SWIG_Python_Thread_Allow() { end(); }
1063 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1064 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1065 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1066 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1068 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1069 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1070 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1071 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1073 # else /* Old thread way, not implemented, user must provide it */
1074 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1075 # define SWIG_PYTHON_INITIALIZE_THREADS
1077 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1078 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1080 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1081 # define SWIG_PYTHON_THREAD_END_BLOCK
1083 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1084 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1086 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1087 # define SWIG_PYTHON_THREAD_END_ALLOW
1090 #else /* No thread support */
1091 # define SWIG_PYTHON_INITIALIZE_THREADS
1092 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1093 # define SWIG_PYTHON_THREAD_END_BLOCK
1094 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1095 # define SWIG_PYTHON_THREAD_END_ALLOW
1098 /* -----------------------------------------------------------------------------
1099 * Python API portion that goes into the runtime
1100 * ----------------------------------------------------------------------------- */
1106 /* -----------------------------------------------------------------------------
1107 * Constant declarations
1108 * ----------------------------------------------------------------------------- */
1110 /* Constant Types */
1111 #define SWIG_PY_POINTER 4
1112 #define SWIG_PY_BINARY 5
1114 /* Constant information structure */
1115 typedef struct swig_const_info
{
1121 swig_type_info
**ptype
;
1125 /* -----------------------------------------------------------------------------
1126 * Wrapper of PyInstanceMethod_New() used in Python 3
1127 * It is exported to the generated module, used for -fastproxy
1128 * ----------------------------------------------------------------------------- */
1129 #if PY_VERSION_HEX >= 0x03000000
1130 SWIGRUNTIME PyObject
* SWIG_PyInstanceMethod_New(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*func
)
1132 return PyInstanceMethod_New(func
);
1135 SWIGRUNTIME PyObject
* SWIG_PyInstanceMethod_New(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*SWIGUNUSEDPARM(func
))
1146 /* -----------------------------------------------------------------------------
1149 * This file contains the runtime support for Python modules
1150 * and includes code for managing global variables and pointer
1153 * ----------------------------------------------------------------------------- */
1155 /* Common SWIG API */
1157 /* for raw pointers */
1158 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1159 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1160 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1162 #ifdef SWIGPYTHON_BUILTIN
1163 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1165 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1168 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1170 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1171 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1172 #define swig_owntype int
1174 /* for raw packed data */
1175 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1176 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1178 /* for class or struct pointers */
1179 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1180 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1182 /* for C or C++ function pointers */
1183 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1184 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1186 /* for C++ member pointers, ie, member methods */
1187 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1188 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1193 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1194 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1195 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1197 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1198 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1199 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1200 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1201 #define SWIG_fail goto fail
1204 /* Runtime API implementation */
1206 /* Error manipulation */
1209 SWIG_Python_SetErrorObj(PyObject
*errtype
, PyObject
*obj
) {
1210 SWIG_PYTHON_THREAD_BEGIN_BLOCK
;
1211 PyErr_SetObject(errtype
, obj
);
1213 SWIG_PYTHON_THREAD_END_BLOCK
;
1217 SWIG_Python_SetErrorMsg(PyObject
*errtype
, const char *msg
) {
1218 SWIG_PYTHON_THREAD_BEGIN_BLOCK
;
1219 PyErr_SetString(errtype
, msg
);
1220 SWIG_PYTHON_THREAD_END_BLOCK
;
1223 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1225 /* Set a constant value */
1227 #if defined(SWIGPYTHON_BUILTIN)
1230 SwigPyBuiltin_AddPublicSymbol(PyObject
*seq
, const char *key
) {
1231 PyObject
*s
= PyString_InternFromString(key
);
1232 PyList_Append(seq
, s
);
1237 SWIG_Python_SetConstant(PyObject
*d
, PyObject
*public_interface
, const char *name
, PyObject
*obj
) {
1238 #if PY_VERSION_HEX < 0x02030000
1239 PyDict_SetItemString(d
, (char *)name
, obj
);
1241 PyDict_SetItemString(d
, name
, obj
);
1244 if (public_interface
)
1245 SwigPyBuiltin_AddPublicSymbol(public_interface
, name
);
1251 SWIG_Python_SetConstant(PyObject
*d
, const char *name
, PyObject
*obj
) {
1252 #if PY_VERSION_HEX < 0x02030000
1253 PyDict_SetItemString(d
, (char *)name
, obj
);
1255 PyDict_SetItemString(d
, name
, obj
);
1262 /* Append a value to the result obj */
1264 SWIGINTERN PyObject
*
1265 SWIG_Python_AppendOutput(PyObject
* result
, PyObject
* obj
) {
1266 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1269 } else if (result
== Py_None
) {
1273 if (!PyList_Check(result
)) {
1274 PyObject
*o2
= result
;
1275 result
= PyList_New(1);
1276 PyList_SetItem(result
, 0, o2
);
1278 PyList_Append(result
,obj
);
1287 } else if (result
== Py_None
) {
1291 if (!PyTuple_Check(result
)) {
1293 result
= PyTuple_New(1);
1294 PyTuple_SET_ITEM(result
, 0, o2
);
1296 o3
= PyTuple_New(1);
1297 PyTuple_SET_ITEM(o3
, 0, obj
);
1299 result
= PySequence_Concat(o2
, o3
);
1307 /* Unpack the argument tuple */
1310 SWIG_Python_UnpackTuple(PyObject
*args
, const char *name
, Py_ssize_t min
, Py_ssize_t max
, PyObject
**objs
)
1316 PyErr_Format(PyExc_TypeError
, "%s expected %s%d arguments, got none",
1317 name
, (min
== max
? "" : "at least "), (int)min
);
1321 if (!PyTuple_Check(args
)) {
1322 if (min
<= 1 && max
>= 1) {
1325 for (i
= 1; i
< max
; ++i
) {
1330 PyErr_SetString(PyExc_SystemError
, "UnpackTuple() argument list is not a tuple");
1333 register Py_ssize_t l
= PyTuple_GET_SIZE(args
);
1335 PyErr_Format(PyExc_TypeError
, "%s expected %s%d arguments, got %d",
1336 name
, (min
== max
? "" : "at least "), (int)min
, (int)l
);
1338 } else if (l
> max
) {
1339 PyErr_Format(PyExc_TypeError
, "%s expected %s%d arguments, got %d",
1340 name
, (min
== max
? "" : "at most "), (int)max
, (int)l
);
1344 for (i
= 0; i
< l
; ++i
) {
1345 objs
[i
] = PyTuple_GET_ITEM(args
, i
);
1347 for (; l
< max
; ++l
) {
1355 /* A functor is a function object with one single object argument */
1356 #if PY_VERSION_HEX >= 0x02020000
1357 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1359 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1363 Helper for static pointer initialization for both C and C++ code, for example
1364 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1367 #define SWIG_STATIC_POINTER(var) var
1369 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1372 /* -----------------------------------------------------------------------------
1373 * Pointer declarations
1374 * ----------------------------------------------------------------------------- */
1376 /* Flags for new pointer objects */
1377 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1378 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1380 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1382 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1383 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1389 /* How to access Py_None */
1390 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1391 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1392 # ifndef SWIG_PYTHON_BUILD_NONE
1393 # define SWIG_PYTHON_BUILD_NONE
1398 #ifdef SWIG_PYTHON_BUILD_NONE
1401 # define Py_None SWIG_Py_None()
1403 SWIGRUNTIMEINLINE PyObject
*
1406 PyObject
*none
= Py_BuildValue((char*)"");
1410 SWIGRUNTIME PyObject
*
1413 static PyObject
*SWIG_STATIC_POINTER(none
) = _SWIG_Py_None();
1418 /* The python void return value */
1420 SWIGRUNTIMEINLINE PyObject
*
1423 PyObject
*none
= Py_None
;
1428 /* SwigPyClientData */
1437 PyTypeObject
*pytype
;
1440 SWIGRUNTIMEINLINE
int
1441 SWIG_Python_CheckImplicit(swig_type_info
*ty
)
1443 SwigPyClientData
*data
= (SwigPyClientData
*)ty
->clientdata
;
1444 return data
? data
->implicitconv
: 0;
1447 SWIGRUNTIMEINLINE PyObject
*
1448 SWIG_Python_ExceptionType(swig_type_info
*desc
) {
1449 SwigPyClientData
*data
= desc
? (SwigPyClientData
*) desc
->clientdata
: 0;
1450 PyObject
*klass
= data
? data
->klass
: 0;
1451 return (klass
? klass
: PyExc_RuntimeError
);
1455 SWIGRUNTIME SwigPyClientData
*
1456 SwigPyClientData_New(PyObject
* obj
)
1461 SwigPyClientData
*data
= (SwigPyClientData
*)malloc(sizeof(SwigPyClientData
));
1462 /* the klass element */
1464 Py_INCREF(data
->klass
);
1465 /* the newraw method and newargs arguments used to create a new raw instance */
1466 if (PyClass_Check(obj
)) {
1468 data
->newargs
= obj
;
1471 #if (PY_VERSION_HEX < 0x02020000)
1474 data
->newraw
= PyObject_GetAttrString(data
->klass
, (char *)"__new__");
1477 Py_INCREF(data
->newraw
);
1478 data
->newargs
= PyTuple_New(1);
1479 PyTuple_SetItem(data
->newargs
, 0, obj
);
1481 data
->newargs
= obj
;
1483 Py_INCREF(data
->newargs
);
1485 /* the destroy method, aka as the C++ delete method */
1486 data
->destroy
= PyObject_GetAttrString(data
->klass
, (char *)"__swig_destroy__");
1487 if (PyErr_Occurred()) {
1491 if (data
->destroy
) {
1493 Py_INCREF(data
->destroy
);
1494 flags
= PyCFunction_GET_FLAGS(data
->destroy
);
1496 data
->delargs
= !(flags
& (METH_O
));
1503 data
->implicitconv
= 0;
1510 SwigPyClientData_Del(SwigPyClientData
*data
) {
1511 Py_XDECREF(data
->newraw
);
1512 Py_XDECREF(data
->newargs
);
1513 Py_XDECREF(data
->destroy
);
1516 /* =============== SwigPyObject =====================*/
1524 #ifdef SWIGPYTHON_BUILTIN
1529 SWIGRUNTIME PyObject
*
1530 SwigPyObject_long(SwigPyObject
*v
)
1532 return PyLong_FromVoidPtr(v
->ptr
);
1535 SWIGRUNTIME PyObject
*
1536 SwigPyObject_format(const char* fmt
, SwigPyObject
*v
)
1538 PyObject
*res
= NULL
;
1539 PyObject
*args
= PyTuple_New(1);
1541 if (PyTuple_SetItem(args
, 0, SwigPyObject_long(v
)) == 0) {
1542 PyObject
*ofmt
= SWIG_Python_str_FromChar(fmt
);
1544 #if PY_VERSION_HEX >= 0x03000000
1545 res
= PyUnicode_Format(ofmt
,args
);
1547 res
= PyString_Format(ofmt
,args
);
1557 SWIGRUNTIME PyObject
*
1558 SwigPyObject_oct(SwigPyObject
*v
)
1560 return SwigPyObject_format("%o",v
);
1563 SWIGRUNTIME PyObject
*
1564 SwigPyObject_hex(SwigPyObject
*v
)
1566 return SwigPyObject_format("%x",v
);
1569 SWIGRUNTIME PyObject
*
1571 SwigPyObject_repr(SwigPyObject
*v
)
1573 SwigPyObject_repr(SwigPyObject
*v
, PyObject
*args
)
1576 const char *name
= SWIG_TypePrettyName(v
->ty
);
1577 PyObject
*repr
= SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name
? name
: "unknown"), (void *)v
);
1580 PyObject
*nrep
= SwigPyObject_repr((SwigPyObject
*)v
->next
);
1582 PyObject
*nrep
= SwigPyObject_repr((SwigPyObject
*)v
->next
, args
);
1584 # if PY_VERSION_HEX >= 0x03000000
1585 PyObject
*joined
= PyUnicode_Concat(repr
, nrep
);
1590 PyString_ConcatAndDel(&repr
,nrep
);
1597 SwigPyObject_print(SwigPyObject
*v
, FILE *fp
, int SWIGUNUSEDPARM(flags
))
1601 PyObject
*repr
= SwigPyObject_repr(v
);
1603 PyObject
*repr
= SwigPyObject_repr(v
, NULL
);
1606 str
= SWIG_Python_str_AsChar(repr
);
1608 SWIG_Python_str_DelForPy3(str
);
1616 SWIGRUNTIME PyObject
*
1617 SwigPyObject_str(SwigPyObject
*v
)
1619 char result
[SWIG_BUFFER_SIZE
];
1620 return SWIG_PackVoidPtr(result
, v
->ptr
, v
->ty
->name
, sizeof(result
)) ?
1621 SWIG_Python_str_FromChar(result
) : 0;
1625 SwigPyObject_compare(SwigPyObject
*v
, SwigPyObject
*w
)
1629 return (i
< j
) ? -1 : ((i
> j
) ? 1 : 0);
1632 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1633 SWIGRUNTIME PyObject
*
1634 SwigPyObject_richcompare(SwigPyObject
*v
, SwigPyObject
*w
, int op
)
1637 if( op
!= Py_EQ
&& op
!= Py_NE
) {
1638 Py_INCREF(Py_NotImplemented
);
1639 return Py_NotImplemented
;
1641 res
= PyBool_FromLong( (SwigPyObject_compare(v
, w
)==0) == (op
== Py_EQ
) ? 1 : 0);
1646 SWIGRUNTIME PyTypeObject
* SwigPyObject_TypeOnce(void);
1648 #ifdef SWIGPYTHON_BUILTIN
1649 static swig_type_info
*SwigPyObject_stype
= 0;
1650 SWIGRUNTIME PyTypeObject
*
1651 SwigPyObject_type(void) {
1652 SwigPyClientData
*cd
;
1653 assert(SwigPyObject_stype
);
1654 cd
= (SwigPyClientData
*) SwigPyObject_stype
->clientdata
;
1660 SWIGRUNTIME PyTypeObject
*
1661 SwigPyObject_type(void) {
1662 static PyTypeObject
*SWIG_STATIC_POINTER(type
) = SwigPyObject_TypeOnce();
1667 SWIGRUNTIMEINLINE
int
1668 SwigPyObject_Check(PyObject
*op
) {
1669 #ifdef SWIGPYTHON_BUILTIN
1670 PyTypeObject
*target_tp
= SwigPyObject_type();
1671 if (PyType_IsSubtype(op
->ob_type
, target_tp
))
1673 return (strcmp(op
->ob_type
->tp_name
, "SwigPyObject") == 0);
1675 return (Py_TYPE(op
) == SwigPyObject_type())
1676 || (strcmp(Py_TYPE(op
)->tp_name
,"SwigPyObject") == 0);
1680 SWIGRUNTIME PyObject
*
1681 SwigPyObject_New(void *ptr
, swig_type_info
*ty
, int own
);
1684 SwigPyObject_dealloc(PyObject
*v
)
1686 SwigPyObject
*sobj
= (SwigPyObject
*) v
;
1687 PyObject
*next
= sobj
->next
;
1688 if (sobj
->own
== SWIG_POINTER_OWN
) {
1689 swig_type_info
*ty
= sobj
->ty
;
1690 SwigPyClientData
*data
= ty
? (SwigPyClientData
*) ty
->clientdata
: 0;
1691 PyObject
*destroy
= data
? data
->destroy
: 0;
1693 /* destroy is always a VARARGS method */
1695 if (data
->delargs
) {
1696 /* we need to create a temporary object to carry the destroy operation */
1697 PyObject
*tmp
= SwigPyObject_New(sobj
->ptr
, ty
, 0);
1698 res
= SWIG_Python_CallFunctor(destroy
, tmp
);
1701 PyCFunction meth
= PyCFunction_GET_FUNCTION(destroy
);
1702 PyObject
*mself
= PyCFunction_GET_SELF(destroy
);
1703 res
= ((*meth
)(mself
, v
));
1707 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1709 const char *name
= SWIG_TypePrettyName(ty
);
1710 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name
? name
: "unknown"));
1718 SWIGRUNTIME PyObject
*
1719 SwigPyObject_append(PyObject
* v
, PyObject
* next
)
1721 SwigPyObject
*sobj
= (SwigPyObject
*) v
;
1724 if (!PyArg_ParseTuple(next
,(char *)"O:append", &tmp
)) return NULL
;
1727 if (!SwigPyObject_Check(next
)) {
1732 return SWIG_Py_Void();
1735 SWIGRUNTIME PyObject
*
1737 SwigPyObject_next(PyObject
* v
)
1739 SwigPyObject_next(PyObject
* v
, PyObject
*SWIGUNUSEDPARM(args
))
1742 SwigPyObject
*sobj
= (SwigPyObject
*) v
;
1744 Py_INCREF(sobj
->next
);
1747 return SWIG_Py_Void();
1751 SWIGINTERN PyObject
*
1753 SwigPyObject_disown(PyObject
*v
)
1755 SwigPyObject_disown(PyObject
* v
, PyObject
*SWIGUNUSEDPARM(args
))
1758 SwigPyObject
*sobj
= (SwigPyObject
*)v
;
1760 return SWIG_Py_Void();
1763 SWIGINTERN PyObject
*
1765 SwigPyObject_acquire(PyObject
*v
)
1767 SwigPyObject_acquire(PyObject
* v
, PyObject
*SWIGUNUSEDPARM(args
))
1770 SwigPyObject
*sobj
= (SwigPyObject
*)v
;
1771 sobj
->own
= SWIG_POINTER_OWN
;
1772 return SWIG_Py_Void();
1775 SWIGINTERN PyObject
*
1776 SwigPyObject_own(PyObject
*v
, PyObject
*args
)
1779 #if (PY_VERSION_HEX < 0x02020000)
1780 if (!PyArg_ParseTuple(args
,(char *)"|O:own",&val
))
1781 #elif (PY_VERSION_HEX < 0x02050000)
1782 if (!PyArg_UnpackTuple(args
, (char *)"own", 0, 1, &val
))
1784 if (!PyArg_UnpackTuple(args
, "own", 0, 1, &val
))
1791 SwigPyObject
*sobj
= (SwigPyObject
*)v
;
1792 PyObject
*obj
= PyBool_FromLong(sobj
->own
);
1795 if (PyObject_IsTrue(val
)) {
1796 SwigPyObject_acquire(v
);
1798 SwigPyObject_disown(v
);
1801 if (PyObject_IsTrue(val
)) {
1802 SwigPyObject_acquire(v
,args
);
1804 SwigPyObject_disown(v
,args
);
1814 swigobject_methods
[] = {
1815 {(char *)"disown", (PyCFunction
)SwigPyObject_disown
, METH_NOARGS
, (char *)"releases ownership of the pointer"},
1816 {(char *)"acquire", (PyCFunction
)SwigPyObject_acquire
, METH_NOARGS
, (char *)"acquires ownership of the pointer"},
1817 {(char *)"own", (PyCFunction
)SwigPyObject_own
, METH_VARARGS
, (char *)"returns/sets ownership of the pointer"},
1818 {(char *)"append", (PyCFunction
)SwigPyObject_append
, METH_O
, (char *)"appends another 'this' object"},
1819 {(char *)"next", (PyCFunction
)SwigPyObject_next
, METH_NOARGS
, (char *)"returns the next 'this' object"},
1820 {(char *)"__repr__",(PyCFunction
)SwigPyObject_repr
, METH_NOARGS
, (char *)"returns object representation"},
1825 swigobject_methods
[] = {
1826 {(char *)"disown", (PyCFunction
)SwigPyObject_disown
, METH_VARARGS
, (char *)"releases ownership of the pointer"},
1827 {(char *)"acquire", (PyCFunction
)SwigPyObject_acquire
, METH_VARARGS
, (char *)"aquires ownership of the pointer"},
1828 {(char *)"own", (PyCFunction
)SwigPyObject_own
, METH_VARARGS
, (char *)"returns/sets ownership of the pointer"},
1829 {(char *)"append", (PyCFunction
)SwigPyObject_append
, METH_VARARGS
, (char *)"appends another 'this' object"},
1830 {(char *)"next", (PyCFunction
)SwigPyObject_next
, METH_VARARGS
, (char *)"returns the next 'this' object"},
1831 {(char *)"__repr__",(PyCFunction
)SwigPyObject_repr
, METH_VARARGS
, (char *)"returns object representation"},
1836 #if PY_VERSION_HEX < 0x02020000
1837 SWIGINTERN PyObject
*
1838 SwigPyObject_getattr(SwigPyObject
*sobj
,char *name
)
1840 return Py_FindMethod(swigobject_methods
, (PyObject
*)sobj
, name
);
1844 SWIGRUNTIME PyTypeObject
*
1845 SwigPyObject_TypeOnce(void) {
1846 static char swigobject_doc
[] = "Swig object carries a C/C++ instance pointer";
1848 static PyNumberMethods SwigPyObject_as_number
= {
1849 (binaryfunc
)0, /*nb_add*/
1850 (binaryfunc
)0, /*nb_subtract*/
1851 (binaryfunc
)0, /*nb_multiply*/
1852 /* nb_divide removed in Python 3 */
1853 #if PY_VERSION_HEX < 0x03000000
1854 (binaryfunc
)0, /*nb_divide*/
1856 (binaryfunc
)0, /*nb_remainder*/
1857 (binaryfunc
)0, /*nb_divmod*/
1858 (ternaryfunc
)0,/*nb_power*/
1859 (unaryfunc
)0, /*nb_negative*/
1860 (unaryfunc
)0, /*nb_positive*/
1861 (unaryfunc
)0, /*nb_absolute*/
1862 (inquiry
)0, /*nb_nonzero*/
1869 #if PY_VERSION_HEX < 0x03000000
1872 (unaryfunc
)SwigPyObject_long
, /*nb_int*/
1873 #if PY_VERSION_HEX < 0x03000000
1874 (unaryfunc
)SwigPyObject_long
, /*nb_long*/
1878 (unaryfunc
)0, /*nb_float*/
1879 #if PY_VERSION_HEX < 0x03000000
1880 (unaryfunc
)SwigPyObject_oct
, /*nb_oct*/
1881 (unaryfunc
)SwigPyObject_hex
, /*nb_hex*/
1883 #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1884 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1885 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1886 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1887 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1888 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1889 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1890 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1894 static PyTypeObject swigpyobject_type
;
1895 static int type_init
= 0;
1897 const PyTypeObject tmp
= {
1898 /* PyObject header changed in Python 3 */
1899 #if PY_VERSION_HEX >= 0x03000000
1900 PyVarObject_HEAD_INIT(NULL
, 0)
1902 PyObject_HEAD_INIT(NULL
)
1905 (char *)"SwigPyObject", /* tp_name */
1906 sizeof(SwigPyObject
), /* tp_basicsize */
1907 0, /* tp_itemsize */
1908 (destructor
)SwigPyObject_dealloc
, /* tp_dealloc */
1909 (printfunc
)SwigPyObject_print
, /* tp_print */
1910 #if PY_VERSION_HEX < 0x02020000
1911 (getattrfunc
)SwigPyObject_getattr
, /* tp_getattr */
1913 (getattrfunc
)0, /* tp_getattr */
1915 (setattrfunc
)0, /* tp_setattr */
1916 #if PY_VERSION_HEX >= 0x03000000
1917 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1919 (cmpfunc
)SwigPyObject_compare
, /* tp_compare */
1921 (reprfunc
)SwigPyObject_repr
, /* tp_repr */
1922 &SwigPyObject_as_number
, /* tp_as_number */
1923 0, /* tp_as_sequence */
1924 0, /* tp_as_mapping */
1925 (hashfunc
)0, /* tp_hash */
1926 (ternaryfunc
)0, /* tp_call */
1927 (reprfunc
)SwigPyObject_str
, /* tp_str */
1928 PyObject_GenericGetAttr
, /* tp_getattro */
1929 0, /* tp_setattro */
1930 0, /* tp_as_buffer */
1931 Py_TPFLAGS_DEFAULT
, /* tp_flags */
1932 swigobject_doc
, /* tp_doc */
1933 0, /* tp_traverse */
1935 (richcmpfunc
)SwigPyObject_richcompare
,/* tp_richcompare */
1936 0, /* tp_weaklistoffset */
1937 #if PY_VERSION_HEX >= 0x02020000
1939 0, /* tp_iternext */
1940 swigobject_methods
, /* tp_methods */
1945 0, /* tp_descr_get */
1946 0, /* tp_descr_set */
1947 0, /* tp_dictoffset */
1956 0, /* tp_subclasses */
1957 0, /* tp_weaklist */
1959 #if PY_VERSION_HEX >= 0x02030000
1962 #if PY_VERSION_HEX >= 0x02060000
1966 0,0,0,0 /* tp_alloc -> tp_next */
1969 swigpyobject_type
= tmp
;
1971 #if PY_VERSION_HEX < 0x02020000
1972 swigpyobject_type
.ob_type
= &PyType_Type
;
1974 if (PyType_Ready(&swigpyobject_type
) < 0)
1978 return &swigpyobject_type
;
1981 SWIGRUNTIME PyObject
*
1982 SwigPyObject_New(void *ptr
, swig_type_info
*ty
, int own
)
1984 SwigPyObject
*sobj
= PyObject_NEW(SwigPyObject
, SwigPyObject_type());
1991 return (PyObject
*)sobj
;
1994 /* -----------------------------------------------------------------------------
1995 * Implements a simple Swig Packed type, and use it instead of string
1996 * ----------------------------------------------------------------------------- */
2006 SwigPyPacked_print(SwigPyPacked
*v
, FILE *fp
, int SWIGUNUSEDPARM(flags
))
2008 char result
[SWIG_BUFFER_SIZE
];
2009 fputs("<Swig Packed ", fp
);
2010 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))) {
2014 fputs(v
->ty
->name
,fp
);
2019 SWIGRUNTIME PyObject
*
2020 SwigPyPacked_repr(SwigPyPacked
*v
)
2022 char result
[SWIG_BUFFER_SIZE
];
2023 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))) {
2024 return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result
, v
->ty
->name
);
2026 return SWIG_Python_str_FromFormat("<Swig Packed %s>", v
->ty
->name
);
2030 SWIGRUNTIME PyObject
*
2031 SwigPyPacked_str(SwigPyPacked
*v
)
2033 char result
[SWIG_BUFFER_SIZE
];
2034 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))){
2035 return SWIG_Python_str_FromFormat("%s%s", result
, v
->ty
->name
);
2037 return SWIG_Python_str_FromChar(v
->ty
->name
);
2042 SwigPyPacked_compare(SwigPyPacked
*v
, SwigPyPacked
*w
)
2046 int s
= (i
< j
) ? -1 : ((i
> j
) ? 1 : 0);
2047 return s
? s
: strncmp((char *)v
->pack
, (char *)w
->pack
, 2*v
->size
);
2050 SWIGRUNTIME PyTypeObject
* SwigPyPacked_TypeOnce(void);
2052 SWIGRUNTIME PyTypeObject
*
2053 SwigPyPacked_type(void) {
2054 static PyTypeObject
*SWIG_STATIC_POINTER(type
) = SwigPyPacked_TypeOnce();
2058 SWIGRUNTIMEINLINE
int
2059 SwigPyPacked_Check(PyObject
*op
) {
2060 return ((op
)->ob_type
== SwigPyPacked_TypeOnce())
2061 || (strcmp((op
)->ob_type
->tp_name
,"SwigPyPacked") == 0);
2065 SwigPyPacked_dealloc(PyObject
*v
)
2067 if (SwigPyPacked_Check(v
)) {
2068 SwigPyPacked
*sobj
= (SwigPyPacked
*) v
;
2074 SWIGRUNTIME PyTypeObject
*
2075 SwigPyPacked_TypeOnce(void) {
2076 static char swigpacked_doc
[] = "Swig object carries a C/C++ instance pointer";
2077 static PyTypeObject swigpypacked_type
;
2078 static int type_init
= 0;
2080 const PyTypeObject tmp
= {
2081 /* PyObject header changed in Python 3 */
2082 #if PY_VERSION_HEX>=0x03000000
2083 PyVarObject_HEAD_INIT(NULL
, 0)
2085 PyObject_HEAD_INIT(NULL
)
2088 (char *)"SwigPyPacked", /* tp_name */
2089 sizeof(SwigPyPacked
), /* tp_basicsize */
2090 0, /* tp_itemsize */
2091 (destructor
)SwigPyPacked_dealloc
, /* tp_dealloc */
2092 (printfunc
)SwigPyPacked_print
, /* tp_print */
2093 (getattrfunc
)0, /* tp_getattr */
2094 (setattrfunc
)0, /* tp_setattr */
2095 #if PY_VERSION_HEX>=0x03000000
2096 0, /* tp_reserved in 3.0.1 */
2098 (cmpfunc
)SwigPyPacked_compare
, /* tp_compare */
2100 (reprfunc
)SwigPyPacked_repr
, /* tp_repr */
2101 0, /* tp_as_number */
2102 0, /* tp_as_sequence */
2103 0, /* tp_as_mapping */
2104 (hashfunc
)0, /* tp_hash */
2105 (ternaryfunc
)0, /* tp_call */
2106 (reprfunc
)SwigPyPacked_str
, /* tp_str */
2107 PyObject_GenericGetAttr
, /* tp_getattro */
2108 0, /* tp_setattro */
2109 0, /* tp_as_buffer */
2110 Py_TPFLAGS_DEFAULT
, /* tp_flags */
2111 swigpacked_doc
, /* tp_doc */
2112 0, /* tp_traverse */
2114 0, /* tp_richcompare */
2115 0, /* tp_weaklistoffset */
2116 #if PY_VERSION_HEX >= 0x02020000
2118 0, /* tp_iternext */
2124 0, /* tp_descr_get */
2125 0, /* tp_descr_set */
2126 0, /* tp_dictoffset */
2135 0, /* tp_subclasses */
2136 0, /* tp_weaklist */
2138 #if PY_VERSION_HEX >= 0x02030000
2141 #if PY_VERSION_HEX >= 0x02060000
2145 0,0,0,0 /* tp_alloc -> tp_next */
2148 swigpypacked_type
= tmp
;
2150 #if PY_VERSION_HEX < 0x02020000
2151 swigpypacked_type
.ob_type
= &PyType_Type
;
2153 if (PyType_Ready(&swigpypacked_type
) < 0)
2157 return &swigpypacked_type
;
2160 SWIGRUNTIME PyObject
*
2161 SwigPyPacked_New(void *ptr
, size_t size
, swig_type_info
*ty
)
2163 SwigPyPacked
*sobj
= PyObject_NEW(SwigPyPacked
, SwigPyPacked_type());
2165 void *pack
= malloc(size
);
2167 memcpy(pack
, ptr
, size
);
2172 PyObject_DEL((PyObject
*) sobj
);
2176 return (PyObject
*) sobj
;
2179 SWIGRUNTIME swig_type_info
*
2180 SwigPyPacked_UnpackData(PyObject
*obj
, void *ptr
, size_t size
)
2182 if (SwigPyPacked_Check(obj
)) {
2183 SwigPyPacked
*sobj
= (SwigPyPacked
*)obj
;
2184 if (sobj
->size
!= size
) return 0;
2185 memcpy(ptr
, sobj
->pack
, size
);
2192 /* -----------------------------------------------------------------------------
2193 * pointers/data manipulation
2194 * ----------------------------------------------------------------------------- */
2196 SWIGRUNTIMEINLINE PyObject
*
2199 return SWIG_Python_str_FromChar("this");
2202 static PyObject
*swig_this
= NULL
;
2204 SWIGRUNTIME PyObject
*
2207 if (swig_this
== NULL
)
2208 swig_this
= _SWIG_This();
2212 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2214 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2215 #if PY_VERSION_HEX>=0x03000000
2216 #define SWIG_PYTHON_SLOW_GETSET_THIS
2219 SWIGRUNTIME SwigPyObject
*
2220 SWIG_Python_GetSwigThis(PyObject
*pyobj
)
2224 if (SwigPyObject_Check(pyobj
))
2225 return (SwigPyObject
*) pyobj
;
2227 #ifdef SWIGPYTHON_BUILTIN
2229 # ifdef PyWeakref_CheckProxy
2230 if (PyWeakref_CheckProxy(pyobj
)) {
2231 pyobj
= PyWeakref_GET_OBJECT(pyobj
);
2232 if (pyobj
&& SwigPyObject_Check(pyobj
))
2233 return (SwigPyObject
*) pyobj
;
2241 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2242 if (PyInstance_Check(pyobj
)) {
2243 obj
= _PyInstance_Lookup(pyobj
, SWIG_This());
2245 PyObject
**dictptr
= _PyObject_GetDictPtr(pyobj
);
2246 if (dictptr
!= NULL
) {
2247 PyObject
*dict
= *dictptr
;
2248 obj
= dict
? PyDict_GetItem(dict
, SWIG_This()) : 0;
2250 #ifdef PyWeakref_CheckProxy
2251 if (PyWeakref_CheckProxy(pyobj
)) {
2252 PyObject
*wobj
= PyWeakref_GET_OBJECT(pyobj
);
2253 return wobj
? SWIG_Python_GetSwigThis(wobj
) : 0;
2256 obj
= PyObject_GetAttr(pyobj
,SWIG_This());
2260 if (PyErr_Occurred()) PyErr_Clear();
2266 obj
= PyObject_GetAttr(pyobj
,SWIG_This());
2270 if (PyErr_Occurred()) PyErr_Clear();
2274 if (obj
&& !SwigPyObject_Check(obj
)) {
2275 /* a PyObject is called 'this', try to get the 'real this'
2276 SwigPyObject from it */
2277 return SWIG_Python_GetSwigThis(obj
);
2279 return (SwigPyObject
*)obj
;
2283 /* Acquire a pointer value */
2286 SWIG_Python_AcquirePtr(PyObject
*obj
, int own
) {
2287 if (own
== SWIG_POINTER_OWN
) {
2288 SwigPyObject
*sobj
= SWIG_Python_GetSwigThis(obj
);
2290 int oldown
= sobj
->own
;
2298 /* Convert a pointer value */
2301 SWIG_Python_ConvertPtrAndOwn(PyObject
*obj
, void **ptr
, swig_type_info
*ty
, int flags
, int *own
) {
2307 if (obj
== Py_None
) {
2315 sobj
= SWIG_Python_GetSwigThis(obj
);
2319 void *vptr
= sobj
->ptr
;
2321 swig_type_info
*to
= sobj
->ty
;
2323 /* no type cast needed */
2324 if (ptr
) *ptr
= vptr
;
2327 swig_cast_info
*tc
= SWIG_TypeCheck(to
->name
,ty
);
2329 sobj
= (SwigPyObject
*)sobj
->next
;
2333 *ptr
= SWIG_TypeCast(tc
,vptr
,&newmemory
);
2334 if (newmemory
== SWIG_CAST_NEW_MEMORY
) {
2335 assert(own
); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2337 *own
= *own
| SWIG_CAST_NEW_MEMORY
;
2344 if (ptr
) *ptr
= vptr
;
2350 *own
= *own
| sobj
->own
;
2351 if (flags
& SWIG_POINTER_DISOWN
) {
2356 if (flags
& SWIG_POINTER_IMPLICIT_CONV
) {
2357 SwigPyClientData
*data
= ty
? (SwigPyClientData
*) ty
->clientdata
: 0;
2358 if (data
&& !data
->implicitconv
) {
2359 PyObject
*klass
= data
->klass
;
2362 data
->implicitconv
= 1; /* avoid recursion and call 'explicit' constructors*/
2363 impconv
= SWIG_Python_CallFunctor(klass
, obj
);
2364 data
->implicitconv
= 0;
2365 if (PyErr_Occurred()) {
2370 SwigPyObject
*iobj
= SWIG_Python_GetSwigThis(impconv
);
2373 res
= SWIG_Python_ConvertPtrAndOwn((PyObject
*)iobj
, &vptr
, ty
, 0, 0);
2374 if (SWIG_IsOK(res
)) {
2377 /* transfer the ownership to 'ptr' */
2379 res
= SWIG_AddCast(res
);
2380 res
= SWIG_AddNewMask(res
);
2382 res
= SWIG_AddCast(res
);
2395 /* Convert a function ptr value */
2398 SWIG_Python_ConvertFunctionPtr(PyObject
*obj
, void **ptr
, swig_type_info
*ty
) {
2399 if (!PyCFunction_Check(obj
)) {
2400 return SWIG_ConvertPtr(obj
, ptr
, ty
, 0);
2404 /* here we get the method pointer for callbacks */
2405 const char *doc
= (((PyCFunctionObject
*)obj
) -> m_ml
-> ml_doc
);
2406 const char *desc
= doc
? strstr(doc
, "swig_ptr: ") : 0;
2408 desc
= ty
? SWIG_UnpackVoidPtr(desc
+ 10, &vptr
, ty
->name
) : 0;
2412 swig_cast_info
*tc
= SWIG_TypeCheck(desc
,ty
);
2415 *ptr
= SWIG_TypeCast(tc
,vptr
,&newmemory
);
2416 assert(!newmemory
); /* newmemory handling not yet implemented */
2427 /* Convert a packed value value */
2430 SWIG_Python_ConvertPacked(PyObject
*obj
, void *ptr
, size_t sz
, swig_type_info
*ty
) {
2431 swig_type_info
*to
= SwigPyPacked_UnpackData(obj
, ptr
, sz
);
2432 if (!to
) return SWIG_ERROR
;
2435 /* check type cast? */
2436 swig_cast_info
*tc
= SWIG_TypeCheck(to
->name
,ty
);
2437 if (!tc
) return SWIG_ERROR
;
2443 /* -----------------------------------------------------------------------------
2444 * Create a new pointer object
2445 * ----------------------------------------------------------------------------- */
2448 Create a new instance object, without calling __init__, and set the
2452 SWIGRUNTIME PyObject
*
2453 SWIG_Python_NewShadowInstance(SwigPyClientData
*data
, PyObject
*swig_this
)
2455 #if (PY_VERSION_HEX >= 0x02020000)
2457 PyObject
*newraw
= data
->newraw
;
2459 inst
= PyObject_Call(newraw
, data
->newargs
, NULL
);
2461 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2462 PyObject
**dictptr
= _PyObject_GetDictPtr(inst
);
2463 if (dictptr
!= NULL
) {
2464 PyObject
*dict
= *dictptr
;
2466 dict
= PyDict_New();
2468 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2472 PyObject
*key
= SWIG_This();
2473 PyObject_SetAttr(inst
, key
, swig_this
);
2477 #if PY_VERSION_HEX >= 0x03000000
2478 inst
= PyBaseObject_Type
.tp_new((PyTypeObject
*) data
->newargs
, Py_None
, Py_None
);
2480 PyObject_SetAttr(inst
, SWIG_This(), swig_this
);
2481 Py_TYPE(inst
)->tp_flags
&= ~Py_TPFLAGS_VALID_VERSION_TAG
;
2484 PyObject
*dict
= PyDict_New();
2486 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2487 inst
= PyInstance_NewRaw(data
->newargs
, dict
);
2494 #if (PY_VERSION_HEX >= 0x02010000)
2496 PyObject
*dict
= PyDict_New();
2498 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2499 inst
= PyInstance_NewRaw(data
->newargs
, dict
);
2502 return (PyObject
*) inst
;
2504 PyInstanceObject
*inst
= PyObject_NEW(PyInstanceObject
, &PyInstance_Type
);
2508 inst
->in_class
= (PyClassObject
*)data
->newargs
;
2509 Py_INCREF(inst
->in_class
);
2510 inst
->in_dict
= PyDict_New();
2511 if (inst
->in_dict
== NULL
) {
2515 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2516 inst
->in_weakreflist
= NULL
;
2518 #ifdef Py_TPFLAGS_GC
2519 PyObject_GC_Init(inst
);
2521 PyDict_SetItem(inst
->in_dict
, SWIG_This(), swig_this
);
2522 return (PyObject
*) inst
;
2528 SWIG_Python_SetSwigThis(PyObject
*inst
, PyObject
*swig_this
)
2531 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2532 PyObject
**dictptr
= _PyObject_GetDictPtr(inst
);
2533 if (dictptr
!= NULL
) {
2536 dict
= PyDict_New();
2539 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2543 dict
= PyObject_GetAttrString(inst
, (char*)"__dict__");
2544 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2549 SWIGINTERN PyObject
*
2550 SWIG_Python_InitShadowInstance(PyObject
*args
) {
2552 if (!SWIG_Python_UnpackTuple(args
, "swiginit", 2, 2, obj
)) {
2555 SwigPyObject
*sthis
= SWIG_Python_GetSwigThis(obj
[0]);
2557 SwigPyObject_append((PyObject
*) sthis
, obj
[1]);
2559 SWIG_Python_SetSwigThis(obj
[0], obj
[1]);
2561 return SWIG_Py_Void();
2565 /* Create a new pointer object */
2567 SWIGRUNTIME PyObject
*
2568 SWIG_Python_NewPointerObj(PyObject
*self
, void *ptr
, swig_type_info
*type
, int flags
) {
2569 SwigPyClientData
*clientdata
;
2574 return SWIG_Py_Void();
2576 clientdata
= type
? (SwigPyClientData
*)(type
->clientdata
) : 0;
2577 own
= (flags
& SWIG_POINTER_OWN
) ? SWIG_POINTER_OWN
: 0;
2578 if (clientdata
&& clientdata
->pytype
) {
2579 SwigPyObject
*newobj
;
2580 if (flags
& SWIG_BUILTIN_TP_INIT
) {
2581 newobj
= (SwigPyObject
*) self
;
2583 PyObject
*next_self
= clientdata
->pytype
->tp_alloc(clientdata
->pytype
, 0);
2584 while (newobj
->next
)
2585 newobj
= (SwigPyObject
*) newobj
->next
;
2586 newobj
->next
= next_self
;
2587 newobj
= (SwigPyObject
*)next_self
;
2590 newobj
= PyObject_New(SwigPyObject
, clientdata
->pytype
);
2597 #ifdef SWIGPYTHON_BUILTIN
2600 return (PyObject
*) newobj
;
2602 return SWIG_Py_Void();
2605 assert(!(flags
& SWIG_BUILTIN_TP_INIT
));
2607 robj
= SwigPyObject_New(ptr
, type
, own
);
2608 if (robj
&& clientdata
&& !(flags
& SWIG_POINTER_NOSHADOW
)) {
2609 PyObject
*inst
= SWIG_Python_NewShadowInstance(clientdata
, robj
);
2616 /* Create a new packed object */
2618 SWIGRUNTIMEINLINE PyObject
*
2619 SWIG_Python_NewPackedObj(void *ptr
, size_t sz
, swig_type_info
*type
) {
2620 return ptr
? SwigPyPacked_New((void *) ptr
, sz
, type
) : SWIG_Py_Void();
2623 /* -----------------------------------------------------------------------------*
2625 * -----------------------------------------------------------------------------*/
2627 #ifdef SWIG_LINK_RUNTIME
2628 void *SWIG_ReturnGlobalTypeList(void *);
2631 SWIGRUNTIME swig_module_info
*
2632 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata
)) {
2633 static void *type_pointer
= (void *)0;
2634 /* first check if module already created */
2635 if (!type_pointer
) {
2636 #ifdef SWIG_LINK_RUNTIME
2637 type_pointer
= SWIG_ReturnGlobalTypeList((void *)0);
2639 # ifdef SWIGPY_USE_CAPSULE
2640 type_pointer
= PyCapsule_Import(SWIGPY_CAPSULE_NAME
, 0);
2642 type_pointer
= PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION
,
2643 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME
);
2645 if (PyErr_Occurred()) {
2647 type_pointer
= (void *)0;
2651 return (swig_module_info
*) type_pointer
;
2654 #if PY_MAJOR_VERSION < 2
2655 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2656 is copied out of Python/modsupport.c in python version 2.3.4 */
2658 PyModule_AddObject(PyObject
*m
, char *name
, PyObject
*o
)
2661 if (!PyModule_Check(m
)) {
2662 PyErr_SetString(PyExc_TypeError
,
2663 "PyModule_AddObject() needs module as first arg");
2667 PyErr_SetString(PyExc_TypeError
,
2668 "PyModule_AddObject() needs non-NULL value");
2672 dict
= PyModule_GetDict(m
);
2674 /* Internal error -- modules must have a dict! */
2675 PyErr_Format(PyExc_SystemError
, "module '%s' has no __dict__",
2676 PyModule_GetName(m
));
2679 if (PyDict_SetItemString(dict
, name
, o
))
2687 #ifdef SWIGPY_USE_CAPSULE
2688 SWIG_Python_DestroyModule(PyObject
*obj
)
2690 SWIG_Python_DestroyModule(void *vptr
)
2693 #ifdef SWIGPY_USE_CAPSULE
2694 swig_module_info
*swig_module
= (swig_module_info
*) PyCapsule_GetPointer(obj
, SWIGPY_CAPSULE_NAME
);
2696 swig_module_info
*swig_module
= (swig_module_info
*) vptr
;
2698 swig_type_info
**types
= swig_module
->types
;
2700 for (i
=0; i
< swig_module
->size
; ++i
) {
2701 swig_type_info
*ty
= types
[i
];
2703 SwigPyClientData
*data
= (SwigPyClientData
*) ty
->clientdata
;
2704 if (data
) SwigPyClientData_Del(data
);
2707 Py_DECREF(SWIG_This());
2712 SWIG_Python_SetModule(swig_module_info
*swig_module
) {
2713 #if PY_VERSION_HEX >= 0x03000000
2714 /* Add a dummy module object into sys.modules */
2715 PyObject
*module
= PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION
);
2717 static PyMethodDef swig_empty_runtime_method_table
[] = { {NULL
, NULL
, 0, NULL
} }; /* Sentinel */
2718 PyObject
*module
= Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION
, swig_empty_runtime_method_table
);
2720 #ifdef SWIGPY_USE_CAPSULE
2721 PyObject
*pointer
= PyCapsule_New((void *) swig_module
, SWIGPY_CAPSULE_NAME
, SWIG_Python_DestroyModule
);
2722 if (pointer
&& module
) {
2723 PyModule_AddObject(module
, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME
, pointer
);
2725 Py_XDECREF(pointer
);
2728 PyObject
*pointer
= PyCObject_FromVoidPtr((void *) swig_module
, SWIG_Python_DestroyModule
);
2729 if (pointer
&& module
) {
2730 PyModule_AddObject(module
, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME
, pointer
);
2732 Py_XDECREF(pointer
);
2737 /* The python cached type query */
2738 SWIGRUNTIME PyObject
*
2739 SWIG_Python_TypeCache(void) {
2740 static PyObject
*SWIG_STATIC_POINTER(cache
) = PyDict_New();
2744 SWIGRUNTIME swig_type_info
*
2745 SWIG_Python_TypeQuery(const char *type
)
2747 PyObject
*cache
= SWIG_Python_TypeCache();
2748 PyObject
*key
= SWIG_Python_str_FromChar(type
);
2749 PyObject
*obj
= PyDict_GetItem(cache
, key
);
2750 swig_type_info
*descriptor
;
2752 #ifdef SWIGPY_USE_CAPSULE
2753 descriptor
= (swig_type_info
*) PyCapsule_GetPointer(obj
, NULL
);
2755 descriptor
= (swig_type_info
*) PyCObject_AsVoidPtr(obj
);
2758 swig_module_info
*swig_module
= SWIG_GetModule(0);
2759 descriptor
= SWIG_TypeQueryModule(swig_module
, swig_module
, type
);
2761 #ifdef SWIGPY_USE_CAPSULE
2762 obj
= PyCapsule_New((void*) descriptor
, NULL
, NULL
);
2764 obj
= PyCObject_FromVoidPtr(descriptor
, NULL
);
2766 PyDict_SetItem(cache
, key
, obj
);
2775 For backward compatibility only
2777 #define SWIG_POINTER_EXCEPTION 0
2778 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2779 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2782 SWIG_Python_AddErrMesg(const char* mesg
, int infront
)
2784 if (PyErr_Occurred()) {
2786 PyObject
*value
= 0;
2787 PyObject
*traceback
= 0;
2788 PyErr_Fetch(&type
, &value
, &traceback
);
2791 PyObject
*old_str
= PyObject_Str(value
);
2795 PyErr_Format(type
, "%s %s", mesg
, tmp
= SWIG_Python_str_AsChar(old_str
));
2797 PyErr_Format(type
, "%s %s", tmp
= SWIG_Python_str_AsChar(old_str
), mesg
);
2799 SWIG_Python_str_DelForPy3(tmp
);
2809 SWIG_Python_ArgFail(int argnum
)
2811 if (PyErr_Occurred()) {
2812 /* add information about failing argument */
2814 PyOS_snprintf(mesg
, sizeof(mesg
), "argument number %d:", argnum
);
2815 return SWIG_Python_AddErrMesg(mesg
, 1);
2821 SWIGRUNTIMEINLINE
const char *
2822 SwigPyObject_GetDesc(PyObject
*self
)
2824 SwigPyObject
*v
= (SwigPyObject
*)self
;
2825 swig_type_info
*ty
= v
? v
->ty
: 0;
2826 return ty
? ty
->str
: "";
2830 SWIG_Python_TypeError(const char *type
, PyObject
*obj
)
2833 #if defined(SWIG_COBJECT_TYPES)
2834 if (obj
&& SwigPyObject_Check(obj
)) {
2835 const char *otype
= (const char *) SwigPyObject_GetDesc(obj
);
2837 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2844 const char *otype
= (obj
? obj
->ob_type
->tp_name
: 0);
2846 PyObject
*str
= PyObject_Str(obj
);
2847 const char *cstr
= str
? SWIG_Python_str_AsChar(str
) : 0;
2849 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, '%s(%s)' is received",
2851 SWIG_Python_str_DelForPy3(cstr
);
2853 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, '%s' is received",
2860 PyErr_Format(PyExc_TypeError
, "a '%s' is expected", type
);
2862 PyErr_Format(PyExc_TypeError
, "unexpected type is received");
2867 /* Convert a pointer value, signal an exception on a type mismatch */
2869 SWIG_Python_MustGetPtr(PyObject
*obj
, swig_type_info
*ty
, int SWIGUNUSEDPARM(argnum
), int flags
) {
2871 if (SWIG_Python_ConvertPtr(obj
, &result
, ty
, flags
) == -1) {
2873 #if SWIG_POINTER_EXCEPTION
2875 SWIG_Python_TypeError(SWIG_TypePrettyName(ty
), obj
);
2876 SWIG_Python_ArgFail(argnum
);
2883 #ifdef SWIGPYTHON_BUILTIN
2885 SWIG_Python_NonDynamicSetAttr(PyObject
*obj
, PyObject
*name
, PyObject
*value
) {
2886 PyTypeObject
*tp
= obj
->ob_type
;
2888 PyObject
*encoded_name
;
2892 # ifdef Py_USING_UNICODE
2893 if (PyString_Check(name
)) {
2894 name
= PyUnicode_Decode(PyString_AsString(name
), PyString_Size(name
), NULL
, NULL
);
2897 } else if (!PyUnicode_Check(name
))
2899 if (!PyString_Check(name
))
2902 PyErr_Format(PyExc_TypeError
, "attribute name must be string, not '%.200s'", name
->ob_type
->tp_name
);
2909 if (PyType_Ready(tp
) < 0)
2914 descr
= _PyType_Lookup(tp
, name
);
2917 f
= descr
->ob_type
->tp_descr_set
;
2919 if (PyString_Check(name
)) {
2920 encoded_name
= name
;
2923 encoded_name
= PyUnicode_AsUTF8String(name
);
2925 PyErr_Format(PyExc_AttributeError
, "'%.100s' object has no attribute '%.200s'", tp
->tp_name
, PyString_AsString(encoded_name
));
2926 Py_DECREF(encoded_name
);
2928 res
= f(descr
, obj
, value
);
2944 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2946 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2950 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2953 /* -------- TYPES TABLE (BEGIN) -------- */
2955 #define SWIGTYPE_p_GeosCoordinateSequence swig_types[0]
2956 #define SWIGTYPE_p_GeosGeometry swig_types[1]
2957 #define SWIGTYPE_p_GeosGeometryCollection swig_types[2]
2958 #define SWIGTYPE_p_GeosIndexItem swig_types[3]
2959 #define SWIGTYPE_p_GeosLineString swig_types[4]
2960 #define SWIGTYPE_p_GeosLinearRing swig_types[5]
2961 #define SWIGTYPE_p_GeosMultiLineString swig_types[6]
2962 #define SWIGTYPE_p_GeosMultiLinearRing swig_types[7]
2963 #define SWIGTYPE_p_GeosMultiPoint swig_types[8]
2964 #define SWIGTYPE_p_GeosMultiPolygon swig_types[9]
2965 #define SWIGTYPE_p_GeosPoint swig_types[10]
2966 #define SWIGTYPE_p_GeosPolygon swig_types[11]
2967 #define SWIGTYPE_p_GeosPreparedGeometry swig_types[12]
2968 #define SWIGTYPE_p_GeosQueryCallback swig_types[13]
2969 #define SWIGTYPE_p_GeosSTRtree swig_types[14]
2970 #define SWIGTYPE_p_GeosWkbReader swig_types[15]
2971 #define SWIGTYPE_p_GeosWkbWriter swig_types[16]
2972 #define SWIGTYPE_p_GeosWktReader swig_types[17]
2973 #define SWIGTYPE_p_GeosWktWriter swig_types[18]
2974 #define SWIGTYPE_p_char swig_types[19]
2975 #define SWIGTYPE_p_p_GeosLinearRing swig_types[20]
2976 #define SWIGTYPE_p_size_t swig_types[21]
2977 #define SWIGTYPE_p_std__invalid_argument swig_types[22]
2978 #define SWIGTYPE_p_swig__SwigPyIterator swig_types[23]
2979 #define SWIGTYPE_p_unsigned_char swig_types[24]
2980 static swig_type_info
*swig_types
[26];
2981 static swig_module_info swig_module
= {swig_types
, 25, 0, 0, 0, 0};
2982 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2983 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2985 /* -------- TYPES TABLE (END) -------- */
2987 #if (PY_VERSION_HEX <= 0x02000000)
2988 # if !defined(SWIG_PYTHON_CLASSIC)
2989 # error "This python version requires swig to be run with the '-classic' option"
2992 #if (PY_VERSION_HEX <= 0x02020000)
2993 # error "This python version requires swig to be run with the '-nomodern' option"
2995 #if (PY_VERSION_HEX <= 0x02020000)
2996 # error "This python version requires swig to be run with the '-nomodernargs' option"
2999 /*-----------------------------------------------
3000 @(target):= _geos.so
3001 ------------------------------------------------*/
3002 #if PY_VERSION_HEX >= 0x03000000
3003 # define SWIG_init PyInit__geos
3006 # define SWIG_init init_geos
3009 #define SWIG_name "_geos"
3011 #define SWIGVERSION 0x020010
3012 #define SWIG_VERSION SWIGVERSION
3015 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
3016 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
3019 #include <stdexcept>
3023 class SwigPtr_PyObject
{
3028 SwigPtr_PyObject() :_obj(0)
3032 SwigPtr_PyObject(const SwigPtr_PyObject
& item
) : _obj(item
._obj
)
3037 SwigPtr_PyObject(PyObject
*obj
, bool initial_ref
= true) :_obj(obj
)
3044 SwigPtr_PyObject
& operator=(const SwigPtr_PyObject
& item
)
3046 Py_XINCREF(item
._obj
);
3057 operator PyObject
*() const
3062 PyObject
*operator->() const
3071 struct SwigVar_PyObject
: SwigPtr_PyObject
{
3072 SwigVar_PyObject(PyObject
* obj
= 0) : SwigPtr_PyObject(obj
, false) { }
3074 SwigVar_PyObject
& operator = (PyObject
* obj
)
3089 #if PY_VERSION_HEX >= 0x03020000
3090 # define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
3092 # define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
3096 #include <stdexcept>
3099 #if defined(__GNUC__)
3100 # if __GNUC__ == 2 && __GNUC_MINOR <= 96
3101 # define SWIG_STD_NOMODERN_STL
3107 #include <stdexcept>
3115 struct stop_iteration
{
3118 struct SwigPyIterator
{
3120 SwigPtr_PyObject _seq
;
3123 SwigPyIterator(PyObject
*seq
) : _seq(seq
)
3128 virtual ~SwigPyIterator() {}
3130 // Access iterator method, required by Python
3131 virtual PyObject
*value() const = 0;
3133 // Forward iterator method, required by Python
3134 virtual SwigPyIterator
*incr(size_t n
= 1) = 0;
3136 // Backward iterator method, very common in C++, but not required in Python
3137 virtual SwigPyIterator
*decr(size_t /*n*/ = 1)
3139 throw stop_iteration();
3142 // Random access iterator methods, but not required in Python
3143 virtual ptrdiff_t distance(const SwigPyIterator
&/*x*/) const
3145 throw std::invalid_argument("operation not supported");
3148 virtual bool equal (const SwigPyIterator
&/*x*/) const
3150 throw std::invalid_argument("operation not supported");
3153 // C++ common/needed methods
3154 virtual SwigPyIterator
*copy() const = 0;
3158 SWIG_PYTHON_THREAD_BEGIN_BLOCK
; // disable threads
3159 PyObject
*obj
= value();
3161 SWIG_PYTHON_THREAD_END_BLOCK
; // re-enable threads
3165 /* Make an alias for Python 3.x */
3166 PyObject
*__next__()
3171 PyObject
*previous()
3173 SWIG_PYTHON_THREAD_BEGIN_BLOCK
; // disable threads
3175 PyObject
*obj
= value();
3176 SWIG_PYTHON_THREAD_END_BLOCK
; // re-enable threads
3180 SwigPyIterator
*advance(ptrdiff_t n
)
3182 return (n
> 0) ? incr(n
) : decr(-n
);
3185 bool operator == (const SwigPyIterator
& x
) const
3190 bool operator != (const SwigPyIterator
& x
) const
3192 return ! operator==(x
);
3195 SwigPyIterator
& operator += (ptrdiff_t n
)
3200 SwigPyIterator
& operator -= (ptrdiff_t n
)
3202 return *advance(-n
);
3205 SwigPyIterator
* operator + (ptrdiff_t n
) const
3207 return copy()->advance(n
);
3210 SwigPyIterator
* operator - (ptrdiff_t n
) const
3212 return copy()->advance(-n
);
3215 ptrdiff_t operator - (const SwigPyIterator
& x
) const
3217 return x
.distance(*this);
3220 static swig_type_info
* descriptor() {
3221 static int init
= 0;
3222 static swig_type_info
* desc
= 0;
3224 desc
= SWIG_TypeQuery("swig::SwigPyIterator *");
3231 #if defined(SWIGPYTHON_BUILTIN)
3232 inline PyObject
* make_output_iterator_builtin (PyObject
*pyself
)
3242 SWIG_AsVal_double (PyObject
*obj
, double *val
)
3244 int res
= SWIG_TypeError
;
3245 if (PyFloat_Check(obj
)) {
3246 if (val
) *val
= PyFloat_AsDouble(obj
);
3248 } else if (PyInt_Check(obj
)) {
3249 if (val
) *val
= PyInt_AsLong(obj
);
3251 } else if (PyLong_Check(obj
)) {
3252 double v
= PyLong_AsDouble(obj
);
3253 if (!PyErr_Occurred()) {
3260 #ifdef SWIG_PYTHON_CAST_MODE
3263 double d
= PyFloat_AsDouble(obj
);
3264 if (!PyErr_Occurred()) {
3266 return SWIG_AddCast(SWIG_OK
);
3271 long v
= PyLong_AsLong(obj
);
3272 if (!PyErr_Occurred()) {
3274 return SWIG_AddCast(SWIG_AddCast(SWIG_OK
));
3291 SWIGINTERNINLINE
int
3292 SWIG_CanCastAsInteger(double *d
, double min
, double max
) {
3294 if ((min
<= x
&& x
<= max
)) {
3295 double fx
= floor(x
);
3296 double cx
= ceil(x
);
3297 double rd
= ((x
- fx
) < 0.5) ? fx
: cx
; /* simple rint */
3298 if ((errno
== EDOM
) || (errno
== ERANGE
)) {
3301 double summ
, reps
, diff
;
3304 } else if (rd
> x
) {
3311 if (reps
< 8*DBL_EPSILON
) {
3322 SWIG_AsVal_unsigned_SS_long (PyObject
*obj
, unsigned long *val
)
3324 #if PY_VERSION_HEX < 0x03000000
3325 if (PyInt_Check(obj
)) {
3326 long v
= PyInt_AsLong(obj
);
3331 return SWIG_OverflowError
;
3335 if (PyLong_Check(obj
)) {
3336 unsigned long v
= PyLong_AsUnsignedLong(obj
);
3337 if (!PyErr_Occurred()) {
3342 #if PY_VERSION_HEX >= 0x03000000
3344 long v
= PyLong_AsLong(obj
);
3345 if (!PyErr_Occurred()) {
3347 return SWIG_OverflowError
;
3356 #ifdef SWIG_PYTHON_CAST_MODE
3359 unsigned long v
= PyLong_AsUnsignedLong(obj
);
3360 if (!PyErr_Occurred()) {
3362 return SWIG_AddCast(SWIG_OK
);
3368 int res
= SWIG_AddCast(SWIG_AsVal_double (obj
,&d
));
3369 if (SWIG_IsOK(res
) && SWIG_CanCastAsInteger(&d
, 0, ULONG_MAX
)) {
3370 if (val
) *val
= (unsigned long)(d
);
3376 return SWIG_TypeError
;
3380 SWIGINTERNINLINE
int
3381 SWIG_AsVal_size_t (PyObject
* obj
, size_t *val
)
3384 int res
= SWIG_AsVal_unsigned_SS_long (obj
, val
? &v
: 0);
3385 if (SWIG_IsOK(res
) && val
) *val
= static_cast< size_t >(v
);
3390 #define SWIG_From_long PyLong_FromLong
3393 SWIGINTERNINLINE PyObject
*
3394 SWIG_From_ptrdiff_t (ptrdiff_t value
)
3396 return SWIG_From_long (static_cast< long >(value
));
3400 SWIGINTERNINLINE PyObject
*
3401 SWIG_From_bool (bool value
)
3403 return PyBool_FromLong(value
? 1 : 0);
3408 SWIG_AsVal_long (PyObject
*obj
, long* val
)
3410 if (PyInt_Check(obj
)) {
3411 if (val
) *val
= PyInt_AsLong(obj
);
3413 } else if (PyLong_Check(obj
)) {
3414 long v
= PyLong_AsLong(obj
);
3415 if (!PyErr_Occurred()) {
3422 #ifdef SWIG_PYTHON_CAST_MODE
3425 long v
= PyInt_AsLong(obj
);
3426 if (!PyErr_Occurred()) {
3428 return SWIG_AddCast(SWIG_OK
);
3434 int res
= SWIG_AddCast(SWIG_AsVal_double (obj
,&d
));
3435 if (SWIG_IsOK(res
) && SWIG_CanCastAsInteger(&d
, LONG_MIN
, LONG_MAX
)) {
3436 if (val
) *val
= (long)(d
);
3442 return SWIG_TypeError
;
3446 SWIGINTERNINLINE
int
3447 SWIG_AsVal_ptrdiff_t (PyObject
* obj
, ptrdiff_t *val
)
3450 int res
= SWIG_AsVal_long (obj
, val
? &v
: 0);
3451 if (SWIG_IsOK(res
) && val
) *val
= static_cast< ptrdiff_t >(v
);
3456 #include <stdexcept>
3459 #include <algorithm>
3466 /* Needed for va_start, etc. */
3470 SWIGINTERNINLINE PyObject
*
3471 SWIG_From_int (int value
)
3473 return PyInt_FromLong((long) value
);
3477 SWIGINTERN swig_type_info
*
3478 SWIG_pchar_descriptor(void)
3480 static int init
= 0;
3481 static swig_type_info
* info
= 0;
3483 info
= SWIG_TypeQuery("_p_char");
3490 SWIGINTERNINLINE PyObject
*
3491 SWIG_FromCharPtrAndSize(const char* carray
, size_t size
)
3494 if (size
> INT_MAX
) {
3495 swig_type_info
* pchar_descriptor
= SWIG_pchar_descriptor();
3496 return pchar_descriptor
?
3497 SWIG_InternalNewPointerObj(const_cast< char * >(carray
), pchar_descriptor
, 0) : SWIG_Py_Void();
3499 #if PY_VERSION_HEX >= 0x03000000
3500 return PyUnicode_FromStringAndSize(carray
, static_cast< int >(size
));
3502 return PyString_FromStringAndSize(carray
, static_cast< int >(size
));
3506 return SWIG_Py_Void();
3511 SWIGINTERNINLINE PyObject
*
3512 SWIG_FromCharPtr(const char *cptr
)
3514 return SWIG_FromCharPtrAndSize(cptr
, (cptr
? strlen(cptr
) : 0));
3518 static const int DEFAULT_QUADRANT_SEGMENTS
=8;
3522 /* This is not thread safe ! */
3523 static const int MESSAGE_SIZE
= 1000;
3524 static char message
[MESSAGE_SIZE
];
3526 void noticeHandler(const char *fmt
, ...)
3529 va_start(args
, fmt
);
3530 vsnprintf(message
, sizeof(message
) - 1, fmt
, args
);
3534 void errorHandler(const char *fmt
, ...)
3537 va_start(args
, fmt
);
3538 vsnprintf(message
, sizeof(message
) - 1, fmt
, args
);
3543 typedef void GeosCoordinateSequence
;
3545 void checkCoordSeqBounds(const GEOSCoordSeq coordSeq
, const size_t index
)
3547 unsigned int size
= 0;
3548 GEOSCoordSeq_getSize(coordSeq
, &size
);
3550 if (index
< 0 || index
>= size
)
3551 throw std::runtime_error("Index out of bounds");
3554 SWIGINTERN GeosCoordinateSequence
*new_GeosCoordinateSequence(size_t size
,size_t dims
){
3555 return (GeosCoordinateSequence
*) GEOSCoordSeq_create(size
, dims
);
3557 SWIGINTERN
void delete_GeosCoordinateSequence(GeosCoordinateSequence
*self
){
3558 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3559 return GEOSCoordSeq_destroy(coords
);
3561 SWIGINTERN GeosCoordinateSequence
*GeosCoordinateSequence_clone(GeosCoordinateSequence
*self
){
3562 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3563 return (GeosCoordinateSequence
*) GEOSCoordSeq_clone(coords
);
3565 SWIGINTERN
int GeosCoordinateSequence_setX(GeosCoordinateSequence
*self
,size_t idx
,double val
){
3566 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3567 checkCoordSeqBounds(coords
, idx
);
3568 return GEOSCoordSeq_setX(coords
, idx
, val
);
3570 SWIGINTERN
int GeosCoordinateSequence_setY(GeosCoordinateSequence
*self
,size_t idx
,double val
){
3571 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3572 checkCoordSeqBounds(coords
, idx
);
3573 return GEOSCoordSeq_setY(coords
, idx
, val
);
3575 SWIGINTERN
int GeosCoordinateSequence_setZ(GeosCoordinateSequence
*self
,size_t idx
,double val
){
3576 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3577 checkCoordSeqBounds(coords
, idx
);
3578 return GEOSCoordSeq_setZ(coords
, idx
, val
);
3580 SWIGINTERN
int GeosCoordinateSequence_setOrdinate(GeosCoordinateSequence
*self
,size_t idx
,size_t dim
,double val
){
3581 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3582 checkCoordSeqBounds(coords
, idx
);
3583 return GEOSCoordSeq_setOrdinate(coords
, idx
, dim
, val
);
3585 SWIGINTERN
double GeosCoordinateSequence_getX(GeosCoordinateSequence
*self
,size_t idx
){
3587 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3588 checkCoordSeqBounds(coords
, idx
);
3589 GEOSCoordSeq_getX(coords
, idx
, &result
);
3593 #define SWIG_From_double PyFloat_FromDouble
3595 SWIGINTERN
double GeosCoordinateSequence_getY(GeosCoordinateSequence
*self
,size_t idx
){
3597 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3598 checkCoordSeqBounds(coords
, idx
);
3599 GEOSCoordSeq_getY(coords
, idx
, &result
);
3602 SWIGINTERN
double GeosCoordinateSequence_getZ(GeosCoordinateSequence
*self
,size_t idx
){
3604 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3605 checkCoordSeqBounds(coords
, idx
);
3606 GEOSCoordSeq_getZ(coords
, idx
, &result
);
3609 SWIGINTERN
double GeosCoordinateSequence_getOrdinate(GeosCoordinateSequence
*self
,size_t idx
,size_t dim
){
3611 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3612 checkCoordSeqBounds(coords
, idx
);
3613 GEOSCoordSeq_getOrdinate(coords
, idx
, dim
, &result
);
3616 SWIGINTERN
unsigned int GeosCoordinateSequence_getSize(GeosCoordinateSequence
*self
){
3617 unsigned int result
;
3618 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3619 GEOSCoordSeq_getSize(coords
, &result
);
3623 SWIGINTERNINLINE PyObject
*
3624 SWIG_From_unsigned_SS_int (unsigned int value
)
3626 return PyInt_FromSize_t((size_t) value
);
3629 SWIGINTERN
unsigned int GeosCoordinateSequence_getDimensions(GeosCoordinateSequence
*self
){
3630 unsigned int result
;
3631 GEOSCoordSeq coords
= (GEOSCoordSeq
) self
;
3632 GEOSCoordSeq_getDimensions(coords
, &result
);
3636 typedef void GeosGeometry
;
3637 typedef void GeosPoint
;
3638 typedef void GeosLineString
;
3639 typedef void GeosLinearRing
;
3640 typedef void GeosPolygon
;
3641 typedef void GeosGeometryCollection
;
3642 typedef void GeosMultiPoint
;
3643 typedef void GeosMultiLineString
;
3644 typedef void GeosMultiLinearRing
;
3645 typedef void GeosMultiPolygon
;
3647 typedef void GeosWktReader
;
3648 typedef void GeosWktWriter
;
3649 typedef void GeosWkbReader
;
3650 typedef void GeosWkbWriter
;
3653 bool checkBoolResult(char result
)
3655 int intResult
= (int) result
;
3659 else if (intResult
== 0)
3662 throw std::runtime_error(message
);
3665 SWIGINTERN
void delete_GeosGeometry(GeosGeometry
*self
){
3666 GEOSGeom geom
= (GEOSGeom
) self
;
3667 GEOSGeom_destroy(geom
);
3669 SWIGINTERN GeosGeometry
*GeosGeometry_clone(GeosGeometry
*self
){
3670 GEOSGeom geom
= (GEOSGeom
) self
;
3671 return GEOSGeom_clone(geom
);
3673 SWIGINTERN
char *GeosGeometry_geomType(GeosGeometry
*self
){
3674 GEOSGeom geom
= (GEOSGeom
) self
;
3675 return GEOSGeomType(geom
);
3677 SWIGINTERN
int GeosGeometry_typeId(GeosGeometry
*self
){
3678 GEOSGeom geom
= (GEOSGeom
) self
;
3679 return GEOSGeomTypeId(geom
);
3681 SWIGINTERN
void GeosGeometry_normalize(GeosGeometry
*self
){
3682 GEOSGeom geom
= (GEOSGeom
) self
;
3683 int result
= GEOSNormalize(geom
);
3686 throw std::runtime_error(message
);
3688 SWIGINTERN
int GeosGeometry_getSRID(GeosGeometry
*self
){
3689 GEOSGeom geom
= (GEOSGeom
) self
;
3690 return GEOSGetSRID(geom
);
3694 #if !defined(SWIG_NO_LLONG_MAX)
3695 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3696 # define LLONG_MAX __LONG_LONG_MAX__
3697 # define LLONG_MIN (-LLONG_MAX - 1LL)
3698 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3704 SWIG_AsVal_int (PyObject
* obj
, int *val
)
3707 int res
= SWIG_AsVal_long (obj
, &v
);
3708 if (SWIG_IsOK(res
)) {
3709 if ((v
< INT_MIN
|| v
> INT_MAX
)) {
3710 return SWIG_OverflowError
;
3712 if (val
) *val
= static_cast< int >(v
);
3718 SWIGINTERN
void GeosGeometry_setSRID(GeosGeometry
*self
,int SRID
){
3719 GEOSGeom geom
= (GEOSGeom
) self
;
3720 return GEOSSetSRID(geom
, SRID
);
3722 SWIGINTERN
size_t GeosGeometry_getDimensions(GeosGeometry
*self
){
3723 GEOSGeom geom
= (GEOSGeom
) self
;
3724 return GEOSGeom_getDimensions(geom
);
3727 SWIGINTERNINLINE PyObject
*
3728 SWIG_From_unsigned_SS_long (unsigned long value
)
3730 return (value
> LONG_MAX
) ?
3731 PyLong_FromUnsignedLong(value
) : PyLong_FromLong(static_cast< long >(value
));
3735 SWIGINTERNINLINE PyObject
*
3736 SWIG_From_size_t (size_t value
)
3738 return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value
));
3741 SWIGINTERN
size_t GeosGeometry_getNumGeometries(GeosGeometry
*self
){
3742 GEOSGeom geom
= (GEOSGeom
) self
;
3743 size_t result
= GEOSGetNumGeometries(geom
);
3745 if ((int)result
== -1)
3746 throw std::runtime_error(message
);
3750 SWIGINTERN GeosGeometry
*GeosGeometry_intersection(GeosGeometry
*self
,GeosGeometry
*other
){
3751 GEOSGeom geom
= (GEOSGeom
) self
;
3752 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3753 return (GeosGeometry
*) GEOSIntersection(geom
, otherGeom
);
3755 SWIGINTERN GeosGeometry
*GeosGeometry_buffer(GeosGeometry
*self
,double width
,int quadsegs
){
3756 GEOSGeom geom
= (GEOSGeom
) self
;
3757 return (GeosGeometry
*) GEOSBuffer(geom
, width
, quadsegs
);
3759 SWIGINTERN GeosGeometry
*GeosGeometry_convexHull(GeosGeometry
*self
){
3760 GEOSGeom geom
= (GEOSGeom
) self
;
3761 return (GeosGeometry
*) GEOSConvexHull(geom
);
3763 SWIGINTERN GeosGeometry
*GeosGeometry_difference(GeosGeometry
*self
,GeosGeometry
*other
){
3764 GEOSGeom geom
= (GEOSGeom
) self
;
3765 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3766 return (GeosGeometry
*) GEOSDifference(geom
, otherGeom
);
3768 SWIGINTERN GeosGeometry
*GeosGeometry_symDifference(GeosGeometry
*self
,GeosGeometry
*other
){
3769 GEOSGeom geom
= (GEOSGeom
) self
;
3770 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3771 return (GeosGeometry
*) GEOSSymDifference(geom
, otherGeom
);
3773 SWIGINTERN GeosGeometry
*GeosGeometry_boundary(GeosGeometry
*self
){
3774 GEOSGeom geom
= (GEOSGeom
) self
;
3775 return (GeosGeometry
*) GEOSBoundary(geom
);
3777 SWIGINTERN GeosGeometry
*GeosGeometry_geomUnion(GeosGeometry
*self
,GeosGeometry
*other
){
3778 GEOSGeom geom
= (GEOSGeom
) self
;
3779 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3780 return (GeosGeometry
*) GEOSUnion(geom
, otherGeom
);
3782 SWIGINTERN GeosGeometry
*GeosGeometry_pointOnSurface(GeosGeometry
*self
){
3783 GEOSGeom geom
= (GEOSGeom
) self
;
3784 return (GeosGeometry
*) GEOSPointOnSurface(geom
);
3786 SWIGINTERN GeosGeometry
*GeosGeometry_getCentroid(GeosGeometry
*self
){
3787 GEOSGeom geom
= (GEOSGeom
) self
;
3788 return (GeosGeometry
*) GEOSGetCentroid(geom
);
3790 SWIGINTERN GeosGeometry
*GeosGeometry_getEnvelope(GeosGeometry
*self
){
3791 GEOSGeom geom
= (GEOSGeom
) self
;
3792 return (GeosGeometry
*) GEOSEnvelope(geom
);
3794 SWIGINTERN
char *GeosGeometry_relate(GeosGeometry
*self
,GeosGeometry
*other
){
3795 GEOSGeom geom
= (GEOSGeom
) self
;
3796 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3797 return GEOSRelate(geom
, otherGeom
);
3799 SWIGINTERN GeosGeometry
*GeosGeometry_lineMerge(GeosGeometry
*self
){
3800 GEOSGeom geom
= (GEOSGeom
) self
;
3801 return GEOSLineMerge(geom
);
3803 SWIGINTERN GeosGeometry
*GeosGeometry_simplify(GeosGeometry
*self
,double tolerance
){
3804 GEOSGeom geom
= (GEOSGeom
) self
;
3805 return (GeosGeometry
*) GEOSSimplify(geom
, tolerance
);
3807 SWIGINTERN GeosGeometry
*GeosGeometry_topologyPreserveSimplify(GeosGeometry
*self
,double tolerance
){
3808 GEOSGeom geom
= (GEOSGeom
) self
;
3809 return (GeosGeometry
*) GEOSTopologyPreserveSimplify(geom
, tolerance
);
3813 SWIG_AsCharPtrAndSize(PyObject
*obj
, char** cptr
, size_t* psize
, int *alloc
)
3815 #if PY_VERSION_HEX>=0x03000000
3816 if (PyUnicode_Check(obj
))
3818 if (PyString_Check(obj
))
3821 char *cstr
; Py_ssize_t len
;
3822 #if PY_VERSION_HEX>=0x03000000
3823 if (!alloc
&& cptr
) {
3824 /* We can't allow converting without allocation, since the internal
3825 representation of string in Python 3 is UCS-2/UCS-4 but we require
3826 a UTF-8 representation.
3827 TODO(bhy) More detailed explanation */
3828 return SWIG_RuntimeError
;
3830 obj
= PyUnicode_AsUTF8String(obj
);
3831 PyBytes_AsStringAndSize(obj
, &cstr
, &len
);
3832 if(alloc
) *alloc
= SWIG_NEWOBJ
;
3834 PyString_AsStringAndSize(obj
, &cstr
, &len
);
3839 In python the user should not be able to modify the inner
3840 string representation. To warranty that, if you define
3841 SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3842 buffer is always returned.
3844 The default behavior is just to return the pointer value,
3847 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3848 if (*alloc
!= SWIG_OLDOBJ
)
3850 if (*alloc
== SWIG_NEWOBJ
)
3853 *cptr
= reinterpret_cast< char* >(memcpy((new char[len
+ 1]), cstr
, sizeof(char)*(len
+ 1)));
3854 *alloc
= SWIG_NEWOBJ
;
3858 *alloc
= SWIG_OLDOBJ
;
3861 #if PY_VERSION_HEX>=0x03000000
3862 assert(0); /* Should never reach here in Python 3 */
3864 *cptr
= SWIG_Python_str_AsChar(obj
);
3867 if (psize
) *psize
= len
+ 1;
3868 #if PY_VERSION_HEX>=0x03000000
3873 swig_type_info
* pchar_descriptor
= SWIG_pchar_descriptor();
3874 if (pchar_descriptor
) {
3876 if (SWIG_ConvertPtr(obj
, &vptr
, pchar_descriptor
, 0) == SWIG_OK
) {
3877 if (cptr
) *cptr
= (char *) vptr
;
3878 if (psize
) *psize
= vptr
? (strlen((char *)vptr
) + 1) : 0;
3879 if (alloc
) *alloc
= SWIG_OLDOBJ
;
3884 return SWIG_TypeError
;
3890 SWIGINTERN
bool GeosGeometry_relatePattern(GeosGeometry
*self
,GeosGeometry
const *other
,char const *pat
){
3891 GEOSGeom geom
= (GEOSGeom
) self
;
3892 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3893 return checkBoolResult(GEOSRelatePattern(geom
, otherGeom
, pat
));
3895 SWIGINTERN
bool GeosGeometry_disjoint(GeosGeometry
*self
,GeosGeometry
const *other
){
3896 GEOSGeom geom
= (GEOSGeom
) self
;
3897 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3898 return checkBoolResult(GEOSDisjoint(geom
, otherGeom
));
3900 SWIGINTERN
bool GeosGeometry_touches(GeosGeometry
*self
,GeosGeometry
const *other
){
3901 GEOSGeom geom
= (GEOSGeom
) self
;
3902 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3903 return checkBoolResult(GEOSTouches(geom
, otherGeom
));
3905 SWIGINTERN
bool GeosGeometry_intersects(GeosGeometry
*self
,GeosGeometry
const *other
){
3906 GEOSGeom geom
= (GEOSGeom
) self
;
3907 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3908 return checkBoolResult(GEOSIntersects(geom
, otherGeom
));
3910 SWIGINTERN
bool GeosGeometry_crosses(GeosGeometry
*self
,GeosGeometry
const *other
){
3911 GEOSGeom geom
= (GEOSGeom
) self
;
3912 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3913 return checkBoolResult(GEOSCrosses(geom
, otherGeom
));
3915 SWIGINTERN
bool GeosGeometry_within(GeosGeometry
*self
,GeosGeometry
const *other
){
3916 GEOSGeom geom
= (GEOSGeom
) self
;
3917 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3918 return checkBoolResult(GEOSWithin(geom
, otherGeom
));
3920 SWIGINTERN
bool GeosGeometry_contains(GeosGeometry
*self
,GeosGeometry
const *other
){
3921 GEOSGeom geom
= (GEOSGeom
) self
;
3922 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3923 return checkBoolResult(GEOSContains(geom
, otherGeom
));
3925 SWIGINTERN
bool GeosGeometry_overlaps(GeosGeometry
*self
,GeosGeometry
const *other
){
3926 GEOSGeom geom
= (GEOSGeom
) self
;
3927 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3928 return checkBoolResult(GEOSOverlaps(geom
, otherGeom
));
3930 SWIGINTERN
bool GeosGeometry_equals(GeosGeometry
*self
,GeosGeometry
const *other
){
3931 GEOSGeom geom
= (GEOSGeom
) self
;
3932 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3933 return checkBoolResult(GEOSEquals(geom
, otherGeom
));
3935 SWIGINTERN
bool GeosGeometry_equalsExact(GeosGeometry
*self
,GeosGeometry
const *other
,double tolerance
){
3936 GEOSGeom geom
= (GEOSGeom
) self
;
3937 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3938 return checkBoolResult(GEOSEqualsExact(geom
, otherGeom
, tolerance
));
3940 SWIGINTERN
bool GeosGeometry_isEmpty(GeosGeometry
*self
){
3941 GEOSGeom geom
= (GEOSGeom
) self
;
3942 return checkBoolResult(GEOSisEmpty(geom
));
3944 SWIGINTERN
bool GeosGeometry_isValid(GeosGeometry
*self
){
3945 GEOSGeom geom
= (GEOSGeom
) self
;
3946 return checkBoolResult(GEOSisValid(geom
));
3948 SWIGINTERN
bool GeosGeometry_isSimple(GeosGeometry
*self
){
3949 GEOSGeom geom
= (GEOSGeom
) self
;
3950 return checkBoolResult(GEOSisSimple(geom
));
3952 SWIGINTERN
bool GeosGeometry_isRing(GeosGeometry
*self
){
3953 GEOSGeom geom
= (GEOSGeom
) self
;
3954 return checkBoolResult(GEOSisRing(geom
));
3956 SWIGINTERN
bool GeosGeometry_hasZ(GeosGeometry
*self
){
3957 GEOSGeom geom
= (GEOSGeom
) self
;
3958 return checkBoolResult(GEOSHasZ(geom
));
3960 SWIGINTERN
double GeosGeometry_area(GeosGeometry
*self
){
3961 GEOSGeom geom
= (GEOSGeom
) self
;
3964 int code
= GEOSArea(geom
, &result
);
3967 throw std::runtime_error(message
);
3971 SWIGINTERN
double GeosGeometry_length(GeosGeometry
*self
){
3972 GEOSGeom geom
= (GEOSGeom
) self
;
3975 int code
= GEOSLength(geom
, &result
);
3978 throw std::runtime_error(message
);
3982 SWIGINTERN
double GeosGeometry_distance(GeosGeometry
*self
,GeosGeometry
const *other
){
3983 GEOSGeom geom
= (GEOSGeom
) self
;
3984 GEOSGeom otherGeom
= (GEOSGeom
) other
;
3987 int code
= GEOSDistance(geom
, otherGeom
, &result
);
3990 throw std::runtime_error(message
);
3994 SWIGINTERN
void delete_GeosPoint(GeosPoint
*self
){
3995 GEOSGeom geom
= (GEOSGeom
) self
;
3996 GEOSGeom_destroy(geom
);
3998 SWIGINTERN GeosCoordinateSequence
const *GeosPoint_getCoordSeq(GeosPoint
*self
){
3999 GEOSGeom geom
= (GEOSGeom
) self
;
4000 const GEOSCoordSeq result
= (const GEOSCoordSeq
) GEOSGeom_getCoordSeq(geom
);
4003 throw std::runtime_error(message
);
4005 return (const GeosCoordinateSequence
*) result
;
4007 SWIGINTERN
void delete_GeosLineString(GeosLineString
*self
){
4008 GEOSGeom geom
= (GEOSGeom
) self
;
4009 GEOSGeom_destroy(geom
);
4011 SWIGINTERN GeosCoordinateSequence
const *GeosLineString_getCoordSeq(GeosLineString
*self
){
4012 GEOSGeom geom
= (GEOSGeom
) self
;
4013 const GEOSCoordSeq result
= (const GEOSCoordSeq
) GEOSGeom_getCoordSeq(geom
);
4016 throw std::runtime_error(message
);
4018 return (const GeosCoordinateSequence
*) result
;
4020 SWIGINTERN
void delete_GeosLinearRing(GeosLinearRing
*self
){
4021 GEOSGeom geom
= (GEOSGeom
) self
;
4022 GEOSGeom_destroy(geom
);
4024 SWIGINTERN GeosCoordinateSequence
const *GeosLinearRing_getCoordSeq(GeosLinearRing
*self
){
4025 GEOSGeom geom
= (GEOSGeom
) self
;
4026 const GEOSCoordSeq result
= (const GEOSCoordSeq
) GEOSGeom_getCoordSeq(geom
);
4029 throw std::runtime_error(message
);
4031 return (const GeosCoordinateSequence
*) result
;
4033 SWIGINTERN
void delete_GeosPolygon(GeosPolygon
*self
){
4034 GEOSGeom geom
= (GEOSGeom
) self
;
4035 GEOSGeom_destroy(geom
);
4037 SWIGINTERN GeosGeometry
const *GeosPolygon_getExteriorRing(GeosPolygon
*self
){
4038 GEOSGeom geom
= (GEOSGeom
) self
;
4039 const GEOSGeom result
= (const GEOSGeom
) GEOSGetExteriorRing(geom
);
4042 throw std::runtime_error(message
);
4044 return (const GeosGeometry
*) result
;
4046 SWIGINTERN
size_t GeosPolygon_getNumInteriorRings(GeosPolygon
*self
){
4047 GEOSGeom geom
= (GEOSGeom
) self
;
4048 size_t result
= GEOSGetNumInteriorRings(geom
);
4050 if ((int)result
== -1)
4051 throw std::runtime_error(message
);
4055 SWIGINTERN GeosGeometry
const *GeosPolygon_getInteriorRingN(GeosPolygon
*self
,size_t n
){
4056 GEOSGeom geom
= (GEOSGeom
) self
;
4058 size_t size
= GEOSGetNumInteriorRings(geom
);
4060 if (n
< 0 || n
>= size
)
4061 throw std::runtime_error("Index out of bounds");
4063 const GEOSGeom result
= (const GEOSGeom
) GEOSGetInteriorRingN(geom
, n
);
4066 throw std::runtime_error(message
);
4068 return (const GeosGeometry
*) result
;
4070 SWIGINTERN
void delete_GeosGeometryCollection(GeosGeometryCollection
*self
){
4071 GEOSGeom geom
= (GEOSGeom
) self
;
4072 GEOSGeom_destroy(geom
);
4074 SWIGINTERN GeosGeometry
const *GeosGeometryCollection_getGeometryN(GeosGeometryCollection
*self
,size_t n
){
4075 GEOSGeom geom
= (GEOSGeom
) self
;
4076 const GEOSGeom result
= (const GEOSGeom
) GEOSGetGeometryN(geom
, n
);
4079 throw std::runtime_error(message
);
4081 return (const GeosGeometry
*) result
;
4083 SWIGINTERN
void delete_GeosMultiPoint(GeosMultiPoint
*self
){
4084 GEOSGeom geom
= (GEOSGeom
) self
;
4085 GEOSGeom_destroy(geom
);
4087 SWIGINTERN
void delete_GeosMultiLineString(GeosMultiLineString
*self
){
4088 GEOSGeom geom
= (GEOSGeom
) self
;
4089 GEOSGeom_destroy(geom
);
4091 SWIGINTERN
void delete_GeosMultiLinearRing(GeosMultiLinearRing
*self
){
4092 GEOSGeom geom
= (GEOSGeom
) self
;
4093 GEOSGeom_destroy(geom
);
4095 SWIGINTERN
void delete_GeosMultiPolygon(GeosMultiPolygon
*self
){
4096 GEOSGeom geom
= (GEOSGeom
) self
;
4097 GEOSGeom_destroy(geom
);
4100 GeosGeometry
*createPoint(GeosCoordinateSequence
*s
)
4102 GEOSCoordSeq coords
= (GEOSCoordSeq
) s
;
4103 GEOSGeom geom
= GEOSGeom_createPoint(coords
);
4106 throw std::runtime_error(message
);
4108 return (GeosGeometry
*) geom
;
4111 GeosGeometry
*createLineString(GeosCoordinateSequence
*s
)
4113 GEOSCoordSeq coords
= (GEOSCoordSeq
) s
;
4114 GEOSGeom geom
= GEOSGeom_createLineString(coords
);
4117 throw std::runtime_error(message
);
4119 return (GeosGeometry
*) geom
;
4122 GeosGeometry
*createLinearRing(GeosCoordinateSequence
*s
)
4124 GEOSCoordSeq coords
= (GEOSCoordSeq
) s
;
4125 GEOSGeom geom
= GEOSGeom_createLinearRing(coords
);
4128 throw std::runtime_error(message
);
4130 return (GeosGeometry
*) geom
;
4133 GeosGeometry
*createPolygon(GeosLinearRing
*shell
, GeosLinearRing
**holes
, size_t nholes
)
4135 GEOSGeom shellGeom
= (GEOSGeom
) shell
;
4136 GEOSGeom
* holeGeoms
= (GEOSGeom
*) holes
;
4137 GEOSGeom geom
= GEOSGeom_createPolygon(shellGeom
, holeGeoms
, nholes
);
4140 throw std::runtime_error(message
);
4142 return (GeosGeometry
*) geom
;
4147 typedef void GeosPreparedGeometry
;
4149 SWIGINTERN GeosPreparedGeometry
*new_GeosPreparedGeometry(GeosGeometry
const *source
){
4150 const GEOSPreparedGeometry
*prep
= GEOSPrepare((const GEOSGeometry
*)source
);
4152 throw std::runtime_error(message
);
4153 return (GeosPreparedGeometry
*) prep
;
4155 SWIGINTERN
void delete_GeosPreparedGeometry(GeosPreparedGeometry
*self
){
4156 GEOSPreparedGeometry
*prep
= (GEOSPreparedGeometry
*) self
;
4157 return GEOSPreparedGeom_destroy(prep
);
4159 SWIGINTERN
bool GeosPreparedGeometry_contains(GeosPreparedGeometry
*self
,GeosGeometry
const *other
){
4160 GEOSPreparedGeometry
*prep
= (GEOSPreparedGeometry
*) self
;
4161 GEOSGeom otherGeom
= (GEOSGeom
) other
;
4162 return checkBoolResult(GEOSPreparedContains(prep
, otherGeom
));
4164 SWIGINTERN
bool GeosPreparedGeometry_containsProperly(GeosPreparedGeometry
*self
,GeosGeometry
const *other
){
4165 GEOSPreparedGeometry
*prep
= (GEOSPreparedGeometry
*) self
;
4166 GEOSGeom otherGeom
= (GEOSGeom
) other
;
4167 return checkBoolResult(GEOSPreparedContainsProperly(prep
, otherGeom
));
4169 SWIGINTERN
bool GeosPreparedGeometry_covers(GeosPreparedGeometry
*self
,GeosGeometry
const *other
){
4170 GEOSPreparedGeometry
*prep
= (GEOSPreparedGeometry
*) self
;
4171 GEOSGeom otherGeom
= (GEOSGeom
) other
;
4172 return checkBoolResult(GEOSPreparedCovers(prep
, otherGeom
));
4174 SWIGINTERN
bool GeosPreparedGeometry_intersects(GeosPreparedGeometry
*self
,GeosGeometry
const *other
){
4175 GEOSPreparedGeometry
*prep
= (GEOSPreparedGeometry
*) self
;
4176 GEOSGeom otherGeom
= (GEOSGeom
) other
;
4177 return checkBoolResult(GEOSPreparedIntersects(prep
, otherGeom
));
4180 typedef void GeosSTRtree
;
4181 /* GeosIndexItem typedef'd here so it can be %typemap(typecheck)'d
4182 as a native object by each language specially */
4183 typedef void *GeosIndexItem
;
4184 typedef GEOSQueryCallback GeosQueryCallback
;
4186 SWIGINTERN GeosSTRtree
*new_GeosSTRtree(int nodeCapacity
){
4187 GEOSSTRtree
*tree
= GEOSSTRtree_create(nodeCapacity
);
4189 throw std::runtime_error(message
);
4190 return (GeosSTRtree
*) tree
;
4192 SWIGINTERN
void delete_GeosSTRtree(GeosSTRtree
*self
){
4193 GEOSSTRtree
*tree
= (GEOSSTRtree
*) self
;
4194 return GEOSSTRtree_destroy(tree
);
4196 SWIGINTERN
void GeosSTRtree_insert(GeosSTRtree
*self
,GeosGeometry
const *g
,GeosIndexItem item
){
4197 GEOSSTRtree
*tree
= (GEOSSTRtree
*) self
;
4198 const GEOSGeometry
*geom
= (const GEOSGeometry
*) g
;
4199 GEOSSTRtree_insert(tree
, geom
, item
);
4201 SWIGINTERN
void GeosSTRtree_remove(GeosSTRtree
*self
,GeosGeometry
const *g
,GeosIndexItem item
){
4202 GEOSSTRtree
*tree
= (GEOSSTRtree
*) self
;
4203 const GEOSGeometry
*geom
= (const GEOSGeometry
*) g
;
4204 GEOSSTRtree_remove(tree
, geom
, item
);
4206 SWIGINTERN
void GeosSTRtree_query(GeosSTRtree
*self
,GeosGeometry
const *g
,GeosQueryCallback callback
,GeosIndexItem accumulator
){
4207 GEOSSTRtree
*tree
= (GEOSSTRtree
*) self
;
4208 const GEOSGeometry
*geom
= (const GEOSGeometry
*) g
;
4209 GEOSSTRtree_query(tree
, geom
, callback
, accumulator
);
4211 SWIGINTERN
void GeosSTRtree_iterate(GeosSTRtree
*self
,GeosQueryCallback callback
,GeosIndexItem accumulator
){
4212 GEOSSTRtree
*tree
= (GEOSSTRtree
*) self
;
4213 GEOSSTRtree_iterate(tree
, callback
, accumulator
);
4215 SWIGINTERN GeosWktReader
*new_GeosWktReader(){
4216 return GEOSWKTReader_create();
4218 SWIGINTERN
void delete_GeosWktReader(GeosWktReader
*self
){
4219 GEOSWKTReader
*reader
= (GEOSWKTReader
*) self
;
4220 GEOSWKTReader_destroy(reader
);
4222 SWIGINTERN GeosGeometry
*GeosWktReader_read(GeosWktReader
*self
,char const *wkt
){
4224 throw std::runtime_error("Trying to create geometry from a NULL string");
4226 GEOSWKTReader
*reader
= (GEOSWKTReader
*) self
;
4227 GEOSGeometry
*geom
= GEOSWKTReader_read(reader
, wkt
);
4230 throw std::runtime_error(message
);
4232 return (GeosGeometry
*) geom
;
4234 SWIGINTERN GeosWktWriter
*new_GeosWktWriter(){
4235 return GEOSWKTWriter_create();
4237 SWIGINTERN
void delete_GeosWktWriter(GeosWktWriter
*self
){
4238 GEOSWKTWriter
*writer
= (GEOSWKTWriter
*) self
;
4239 GEOSWKTWriter_destroy(writer
);
4241 SWIGINTERN
char *GeosWktWriter_write(GeosWktWriter
*self
,GeosGeometry
const *g
){
4242 GEOSWKTWriter
*writer
= (GEOSWKTWriter
*) self
;
4243 GEOSGeom geom
= (GEOSGeom
) g
;
4244 return GEOSWKTWriter_write(writer
, geom
);
4246 SWIGINTERN GeosWkbReader
*new_GeosWkbReader(){
4247 return GEOSWKBReader_create();
4249 SWIGINTERN
void delete_GeosWkbReader(GeosWkbReader
*self
){
4250 GEOSWKBReader
*reader
= (GEOSWKBReader
*) self
;
4251 GEOSWKBReader_destroy(reader
);
4253 SWIGINTERN GeosGeometry
*GeosWkbReader_read(GeosWkbReader
*self
,unsigned char const *wkb
,size_t size
){
4255 throw std::runtime_error("Trying to create geometry from a NULL string");
4257 GEOSWKBReader
*reader
= (GEOSWKBReader
*) self
;
4258 GEOSGeometry
*geom
= GEOSWKBReader_read(reader
, wkb
, size
);
4261 throw std::runtime_error(message
);
4263 return (GeosGeometry
*) geom
;
4265 SWIGINTERN GeosGeometry
*GeosWkbReader_readHEX(GeosWkbReader
*self
,unsigned char const *wkb
,size_t size
){
4267 throw std::runtime_error("Trying to create geometry from a NULL string");
4269 GEOSWKBReader
*reader
= (GEOSWKBReader
*) self
;
4270 GEOSGeometry
*geom
= GEOSWKBReader_readHEX(reader
, wkb
, size
);
4273 throw std::runtime_error(message
);
4275 return (GeosGeometry
*) geom
;
4277 SWIGINTERN GeosWkbWriter
*new_GeosWkbWriter(){
4278 return GEOSWKBWriter_create();
4280 SWIGINTERN
void delete_GeosWkbWriter(GeosWkbWriter
*self
){
4281 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4282 GEOSWKBWriter_destroy(writer
);
4284 SWIGINTERN
int GeosWkbWriter_getOutputDimension(GeosWkbWriter
*self
){
4285 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4286 return GEOSWKBWriter_getOutputDimension(writer
);
4288 SWIGINTERN
void GeosWkbWriter_setOutputDimension(GeosWkbWriter
*self
,int newDimension
){
4289 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4290 GEOSWKBWriter_setOutputDimension(writer
, newDimension
);
4292 SWIGINTERN
int GeosWkbWriter_getByteOrder(GeosWkbWriter
*self
){
4293 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4294 return GEOSWKBWriter_getByteOrder(writer
);
4296 SWIGINTERN
void GeosWkbWriter_setByteOrder(GeosWkbWriter
*self
,int newByteOrder
){
4297 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4298 return GEOSWKBWriter_setByteOrder(writer
, newByteOrder
);
4300 SWIGINTERN
bool GeosWkbWriter_getIncludeSRID(GeosWkbWriter
*self
){
4301 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4302 return GEOSWKBWriter_getIncludeSRID(writer
);
4306 SWIG_AsVal_bool (PyObject
*obj
, bool *val
)
4308 int r
= PyObject_IsTrue(obj
);
4311 if (val
) *val
= r
? true : false;
4315 SWIGINTERN
void GeosWkbWriter_setIncludeSRID(GeosWkbWriter
*self
,bool newIncludeSRID
){
4316 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4317 return GEOSWKBWriter_setIncludeSRID(writer
, newIncludeSRID
);
4319 SWIGINTERN
unsigned char *GeosWkbWriter_write(GeosWkbWriter
*self
,GeosGeometry
const *g
,size_t *size
){
4320 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4321 GEOSGeom geom
= (GEOSGeom
) g
;
4322 return GEOSWKBWriter_write(writer
, geom
, size
);
4324 SWIGINTERN
unsigned char *GeosWkbWriter_writeHEX(GeosWkbWriter
*self
,GeosGeometry
const *g
,size_t *size
){
4325 GEOSWKBWriter
*writer
= (GEOSWKBWriter
*) self
;
4326 GEOSGeom geom
= (GEOSGeom
) g
;
4327 return GEOSWKBWriter_writeHEX(writer
, geom
, size
);
4332 SWIGINTERN PyObject
*_wrap_delete_SwigPyIterator(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4333 PyObject
*resultobj
= 0;
4334 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4337 PyObject
* obj0
= 0 ;
4339 if(!PyArg_UnpackTuple(args
,(char *)"delete_SwigPyIterator",1,1,&obj0
)) SWIG_fail
;
4340 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, SWIG_POINTER_DISOWN
| 0 );
4341 if (!SWIG_IsOK(res1
)) {
4342 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4344 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4346 resultobj
= SWIG_Py_Void();
4353 SWIGINTERN PyObject
*_wrap_SwigPyIterator_value(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4354 PyObject
*resultobj
= 0;
4355 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4358 PyObject
* obj0
= 0 ;
4359 PyObject
*result
= 0 ;
4361 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_value",1,1,&obj0
)) SWIG_fail
;
4362 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4363 if (!SWIG_IsOK(res1
)) {
4364 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
4366 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4368 result
= (PyObject
*)((swig::SwigPyIterator
const *)arg1
)->value();
4370 catch(swig::stop_iteration
&_e
) {
4373 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4385 SWIGINTERN PyObject
*_wrap_SwigPyIterator_incr__SWIG_0(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4386 PyObject
*resultobj
= 0;
4387 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4393 PyObject
* obj0
= 0 ;
4394 PyObject
* obj1
= 0 ;
4395 swig::SwigPyIterator
*result
= 0 ;
4397 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_incr",2,2,&obj0
,&obj1
)) SWIG_fail
;
4398 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4399 if (!SWIG_IsOK(res1
)) {
4400 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4402 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4403 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
4404 if (!SWIG_IsOK(ecode2
)) {
4405 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'");
4407 arg2
= static_cast< size_t >(val2
);
4409 result
= (swig::SwigPyIterator
*)(arg1
)->incr(arg2
);
4411 catch(swig::stop_iteration
&_e
) {
4414 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4419 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4426 SWIGINTERN PyObject
*_wrap_SwigPyIterator_incr__SWIG_1(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4427 PyObject
*resultobj
= 0;
4428 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4431 PyObject
* obj0
= 0 ;
4432 swig::SwigPyIterator
*result
= 0 ;
4434 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_incr",1,1,&obj0
)) SWIG_fail
;
4435 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4436 if (!SWIG_IsOK(res1
)) {
4437 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4439 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4441 result
= (swig::SwigPyIterator
*)(arg1
)->incr();
4443 catch(swig::stop_iteration
&_e
) {
4446 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4451 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4458 SWIGINTERN PyObject
*_wrap_SwigPyIterator_incr(PyObject
*self
, PyObject
*args
) {
4463 if (!PyTuple_Check(args
)) SWIG_fail
;
4464 argc
= args
? (int)PyObject_Length(args
) : 0;
4465 for (ii
= 0; (ii
< 2) && (ii
< argc
); ii
++) {
4466 argv
[ii
] = PyTuple_GET_ITEM(args
,ii
);
4471 int res
= SWIG_ConvertPtr(argv
[0], &vptr
, SWIGTYPE_p_swig__SwigPyIterator
, 0);
4472 _v
= SWIG_CheckState(res
);
4474 return _wrap_SwigPyIterator_incr__SWIG_1(self
, args
);
4480 int res
= SWIG_ConvertPtr(argv
[0], &vptr
, SWIGTYPE_p_swig__SwigPyIterator
, 0);
4481 _v
= SWIG_CheckState(res
);
4484 int res
= SWIG_AsVal_size_t(argv
[1], NULL
);
4485 _v
= SWIG_CheckState(res
);
4488 return _wrap_SwigPyIterator_incr__SWIG_0(self
, args
);
4494 SWIG_SetErrorMsg(PyExc_NotImplementedError
,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n"
4495 " Possible C/C++ prototypes are:\n"
4496 " swig::SwigPyIterator::incr(size_t)\n"
4497 " swig::SwigPyIterator::incr()\n");
4502 SWIGINTERN PyObject
*_wrap_SwigPyIterator_decr__SWIG_0(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4503 PyObject
*resultobj
= 0;
4504 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4510 PyObject
* obj0
= 0 ;
4511 PyObject
* obj1
= 0 ;
4512 swig::SwigPyIterator
*result
= 0 ;
4514 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_decr",2,2,&obj0
,&obj1
)) SWIG_fail
;
4515 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4516 if (!SWIG_IsOK(res1
)) {
4517 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4519 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4520 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
4521 if (!SWIG_IsOK(ecode2
)) {
4522 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'");
4524 arg2
= static_cast< size_t >(val2
);
4526 result
= (swig::SwigPyIterator
*)(arg1
)->decr(arg2
);
4528 catch(swig::stop_iteration
&_e
) {
4531 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4536 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4543 SWIGINTERN PyObject
*_wrap_SwigPyIterator_decr__SWIG_1(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4544 PyObject
*resultobj
= 0;
4545 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4548 PyObject
* obj0
= 0 ;
4549 swig::SwigPyIterator
*result
= 0 ;
4551 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_decr",1,1,&obj0
)) SWIG_fail
;
4552 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4553 if (!SWIG_IsOK(res1
)) {
4554 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4556 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4558 result
= (swig::SwigPyIterator
*)(arg1
)->decr();
4560 catch(swig::stop_iteration
&_e
) {
4563 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4568 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4575 SWIGINTERN PyObject
*_wrap_SwigPyIterator_decr(PyObject
*self
, PyObject
*args
) {
4580 if (!PyTuple_Check(args
)) SWIG_fail
;
4581 argc
= args
? (int)PyObject_Length(args
) : 0;
4582 for (ii
= 0; (ii
< 2) && (ii
< argc
); ii
++) {
4583 argv
[ii
] = PyTuple_GET_ITEM(args
,ii
);
4588 int res
= SWIG_ConvertPtr(argv
[0], &vptr
, SWIGTYPE_p_swig__SwigPyIterator
, 0);
4589 _v
= SWIG_CheckState(res
);
4591 return _wrap_SwigPyIterator_decr__SWIG_1(self
, args
);
4597 int res
= SWIG_ConvertPtr(argv
[0], &vptr
, SWIGTYPE_p_swig__SwigPyIterator
, 0);
4598 _v
= SWIG_CheckState(res
);
4601 int res
= SWIG_AsVal_size_t(argv
[1], NULL
);
4602 _v
= SWIG_CheckState(res
);
4605 return _wrap_SwigPyIterator_decr__SWIG_0(self
, args
);
4611 SWIG_SetErrorMsg(PyExc_NotImplementedError
,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n"
4612 " Possible C/C++ prototypes are:\n"
4613 " swig::SwigPyIterator::decr(size_t)\n"
4614 " swig::SwigPyIterator::decr()\n");
4619 SWIGINTERN PyObject
*_wrap_SwigPyIterator_distance(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4620 PyObject
*resultobj
= 0;
4621 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4622 swig::SwigPyIterator
*arg2
= 0 ;
4627 PyObject
* obj0
= 0 ;
4628 PyObject
* obj1
= 0 ;
4631 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_distance",2,2,&obj0
,&obj1
)) SWIG_fail
;
4632 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4633 if (!SWIG_IsOK(res1
)) {
4634 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
4636 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4637 res2
= SWIG_ConvertPtr(obj1
, &argp2
, SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0);
4638 if (!SWIG_IsOK(res2
)) {
4639 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
4642 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
4644 arg2
= reinterpret_cast< swig::SwigPyIterator
* >(argp2
);
4646 result
= ((swig::SwigPyIterator
const *)arg1
)->distance((swig::SwigPyIterator
const &)*arg2
);
4648 catch(std::invalid_argument
&_e
) {
4649 SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument
& >(_e
))),SWIGTYPE_p_std__invalid_argument
,SWIG_POINTER_OWN
), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument
); SWIG_fail
;
4652 resultobj
= SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result
));
4659 SWIGINTERN PyObject
*_wrap_SwigPyIterator_equal(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4660 PyObject
*resultobj
= 0;
4661 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4662 swig::SwigPyIterator
*arg2
= 0 ;
4667 PyObject
* obj0
= 0 ;
4668 PyObject
* obj1
= 0 ;
4671 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_equal",2,2,&obj0
,&obj1
)) SWIG_fail
;
4672 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4673 if (!SWIG_IsOK(res1
)) {
4674 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
4676 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4677 res2
= SWIG_ConvertPtr(obj1
, &argp2
, SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0);
4678 if (!SWIG_IsOK(res2
)) {
4679 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
4682 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
4684 arg2
= reinterpret_cast< swig::SwigPyIterator
* >(argp2
);
4686 result
= (bool)((swig::SwigPyIterator
const *)arg1
)->equal((swig::SwigPyIterator
const &)*arg2
);
4688 catch(std::invalid_argument
&_e
) {
4689 SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument
& >(_e
))),SWIGTYPE_p_std__invalid_argument
,SWIG_POINTER_OWN
), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument
); SWIG_fail
;
4692 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
4699 SWIGINTERN PyObject
*_wrap_SwigPyIterator_copy(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4700 PyObject
*resultobj
= 0;
4701 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4704 PyObject
* obj0
= 0 ;
4705 swig::SwigPyIterator
*result
= 0 ;
4707 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_copy",1,1,&obj0
)) SWIG_fail
;
4708 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4709 if (!SWIG_IsOK(res1
)) {
4710 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
4712 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4713 result
= (swig::SwigPyIterator
*)((swig::SwigPyIterator
const *)arg1
)->copy();
4714 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, SWIG_POINTER_OWN
| 0 );
4721 SWIGINTERN PyObject
*_wrap_SwigPyIterator_next(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4722 PyObject
*resultobj
= 0;
4723 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4726 PyObject
* obj0
= 0 ;
4727 PyObject
*result
= 0 ;
4729 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_next",1,1,&obj0
)) SWIG_fail
;
4730 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4731 if (!SWIG_IsOK(res1
)) {
4732 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4734 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4736 result
= (PyObject
*)(arg1
)->next();
4738 catch(swig::stop_iteration
&_e
) {
4741 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4753 SWIGINTERN PyObject
*_wrap_SwigPyIterator___next__(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4754 PyObject
*resultobj
= 0;
4755 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4758 PyObject
* obj0
= 0 ;
4759 PyObject
*result
= 0 ;
4761 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator___next__",1,1,&obj0
)) SWIG_fail
;
4762 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4763 if (!SWIG_IsOK(res1
)) {
4764 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4766 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4768 result
= (PyObject
*)(arg1
)->__next__();
4770 catch(swig::stop_iteration
&_e
) {
4773 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4785 SWIGINTERN PyObject
*_wrap_SwigPyIterator_previous(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4786 PyObject
*resultobj
= 0;
4787 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4790 PyObject
* obj0
= 0 ;
4791 PyObject
*result
= 0 ;
4793 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_previous",1,1,&obj0
)) SWIG_fail
;
4794 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4795 if (!SWIG_IsOK(res1
)) {
4796 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4798 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4800 result
= (PyObject
*)(arg1
)->previous();
4802 catch(swig::stop_iteration
&_e
) {
4805 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4817 SWIGINTERN PyObject
*_wrap_SwigPyIterator_advance(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4818 PyObject
*resultobj
= 0;
4819 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4825 PyObject
* obj0
= 0 ;
4826 PyObject
* obj1
= 0 ;
4827 swig::SwigPyIterator
*result
= 0 ;
4829 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator_advance",2,2,&obj0
,&obj1
)) SWIG_fail
;
4830 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4831 if (!SWIG_IsOK(res1
)) {
4832 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4834 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4835 ecode2
= SWIG_AsVal_ptrdiff_t(obj1
, &val2
);
4836 if (!SWIG_IsOK(ecode2
)) {
4837 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
4839 arg2
= static_cast< ptrdiff_t >(val2
);
4841 result
= (swig::SwigPyIterator
*)(arg1
)->advance(arg2
);
4843 catch(swig::stop_iteration
&_e
) {
4846 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4851 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4858 SWIGINTERN PyObject
*_wrap_SwigPyIterator___eq__(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4859 PyObject
*resultobj
= 0;
4860 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4861 swig::SwigPyIterator
*arg2
= 0 ;
4866 PyObject
* obj0
= 0 ;
4867 PyObject
* obj1
= 0 ;
4870 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator___eq__",2,2,&obj0
,&obj1
)) SWIG_fail
;
4871 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4872 if (!SWIG_IsOK(res1
)) {
4873 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
4875 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4876 res2
= SWIG_ConvertPtr(obj1
, &argp2
, SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0);
4877 if (!SWIG_IsOK(res2
)) {
4878 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
4881 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
4883 arg2
= reinterpret_cast< swig::SwigPyIterator
* >(argp2
);
4884 result
= (bool)((swig::SwigPyIterator
const *)arg1
)->operator ==((swig::SwigPyIterator
const &)*arg2
);
4885 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
4892 SWIGINTERN PyObject
*_wrap_SwigPyIterator___ne__(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4893 PyObject
*resultobj
= 0;
4894 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4895 swig::SwigPyIterator
*arg2
= 0 ;
4900 PyObject
* obj0
= 0 ;
4901 PyObject
* obj1
= 0 ;
4904 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator___ne__",2,2,&obj0
,&obj1
)) SWIG_fail
;
4905 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
4906 if (!SWIG_IsOK(res1
)) {
4907 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
4909 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4910 res2
= SWIG_ConvertPtr(obj1
, &argp2
, SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0);
4911 if (!SWIG_IsOK(res2
)) {
4912 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
4915 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
4917 arg2
= reinterpret_cast< swig::SwigPyIterator
* >(argp2
);
4918 result
= (bool)((swig::SwigPyIterator
const *)arg1
)->operator !=((swig::SwigPyIterator
const &)*arg2
);
4919 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
4926 SWIGINTERN PyObject
*_wrap_SwigPyIterator___iadd__(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4927 PyObject
*resultobj
= 0;
4928 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4934 PyObject
* obj0
= 0 ;
4935 PyObject
* obj1
= 0 ;
4936 swig::SwigPyIterator
*result
= 0 ;
4938 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator___iadd__",2,2,&obj0
,&obj1
)) SWIG_fail
;
4939 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, SWIG_POINTER_DISOWN
| 0 );
4940 if (!SWIG_IsOK(res1
)) {
4941 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4943 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4944 ecode2
= SWIG_AsVal_ptrdiff_t(obj1
, &val2
);
4945 if (!SWIG_IsOK(ecode2
)) {
4946 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
4948 arg2
= static_cast< ptrdiff_t >(val2
);
4950 result
= (swig::SwigPyIterator
*) &(arg1
)->operator +=(arg2
);
4952 catch(swig::stop_iteration
&_e
) {
4955 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
4960 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, SWIG_POINTER_OWN
| 0 );
4967 SWIGINTERN PyObject
*_wrap_SwigPyIterator___isub__(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4968 PyObject
*resultobj
= 0;
4969 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
4975 PyObject
* obj0
= 0 ;
4976 PyObject
* obj1
= 0 ;
4977 swig::SwigPyIterator
*result
= 0 ;
4979 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator___isub__",2,2,&obj0
,&obj1
)) SWIG_fail
;
4980 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, SWIG_POINTER_DISOWN
| 0 );
4981 if (!SWIG_IsOK(res1
)) {
4982 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'");
4984 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
4985 ecode2
= SWIG_AsVal_ptrdiff_t(obj1
, &val2
);
4986 if (!SWIG_IsOK(ecode2
)) {
4987 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
4989 arg2
= static_cast< ptrdiff_t >(val2
);
4991 result
= (swig::SwigPyIterator
*) &(arg1
)->operator -=(arg2
);
4993 catch(swig::stop_iteration
&_e
) {
4996 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
5001 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, SWIG_POINTER_OWN
| 0 );
5008 SWIGINTERN PyObject
*_wrap_SwigPyIterator___add__(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5009 PyObject
*resultobj
= 0;
5010 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
5016 PyObject
* obj0
= 0 ;
5017 PyObject
* obj1
= 0 ;
5018 swig::SwigPyIterator
*result
= 0 ;
5020 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator___add__",2,2,&obj0
,&obj1
)) SWIG_fail
;
5021 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
5022 if (!SWIG_IsOK(res1
)) {
5023 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
5025 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
5026 ecode2
= SWIG_AsVal_ptrdiff_t(obj1
, &val2
);
5027 if (!SWIG_IsOK(ecode2
)) {
5028 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
5030 arg2
= static_cast< ptrdiff_t >(val2
);
5032 result
= (swig::SwigPyIterator
*)((swig::SwigPyIterator
const *)arg1
)->operator +(arg2
);
5034 catch(swig::stop_iteration
&_e
) {
5037 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
5042 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, SWIG_POINTER_OWN
| 0 );
5049 SWIGINTERN PyObject
*_wrap_SwigPyIterator___sub____SWIG_0(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5050 PyObject
*resultobj
= 0;
5051 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
5057 PyObject
* obj0
= 0 ;
5058 PyObject
* obj1
= 0 ;
5059 swig::SwigPyIterator
*result
= 0 ;
5061 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator___sub__",2,2,&obj0
,&obj1
)) SWIG_fail
;
5062 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
5063 if (!SWIG_IsOK(res1
)) {
5064 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
5066 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
5067 ecode2
= SWIG_AsVal_ptrdiff_t(obj1
, &val2
);
5068 if (!SWIG_IsOK(ecode2
)) {
5069 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
5071 arg2
= static_cast< ptrdiff_t >(val2
);
5073 result
= (swig::SwigPyIterator
*)((swig::SwigPyIterator
const *)arg1
)->operator -(arg2
);
5075 catch(swig::stop_iteration
&_e
) {
5078 SWIG_SetErrorObj(PyExc_StopIteration
, SWIG_Py_Void());
5083 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_swig__SwigPyIterator
, SWIG_POINTER_OWN
| 0 );
5090 SWIGINTERN PyObject
*_wrap_SwigPyIterator___sub____SWIG_1(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5091 PyObject
*resultobj
= 0;
5092 swig::SwigPyIterator
*arg1
= (swig::SwigPyIterator
*) 0 ;
5093 swig::SwigPyIterator
*arg2
= 0 ;
5098 PyObject
* obj0
= 0 ;
5099 PyObject
* obj1
= 0 ;
5102 if(!PyArg_UnpackTuple(args
,(char *)"SwigPyIterator___sub__",2,2,&obj0
,&obj1
)) SWIG_fail
;
5103 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0 );
5104 if (!SWIG_IsOK(res1
)) {
5105 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'");
5107 arg1
= reinterpret_cast< swig::SwigPyIterator
* >(argp1
);
5108 res2
= SWIG_ConvertPtr(obj1
, &argp2
, SWIGTYPE_p_swig__SwigPyIterator
, 0 | 0);
5109 if (!SWIG_IsOK(res2
)) {
5110 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
5113 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'");
5115 arg2
= reinterpret_cast< swig::SwigPyIterator
* >(argp2
);
5116 result
= ((swig::SwigPyIterator
const *)arg1
)->operator -((swig::SwigPyIterator
const &)*arg2
);
5117 resultobj
= SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result
));
5124 SWIGINTERN PyObject
*_wrap_SwigPyIterator___sub__(PyObject
*self
, PyObject
*args
) {
5129 if (!PyTuple_Check(args
)) SWIG_fail
;
5130 argc
= args
? (int)PyObject_Length(args
) : 0;
5131 for (ii
= 0; (ii
< 2) && (ii
< argc
); ii
++) {
5132 argv
[ii
] = PyTuple_GET_ITEM(args
,ii
);
5137 int res
= SWIG_ConvertPtr(argv
[0], &vptr
, SWIGTYPE_p_swig__SwigPyIterator
, 0);
5138 _v
= SWIG_CheckState(res
);
5140 int res
= SWIG_ConvertPtr(argv
[1], 0, SWIGTYPE_p_swig__SwigPyIterator
, 0);
5141 _v
= SWIG_CheckState(res
);
5143 return _wrap_SwigPyIterator___sub____SWIG_1(self
, args
);
5150 int res
= SWIG_ConvertPtr(argv
[0], &vptr
, SWIGTYPE_p_swig__SwigPyIterator
, 0);
5151 _v
= SWIG_CheckState(res
);
5154 int res
= SWIG_AsVal_ptrdiff_t(argv
[1], NULL
);
5155 _v
= SWIG_CheckState(res
);
5158 return _wrap_SwigPyIterator___sub____SWIG_0(self
, args
);
5164 Py_INCREF(Py_NotImplemented
);
5165 return Py_NotImplemented
;
5169 SWIGINTERN PyObject
*SwigPyIterator_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5171 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
5172 SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator
, SWIG_NewClientData(obj
));
5173 return SWIG_Py_Void();
5176 SWIGINTERN PyObject
*_wrap_version(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5177 PyObject
*resultobj
= 0;
5180 result
= (char *)GEOSversion();
5181 resultobj
= SWIG_FromCharPtr((const char *)result
);
5188 SWIGINTERN PyObject
*_wrap_new_CoordinateSequence(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5189 PyObject
*resultobj
= 0;
5196 PyObject
* obj0
= 0 ;
5197 PyObject
* obj1
= 0 ;
5198 GeosCoordinateSequence
*result
= 0 ;
5200 if(!PyArg_UnpackTuple(args
,(char *)"new_CoordinateSequence",2,2,&obj0
,&obj1
)) SWIG_fail
;
5201 ecode1
= SWIG_AsVal_size_t(obj0
, &val1
);
5202 if (!SWIG_IsOK(ecode1
)) {
5203 SWIG_exception_fail(SWIG_ArgError(ecode1
), "in method '" "new_CoordinateSequence" "', argument " "1"" of type '" "size_t""'");
5205 arg1
= static_cast< size_t >(val1
);
5206 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5207 if (!SWIG_IsOK(ecode2
)) {
5208 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "new_CoordinateSequence" "', argument " "2"" of type '" "size_t""'");
5210 arg2
= static_cast< size_t >(val2
);
5214 result
= (GeosCoordinateSequence
*)new_GeosCoordinateSequence(arg1
,arg2
);
5216 catch (const std::exception
& e
)
5218 SWIG_exception(SWIG_RuntimeError
, e
.what());
5221 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosCoordinateSequence
, SWIG_POINTER_NEW
| 0 );
5228 SWIGINTERN PyObject
*_wrap_delete_CoordinateSequence(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5229 PyObject
*resultobj
= 0;
5230 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5233 PyObject
* obj0
= 0 ;
5235 if(!PyArg_UnpackTuple(args
,(char *)"delete_CoordinateSequence",1,1,&obj0
)) SWIG_fail
;
5236 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, SWIG_POINTER_DISOWN
| 0 );
5237 if (!SWIG_IsOK(res1
)) {
5238 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_CoordinateSequence" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5240 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5244 delete_GeosCoordinateSequence(arg1
);
5246 catch (const std::exception
& e
)
5248 SWIG_exception(SWIG_RuntimeError
, e
.what());
5251 resultobj
= SWIG_Py_Void();
5258 SWIGINTERN PyObject
*_wrap_CoordinateSequence_clone(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5259 PyObject
*resultobj
= 0;
5260 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5263 PyObject
* obj0
= 0 ;
5264 GeosCoordinateSequence
*result
= 0 ;
5266 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_clone",1,1,&obj0
)) SWIG_fail
;
5267 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5268 if (!SWIG_IsOK(res1
)) {
5269 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_clone" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5271 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5275 result
= (GeosCoordinateSequence
*)GeosCoordinateSequence_clone(arg1
);
5277 catch (const std::exception
& e
)
5279 SWIG_exception(SWIG_RuntimeError
, e
.what());
5282 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosCoordinateSequence
, SWIG_POINTER_OWN
| 0 );
5289 SWIGINTERN PyObject
*_wrap_CoordinateSequence_setX(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5290 PyObject
*resultobj
= 0;
5291 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5300 PyObject
* obj0
= 0 ;
5301 PyObject
* obj1
= 0 ;
5302 PyObject
* obj2
= 0 ;
5305 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_setX",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
5306 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5307 if (!SWIG_IsOK(res1
)) {
5308 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_setX" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5310 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5311 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5312 if (!SWIG_IsOK(ecode2
)) {
5313 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "CoordinateSequence_setX" "', argument " "2"" of type '" "size_t""'");
5315 arg2
= static_cast< size_t >(val2
);
5316 ecode3
= SWIG_AsVal_double(obj2
, &val3
);
5317 if (!SWIG_IsOK(ecode3
)) {
5318 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "CoordinateSequence_setX" "', argument " "3"" of type '" "double""'");
5320 arg3
= static_cast< double >(val3
);
5324 result
= (int)GeosCoordinateSequence_setX(arg1
,arg2
,arg3
);
5326 catch (const std::exception
& e
)
5328 SWIG_exception(SWIG_RuntimeError
, e
.what());
5331 resultobj
= SWIG_From_int(static_cast< int >(result
));
5338 SWIGINTERN PyObject
*_wrap_CoordinateSequence_setY(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5339 PyObject
*resultobj
= 0;
5340 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5349 PyObject
* obj0
= 0 ;
5350 PyObject
* obj1
= 0 ;
5351 PyObject
* obj2
= 0 ;
5354 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_setY",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
5355 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5356 if (!SWIG_IsOK(res1
)) {
5357 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_setY" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5359 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5360 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5361 if (!SWIG_IsOK(ecode2
)) {
5362 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "CoordinateSequence_setY" "', argument " "2"" of type '" "size_t""'");
5364 arg2
= static_cast< size_t >(val2
);
5365 ecode3
= SWIG_AsVal_double(obj2
, &val3
);
5366 if (!SWIG_IsOK(ecode3
)) {
5367 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "CoordinateSequence_setY" "', argument " "3"" of type '" "double""'");
5369 arg3
= static_cast< double >(val3
);
5373 result
= (int)GeosCoordinateSequence_setY(arg1
,arg2
,arg3
);
5375 catch (const std::exception
& e
)
5377 SWIG_exception(SWIG_RuntimeError
, e
.what());
5380 resultobj
= SWIG_From_int(static_cast< int >(result
));
5387 SWIGINTERN PyObject
*_wrap_CoordinateSequence_setZ(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5388 PyObject
*resultobj
= 0;
5389 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5398 PyObject
* obj0
= 0 ;
5399 PyObject
* obj1
= 0 ;
5400 PyObject
* obj2
= 0 ;
5403 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_setZ",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
5404 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5405 if (!SWIG_IsOK(res1
)) {
5406 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_setZ" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5408 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5409 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5410 if (!SWIG_IsOK(ecode2
)) {
5411 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "CoordinateSequence_setZ" "', argument " "2"" of type '" "size_t""'");
5413 arg2
= static_cast< size_t >(val2
);
5414 ecode3
= SWIG_AsVal_double(obj2
, &val3
);
5415 if (!SWIG_IsOK(ecode3
)) {
5416 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "CoordinateSequence_setZ" "', argument " "3"" of type '" "double""'");
5418 arg3
= static_cast< double >(val3
);
5422 result
= (int)GeosCoordinateSequence_setZ(arg1
,arg2
,arg3
);
5424 catch (const std::exception
& e
)
5426 SWIG_exception(SWIG_RuntimeError
, e
.what());
5429 resultobj
= SWIG_From_int(static_cast< int >(result
));
5436 SWIGINTERN PyObject
*_wrap_CoordinateSequence_setOrdinate(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5437 PyObject
*resultobj
= 0;
5438 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5450 PyObject
* obj0
= 0 ;
5451 PyObject
* obj1
= 0 ;
5452 PyObject
* obj2
= 0 ;
5453 PyObject
* obj3
= 0 ;
5456 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_setOrdinate",4,4,&obj0
,&obj1
,&obj2
,&obj3
)) SWIG_fail
;
5457 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5458 if (!SWIG_IsOK(res1
)) {
5459 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_setOrdinate" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5461 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5462 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5463 if (!SWIG_IsOK(ecode2
)) {
5464 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "CoordinateSequence_setOrdinate" "', argument " "2"" of type '" "size_t""'");
5466 arg2
= static_cast< size_t >(val2
);
5467 ecode3
= SWIG_AsVal_size_t(obj2
, &val3
);
5468 if (!SWIG_IsOK(ecode3
)) {
5469 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "CoordinateSequence_setOrdinate" "', argument " "3"" of type '" "size_t""'");
5471 arg3
= static_cast< size_t >(val3
);
5472 ecode4
= SWIG_AsVal_double(obj3
, &val4
);
5473 if (!SWIG_IsOK(ecode4
)) {
5474 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "CoordinateSequence_setOrdinate" "', argument " "4"" of type '" "double""'");
5476 arg4
= static_cast< double >(val4
);
5480 result
= (int)GeosCoordinateSequence_setOrdinate(arg1
,arg2
,arg3
,arg4
);
5482 catch (const std::exception
& e
)
5484 SWIG_exception(SWIG_RuntimeError
, e
.what());
5487 resultobj
= SWIG_From_int(static_cast< int >(result
));
5494 SWIGINTERN PyObject
*_wrap_CoordinateSequence_getX(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5495 PyObject
*resultobj
= 0;
5496 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5502 PyObject
* obj0
= 0 ;
5503 PyObject
* obj1
= 0 ;
5506 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_getX",2,2,&obj0
,&obj1
)) SWIG_fail
;
5507 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5508 if (!SWIG_IsOK(res1
)) {
5509 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_getX" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5511 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5512 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5513 if (!SWIG_IsOK(ecode2
)) {
5514 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "CoordinateSequence_getX" "', argument " "2"" of type '" "size_t""'");
5516 arg2
= static_cast< size_t >(val2
);
5520 result
= (double)GeosCoordinateSequence_getX(arg1
,arg2
);
5522 catch (const std::exception
& e
)
5524 SWIG_exception(SWIG_RuntimeError
, e
.what());
5527 resultobj
= SWIG_From_double(static_cast< double >(result
));
5534 SWIGINTERN PyObject
*_wrap_CoordinateSequence_getY(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5535 PyObject
*resultobj
= 0;
5536 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5542 PyObject
* obj0
= 0 ;
5543 PyObject
* obj1
= 0 ;
5546 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_getY",2,2,&obj0
,&obj1
)) SWIG_fail
;
5547 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5548 if (!SWIG_IsOK(res1
)) {
5549 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_getY" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5551 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5552 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5553 if (!SWIG_IsOK(ecode2
)) {
5554 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "CoordinateSequence_getY" "', argument " "2"" of type '" "size_t""'");
5556 arg2
= static_cast< size_t >(val2
);
5560 result
= (double)GeosCoordinateSequence_getY(arg1
,arg2
);
5562 catch (const std::exception
& e
)
5564 SWIG_exception(SWIG_RuntimeError
, e
.what());
5567 resultobj
= SWIG_From_double(static_cast< double >(result
));
5574 SWIGINTERN PyObject
*_wrap_CoordinateSequence_getZ(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5575 PyObject
*resultobj
= 0;
5576 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5582 PyObject
* obj0
= 0 ;
5583 PyObject
* obj1
= 0 ;
5586 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_getZ",2,2,&obj0
,&obj1
)) SWIG_fail
;
5587 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5588 if (!SWIG_IsOK(res1
)) {
5589 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_getZ" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5591 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5592 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5593 if (!SWIG_IsOK(ecode2
)) {
5594 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "CoordinateSequence_getZ" "', argument " "2"" of type '" "size_t""'");
5596 arg2
= static_cast< size_t >(val2
);
5600 result
= (double)GeosCoordinateSequence_getZ(arg1
,arg2
);
5602 catch (const std::exception
& e
)
5604 SWIG_exception(SWIG_RuntimeError
, e
.what());
5607 resultobj
= SWIG_From_double(static_cast< double >(result
));
5614 SWIGINTERN PyObject
*_wrap_CoordinateSequence_getOrdinate(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5615 PyObject
*resultobj
= 0;
5616 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5625 PyObject
* obj0
= 0 ;
5626 PyObject
* obj1
= 0 ;
5627 PyObject
* obj2
= 0 ;
5630 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_getOrdinate",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
5631 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5632 if (!SWIG_IsOK(res1
)) {
5633 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_getOrdinate" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5635 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5636 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
5637 if (!SWIG_IsOK(ecode2
)) {
5638 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "CoordinateSequence_getOrdinate" "', argument " "2"" of type '" "size_t""'");
5640 arg2
= static_cast< size_t >(val2
);
5641 ecode3
= SWIG_AsVal_size_t(obj2
, &val3
);
5642 if (!SWIG_IsOK(ecode3
)) {
5643 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "CoordinateSequence_getOrdinate" "', argument " "3"" of type '" "size_t""'");
5645 arg3
= static_cast< size_t >(val3
);
5649 result
= (double)GeosCoordinateSequence_getOrdinate(arg1
,arg2
,arg3
);
5651 catch (const std::exception
& e
)
5653 SWIG_exception(SWIG_RuntimeError
, e
.what());
5656 resultobj
= SWIG_From_double(static_cast< double >(result
));
5663 SWIGINTERN PyObject
*_wrap_CoordinateSequence_getSize(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5664 PyObject
*resultobj
= 0;
5665 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5668 PyObject
* obj0
= 0 ;
5669 unsigned int result
;
5671 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_getSize",1,1,&obj0
)) SWIG_fail
;
5672 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5673 if (!SWIG_IsOK(res1
)) {
5674 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_getSize" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5676 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5680 result
= (unsigned int)GeosCoordinateSequence_getSize(arg1
);
5682 catch (const std::exception
& e
)
5684 SWIG_exception(SWIG_RuntimeError
, e
.what());
5687 resultobj
= SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result
));
5694 SWIGINTERN PyObject
*_wrap_CoordinateSequence_getDimensions(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5695 PyObject
*resultobj
= 0;
5696 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
5699 PyObject
* obj0
= 0 ;
5700 unsigned int result
;
5702 if(!PyArg_UnpackTuple(args
,(char *)"CoordinateSequence_getDimensions",1,1,&obj0
)) SWIG_fail
;
5703 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
5704 if (!SWIG_IsOK(res1
)) {
5705 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "CoordinateSequence_getDimensions" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
5707 arg1
= reinterpret_cast< GeosCoordinateSequence
* >(argp1
);
5711 result
= (unsigned int)GeosCoordinateSequence_getDimensions(arg1
);
5713 catch (const std::exception
& e
)
5715 SWIG_exception(SWIG_RuntimeError
, e
.what());
5718 resultobj
= SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result
));
5725 SWIGINTERN PyObject
*CoordinateSequence_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5727 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
5728 SWIG_TypeNewClientData(SWIGTYPE_p_GeosCoordinateSequence
, SWIG_NewClientData(obj
));
5729 return SWIG_Py_Void();
5732 SWIGINTERN PyObject
*_wrap_delete_Geometry(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5733 PyObject
*resultobj
= 0;
5734 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
5737 PyObject
* obj0
= 0 ;
5739 if(!PyArg_UnpackTuple(args
,(char *)"delete_Geometry",1,1,&obj0
)) SWIG_fail
;
5740 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, SWIG_POINTER_DISOWN
| 0 );
5741 if (!SWIG_IsOK(res1
)) {
5742 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_Geometry" "', argument " "1"" of type '" "GeosGeometry *""'");
5744 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
5748 delete_GeosGeometry(arg1
);
5750 catch (const std::exception
& e
)
5752 SWIG_exception(SWIG_RuntimeError
, e
.what());
5755 resultobj
= SWIG_Py_Void();
5762 SWIGINTERN PyObject
*_wrap_Geometry_clone(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5763 PyObject
*resultobj
= 0;
5764 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
5767 PyObject
* obj0
= 0 ;
5768 GeosGeometry
*result
= 0 ;
5770 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_clone",1,1,&obj0
)) SWIG_fail
;
5771 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
5772 if (!SWIG_IsOK(res1
)) {
5773 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_clone" "', argument " "1"" of type '" "GeosGeometry *""'");
5775 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
5779 result
= (GeosGeometry
*)GeosGeometry_clone(arg1
);
5781 catch (const std::exception
& e
)
5783 SWIG_exception(SWIG_RuntimeError
, e
.what());
5787 /* %typemap(out) GeosGeometry */
5790 SWIG_exception(SWIG_RuntimeError
, message
);
5792 GeosGeometry
*geom
= result
;
5793 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
5798 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
5800 case GEOS_LINESTRING
:
5801 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
5803 case GEOS_LINEARRING
:
5804 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
5807 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
5809 case GEOS_MULTIPOINT
:
5810 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
5812 case GEOS_MULTILINESTRING
:
5813 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
5815 case GEOS_MULTIPOLYGON
:
5816 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
5818 case GEOS_GEOMETRYCOLLECTION
:
5819 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
5829 SWIGINTERN PyObject
*_wrap_Geometry_geomType(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5830 PyObject
*resultobj
= 0;
5831 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
5834 PyObject
* obj0
= 0 ;
5837 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_geomType",1,1,&obj0
)) SWIG_fail
;
5838 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
5839 if (!SWIG_IsOK(res1
)) {
5840 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_geomType" "', argument " "1"" of type '" "GeosGeometry *""'");
5842 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
5846 result
= (char *)GeosGeometry_geomType(arg1
);
5848 catch (const std::exception
& e
)
5850 SWIG_exception(SWIG_RuntimeError
, e
.what());
5853 resultobj
= SWIG_FromCharPtr((const char *)result
);
5860 SWIGINTERN PyObject
*_wrap_Geometry_typeId(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5861 PyObject
*resultobj
= 0;
5862 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
5865 PyObject
* obj0
= 0 ;
5868 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_typeId",1,1,&obj0
)) SWIG_fail
;
5869 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
5870 if (!SWIG_IsOK(res1
)) {
5871 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_typeId" "', argument " "1"" of type '" "GeosGeometry *""'");
5873 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
5877 result
= (int)GeosGeometry_typeId(arg1
);
5879 catch (const std::exception
& e
)
5881 SWIG_exception(SWIG_RuntimeError
, e
.what());
5884 resultobj
= SWIG_From_int(static_cast< int >(result
));
5891 SWIGINTERN PyObject
*_wrap_Geometry_normalize(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5892 PyObject
*resultobj
= 0;
5893 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
5896 PyObject
* obj0
= 0 ;
5898 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_normalize",1,1,&obj0
)) SWIG_fail
;
5899 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
5900 if (!SWIG_IsOK(res1
)) {
5901 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_normalize" "', argument " "1"" of type '" "GeosGeometry *""'");
5903 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
5907 GeosGeometry_normalize(arg1
);
5909 catch (const std::exception
& e
)
5911 SWIG_exception(SWIG_RuntimeError
, e
.what());
5914 resultobj
= SWIG_Py_Void();
5921 SWIGINTERN PyObject
*_wrap_Geometry_getSRID(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5922 PyObject
*resultobj
= 0;
5923 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
5926 PyObject
* obj0
= 0 ;
5929 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_getSRID",1,1,&obj0
)) SWIG_fail
;
5930 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
5931 if (!SWIG_IsOK(res1
)) {
5932 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_getSRID" "', argument " "1"" of type '" "GeosGeometry *""'");
5934 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
5938 result
= (int)GeosGeometry_getSRID(arg1
);
5940 catch (const std::exception
& e
)
5942 SWIG_exception(SWIG_RuntimeError
, e
.what());
5945 resultobj
= SWIG_From_int(static_cast< int >(result
));
5952 SWIGINTERN PyObject
*_wrap_Geometry_setSRID(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5953 PyObject
*resultobj
= 0;
5954 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
5960 PyObject
* obj0
= 0 ;
5961 PyObject
* obj1
= 0 ;
5963 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_setSRID",2,2,&obj0
,&obj1
)) SWIG_fail
;
5964 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
5965 if (!SWIG_IsOK(res1
)) {
5966 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_setSRID" "', argument " "1"" of type '" "GeosGeometry *""'");
5968 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
5969 ecode2
= SWIG_AsVal_int(obj1
, &val2
);
5970 if (!SWIG_IsOK(ecode2
)) {
5971 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "Geometry_setSRID" "', argument " "2"" of type '" "int""'");
5973 arg2
= static_cast< int >(val2
);
5977 GeosGeometry_setSRID(arg1
,arg2
);
5979 catch (const std::exception
& e
)
5981 SWIG_exception(SWIG_RuntimeError
, e
.what());
5984 resultobj
= SWIG_Py_Void();
5991 SWIGINTERN PyObject
*_wrap_Geometry_getDimensions(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
5992 PyObject
*resultobj
= 0;
5993 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
5996 PyObject
* obj0
= 0 ;
5999 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_getDimensions",1,1,&obj0
)) SWIG_fail
;
6000 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6001 if (!SWIG_IsOK(res1
)) {
6002 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_getDimensions" "', argument " "1"" of type '" "GeosGeometry *""'");
6004 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6008 result
= GeosGeometry_getDimensions(arg1
);
6010 catch (const std::exception
& e
)
6012 SWIG_exception(SWIG_RuntimeError
, e
.what());
6015 resultobj
= SWIG_From_size_t(static_cast< size_t >(result
));
6022 SWIGINTERN PyObject
*_wrap_Geometry_getNumGeometries(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6023 PyObject
*resultobj
= 0;
6024 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6027 PyObject
* obj0
= 0 ;
6030 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_getNumGeometries",1,1,&obj0
)) SWIG_fail
;
6031 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6032 if (!SWIG_IsOK(res1
)) {
6033 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_getNumGeometries" "', argument " "1"" of type '" "GeosGeometry *""'");
6035 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6039 result
= GeosGeometry_getNumGeometries(arg1
);
6041 catch (const std::exception
& e
)
6043 SWIG_exception(SWIG_RuntimeError
, e
.what());
6046 resultobj
= SWIG_From_size_t(static_cast< size_t >(result
));
6053 SWIGINTERN PyObject
*_wrap_Geometry_intersection(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6054 PyObject
*resultobj
= 0;
6055 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6056 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
6061 PyObject
* obj0
= 0 ;
6062 PyObject
* obj1
= 0 ;
6063 GeosGeometry
*result
= 0 ;
6065 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_intersection",2,2,&obj0
,&obj1
)) SWIG_fail
;
6066 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6067 if (!SWIG_IsOK(res1
)) {
6068 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_intersection" "', argument " "1"" of type '" "GeosGeometry *""'");
6070 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6071 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6072 if (!SWIG_IsOK(res2
)) {
6073 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_intersection" "', argument " "2"" of type '" "GeosGeometry *""'");
6075 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
6079 result
= (GeosGeometry
*)GeosGeometry_intersection(arg1
,arg2
);
6081 catch (const std::exception
& e
)
6083 SWIG_exception(SWIG_RuntimeError
, e
.what());
6087 /* %typemap(out) GeosGeometry */
6090 SWIG_exception(SWIG_RuntimeError
, message
);
6092 GeosGeometry
*geom
= result
;
6093 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6098 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6100 case GEOS_LINESTRING
:
6101 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6103 case GEOS_LINEARRING
:
6104 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6107 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6109 case GEOS_MULTIPOINT
:
6110 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6112 case GEOS_MULTILINESTRING
:
6113 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6115 case GEOS_MULTIPOLYGON
:
6116 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6118 case GEOS_GEOMETRYCOLLECTION
:
6119 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6129 SWIGINTERN PyObject
*_wrap_Geometry_buffer(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6130 PyObject
*resultobj
= 0;
6131 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6140 PyObject
* obj0
= 0 ;
6141 PyObject
* obj1
= 0 ;
6142 PyObject
* obj2
= 0 ;
6143 GeosGeometry
*result
= 0 ;
6146 arg3
= DEFAULT_QUADRANT_SEGMENTS
;
6148 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_buffer",2,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
6149 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6150 if (!SWIG_IsOK(res1
)) {
6151 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_buffer" "', argument " "1"" of type '" "GeosGeometry *""'");
6153 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6154 ecode2
= SWIG_AsVal_double(obj1
, &val2
);
6155 if (!SWIG_IsOK(ecode2
)) {
6156 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "Geometry_buffer" "', argument " "2"" of type '" "double""'");
6158 arg2
= static_cast< double >(val2
);
6160 ecode3
= SWIG_AsVal_int(obj2
, &val3
);
6161 if (!SWIG_IsOK(ecode3
)) {
6162 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "Geometry_buffer" "', argument " "3"" of type '" "int""'");
6164 arg3
= static_cast< int >(val3
);
6169 result
= (GeosGeometry
*)GeosGeometry_buffer(arg1
,arg2
,arg3
);
6171 catch (const std::exception
& e
)
6173 SWIG_exception(SWIG_RuntimeError
, e
.what());
6177 /* %typemap(out) GeosGeometry */
6180 SWIG_exception(SWIG_RuntimeError
, message
);
6182 GeosGeometry
*geom
= result
;
6183 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6188 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6190 case GEOS_LINESTRING
:
6191 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6193 case GEOS_LINEARRING
:
6194 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6197 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6199 case GEOS_MULTIPOINT
:
6200 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6202 case GEOS_MULTILINESTRING
:
6203 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6205 case GEOS_MULTIPOLYGON
:
6206 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6208 case GEOS_GEOMETRYCOLLECTION
:
6209 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6219 SWIGINTERN PyObject
*_wrap_Geometry_convexHull(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6220 PyObject
*resultobj
= 0;
6221 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6224 PyObject
* obj0
= 0 ;
6225 GeosGeometry
*result
= 0 ;
6227 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_convexHull",1,1,&obj0
)) SWIG_fail
;
6228 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6229 if (!SWIG_IsOK(res1
)) {
6230 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_convexHull" "', argument " "1"" of type '" "GeosGeometry *""'");
6232 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6236 result
= (GeosGeometry
*)GeosGeometry_convexHull(arg1
);
6238 catch (const std::exception
& e
)
6240 SWIG_exception(SWIG_RuntimeError
, e
.what());
6244 /* %typemap(out) GeosGeometry */
6247 SWIG_exception(SWIG_RuntimeError
, message
);
6249 GeosGeometry
*geom
= result
;
6250 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6255 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6257 case GEOS_LINESTRING
:
6258 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6260 case GEOS_LINEARRING
:
6261 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6264 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6266 case GEOS_MULTIPOINT
:
6267 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6269 case GEOS_MULTILINESTRING
:
6270 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6272 case GEOS_MULTIPOLYGON
:
6273 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6275 case GEOS_GEOMETRYCOLLECTION
:
6276 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6286 SWIGINTERN PyObject
*_wrap_Geometry_difference(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6287 PyObject
*resultobj
= 0;
6288 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6289 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
6294 PyObject
* obj0
= 0 ;
6295 PyObject
* obj1
= 0 ;
6296 GeosGeometry
*result
= 0 ;
6298 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_difference",2,2,&obj0
,&obj1
)) SWIG_fail
;
6299 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6300 if (!SWIG_IsOK(res1
)) {
6301 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_difference" "', argument " "1"" of type '" "GeosGeometry *""'");
6303 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6304 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6305 if (!SWIG_IsOK(res2
)) {
6306 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_difference" "', argument " "2"" of type '" "GeosGeometry *""'");
6308 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
6312 result
= (GeosGeometry
*)GeosGeometry_difference(arg1
,arg2
);
6314 catch (const std::exception
& e
)
6316 SWIG_exception(SWIG_RuntimeError
, e
.what());
6320 /* %typemap(out) GeosGeometry */
6323 SWIG_exception(SWIG_RuntimeError
, message
);
6325 GeosGeometry
*geom
= result
;
6326 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6331 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6333 case GEOS_LINESTRING
:
6334 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6336 case GEOS_LINEARRING
:
6337 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6340 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6342 case GEOS_MULTIPOINT
:
6343 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6345 case GEOS_MULTILINESTRING
:
6346 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6348 case GEOS_MULTIPOLYGON
:
6349 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6351 case GEOS_GEOMETRYCOLLECTION
:
6352 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6362 SWIGINTERN PyObject
*_wrap_Geometry_symDifference(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6363 PyObject
*resultobj
= 0;
6364 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6365 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
6370 PyObject
* obj0
= 0 ;
6371 PyObject
* obj1
= 0 ;
6372 GeosGeometry
*result
= 0 ;
6374 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_symDifference",2,2,&obj0
,&obj1
)) SWIG_fail
;
6375 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6376 if (!SWIG_IsOK(res1
)) {
6377 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_symDifference" "', argument " "1"" of type '" "GeosGeometry *""'");
6379 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6380 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6381 if (!SWIG_IsOK(res2
)) {
6382 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_symDifference" "', argument " "2"" of type '" "GeosGeometry *""'");
6384 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
6388 result
= (GeosGeometry
*)GeosGeometry_symDifference(arg1
,arg2
);
6390 catch (const std::exception
& e
)
6392 SWIG_exception(SWIG_RuntimeError
, e
.what());
6396 /* %typemap(out) GeosGeometry */
6399 SWIG_exception(SWIG_RuntimeError
, message
);
6401 GeosGeometry
*geom
= result
;
6402 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6407 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6409 case GEOS_LINESTRING
:
6410 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6412 case GEOS_LINEARRING
:
6413 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6416 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6418 case GEOS_MULTIPOINT
:
6419 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6421 case GEOS_MULTILINESTRING
:
6422 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6424 case GEOS_MULTIPOLYGON
:
6425 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6427 case GEOS_GEOMETRYCOLLECTION
:
6428 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6438 SWIGINTERN PyObject
*_wrap_Geometry_boundary(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6439 PyObject
*resultobj
= 0;
6440 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6443 PyObject
* obj0
= 0 ;
6444 GeosGeometry
*result
= 0 ;
6446 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_boundary",1,1,&obj0
)) SWIG_fail
;
6447 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6448 if (!SWIG_IsOK(res1
)) {
6449 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_boundary" "', argument " "1"" of type '" "GeosGeometry *""'");
6451 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6455 result
= (GeosGeometry
*)GeosGeometry_boundary(arg1
);
6457 catch (const std::exception
& e
)
6459 SWIG_exception(SWIG_RuntimeError
, e
.what());
6463 /* %typemap(out) GeosGeometry */
6466 SWIG_exception(SWIG_RuntimeError
, message
);
6468 GeosGeometry
*geom
= result
;
6469 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6474 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6476 case GEOS_LINESTRING
:
6477 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6479 case GEOS_LINEARRING
:
6480 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6483 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6485 case GEOS_MULTIPOINT
:
6486 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6488 case GEOS_MULTILINESTRING
:
6489 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6491 case GEOS_MULTIPOLYGON
:
6492 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6494 case GEOS_GEOMETRYCOLLECTION
:
6495 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6505 SWIGINTERN PyObject
*_wrap_Geometry_union(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6506 PyObject
*resultobj
= 0;
6507 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6508 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
6513 PyObject
* obj0
= 0 ;
6514 PyObject
* obj1
= 0 ;
6515 GeosGeometry
*result
= 0 ;
6517 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_union",2,2,&obj0
,&obj1
)) SWIG_fail
;
6518 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6519 if (!SWIG_IsOK(res1
)) {
6520 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_union" "', argument " "1"" of type '" "GeosGeometry *""'");
6522 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6523 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6524 if (!SWIG_IsOK(res2
)) {
6525 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_union" "', argument " "2"" of type '" "GeosGeometry *""'");
6527 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
6531 result
= (GeosGeometry
*)GeosGeometry_geomUnion(arg1
,arg2
);
6533 catch (const std::exception
& e
)
6535 SWIG_exception(SWIG_RuntimeError
, e
.what());
6539 /* %typemap(out) GeosGeometry */
6542 SWIG_exception(SWIG_RuntimeError
, message
);
6544 GeosGeometry
*geom
= result
;
6545 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6550 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6552 case GEOS_LINESTRING
:
6553 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6555 case GEOS_LINEARRING
:
6556 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6559 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6561 case GEOS_MULTIPOINT
:
6562 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6564 case GEOS_MULTILINESTRING
:
6565 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6567 case GEOS_MULTIPOLYGON
:
6568 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6570 case GEOS_GEOMETRYCOLLECTION
:
6571 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6581 SWIGINTERN PyObject
*_wrap_Geometry_pointOnSurface(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6582 PyObject
*resultobj
= 0;
6583 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6586 PyObject
* obj0
= 0 ;
6587 GeosGeometry
*result
= 0 ;
6589 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_pointOnSurface",1,1,&obj0
)) SWIG_fail
;
6590 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6591 if (!SWIG_IsOK(res1
)) {
6592 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_pointOnSurface" "', argument " "1"" of type '" "GeosGeometry *""'");
6594 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6598 result
= (GeosGeometry
*)GeosGeometry_pointOnSurface(arg1
);
6600 catch (const std::exception
& e
)
6602 SWIG_exception(SWIG_RuntimeError
, e
.what());
6606 /* %typemap(out) GeosGeometry */
6609 SWIG_exception(SWIG_RuntimeError
, message
);
6611 GeosGeometry
*geom
= result
;
6612 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6617 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6619 case GEOS_LINESTRING
:
6620 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6622 case GEOS_LINEARRING
:
6623 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6626 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6628 case GEOS_MULTIPOINT
:
6629 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6631 case GEOS_MULTILINESTRING
:
6632 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6634 case GEOS_MULTIPOLYGON
:
6635 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6637 case GEOS_GEOMETRYCOLLECTION
:
6638 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6648 SWIGINTERN PyObject
*_wrap_Geometry_getCentroid(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6649 PyObject
*resultobj
= 0;
6650 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6653 PyObject
* obj0
= 0 ;
6654 GeosGeometry
*result
= 0 ;
6656 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_getCentroid",1,1,&obj0
)) SWIG_fail
;
6657 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6658 if (!SWIG_IsOK(res1
)) {
6659 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_getCentroid" "', argument " "1"" of type '" "GeosGeometry *""'");
6661 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6665 result
= (GeosGeometry
*)GeosGeometry_getCentroid(arg1
);
6667 catch (const std::exception
& e
)
6669 SWIG_exception(SWIG_RuntimeError
, e
.what());
6673 /* %typemap(out) GeosGeometry */
6676 SWIG_exception(SWIG_RuntimeError
, message
);
6678 GeosGeometry
*geom
= result
;
6679 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6684 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6686 case GEOS_LINESTRING
:
6687 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6689 case GEOS_LINEARRING
:
6690 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6693 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6695 case GEOS_MULTIPOINT
:
6696 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6698 case GEOS_MULTILINESTRING
:
6699 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6701 case GEOS_MULTIPOLYGON
:
6702 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6704 case GEOS_GEOMETRYCOLLECTION
:
6705 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6715 SWIGINTERN PyObject
*_wrap_Geometry_getEnvelope(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6716 PyObject
*resultobj
= 0;
6717 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6720 PyObject
* obj0
= 0 ;
6721 GeosGeometry
*result
= 0 ;
6723 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_getEnvelope",1,1,&obj0
)) SWIG_fail
;
6724 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6725 if (!SWIG_IsOK(res1
)) {
6726 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_getEnvelope" "', argument " "1"" of type '" "GeosGeometry *""'");
6728 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6732 result
= (GeosGeometry
*)GeosGeometry_getEnvelope(arg1
);
6734 catch (const std::exception
& e
)
6736 SWIG_exception(SWIG_RuntimeError
, e
.what());
6740 /* %typemap(out) GeosGeometry */
6743 SWIG_exception(SWIG_RuntimeError
, message
);
6745 GeosGeometry
*geom
= result
;
6746 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6751 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | 0);
6753 case GEOS_LINESTRING
:
6754 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | 0);
6756 case GEOS_LINEARRING
:
6757 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | 0);
6760 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | 0);
6762 case GEOS_MULTIPOINT
:
6763 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | 0);
6765 case GEOS_MULTILINESTRING
:
6766 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | 0);
6768 case GEOS_MULTIPOLYGON
:
6769 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | 0);
6771 case GEOS_GEOMETRYCOLLECTION
:
6772 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | 0);
6782 SWIGINTERN PyObject
*_wrap_Geometry_relate(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6783 PyObject
*resultobj
= 0;
6784 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6785 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
6790 PyObject
* obj0
= 0 ;
6791 PyObject
* obj1
= 0 ;
6794 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_relate",2,2,&obj0
,&obj1
)) SWIG_fail
;
6795 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6796 if (!SWIG_IsOK(res1
)) {
6797 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_relate" "', argument " "1"" of type '" "GeosGeometry *""'");
6799 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6800 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6801 if (!SWIG_IsOK(res2
)) {
6802 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_relate" "', argument " "2"" of type '" "GeosGeometry *""'");
6804 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
6808 result
= (char *)GeosGeometry_relate(arg1
,arg2
);
6810 catch (const std::exception
& e
)
6812 SWIG_exception(SWIG_RuntimeError
, e
.what());
6815 resultobj
= SWIG_FromCharPtr((const char *)result
);
6823 SWIGINTERN PyObject
*_wrap_Geometry_lineMerge(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6824 PyObject
*resultobj
= 0;
6825 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6828 PyObject
* obj0
= 0 ;
6829 GeosGeometry
*result
= 0 ;
6831 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_lineMerge",1,1,&obj0
)) SWIG_fail
;
6832 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6833 if (!SWIG_IsOK(res1
)) {
6834 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_lineMerge" "', argument " "1"" of type '" "GeosGeometry *""'");
6836 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6840 result
= (GeosGeometry
*)GeosGeometry_lineMerge(arg1
);
6842 catch (const std::exception
& e
)
6844 SWIG_exception(SWIG_RuntimeError
, e
.what());
6848 /* %typemap(out) GeosGeometry */
6851 SWIG_exception(SWIG_RuntimeError
, message
);
6853 GeosGeometry
*geom
= result
;
6854 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6859 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6861 case GEOS_LINESTRING
:
6862 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6864 case GEOS_LINEARRING
:
6865 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6868 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6870 case GEOS_MULTIPOINT
:
6871 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6873 case GEOS_MULTILINESTRING
:
6874 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6876 case GEOS_MULTIPOLYGON
:
6877 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6879 case GEOS_GEOMETRYCOLLECTION
:
6880 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6890 SWIGINTERN PyObject
*_wrap_Geometry_simplify(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6891 PyObject
*resultobj
= 0;
6892 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6898 PyObject
* obj0
= 0 ;
6899 PyObject
* obj1
= 0 ;
6900 GeosGeometry
*result
= 0 ;
6902 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_simplify",2,2,&obj0
,&obj1
)) SWIG_fail
;
6903 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6904 if (!SWIG_IsOK(res1
)) {
6905 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_simplify" "', argument " "1"" of type '" "GeosGeometry *""'");
6907 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6908 ecode2
= SWIG_AsVal_double(obj1
, &val2
);
6909 if (!SWIG_IsOK(ecode2
)) {
6910 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "Geometry_simplify" "', argument " "2"" of type '" "double""'");
6912 arg2
= static_cast< double >(val2
);
6916 result
= (GeosGeometry
*)GeosGeometry_simplify(arg1
,arg2
);
6918 catch (const std::exception
& e
)
6920 SWIG_exception(SWIG_RuntimeError
, e
.what());
6924 /* %typemap(out) GeosGeometry */
6927 SWIG_exception(SWIG_RuntimeError
, message
);
6929 GeosGeometry
*geom
= result
;
6930 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
6935 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
6937 case GEOS_LINESTRING
:
6938 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
6940 case GEOS_LINEARRING
:
6941 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
6944 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
6946 case GEOS_MULTIPOINT
:
6947 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
6949 case GEOS_MULTILINESTRING
:
6950 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
6952 case GEOS_MULTIPOLYGON
:
6953 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
6955 case GEOS_GEOMETRYCOLLECTION
:
6956 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
6966 SWIGINTERN PyObject
*_wrap_Geometry_topologyPreserveSimplify(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
6967 PyObject
*resultobj
= 0;
6968 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
6974 PyObject
* obj0
= 0 ;
6975 PyObject
* obj1
= 0 ;
6976 GeosGeometry
*result
= 0 ;
6978 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_topologyPreserveSimplify",2,2,&obj0
,&obj1
)) SWIG_fail
;
6979 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
6980 if (!SWIG_IsOK(res1
)) {
6981 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_topologyPreserveSimplify" "', argument " "1"" of type '" "GeosGeometry *""'");
6983 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
6984 ecode2
= SWIG_AsVal_double(obj1
, &val2
);
6985 if (!SWIG_IsOK(ecode2
)) {
6986 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "Geometry_topologyPreserveSimplify" "', argument " "2"" of type '" "double""'");
6988 arg2
= static_cast< double >(val2
);
6992 result
= (GeosGeometry
*)GeosGeometry_topologyPreserveSimplify(arg1
,arg2
);
6994 catch (const std::exception
& e
)
6996 SWIG_exception(SWIG_RuntimeError
, e
.what());
7000 /* %typemap(out) GeosGeometry */
7003 SWIG_exception(SWIG_RuntimeError
, message
);
7005 GeosGeometry
*geom
= result
;
7006 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
7011 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
7013 case GEOS_LINESTRING
:
7014 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
7016 case GEOS_LINEARRING
:
7017 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
7020 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
7022 case GEOS_MULTIPOINT
:
7023 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
7025 case GEOS_MULTILINESTRING
:
7026 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
7028 case GEOS_MULTIPOLYGON
:
7029 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
7031 case GEOS_GEOMETRYCOLLECTION
:
7032 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
7042 SWIGINTERN PyObject
*_wrap_Geometry_relatePattern(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7043 PyObject
*resultobj
= 0;
7044 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7045 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7046 char *arg3
= (char *) 0 ;
7054 PyObject
* obj0
= 0 ;
7055 PyObject
* obj1
= 0 ;
7056 PyObject
* obj2
= 0 ;
7059 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_relatePattern",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
7060 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7061 if (!SWIG_IsOK(res1
)) {
7062 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_relatePattern" "', argument " "1"" of type '" "GeosGeometry *""'");
7064 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7065 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7066 if (!SWIG_IsOK(res2
)) {
7067 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_relatePattern" "', argument " "2"" of type '" "GeosGeometry const *""'");
7069 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7070 res3
= SWIG_AsCharPtrAndSize(obj2
, &buf3
, NULL
, &alloc3
);
7071 if (!SWIG_IsOK(res3
)) {
7072 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "Geometry_relatePattern" "', argument " "3"" of type '" "char const *""'");
7074 arg3
= reinterpret_cast< char * >(buf3
);
7078 result
= (bool)GeosGeometry_relatePattern(arg1
,(GeosGeometry
const *)arg2
,(char const *)arg3
);
7080 catch (const std::exception
& e
)
7082 SWIG_exception(SWIG_RuntimeError
, e
.what());
7085 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7086 if (alloc3
== SWIG_NEWOBJ
) delete[] buf3
;
7089 if (alloc3
== SWIG_NEWOBJ
) delete[] buf3
;
7094 SWIGINTERN PyObject
*_wrap_Geometry_disjoint(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7095 PyObject
*resultobj
= 0;
7096 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7097 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7102 PyObject
* obj0
= 0 ;
7103 PyObject
* obj1
= 0 ;
7106 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_disjoint",2,2,&obj0
,&obj1
)) SWIG_fail
;
7107 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7108 if (!SWIG_IsOK(res1
)) {
7109 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_disjoint" "', argument " "1"" of type '" "GeosGeometry *""'");
7111 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7112 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7113 if (!SWIG_IsOK(res2
)) {
7114 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_disjoint" "', argument " "2"" of type '" "GeosGeometry const *""'");
7116 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7120 result
= (bool)GeosGeometry_disjoint(arg1
,(GeosGeometry
const *)arg2
);
7122 catch (const std::exception
& e
)
7124 SWIG_exception(SWIG_RuntimeError
, e
.what());
7127 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7134 SWIGINTERN PyObject
*_wrap_Geometry_touches(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7135 PyObject
*resultobj
= 0;
7136 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7137 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7142 PyObject
* obj0
= 0 ;
7143 PyObject
* obj1
= 0 ;
7146 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_touches",2,2,&obj0
,&obj1
)) SWIG_fail
;
7147 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7148 if (!SWIG_IsOK(res1
)) {
7149 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_touches" "', argument " "1"" of type '" "GeosGeometry *""'");
7151 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7152 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7153 if (!SWIG_IsOK(res2
)) {
7154 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_touches" "', argument " "2"" of type '" "GeosGeometry const *""'");
7156 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7160 result
= (bool)GeosGeometry_touches(arg1
,(GeosGeometry
const *)arg2
);
7162 catch (const std::exception
& e
)
7164 SWIG_exception(SWIG_RuntimeError
, e
.what());
7167 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7174 SWIGINTERN PyObject
*_wrap_Geometry_intersects(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7175 PyObject
*resultobj
= 0;
7176 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7177 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7182 PyObject
* obj0
= 0 ;
7183 PyObject
* obj1
= 0 ;
7186 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_intersects",2,2,&obj0
,&obj1
)) SWIG_fail
;
7187 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7188 if (!SWIG_IsOK(res1
)) {
7189 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_intersects" "', argument " "1"" of type '" "GeosGeometry *""'");
7191 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7192 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7193 if (!SWIG_IsOK(res2
)) {
7194 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_intersects" "', argument " "2"" of type '" "GeosGeometry const *""'");
7196 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7200 result
= (bool)GeosGeometry_intersects(arg1
,(GeosGeometry
const *)arg2
);
7202 catch (const std::exception
& e
)
7204 SWIG_exception(SWIG_RuntimeError
, e
.what());
7207 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7214 SWIGINTERN PyObject
*_wrap_Geometry_crosses(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7215 PyObject
*resultobj
= 0;
7216 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7217 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7222 PyObject
* obj0
= 0 ;
7223 PyObject
* obj1
= 0 ;
7226 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_crosses",2,2,&obj0
,&obj1
)) SWIG_fail
;
7227 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7228 if (!SWIG_IsOK(res1
)) {
7229 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_crosses" "', argument " "1"" of type '" "GeosGeometry *""'");
7231 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7232 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7233 if (!SWIG_IsOK(res2
)) {
7234 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_crosses" "', argument " "2"" of type '" "GeosGeometry const *""'");
7236 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7240 result
= (bool)GeosGeometry_crosses(arg1
,(GeosGeometry
const *)arg2
);
7242 catch (const std::exception
& e
)
7244 SWIG_exception(SWIG_RuntimeError
, e
.what());
7247 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7254 SWIGINTERN PyObject
*_wrap_Geometry_within(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7255 PyObject
*resultobj
= 0;
7256 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7257 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7262 PyObject
* obj0
= 0 ;
7263 PyObject
* obj1
= 0 ;
7266 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_within",2,2,&obj0
,&obj1
)) SWIG_fail
;
7267 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7268 if (!SWIG_IsOK(res1
)) {
7269 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_within" "', argument " "1"" of type '" "GeosGeometry *""'");
7271 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7272 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7273 if (!SWIG_IsOK(res2
)) {
7274 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_within" "', argument " "2"" of type '" "GeosGeometry const *""'");
7276 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7280 result
= (bool)GeosGeometry_within(arg1
,(GeosGeometry
const *)arg2
);
7282 catch (const std::exception
& e
)
7284 SWIG_exception(SWIG_RuntimeError
, e
.what());
7287 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7294 SWIGINTERN PyObject
*_wrap_Geometry_contains(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7295 PyObject
*resultobj
= 0;
7296 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7297 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7302 PyObject
* obj0
= 0 ;
7303 PyObject
* obj1
= 0 ;
7306 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_contains",2,2,&obj0
,&obj1
)) SWIG_fail
;
7307 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7308 if (!SWIG_IsOK(res1
)) {
7309 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_contains" "', argument " "1"" of type '" "GeosGeometry *""'");
7311 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7312 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7313 if (!SWIG_IsOK(res2
)) {
7314 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_contains" "', argument " "2"" of type '" "GeosGeometry const *""'");
7316 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7320 result
= (bool)GeosGeometry_contains(arg1
,(GeosGeometry
const *)arg2
);
7322 catch (const std::exception
& e
)
7324 SWIG_exception(SWIG_RuntimeError
, e
.what());
7327 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7334 SWIGINTERN PyObject
*_wrap_Geometry_overlaps(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7335 PyObject
*resultobj
= 0;
7336 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7337 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7342 PyObject
* obj0
= 0 ;
7343 PyObject
* obj1
= 0 ;
7346 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_overlaps",2,2,&obj0
,&obj1
)) SWIG_fail
;
7347 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7348 if (!SWIG_IsOK(res1
)) {
7349 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_overlaps" "', argument " "1"" of type '" "GeosGeometry *""'");
7351 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7352 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7353 if (!SWIG_IsOK(res2
)) {
7354 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_overlaps" "', argument " "2"" of type '" "GeosGeometry const *""'");
7356 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7360 result
= (bool)GeosGeometry_overlaps(arg1
,(GeosGeometry
const *)arg2
);
7362 catch (const std::exception
& e
)
7364 SWIG_exception(SWIG_RuntimeError
, e
.what());
7367 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7374 SWIGINTERN PyObject
*_wrap_Geometry_equals(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7375 PyObject
*resultobj
= 0;
7376 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7377 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7382 PyObject
* obj0
= 0 ;
7383 PyObject
* obj1
= 0 ;
7386 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_equals",2,2,&obj0
,&obj1
)) SWIG_fail
;
7387 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7388 if (!SWIG_IsOK(res1
)) {
7389 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_equals" "', argument " "1"" of type '" "GeosGeometry *""'");
7391 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7392 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7393 if (!SWIG_IsOK(res2
)) {
7394 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_equals" "', argument " "2"" of type '" "GeosGeometry const *""'");
7396 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7400 result
= (bool)GeosGeometry_equals(arg1
,(GeosGeometry
const *)arg2
);
7402 catch (const std::exception
& e
)
7404 SWIG_exception(SWIG_RuntimeError
, e
.what());
7407 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7414 SWIGINTERN PyObject
*_wrap_Geometry_equalsExact(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7415 PyObject
*resultobj
= 0;
7416 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7417 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7425 PyObject
* obj0
= 0 ;
7426 PyObject
* obj1
= 0 ;
7427 PyObject
* obj2
= 0 ;
7430 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_equalsExact",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
7431 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7432 if (!SWIG_IsOK(res1
)) {
7433 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_equalsExact" "', argument " "1"" of type '" "GeosGeometry *""'");
7435 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7436 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7437 if (!SWIG_IsOK(res2
)) {
7438 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_equalsExact" "', argument " "2"" of type '" "GeosGeometry const *""'");
7440 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7441 ecode3
= SWIG_AsVal_double(obj2
, &val3
);
7442 if (!SWIG_IsOK(ecode3
)) {
7443 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "Geometry_equalsExact" "', argument " "3"" of type '" "double""'");
7445 arg3
= static_cast< double >(val3
);
7449 result
= (bool)GeosGeometry_equalsExact(arg1
,(GeosGeometry
const *)arg2
,arg3
);
7451 catch (const std::exception
& e
)
7453 SWIG_exception(SWIG_RuntimeError
, e
.what());
7456 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7463 SWIGINTERN PyObject
*_wrap_Geometry_isEmpty(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7464 PyObject
*resultobj
= 0;
7465 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7468 PyObject
* obj0
= 0 ;
7471 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_isEmpty",1,1,&obj0
)) SWIG_fail
;
7472 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7473 if (!SWIG_IsOK(res1
)) {
7474 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_isEmpty" "', argument " "1"" of type '" "GeosGeometry *""'");
7476 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7480 result
= (bool)GeosGeometry_isEmpty(arg1
);
7482 catch (const std::exception
& e
)
7484 SWIG_exception(SWIG_RuntimeError
, e
.what());
7487 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7494 SWIGINTERN PyObject
*_wrap_Geometry_isValid(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7495 PyObject
*resultobj
= 0;
7496 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7499 PyObject
* obj0
= 0 ;
7502 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_isValid",1,1,&obj0
)) SWIG_fail
;
7503 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7504 if (!SWIG_IsOK(res1
)) {
7505 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_isValid" "', argument " "1"" of type '" "GeosGeometry *""'");
7507 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7511 result
= (bool)GeosGeometry_isValid(arg1
);
7513 catch (const std::exception
& e
)
7515 SWIG_exception(SWIG_RuntimeError
, e
.what());
7518 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7525 SWIGINTERN PyObject
*_wrap_Geometry_isSimple(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7526 PyObject
*resultobj
= 0;
7527 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7530 PyObject
* obj0
= 0 ;
7533 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_isSimple",1,1,&obj0
)) SWIG_fail
;
7534 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7535 if (!SWIG_IsOK(res1
)) {
7536 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_isSimple" "', argument " "1"" of type '" "GeosGeometry *""'");
7538 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7542 result
= (bool)GeosGeometry_isSimple(arg1
);
7544 catch (const std::exception
& e
)
7546 SWIG_exception(SWIG_RuntimeError
, e
.what());
7549 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7556 SWIGINTERN PyObject
*_wrap_Geometry_isRing(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7557 PyObject
*resultobj
= 0;
7558 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7561 PyObject
* obj0
= 0 ;
7564 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_isRing",1,1,&obj0
)) SWIG_fail
;
7565 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7566 if (!SWIG_IsOK(res1
)) {
7567 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_isRing" "', argument " "1"" of type '" "GeosGeometry *""'");
7569 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7573 result
= (bool)GeosGeometry_isRing(arg1
);
7575 catch (const std::exception
& e
)
7577 SWIG_exception(SWIG_RuntimeError
, e
.what());
7580 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7587 SWIGINTERN PyObject
*_wrap_Geometry_hasZ(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7588 PyObject
*resultobj
= 0;
7589 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7592 PyObject
* obj0
= 0 ;
7595 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_hasZ",1,1,&obj0
)) SWIG_fail
;
7596 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7597 if (!SWIG_IsOK(res1
)) {
7598 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_hasZ" "', argument " "1"" of type '" "GeosGeometry *""'");
7600 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7604 result
= (bool)GeosGeometry_hasZ(arg1
);
7606 catch (const std::exception
& e
)
7608 SWIG_exception(SWIG_RuntimeError
, e
.what());
7611 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
7618 SWIGINTERN PyObject
*_wrap_Geometry_area(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7619 PyObject
*resultobj
= 0;
7620 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7623 PyObject
* obj0
= 0 ;
7626 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_area",1,1,&obj0
)) SWIG_fail
;
7627 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7628 if (!SWIG_IsOK(res1
)) {
7629 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_area" "', argument " "1"" of type '" "GeosGeometry *""'");
7631 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7635 result
= (double)GeosGeometry_area(arg1
);
7637 catch (const std::exception
& e
)
7639 SWIG_exception(SWIG_RuntimeError
, e
.what());
7642 resultobj
= SWIG_From_double(static_cast< double >(result
));
7649 SWIGINTERN PyObject
*_wrap_Geometry_length(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7650 PyObject
*resultobj
= 0;
7651 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7654 PyObject
* obj0
= 0 ;
7657 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_length",1,1,&obj0
)) SWIG_fail
;
7658 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7659 if (!SWIG_IsOK(res1
)) {
7660 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_length" "', argument " "1"" of type '" "GeosGeometry *""'");
7662 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7666 result
= (double)GeosGeometry_length(arg1
);
7668 catch (const std::exception
& e
)
7670 SWIG_exception(SWIG_RuntimeError
, e
.what());
7673 resultobj
= SWIG_From_double(static_cast< double >(result
));
7680 SWIGINTERN PyObject
*_wrap_Geometry_distance(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7681 PyObject
*resultobj
= 0;
7682 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
7683 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
7688 PyObject
* obj0
= 0 ;
7689 PyObject
* obj1
= 0 ;
7692 if(!PyArg_UnpackTuple(args
,(char *)"Geometry_distance",2,2,&obj0
,&obj1
)) SWIG_fail
;
7693 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7694 if (!SWIG_IsOK(res1
)) {
7695 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Geometry_distance" "', argument " "1"" of type '" "GeosGeometry *""'");
7697 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
7698 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
7699 if (!SWIG_IsOK(res2
)) {
7700 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Geometry_distance" "', argument " "2"" of type '" "GeosGeometry const *""'");
7702 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
7706 result
= (double)GeosGeometry_distance(arg1
,(GeosGeometry
const *)arg2
);
7708 catch (const std::exception
& e
)
7710 SWIG_exception(SWIG_RuntimeError
, e
.what());
7713 resultobj
= SWIG_From_double(static_cast< double >(result
));
7720 SWIGINTERN PyObject
*Geometry_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7722 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
7723 SWIG_TypeNewClientData(SWIGTYPE_p_GeosGeometry
, SWIG_NewClientData(obj
));
7724 return SWIG_Py_Void();
7727 SWIGINTERN PyObject
*_wrap_delete_Point(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7728 PyObject
*resultobj
= 0;
7729 GeosPoint
*arg1
= (GeosPoint
*) 0 ;
7732 PyObject
* obj0
= 0 ;
7734 if(!PyArg_UnpackTuple(args
,(char *)"delete_Point",1,1,&obj0
)) SWIG_fail
;
7735 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPoint
, SWIG_POINTER_DISOWN
| 0 );
7736 if (!SWIG_IsOK(res1
)) {
7737 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_Point" "', argument " "1"" of type '" "GeosPoint *""'");
7739 arg1
= reinterpret_cast< GeosPoint
* >(argp1
);
7743 delete_GeosPoint(arg1
);
7745 catch (const std::exception
& e
)
7747 SWIG_exception(SWIG_RuntimeError
, e
.what());
7750 resultobj
= SWIG_Py_Void();
7757 SWIGINTERN PyObject
*_wrap_Point_getCoordSeq(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7758 PyObject
*resultobj
= 0;
7759 GeosPoint
*arg1
= (GeosPoint
*) 0 ;
7762 PyObject
* obj0
= 0 ;
7763 GeosCoordinateSequence
*result
= 0 ;
7765 if(!PyArg_UnpackTuple(args
,(char *)"Point_getCoordSeq",1,1,&obj0
)) SWIG_fail
;
7766 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPoint
, 0 | 0 );
7767 if (!SWIG_IsOK(res1
)) {
7768 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Point_getCoordSeq" "', argument " "1"" of type '" "GeosPoint *""'");
7770 arg1
= reinterpret_cast< GeosPoint
* >(argp1
);
7774 result
= (GeosCoordinateSequence
*)GeosPoint_getCoordSeq(arg1
);
7776 catch (const std::exception
& e
)
7778 SWIG_exception(SWIG_RuntimeError
, e
.what());
7781 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
7788 SWIGINTERN PyObject
*Point_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7790 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
7791 SWIG_TypeNewClientData(SWIGTYPE_p_GeosPoint
, SWIG_NewClientData(obj
));
7792 return SWIG_Py_Void();
7795 SWIGINTERN PyObject
*_wrap_delete_LineString(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7796 PyObject
*resultobj
= 0;
7797 GeosLineString
*arg1
= (GeosLineString
*) 0 ;
7800 PyObject
* obj0
= 0 ;
7802 if(!PyArg_UnpackTuple(args
,(char *)"delete_LineString",1,1,&obj0
)) SWIG_fail
;
7803 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosLineString
, SWIG_POINTER_DISOWN
| 0 );
7804 if (!SWIG_IsOK(res1
)) {
7805 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_LineString" "', argument " "1"" of type '" "GeosLineString *""'");
7807 arg1
= reinterpret_cast< GeosLineString
* >(argp1
);
7811 delete_GeosLineString(arg1
);
7813 catch (const std::exception
& e
)
7815 SWIG_exception(SWIG_RuntimeError
, e
.what());
7818 resultobj
= SWIG_Py_Void();
7825 SWIGINTERN PyObject
*_wrap_LineString_getCoordSeq(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7826 PyObject
*resultobj
= 0;
7827 GeosLineString
*arg1
= (GeosLineString
*) 0 ;
7830 PyObject
* obj0
= 0 ;
7831 GeosCoordinateSequence
*result
= 0 ;
7833 if(!PyArg_UnpackTuple(args
,(char *)"LineString_getCoordSeq",1,1,&obj0
)) SWIG_fail
;
7834 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosLineString
, 0 | 0 );
7835 if (!SWIG_IsOK(res1
)) {
7836 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "LineString_getCoordSeq" "', argument " "1"" of type '" "GeosLineString *""'");
7838 arg1
= reinterpret_cast< GeosLineString
* >(argp1
);
7842 result
= (GeosCoordinateSequence
*)GeosLineString_getCoordSeq(arg1
);
7844 catch (const std::exception
& e
)
7846 SWIG_exception(SWIG_RuntimeError
, e
.what());
7849 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
7856 SWIGINTERN PyObject
*LineString_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7858 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
7859 SWIG_TypeNewClientData(SWIGTYPE_p_GeosLineString
, SWIG_NewClientData(obj
));
7860 return SWIG_Py_Void();
7863 SWIGINTERN PyObject
*_wrap_delete_LinearRing(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7864 PyObject
*resultobj
= 0;
7865 GeosLinearRing
*arg1
= (GeosLinearRing
*) 0 ;
7868 PyObject
* obj0
= 0 ;
7870 if(!PyArg_UnpackTuple(args
,(char *)"delete_LinearRing",1,1,&obj0
)) SWIG_fail
;
7871 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosLinearRing
, SWIG_POINTER_DISOWN
| 0 );
7872 if (!SWIG_IsOK(res1
)) {
7873 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_LinearRing" "', argument " "1"" of type '" "GeosLinearRing *""'");
7875 arg1
= reinterpret_cast< GeosLinearRing
* >(argp1
);
7879 delete_GeosLinearRing(arg1
);
7881 catch (const std::exception
& e
)
7883 SWIG_exception(SWIG_RuntimeError
, e
.what());
7886 resultobj
= SWIG_Py_Void();
7893 SWIGINTERN PyObject
*_wrap_LinearRing_getCoordSeq(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7894 PyObject
*resultobj
= 0;
7895 GeosLinearRing
*arg1
= (GeosLinearRing
*) 0 ;
7898 PyObject
* obj0
= 0 ;
7899 GeosCoordinateSequence
*result
= 0 ;
7901 if(!PyArg_UnpackTuple(args
,(char *)"LinearRing_getCoordSeq",1,1,&obj0
)) SWIG_fail
;
7902 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosLinearRing
, 0 | 0 );
7903 if (!SWIG_IsOK(res1
)) {
7904 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "LinearRing_getCoordSeq" "', argument " "1"" of type '" "GeosLinearRing *""'");
7906 arg1
= reinterpret_cast< GeosLinearRing
* >(argp1
);
7910 result
= (GeosCoordinateSequence
*)GeosLinearRing_getCoordSeq(arg1
);
7912 catch (const std::exception
& e
)
7914 SWIG_exception(SWIG_RuntimeError
, e
.what());
7917 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosCoordinateSequence
, 0 | 0 );
7924 SWIGINTERN PyObject
*LinearRing_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7926 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
7927 SWIG_TypeNewClientData(SWIGTYPE_p_GeosLinearRing
, SWIG_NewClientData(obj
));
7928 return SWIG_Py_Void();
7931 SWIGINTERN PyObject
*_wrap_delete_Polygon(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7932 PyObject
*resultobj
= 0;
7933 GeosPolygon
*arg1
= (GeosPolygon
*) 0 ;
7936 PyObject
* obj0
= 0 ;
7938 if(!PyArg_UnpackTuple(args
,(char *)"delete_Polygon",1,1,&obj0
)) SWIG_fail
;
7939 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPolygon
, SWIG_POINTER_DISOWN
| 0 );
7940 if (!SWIG_IsOK(res1
)) {
7941 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_Polygon" "', argument " "1"" of type '" "GeosPolygon *""'");
7943 arg1
= reinterpret_cast< GeosPolygon
* >(argp1
);
7947 delete_GeosPolygon(arg1
);
7949 catch (const std::exception
& e
)
7951 SWIG_exception(SWIG_RuntimeError
, e
.what());
7954 resultobj
= SWIG_Py_Void();
7961 SWIGINTERN PyObject
*_wrap_Polygon_getExteriorRing(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
7962 PyObject
*resultobj
= 0;
7963 GeosPolygon
*arg1
= (GeosPolygon
*) 0 ;
7966 PyObject
* obj0
= 0 ;
7967 GeosGeometry
*result
= 0 ;
7969 if(!PyArg_UnpackTuple(args
,(char *)"Polygon_getExteriorRing",1,1,&obj0
)) SWIG_fail
;
7970 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPolygon
, 0 | 0 );
7971 if (!SWIG_IsOK(res1
)) {
7972 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Polygon_getExteriorRing" "', argument " "1"" of type '" "GeosPolygon *""'");
7974 arg1
= reinterpret_cast< GeosPolygon
* >(argp1
);
7978 result
= (GeosGeometry
*)GeosPolygon_getExteriorRing(arg1
);
7980 catch (const std::exception
& e
)
7982 SWIG_exception(SWIG_RuntimeError
, e
.what());
7986 /* %typemap(out) GeosGeometry */
7989 SWIG_exception(SWIG_RuntimeError
, message
);
7991 GeosGeometry
*geom
= result
;
7992 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
7997 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | 0);
7999 case GEOS_LINESTRING
:
8000 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | 0);
8002 case GEOS_LINEARRING
:
8003 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | 0);
8006 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | 0);
8008 case GEOS_MULTIPOINT
:
8009 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | 0);
8011 case GEOS_MULTILINESTRING
:
8012 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | 0);
8014 case GEOS_MULTIPOLYGON
:
8015 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | 0);
8017 case GEOS_GEOMETRYCOLLECTION
:
8018 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | 0);
8028 SWIGINTERN PyObject
*_wrap_Polygon_getNumInteriorRings(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8029 PyObject
*resultobj
= 0;
8030 GeosPolygon
*arg1
= (GeosPolygon
*) 0 ;
8033 PyObject
* obj0
= 0 ;
8036 if(!PyArg_UnpackTuple(args
,(char *)"Polygon_getNumInteriorRings",1,1,&obj0
)) SWIG_fail
;
8037 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPolygon
, 0 | 0 );
8038 if (!SWIG_IsOK(res1
)) {
8039 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Polygon_getNumInteriorRings" "', argument " "1"" of type '" "GeosPolygon *""'");
8041 arg1
= reinterpret_cast< GeosPolygon
* >(argp1
);
8045 result
= GeosPolygon_getNumInteriorRings(arg1
);
8047 catch (const std::exception
& e
)
8049 SWIG_exception(SWIG_RuntimeError
, e
.what());
8052 resultobj
= SWIG_From_size_t(static_cast< size_t >(result
));
8059 SWIGINTERN PyObject
*_wrap_Polygon_getInteriorRingN(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8060 PyObject
*resultobj
= 0;
8061 GeosPolygon
*arg1
= (GeosPolygon
*) 0 ;
8067 PyObject
* obj0
= 0 ;
8068 PyObject
* obj1
= 0 ;
8069 GeosGeometry
*result
= 0 ;
8071 if(!PyArg_UnpackTuple(args
,(char *)"Polygon_getInteriorRingN",2,2,&obj0
,&obj1
)) SWIG_fail
;
8072 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPolygon
, 0 | 0 );
8073 if (!SWIG_IsOK(res1
)) {
8074 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Polygon_getInteriorRingN" "', argument " "1"" of type '" "GeosPolygon *""'");
8076 arg1
= reinterpret_cast< GeosPolygon
* >(argp1
);
8077 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
8078 if (!SWIG_IsOK(ecode2
)) {
8079 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "Polygon_getInteriorRingN" "', argument " "2"" of type '" "size_t""'");
8081 arg2
= static_cast< size_t >(val2
);
8085 result
= (GeosGeometry
*)GeosPolygon_getInteriorRingN(arg1
,arg2
);
8087 catch (const std::exception
& e
)
8089 SWIG_exception(SWIG_RuntimeError
, e
.what());
8093 /* %typemap(out) GeosGeometry */
8096 SWIG_exception(SWIG_RuntimeError
, message
);
8098 GeosGeometry
*geom
= result
;
8099 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
8104 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | 0);
8106 case GEOS_LINESTRING
:
8107 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | 0);
8109 case GEOS_LINEARRING
:
8110 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | 0);
8113 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | 0);
8115 case GEOS_MULTIPOINT
:
8116 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | 0);
8118 case GEOS_MULTILINESTRING
:
8119 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | 0);
8121 case GEOS_MULTIPOLYGON
:
8122 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | 0);
8124 case GEOS_GEOMETRYCOLLECTION
:
8125 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | 0);
8135 SWIGINTERN PyObject
*Polygon_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8137 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
8138 SWIG_TypeNewClientData(SWIGTYPE_p_GeosPolygon
, SWIG_NewClientData(obj
));
8139 return SWIG_Py_Void();
8142 SWIGINTERN PyObject
*_wrap_delete_GeometryCollection(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8143 PyObject
*resultobj
= 0;
8144 GeosGeometryCollection
*arg1
= (GeosGeometryCollection
*) 0 ;
8147 PyObject
* obj0
= 0 ;
8149 if(!PyArg_UnpackTuple(args
,(char *)"delete_GeometryCollection",1,1,&obj0
)) SWIG_fail
;
8150 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometryCollection
, SWIG_POINTER_DISOWN
| 0 );
8151 if (!SWIG_IsOK(res1
)) {
8152 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_GeometryCollection" "', argument " "1"" of type '" "GeosGeometryCollection *""'");
8154 arg1
= reinterpret_cast< GeosGeometryCollection
* >(argp1
);
8158 delete_GeosGeometryCollection(arg1
);
8160 catch (const std::exception
& e
)
8162 SWIG_exception(SWIG_RuntimeError
, e
.what());
8165 resultobj
= SWIG_Py_Void();
8172 SWIGINTERN PyObject
*_wrap_GeometryCollection_getGeometryN(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8173 PyObject
*resultobj
= 0;
8174 GeosGeometryCollection
*arg1
= (GeosGeometryCollection
*) 0 ;
8180 PyObject
* obj0
= 0 ;
8181 PyObject
* obj1
= 0 ;
8182 GeosGeometry
*result
= 0 ;
8184 if(!PyArg_UnpackTuple(args
,(char *)"GeometryCollection_getGeometryN",2,2,&obj0
,&obj1
)) SWIG_fail
;
8185 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometryCollection
, 0 | 0 );
8186 if (!SWIG_IsOK(res1
)) {
8187 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "GeometryCollection_getGeometryN" "', argument " "1"" of type '" "GeosGeometryCollection *""'");
8189 arg1
= reinterpret_cast< GeosGeometryCollection
* >(argp1
);
8190 ecode2
= SWIG_AsVal_size_t(obj1
, &val2
);
8191 if (!SWIG_IsOK(ecode2
)) {
8192 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "GeometryCollection_getGeometryN" "', argument " "2"" of type '" "size_t""'");
8194 arg2
= static_cast< size_t >(val2
);
8198 result
= (GeosGeometry
*)GeosGeometryCollection_getGeometryN(arg1
,arg2
);
8200 catch (const std::exception
& e
)
8202 SWIG_exception(SWIG_RuntimeError
, e
.what());
8206 /* %typemap(out) GeosGeometry */
8209 SWIG_exception(SWIG_RuntimeError
, message
);
8211 GeosGeometry
*geom
= result
;
8212 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
8217 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | 0);
8219 case GEOS_LINESTRING
:
8220 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | 0);
8222 case GEOS_LINEARRING
:
8223 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | 0);
8226 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | 0);
8228 case GEOS_MULTIPOINT
:
8229 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | 0);
8231 case GEOS_MULTILINESTRING
:
8232 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | 0);
8234 case GEOS_MULTIPOLYGON
:
8235 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | 0);
8237 case GEOS_GEOMETRYCOLLECTION
:
8238 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | 0);
8248 SWIGINTERN PyObject
*GeometryCollection_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8250 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
8251 SWIG_TypeNewClientData(SWIGTYPE_p_GeosGeometryCollection
, SWIG_NewClientData(obj
));
8252 return SWIG_Py_Void();
8255 SWIGINTERN PyObject
*_wrap_delete_MultiPoint(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8256 PyObject
*resultobj
= 0;
8257 GeosMultiPoint
*arg1
= (GeosMultiPoint
*) 0 ;
8260 PyObject
* obj0
= 0 ;
8262 if(!PyArg_UnpackTuple(args
,(char *)"delete_MultiPoint",1,1,&obj0
)) SWIG_fail
;
8263 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosMultiPoint
, SWIG_POINTER_DISOWN
| 0 );
8264 if (!SWIG_IsOK(res1
)) {
8265 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_MultiPoint" "', argument " "1"" of type '" "GeosMultiPoint *""'");
8267 arg1
= reinterpret_cast< GeosMultiPoint
* >(argp1
);
8271 delete_GeosMultiPoint(arg1
);
8273 catch (const std::exception
& e
)
8275 SWIG_exception(SWIG_RuntimeError
, e
.what());
8278 resultobj
= SWIG_Py_Void();
8285 SWIGINTERN PyObject
*MultiPoint_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8287 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
8288 SWIG_TypeNewClientData(SWIGTYPE_p_GeosMultiPoint
, SWIG_NewClientData(obj
));
8289 return SWIG_Py_Void();
8292 SWIGINTERN PyObject
*_wrap_delete_MultiLineString(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8293 PyObject
*resultobj
= 0;
8294 GeosMultiLineString
*arg1
= (GeosMultiLineString
*) 0 ;
8297 PyObject
* obj0
= 0 ;
8299 if(!PyArg_UnpackTuple(args
,(char *)"delete_MultiLineString",1,1,&obj0
)) SWIG_fail
;
8300 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosMultiLineString
, SWIG_POINTER_DISOWN
| 0 );
8301 if (!SWIG_IsOK(res1
)) {
8302 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_MultiLineString" "', argument " "1"" of type '" "GeosMultiLineString *""'");
8304 arg1
= reinterpret_cast< GeosMultiLineString
* >(argp1
);
8308 delete_GeosMultiLineString(arg1
);
8310 catch (const std::exception
& e
)
8312 SWIG_exception(SWIG_RuntimeError
, e
.what());
8315 resultobj
= SWIG_Py_Void();
8322 SWIGINTERN PyObject
*MultiLineString_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8324 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
8325 SWIG_TypeNewClientData(SWIGTYPE_p_GeosMultiLineString
, SWIG_NewClientData(obj
));
8326 return SWIG_Py_Void();
8329 SWIGINTERN PyObject
*_wrap_delete_MultiLinearRing(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8330 PyObject
*resultobj
= 0;
8331 GeosMultiLinearRing
*arg1
= (GeosMultiLinearRing
*) 0 ;
8334 PyObject
* obj0
= 0 ;
8336 if(!PyArg_UnpackTuple(args
,(char *)"delete_MultiLinearRing",1,1,&obj0
)) SWIG_fail
;
8337 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosMultiLinearRing
, SWIG_POINTER_DISOWN
| 0 );
8338 if (!SWIG_IsOK(res1
)) {
8339 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_MultiLinearRing" "', argument " "1"" of type '" "GeosMultiLinearRing *""'");
8341 arg1
= reinterpret_cast< GeosMultiLinearRing
* >(argp1
);
8345 delete_GeosMultiLinearRing(arg1
);
8347 catch (const std::exception
& e
)
8349 SWIG_exception(SWIG_RuntimeError
, e
.what());
8352 resultobj
= SWIG_Py_Void();
8359 SWIGINTERN PyObject
*MultiLinearRing_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8361 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
8362 SWIG_TypeNewClientData(SWIGTYPE_p_GeosMultiLinearRing
, SWIG_NewClientData(obj
));
8363 return SWIG_Py_Void();
8366 SWIGINTERN PyObject
*_wrap_delete_MultiPolygon(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8367 PyObject
*resultobj
= 0;
8368 GeosMultiPolygon
*arg1
= (GeosMultiPolygon
*) 0 ;
8371 PyObject
* obj0
= 0 ;
8373 if(!PyArg_UnpackTuple(args
,(char *)"delete_MultiPolygon",1,1,&obj0
)) SWIG_fail
;
8374 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosMultiPolygon
, SWIG_POINTER_DISOWN
| 0 );
8375 if (!SWIG_IsOK(res1
)) {
8376 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_MultiPolygon" "', argument " "1"" of type '" "GeosMultiPolygon *""'");
8378 arg1
= reinterpret_cast< GeosMultiPolygon
* >(argp1
);
8382 delete_GeosMultiPolygon(arg1
);
8384 catch (const std::exception
& e
)
8386 SWIG_exception(SWIG_RuntimeError
, e
.what());
8389 resultobj
= SWIG_Py_Void();
8396 SWIGINTERN PyObject
*MultiPolygon_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8398 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
8399 SWIG_TypeNewClientData(SWIGTYPE_p_GeosMultiPolygon
, SWIG_NewClientData(obj
));
8400 return SWIG_Py_Void();
8403 SWIGINTERN PyObject
*_wrap_createPoint(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8404 PyObject
*resultobj
= 0;
8405 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
8407 PyObject
* obj0
= 0 ;
8408 GeosGeometry
*result
= 0 ;
8410 if(!PyArg_UnpackTuple(args
,(char *)"createPoint",1,1,&obj0
)) SWIG_fail
;
8411 res1
= SWIG_ConvertPtr(obj0
, SWIG_as_voidptrptr(&arg1
), SWIGTYPE_p_GeosCoordinateSequence
, SWIG_POINTER_DISOWN
| 0 );
8412 if (!SWIG_IsOK(res1
)) {
8413 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "createPoint" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
8418 result
= (GeosGeometry
*)createPoint(arg1
);
8420 catch (const std::exception
& e
)
8422 SWIG_exception(SWIG_RuntimeError
, e
.what());
8426 /* %typemap(out) GeosGeometry */
8429 SWIG_exception(SWIG_RuntimeError
, message
);
8431 GeosGeometry
*geom
= result
;
8432 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
8437 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
8439 case GEOS_LINESTRING
:
8440 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
8442 case GEOS_LINEARRING
:
8443 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
8446 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
8448 case GEOS_MULTIPOINT
:
8449 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
8451 case GEOS_MULTILINESTRING
:
8452 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
8454 case GEOS_MULTIPOLYGON
:
8455 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
8457 case GEOS_GEOMETRYCOLLECTION
:
8458 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
8468 SWIGINTERN PyObject
*_wrap_createLineString(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8469 PyObject
*resultobj
= 0;
8470 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
8472 PyObject
* obj0
= 0 ;
8473 GeosGeometry
*result
= 0 ;
8475 if(!PyArg_UnpackTuple(args
,(char *)"createLineString",1,1,&obj0
)) SWIG_fail
;
8476 res1
= SWIG_ConvertPtr(obj0
, SWIG_as_voidptrptr(&arg1
), SWIGTYPE_p_GeosCoordinateSequence
, SWIG_POINTER_DISOWN
| 0 );
8477 if (!SWIG_IsOK(res1
)) {
8478 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "createLineString" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
8483 result
= (GeosGeometry
*)createLineString(arg1
);
8485 catch (const std::exception
& e
)
8487 SWIG_exception(SWIG_RuntimeError
, e
.what());
8491 /* %typemap(out) GeosGeometry */
8494 SWIG_exception(SWIG_RuntimeError
, message
);
8496 GeosGeometry
*geom
= result
;
8497 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
8502 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
8504 case GEOS_LINESTRING
:
8505 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
8507 case GEOS_LINEARRING
:
8508 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
8511 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
8513 case GEOS_MULTIPOINT
:
8514 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
8516 case GEOS_MULTILINESTRING
:
8517 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
8519 case GEOS_MULTIPOLYGON
:
8520 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
8522 case GEOS_GEOMETRYCOLLECTION
:
8523 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
8533 SWIGINTERN PyObject
*_wrap_createLinearRing(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8534 PyObject
*resultobj
= 0;
8535 GeosCoordinateSequence
*arg1
= (GeosCoordinateSequence
*) 0 ;
8537 PyObject
* obj0
= 0 ;
8538 GeosGeometry
*result
= 0 ;
8540 if(!PyArg_UnpackTuple(args
,(char *)"createLinearRing",1,1,&obj0
)) SWIG_fail
;
8541 res1
= SWIG_ConvertPtr(obj0
, SWIG_as_voidptrptr(&arg1
), SWIGTYPE_p_GeosCoordinateSequence
, SWIG_POINTER_DISOWN
| 0 );
8542 if (!SWIG_IsOK(res1
)) {
8543 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "createLinearRing" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
8548 result
= (GeosGeometry
*)createLinearRing(arg1
);
8550 catch (const std::exception
& e
)
8552 SWIG_exception(SWIG_RuntimeError
, e
.what());
8556 /* %typemap(out) GeosGeometry */
8559 SWIG_exception(SWIG_RuntimeError
, message
);
8561 GeosGeometry
*geom
= result
;
8562 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
8567 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
8569 case GEOS_LINESTRING
:
8570 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
8572 case GEOS_LINEARRING
:
8573 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
8576 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
8578 case GEOS_MULTIPOINT
:
8579 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
8581 case GEOS_MULTILINESTRING
:
8582 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
8584 case GEOS_MULTIPOLYGON
:
8585 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
8587 case GEOS_GEOMETRYCOLLECTION
:
8588 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
8598 SWIGINTERN PyObject
*_wrap_createPolygon(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8599 PyObject
*resultobj
= 0;
8600 GeosLinearRing
*arg1
= (GeosLinearRing
*) 0 ;
8601 GeosLinearRing
**arg2
= (GeosLinearRing
**) 0 ;
8604 PyObject
* obj0
= 0 ;
8605 PyObject
* obj1
= 0 ;
8606 GeosGeometry
*result
= 0 ;
8612 if(!PyArg_UnpackTuple(args
,(char *)"createPolygon",1,2,&obj0
,&obj1
)) SWIG_fail
;
8613 res1
= SWIG_ConvertPtr(obj0
, SWIG_as_voidptrptr(&arg1
), SWIGTYPE_p_GeosLinearRing
, SWIG_POINTER_DISOWN
| 0 );
8614 if (!SWIG_IsOK(res1
)) {
8615 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
8619 if (obj1
== Py_None
)
8626 /* Make sure the input can be treated as an array. */
8627 if (!PySequence_Check(obj1
))
8628 SWIG_exception_fail(SWIG_RuntimeError
, "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
8630 /* Get the length */
8631 arg3
= PySequence_Size(obj1
);
8633 /* Allocate space for the C array. */
8634 arg2
= (GeosLinearRing
**) malloc(arg3
*sizeof(GeosLinearRing
*));
8636 for(size_t i
= 0; i
<arg3
; i
++)
8638 /* Get the Python Object */
8639 PyObject
*item
= PySequence_GetItem(obj1
,i
);
8641 /* Get the underlying pointer and give up ownership of it. */
8642 GeosLinearRing
*ring
= NULL
;
8643 int convertResult
= SWIG_ConvertPtr(item
, (void**)&ring
, SWIGTYPE_p_GeosLinearRing
, SWIG_POINTER_DISOWN
);
8644 if (!SWIG_IsOK(convertResult
)) {
8645 SWIG_exception_fail(SWIG_ArgError(convertResult
), "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
8648 /* Put the pointer in the array */
8657 result
= (GeosGeometry
*)createPolygon(arg1
,arg2
,arg3
);
8659 catch (const std::exception
& e
)
8661 SWIG_exception(SWIG_RuntimeError
, e
.what());
8665 /* %typemap(out) GeosGeometry */
8668 SWIG_exception(SWIG_RuntimeError
, message
);
8670 GeosGeometry
*geom
= result
;
8671 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
8676 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
8678 case GEOS_LINESTRING
:
8679 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
8681 case GEOS_LINEARRING
:
8682 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
8685 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
8687 case GEOS_MULTIPOINT
:
8688 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
8690 case GEOS_MULTILINESTRING
:
8691 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
8693 case GEOS_MULTIPOLYGON
:
8694 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
8696 case GEOS_GEOMETRYCOLLECTION
:
8697 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
8717 SWIGINTERN PyObject
*_wrap_new_Prepared(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8718 PyObject
*resultobj
= 0;
8719 GeosGeometry
*arg1
= (GeosGeometry
*) 0 ;
8722 PyObject
* obj0
= 0 ;
8723 GeosPreparedGeometry
*result
= 0 ;
8725 if(!PyArg_UnpackTuple(args
,(char *)"new_Prepared",1,1,&obj0
)) SWIG_fail
;
8726 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
8727 if (!SWIG_IsOK(res1
)) {
8728 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "new_Prepared" "', argument " "1"" of type '" "GeosGeometry const *""'");
8730 arg1
= reinterpret_cast< GeosGeometry
* >(argp1
);
8734 result
= (GeosPreparedGeometry
*)new_GeosPreparedGeometry((GeosGeometry
const *)arg1
);
8736 catch (const std::exception
& e
)
8738 SWIG_exception(SWIG_RuntimeError
, e
.what());
8741 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPreparedGeometry
, SWIG_POINTER_NEW
| 0 );
8748 SWIGINTERN PyObject
*_wrap_delete_Prepared(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8749 PyObject
*resultobj
= 0;
8750 GeosPreparedGeometry
*arg1
= (GeosPreparedGeometry
*) 0 ;
8753 PyObject
* obj0
= 0 ;
8755 if(!PyArg_UnpackTuple(args
,(char *)"delete_Prepared",1,1,&obj0
)) SWIG_fail
;
8756 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPreparedGeometry
, SWIG_POINTER_DISOWN
| 0 );
8757 if (!SWIG_IsOK(res1
)) {
8758 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_Prepared" "', argument " "1"" of type '" "GeosPreparedGeometry *""'");
8760 arg1
= reinterpret_cast< GeosPreparedGeometry
* >(argp1
);
8764 delete_GeosPreparedGeometry(arg1
);
8766 catch (const std::exception
& e
)
8768 SWIG_exception(SWIG_RuntimeError
, e
.what());
8771 resultobj
= SWIG_Py_Void();
8778 SWIGINTERN PyObject
*_wrap_Prepared_contains(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8779 PyObject
*resultobj
= 0;
8780 GeosPreparedGeometry
*arg1
= (GeosPreparedGeometry
*) 0 ;
8781 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
8786 PyObject
* obj0
= 0 ;
8787 PyObject
* obj1
= 0 ;
8790 if(!PyArg_UnpackTuple(args
,(char *)"Prepared_contains",2,2,&obj0
,&obj1
)) SWIG_fail
;
8791 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPreparedGeometry
, 0 | 0 );
8792 if (!SWIG_IsOK(res1
)) {
8793 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Prepared_contains" "', argument " "1"" of type '" "GeosPreparedGeometry *""'");
8795 arg1
= reinterpret_cast< GeosPreparedGeometry
* >(argp1
);
8796 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
8797 if (!SWIG_IsOK(res2
)) {
8798 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Prepared_contains" "', argument " "2"" of type '" "GeosGeometry const *""'");
8800 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
8804 result
= (bool)GeosPreparedGeometry_contains(arg1
,(GeosGeometry
const *)arg2
);
8806 catch (const std::exception
& e
)
8808 SWIG_exception(SWIG_RuntimeError
, e
.what());
8811 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
8818 SWIGINTERN PyObject
*_wrap_Prepared_containsProperly(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8819 PyObject
*resultobj
= 0;
8820 GeosPreparedGeometry
*arg1
= (GeosPreparedGeometry
*) 0 ;
8821 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
8826 PyObject
* obj0
= 0 ;
8827 PyObject
* obj1
= 0 ;
8830 if(!PyArg_UnpackTuple(args
,(char *)"Prepared_containsProperly",2,2,&obj0
,&obj1
)) SWIG_fail
;
8831 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPreparedGeometry
, 0 | 0 );
8832 if (!SWIG_IsOK(res1
)) {
8833 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Prepared_containsProperly" "', argument " "1"" of type '" "GeosPreparedGeometry *""'");
8835 arg1
= reinterpret_cast< GeosPreparedGeometry
* >(argp1
);
8836 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
8837 if (!SWIG_IsOK(res2
)) {
8838 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Prepared_containsProperly" "', argument " "2"" of type '" "GeosGeometry const *""'");
8840 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
8844 result
= (bool)GeosPreparedGeometry_containsProperly(arg1
,(GeosGeometry
const *)arg2
);
8846 catch (const std::exception
& e
)
8848 SWIG_exception(SWIG_RuntimeError
, e
.what());
8851 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
8858 SWIGINTERN PyObject
*_wrap_Prepared_covers(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8859 PyObject
*resultobj
= 0;
8860 GeosPreparedGeometry
*arg1
= (GeosPreparedGeometry
*) 0 ;
8861 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
8866 PyObject
* obj0
= 0 ;
8867 PyObject
* obj1
= 0 ;
8870 if(!PyArg_UnpackTuple(args
,(char *)"Prepared_covers",2,2,&obj0
,&obj1
)) SWIG_fail
;
8871 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPreparedGeometry
, 0 | 0 );
8872 if (!SWIG_IsOK(res1
)) {
8873 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Prepared_covers" "', argument " "1"" of type '" "GeosPreparedGeometry *""'");
8875 arg1
= reinterpret_cast< GeosPreparedGeometry
* >(argp1
);
8876 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
8877 if (!SWIG_IsOK(res2
)) {
8878 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Prepared_covers" "', argument " "2"" of type '" "GeosGeometry const *""'");
8880 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
8884 result
= (bool)GeosPreparedGeometry_covers(arg1
,(GeosGeometry
const *)arg2
);
8886 catch (const std::exception
& e
)
8888 SWIG_exception(SWIG_RuntimeError
, e
.what());
8891 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
8898 SWIGINTERN PyObject
*_wrap_Prepared_intersects(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8899 PyObject
*resultobj
= 0;
8900 GeosPreparedGeometry
*arg1
= (GeosPreparedGeometry
*) 0 ;
8901 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
8906 PyObject
* obj0
= 0 ;
8907 PyObject
* obj1
= 0 ;
8910 if(!PyArg_UnpackTuple(args
,(char *)"Prepared_intersects",2,2,&obj0
,&obj1
)) SWIG_fail
;
8911 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosPreparedGeometry
, 0 | 0 );
8912 if (!SWIG_IsOK(res1
)) {
8913 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Prepared_intersects" "', argument " "1"" of type '" "GeosPreparedGeometry *""'");
8915 arg1
= reinterpret_cast< GeosPreparedGeometry
* >(argp1
);
8916 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
8917 if (!SWIG_IsOK(res2
)) {
8918 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Prepared_intersects" "', argument " "2"" of type '" "GeosGeometry const *""'");
8920 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
8924 result
= (bool)GeosPreparedGeometry_intersects(arg1
,(GeosGeometry
const *)arg2
);
8926 catch (const std::exception
& e
)
8928 SWIG_exception(SWIG_RuntimeError
, e
.what());
8931 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
8938 SWIGINTERN PyObject
*Prepared_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8940 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
8941 SWIG_TypeNewClientData(SWIGTYPE_p_GeosPreparedGeometry
, SWIG_NewClientData(obj
));
8942 return SWIG_Py_Void();
8945 SWIGINTERN PyObject
*_wrap_new_STRtree(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8946 PyObject
*resultobj
= 0;
8950 PyObject
* obj0
= 0 ;
8951 GeosSTRtree
*result
= 0 ;
8956 if(!PyArg_UnpackTuple(args
,(char *)"new_STRtree",0,1,&obj0
)) SWIG_fail
;
8958 ecode1
= SWIG_AsVal_int(obj0
, &val1
);
8959 if (!SWIG_IsOK(ecode1
)) {
8960 SWIG_exception_fail(SWIG_ArgError(ecode1
), "in method '" "new_STRtree" "', argument " "1"" of type '" "int""'");
8962 arg1
= static_cast< int >(val1
);
8967 result
= (GeosSTRtree
*)new_GeosSTRtree(arg1
);
8969 catch (const std::exception
& e
)
8971 SWIG_exception(SWIG_RuntimeError
, e
.what());
8974 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosSTRtree
, SWIG_POINTER_NEW
| 0 );
8981 SWIGINTERN PyObject
*_wrap_delete_STRtree(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
8982 PyObject
*resultobj
= 0;
8983 GeosSTRtree
*arg1
= (GeosSTRtree
*) 0 ;
8986 PyObject
* obj0
= 0 ;
8988 if(!PyArg_UnpackTuple(args
,(char *)"delete_STRtree",1,1,&obj0
)) SWIG_fail
;
8989 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosSTRtree
, SWIG_POINTER_DISOWN
| 0 );
8990 if (!SWIG_IsOK(res1
)) {
8991 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_STRtree" "', argument " "1"" of type '" "GeosSTRtree *""'");
8993 arg1
= reinterpret_cast< GeosSTRtree
* >(argp1
);
8997 delete_GeosSTRtree(arg1
);
8999 catch (const std::exception
& e
)
9001 SWIG_exception(SWIG_RuntimeError
, e
.what());
9004 resultobj
= SWIG_Py_Void();
9011 SWIGINTERN PyObject
*_wrap_STRtree_insert(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9012 PyObject
*resultobj
= 0;
9013 GeosSTRtree
*arg1
= (GeosSTRtree
*) 0 ;
9014 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
9015 GeosIndexItem arg3
;
9022 PyObject
* obj0
= 0 ;
9023 PyObject
* obj1
= 0 ;
9024 PyObject
* obj2
= 0 ;
9026 if(!PyArg_UnpackTuple(args
,(char *)"STRtree_insert",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
9027 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosSTRtree
, 0 | 0 );
9028 if (!SWIG_IsOK(res1
)) {
9029 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "STRtree_insert" "', argument " "1"" of type '" "GeosSTRtree *""'");
9031 arg1
= reinterpret_cast< GeosSTRtree
* >(argp1
);
9032 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
9033 if (!SWIG_IsOK(res2
)) {
9034 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "STRtree_insert" "', argument " "2"" of type '" "GeosGeometry const *""'");
9036 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
9038 res3
= SWIG_ConvertPtr(obj2
, &argp3
, SWIGTYPE_p_GeosIndexItem
, 0 | 0);
9039 if (!SWIG_IsOK(res3
)) {
9040 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "STRtree_insert" "', argument " "3"" of type '" "GeosIndexItem""'");
9043 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "STRtree_insert" "', argument " "3"" of type '" "GeosIndexItem""'");
9045 GeosIndexItem
* temp
= reinterpret_cast< GeosIndexItem
* >(argp3
);
9047 if (SWIG_IsNewObj(res3
)) delete temp
;
9053 GeosSTRtree_insert(arg1
,(GeosGeometry
const *)arg2
,arg3
);
9055 catch (const std::exception
& e
)
9057 SWIG_exception(SWIG_RuntimeError
, e
.what());
9060 resultobj
= SWIG_Py_Void();
9067 SWIGINTERN PyObject
*_wrap_STRtree_remove(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9068 PyObject
*resultobj
= 0;
9069 GeosSTRtree
*arg1
= (GeosSTRtree
*) 0 ;
9070 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
9071 GeosIndexItem arg3
;
9078 PyObject
* obj0
= 0 ;
9079 PyObject
* obj1
= 0 ;
9080 PyObject
* obj2
= 0 ;
9082 if(!PyArg_UnpackTuple(args
,(char *)"STRtree_remove",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
9083 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosSTRtree
, 0 | 0 );
9084 if (!SWIG_IsOK(res1
)) {
9085 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "STRtree_remove" "', argument " "1"" of type '" "GeosSTRtree *""'");
9087 arg1
= reinterpret_cast< GeosSTRtree
* >(argp1
);
9088 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
9089 if (!SWIG_IsOK(res2
)) {
9090 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "STRtree_remove" "', argument " "2"" of type '" "GeosGeometry const *""'");
9092 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
9094 res3
= SWIG_ConvertPtr(obj2
, &argp3
, SWIGTYPE_p_GeosIndexItem
, 0 | 0);
9095 if (!SWIG_IsOK(res3
)) {
9096 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "STRtree_remove" "', argument " "3"" of type '" "GeosIndexItem""'");
9099 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "STRtree_remove" "', argument " "3"" of type '" "GeosIndexItem""'");
9101 GeosIndexItem
* temp
= reinterpret_cast< GeosIndexItem
* >(argp3
);
9103 if (SWIG_IsNewObj(res3
)) delete temp
;
9109 GeosSTRtree_remove(arg1
,(GeosGeometry
const *)arg2
,arg3
);
9111 catch (const std::exception
& e
)
9113 SWIG_exception(SWIG_RuntimeError
, e
.what());
9116 resultobj
= SWIG_Py_Void();
9123 SWIGINTERN PyObject
*_wrap_STRtree_query(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9124 PyObject
*resultobj
= 0;
9125 GeosSTRtree
*arg1
= (GeosSTRtree
*) 0 ;
9126 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
9127 GeosQueryCallback arg3
;
9128 GeosIndexItem arg4
;
9137 PyObject
* obj0
= 0 ;
9138 PyObject
* obj1
= 0 ;
9139 PyObject
* obj2
= 0 ;
9140 PyObject
* obj3
= 0 ;
9142 if(!PyArg_UnpackTuple(args
,(char *)"STRtree_query",4,4,&obj0
,&obj1
,&obj2
,&obj3
)) SWIG_fail
;
9143 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosSTRtree
, 0 | 0 );
9144 if (!SWIG_IsOK(res1
)) {
9145 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "STRtree_query" "', argument " "1"" of type '" "GeosSTRtree *""'");
9147 arg1
= reinterpret_cast< GeosSTRtree
* >(argp1
);
9148 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
9149 if (!SWIG_IsOK(res2
)) {
9150 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "STRtree_query" "', argument " "2"" of type '" "GeosGeometry const *""'");
9152 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
9154 res3
= SWIG_ConvertPtr(obj2
, &argp3
, SWIGTYPE_p_GeosQueryCallback
, 0 | 0);
9155 if (!SWIG_IsOK(res3
)) {
9156 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "STRtree_query" "', argument " "3"" of type '" "GeosQueryCallback""'");
9159 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "STRtree_query" "', argument " "3"" of type '" "GeosQueryCallback""'");
9161 GeosQueryCallback
* temp
= reinterpret_cast< GeosQueryCallback
* >(argp3
);
9163 if (SWIG_IsNewObj(res3
)) delete temp
;
9167 res4
= SWIG_ConvertPtr(obj3
, &argp4
, SWIGTYPE_p_GeosIndexItem
, 0 | 0);
9168 if (!SWIG_IsOK(res4
)) {
9169 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "STRtree_query" "', argument " "4"" of type '" "GeosIndexItem""'");
9172 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "STRtree_query" "', argument " "4"" of type '" "GeosIndexItem""'");
9174 GeosIndexItem
* temp
= reinterpret_cast< GeosIndexItem
* >(argp4
);
9176 if (SWIG_IsNewObj(res4
)) delete temp
;
9182 GeosSTRtree_query(arg1
,(GeosGeometry
const *)arg2
,arg3
,arg4
);
9184 catch (const std::exception
& e
)
9186 SWIG_exception(SWIG_RuntimeError
, e
.what());
9189 resultobj
= SWIG_Py_Void();
9196 SWIGINTERN PyObject
*_wrap_STRtree_iterate(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9197 PyObject
*resultobj
= 0;
9198 GeosSTRtree
*arg1
= (GeosSTRtree
*) 0 ;
9199 GeosQueryCallback arg2
;
9200 GeosIndexItem arg3
;
9207 PyObject
* obj0
= 0 ;
9208 PyObject
* obj1
= 0 ;
9209 PyObject
* obj2
= 0 ;
9211 if(!PyArg_UnpackTuple(args
,(char *)"STRtree_iterate",3,3,&obj0
,&obj1
,&obj2
)) SWIG_fail
;
9212 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosSTRtree
, 0 | 0 );
9213 if (!SWIG_IsOK(res1
)) {
9214 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "STRtree_iterate" "', argument " "1"" of type '" "GeosSTRtree *""'");
9216 arg1
= reinterpret_cast< GeosSTRtree
* >(argp1
);
9218 res2
= SWIG_ConvertPtr(obj1
, &argp2
, SWIGTYPE_p_GeosQueryCallback
, 0 | 0);
9219 if (!SWIG_IsOK(res2
)) {
9220 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "STRtree_iterate" "', argument " "2"" of type '" "GeosQueryCallback""'");
9223 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "STRtree_iterate" "', argument " "2"" of type '" "GeosQueryCallback""'");
9225 GeosQueryCallback
* temp
= reinterpret_cast< GeosQueryCallback
* >(argp2
);
9227 if (SWIG_IsNewObj(res2
)) delete temp
;
9231 res3
= SWIG_ConvertPtr(obj2
, &argp3
, SWIGTYPE_p_GeosIndexItem
, 0 | 0);
9232 if (!SWIG_IsOK(res3
)) {
9233 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "STRtree_iterate" "', argument " "3"" of type '" "GeosIndexItem""'");
9236 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "STRtree_iterate" "', argument " "3"" of type '" "GeosIndexItem""'");
9238 GeosIndexItem
* temp
= reinterpret_cast< GeosIndexItem
* >(argp3
);
9240 if (SWIG_IsNewObj(res3
)) delete temp
;
9246 GeosSTRtree_iterate(arg1
,arg2
,arg3
);
9248 catch (const std::exception
& e
)
9250 SWIG_exception(SWIG_RuntimeError
, e
.what());
9253 resultobj
= SWIG_Py_Void();
9260 SWIGINTERN PyObject
*STRtree_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9262 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
9263 SWIG_TypeNewClientData(SWIGTYPE_p_GeosSTRtree
, SWIG_NewClientData(obj
));
9264 return SWIG_Py_Void();
9267 SWIGINTERN PyObject
*_wrap_new_WktReader(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9268 PyObject
*resultobj
= 0;
9269 GeosWktReader
*result
= 0 ;
9274 result
= (GeosWktReader
*)new_GeosWktReader();
9276 catch (const std::exception
& e
)
9278 SWIG_exception(SWIG_RuntimeError
, e
.what());
9281 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosWktReader
, SWIG_POINTER_NEW
| 0 );
9288 SWIGINTERN PyObject
*_wrap_delete_WktReader(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9289 PyObject
*resultobj
= 0;
9290 GeosWktReader
*arg1
= (GeosWktReader
*) 0 ;
9293 PyObject
* obj0
= 0 ;
9295 if(!PyArg_UnpackTuple(args
,(char *)"delete_WktReader",1,1,&obj0
)) SWIG_fail
;
9296 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWktReader
, SWIG_POINTER_DISOWN
| 0 );
9297 if (!SWIG_IsOK(res1
)) {
9298 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_WktReader" "', argument " "1"" of type '" "GeosWktReader *""'");
9300 arg1
= reinterpret_cast< GeosWktReader
* >(argp1
);
9304 delete_GeosWktReader(arg1
);
9306 catch (const std::exception
& e
)
9308 SWIG_exception(SWIG_RuntimeError
, e
.what());
9311 resultobj
= SWIG_Py_Void();
9318 SWIGINTERN PyObject
*_wrap_WktReader_read(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9319 PyObject
*resultobj
= 0;
9320 GeosWktReader
*arg1
= (GeosWktReader
*) 0 ;
9321 char *arg2
= (char *) 0 ;
9327 PyObject
* obj0
= 0 ;
9328 PyObject
* obj1
= 0 ;
9329 GeosGeometry
*result
= 0 ;
9331 if(!PyArg_UnpackTuple(args
,(char *)"WktReader_read",2,2,&obj0
,&obj1
)) SWIG_fail
;
9332 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWktReader
, 0 | 0 );
9333 if (!SWIG_IsOK(res1
)) {
9334 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WktReader_read" "', argument " "1"" of type '" "GeosWktReader *""'");
9336 arg1
= reinterpret_cast< GeosWktReader
* >(argp1
);
9337 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
9338 if (!SWIG_IsOK(res2
)) {
9339 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "WktReader_read" "', argument " "2"" of type '" "char const *""'");
9341 arg2
= reinterpret_cast< char * >(buf2
);
9345 result
= (GeosGeometry
*)GeosWktReader_read(arg1
,(char const *)arg2
);
9347 catch (const std::exception
& e
)
9349 SWIG_exception(SWIG_RuntimeError
, e
.what());
9353 /* %typemap(out) GeosGeometry */
9356 SWIG_exception(SWIG_RuntimeError
, message
);
9358 GeosGeometry
*geom
= result
;
9359 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
9364 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
9366 case GEOS_LINESTRING
:
9367 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
9369 case GEOS_LINEARRING
:
9370 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
9373 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
9375 case GEOS_MULTIPOINT
:
9376 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
9378 case GEOS_MULTILINESTRING
:
9379 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
9381 case GEOS_MULTIPOLYGON
:
9382 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
9384 case GEOS_GEOMETRYCOLLECTION
:
9385 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
9389 if (alloc2
== SWIG_NEWOBJ
) delete[] buf2
;
9392 if (alloc2
== SWIG_NEWOBJ
) delete[] buf2
;
9397 SWIGINTERN PyObject
*WktReader_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9399 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
9400 SWIG_TypeNewClientData(SWIGTYPE_p_GeosWktReader
, SWIG_NewClientData(obj
));
9401 return SWIG_Py_Void();
9404 SWIGINTERN PyObject
*_wrap_new_WktWriter(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9405 PyObject
*resultobj
= 0;
9406 GeosWktWriter
*result
= 0 ;
9411 result
= (GeosWktWriter
*)new_GeosWktWriter();
9413 catch (const std::exception
& e
)
9415 SWIG_exception(SWIG_RuntimeError
, e
.what());
9418 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosWktWriter
, SWIG_POINTER_NEW
| 0 );
9425 SWIGINTERN PyObject
*_wrap_delete_WktWriter(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9426 PyObject
*resultobj
= 0;
9427 GeosWktWriter
*arg1
= (GeosWktWriter
*) 0 ;
9430 PyObject
* obj0
= 0 ;
9432 if(!PyArg_UnpackTuple(args
,(char *)"delete_WktWriter",1,1,&obj0
)) SWIG_fail
;
9433 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWktWriter
, SWIG_POINTER_DISOWN
| 0 );
9434 if (!SWIG_IsOK(res1
)) {
9435 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_WktWriter" "', argument " "1"" of type '" "GeosWktWriter *""'");
9437 arg1
= reinterpret_cast< GeosWktWriter
* >(argp1
);
9441 delete_GeosWktWriter(arg1
);
9443 catch (const std::exception
& e
)
9445 SWIG_exception(SWIG_RuntimeError
, e
.what());
9448 resultobj
= SWIG_Py_Void();
9455 SWIGINTERN PyObject
*_wrap_WktWriter_write(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9456 PyObject
*resultobj
= 0;
9457 GeosWktWriter
*arg1
= (GeosWktWriter
*) 0 ;
9458 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
9463 PyObject
* obj0
= 0 ;
9464 PyObject
* obj1
= 0 ;
9467 if(!PyArg_UnpackTuple(args
,(char *)"WktWriter_write",2,2,&obj0
,&obj1
)) SWIG_fail
;
9468 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWktWriter
, 0 | 0 );
9469 if (!SWIG_IsOK(res1
)) {
9470 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WktWriter_write" "', argument " "1"" of type '" "GeosWktWriter *""'");
9472 arg1
= reinterpret_cast< GeosWktWriter
* >(argp1
);
9473 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
9474 if (!SWIG_IsOK(res2
)) {
9475 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "WktWriter_write" "', argument " "2"" of type '" "GeosGeometry const *""'");
9477 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
9481 result
= (char *)GeosWktWriter_write(arg1
,(GeosGeometry
const *)arg2
);
9483 catch (const std::exception
& e
)
9485 SWIG_exception(SWIG_RuntimeError
, e
.what());
9488 resultobj
= SWIG_FromCharPtr((const char *)result
);
9495 SWIGINTERN PyObject
*WktWriter_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9497 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
9498 SWIG_TypeNewClientData(SWIGTYPE_p_GeosWktWriter
, SWIG_NewClientData(obj
));
9499 return SWIG_Py_Void();
9502 SWIGINTERN PyObject
*_wrap_new_WkbReader(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9503 PyObject
*resultobj
= 0;
9504 GeosWkbReader
*result
= 0 ;
9509 result
= (GeosWkbReader
*)new_GeosWkbReader();
9511 catch (const std::exception
& e
)
9513 SWIG_exception(SWIG_RuntimeError
, e
.what());
9516 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosWkbReader
, SWIG_POINTER_NEW
| 0 );
9523 SWIGINTERN PyObject
*_wrap_delete_WkbReader(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9524 PyObject
*resultobj
= 0;
9525 GeosWkbReader
*arg1
= (GeosWkbReader
*) 0 ;
9528 PyObject
* obj0
= 0 ;
9530 if(!PyArg_UnpackTuple(args
,(char *)"delete_WkbReader",1,1,&obj0
)) SWIG_fail
;
9531 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbReader
, SWIG_POINTER_DISOWN
| 0 );
9532 if (!SWIG_IsOK(res1
)) {
9533 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_WkbReader" "', argument " "1"" of type '" "GeosWkbReader *""'");
9535 arg1
= reinterpret_cast< GeosWkbReader
* >(argp1
);
9539 delete_GeosWkbReader(arg1
);
9541 catch (const std::exception
& e
)
9543 SWIG_exception(SWIG_RuntimeError
, e
.what());
9546 resultobj
= SWIG_Py_Void();
9553 SWIGINTERN PyObject
*_wrap_WkbReader_read(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9554 PyObject
*resultobj
= 0;
9555 GeosWkbReader
*arg1
= (GeosWkbReader
*) 0 ;
9556 unsigned char *arg2
= (unsigned char *) 0 ;
9561 PyObject
* obj0
= 0 ;
9562 PyObject
* obj1
= 0 ;
9563 GeosGeometry
*result
= 0 ;
9565 if(!PyArg_UnpackTuple(args
,(char *)"WkbReader_read",2,2,&obj0
,&obj1
)) SWIG_fail
;
9566 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbReader
, 0 | 0 );
9567 if (!SWIG_IsOK(res1
)) {
9568 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbReader_read" "', argument " "1"" of type '" "GeosWkbReader *""'");
9570 arg1
= reinterpret_cast< GeosWkbReader
* >(argp1
);
9572 /* %typemap(in) (const unsigned char* wkb, size_t size) (int alloc2 = 0) */
9573 if (SWIG_AsCharPtrAndSize(obj1
, (char**)&arg2
, &arg3
, &alloc2
) != SWIG_OK
)
9574 SWIG_exception(SWIG_RuntimeError
, "Expecting a string");
9575 /* Don't want to include last null character! */
9581 result
= (GeosGeometry
*)GeosWkbReader_read(arg1
,(unsigned char const *)arg2
,arg3
);
9583 catch (const std::exception
& e
)
9585 SWIG_exception(SWIG_RuntimeError
, e
.what());
9589 /* %typemap(out) GeosGeometry */
9592 SWIG_exception(SWIG_RuntimeError
, message
);
9594 GeosGeometry
*geom
= result
;
9595 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
9600 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
9602 case GEOS_LINESTRING
:
9603 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
9605 case GEOS_LINEARRING
:
9606 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
9609 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
9611 case GEOS_MULTIPOINT
:
9612 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
9614 case GEOS_MULTILINESTRING
:
9615 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
9617 case GEOS_MULTIPOLYGON
:
9618 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
9620 case GEOS_GEOMETRYCOLLECTION
:
9621 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
9631 SWIGINTERN PyObject
*_wrap_WkbReader_readHEX(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9632 PyObject
*resultobj
= 0;
9633 GeosWkbReader
*arg1
= (GeosWkbReader
*) 0 ;
9634 unsigned char *arg2
= (unsigned char *) 0 ;
9639 PyObject
* obj0
= 0 ;
9640 PyObject
* obj1
= 0 ;
9641 GeosGeometry
*result
= 0 ;
9643 if(!PyArg_UnpackTuple(args
,(char *)"WkbReader_readHEX",2,2,&obj0
,&obj1
)) SWIG_fail
;
9644 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbReader
, 0 | 0 );
9645 if (!SWIG_IsOK(res1
)) {
9646 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbReader_readHEX" "', argument " "1"" of type '" "GeosWkbReader *""'");
9648 arg1
= reinterpret_cast< GeosWkbReader
* >(argp1
);
9650 /* %typemap(in) (const unsigned char* wkb, size_t size) (int alloc2 = 0) */
9651 if (SWIG_AsCharPtrAndSize(obj1
, (char**)&arg2
, &arg3
, &alloc2
) != SWIG_OK
)
9652 SWIG_exception(SWIG_RuntimeError
, "Expecting a string");
9653 /* Don't want to include last null character! */
9659 result
= (GeosGeometry
*)GeosWkbReader_readHEX(arg1
,(unsigned char const *)arg2
,arg3
);
9661 catch (const std::exception
& e
)
9663 SWIG_exception(SWIG_RuntimeError
, e
.what());
9667 /* %typemap(out) GeosGeometry */
9670 SWIG_exception(SWIG_RuntimeError
, message
);
9672 GeosGeometry
*geom
= result
;
9673 GEOSGeomTypes geomId
= (GEOSGeomTypes
)GEOSGeomTypeId((GEOSGeom
) geom
);
9678 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPoint
, 0 | SWIG_POINTER_OWN
);
9680 case GEOS_LINESTRING
:
9681 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLineString
, 0 | SWIG_POINTER_OWN
);
9683 case GEOS_LINEARRING
:
9684 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosLinearRing
, 0 | SWIG_POINTER_OWN
);
9687 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosPolygon
, 0 | SWIG_POINTER_OWN
);
9689 case GEOS_MULTIPOINT
:
9690 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPoint
, 0 | SWIG_POINTER_OWN
);
9692 case GEOS_MULTILINESTRING
:
9693 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiLineString
, 0 | SWIG_POINTER_OWN
);
9695 case GEOS_MULTIPOLYGON
:
9696 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosMultiPolygon
, 0 | SWIG_POINTER_OWN
);
9698 case GEOS_GEOMETRYCOLLECTION
:
9699 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosGeometryCollection
, 0 | SWIG_POINTER_OWN
);
9709 SWIGINTERN PyObject
*WkbReader_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9711 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
9712 SWIG_TypeNewClientData(SWIGTYPE_p_GeosWkbReader
, SWIG_NewClientData(obj
));
9713 return SWIG_Py_Void();
9716 SWIGINTERN PyObject
*_wrap_new_WkbWriter(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9717 PyObject
*resultobj
= 0;
9718 GeosWkbWriter
*result
= 0 ;
9723 result
= (GeosWkbWriter
*)new_GeosWkbWriter();
9725 catch (const std::exception
& e
)
9727 SWIG_exception(SWIG_RuntimeError
, e
.what());
9730 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_GeosWkbWriter
, SWIG_POINTER_NEW
| 0 );
9737 SWIGINTERN PyObject
*_wrap_delete_WkbWriter(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9738 PyObject
*resultobj
= 0;
9739 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
9742 PyObject
* obj0
= 0 ;
9744 if(!PyArg_UnpackTuple(args
,(char *)"delete_WkbWriter",1,1,&obj0
)) SWIG_fail
;
9745 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, SWIG_POINTER_DISOWN
| 0 );
9746 if (!SWIG_IsOK(res1
)) {
9747 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_WkbWriter" "', argument " "1"" of type '" "GeosWkbWriter *""'");
9749 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
9753 delete_GeosWkbWriter(arg1
);
9755 catch (const std::exception
& e
)
9757 SWIG_exception(SWIG_RuntimeError
, e
.what());
9760 resultobj
= SWIG_Py_Void();
9767 SWIGINTERN PyObject
*_wrap_WkbWriter_getOutputDimension(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9768 PyObject
*resultobj
= 0;
9769 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
9772 PyObject
* obj0
= 0 ;
9775 if(!PyArg_UnpackTuple(args
,(char *)"WkbWriter_getOutputDimension",1,1,&obj0
)) SWIG_fail
;
9776 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, 0 | 0 );
9777 if (!SWIG_IsOK(res1
)) {
9778 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbWriter_getOutputDimension" "', argument " "1"" of type '" "GeosWkbWriter *""'");
9780 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
9784 result
= (int)GeosWkbWriter_getOutputDimension(arg1
);
9786 catch (const std::exception
& e
)
9788 SWIG_exception(SWIG_RuntimeError
, e
.what());
9791 resultobj
= SWIG_From_int(static_cast< int >(result
));
9798 SWIGINTERN PyObject
*_wrap_WkbWriter_setOutputDimension(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9799 PyObject
*resultobj
= 0;
9800 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
9806 PyObject
* obj0
= 0 ;
9807 PyObject
* obj1
= 0 ;
9809 if(!PyArg_UnpackTuple(args
,(char *)"WkbWriter_setOutputDimension",2,2,&obj0
,&obj1
)) SWIG_fail
;
9810 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, 0 | 0 );
9811 if (!SWIG_IsOK(res1
)) {
9812 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbWriter_setOutputDimension" "', argument " "1"" of type '" "GeosWkbWriter *""'");
9814 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
9815 ecode2
= SWIG_AsVal_int(obj1
, &val2
);
9816 if (!SWIG_IsOK(ecode2
)) {
9817 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "WkbWriter_setOutputDimension" "', argument " "2"" of type '" "int""'");
9819 arg2
= static_cast< int >(val2
);
9823 GeosWkbWriter_setOutputDimension(arg1
,arg2
);
9825 catch (const std::exception
& e
)
9827 SWIG_exception(SWIG_RuntimeError
, e
.what());
9830 resultobj
= SWIG_Py_Void();
9837 SWIGINTERN PyObject
*_wrap_WkbWriter_getByteOrder(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9838 PyObject
*resultobj
= 0;
9839 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
9842 PyObject
* obj0
= 0 ;
9845 if(!PyArg_UnpackTuple(args
,(char *)"WkbWriter_getByteOrder",1,1,&obj0
)) SWIG_fail
;
9846 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, 0 | 0 );
9847 if (!SWIG_IsOK(res1
)) {
9848 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbWriter_getByteOrder" "', argument " "1"" of type '" "GeosWkbWriter *""'");
9850 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
9854 result
= (int)GeosWkbWriter_getByteOrder(arg1
);
9856 catch (const std::exception
& e
)
9858 SWIG_exception(SWIG_RuntimeError
, e
.what());
9861 resultobj
= SWIG_From_int(static_cast< int >(result
));
9868 SWIGINTERN PyObject
*_wrap_WkbWriter_setByteOrder(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9869 PyObject
*resultobj
= 0;
9870 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
9876 PyObject
* obj0
= 0 ;
9877 PyObject
* obj1
= 0 ;
9879 if(!PyArg_UnpackTuple(args
,(char *)"WkbWriter_setByteOrder",2,2,&obj0
,&obj1
)) SWIG_fail
;
9880 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, 0 | 0 );
9881 if (!SWIG_IsOK(res1
)) {
9882 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbWriter_setByteOrder" "', argument " "1"" of type '" "GeosWkbWriter *""'");
9884 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
9885 ecode2
= SWIG_AsVal_int(obj1
, &val2
);
9886 if (!SWIG_IsOK(ecode2
)) {
9887 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "WkbWriter_setByteOrder" "', argument " "2"" of type '" "int""'");
9889 arg2
= static_cast< int >(val2
);
9893 GeosWkbWriter_setByteOrder(arg1
,arg2
);
9895 catch (const std::exception
& e
)
9897 SWIG_exception(SWIG_RuntimeError
, e
.what());
9900 resultobj
= SWIG_Py_Void();
9907 SWIGINTERN PyObject
*_wrap_WkbWriter_getIncludeSRID(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9908 PyObject
*resultobj
= 0;
9909 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
9912 PyObject
* obj0
= 0 ;
9915 if(!PyArg_UnpackTuple(args
,(char *)"WkbWriter_getIncludeSRID",1,1,&obj0
)) SWIG_fail
;
9916 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, 0 | 0 );
9917 if (!SWIG_IsOK(res1
)) {
9918 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbWriter_getIncludeSRID" "', argument " "1"" of type '" "GeosWkbWriter *""'");
9920 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
9924 result
= (bool)GeosWkbWriter_getIncludeSRID(arg1
);
9926 catch (const std::exception
& e
)
9928 SWIG_exception(SWIG_RuntimeError
, e
.what());
9931 resultobj
= SWIG_From_bool(static_cast< bool >(result
));
9938 SWIGINTERN PyObject
*_wrap_WkbWriter_setIncludeSRID(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9939 PyObject
*resultobj
= 0;
9940 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
9946 PyObject
* obj0
= 0 ;
9947 PyObject
* obj1
= 0 ;
9949 if(!PyArg_UnpackTuple(args
,(char *)"WkbWriter_setIncludeSRID",2,2,&obj0
,&obj1
)) SWIG_fail
;
9950 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, 0 | 0 );
9951 if (!SWIG_IsOK(res1
)) {
9952 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbWriter_setIncludeSRID" "', argument " "1"" of type '" "GeosWkbWriter *""'");
9954 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
9955 ecode2
= SWIG_AsVal_bool(obj1
, &val2
);
9956 if (!SWIG_IsOK(ecode2
)) {
9957 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "WkbWriter_setIncludeSRID" "', argument " "2"" of type '" "bool""'");
9959 arg2
= static_cast< bool >(val2
);
9963 GeosWkbWriter_setIncludeSRID(arg1
,arg2
);
9965 catch (const std::exception
& e
)
9967 SWIG_exception(SWIG_RuntimeError
, e
.what());
9970 resultobj
= SWIG_Py_Void();
9977 SWIGINTERN PyObject
*_wrap_WkbWriter_write(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
9978 PyObject
*resultobj
= 0;
9979 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
9980 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
9981 size_t *arg3
= (size_t *) 0 ;
9987 PyObject
* obj0
= 0 ;
9988 PyObject
* obj1
= 0 ;
9989 unsigned char *result
= 0 ;
9992 /* %typemap(in, numinputs=0) size_t *size (size_t temp3 = 0) */
9995 if(!PyArg_UnpackTuple(args
,(char *)"WkbWriter_write",2,2,&obj0
,&obj1
)) SWIG_fail
;
9996 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, 0 | 0 );
9997 if (!SWIG_IsOK(res1
)) {
9998 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbWriter_write" "', argument " "1"" of type '" "GeosWkbWriter *""'");
10000 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
10001 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
10002 if (!SWIG_IsOK(res2
)) {
10003 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "WkbWriter_write" "', argument " "2"" of type '" "GeosGeometry const *""'");
10005 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
10009 result
= (unsigned char *)GeosWkbWriter_write(arg1
,(GeosGeometry
const *)arg2
,arg3
);
10011 catch (const std::exception
& e
)
10013 SWIG_exception(SWIG_RuntimeError
, e
.what());
10017 /* %typemap(out) unsigned char* */
10020 /* %typemap(argout) size_t *size */
10021 resultobj
= SWIG_FromCharPtrAndSize((const char*)result
, *arg3
);
10024 /* %typemap(freearg) size_t *size */
10030 /* %typemap(freearg) size_t *size */
10037 SWIGINTERN PyObject
*_wrap_WkbWriter_writeHEX(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
10038 PyObject
*resultobj
= 0;
10039 GeosWkbWriter
*arg1
= (GeosWkbWriter
*) 0 ;
10040 GeosGeometry
*arg2
= (GeosGeometry
*) 0 ;
10041 size_t *arg3
= (size_t *) 0 ;
10047 PyObject
* obj0
= 0 ;
10048 PyObject
* obj1
= 0 ;
10049 unsigned char *result
= 0 ;
10052 /* %typemap(in, numinputs=0) size_t *size (size_t temp3 = 0) */
10055 if(!PyArg_UnpackTuple(args
,(char *)"WkbWriter_writeHEX",2,2,&obj0
,&obj1
)) SWIG_fail
;
10056 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_GeosWkbWriter
, 0 | 0 );
10057 if (!SWIG_IsOK(res1
)) {
10058 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "WkbWriter_writeHEX" "', argument " "1"" of type '" "GeosWkbWriter *""'");
10060 arg1
= reinterpret_cast< GeosWkbWriter
* >(argp1
);
10061 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_GeosGeometry
, 0 | 0 );
10062 if (!SWIG_IsOK(res2
)) {
10063 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "WkbWriter_writeHEX" "', argument " "2"" of type '" "GeosGeometry const *""'");
10065 arg2
= reinterpret_cast< GeosGeometry
* >(argp2
);
10069 result
= (unsigned char *)GeosWkbWriter_writeHEX(arg1
,(GeosGeometry
const *)arg2
,arg3
);
10071 catch (const std::exception
& e
)
10073 SWIG_exception(SWIG_RuntimeError
, e
.what());
10077 /* %typemap(out) unsigned char* */
10080 /* %typemap(argout) size_t *size */
10081 resultobj
= SWIG_FromCharPtrAndSize((const char*)result
, *arg3
);
10084 /* %typemap(freearg) size_t *size */
10090 /* %typemap(freearg) size_t *size */
10097 SWIGINTERN PyObject
*WkbWriter_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
10099 if (!PyArg_UnpackTuple(args
,(char*)"swigregister", 1, 1,&obj
)) return NULL
;
10100 SWIG_TypeNewClientData(SWIGTYPE_p_GeosWkbWriter
, SWIG_NewClientData(obj
));
10101 return SWIG_Py_Void();
10104 static PyMethodDef SwigMethods
[] = {
10105 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction
)SWIG_PyInstanceMethod_New
, METH_O
, NULL
},
10106 { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator
, METH_VARARGS
, NULL
},
10107 { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value
, METH_VARARGS
, NULL
},
10108 { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr
, METH_VARARGS
, NULL
},
10109 { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr
, METH_VARARGS
, NULL
},
10110 { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance
, METH_VARARGS
, NULL
},
10111 { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal
, METH_VARARGS
, NULL
},
10112 { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy
, METH_VARARGS
, NULL
},
10113 { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next
, METH_VARARGS
, NULL
},
10114 { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__
, METH_VARARGS
, NULL
},
10115 { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous
, METH_VARARGS
, NULL
},
10116 { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance
, METH_VARARGS
, NULL
},
10117 { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__
, METH_VARARGS
, NULL
},
10118 { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__
, METH_VARARGS
, NULL
},
10119 { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__
, METH_VARARGS
, NULL
},
10120 { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__
, METH_VARARGS
, NULL
},
10121 { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__
, METH_VARARGS
, NULL
},
10122 { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__
, METH_VARARGS
, NULL
},
10123 { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister
, METH_VARARGS
, NULL
},
10124 { (char *)"version", _wrap_version
, METH_VARARGS
, NULL
},
10125 { (char *)"new_CoordinateSequence", _wrap_new_CoordinateSequence
, METH_VARARGS
, NULL
},
10126 { (char *)"delete_CoordinateSequence", _wrap_delete_CoordinateSequence
, METH_VARARGS
, NULL
},
10127 { (char *)"CoordinateSequence_clone", _wrap_CoordinateSequence_clone
, METH_VARARGS
, NULL
},
10128 { (char *)"CoordinateSequence_setX", _wrap_CoordinateSequence_setX
, METH_VARARGS
, NULL
},
10129 { (char *)"CoordinateSequence_setY", _wrap_CoordinateSequence_setY
, METH_VARARGS
, NULL
},
10130 { (char *)"CoordinateSequence_setZ", _wrap_CoordinateSequence_setZ
, METH_VARARGS
, NULL
},
10131 { (char *)"CoordinateSequence_setOrdinate", _wrap_CoordinateSequence_setOrdinate
, METH_VARARGS
, NULL
},
10132 { (char *)"CoordinateSequence_getX", _wrap_CoordinateSequence_getX
, METH_VARARGS
, NULL
},
10133 { (char *)"CoordinateSequence_getY", _wrap_CoordinateSequence_getY
, METH_VARARGS
, NULL
},
10134 { (char *)"CoordinateSequence_getZ", _wrap_CoordinateSequence_getZ
, METH_VARARGS
, NULL
},
10135 { (char *)"CoordinateSequence_getOrdinate", _wrap_CoordinateSequence_getOrdinate
, METH_VARARGS
, NULL
},
10136 { (char *)"CoordinateSequence_getSize", _wrap_CoordinateSequence_getSize
, METH_VARARGS
, NULL
},
10137 { (char *)"CoordinateSequence_getDimensions", _wrap_CoordinateSequence_getDimensions
, METH_VARARGS
, NULL
},
10138 { (char *)"CoordinateSequence_swigregister", CoordinateSequence_swigregister
, METH_VARARGS
, NULL
},
10139 { (char *)"delete_Geometry", _wrap_delete_Geometry
, METH_VARARGS
, NULL
},
10140 { (char *)"Geometry_clone", _wrap_Geometry_clone
, METH_VARARGS
, NULL
},
10141 { (char *)"Geometry_geomType", _wrap_Geometry_geomType
, METH_VARARGS
, NULL
},
10142 { (char *)"Geometry_typeId", _wrap_Geometry_typeId
, METH_VARARGS
, NULL
},
10143 { (char *)"Geometry_normalize", _wrap_Geometry_normalize
, METH_VARARGS
, NULL
},
10144 { (char *)"Geometry_getSRID", _wrap_Geometry_getSRID
, METH_VARARGS
, NULL
},
10145 { (char *)"Geometry_setSRID", _wrap_Geometry_setSRID
, METH_VARARGS
, NULL
},
10146 { (char *)"Geometry_getDimensions", _wrap_Geometry_getDimensions
, METH_VARARGS
, NULL
},
10147 { (char *)"Geometry_getNumGeometries", _wrap_Geometry_getNumGeometries
, METH_VARARGS
, NULL
},
10148 { (char *)"Geometry_intersection", _wrap_Geometry_intersection
, METH_VARARGS
, NULL
},
10149 { (char *)"Geometry_buffer", _wrap_Geometry_buffer
, METH_VARARGS
, NULL
},
10150 { (char *)"Geometry_convexHull", _wrap_Geometry_convexHull
, METH_VARARGS
, NULL
},
10151 { (char *)"Geometry_difference", _wrap_Geometry_difference
, METH_VARARGS
, NULL
},
10152 { (char *)"Geometry_symDifference", _wrap_Geometry_symDifference
, METH_VARARGS
, NULL
},
10153 { (char *)"Geometry_boundary", _wrap_Geometry_boundary
, METH_VARARGS
, NULL
},
10154 { (char *)"Geometry_union", _wrap_Geometry_union
, METH_VARARGS
, NULL
},
10155 { (char *)"Geometry_pointOnSurface", _wrap_Geometry_pointOnSurface
, METH_VARARGS
, NULL
},
10156 { (char *)"Geometry_getCentroid", _wrap_Geometry_getCentroid
, METH_VARARGS
, NULL
},
10157 { (char *)"Geometry_getEnvelope", _wrap_Geometry_getEnvelope
, METH_VARARGS
, NULL
},
10158 { (char *)"Geometry_relate", _wrap_Geometry_relate
, METH_VARARGS
, NULL
},
10159 { (char *)"Geometry_lineMerge", _wrap_Geometry_lineMerge
, METH_VARARGS
, NULL
},
10160 { (char *)"Geometry_simplify", _wrap_Geometry_simplify
, METH_VARARGS
, NULL
},
10161 { (char *)"Geometry_topologyPreserveSimplify", _wrap_Geometry_topologyPreserveSimplify
, METH_VARARGS
, NULL
},
10162 { (char *)"Geometry_relatePattern", _wrap_Geometry_relatePattern
, METH_VARARGS
, NULL
},
10163 { (char *)"Geometry_disjoint", _wrap_Geometry_disjoint
, METH_VARARGS
, NULL
},
10164 { (char *)"Geometry_touches", _wrap_Geometry_touches
, METH_VARARGS
, NULL
},
10165 { (char *)"Geometry_intersects", _wrap_Geometry_intersects
, METH_VARARGS
, NULL
},
10166 { (char *)"Geometry_crosses", _wrap_Geometry_crosses
, METH_VARARGS
, NULL
},
10167 { (char *)"Geometry_within", _wrap_Geometry_within
, METH_VARARGS
, NULL
},
10168 { (char *)"Geometry_contains", _wrap_Geometry_contains
, METH_VARARGS
, NULL
},
10169 { (char *)"Geometry_overlaps", _wrap_Geometry_overlaps
, METH_VARARGS
, NULL
},
10170 { (char *)"Geometry_equals", _wrap_Geometry_equals
, METH_VARARGS
, NULL
},
10171 { (char *)"Geometry_equalsExact", _wrap_Geometry_equalsExact
, METH_VARARGS
, NULL
},
10172 { (char *)"Geometry_isEmpty", _wrap_Geometry_isEmpty
, METH_VARARGS
, NULL
},
10173 { (char *)"Geometry_isValid", _wrap_Geometry_isValid
, METH_VARARGS
, NULL
},
10174 { (char *)"Geometry_isSimple", _wrap_Geometry_isSimple
, METH_VARARGS
, NULL
},
10175 { (char *)"Geometry_isRing", _wrap_Geometry_isRing
, METH_VARARGS
, NULL
},
10176 { (char *)"Geometry_hasZ", _wrap_Geometry_hasZ
, METH_VARARGS
, NULL
},
10177 { (char *)"Geometry_area", _wrap_Geometry_area
, METH_VARARGS
, NULL
},
10178 { (char *)"Geometry_length", _wrap_Geometry_length
, METH_VARARGS
, NULL
},
10179 { (char *)"Geometry_distance", _wrap_Geometry_distance
, METH_VARARGS
, NULL
},
10180 { (char *)"Geometry_swigregister", Geometry_swigregister
, METH_VARARGS
, NULL
},
10181 { (char *)"delete_Point", _wrap_delete_Point
, METH_VARARGS
, NULL
},
10182 { (char *)"Point_getCoordSeq", _wrap_Point_getCoordSeq
, METH_VARARGS
, NULL
},
10183 { (char *)"Point_swigregister", Point_swigregister
, METH_VARARGS
, NULL
},
10184 { (char *)"delete_LineString", _wrap_delete_LineString
, METH_VARARGS
, NULL
},
10185 { (char *)"LineString_getCoordSeq", _wrap_LineString_getCoordSeq
, METH_VARARGS
, NULL
},
10186 { (char *)"LineString_swigregister", LineString_swigregister
, METH_VARARGS
, NULL
},
10187 { (char *)"delete_LinearRing", _wrap_delete_LinearRing
, METH_VARARGS
, NULL
},
10188 { (char *)"LinearRing_getCoordSeq", _wrap_LinearRing_getCoordSeq
, METH_VARARGS
, NULL
},
10189 { (char *)"LinearRing_swigregister", LinearRing_swigregister
, METH_VARARGS
, NULL
},
10190 { (char *)"delete_Polygon", _wrap_delete_Polygon
, METH_VARARGS
, NULL
},
10191 { (char *)"Polygon_getExteriorRing", _wrap_Polygon_getExteriorRing
, METH_VARARGS
, NULL
},
10192 { (char *)"Polygon_getNumInteriorRings", _wrap_Polygon_getNumInteriorRings
, METH_VARARGS
, NULL
},
10193 { (char *)"Polygon_getInteriorRingN", _wrap_Polygon_getInteriorRingN
, METH_VARARGS
, NULL
},
10194 { (char *)"Polygon_swigregister", Polygon_swigregister
, METH_VARARGS
, NULL
},
10195 { (char *)"delete_GeometryCollection", _wrap_delete_GeometryCollection
, METH_VARARGS
, NULL
},
10196 { (char *)"GeometryCollection_getGeometryN", _wrap_GeometryCollection_getGeometryN
, METH_VARARGS
, NULL
},
10197 { (char *)"GeometryCollection_swigregister", GeometryCollection_swigregister
, METH_VARARGS
, NULL
},
10198 { (char *)"delete_MultiPoint", _wrap_delete_MultiPoint
, METH_VARARGS
, NULL
},
10199 { (char *)"MultiPoint_swigregister", MultiPoint_swigregister
, METH_VARARGS
, NULL
},
10200 { (char *)"delete_MultiLineString", _wrap_delete_MultiLineString
, METH_VARARGS
, NULL
},
10201 { (char *)"MultiLineString_swigregister", MultiLineString_swigregister
, METH_VARARGS
, NULL
},
10202 { (char *)"delete_MultiLinearRing", _wrap_delete_MultiLinearRing
, METH_VARARGS
, NULL
},
10203 { (char *)"MultiLinearRing_swigregister", MultiLinearRing_swigregister
, METH_VARARGS
, NULL
},
10204 { (char *)"delete_MultiPolygon", _wrap_delete_MultiPolygon
, METH_VARARGS
, NULL
},
10205 { (char *)"MultiPolygon_swigregister", MultiPolygon_swigregister
, METH_VARARGS
, NULL
},
10206 { (char *)"createPoint", _wrap_createPoint
, METH_VARARGS
, NULL
},
10207 { (char *)"createLineString", _wrap_createLineString
, METH_VARARGS
, NULL
},
10208 { (char *)"createLinearRing", _wrap_createLinearRing
, METH_VARARGS
, NULL
},
10209 { (char *)"createPolygon", _wrap_createPolygon
, METH_VARARGS
, NULL
},
10210 { (char *)"new_Prepared", _wrap_new_Prepared
, METH_VARARGS
, NULL
},
10211 { (char *)"delete_Prepared", _wrap_delete_Prepared
, METH_VARARGS
, NULL
},
10212 { (char *)"Prepared_contains", _wrap_Prepared_contains
, METH_VARARGS
, NULL
},
10213 { (char *)"Prepared_containsProperly", _wrap_Prepared_containsProperly
, METH_VARARGS
, NULL
},
10214 { (char *)"Prepared_covers", _wrap_Prepared_covers
, METH_VARARGS
, NULL
},
10215 { (char *)"Prepared_intersects", _wrap_Prepared_intersects
, METH_VARARGS
, NULL
},
10216 { (char *)"Prepared_swigregister", Prepared_swigregister
, METH_VARARGS
, NULL
},
10217 { (char *)"new_STRtree", _wrap_new_STRtree
, METH_VARARGS
, NULL
},
10218 { (char *)"delete_STRtree", _wrap_delete_STRtree
, METH_VARARGS
, NULL
},
10219 { (char *)"STRtree_insert", _wrap_STRtree_insert
, METH_VARARGS
, NULL
},
10220 { (char *)"STRtree_remove", _wrap_STRtree_remove
, METH_VARARGS
, NULL
},
10221 { (char *)"STRtree_query", _wrap_STRtree_query
, METH_VARARGS
, NULL
},
10222 { (char *)"STRtree_iterate", _wrap_STRtree_iterate
, METH_VARARGS
, NULL
},
10223 { (char *)"STRtree_swigregister", STRtree_swigregister
, METH_VARARGS
, NULL
},
10224 { (char *)"new_WktReader", _wrap_new_WktReader
, METH_VARARGS
, NULL
},
10225 { (char *)"delete_WktReader", _wrap_delete_WktReader
, METH_VARARGS
, NULL
},
10226 { (char *)"WktReader_read", _wrap_WktReader_read
, METH_VARARGS
, NULL
},
10227 { (char *)"WktReader_swigregister", WktReader_swigregister
, METH_VARARGS
, NULL
},
10228 { (char *)"new_WktWriter", _wrap_new_WktWriter
, METH_VARARGS
, NULL
},
10229 { (char *)"delete_WktWriter", _wrap_delete_WktWriter
, METH_VARARGS
, NULL
},
10230 { (char *)"WktWriter_write", _wrap_WktWriter_write
, METH_VARARGS
, NULL
},
10231 { (char *)"WktWriter_swigregister", WktWriter_swigregister
, METH_VARARGS
, NULL
},
10232 { (char *)"new_WkbReader", _wrap_new_WkbReader
, METH_VARARGS
, NULL
},
10233 { (char *)"delete_WkbReader", _wrap_delete_WkbReader
, METH_VARARGS
, NULL
},
10234 { (char *)"WkbReader_read", _wrap_WkbReader_read
, METH_VARARGS
, NULL
},
10235 { (char *)"WkbReader_readHEX", _wrap_WkbReader_readHEX
, METH_VARARGS
, NULL
},
10236 { (char *)"WkbReader_swigregister", WkbReader_swigregister
, METH_VARARGS
, NULL
},
10237 { (char *)"new_WkbWriter", _wrap_new_WkbWriter
, METH_VARARGS
, NULL
},
10238 { (char *)"delete_WkbWriter", _wrap_delete_WkbWriter
, METH_VARARGS
, NULL
},
10239 { (char *)"WkbWriter_getOutputDimension", _wrap_WkbWriter_getOutputDimension
, METH_VARARGS
, NULL
},
10240 { (char *)"WkbWriter_setOutputDimension", _wrap_WkbWriter_setOutputDimension
, METH_VARARGS
, NULL
},
10241 { (char *)"WkbWriter_getByteOrder", _wrap_WkbWriter_getByteOrder
, METH_VARARGS
, NULL
},
10242 { (char *)"WkbWriter_setByteOrder", _wrap_WkbWriter_setByteOrder
, METH_VARARGS
, NULL
},
10243 { (char *)"WkbWriter_getIncludeSRID", _wrap_WkbWriter_getIncludeSRID
, METH_VARARGS
, NULL
},
10244 { (char *)"WkbWriter_setIncludeSRID", _wrap_WkbWriter_setIncludeSRID
, METH_VARARGS
, NULL
},
10245 { (char *)"WkbWriter_write", _wrap_WkbWriter_write
, METH_VARARGS
, NULL
},
10246 { (char *)"WkbWriter_writeHEX", _wrap_WkbWriter_writeHEX
, METH_VARARGS
, NULL
},
10247 { (char *)"WkbWriter_swigregister", WkbWriter_swigregister
, METH_VARARGS
, NULL
},
10248 { NULL
, NULL
, 0, NULL
}
10252 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
10254 static void *_p_GeosMultiPolygonTo_p_GeosGeometryCollection(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10255 return (void *)((GeosGeometryCollection
*) ((GeosMultiPolygon
*) x
));
10257 static void *_p_GeosMultiPointTo_p_GeosGeometryCollection(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10258 return (void *)((GeosGeometryCollection
*) ((GeosMultiPoint
*) x
));
10260 static void *_p_GeosMultiLineStringTo_p_GeosGeometryCollection(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10261 return (void *)((GeosGeometryCollection
*) ((GeosMultiLineString
*) x
));
10263 static void *_p_GeosMultiLinearRingTo_p_GeosGeometryCollection(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10264 return (void *)((GeosGeometryCollection
*) ((GeosMultiLinearRing
*) x
));
10266 static void *_p_GeosPolygonTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10267 return (void *)((GeosGeometry
*) ((GeosPolygon
*) x
));
10269 static void *_p_GeosMultiPolygonTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10270 return (void *)((GeosGeometry
*) (GeosGeometryCollection
*) ((GeosMultiPolygon
*) x
));
10272 static void *_p_GeosPointTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10273 return (void *)((GeosGeometry
*) ((GeosPoint
*) x
));
10275 static void *_p_GeosLineStringTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10276 return (void *)((GeosGeometry
*) ((GeosLineString
*) x
));
10278 static void *_p_GeosLinearRingTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10279 return (void *)((GeosGeometry
*) ((GeosLinearRing
*) x
));
10281 static void *_p_GeosMultiPointTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10282 return (void *)((GeosGeometry
*) (GeosGeometryCollection
*) ((GeosMultiPoint
*) x
));
10284 static void *_p_GeosMultiLineStringTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10285 return (void *)((GeosGeometry
*) (GeosGeometryCollection
*) ((GeosMultiLineString
*) x
));
10287 static void *_p_GeosMultiLinearRingTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10288 return (void *)((GeosGeometry
*) (GeosGeometryCollection
*) ((GeosMultiLinearRing
*) x
));
10290 static void *_p_GeosGeometryCollectionTo_p_GeosGeometry(void *x
, int *SWIGUNUSEDPARM(newmemory
)) {
10291 return (void *)((GeosGeometry
*) ((GeosGeometryCollection
*) x
));
10293 static swig_type_info _swigt__p_GeosCoordinateSequence
= {"_p_GeosCoordinateSequence", "GeosCoordinateSequence *", 0, 0, (void*)0, 0};
10294 static swig_type_info _swigt__p_GeosGeometry
= {"_p_GeosGeometry", "GeosGeometry *", 0, 0, (void*)0, 0};
10295 static swig_type_info _swigt__p_GeosGeometryCollection
= {"_p_GeosGeometryCollection", "GeosGeometryCollection *", 0, 0, (void*)0, 0};
10296 static swig_type_info _swigt__p_GeosIndexItem
= {"_p_GeosIndexItem", "GeosIndexItem *", 0, 0, (void*)0, 0};
10297 static swig_type_info _swigt__p_GeosLineString
= {"_p_GeosLineString", "GeosLineString *", 0, 0, (void*)0, 0};
10298 static swig_type_info _swigt__p_GeosLinearRing
= {"_p_GeosLinearRing", "GeosLinearRing *", 0, 0, (void*)0, 0};
10299 static swig_type_info _swigt__p_GeosMultiLineString
= {"_p_GeosMultiLineString", "GeosMultiLineString *", 0, 0, (void*)0, 0};
10300 static swig_type_info _swigt__p_GeosMultiLinearRing
= {"_p_GeosMultiLinearRing", "GeosMultiLinearRing *", 0, 0, (void*)0, 0};
10301 static swig_type_info _swigt__p_GeosMultiPoint
= {"_p_GeosMultiPoint", "GeosMultiPoint *", 0, 0, (void*)0, 0};
10302 static swig_type_info _swigt__p_GeosMultiPolygon
= {"_p_GeosMultiPolygon", "GeosMultiPolygon *", 0, 0, (void*)0, 0};
10303 static swig_type_info _swigt__p_GeosPoint
= {"_p_GeosPoint", "GeosPoint *", 0, 0, (void*)0, 0};
10304 static swig_type_info _swigt__p_GeosPolygon
= {"_p_GeosPolygon", "GeosPolygon *", 0, 0, (void*)0, 0};
10305 static swig_type_info _swigt__p_GeosPreparedGeometry
= {"_p_GeosPreparedGeometry", "GeosPreparedGeometry *", 0, 0, (void*)0, 0};
10306 static swig_type_info _swigt__p_GeosQueryCallback
= {"_p_GeosQueryCallback", "GeosQueryCallback *", 0, 0, (void*)0, 0};
10307 static swig_type_info _swigt__p_GeosSTRtree
= {"_p_GeosSTRtree", "GeosSTRtree *", 0, 0, (void*)0, 0};
10308 static swig_type_info _swigt__p_GeosWkbReader
= {"_p_GeosWkbReader", "GeosWkbReader *", 0, 0, (void*)0, 0};
10309 static swig_type_info _swigt__p_GeosWkbWriter
= {"_p_GeosWkbWriter", "GeosWkbWriter *", 0, 0, (void*)0, 0};
10310 static swig_type_info _swigt__p_GeosWktReader
= {"_p_GeosWktReader", "GeosWktReader *", 0, 0, (void*)0, 0};
10311 static swig_type_info _swigt__p_GeosWktWriter
= {"_p_GeosWktWriter", "GeosWktWriter *", 0, 0, (void*)0, 0};
10312 static swig_type_info _swigt__p_char
= {"_p_char", "char *", 0, 0, (void*)0, 0};
10313 static swig_type_info _swigt__p_p_GeosLinearRing
= {"_p_p_GeosLinearRing", "GeosLinearRing **", 0, 0, (void*)0, 0};
10314 static swig_type_info _swigt__p_size_t
= {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
10315 static swig_type_info _swigt__p_std__invalid_argument
= {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
10316 static swig_type_info _swigt__p_swig__SwigPyIterator
= {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0};
10317 static swig_type_info _swigt__p_unsigned_char
= {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0};
10319 static swig_type_info
*swig_type_initial
[] = {
10320 &_swigt__p_GeosCoordinateSequence
,
10321 &_swigt__p_GeosGeometry
,
10322 &_swigt__p_GeosGeometryCollection
,
10323 &_swigt__p_GeosIndexItem
,
10324 &_swigt__p_GeosLineString
,
10325 &_swigt__p_GeosLinearRing
,
10326 &_swigt__p_GeosMultiLineString
,
10327 &_swigt__p_GeosMultiLinearRing
,
10328 &_swigt__p_GeosMultiPoint
,
10329 &_swigt__p_GeosMultiPolygon
,
10330 &_swigt__p_GeosPoint
,
10331 &_swigt__p_GeosPolygon
,
10332 &_swigt__p_GeosPreparedGeometry
,
10333 &_swigt__p_GeosQueryCallback
,
10334 &_swigt__p_GeosSTRtree
,
10335 &_swigt__p_GeosWkbReader
,
10336 &_swigt__p_GeosWkbWriter
,
10337 &_swigt__p_GeosWktReader
,
10338 &_swigt__p_GeosWktWriter
,
10340 &_swigt__p_p_GeosLinearRing
,
10342 &_swigt__p_std__invalid_argument
,
10343 &_swigt__p_swig__SwigPyIterator
,
10344 &_swigt__p_unsigned_char
,
10347 static swig_cast_info _swigc__p_GeosCoordinateSequence
[] = { {&_swigt__p_GeosCoordinateSequence
, 0, 0, 0},{0, 0, 0, 0}};
10348 static swig_cast_info _swigc__p_GeosGeometry
[] = { {&_swigt__p_GeosPolygon
, _p_GeosPolygonTo_p_GeosGeometry
, 0, 0}, {&_swigt__p_GeosMultiPolygon
, _p_GeosMultiPolygonTo_p_GeosGeometry
, 0, 0}, {&_swigt__p_GeosPoint
, _p_GeosPointTo_p_GeosGeometry
, 0, 0}, {&_swigt__p_GeosGeometry
, 0, 0, 0}, {&_swigt__p_GeosLineString
, _p_GeosLineStringTo_p_GeosGeometry
, 0, 0}, {&_swigt__p_GeosLinearRing
, _p_GeosLinearRingTo_p_GeosGeometry
, 0, 0}, {&_swigt__p_GeosMultiPoint
, _p_GeosMultiPointTo_p_GeosGeometry
, 0, 0}, {&_swigt__p_GeosMultiLineString
, _p_GeosMultiLineStringTo_p_GeosGeometry
, 0, 0}, {&_swigt__p_GeosMultiLinearRing
, _p_GeosMultiLinearRingTo_p_GeosGeometry
, 0, 0}, {&_swigt__p_GeosGeometryCollection
, _p_GeosGeometryCollectionTo_p_GeosGeometry
, 0, 0},{0, 0, 0, 0}};
10349 static swig_cast_info _swigc__p_GeosGeometryCollection
[] = { {&_swigt__p_GeosMultiPolygon
, _p_GeosMultiPolygonTo_p_GeosGeometryCollection
, 0, 0}, {&_swigt__p_GeosMultiPoint
, _p_GeosMultiPointTo_p_GeosGeometryCollection
, 0, 0}, {&_swigt__p_GeosMultiLineString
, _p_GeosMultiLineStringTo_p_GeosGeometryCollection
, 0, 0}, {&_swigt__p_GeosMultiLinearRing
, _p_GeosMultiLinearRingTo_p_GeosGeometryCollection
, 0, 0}, {&_swigt__p_GeosGeometryCollection
, 0, 0, 0},{0, 0, 0, 0}};
10350 static swig_cast_info _swigc__p_GeosIndexItem
[] = { {&_swigt__p_GeosIndexItem
, 0, 0, 0},{0, 0, 0, 0}};
10351 static swig_cast_info _swigc__p_GeosLineString
[] = { {&_swigt__p_GeosLineString
, 0, 0, 0},{0, 0, 0, 0}};
10352 static swig_cast_info _swigc__p_GeosLinearRing
[] = { {&_swigt__p_GeosLinearRing
, 0, 0, 0},{0, 0, 0, 0}};
10353 static swig_cast_info _swigc__p_GeosMultiLineString
[] = { {&_swigt__p_GeosMultiLineString
, 0, 0, 0},{0, 0, 0, 0}};
10354 static swig_cast_info _swigc__p_GeosMultiLinearRing
[] = { {&_swigt__p_GeosMultiLinearRing
, 0, 0, 0},{0, 0, 0, 0}};
10355 static swig_cast_info _swigc__p_GeosMultiPoint
[] = { {&_swigt__p_GeosMultiPoint
, 0, 0, 0},{0, 0, 0, 0}};
10356 static swig_cast_info _swigc__p_GeosMultiPolygon
[] = { {&_swigt__p_GeosMultiPolygon
, 0, 0, 0},{0, 0, 0, 0}};
10357 static swig_cast_info _swigc__p_GeosPoint
[] = { {&_swigt__p_GeosPoint
, 0, 0, 0},{0, 0, 0, 0}};
10358 static swig_cast_info _swigc__p_GeosPolygon
[] = { {&_swigt__p_GeosPolygon
, 0, 0, 0},{0, 0, 0, 0}};
10359 static swig_cast_info _swigc__p_GeosPreparedGeometry
[] = { {&_swigt__p_GeosPreparedGeometry
, 0, 0, 0},{0, 0, 0, 0}};
10360 static swig_cast_info _swigc__p_GeosQueryCallback
[] = { {&_swigt__p_GeosQueryCallback
, 0, 0, 0},{0, 0, 0, 0}};
10361 static swig_cast_info _swigc__p_GeosSTRtree
[] = { {&_swigt__p_GeosSTRtree
, 0, 0, 0},{0, 0, 0, 0}};
10362 static swig_cast_info _swigc__p_GeosWkbReader
[] = { {&_swigt__p_GeosWkbReader
, 0, 0, 0},{0, 0, 0, 0}};
10363 static swig_cast_info _swigc__p_GeosWkbWriter
[] = { {&_swigt__p_GeosWkbWriter
, 0, 0, 0},{0, 0, 0, 0}};
10364 static swig_cast_info _swigc__p_GeosWktReader
[] = { {&_swigt__p_GeosWktReader
, 0, 0, 0},{0, 0, 0, 0}};
10365 static swig_cast_info _swigc__p_GeosWktWriter
[] = { {&_swigt__p_GeosWktWriter
, 0, 0, 0},{0, 0, 0, 0}};
10366 static swig_cast_info _swigc__p_char
[] = { {&_swigt__p_char
, 0, 0, 0},{0, 0, 0, 0}};
10367 static swig_cast_info _swigc__p_p_GeosLinearRing
[] = { {&_swigt__p_p_GeosLinearRing
, 0, 0, 0},{0, 0, 0, 0}};
10368 static swig_cast_info _swigc__p_size_t
[] = { {&_swigt__p_size_t
, 0, 0, 0},{0, 0, 0, 0}};
10369 static swig_cast_info _swigc__p_std__invalid_argument
[] = { {&_swigt__p_std__invalid_argument
, 0, 0, 0},{0, 0, 0, 0}};
10370 static swig_cast_info _swigc__p_swig__SwigPyIterator
[] = { {&_swigt__p_swig__SwigPyIterator
, 0, 0, 0},{0, 0, 0, 0}};
10371 static swig_cast_info _swigc__p_unsigned_char
[] = { {&_swigt__p_unsigned_char
, 0, 0, 0},{0, 0, 0, 0}};
10373 static swig_cast_info
*swig_cast_initial
[] = {
10374 _swigc__p_GeosCoordinateSequence
,
10375 _swigc__p_GeosGeometry
,
10376 _swigc__p_GeosGeometryCollection
,
10377 _swigc__p_GeosIndexItem
,
10378 _swigc__p_GeosLineString
,
10379 _swigc__p_GeosLinearRing
,
10380 _swigc__p_GeosMultiLineString
,
10381 _swigc__p_GeosMultiLinearRing
,
10382 _swigc__p_GeosMultiPoint
,
10383 _swigc__p_GeosMultiPolygon
,
10384 _swigc__p_GeosPoint
,
10385 _swigc__p_GeosPolygon
,
10386 _swigc__p_GeosPreparedGeometry
,
10387 _swigc__p_GeosQueryCallback
,
10388 _swigc__p_GeosSTRtree
,
10389 _swigc__p_GeosWkbReader
,
10390 _swigc__p_GeosWkbWriter
,
10391 _swigc__p_GeosWktReader
,
10392 _swigc__p_GeosWktWriter
,
10394 _swigc__p_p_GeosLinearRing
,
10396 _swigc__p_std__invalid_argument
,
10397 _swigc__p_swig__SwigPyIterator
,
10398 _swigc__p_unsigned_char
,
10402 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
10404 static swig_const_info swig_const_table
[] = {
10405 {0, 0, 0, 0.0, 0, 0}};
10410 /* -----------------------------------------------------------------------------
10411 * Type initialization:
10412 * This problem is tough by the requirement that no dynamic
10413 * memory is used. Also, since swig_type_info structures store pointers to
10414 * swig_cast_info structures and swig_cast_info structures store pointers back
10415 * to swig_type_info structures, we need some lookup code at initialization.
10416 * The idea is that swig generates all the structures that are needed.
10417 * The runtime then collects these partially filled structures.
10418 * The SWIG_InitializeModule function takes these initial arrays out of
10419 * swig_module, and does all the lookup, filling in the swig_module.types
10420 * array with the correct data and linking the correct swig_cast_info
10421 * structures together.
10423 * The generated swig_type_info structures are assigned staticly to an initial
10424 * array. We just loop through that array, and handle each type individually.
10425 * First we lookup if this type has been already loaded, and if so, use the
10426 * loaded structure instead of the generated one. Then we have to fill in the
10427 * cast linked list. The cast data is initially stored in something like a
10428 * two-dimensional array. Each row corresponds to a type (there are the same
10429 * number of rows as there are in the swig_type_initial array). Each entry in
10430 * a column is one of the swig_cast_info structures for that type.
10431 * The cast_initial array is actually an array of arrays, because each row has
10432 * a variable number of columns. So to actually build the cast linked list,
10433 * we find the array of casts associated with the type, and loop through it
10434 * adding the casts to the list. The one last trick we need to do is making
10435 * sure the type pointer in the swig_cast_info struct is correct.
10437 * First off, we lookup the cast->type name to see if it is already loaded.
10438 * There are three cases to handle:
10439 * 1) If the cast->type has already been loaded AND the type we are adding
10440 * casting info to has not been loaded (it is in this module), THEN we
10441 * replace the cast->type pointer with the type pointer that has already
10443 * 2) If BOTH types (the one we are adding casting info to, and the
10444 * cast->type) are loaded, THEN the cast info has already been loaded by
10445 * the previous module so we just ignore it.
10446 * 3) Finally, if cast->type has not already been loaded, then we add that
10447 * swig_cast_info to the linked list (because the cast->type) pointer will
10449 * ----------------------------------------------------------------------------- */
10459 #define SWIGRUNTIME_DEBUG
10464 SWIG_InitializeModule(void *clientdata
) {
10466 swig_module_info
*module_head
, *iter
;
10469 /* check to see if the circular list has been setup, if not, set it up */
10470 if (swig_module
.next
==0) {
10471 /* Initialize the swig_module */
10472 swig_module
.type_initial
= swig_type_initial
;
10473 swig_module
.cast_initial
= swig_cast_initial
;
10474 swig_module
.next
= &swig_module
;
10480 /* Try and load any already created modules */
10481 module_head
= SWIG_GetModule(clientdata
);
10482 if (!module_head
) {
10483 /* This is the first module loaded for this interpreter */
10484 /* so set the swig module into the interpreter */
10485 SWIG_SetModule(clientdata
, &swig_module
);
10486 module_head
= &swig_module
;
10488 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
10492 if (iter
==&swig_module
) {
10497 } while (iter
!= module_head
);
10499 /* if the is found in the list, then all is done and we may leave */
10501 /* otherwise we must add out module into the list */
10502 swig_module
.next
= module_head
->next
;
10503 module_head
->next
= &swig_module
;
10506 /* When multiple interpeters are used, a module could have already been initialized in
10507 a different interpreter, but not yet have a pointer in this interpreter.
10508 In this case, we do not want to continue adding types... everything should be
10510 if (init
== 0) return;
10512 /* Now work on filling in swig_module.types */
10513 #ifdef SWIGRUNTIME_DEBUG
10514 printf("SWIG_InitializeModule: size %d\n", swig_module
.size
);
10516 for (i
= 0; i
< swig_module
.size
; ++i
) {
10517 swig_type_info
*type
= 0;
10518 swig_type_info
*ret
;
10519 swig_cast_info
*cast
;
10521 #ifdef SWIGRUNTIME_DEBUG
10522 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
10525 /* if there is another module already loaded */
10526 if (swig_module
.next
!= &swig_module
) {
10527 type
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, swig_module
.type_initial
[i
]->name
);
10530 /* Overwrite clientdata field */
10531 #ifdef SWIGRUNTIME_DEBUG
10532 printf("SWIG_InitializeModule: found type %s\n", type
->name
);
10534 if (swig_module
.type_initial
[i
]->clientdata
) {
10535 type
->clientdata
= swig_module
.type_initial
[i
]->clientdata
;
10536 #ifdef SWIGRUNTIME_DEBUG
10537 printf("SWIG_InitializeModule: found and overwrite type %s \n", type
->name
);
10541 type
= swig_module
.type_initial
[i
];
10544 /* Insert casting types */
10545 cast
= swig_module
.cast_initial
[i
];
10546 while (cast
->type
) {
10547 /* Don't need to add information already in the list */
10549 #ifdef SWIGRUNTIME_DEBUG
10550 printf("SWIG_InitializeModule: look cast %s\n", cast
->type
->name
);
10552 if (swig_module
.next
!= &swig_module
) {
10553 ret
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, cast
->type
->name
);
10554 #ifdef SWIGRUNTIME_DEBUG
10555 if (ret
) printf("SWIG_InitializeModule: found cast %s\n", ret
->name
);
10559 if (type
== swig_module
.type_initial
[i
]) {
10560 #ifdef SWIGRUNTIME_DEBUG
10561 printf("SWIG_InitializeModule: skip old type %s\n", ret
->name
);
10566 /* Check for casting already in the list */
10567 swig_cast_info
*ocast
= SWIG_TypeCheck(ret
->name
, type
);
10568 #ifdef SWIGRUNTIME_DEBUG
10569 if (ocast
) printf("SWIG_InitializeModule: skip old cast %s\n", ret
->name
);
10571 if (!ocast
) ret
= 0;
10576 #ifdef SWIGRUNTIME_DEBUG
10577 printf("SWIG_InitializeModule: adding cast %s\n", cast
->type
->name
);
10580 type
->cast
->prev
= cast
;
10581 cast
->next
= type
->cast
;
10587 /* Set entry in modules->types array equal to the type */
10588 swig_module
.types
[i
] = type
;
10590 swig_module
.types
[i
] = 0;
10592 #ifdef SWIGRUNTIME_DEBUG
10593 printf("**** SWIG_InitializeModule: Cast List ******\n");
10594 for (i
= 0; i
< swig_module
.size
; ++i
) {
10596 swig_cast_info
*cast
= swig_module
.cast_initial
[i
];
10597 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
10598 while (cast
->type
) {
10599 printf("SWIG_InitializeModule: cast type %s\n", cast
->type
->name
);
10603 printf("---- Total casts: %d\n",j
);
10605 printf("**** SWIG_InitializeModule: Cast List ******\n");
10609 /* This function will propagate the clientdata field of type to
10610 * any new swig_type_info structures that have been added into the list
10611 * of equivalent types. It is like calling
10612 * SWIG_TypeClientData(type, clientdata) a second time.
10615 SWIG_PropagateClientData(void) {
10617 swig_cast_info
*equiv
;
10618 static int init_run
= 0;
10620 if (init_run
) return;
10623 for (i
= 0; i
< swig_module
.size
; i
++) {
10624 if (swig_module
.types
[i
]->clientdata
) {
10625 equiv
= swig_module
.types
[i
]->cast
;
10627 if (!equiv
->converter
) {
10628 if (equiv
->type
&& !equiv
->type
->clientdata
)
10629 SWIG_TypeClientData(equiv
->type
, swig_module
.types
[i
]->clientdata
);
10631 equiv
= equiv
->next
;
10651 /* Python-specific SWIG API */
10652 #define SWIG_newvarlink() SWIG_Python_newvarlink()
10653 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
10654 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
10656 /* -----------------------------------------------------------------------------
10657 * global variable support code.
10658 * ----------------------------------------------------------------------------- */
10660 typedef struct swig_globalvar
{
10661 char *name
; /* Name of global variable */
10662 PyObject
*(*get_attr
)(void); /* Return the current value */
10663 int (*set_attr
)(PyObject
*); /* Set the value */
10664 struct swig_globalvar
*next
;
10667 typedef struct swig_varlinkobject
{
10669 swig_globalvar
*vars
;
10670 } swig_varlinkobject
;
10672 SWIGINTERN PyObject
*
10673 swig_varlink_repr(swig_varlinkobject
*SWIGUNUSEDPARM(v
)) {
10674 #if PY_VERSION_HEX >= 0x03000000
10675 return PyUnicode_InternFromString("<Swig global variables>");
10677 return PyString_FromString("<Swig global variables>");
10681 SWIGINTERN PyObject
*
10682 swig_varlink_str(swig_varlinkobject
*v
) {
10683 #if PY_VERSION_HEX >= 0x03000000
10684 PyObject
*str
= PyUnicode_InternFromString("(");
10687 swig_globalvar
*var
;
10688 for (var
= v
->vars
; var
; var
=var
->next
) {
10689 tail
= PyUnicode_FromString(var
->name
);
10690 joined
= PyUnicode_Concat(str
, tail
);
10695 tail
= PyUnicode_InternFromString(", ");
10696 joined
= PyUnicode_Concat(str
, tail
);
10702 tail
= PyUnicode_InternFromString(")");
10703 joined
= PyUnicode_Concat(str
, tail
);
10708 PyObject
*str
= PyString_FromString("(");
10709 swig_globalvar
*var
;
10710 for (var
= v
->vars
; var
; var
=var
->next
) {
10711 PyString_ConcatAndDel(&str
,PyString_FromString(var
->name
));
10712 if (var
->next
) PyString_ConcatAndDel(&str
,PyString_FromString(", "));
10714 PyString_ConcatAndDel(&str
,PyString_FromString(")"));
10720 swig_varlink_print(swig_varlinkobject
*v
, FILE *fp
, int SWIGUNUSEDPARM(flags
)) {
10722 PyObject
*str
= swig_varlink_str(v
);
10723 fprintf(fp
,"Swig global variables ");
10724 fprintf(fp
,"%s\n", tmp
= SWIG_Python_str_AsChar(str
));
10725 SWIG_Python_str_DelForPy3(tmp
);
10731 swig_varlink_dealloc(swig_varlinkobject
*v
) {
10732 swig_globalvar
*var
= v
->vars
;
10734 swig_globalvar
*n
= var
->next
;
10741 SWIGINTERN PyObject
*
10742 swig_varlink_getattr(swig_varlinkobject
*v
, char *n
) {
10743 PyObject
*res
= NULL
;
10744 swig_globalvar
*var
= v
->vars
;
10746 if (strcmp(var
->name
,n
) == 0) {
10747 res
= (*var
->get_attr
)();
10752 if (res
== NULL
&& !PyErr_Occurred()) {
10753 PyErr_SetString(PyExc_NameError
,"Unknown C global variable");
10759 swig_varlink_setattr(swig_varlinkobject
*v
, char *n
, PyObject
*p
) {
10761 swig_globalvar
*var
= v
->vars
;
10763 if (strcmp(var
->name
,n
) == 0) {
10764 res
= (*var
->set_attr
)(p
);
10769 if (res
== 1 && !PyErr_Occurred()) {
10770 PyErr_SetString(PyExc_NameError
,"Unknown C global variable");
10775 SWIGINTERN PyTypeObject
*
10776 swig_varlink_type(void) {
10777 static char varlink__doc__
[] = "Swig var link object";
10778 static PyTypeObject varlink_type
;
10779 static int type_init
= 0;
10781 const PyTypeObject tmp
= {
10782 /* PyObject header changed in Python 3 */
10783 #if PY_VERSION_HEX >= 0x03000000
10784 PyVarObject_HEAD_INIT(NULL
, 0)
10786 PyObject_HEAD_INIT(NULL
)
10789 (char *)"swigvarlink", /* tp_name */
10790 sizeof(swig_varlinkobject
), /* tp_basicsize */
10791 0, /* tp_itemsize */
10792 (destructor
) swig_varlink_dealloc
, /* tp_dealloc */
10793 (printfunc
) swig_varlink_print
, /* tp_print */
10794 (getattrfunc
) swig_varlink_getattr
, /* tp_getattr */
10795 (setattrfunc
) swig_varlink_setattr
, /* tp_setattr */
10796 0, /* tp_compare */
10797 (reprfunc
) swig_varlink_repr
, /* tp_repr */
10798 0, /* tp_as_number */
10799 0, /* tp_as_sequence */
10800 0, /* tp_as_mapping */
10803 (reprfunc
) swig_varlink_str
, /* tp_str */
10804 0, /* tp_getattro */
10805 0, /* tp_setattro */
10806 0, /* tp_as_buffer */
10808 varlink__doc__
, /* tp_doc */
10809 0, /* tp_traverse */
10811 0, /* tp_richcompare */
10812 0, /* tp_weaklistoffset */
10813 #if PY_VERSION_HEX >= 0x02020000
10814 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
10816 #if PY_VERSION_HEX >= 0x02030000
10819 #if PY_VERSION_HEX >= 0x02060000
10820 0, /* tp_version */
10822 #ifdef COUNT_ALLOCS
10823 0,0,0,0 /* tp_alloc -> tp_next */
10826 varlink_type
= tmp
;
10828 #if PY_VERSION_HEX < 0x02020000
10829 varlink_type
.ob_type
= &PyType_Type
;
10831 if (PyType_Ready(&varlink_type
) < 0)
10835 return &varlink_type
;
10838 /* Create a variable linking object for use later */
10839 SWIGINTERN PyObject
*
10840 SWIG_Python_newvarlink(void) {
10841 swig_varlinkobject
*result
= PyObject_NEW(swig_varlinkobject
, swig_varlink_type());
10845 return ((PyObject
*) result
);
10849 SWIG_Python_addvarlink(PyObject
*p
, char *name
, PyObject
*(*get_attr
)(void), int (*set_attr
)(PyObject
*p
)) {
10850 swig_varlinkobject
*v
= (swig_varlinkobject
*) p
;
10851 swig_globalvar
*gv
= (swig_globalvar
*) malloc(sizeof(swig_globalvar
));
10853 size_t size
= strlen(name
)+1;
10854 gv
->name
= (char *)malloc(size
);
10856 strncpy(gv
->name
,name
,size
);
10857 gv
->get_attr
= get_attr
;
10858 gv
->set_attr
= set_attr
;
10859 gv
->next
= v
->vars
;
10865 SWIGINTERN PyObject
*
10866 SWIG_globals(void) {
10867 static PyObject
*_SWIG_globals
= 0;
10868 if (!_SWIG_globals
) _SWIG_globals
= SWIG_newvarlink();
10869 return _SWIG_globals
;
10872 /* -----------------------------------------------------------------------------
10873 * constants/methods manipulation
10874 * ----------------------------------------------------------------------------- */
10876 /* Install Constants */
10878 SWIG_Python_InstallConstants(PyObject
*d
, swig_const_info constants
[]) {
10881 for (i
= 0; constants
[i
].type
; ++i
) {
10882 switch(constants
[i
].type
) {
10883 case SWIG_PY_POINTER
:
10884 obj
= SWIG_InternalNewPointerObj(constants
[i
].pvalue
, *(constants
[i
]).ptype
,0);
10886 case SWIG_PY_BINARY
:
10887 obj
= SWIG_NewPackedObj(constants
[i
].pvalue
, constants
[i
].lvalue
, *(constants
[i
].ptype
));
10894 PyDict_SetItemString(d
, constants
[i
].name
, obj
);
10900 /* -----------------------------------------------------------------------------*/
10901 /* Fix SwigMethods to carry the callback ptrs when needed */
10902 /* -----------------------------------------------------------------------------*/
10905 SWIG_Python_FixMethods(PyMethodDef
*methods
,
10906 swig_const_info
*const_table
,
10907 swig_type_info
**types
,
10908 swig_type_info
**types_initial
) {
10910 for (i
= 0; methods
[i
].ml_name
; ++i
) {
10911 const char *c
= methods
[i
].ml_doc
;
10912 if (c
&& (c
= strstr(c
, "swig_ptr: "))) {
10914 swig_const_info
*ci
= 0;
10915 const char *name
= c
+ 10;
10916 for (j
= 0; const_table
[j
].type
; ++j
) {
10917 if (strncmp(const_table
[j
].name
, name
,
10918 strlen(const_table
[j
].name
)) == 0) {
10919 ci
= &(const_table
[j
]);
10924 void *ptr
= (ci
->type
== SWIG_PY_POINTER
) ? ci
->pvalue
: 0;
10926 size_t shift
= (ci
->ptype
) - types
;
10927 swig_type_info
*ty
= types_initial
[shift
];
10928 size_t ldoc
= (c
- methods
[i
].ml_doc
);
10929 size_t lptr
= strlen(ty
->name
)+2*sizeof(void*)+2;
10930 char *ndoc
= (char*)malloc(ldoc
+ lptr
+ 10);
10933 strncpy(buff
, methods
[i
].ml_doc
, ldoc
);
10935 strncpy(buff
, "swig_ptr: ", 10);
10937 SWIG_PackVoidPtr(buff
, ptr
, ty
->name
, lptr
);
10938 methods
[i
].ml_doc
= ndoc
;
10950 /* -----------------------------------------------------------------------------*
10951 * Partial Init method
10952 * -----------------------------------------------------------------------------*/
10959 #if PY_VERSION_HEX >= 0x03000000
10965 PyObject
*m
, *d
, *md
;
10966 #if PY_VERSION_HEX >= 0x03000000
10967 static struct PyModuleDef SWIG_module
= {
10968 # if PY_VERSION_HEX >= 0x03020000
10969 PyModuleDef_HEAD_INIT
,
10972 PyObject_HEAD_INIT(NULL
)
10978 (char *) SWIG_name
,
10989 #if defined(SWIGPYTHON_BUILTIN)
10990 static SwigPyClientData SwigPyObject_clientdata
= {
10991 0, 0, 0, 0, 0, 0, 0
10993 static PyGetSetDef this_getset_def
= {
10994 (char *)"this", &SwigPyBuiltin_ThisClosure
, NULL
, NULL
, NULL
10996 static SwigPyGetSet thisown_getset_closure
= {
10997 (PyCFunction
) SwigPyObject_own
,
10998 (PyCFunction
) SwigPyObject_own
11000 static PyGetSetDef thisown_getset_def
= {
11001 (char *)"thisown", SwigPyBuiltin_GetterClosure
, SwigPyBuiltin_SetterClosure
, NULL
, &thisown_getset_closure
11003 PyObject
*metatype_args
;
11004 PyTypeObject
*builtin_pytype
;
11005 int builtin_base_count
;
11006 swig_type_info
*builtin_basetype
;
11008 PyGetSetDescrObject
*static_getset
;
11009 PyTypeObject
*metatype
;
11010 SwigPyClientData
*cd
;
11011 PyObject
*public_interface
, *public_symbol
;
11012 PyObject
*this_descr
;
11013 PyObject
*thisown_descr
;
11016 (void)builtin_pytype
;
11017 (void)builtin_base_count
;
11018 (void)builtin_basetype
;
11020 (void)static_getset
;
11022 /* metatype is used to implement static member variables. */
11023 metatype_args
= Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type
);
11024 assert(metatype_args
);
11025 metatype
= (PyTypeObject
*) PyType_Type
.tp_call((PyObject
*) &PyType_Type
, metatype_args
, NULL
);
11027 Py_DECREF(metatype_args
);
11028 metatype
->tp_setattro
= (setattrofunc
) &SwigPyObjectType_setattro
;
11029 assert(PyType_Ready(metatype
) >= 0);
11032 /* Fix SwigMethods to carry the callback ptrs when needed */
11033 SWIG_Python_FixMethods(SwigMethods
, swig_const_table
, swig_types
, swig_type_initial
);
11035 #if PY_VERSION_HEX >= 0x03000000
11036 m
= PyModule_Create(&SWIG_module
);
11038 m
= Py_InitModule((char *) SWIG_name
, SwigMethods
);
11040 md
= d
= PyModule_GetDict(m
);
11043 SWIG_InitializeModule(0);
11045 #ifdef SWIGPYTHON_BUILTIN
11046 SwigPyObject_stype
= SWIG_MangledTypeQuery("_p_SwigPyObject");
11047 assert(SwigPyObject_stype
);
11048 cd
= (SwigPyClientData
*) SwigPyObject_stype
->clientdata
;
11050 SwigPyObject_stype
->clientdata
= &SwigPyObject_clientdata
;
11051 SwigPyObject_clientdata
.pytype
= SwigPyObject_TypeOnce();
11052 } else if (SwigPyObject_TypeOnce()->tp_basicsize
!= cd
->pytype
->tp_basicsize
) {
11053 PyErr_SetString(PyExc_RuntimeError
, "Import error: attempted to load two incompatible swig-generated modules.");
11054 # if PY_VERSION_HEX >= 0x03000000
11061 /* All objects have a 'this' attribute */
11062 this_descr
= PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def
);
11065 /* All objects have a 'thisown' attribute */
11066 thisown_descr
= PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def
);
11067 (void)thisown_descr
;
11069 public_interface
= PyList_New(0);
11071 (void)public_symbol
;
11073 PyDict_SetItemString(md
, "__all__", public_interface
);
11074 Py_DECREF(public_interface
);
11075 for (i
= 0; SwigMethods
[i
].ml_name
!= NULL
; ++i
)
11076 SwigPyBuiltin_AddPublicSymbol(public_interface
, SwigMethods
[i
].ml_name
);
11077 for (i
= 0; swig_const_table
[i
].name
!= 0; ++i
)
11078 SwigPyBuiltin_AddPublicSymbol(public_interface
, swig_const_table
[i
].name
);
11081 SWIG_InstallConstants(d
,swig_const_table
);
11083 SWIG_Python_SetConstant(d
, "GEOS_VERSION_MAJOR",SWIG_From_int(static_cast< int >(3)));
11084 SWIG_Python_SetConstant(d
, "GEOS_VERSION_MINOR",SWIG_From_int(static_cast< int >(5)));
11085 SWIG_Python_SetConstant(d
, "GEOS_VERSION",SWIG_FromCharPtr("3.5.0dev"));
11086 SWIG_Python_SetConstant(d
, "GEOS_JTS_PORT",SWIG_FromCharPtr("1.13.0"));
11087 SWIG_Python_SetConstant(d
, "GEOS_CAPI_VERSION_MAJOR",SWIG_From_int(static_cast< int >(1)));
11088 SWIG_Python_SetConstant(d
, "GEOS_CAPI_VERSION_MINOR",SWIG_From_int(static_cast< int >(9)));
11089 SWIG_Python_SetConstant(d
, "GEOS_CAPI_VERSION_PATCH",SWIG_From_int(static_cast< int >(0)));
11090 SWIG_Python_SetConstant(d
, "GEOS_CAPI_FIRST_INTERFACE",SWIG_From_int(static_cast< int >(1)));
11091 SWIG_Python_SetConstant(d
, "GEOS_CAPI_LAST_INTERFACE",SWIG_From_int(static_cast< int >((1+9))));
11092 SWIG_Python_SetConstant(d
, "GEOS_CAPI_VERSION",SWIG_FromCharPtr("3.5.0dev-CAPI-1.9.0"));
11093 SWIG_Python_SetConstant(d
, "GEOS_POINT",SWIG_From_int(static_cast< int >(GEOS_POINT
)));
11094 SWIG_Python_SetConstant(d
, "GEOS_LINESTRING",SWIG_From_int(static_cast< int >(GEOS_LINESTRING
)));
11095 SWIG_Python_SetConstant(d
, "GEOS_LINEARRING",SWIG_From_int(static_cast< int >(GEOS_LINEARRING
)));
11096 SWIG_Python_SetConstant(d
, "GEOS_POLYGON",SWIG_From_int(static_cast< int >(GEOS_POLYGON
)));
11097 SWIG_Python_SetConstant(d
, "GEOS_MULTIPOINT",SWIG_From_int(static_cast< int >(GEOS_MULTIPOINT
)));
11098 SWIG_Python_SetConstant(d
, "GEOS_MULTILINESTRING",SWIG_From_int(static_cast< int >(GEOS_MULTILINESTRING
)));
11099 SWIG_Python_SetConstant(d
, "GEOS_MULTIPOLYGON",SWIG_From_int(static_cast< int >(GEOS_MULTIPOLYGON
)));
11100 SWIG_Python_SetConstant(d
, "GEOS_GEOMETRYCOLLECTION",SWIG_From_int(static_cast< int >(GEOS_GEOMETRYCOLLECTION
)));
11101 SWIG_Python_SetConstant(d
, "GEOS_WKB_XDR",SWIG_From_int(static_cast< int >(GEOS_WKB_XDR
)));
11102 SWIG_Python_SetConstant(d
, "GEOS_WKB_NDR",SWIG_From_int(static_cast< int >(GEOS_WKB_NDR
)));
11104 initGEOS(noticeHandler
, errorHandler
);
11106 #if PY_VERSION_HEX >= 0x03000000