[geos-commits] [SCM] GEOS branch master updated. 4a4d5a8bcc1922e27800b57cc4d0ac30242b252e

git at osgeo.org git at osgeo.org
Fri Nov 27 15:00:04 PST 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, master has been updated
       via  4a4d5a8bcc1922e27800b57cc4d0ac30242b252e (commit)
       via  a5f94f651081ca2a549e1a7e17bbfb85b88de0f8 (commit)
      from  c771461c6caa6d7e2daad88b1ac64f9949cea80f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4a4d5a8bcc1922e27800b57cc4d0ac30242b252e
Merge: c771461 a5f94f6
Author: pramsey <pramsey at cleverelephant.ca>
Date:   Fri Nov 27 14:59:46 2020 -0800

    Merge pull request 'Drop SWIG bindings, including for Ruby and Python' (#111) from mwtoews/geos:drop-swig into master
    
    Reviewed-on: https://git.osgeo.org/gitea/geos/geos/pulls/111


commit a5f94f651081ca2a549e1a7e17bbfb85b88de0f8
Author: Mike Taves <mwtoews at gmail.com>
Date:   Sat Nov 28 06:54:11 2020 +1300

    Drop SWIG bindings, including for Ruby and Python
    
    Closes #1076

diff --git a/.gitignore b/.gitignore
index bdb9610..ca0e0ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,7 +54,6 @@ libtool
 ltmain.sh
 missing
 py-compile
-swig/geos.i
 autom4te.cache/
 capi/geos_c.h
 config.guess
diff --git a/Makefile.am b/Makefile.am
index f064d45..54a413b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,6 @@ SUBDIRS = \
 	capi    \
 	doc     \
 	macros  \
-	swig    \
 	tests   \
 	benchmarks \
 	tools
diff --git a/NEWS b/NEWS
index 01de82a..3b3a484 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,8 @@ Changes in 3.9.0
   - Fix buffering issue (#1022, JTS-525, Paul Ramsey)
   - MinimumBoundingCircle.getMaximumDiameter fix (JTS-533, Paul Ramsey)
 
+- Changes:
+  - Drop SWIG bindings, including for Ruby and Python (#1076, Mike Taves)
 
 Changes in 3.8.0
 2019-10-10
diff --git a/README.md b/README.md
index 6c55324..00d4c17 100644
--- a/README.md
+++ b/README.md
@@ -83,10 +83,7 @@ and basic C++ usage examples can be found in `doc/example.cpp`.
 
 #### Ruby
 
-Ruby bindings are part of GEOS. To build, use the `--enable-ruby` option
-when configuring:
-
-    ./configure .. --enable-ruby
+Ruby bindings are available via [RGeo](https://github.com/rgeo/rgeo).
 
 #### PHP
 
@@ -97,8 +94,9 @@ PHP bindings for GEOS are available separately from
 
 Python bindings are available via:
 
- 1. [Shapely](http://pypi.python.org/pypi/Shapely) package.
- 2. Calling functions from `libgeos_c` via Python ctypes.
+ 1. [Shapely](http://pypi.python.org/pypi/Shapely)
+ 2. [PyGEOS](https://github.com/pygeos/pygeos)
+ 3. Calling functions from `libgeos_c` via Python ctypes
 
 
 ## Documentation
diff --git a/configure.ac b/configure.ac
index 9b64ba3..0e947bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,92 +240,6 @@ if test x"$HAVE_INT64_T_64" = x"no" ; then
 fi
 
 
-
-dnl --------------------------------------------------------------------
-dnl - check whether python is required for the build
-dnl --------------------------------------------------------------------
-
-AC_ARG_ENABLE([python],
-	[  --enable-python         Enable build of python module],
-	[case "${enableval}" in
-		yes) use_python=true ;;
-		no)  use_python=false ;;
-		*) AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;;
-	esac],
-	[use_python=false]
-)
-
-
-dnl --------------------------------------------------------------------
-dnl - check whether ruby is required for the build
-dnl --------------------------------------------------------------------
-
-AC_ARG_ENABLE([ruby],
-	[  --enable-ruby           Enable build of ruby module],
-	[case "${enableval}" in
-		yes) use_ruby=true ;;
-		no)  use_ruby=false ;;
-		*) AC_MSG_ERROR(bad value ${enableval} for --enable-ruby) ;;
-	esac],
-	[use_ruby=false]
-)
-
-dnl --------------------------------------------------------------------
-dnl - check for swig if python or ruby are enabled
-dnl --------------------------------------------------------------------
-
-use_swig=false
-if test x"$use_python" = xtrue ||
-   test x"$use_ruby" = xtrue; then
-  AC_PROG_SWIG(1.3.28)
-  if test x"$SWIG" != "x"; then
-    SWIG_ENABLE_CXX
-    AC_SUBST(SWIG)
-    use_swig=true
-  else
-    use_python=false
-    use_ruby=false
-  fi
-fi
-AM_CONDITIONAL(ENABLE_SWIG, [ test x"$use_swig" = xtrue ])
-
-
-dnl --------------------------------------------------------------------
-dnl - check for python if enabled
-dnl --------------------------------------------------------------------
-
-if test x"$use_python" = xtrue; then
-	dnl Check for Python
-  AM_PATH_PYTHON
-  SWIG_PYTHON
-
-	if test x"$PYTHON" = "x"; then
-		use_python=false
-	fi
-
-	AC_SUBST(PYTHON)
-	AC_SUBST(SWIG_PYTHON_CPPFLAGS)
-	AC_SUBST(SWIG_PYTHON_OPT)
-fi
-AM_CONDITIONAL(ENABLE_PYTHON, [test x"$use_python" = xtrue])
-
-
-dnl --------------------------------------------------------------------
-dnl - check for ruby if enabled
-dnl --------------------------------------------------------------------
-
-if test x"$use_ruby" = xtrue; then
-	dnl Check for Ruby
-	AC_RUBY_DEVEL
-
-	if test x"$RUBY" = x; then
-		use_ruby=false
-	fi
-
-fi
-AM_CONDITIONAL(ENABLE_RUBY, [ test x"$use_ruby" = xtrue ])
-
-
 dnl --------------------------------------------------------------------
 dnl - do operating-system specific things
 dnl --------------------------------------------------------------------
@@ -490,12 +404,6 @@ AC_OUTPUT([
 	src/shape/Makefile
 	src/shape/fractal/Makefile
 	src/util/Makefile
-	swig/geos.i
-	swig/Makefile
-	swig/python/Makefile
-	swig/python/tests/Makefile
-	swig/ruby/Makefile
-	swig/ruby/test/Makefile
 	tests/Makefile
 	tests/bigtest/Makefile
 	tests/unit/Makefile
@@ -515,9 +423,6 @@ AC_OUTPUT([
 
 dnl -- echo "---------------------------------------"
 dnl -- echo "Boost UTF: $use_boost_utf"
-echo "Swig: $use_swig"
-echo "Python bindings: $use_python"
-echo "Ruby bindings: $use_ruby"
 echo "OverlayNG: $use_overlayng"
 
 dnl -- echo "---------------------------------------"
diff --git a/include/geos/geom.h b/include/geos/geom.h
index 86d54e2..c63c662 100644
--- a/include/geos/geom.h
+++ b/include/geos/geom.h
@@ -22,7 +22,7 @@
  *
  * Geometry Engine Open Source is a C++ port of the Java Topology Suite
  * released under the LGPL license.
- * It has interfaces for C++, C and python (though swig).
+ * It has interfaces for C++ and C.
  *
  * \section getstart_sec Getting Started
  *
diff --git a/macros/ac_pkg_swig.m4 b/macros/ac_pkg_swig.m4
deleted file mode 100644
index cda8166..0000000
--- a/macros/ac_pkg_swig.m4
+++ /dev/null
@@ -1,158 +0,0 @@
-dnl @synopsis AC_PROG_SWIG([major.minor.micro])
-dnl
-dnl This macro searches for a SWIG installation on your system. If
-dnl found you should call SWIG via $(SWIG). You can use the optional
-dnl first argument to check if the version of the available SWIG is
-dnl greater than or equal to the value of the argument. It should have
-dnl the format: N[.N[.N]] (N is a number between 0 and 999. Only the
-dnl first N is mandatory.)
-dnl
-dnl If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks
-dnl that the swig package is this version number or higher.
-dnl
-dnl In configure.in, use as:
-dnl
-dnl             AC_PROG_SWIG(1.3.17)
-dnl             SWIG_ENABLE_CXX
-dnl             SWIG_MULTI_MODULE_SUPPORT
-dnl             SWIG_PYTHON
-dnl
-dnl @category InstalledPackages
-dnl @author Sebastian Huber <sebastian-huber at web.de>
-dnl @author Alan W. Irwin <irwin at beluga.phys.uvic.ca>
-dnl @author Rafael Laboissiere <rafael at laboissiere.net>
-dnl @author Andrew Collier <abcollier at yahoo.com>
-dnl @version 2004-09-20
-dnl @license GPLWithACException
-dnl
-dnl Fixed by Sandro Santilli to consider 2.0.0 > 1.3.37 (2010-06-15)
-dnl
-
-AC_DEFUN([AC_PROG_SWIG],[
-        AC_PATH_PROG([SWIG],[swig])
-        if test -z "$SWIG" ; then
-                AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org])
-                SWIG=''
-        elif test -n "$1" ; then
-                AC_MSG_CHECKING([for SWIG version])
-                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
-                AC_MSG_RESULT([$swig_version])
-                if test -n "$swig_version" ; then
-                        # Calculate the required version number components
-                        [required=$1]
-                        [required_major=`echo $required | sed 's/[^0-9].*//'`]
-                        if test -z "$required_major" ; then
-                                [required_major=0]
-                        fi
-                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
-                        [required_minor=`echo $required | sed 's/[^0-9].*//'`]
-                        if test -z "$required_minor" ; then
-                                [required_minor=0]
-                        fi
-                        [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
-                        [required_patch=`echo $required | sed 's/[^0-9].*//'`]
-                        if test -z "$required_patch" ; then
-                                [required_patch=0]
-                        fi
-                        # Calculate the available version number components
-                        [available=$swig_version]
-                        [available_major=`echo $available | sed 's/[^0-9].*//'`]
-                        if test -z "$available_major" ; then
-                                [available_major=0]
-                        fi
-                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
-                        [available_minor=`echo $available | sed 's/[^0-9].*//'`]
-                        if test -z "$available_minor" ; then
-                                [available_minor=0]
-                        fi
-                        [available=`echo $available | sed 's/[0-9]*[^0-9]//'`]
-                        [available_patch=`echo $available | sed 's/[^0-9].*//'`]
-                        if test -z "$available_patch" ; then
-                                [available_patch=0]
-                        fi
-			[required_full=`printf %2.2d%2.2d%2.2d%2.2d $required_major $required_minor $required_patch]`
-			[available_full=`printf %2.2d%2.2d%2.2d%2.2d $available_major $available_minor $available_patch]`
-                        if test $available_full -lt $required_full; then
-                                AC_MSG_WARN([SWIG version >= $1 is required.  You have $swig_version.  You should look at http://www.swig.org])
-                                SWIG=''
-                        else
-                                AC_MSG_NOTICE([SWIG executable is '$SWIG'])
-                                SWIG_LIB=`$SWIG -swiglib | sed -e :a -e N -e 's/\n/ /' -e ta`
-                                AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
-                        fi
-                else
-                        AC_MSG_WARN([cannot determine SWIG version])
-                        SWIG=''
-                fi
-        fi
-        AC_SUBST([SWIG_LIB])
-])
-
-# SWIG_ENABLE_CXX()
-#
-# Enable SWIG C++ support.  This affects all invocations of $(SWIG).
-AC_DEFUN([SWIG_ENABLE_CXX],[
-        AC_REQUIRE([AC_PROG_SWIG])
-        AC_REQUIRE([AC_PROG_CXX])
-        SWIG="$SWIG -c++"
-])
-
-# SWIG_MULTI_MODULE_SUPPORT()
-#
-# Enable support for multiple modules.  This effects all invocations
-# of $(SWIG).  You have to link all generated modules against the
-# appropriate SWIG runtime library.  If you want to build Python
-# modules for example, use the SWIG_PYTHON() macro and link the
-# modules against $(SWIG_PYTHON_LIBS).
-#
-AC_DEFUN([SWIG_MULTI_MODULE_SUPPORT],[
-        AC_REQUIRE([AC_PROG_SWIG])
-        SWIG="$SWIG -noruntime"
-])
-
-# SWIG_PYTHON([use-shadow-classes = {no, yes}])
-#
-# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS),
-# and $(SWIG_PYTHON_OPT) output variables.
-#
-# $(SWIG_PYTHON_OPT) contains all necessary SWIG options to generate
-# code for Python.  Shadow classes are enabled unless the value of the
-# optional first argument is exactly 'no'.  If you need multi module
-# support (provided by the SWIG_MULTI_MODULE_SUPPORT() macro) use
-# $(SWIG_PYTHON_LIBS) to link against the appropriate library.  It
-# contains the SWIG Python runtime library that is needed by the type
-# check system for example.
-AC_DEFUN([SWIG_PYTHON],[
-        AC_REQUIRE([AC_PROG_SWIG])
-        AC_REQUIRE([AC_PYTHON_DEVEL])
-        test "x$1" != "xno" || swig_shadow=" -noproxy"
-        AC_SUBST([SWIG_PYTHON_OPT],["-python -modern$swig_shadow"])
-        AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS])
-])
-
-
-dnl @synopsis AC_LIB_WAD
-dnl
-dnl This macro searches for installed WAD library.
-dnl
-AC_DEFUN([AC_LIB_WAD],
-[
-        AC_REQUIRE([AC_PYTHON_DEVEL])
-        AC_ARG_ENABLE(wad,
-        AC_HELP_STRING([--enable-wad], [enable wad module]),
-        [
-                case "${enableval}" in
-                        no)     ;;
-                        *)      if test "x${enableval}" = xyes;
-                                then
-                                        check_wad="yes"
-                                fi ;;
-                esac
-        ], [])
-
-        if test -n "$check_wad";
-        then
-                AC_CHECK_LIB(wadpy, _init, [WADPY=-lwadpy], [], $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS)
-                AC_SUBST(WADPY)
-        fi
-])
diff --git a/macros/ac_python_devel.m4 b/macros/ac_python_devel.m4
deleted file mode 100644
index d67842b..0000000
--- a/macros/ac_python_devel.m4
+++ /dev/null
@@ -1,72 +0,0 @@
-AC_DEFUN([AC_PYTHON_DEVEL],[
-        #
-        # should allow for checking of python version here...
-        #
-        AC_REQUIRE([AM_PATH_PYTHON])
-
-        base_python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
-				
-        # Need to fix up a couple of problems on Windows/MingW:
-        # 1.  python lib is named with MAJOR.VERSION collapsed in a single value,
-        #     so libpython2.4 versus libpython24
-        #	2.  Directory names have the same issue as item 1 so
-        #			python2.4 versus python24
-        # 3.  Change paths from c:\python\include to c:/python/include.
-
-        if test $am_cv_python_platform = "win32" ; then
-                # Fix python path
-                base_python_path=`echo $PYTHON | sed "s,/[[^/]]*$,,"`
-
-                PYTHON_VERSION=`echo $PYTHON_VERSION | sed "s/\.//"`
-                AC_SUBST([PYTHON_VERSION], [$PYTHON_VERSION])
-                
-                pythondir=`echo $pythondir | sed 's,\\\,/,g'`
-                AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
-
-                pyexecdir=`echo $pyexecdir | sed 's,\\\,/,g'`
-                AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
-        fi
-
-        # Check for Python include path
-        AC_MSG_CHECKING([for Python include path])
-        for i in "$base_python_path/include/python$PYTHON_VERSION/" "$base_python_path/include/python/" "$base_python_path/include/" "$base_python_path/" ; do
-                python_path=`find $i -type f -name Python.h -print 2> /dev/null | sed "1q"`
-                if test -n "$python_path" ; then
-                        break
-                fi
-        done
-        python_path=`echo $python_path | sed "s,/Python.h$,,"`
-        AC_MSG_RESULT([$python_path])
-        if test -z "$python_path" ; then
-                AC_MSG_ERROR([cannot find Python include path])
-        fi
-        AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
-
-        # Check for Python library path
-        AC_MSG_CHECKING([for Python library path])
-        for i in "$base_python_path/lib/python$PYTHON_VERSION/config/" "$base_python_path/lib/python$PYTHON_VERSION/" "$base_python_path/lib/python/config/" "$base_python_path/lib/python/" "$base_python_path/" "$base_python_path/libs/" ; do
-                python_path=`find $i -name libpython$PYTHON_VERSION.* -print 2> /dev/null | sed "1q"`
-                if test -n "$python_path" ; then
-                        break
-                fi
-        done
-        python_path=`echo $python_path | sed "s,/libpython.*$,,"`
-        AC_MSG_RESULT([$python_path])
-        if test -z "$python_path" ; then
-                AC_MSG_ERROR([cannot find Python library path])
-        fi
-        AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
-        #
-        python_site=`echo $base_python_path | sed "s/config/site-packages/"`
-        AC_SUBST([PYTHON_SITE_PKG],[$python_site])
-        #
-        # libraries which must be linked in when embedding
-        #
-        AC_MSG_CHECKING(python extra libraries)
-        PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
-                conf = distutils.sysconfig.get_config_var; \
-                print (conf('LOCALMODLIBS') or '')+' '+(conf('LIBS') or '')"
-        AC_MSG_RESULT($PYTHON_EXTRA_LIBS)`
-        AC_SUBST(PYTHON_EXTRA_LIBS)
-])
-
diff --git a/macros/python.m4 b/macros/python.m4
deleted file mode 100644
index 5b2c695..0000000
--- a/macros/python.m4
+++ /dev/null
@@ -1,239 +0,0 @@
-## ------------------------                                 -*- Autoconf -*-
-## Python file handling
-## From Andrew Dalke
-## Updated by James Henstridge
-## ------------------------
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-
-# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ---------------------------------------------------------------------------
-# Adds support for distributing Python modules and packages.  To
-# install modules, copy them to $(pythondir), using the python_PYTHON
-# automake variable.  To install a package with the same name as the
-# automake package, install to $(pkgpythondir), or use the
-# pkgpython_PYTHON automake variable.
-#
-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
-# locations to install python extension modules (shared libraries).
-# Another macro is required to find the appropriate flags to compile
-# extension modules.
-#
-# If your package is configured with a different prefix to python,
-# users will have to add the install directory to the PYTHONPATH
-# environment variable, or create a .pth file (see the python
-# documentation for details).
-#
-# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
-# cause an error if the version of python installed on the system
-# doesn't meet the requirement.  MINIMUM-VERSION should consist of
-# numbers and dots only.
-AC_DEFUN([AM_PATH_PYTHON],
- [
-  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
-  dnl supported. (2.0 was released on October 16, 2000).
-  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
- python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
-
-  AC_ARG_VAR([PYTHON], [the Python interpreter])
-
-  m4_if([$1],[],[
-    dnl No version check is needed.
-    # Find any Python interpreter.
-    if test -z "$PYTHON"; then
-      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
-    fi
-    am_display_PYTHON=python
-  ], [
-    dnl A version check is needed.
-    if test -n "$PYTHON"; then
-      # If the user set $PYTHON, use it and don't search something else.
-      AC_MSG_CHECKING([whether $PYTHON version is >= $1])
-      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
-			      [AC_MSG_RESULT([yes])],
-			      [AC_MSG_RESULT([no])
-			       AC_MSG_ERROR([Python interpreter is too old])])
-      am_display_PYTHON=$PYTHON
-    else
-      # Otherwise, try each interpreter until we find one that satisfies
-      # VERSION.
-      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
-	[am_cv_pathless_PYTHON],[
-	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
-	  test "$am_cv_pathless_PYTHON" = none && break
-	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
-	done])
-      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
-      if test "$am_cv_pathless_PYTHON" = none; then
-	PYTHON=:
-      else
-        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
-      fi
-      am_display_PYTHON=$am_cv_pathless_PYTHON
-    fi
-  ])
-
-  if test "$PYTHON" = :; then
-  dnl Run any user-specified action, or abort.
-    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
-  else
-
-  dnl Query Python for its version number.  Getting [:3] seems to be
-  dnl the best way to do this; it's what "site.py" does in the standard
-  dnl library.
-
-  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
-    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
-  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
-
-  dnl Use the values of $prefix and $exec_prefix for the corresponding
-  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
-  dnl distinct variables so they can be overridden if need be.  However,
-  dnl general consensus is that you shouldn't need this ability.
-
-  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
-  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
-
-  dnl At times (like when building shared libraries) you may want
-  dnl to know which OS platform Python thinks this is.
-
-  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
-    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
-  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
-
-  # Just factor out some code duplication.
-  am_python_setup_sysconfig="\
-import sys
-# Prefer sysconfig over distutils.sysconfig, for better compatibility
-# with python 3.x.  See automake bug#10227.
-try:
-    import sysconfig
-except ImportError:
-    can_use_sysconfig = 0
-else:
-    can_use_sysconfig = 1
-# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
-# <https://github.com/pypa/virtualenv/issues/118>
-try:
-    from platform import python_implementation
-    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
-        can_use_sysconfig = 0
-except ImportError:
-    pass"
-
-  dnl Set up 4 directories:
-
-  dnl pythondir -- where to install python scripts.  This is the
-  dnl   site-packages directory, not the python standard library
-  dnl   directory like in previous automake betas.  This behavior
-  dnl   is more consistent with lispdir.m4 for example.
-  dnl Query distutils for this directory.
-  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
-    [am_cv_python_pythondir],
-    [if test "x$prefix" = xNONE
-     then
-       am_py_prefix=$ac_default_prefix
-     else
-       am_py_prefix=$prefix
-     fi
-     am_cv_python_pythondir=`$PYTHON -c "
-$am_python_setup_sysconfig
-if can_use_sysconfig:
-    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
-else:
-    from distutils import sysconfig
-    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
-sys.stdout.write(sitedir)"`
-     case $am_cv_python_pythondir in
-     $am_py_prefix*)
-       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
-       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
-       ;;
-     *)
-       case $am_py_prefix in
-         /usr|/System*) ;;
-         *)
-	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
-	  ;;
-       esac
-       ;;
-     esac
-    ])
-  AC_SUBST([pythondir], [$am_cv_python_pythondir])
-
-  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
-  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
-  dnl   more consistent with the rest of automake.
-
-  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
-
-  dnl pyexecdir -- directory for installing python extension modules
-  dnl   (shared libraries)
-  dnl Query distutils for this directory.
-  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
-    [am_cv_python_pyexecdir],
-    [if test "x$exec_prefix" = xNONE
-     then
-       am_py_exec_prefix=$am_py_prefix
-     else
-       am_py_exec_prefix=$exec_prefix
-     fi
-     am_cv_python_pyexecdir=`$PYTHON -c "
-$am_python_setup_sysconfig
-if can_use_sysconfig:
-    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
-else:
-    from distutils import sysconfig
-    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
-sys.stdout.write(sitedir)"`
-     case $am_cv_python_pyexecdir in
-     $am_py_exec_prefix*)
-       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
-       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
-       ;;
-     *)
-       case $am_py_exec_prefix in
-         /usr|/System*) ;;
-         *)
-	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
-	   ;;
-       esac
-       ;;
-     esac
-    ])
-  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
-
-  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
-
-  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
-
-  dnl Run any user-specified action.
-  $2
-  fi
-
-])
-
-
-# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-# ---------------------------------------------------------------------------
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
-# Run ACTION-IF-FALSE otherwise.
-# This test uses sys.hexversion instead of the string equivalent (first
-# word of sys.version), in order to cope with versions such as 2.2c1.
-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
-AC_DEFUN([AM_PYTHON_CHECK_VERSION],
- [prog="import sys
-# split strings by '.' and convert to numeric.  Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
-sys.exit(sys.hexversion < minverhex)"
-  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
diff --git a/macros/ruby.m4 b/macros/ruby.m4
deleted file mode 100644
index c2e581e..0000000
--- a/macros/ruby.m4
+++ /dev/null
@@ -1,77 +0,0 @@
-## ------------------------
-## Ruby file handling
-## From Charlie Savage
-## ------------------------
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-
-AC_DEFUN([AC_RUBY_DEVEL],
-[
-	dnl Find a Ruby interpreter
-  AC_PATH_PROG([RUBY],[ruby])
-
-  if test -z "$RUBY" ; then
-		AC_MSG_ERROR([Could not find ruby interpreter.])
-    RUBY=''
-  else
-		dnl Get Ruby version number
-		RUBY_VERSION=`$RUBY -e "puts RUBY_VERSION"`
-
-		dnl Get Ruby bin directory
-		RUBY_BIN_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["bindir"]] || Config::CONFIG[["bindir"]]'`
-
-		dnl Get Ruby site arch
-		RUBY_SITE_ARCH=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["sitearch"]] || Config::CONFIG[["sitearch"]]'`
-
-		dnl Get Ruby include directory
-		RUBY_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]]'`
-
-		dnl Get Ruby config.h include directory
-		RUBY_ARCH_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["rubyarchhdrdir"]] || Config::CONFIG[["archdir"]]'`
-
-		dnl Get Ruby lib directory
-		RUBY_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["libdir"]] || Config::CONFIG[["libdir"]]'`
-
-		dnl Get Ruby arch lib directory
-		RUBY_ARCH_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["archlibdir"]] || Config::CONFIG[["archlibdir"]]'`
-
-		dnl Get Ruby extensions directory
-		RUBY_EXTENSION_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["sitearchdir"]] || Config::CONFIG[["sitearchdir"]]'`
-
-		dnl Get Ruby shared library name, this does not include the lib prefix or extension name
-		RUBY_SO_NAME=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["RUBY_SO_NAME"]] || Config::CONFIG[["RUBY_SO_NAME"]]'`
-
-		dnl Get Ruby shared libary name
-		RUBY_SHARED_LIB=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["LIBRUBY"]] || Config::CONFIG[["LIBRUBY"]]'`
-
-    AC_MSG_NOTICE([Ruby executable is '$RUBY'])
-    AC_MSG_NOTICE([Ruby version is '$RUBY_VERSION'])
-    AC_MSG_NOTICE([Ruby bin directory is '$RUBY_BIN_DIR'])
-    AC_MSG_NOTICE([Ruby site arch is '$RUBY_SITE_ARCH'])
-    AC_MSG_NOTICE([Ruby include directory is '$RUBY_INCLUDE_DIR'])
-    AC_MSG_NOTICE([Ruby config.h include directory is '$RUBY_ARCH_INCLUDE_DIR'])
-    AC_MSG_NOTICE([Ruby library directory is '$RUBY_LIB_DIR'])
-    AC_MSG_NOTICE([Ruby architecture library directory is '$RUBY_ARCH_LIB_DIR'])
-    AC_MSG_NOTICE([Ruby extension directory is '$RUBY_EXTENSION_DIR'])
-    AC_MSG_NOTICE([Ruby library is '$RUBY_SO_NAME'])
-    AC_MSG_NOTICE([Ruby import library is '$RUBY_SHARED_LIB'])
-
-    AC_SUBST([RUBY_VERSION])
-    AC_SUBST([RUBY_BIN_DIR])
-    AC_SUBST([RUBY_SITE_ARCH])
-    AC_SUBST([RUBY_INCLUDE_DIR])
-    AC_SUBST([RUBY_ARCH_INCLUDE_DIR])
-    AC_SUBST([RUBY_LIB_DIR])
-    AC_SUBST([RUBY_ARCH_LIB_DIR])
-    AC_SUBST([RUBY_EXTENSION_DIR])
-    AC_SUBST([RUBY_SO_NAME])
-    AC_SUBST([RUBY_SHARED_LIB])
-	fi
-  AC_SUBST([RUBY])
-])
-
diff --git a/swig/Makefile.am b/swig/Makefile.am
deleted file mode 100644
index abaf631..0000000
--- a/swig/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# This file is part of project GEOS (http://trac.osgeo.org/geos/) 
-#
-
-DIST_SUBDIRS = python ruby
-SUBDIRS =
-
-if ENABLE_PYTHON
- SUBDIRS += python
-endif
-
-if ENABLE_RUBY
- SUBDIRS += ruby
-endif
-
-EXTRA_DIST = \
-	geos.i 
diff --git a/swig/geos.i.in b/swig/geos.i.in
deleted file mode 100644
index 2d98816..0000000
--- a/swig/geos.i.in
+++ /dev/null
@@ -1,1293 +0,0 @@
-/* =========================================================================
- * Copyright 2005-2007 Charlie Savage, cfis at interserv.com
- *
- * Interface for a SWIG generated geos module.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation. 
- * See the COPYING file for more information.
- *
- * ========================================================================= */
-
-%module geos
-
-%include "attribute.i"
-%include "exception.i"
-%include "std_string.i"
-%include "std_vector.i"
-%include "std_except.i"
-
-%{ 
-#include "geos_c.h"
-/* Needed for va_start, etc. */
-#include <stdarg.h>
-%}
-
-/* Constants copied from geos_c.h.  Would be nice
-   to reuse the originals but we can't without exposing
-   the whole c api. */
-#define GEOS_VERSION_MAJOR @VERSION_MAJOR@
-#define GEOS_VERSION_MINOR @VERSION_MINOR@
-#define GEOS_VERSION_PATCH @VERSION_PATCH@
-#define GEOS_VERSION "@VERSION@"
-#define GEOS_JTS_PORT "@JTS_PORT@"
-
-#define GEOS_CAPI_VERSION_MAJOR @CAPI_VERSION_MAJOR@
-#define GEOS_CAPI_VERSION_MINOR @CAPI_VERSION_MINOR@
-#define GEOS_CAPI_VERSION_PATCH @CAPI_VERSION_PATCH@
-#define GEOS_CAPI_FIRST_INTERFACE GEOS_CAPI_VERSION_MAJOR 
-#define GEOS_CAPI_LAST_INTERFACE (GEOS_CAPI_VERSION_MAJOR+GEOS_CAPI_VERSION_MINOR)
-#define GEOS_CAPI_VERSION "@VERSION at -CAPI-@CAPI_VERSION@"
-
-/* Supported geometry types */
-enum GEOSGeomTypes { 
-    GEOS_POINT,
-    GEOS_LINESTRING,
-    GEOS_LINEARRING,
-    GEOS_POLYGON,
-    GEOS_MULTIPOINT,
-    GEOS_MULTILINESTRING,
-    GEOS_MULTIPOLYGON,
-    GEOS_GEOMETRYCOLLECTION
-};
-
-enum GEOSByteOrders {
-	GEOS_WKB_XDR = 0, /* Big Endian */
-	GEOS_WKB_NDR = 1 /* Little Endian */
-};
-
-/* From OffsetCurveSetBuilder.h for buffer operations. */
-%{
-    static const int DEFAULT_QUADRANT_SEGMENTS=8;
-%}
-
-/* Message and Error Handling */
-%{
-
-/* This is not thread safe ! */
-static const int MESSAGE_SIZE = 1000;
-static char message[MESSAGE_SIZE];
-
-void noticeHandler(const char *fmt, ...)
-{
-    va_list args;
-    va_start(args, fmt);
-    vsnprintf(message, sizeof(message) - 1, fmt, args);
-    va_end(args);
-}
-
-void errorHandler(const char *fmt, ...)
-{
-    va_list args;
-    va_start(args, fmt);
-    vsnprintf(message, sizeof(message) - 1, fmt, args);
-    va_end(args);
-}
-%}
-
-
-/* First initialize geos */
-%init %{
-    initGEOS(noticeHandler, errorHandler);
-%}
-
-
-/* Module level methods */
-%rename("version") GEOSversion;
-const char *GEOSversion();
-
-/* Exception handler */
-%exception
-{
-    try
-    {
-        $action
-    }
-    catch (const std::exception& e)
-    {
-        SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-}
-
-
-/* ==============  Language Specific Files ============ */
-
-/* Import language specific SWIG files.  This allows each language
-   to define its own renames as well as any special functionality
-   such as language specific iterators for collections. Note 
-   that %include allows the included files to generate interface
-   wrapper code while %import does not.  Thus use %include since
-   this is an important feature (for example, Ruby needs it to #undef
-   the select macro) */
-
-
-#ifdef SWIGPYTHON
-	%include @top_srcdir@/swig/python/python.i
-#endif
-
-#ifdef SWIGRUBY
-	%include @top_srcdir@/swig/ruby/ruby.i
-#endif
-
-
-
-
-// ===  CoordinateSequence ===
-%{
-typedef void GeosCoordinateSequence;
-
-void checkCoordSeqBounds(const GEOSCoordSeq coordSeq, const size_t index)
-{
-    unsigned int size = 0;
-    GEOSCoordSeq_getSize(coordSeq, &size);
-
-    if (index < 0 || index >= size)
-        throw std::runtime_error("Index out of bounds");
-}
-%}
-
-%newobject GeosCoordinateSequence::clone;
-%rename (CoordinateSequence) GeosCoordinateSequence;
-class GeosCoordinateSequence
-{
-public:
-%extend
-{
-    GeosCoordinateSequence(size_t size, size_t dims)
-    {
-        return (GeosCoordinateSequence*) GEOSCoordSeq_create(size, dims);
-    }
-
-    ~GeosCoordinateSequence()
-    {
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        return GEOSCoordSeq_destroy(coords);
-    }
-
-    GeosCoordinateSequence *clone()
-    {
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        return (GeosCoordinateSequence*) GEOSCoordSeq_clone(coords);
-    }
-
-    int setX(size_t idx, double val)
-    {
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setX(coords, idx, val);
-    }
-
-    int setY(size_t idx, double val)
-    {
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setY(coords, idx, val);
-    }
-
-    int setZ(size_t idx, double val)
-    {
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setZ(coords, idx, val);
-    }
-
-    int setOrdinate(size_t idx, size_t dim, double val)
-    {
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setOrdinate(coords, idx, dim, val);
-    }
-
-    double getX(size_t idx)
-    {
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getX(coords, idx, &result);
-        return result;
-    }
-
-    double getY(size_t idx)
-    {
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getY(coords, idx, &result);
-        return result;
-    }
-    
-    double getZ(size_t idx)
-    {
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getZ(coords, idx, &result);
-        return result;
-    }
-    
-    double getOrdinate(size_t idx, size_t dim)
-    {
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getOrdinate(coords, idx, dim, &result);
-        return result;
-    }
-
-    unsigned int getSize()
-    {
-        unsigned int result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        GEOSCoordSeq_getSize(coords, &result);
-        return result;
-    }
-
-    unsigned int getDimensions()
-    {
-        unsigned int result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        GEOSCoordSeq_getDimensions(coords, &result);
-        return result;
-    }
-}
-};
-
-
-/* ========  Fake Classes to Create Geom Hierarchy ====== */
-%rename(Geometry) GeosGeometry;
-%rename(Point) GeosPoint;
-%rename(LineString) GeosLineString;
-%rename(LinearRing) GeosLinearRing;
-%rename(Polygon) GeosPolygon;
-%rename(GeometryCollection) GeosGeometryCollection;
-%rename(MultiPoint) GeosMultiPoint;
-%rename(MultiLineString) GeosMultiLineString;
-%rename(MultiLinearRing) GeosMultiLinearRing;
-%rename(MultiPolygon) GeosMultiPolygon;
-%rename(WktReader) GeosWktReader;
-%rename(WktWriter) GeosWktWriter;
-%rename(WkbReader) GeosWkbReader;
-%rename(WkbWriter) GeosWkbWriter;
-
-
-%rename("union") GeosGeometry::geomUnion;
-
-%{
-typedef void GeosGeometry;
-typedef void GeosPoint;
-typedef void GeosLineString;
-typedef void GeosLinearRing;
-typedef void GeosPolygon;
-typedef void GeosGeometryCollection;
-typedef void GeosMultiPoint;
-typedef void GeosMultiLineString;
-typedef void GeosMultiLinearRing;
-typedef void GeosMultiPolygon;
-
-typedef void GeosWktReader;
-typedef void GeosWktWriter;
-typedef void GeosWkbReader;
-typedef void GeosWkbWriter;
-%}
-
-%newobject GeosGeometry::intersection;
-%newobject GeosGeometry::buffer;
-%newobject GeosGeometry::convexHull;
-%newobject GeosGeometry::difference;
-%newobject GeosGeometry::symDifference;
-%newobject GeosGeometry::boundary;
-%newobject GeosGeometry::geomUnion;
-%newobject GeosGeometry::pointOnSurface;
-%newobject GeosGeometry::getCentroid;
-%newobject GeosGeometry::relate;
-%newobject GeosGeometry::lineMerge;
-%newobject GeosGeometry::simplify;
-%newobject GeosGeometry::topologyPreserveSimplify;
-
-
-%typemap(out) GeosGeometry*
-{
-    /* %typemap(out) GeosGeometry */
-
-    if ($1 == NULL)
-        SWIG_exception(SWIG_RuntimeError, message);
-
-    GeosGeometry *geom = $1;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-
-    switch (geomId)
-    {
-    case GEOS_POINT:
-        $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), $descriptor(GeosPoint*), 0 | $owner);
-        break;
-	case GEOS_LINESTRING:
-        $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), $descriptor(GeosLineString*), 0 | $owner);
-        break;
-	case GEOS_LINEARRING:
-        $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), $descriptor(GeosLinearRing*), 0 | $owner);
-        break;
-	case GEOS_POLYGON:
-        $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), $descriptor(GeosPolygon*), 0 | $owner);
-        break;
-	case GEOS_MULTIPOINT:
-        $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), $descriptor(GeosMultiPoint*), 0 | $owner);
-        break;
-	case GEOS_MULTILINESTRING:
-        $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), $descriptor(GeosMultiLineString*), 0 | $owner);
-        break;
-	case GEOS_MULTIPOLYGON:
-        $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), $descriptor(GeosMultiPolygon*), 0 | $owner);
-        break;
-	case GEOS_GEOMETRYCOLLECTION:
-        $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), $descriptor(GeosGeometryCollection*), 0 | $owner);
-        break;
-    }
-}
-
-/* Setup a default typemap for buffer. */
-%typemap(default) int quadsegs
-{
-    $1 = DEFAULT_QUADRANT_SEGMENTS;
-}
-
-%{
-bool checkBoolResult(char result)
-{
-    int intResult = (int) result;
-
-    if (intResult == 1)
-        return true;
-    else if (intResult == 0)
-        return false;
-    else
-        throw std::runtime_error(message);
-}
-%}
-
-%newobject GeosGeometry::clone;
-class GeosGeometry
-{
-private:
-    GeosGeometry();
-public:
-%extend
-{
-    ~GeosGeometry()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-
-    GeosGeometry *clone()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeom_clone(geom);
-    }
-    
-    char *geomType()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeomType(geom);
-    }
-
-    int typeId()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeomTypeId(geom);
-    }
-    
-    void normalize()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        int result = GEOSNormalize(geom);
-
-        if (result == -1)
-            throw std::runtime_error(message);
-    }
-
-    int getSRID()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGetSRID(geom);
-    }
-
-    void setSRID(int SRID)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSSetSRID(geom, SRID);
-    }
-
-    size_t getDimensions()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeom_getDimensions(geom);
-    }
-
-    size_t getNumGeometries()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        size_t result = GEOSGetNumGeometries(geom);
-        
-        if ((int)result == -1)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-
-    /* Topology Operations */
-    GeosGeometry *intersection(GeosGeometry *other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSIntersection(geom, otherGeom);
-    }
-
-    GeosGeometry *buffer(double width, int quadsegs)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSBuffer(geom, width, quadsegs);
-    }
-
-    GeosGeometry *convexHull()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSConvexHull(geom);
-    }
-
-    GeosGeometry *difference(GeosGeometry *other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSDifference(geom, otherGeom);
-    }
-
-    GeosGeometry *symDifference(GeosGeometry *other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSSymDifference(geom, otherGeom);
-    }
-
-    GeosGeometry *boundary()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSBoundary(geom);
-    }
-
-    GeosGeometry *geomUnion(GeosGeometry *other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSUnion(geom, otherGeom);
-    }
-    
-    GeosGeometry *pointOnSurface()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSPointOnSurface(geom);
-    }
-
-    GeosGeometry *getCentroid()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSGetCentroid(geom);
-    }
-
-    GeosGeometry *getEnvelope()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSEnvelope(geom);
-    }
-
-    char *relate(GeosGeometry *other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return GEOSRelate(geom, otherGeom);
-    }
-
-    /* TODO - expose GEOSPolygonize*/
-    GeosGeometry *lineMerge()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSLineMerge(geom);
-    }
-
-    GeosGeometry *simplify(double tolerance)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSSimplify(geom, tolerance);
-    }
-
-    GeosGeometry *topologyPreserveSimplify(double tolerance)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSTopologyPreserveSimplify(geom, tolerance);
-    }
-
-    /* Binary predicates - return 2 on exception, 1 on true, 0 on false */
-    bool relatePattern(const GeosGeometry* other, const char *pat)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSRelatePattern(geom, otherGeom, pat));
-    }
-
-    bool disjoint(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSDisjoint(geom, otherGeom));
-    }
-
-    bool touches(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSTouches(geom, otherGeom));
-    }
-
-    bool intersects(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSIntersects(geom, otherGeom));
-    }
-
-    bool crosses(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSCrosses(geom, otherGeom));
-    }
-
-    bool within(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSWithin(geom, otherGeom));
-    }
-
-    bool contains(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSContains(geom, otherGeom));
-    }
-
-    bool overlaps(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSOverlaps(geom, otherGeom));
-    }
-
-    bool equals(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSEquals(geom, otherGeom));
-    }
-
-    bool equalsExact(const GeosGeometry* other, double tolerance)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSEqualsExact(geom, otherGeom, tolerance));
-    }
-
-    /* Unary predicate - return 2 on exception, 1 on true, 0 on false */
-    bool isEmpty()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisEmpty(geom));
-    }
-
-    bool isValid()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisValid(geom));
-    }
-
-    bool isSimple()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisSimple(geom));
-    }
-
-    bool isRing()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisRing(geom));
-    }
-
-    bool hasZ()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSHasZ(geom));
-    }
-
-    /* Miscellaneous Functions.
-       Return 0 on exception, 1 otherwise */
-    double area()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        double result;
-
-        int code = GEOSArea(geom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-
-    double length()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        double result;
-
-        int code = GEOSLength(geom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-
-    double distance(const GeosGeometry* other)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        double result;
-
-        int code = GEOSDistance(geom, otherGeom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-}
-};
-
-class GeosPoint: public GeosGeometry
-{
-private:
-    GeosPoint();
-public:
-%extend
-{   
-    ~GeosPoint()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-    
-    const GeosCoordinateSequence* getCoordSeq()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-}
-};
-
-class GeosLineString: public GeosGeometry
-{
-public:
-%extend
-{   
-    ~GeosLineString()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-    
-    const GeosCoordinateSequence* getCoordSeq()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-}
-};
-
-class GeosLinearRing: public GeosGeometry
-{
-public:
-%extend
-{   
-    ~GeosLinearRing()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-    
-    const GeosCoordinateSequence* getCoordSeq()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-}
-};
-
-
-class GeosPolygon: public GeosGeometry
-{
-public:
-%extend
-{   
-    ~GeosPolygon()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-    
-    const GeosGeometry* getExteriorRing()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSGeom result = (const GEOSGeom) GEOSGetExteriorRing(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-
-    size_t getNumInteriorRings()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        size_t result = GEOSGetNumInteriorRings(geom);
-
-        if ((int)result == -1)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-
-    const GeosGeometry* getInteriorRingN(size_t n)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-
-        size_t size = GEOSGetNumInteriorRings(geom);
-
-        if (n < 0 || n >= size)
-            throw std::runtime_error("Index out of bounds");
-
-        const GEOSGeom result = (const GEOSGeom) GEOSGetInteriorRingN(geom, n);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-}
-};
-
-class GeosGeometryCollection: public GeosGeometry
-{
-public:
-%extend
-{   
-    ~GeosGeometryCollection()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-    
-    const GeosGeometry* getGeometryN(size_t n)
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSGeom result = (const GEOSGeom) GEOSGetGeometryN(geom, n);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-}
-};
-
-class GeosMultiPoint: public GeosGeometryCollection
-{
-public:
-%extend
-{   
-    ~GeosMultiPoint()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-}
-};
-
-class GeosMultiLineString: public GeosGeometryCollection
-{
-public:
-%extend
-{   
-    ~GeosMultiLineString()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-}
-};
-
-class GeosMultiLinearRing: public GeosGeometryCollection
-{
-public:
-%extend
-{   
-    ~GeosMultiLinearRing()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-}
-};
-
-class GeosMultiPolygon: public GeosGeometryCollection
-{
-public:
-%extend
-{   
-    ~GeosMultiPolygon()
-    {
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-}
-};
-
-
-// ==== Geometry Constructors ===========
-%newobject createPoint;
-%newobject createLineString;
-%newobject createLinearRing;
-%newobject createPolygon;
-
-%apply SWIGTYPE *DISOWN {GeosCoordinateSequence *s};
-%apply SWIGTYPE *DISOWN {GeosLinearRing *shell};
-
-%typemap(default) (GeosLinearRing **holes, size_t nholes)
-{
-    $1 = NULL;
-    $2 = 0;
-}
-
-%inline %{
-GeosGeometry *createPoint(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createPoint(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createLineString(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createLineString(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createLinearRing(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createLinearRing(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createPolygon(GeosLinearRing *shell, GeosLinearRing **holes, size_t nholes)
-{
-    GEOSGeom shellGeom = (GEOSGeom) shell;
-    GEOSGeom* holeGeoms = (GEOSGeom*) holes;
-    GEOSGeom geom = GEOSGeom_createPolygon(shellGeom, holeGeoms, nholes);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-%}
-
-/*
- * Second argument is an array of GEOSGeom objects.
- * The caller remains owner of the array, but pointed-to
- * objects become ownership of the returned GEOSGeom.
- 
-extern GEOSGeom GEOS_DLL GEOSGeom_createCollection(int type,
-	GEOSGeom *geoms, size_t ngeoms);
-*/
-
-%clear GeosCoordinateSequence *s;
-
-// === Prepared Geometry ===
-
-%{
-typedef void GeosPreparedGeometry;
-%}
-
-%rename (Prepared) GeosPreparedGeometry;
-class GeosPreparedGeometry
-{
-public:
-%extend
-{
-    GeosPreparedGeometry(const GeosGeometry *source)
-    {
-        const GEOSPreparedGeometry *prep = GEOSPrepare((const GEOSGeometry *)source);
-        if(prep == NULL)
-            throw std::runtime_error(message);
-        return (GeosPreparedGeometry *) prep;
-    }
-
-    ~GeosPreparedGeometry()
-    {
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        return GEOSPreparedGeom_destroy(prep);
-    }
-
-    bool contains (const GeosGeometry* other)
-    {
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedContains(prep, otherGeom));
-    }
-
-    bool containsProperly(const GeosGeometry* other)
-    {
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedContainsProperly(prep, otherGeom));
-    }
-
-    bool covers (const GeosGeometry* other)
-    {
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedCovers(prep, otherGeom));
-    }
-
-    bool intersects (const GeosGeometry* other)
-    {
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedIntersects(prep, otherGeom));
-    }
-}
-};
-
-// === STRtree ===
-
-%{
-typedef void GeosSTRtree;
-/* GeosIndexItem typedef'd here so it can be %typemap(typecheck)'d
-   as a native object by each language specially */
-typedef void *GeosIndexItem;
-typedef GEOSQueryCallback GeosQueryCallback;
-%}
-
-%rename (STRtree) GeosSTRtree;
-class GeosSTRtree
-{
-public:
-%extend
-{
-    %typemap(default) int nodeCapacity {
-     $1 = 10;
-    };
-    GeosSTRtree(int nodeCapacity)
-    {
-        GEOSSTRtree *tree = GEOSSTRtree_create(nodeCapacity);
-        if(tree == NULL)
-            throw std::runtime_error(message);
-        return (GeosSTRtree *) tree;
-    }
-
-    ~GeosSTRtree()
-    {
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        return GEOSSTRtree_destroy(tree);
-    }
-
-    void insert (const GeosGeometry* g, GeosIndexItem item)
-    {
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_insert(tree, geom, item);
-    }
-
-    void remove (const GeosGeometry* g, GeosIndexItem item)
-    {
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_remove(tree, geom, item);
-    }
-
-    void query (const GeosGeometry* g, GeosQueryCallback callback,
-                GeosIndexItem accumulator)
-    {
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_query(tree, geom, callback, accumulator);
-    }
-
-    void iterate (GeosQueryCallback callback, GeosIndexItem accumulator)
-    {
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        GEOSSTRtree_iterate(tree, callback, accumulator);
-    }
-}
-};
-
-
-// === Input/Output ===
-
-/* This typemap allows the scripting language to pass in buffers
-   to the geometry write methods. */
-%typemap(in) (const unsigned char* wkb, size_t size) (int alloc = 0)
-{
-    /* %typemap(in) (const unsigned char* wkb, size_t size) (int alloc = 0) */
-    if (SWIG_AsCharPtrAndSize($input, (char**)&$1, &$2, &alloc) != SWIG_OK)
-        SWIG_exception(SWIG_RuntimeError, "Expecting a string");
-    /* Don't want to include last null character! */
-    $2--;
-}
-
-/* These three type maps are for geomToWKB and geomToHEX.  We need
-to ignore the size input argument, then create a new string in the
-scripting language of the correct size, and then free the 
-provided string. */
-
-/* set the size parameter to a temporary variable. */
-%typemap(in, numinputs=0) size_t *size (size_t temp = 0)
-{
-	/* %typemap(in, numinputs=0) size_t *size (size_t temp = 0) */
-  	$1 = &temp;
-}
-
-/* Disable SWIG's normally generated code so we can replace it
-   with the argout typemap below. */
-%typemap(out) unsigned char* 
-{
-    /* %typemap(out) unsigned char* */
-}
-
-/* Create a new target string of the correct size. */
-%typemap(argout) size_t *size 
-{
-    /* %typemap(argout) size_t *size */
-    $result = SWIG_FromCharPtrAndSize((const char*)result, *$1);
-}
-
-/* Free the c-string returned  by the function. */
-%typemap(freearg) size_t *size
-{
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-}
-
-
-%newobject GeosWktReader::read;
-class GeosWktReader
-{
-public:
-%extend
-{
-    GeosWktReader()
-    {
-        return GEOSWKTReader_create();
-    }
-        
-    ~GeosWktReader()
-    {
-        GEOSWKTReader *reader = (GEOSWKTReader*) self;
-        GEOSWKTReader_destroy(reader);
-    }
-    
-    GeosGeometry* read(const char *wkt)
-    {
-        if(wkt == NULL)
-            throw std::runtime_error("Trying to create geometry from a NULL string");
-            
-        GEOSWKTReader *reader = (GEOSWKTReader*) self;
-        GEOSGeometry *geom = GEOSWKTReader_read(reader, wkt);
-
-        if(geom == NULL)
-            throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-}
-};
-
-class GeosWktWriter
-{
-public:
-%extend
-{
-    GeosWktWriter()
-    {
-        return GEOSWKTWriter_create();
-    }
-        
-    ~GeosWktWriter()
-    {
-        GEOSWKTWriter *writer = (GEOSWKTWriter*) self;
-        GEOSWKTWriter_destroy(writer);
-    }
-    
-    char* write(const GeosGeometry* g)
-    {
-        GEOSWKTWriter *writer = (GEOSWKTWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKTWriter_write(writer, geom);
-    }
-}
-};
-
-
-%newobject GeosWkbReader::read;
-%newobject GeosWkbReader::readHEX;
-class GeosWkbReader
-{
-public:
-%extend
-{
-    GeosWkbReader()
-    {
-        return GEOSWKBReader_create();
-    }
-        
-    ~GeosWkbReader()
-    {
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSWKBReader_destroy(reader);
-    }
-    
-    GeosGeometry* read(const unsigned char *wkb, size_t size)
-    {
-        if(wkb == NULL)
-          throw std::runtime_error("Trying to create geometry from a NULL string");
-         
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSGeometry *geom = GEOSWKBReader_read(reader, wkb, size);
-       
-        if(geom == NULL)
-          throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-    
-    GeosGeometry* readHEX(const unsigned char *wkb, size_t size)
-    {
-        if(wkb == NULL)
-          throw std::runtime_error("Trying to create geometry from a NULL string");
-         
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSGeometry *geom = GEOSWKBReader_readHEX(reader, wkb, size);
-       
-        if(geom == NULL)
-          throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-}
-};
-
-class GeosWkbWriter
-{
-public:
-%extend
-{
-    GeosWkbWriter()
-    {
-        return GEOSWKBWriter_create();
-    }
-        
-    ~GeosWkbWriter()
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSWKBWriter_destroy(writer);
-    }
-    
-    int getOutputDimension()
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getOutputDimension(writer);
-    }
-
-    void setOutputDimension(int newDimension)
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSWKBWriter_setOutputDimension(writer, newDimension);
-    }
-
-    int getByteOrder()
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getByteOrder(writer);
-    }
-
-    void setByteOrder(int newByteOrder)
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_setByteOrder(writer, newByteOrder);
-    }
-
-    bool getIncludeSRID()
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getIncludeSRID(writer);
-    }
-
-    void setIncludeSRID(bool newIncludeSRID)
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_setIncludeSRID(writer, newIncludeSRID);
-    }
-    
-    unsigned char* write(const GeosGeometry* g, size_t *size)
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKBWriter_write(writer, geom, size);
-    }
-    
-    unsigned char* writeHEX(const GeosGeometry* g, size_t *size)
-    {
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKBWriter_writeHEX(writer, geom, size);
-    }
-}
-};
diff --git a/swig/python/Makefile.am b/swig/python/Makefile.am
deleted file mode 100644
index 3db5b6d..0000000
--- a/swig/python/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# This file is part of project GEOS (http://trac.osgeo.org/geos/) 
-#
-SUBDIRS = \
-	tests
-
-EXTRA_DIST = \
-	python.i \
-	geos.pth 
-
-MAINTAINERCLEANFILES = geos.py geos_wrap.cxx
-
-if ENABLE_PYTHON
-
-BUILT_SOURCES = geos_wrap.cxx
-
-python_DATA = geos.pth
-pkgpython_PYTHON = geos.py
-pkgpyexec_LTLIBRARIES = _geos.la
-
-_geos_la_SOURCES = geos_wrap.cxx 
-
-# Only need to grab the capi header files
-_geos_la_CPPFLAGS = $(SWIG_PYTHON_CPPFLAGS) -I$(top_builddir)/capi -I$(top_srcdir)/include
-# Specify -module and -avoid-version so we can create a file called geos.dll/so which is what Python wants
-_geos_la_LDFLAGS = -no-undefined -module -avoid-version
-_geos_la_LIBADD = $(top_builddir)/capi/libgeos_c.la $(PYTHON_LDFLAGS)
-
-if ENABLE_SWIG
-
-geos_wrap.cxx: ../geos.i python.i
-	$(SWIG) $(SWIG_PYTHON_OPT) -o $@ $<
-
-else # ! ENABLE_SWIG
-
-geos_wrap.cxx: ../geos.i python.i
-	@echo "SWIG is disabled, can't build geos_wrap.cxx"
-	@false
-
-endif # ENABLE_SWIG
-
-test: 
-	$(PYTHON) tests/runtests.py -v
-
-endif # ENABLE_PYTHON
diff --git a/swig/python/README.txt b/swig/python/README.txt
deleted file mode 100644
index dc216b5..0000000
--- a/swig/python/README.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-Since version 3.0, the Python bindings are unsupported. Recommended options:
-
- 1. Become or recruit a new maintainer.
- 2. Use Shapely (http://pypi.python.org/pypi/Shapely) with Python versions 2.4 or greater.
- 3. Simply call functions from libgeos_c via Python ctypes. Examples abound in the GeoDjango or Shapely code.
- 
-See also http://trac.osgeo.org/geos/ticket/228
\ No newline at end of file
diff --git a/swig/python/geos.pth b/swig/python/geos.pth
deleted file mode 100644
index a41ec78..0000000
--- a/swig/python/geos.pth
+++ /dev/null
@@ -1,2 +0,0 @@
-# .pth file for the geos extensions
-geos
\ No newline at end of file
diff --git a/swig/python/geos.py b/swig/python/geos.py
deleted file mode 100644
index 9374a56..0000000
--- a/swig/python/geos.py
+++ /dev/null
@@ -1,399 +0,0 @@
-# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 2.0.10
-#
-# Do not make changes to this file unless you know what you are doing--modify
-# the SWIG interface file instead.
-
-
-
-from sys import version_info
-if version_info >= (2,6,0):
-    def swig_import_helper():
-        from os.path import dirname
-        import imp
-        fp = None
-        try:
-            fp, pathname, description = imp.find_module('_geos', [dirname(__file__)])
-        except ImportError:
-            import _geos
-            return _geos
-        if fp is not None:
-            try:
-                _mod = imp.load_module('_geos', fp, pathname, description)
-            finally:
-                fp.close()
-            return _mod
-    _geos = swig_import_helper()
-    del swig_import_helper
-else:
-    import _geos
-del version_info
-try:
-    _swig_property = property
-except NameError:
-    pass # Python < 2.2 doesn't have 'property'.
-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
-    if (name == "thisown"): return self.this.own(value)
-    if (name == "this"):
-        if type(value).__name__ == 'SwigPyObject':
-            self.__dict__[name] = value
-            return
-    method = class_type.__swig_setmethods__.get(name,None)
-    if method: return method(self,value)
-    if (not static):
-        self.__dict__[name] = value
-    else:
-        raise AttributeError("You cannot add attributes to %s" % self)
-
-def _swig_setattr(self,class_type,name,value):
-    return _swig_setattr_nondynamic(self,class_type,name,value,0)
-
-def _swig_getattr(self,class_type,name):
-    if (name == "thisown"): return self.this.own()
-    method = class_type.__swig_getmethods__.get(name,None)
-    if method: return method(self)
-    raise AttributeError(name)
-
-def _swig_repr(self):
-    try: strthis = "proxy of " + self.this.__repr__()
-    except: strthis = ""
-    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
-
-try:
-    _object = object
-    _newclass = 1
-except AttributeError:
-    class _object : pass
-    _newclass = 0
-
-
-def _swig_setattr_nondynamic_method(set):
-    def set_attr(self,name,value):
-        if (name == "thisown"): return self.this.own(value)
-        if hasattr(self,name) or (name == "this"):
-            set(self,name,value)
-        else:
-            raise AttributeError("You cannot add attributes to %s" % self)
-    return set_attr
-
-
-class SwigPyIterator(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_SwigPyIterator
-    __del__ = lambda self : None;
-    def value(self): return _geos.SwigPyIterator_value(self)
-    def incr(self, n=1): return _geos.SwigPyIterator_incr(self, n)
-    def decr(self, n=1): return _geos.SwigPyIterator_decr(self, n)
-    def distance(self, *args): return _geos.SwigPyIterator_distance(self, *args)
-    def equal(self, *args): return _geos.SwigPyIterator_equal(self, *args)
-    def copy(self): return _geos.SwigPyIterator_copy(self)
-    def next(self): return _geos.SwigPyIterator_next(self)
-    def __next__(self): return _geos.SwigPyIterator___next__(self)
-    def previous(self): return _geos.SwigPyIterator_previous(self)
-    def advance(self, *args): return _geos.SwigPyIterator_advance(self, *args)
-    def __eq__(self, *args): return _geos.SwigPyIterator___eq__(self, *args)
-    def __ne__(self, *args): return _geos.SwigPyIterator___ne__(self, *args)
-    def __iadd__(self, *args): return _geos.SwigPyIterator___iadd__(self, *args)
-    def __isub__(self, *args): return _geos.SwigPyIterator___isub__(self, *args)
-    def __add__(self, *args): return _geos.SwigPyIterator___add__(self, *args)
-    def __sub__(self, *args): return _geos.SwigPyIterator___sub__(self, *args)
-    def __iter__(self): return self
-SwigPyIterator_swigregister = _geos.SwigPyIterator_swigregister
-SwigPyIterator_swigregister(SwigPyIterator)
-
-GEOS_VERSION_MAJOR = _geos.GEOS_VERSION_MAJOR
-GEOS_VERSION_MINOR = _geos.GEOS_VERSION_MINOR
-GEOS_VERSION = _geos.GEOS_VERSION
-GEOS_JTS_PORT = _geos.GEOS_JTS_PORT
-GEOS_CAPI_VERSION_MAJOR = _geos.GEOS_CAPI_VERSION_MAJOR
-GEOS_CAPI_VERSION_MINOR = _geos.GEOS_CAPI_VERSION_MINOR
-GEOS_CAPI_VERSION_PATCH = _geos.GEOS_CAPI_VERSION_PATCH
-GEOS_CAPI_FIRST_INTERFACE = _geos.GEOS_CAPI_FIRST_INTERFACE
-GEOS_CAPI_LAST_INTERFACE = _geos.GEOS_CAPI_LAST_INTERFACE
-GEOS_CAPI_VERSION = _geos.GEOS_CAPI_VERSION
-GEOS_POINT = _geos.GEOS_POINT
-GEOS_LINESTRING = _geos.GEOS_LINESTRING
-GEOS_LINEARRING = _geos.GEOS_LINEARRING
-GEOS_POLYGON = _geos.GEOS_POLYGON
-GEOS_MULTIPOINT = _geos.GEOS_MULTIPOINT
-GEOS_MULTILINESTRING = _geos.GEOS_MULTILINESTRING
-GEOS_MULTIPOLYGON = _geos.GEOS_MULTIPOLYGON
-GEOS_GEOMETRYCOLLECTION = _geos.GEOS_GEOMETRYCOLLECTION
-GEOS_WKB_XDR = _geos.GEOS_WKB_XDR
-GEOS_WKB_NDR = _geos.GEOS_WKB_NDR
-
-def version():
-  return _geos.version()
-version = _geos.version
-class CoordinateSequence(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _geos.new_CoordinateSequence(*args)
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _geos.delete_CoordinateSequence
-    __del__ = lambda self : None;
-    def clone(self): return _geos.CoordinateSequence_clone(self)
-    def setX(self, *args): return _geos.CoordinateSequence_setX(self, *args)
-    def setY(self, *args): return _geos.CoordinateSequence_setY(self, *args)
-    def setZ(self, *args): return _geos.CoordinateSequence_setZ(self, *args)
-    def setOrdinate(self, *args): return _geos.CoordinateSequence_setOrdinate(self, *args)
-    def getX(self, *args): return _geos.CoordinateSequence_getX(self, *args)
-    def getY(self, *args): return _geos.CoordinateSequence_getY(self, *args)
-    def getZ(self, *args): return _geos.CoordinateSequence_getZ(self, *args)
-    def getOrdinate(self, *args): return _geos.CoordinateSequence_getOrdinate(self, *args)
-    def getSize(self): return _geos.CoordinateSequence_getSize(self)
-    def getDimensions(self): return _geos.CoordinateSequence_getDimensions(self)
-CoordinateSequence_swigregister = _geos.CoordinateSequence_swigregister
-CoordinateSequence_swigregister(CoordinateSequence)
-
-class Geometry(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_Geometry
-    __del__ = lambda self : None;
-    def clone(self): return _geos.Geometry_clone(self)
-    def geomType(self): return _geos.Geometry_geomType(self)
-    def typeId(self): return _geos.Geometry_typeId(self)
-    def normalize(self): return _geos.Geometry_normalize(self)
-    def getSRID(self): return _geos.Geometry_getSRID(self)
-    def setSRID(self, *args): return _geos.Geometry_setSRID(self, *args)
-    def getDimensions(self): return _geos.Geometry_getDimensions(self)
-    def getNumGeometries(self): return _geos.Geometry_getNumGeometries(self)
-    def intersection(self, *args): return _geos.Geometry_intersection(self, *args)
-    def buffer(self, *args): return _geos.Geometry_buffer(self, *args)
-    def convexHull(self): return _geos.Geometry_convexHull(self)
-    def difference(self, *args): return _geos.Geometry_difference(self, *args)
-    def symDifference(self, *args): return _geos.Geometry_symDifference(self, *args)
-    def boundary(self): return _geos.Geometry_boundary(self)
-    def union(self, *args): return _geos.Geometry_union(self, *args)
-    def pointOnSurface(self): return _geos.Geometry_pointOnSurface(self)
-    def getCentroid(self): return _geos.Geometry_getCentroid(self)
-    def getEnvelope(self): return _geos.Geometry_getEnvelope(self)
-    def relate(self, *args): return _geos.Geometry_relate(self, *args)
-    def lineMerge(self): return _geos.Geometry_lineMerge(self)
-    def simplify(self, *args): return _geos.Geometry_simplify(self, *args)
-    def topologyPreserveSimplify(self, *args): return _geos.Geometry_topologyPreserveSimplify(self, *args)
-    def relatePattern(self, *args): return _geos.Geometry_relatePattern(self, *args)
-    def disjoint(self, *args): return _geos.Geometry_disjoint(self, *args)
-    def touches(self, *args): return _geos.Geometry_touches(self, *args)
-    def intersects(self, *args): return _geos.Geometry_intersects(self, *args)
-    def crosses(self, *args): return _geos.Geometry_crosses(self, *args)
-    def within(self, *args): return _geos.Geometry_within(self, *args)
-    def contains(self, *args): return _geos.Geometry_contains(self, *args)
-    def overlaps(self, *args): return _geos.Geometry_overlaps(self, *args)
-    def equals(self, *args): return _geos.Geometry_equals(self, *args)
-    def equalsExact(self, *args): return _geos.Geometry_equalsExact(self, *args)
-    def isEmpty(self): return _geos.Geometry_isEmpty(self)
-    def isValid(self): return _geos.Geometry_isValid(self)
-    def isSimple(self): return _geos.Geometry_isSimple(self)
-    def isRing(self): return _geos.Geometry_isRing(self)
-    def hasZ(self): return _geos.Geometry_hasZ(self)
-    def area(self): return _geos.Geometry_area(self)
-    def length(self): return _geos.Geometry_length(self)
-    def distance(self, *args): return _geos.Geometry_distance(self, *args)
-Geometry_swigregister = _geos.Geometry_swigregister
-Geometry_swigregister(Geometry)
-
-class Point(Geometry):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_Point
-    __del__ = lambda self : None;
-    def getCoordSeq(self): return _geos.Point_getCoordSeq(self)
-Point_swigregister = _geos.Point_swigregister
-Point_swigregister(Point)
-
-class LineString(Geometry):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_LineString
-    __del__ = lambda self : None;
-    def getCoordSeq(self): return _geos.LineString_getCoordSeq(self)
-LineString_swigregister = _geos.LineString_swigregister
-LineString_swigregister(LineString)
-
-class LinearRing(Geometry):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_LinearRing
-    __del__ = lambda self : None;
-    def getCoordSeq(self): return _geos.LinearRing_getCoordSeq(self)
-LinearRing_swigregister = _geos.LinearRing_swigregister
-LinearRing_swigregister(LinearRing)
-
-class Polygon(Geometry):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_Polygon
-    __del__ = lambda self : None;
-    def getExteriorRing(self): return _geos.Polygon_getExteriorRing(self)
-    def getNumInteriorRings(self): return _geos.Polygon_getNumInteriorRings(self)
-    def getInteriorRingN(self, *args): return _geos.Polygon_getInteriorRingN(self, *args)
-Polygon_swigregister = _geos.Polygon_swigregister
-Polygon_swigregister(Polygon)
-
-class GeometryCollection(Geometry):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_GeometryCollection
-    __del__ = lambda self : None;
-    def getGeometryN(self, *args): return _geos.GeometryCollection_getGeometryN(self, *args)
-GeometryCollection_swigregister = _geos.GeometryCollection_swigregister
-GeometryCollection_swigregister(GeometryCollection)
-
-class MultiPoint(GeometryCollection):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_MultiPoint
-    __del__ = lambda self : None;
-MultiPoint_swigregister = _geos.MultiPoint_swigregister
-MultiPoint_swigregister(MultiPoint)
-
-class MultiLineString(GeometryCollection):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_MultiLineString
-    __del__ = lambda self : None;
-MultiLineString_swigregister = _geos.MultiLineString_swigregister
-MultiLineString_swigregister(MultiLineString)
-
-class MultiLinearRing(GeometryCollection):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_MultiLinearRing
-    __del__ = lambda self : None;
-MultiLinearRing_swigregister = _geos.MultiLinearRing_swigregister
-MultiLinearRing_swigregister(MultiLinearRing)
-
-class MultiPolygon(GeometryCollection):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
-    __repr__ = _swig_repr
-    __swig_destroy__ = _geos.delete_MultiPolygon
-    __del__ = lambda self : None;
-MultiPolygon_swigregister = _geos.MultiPolygon_swigregister
-MultiPolygon_swigregister(MultiPolygon)
-
-
-def createPoint(*args):
-  return _geos.createPoint(*args)
-createPoint = _geos.createPoint
-
-def createLineString(*args):
-  return _geos.createLineString(*args)
-createLineString = _geos.createLineString
-
-def createLinearRing(*args):
-  return _geos.createLinearRing(*args)
-createLinearRing = _geos.createLinearRing
-
-def createPolygon(*args):
-  return _geos.createPolygon(*args)
-createPolygon = _geos.createPolygon
-class Prepared(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _geos.new_Prepared(*args)
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _geos.delete_Prepared
-    __del__ = lambda self : None;
-    def contains(self, *args): return _geos.Prepared_contains(self, *args)
-    def containsProperly(self, *args): return _geos.Prepared_containsProperly(self, *args)
-    def covers(self, *args): return _geos.Prepared_covers(self, *args)
-    def intersects(self, *args): return _geos.Prepared_intersects(self, *args)
-Prepared_swigregister = _geos.Prepared_swigregister
-Prepared_swigregister(Prepared)
-
-class STRtree(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _geos.new_STRtree(*args)
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _geos.delete_STRtree
-    __del__ = lambda self : None;
-    def insert(self, *args): return _geos.STRtree_insert(self, *args)
-    def remove(self, *args): return _geos.STRtree_remove(self, *args)
-    def query(self, *args): return _geos.STRtree_query(self, *args)
-    def iterate(self, *args): return _geos.STRtree_iterate(self, *args)
-STRtree_swigregister = _geos.STRtree_swigregister
-STRtree_swigregister(STRtree)
-
-class WktReader(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    __repr__ = _swig_repr
-    def __init__(self): 
-        this = _geos.new_WktReader()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _geos.delete_WktReader
-    __del__ = lambda self : None;
-    def read(self, *args): return _geos.WktReader_read(self, *args)
-WktReader_swigregister = _geos.WktReader_swigregister
-WktReader_swigregister(WktReader)
-
-class WktWriter(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    __repr__ = _swig_repr
-    def __init__(self): 
-        this = _geos.new_WktWriter()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _geos.delete_WktWriter
-    __del__ = lambda self : None;
-    def write(self, *args): return _geos.WktWriter_write(self, *args)
-WktWriter_swigregister = _geos.WktWriter_swigregister
-WktWriter_swigregister(WktWriter)
-
-class WkbReader(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    __repr__ = _swig_repr
-    def __init__(self): 
-        this = _geos.new_WkbReader()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _geos.delete_WkbReader
-    __del__ = lambda self : None;
-    def read(self, *args): return _geos.WkbReader_read(self, *args)
-    def readHEX(self, *args): return _geos.WkbReader_readHEX(self, *args)
-WkbReader_swigregister = _geos.WkbReader_swigregister
-WkbReader_swigregister(WkbReader)
-
-class WkbWriter(object):
-    thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
-    __repr__ = _swig_repr
-    def __init__(self): 
-        this = _geos.new_WkbWriter()
-        try: self.this.append(this)
-        except: self.this = this
-    __swig_destroy__ = _geos.delete_WkbWriter
-    __del__ = lambda self : None;
-    def getOutputDimension(self): return _geos.WkbWriter_getOutputDimension(self)
-    def setOutputDimension(self, *args): return _geos.WkbWriter_setOutputDimension(self, *args)
-    def getByteOrder(self): return _geos.WkbWriter_getByteOrder(self)
-    def setByteOrder(self, *args): return _geos.WkbWriter_setByteOrder(self, *args)
-    def getIncludeSRID(self): return _geos.WkbWriter_getIncludeSRID(self)
-    def setIncludeSRID(self, *args): return _geos.WkbWriter_setIncludeSRID(self, *args)
-    def write(self, *args): return _geos.WkbWriter_write(self, *args)
-    def writeHEX(self, *args): return _geos.WkbWriter_writeHEX(self, *args)
-WkbWriter_swigregister = _geos.WkbWriter_swigregister
-WkbWriter_swigregister(WkbWriter)
-
-
-
diff --git a/swig/python/geos_wrap.cxx b/swig/python/geos_wrap.cxx
deleted file mode 100644
index c3cd1a0..0000000
--- a/swig/python/geos_wrap.cxx
+++ /dev/null
@@ -1,11112 +0,0 @@
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.10
- * 
- * This file is not intended to be easily readable and contains a number of 
- * coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG 
- * interface file instead. 
- * ----------------------------------------------------------------------------- */
-
-#define SWIGPYTHON
-#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
-
-
-#ifdef __cplusplus
-/* SwigValueWrapper is described in swig.swg */
-template<typename T> class SwigValueWrapper {
-  struct SwigMovePointer {
-    T *ptr;
-    SwigMovePointer(T *p) : ptr(p) { }
-    ~SwigMovePointer() { delete ptr; }
-    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
-  } pointer;
-  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
-  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
-public:
-  SwigValueWrapper() : pointer(0) { }
-  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
-  operator T&() const { return *pointer.ptr; }
-  T *operator&() { return pointer.ptr; }
-};
-
-template <typename T> T SwigValueInit() {
-  return T();
-}
-#endif
-
-/* -----------------------------------------------------------------------------
- *  This section contains generic SWIG labels for method/variable
- *  declarations/attributes, and other compiler dependent labels.
- * ----------------------------------------------------------------------------- */
-
-/* template workaround for compilers that cannot correctly implement the C++ standard */
-#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# elif defined(__HP_aCC)
-/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
-/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-#  define SWIGTEMPLATEDISAMBIGUATOR
-# endif
-#endif
-
-/* inline attribute */
-#ifndef SWIGINLINE
-# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
-#   define SWIGINLINE inline
-# else
-#   define SWIGINLINE
-# endif
-#endif
-
-/* attribute recognised by some compilers to avoid 'unused' warnings */
-#ifndef SWIGUNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
-#   else
-#     define SWIGUNUSED
-#   endif
-# elif defined(__ICC)
-#   define SWIGUNUSED __attribute__ ((__unused__)) 
-# else
-#   define SWIGUNUSED 
-# endif
-#endif
-
-#ifndef SWIG_MSC_UNSUPPRESS_4505
-# if defined(_MSC_VER)
-#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif 
-#endif
-
-#ifndef SWIGUNUSEDPARM
-# ifdef __cplusplus
-#   define SWIGUNUSEDPARM(p)
-# else
-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
-# endif
-#endif
-
-/* internal SWIG method */
-#ifndef SWIGINTERN
-# define SWIGINTERN static SWIGUNUSED
-#endif
-
-/* internal inline SWIG method */
-#ifndef SWIGINTERNINLINE
-# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
-#endif
-
-/* exporting methods */
-#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#  ifndef GCC_HASCLASSVISIBILITY
-#    define GCC_HASCLASSVISIBILITY
-#  endif
-#endif
-
-#ifndef SWIGEXPORT
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   if defined(STATIC_LINKED)
-#     define SWIGEXPORT
-#   else
-#     define SWIGEXPORT __declspec(dllexport)
-#   endif
-# else
-#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
-#     define SWIGEXPORT __attribute__ ((visibility("default")))
-#   else
-#     define SWIGEXPORT
-#   endif
-# endif
-#endif
-
-/* calling conventions for Windows */
-#ifndef SWIGSTDCALL
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   define SWIGSTDCALL __stdcall
-# else
-#   define SWIGSTDCALL
-# endif 
-#endif
-
-/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
-# define _CRT_SECURE_NO_DEPRECATE
-#endif
-
-/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
-#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
-# define _SCL_SECURE_NO_DEPRECATE
-#endif
-
-
-
-/* Python.h has to appear first */
-#include <Python.h>
-
-/* -----------------------------------------------------------------------------
- * swigrun.swg
- *
- * This file contains generic C API SWIG runtime support for pointer
- * type checking.
- * ----------------------------------------------------------------------------- */
-
-/* This should only be incremented when either the layout of swig_type_info changes,
-   or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "4"
-
-/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
-#ifdef SWIG_TYPE_TABLE
-# define SWIG_QUOTE_STRING(x) #x
-# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
-# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
-#else
-# define SWIG_TYPE_TABLE_NAME
-#endif
-
-/*
-  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
-  creating a static or dynamic library from the SWIG runtime code.
-  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
-  
-  But only do this if strictly necessary, ie, if you have problems
-  with your compiler or suchlike.
-*/
-
-#ifndef SWIGRUNTIME
-# define SWIGRUNTIME SWIGINTERN
-#endif
-
-#ifndef SWIGRUNTIMEINLINE
-# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
-#endif
-
-/*  Generic buffer size */
-#ifndef SWIG_BUFFER_SIZE
-# define SWIG_BUFFER_SIZE 1024
-#endif
-
-/* Flags for pointer conversions */
-#define SWIG_POINTER_DISOWN        0x1
-#define SWIG_CAST_NEW_MEMORY       0x2
-
-/* Flags for new pointer objects */
-#define SWIG_POINTER_OWN           0x1
-
-
-/* 
-   Flags/methods for returning states.
-   
-   The SWIG conversion methods, as ConvertPtr, return an integer 
-   that tells if the conversion was successful or not. And if not,
-   an error code can be returned (see swigerrors.swg for the codes).
-   
-   Use the following macros/flags to set or process the returning
-   states.
-   
-   In old versions of SWIG, code such as the following was usually written:
-
-     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
-       // success code
-     } else {
-       //fail code
-     }
-
-   Now you can be more explicit:
-
-    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
-    if (SWIG_IsOK(res)) {
-      // success code
-    } else {
-      // fail code
-    }
-
-   which is the same really, but now you can also do
-
-    Type *ptr;
-    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
-    if (SWIG_IsOK(res)) {
-      // success code
-      if (SWIG_IsNewObj(res) {
-        ...
-	delete *ptr;
-      } else {
-        ...
-      }
-    } else {
-      // fail code
-    }
-    
-   I.e., now SWIG_ConvertPtr can return new objects and you can
-   identify the case and take care of the deallocation. Of course that
-   also requires SWIG_ConvertPtr to return new result values, such as
-
-      int SWIG_ConvertPtr(obj, ptr,...) {         
-        if (<obj is ok>) {			       
-          if (<need new object>) {		       
-            *ptr = <ptr to new allocated object>; 
-            return SWIG_NEWOBJ;		       
-          } else {				       
-            *ptr = <ptr to old object>;	       
-            return SWIG_OLDOBJ;		       
-          } 				       
-        } else {				       
-          return SWIG_BADOBJ;		       
-        }					       
-      }
-
-   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
-   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
-   SWIG errors code.
-
-   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
-   allows to return the 'cast rank', for example, if you have this
-
-       int food(double)
-       int fooi(int);
-
-   and you call
- 
-      food(1)   // cast rank '1'  (1 -> 1.0)
-      fooi(1)   // cast rank '0'
-
-   just use the SWIG_AddCast()/SWIG_CheckState()
-*/
-
-#define SWIG_OK                    (0) 
-#define SWIG_ERROR                 (-1)
-#define SWIG_IsOK(r)               (r >= 0)
-#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
-
-/* The CastRankLimit says how many bits are used for the cast rank */
-#define SWIG_CASTRANKLIMIT         (1 << 8)
-/* The NewMask denotes the object was created (using new/malloc) */
-#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
-/* The TmpMask is for in/out typemaps that use temporal objects */
-#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
-/* Simple returning values */
-#define SWIG_BADOBJ                (SWIG_ERROR)
-#define SWIG_OLDOBJ                (SWIG_OK)
-#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
-#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
-/* Check, add and del mask methods */
-#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
-#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
-#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
-#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
-#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
-#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
-
-/* Cast-Rank Mode */
-#if defined(SWIG_CASTRANK_MODE)
-#  ifndef SWIG_TypeRank
-#    define SWIG_TypeRank             unsigned long
-#  endif
-#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
-#    define SWIG_MAXCASTRANK          (2)
-#  endif
-#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
-#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
-SWIGINTERNINLINE int SWIG_AddCast(int r) { 
-  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
-}
-SWIGINTERNINLINE int SWIG_CheckState(int r) { 
-  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
-}
-#else /* no cast-rank mode */
-#  define SWIG_AddCast(r) (r)
-#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
-#endif
-
-
-#include <string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void *(*swig_converter_func)(void *, int *);
-typedef struct swig_type_info *(*swig_dycast_func)(void **);
-
-/* Structure to store information on one type */
-typedef struct swig_type_info {
-  const char             *name;			/* mangled name of this type */
-  const char             *str;			/* human readable name of this type */
-  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
-  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
-  void                   *clientdata;		/* language specific type data */
-  int                    owndata;		/* flag if the structure owns the clientdata */
-} swig_type_info;
-
-/* Structure to store a type and conversion function used for casting */
-typedef struct swig_cast_info {
-  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
-  swig_converter_func     converter;		/* function to cast the void pointers */
-  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
-  struct swig_cast_info  *prev;			/* pointer to the previous cast */
-} swig_cast_info;
-
-/* Structure used to store module information
- * Each module generates one structure like this, and the runtime collects
- * all of these structures and stores them in a circularly linked list.*/
-typedef struct swig_module_info {
-  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
-  size_t                 size;		        /* Number of types in this module */
-  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
-  swig_type_info         **type_initial;	/* Array of initially generated type structures */
-  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
-  void                    *clientdata;		/* Language specific module data */
-} swig_module_info;
-
-/* 
-  Compare two type names skipping the space characters, therefore
-  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
-
-  Return 0 when the two name types are equivalent, as in
-  strncmp, but skipping ' '.
-*/
-SWIGRUNTIME int
-SWIG_TypeNameComp(const char *f1, const char *l1,
-		  const char *f2, const char *l2) {
-  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
-    while ((*f1 == ' ') && (f1 != l1)) ++f1;
-    while ((*f2 == ' ') && (f2 != l2)) ++f2;
-    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
-  }
-  return (int)((l1 - f1) - (l2 - f2));
-}
-
-/*
-  Check type equivalence in a name list like <name1>|<name2>|...
-  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
-*/
-SWIGRUNTIME int
-SWIG_TypeCmp(const char *nb, const char *tb) {
-  int equiv = 1;
-  const char* te = tb + strlen(tb);
-  const char* ne = nb;
-  while (equiv != 0 && *ne) {
-    for (nb = ne; *ne; ++ne) {
-      if (*ne == '|') break;
-    }
-    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
-    if (*ne) ++ne;
-  }
-  return equiv;
-}
-
-/*
-  Check type equivalence in a name list like <name1>|<name2>|...
-  Return 0 if not equal, 1 if equal
-*/
-SWIGRUNTIME int
-SWIG_TypeEquiv(const char *nb, const char *tb) {
-  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
-}
-
-/*
-  Check the typename
-*/
-SWIGRUNTIME swig_cast_info *
-SWIG_TypeCheck(const char *c, swig_type_info *ty) {
-  if (ty) {
-    swig_cast_info *iter = ty->cast;
-    while (iter) {
-      if (strcmp(iter->type->name, c) == 0) {
-        if (iter == ty->cast)
-          return iter;
-        /* Move iter to the top of the linked list */
-        iter->prev->next = iter->next;
-        if (iter->next)
-          iter->next->prev = iter->prev;
-        iter->next = ty->cast;
-        iter->prev = 0;
-        if (ty->cast) ty->cast->prev = iter;
-        ty->cast = iter;
-        return iter;
-      }
-      iter = iter->next;
-    }
-  }
-  return 0;
-}
-
-/* 
-  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
-*/
-SWIGRUNTIME swig_cast_info *
-SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
-  if (ty) {
-    swig_cast_info *iter = ty->cast;
-    while (iter) {
-      if (iter->type == from) {
-        if (iter == ty->cast)
-          return iter;
-        /* Move iter to the top of the linked list */
-        iter->prev->next = iter->next;
-        if (iter->next)
-          iter->next->prev = iter->prev;
-        iter->next = ty->cast;
-        iter->prev = 0;
-        if (ty->cast) ty->cast->prev = iter;
-        ty->cast = iter;
-        return iter;
-      }
-      iter = iter->next;
-    }
-  }
-  return 0;
-}
-
-/*
-  Cast a pointer up an inheritance hierarchy
-*/
-SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
-  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
-}
-
-/* 
-   Dynamic pointer casting. Down an inheritance hierarchy
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
-  swig_type_info *lastty = ty;
-  if (!ty || !ty->dcast) return ty;
-  while (ty && (ty->dcast)) {
-    ty = (*ty->dcast)(ptr);
-    if (ty) lastty = ty;
-  }
-  return lastty;
-}
-
-/*
-  Return the name associated with this type
-*/
-SWIGRUNTIMEINLINE const char *
-SWIG_TypeName(const swig_type_info *ty) {
-  return ty->name;
-}
-
-/*
-  Return the pretty name associated with this type,
-  that is an unmangled type name in a form presentable to the user.
-*/
-SWIGRUNTIME const char *
-SWIG_TypePrettyName(const swig_type_info *type) {
-  /* The "str" field contains the equivalent pretty names of the
-     type, separated by vertical-bar characters.  We choose
-     to print the last name, as it is often (?) the most
-     specific. */
-  if (!type) return NULL;
-  if (type->str != NULL) {
-    const char *last_name = type->str;
-    const char *s;
-    for (s = type->str; *s; s++)
-      if (*s == '|') last_name = s+1;
-    return last_name;
-  }
-  else
-    return type->name;
-}
-
-/* 
-   Set the clientdata field for a type
-*/
-SWIGRUNTIME void
-SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
-  swig_cast_info *cast = ti->cast;
-  /* if (ti->clientdata == clientdata) return; */
-  ti->clientdata = clientdata;
-  
-  while (cast) {
-    if (!cast->converter) {
-      swig_type_info *tc = cast->type;
-      if (!tc->clientdata) {
-	SWIG_TypeClientData(tc, clientdata);
-      }
-    }    
-    cast = cast->next;
-  }
-}
-SWIGRUNTIME void
-SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
-  SWIG_TypeClientData(ti, clientdata);
-  ti->owndata = 1;
-}
-  
-/*
-  Search for a swig_type_info structure only by mangled name
-  Search is a O(log #types)
-  
-  We start searching at module start, and finish searching when start == end.  
-  Note: if start == end at the beginning of the function, we go all the way around
-  the circular list.
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_MangledTypeQueryModule(swig_module_info *start, 
-                            swig_module_info *end, 
-		            const char *name) {
-  swig_module_info *iter = start;
-  do {
-    if (iter->size) {
-      register size_t l = 0;
-      register size_t r = iter->size - 1;
-      do {
-	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
-	register size_t i = (l + r) >> 1; 
-	const char *iname = iter->types[i]->name;
-	if (iname) {
-	  register int compare = strcmp(name, iname);
-	  if (compare == 0) {	    
-	    return iter->types[i];
-	  } else if (compare < 0) {
-	    if (i) {
-	      r = i - 1;
-	    } else {
-	      break;
-	    }
-	  } else if (compare > 0) {
-	    l = i + 1;
-	  }
-	} else {
-	  break; /* should never happen */
-	}
-      } while (l <= r);
-    }
-    iter = iter->next;
-  } while (iter != end);
-  return 0;
-}
-
-/*
-  Search for a swig_type_info structure for either a mangled name or a human readable name.
-  It first searches the mangled names of the types, which is a O(log #types)
-  If a type is not found it then searches the human readable names, which is O(#types).
-  
-  We start searching at module start, and finish searching when start == end.  
-  Note: if start == end at the beginning of the function, we go all the way around
-  the circular list.
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_TypeQueryModule(swig_module_info *start, 
-                     swig_module_info *end, 
-		     const char *name) {
-  /* STEP 1: Search the name field using binary search */
-  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
-  if (ret) {
-    return ret;
-  } else {
-    /* STEP 2: If the type hasn't been found, do a complete search
-       of the str field (the human readable name) */
-    swig_module_info *iter = start;
-    do {
-      register size_t i = 0;
-      for (; i < iter->size; ++i) {
-	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
-	  return iter->types[i];
-      }
-      iter = iter->next;
-    } while (iter != end);
-  }
-  
-  /* neither found a match */
-  return 0;
-}
-
-/* 
-   Pack binary data into a string
-*/
-SWIGRUNTIME char *
-SWIG_PackData(char *c, void *ptr, size_t sz) {
-  static const char hex[17] = "0123456789abcdef";
-  register const unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu =  u + sz;
-  for (; u != eu; ++u) {
-    register unsigned char uu = *u;
-    *(c++) = hex[(uu & 0xf0) >> 4];
-    *(c++) = hex[uu & 0xf];
-  }
-  return c;
-}
-
-/* 
-   Unpack binary data from a string
-*/
-SWIGRUNTIME const char *
-SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
-  register unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu = u + sz;
-  for (; u != eu; ++u) {
-    register char d = *(c++);
-    register unsigned char uu;
-    if ((d >= '0') && (d <= '9'))
-      uu = ((d - '0') << 4);
-    else if ((d >= 'a') && (d <= 'f'))
-      uu = ((d - ('a'-10)) << 4);
-    else 
-      return (char *) 0;
-    d = *(c++);
-    if ((d >= '0') && (d <= '9'))
-      uu |= (d - '0');
-    else if ((d >= 'a') && (d <= 'f'))
-      uu |= (d - ('a'-10));
-    else 
-      return (char *) 0;
-    *u = uu;
-  }
-  return c;
-}
-
-/* 
-   Pack 'void *' into a string buffer.
-*/
-SWIGRUNTIME char *
-SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
-  char *r = buff;
-  if ((2*sizeof(void *) + 2) > bsz) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r,&ptr,sizeof(void *));
-  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
-  strcpy(r,name);
-  return buff;
-}
-
-SWIGRUNTIME const char *
-SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
-  if (*c != '_') {
-    if (strcmp(c,"NULL") == 0) {
-      *ptr = (void *) 0;
-      return name;
-    } else {
-      return 0;
-    }
-  }
-  return SWIG_UnpackData(++c,ptr,sizeof(void *));
-}
-
-SWIGRUNTIME char *
-SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
-  char *r = buff;
-  size_t lname = (name ? strlen(name) : 0);
-  if ((2*sz + 2 + lname) > bsz) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r,ptr,sz);
-  if (lname) {
-    strncpy(r,name,lname+1);
-  } else {
-    *r = 0;
-  }
-  return buff;
-}
-
-SWIGRUNTIME const char *
-SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
-  if (*c != '_') {
-    if (strcmp(c,"NULL") == 0) {
-      memset(ptr,0,sz);
-      return name;
-    } else {
-      return 0;
-    }
-  }
-  return SWIG_UnpackData(++c,ptr,sz);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-/*  Errors in SWIG */
-#define  SWIG_UnknownError    	   -1 
-#define  SWIG_IOError        	   -2 
-#define  SWIG_RuntimeError   	   -3 
-#define  SWIG_IndexError     	   -4 
-#define  SWIG_TypeError      	   -5 
-#define  SWIG_DivisionByZero 	   -6 
-#define  SWIG_OverflowError  	   -7 
-#define  SWIG_SyntaxError    	   -8 
-#define  SWIG_ValueError     	   -9 
-#define  SWIG_SystemError    	   -10
-#define  SWIG_AttributeError 	   -11
-#define  SWIG_MemoryError    	   -12 
-#define  SWIG_NullReferenceError   -13
-
-
-
-/* Compatibility macros for Python 3 */
-#if PY_VERSION_HEX >= 0x03000000
-
-#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
-#define PyInt_Check(x) PyLong_Check(x)
-#define PyInt_AsLong(x) PyLong_AsLong(x)
-#define PyInt_FromLong(x) PyLong_FromLong(x)
-#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
-#define PyString_Check(name) PyBytes_Check(name)
-#define PyString_FromString(x) PyUnicode_FromString(x)
-#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
-#define PyString_AsString(str) PyBytes_AsString(str)
-#define PyString_Size(str) PyBytes_Size(str)	
-#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
-#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
-#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
-#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
-
-#endif
-
-#ifndef Py_TYPE
-#  define Py_TYPE(op) ((op)->ob_type)
-#endif
-
-/* SWIG APIs for compatibility of both Python 2 & 3 */
-
-#if PY_VERSION_HEX >= 0x03000000
-#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
-#else
-#  define SWIG_Python_str_FromFormat PyString_FromFormat
-#endif
-
-
-/* Warning: This function will allocate a new string in Python 3,
- * so please call SWIG_Python_str_DelForPy3(x) to free the space.
- */
-SWIGINTERN char*
-SWIG_Python_str_AsChar(PyObject *str)
-{
-#if PY_VERSION_HEX >= 0x03000000
-  char *cstr;
-  char *newstr;
-  Py_ssize_t len;
-  str = PyUnicode_AsUTF8String(str);
-  PyBytes_AsStringAndSize(str, &cstr, &len);
-  newstr = (char *) malloc(len+1);
-  memcpy(newstr, cstr, len+1);
-  Py_XDECREF(str);
-  return newstr;
-#else
-  return PyString_AsString(str);
-#endif
-}
-
-#if PY_VERSION_HEX >= 0x03000000
-#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
-#else
-#  define SWIG_Python_str_DelForPy3(x) 
-#endif
-
-
-SWIGINTERN PyObject*
-SWIG_Python_str_FromChar(const char *c)
-{
-#if PY_VERSION_HEX >= 0x03000000
-  return PyUnicode_FromString(c); 
-#else
-  return PyString_FromString(c);
-#endif
-}
-
-/* Add PyOS_snprintf for old Pythons */
-#if PY_VERSION_HEX < 0x02020000
-# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
-#  define PyOS_snprintf _snprintf
-# else
-#  define PyOS_snprintf snprintf
-# endif
-#endif
-
-/* A crude PyString_FromFormat implementation for old Pythons */
-#if PY_VERSION_HEX < 0x02020000
-
-#ifndef SWIG_PYBUFFER_SIZE
-# define SWIG_PYBUFFER_SIZE 1024
-#endif
-
-static PyObject *
-PyString_FromFormat(const char *fmt, ...) {
-  va_list ap;
-  char buf[SWIG_PYBUFFER_SIZE * 2];
-  int res;
-  va_start(ap, fmt);
-  res = vsnprintf(buf, sizeof(buf), fmt, ap);
-  va_end(ap);
-  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
-}
-#endif
-
-/* Add PyObject_Del for old Pythons */
-#if PY_VERSION_HEX < 0x01060000
-# define PyObject_Del(op) PyMem_DEL((op))
-#endif
-#ifndef PyObject_DEL
-# define PyObject_DEL PyObject_Del
-#endif
-
-/* A crude PyExc_StopIteration exception for old Pythons */
-#if PY_VERSION_HEX < 0x02020000
-# ifndef PyExc_StopIteration
-#  define PyExc_StopIteration PyExc_RuntimeError
-# endif
-# ifndef PyObject_GenericGetAttr
-#  define PyObject_GenericGetAttr 0
-# endif
-#endif
-
-/* Py_NotImplemented is defined in 2.1 and up. */
-#if PY_VERSION_HEX < 0x02010000
-# ifndef Py_NotImplemented
-#  define Py_NotImplemented PyExc_RuntimeError
-# endif
-#endif
-
-/* A crude PyString_AsStringAndSize implementation for old Pythons */
-#if PY_VERSION_HEX < 0x02010000
-# ifndef PyString_AsStringAndSize
-#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
-# endif
-#endif
-
-/* PySequence_Size for old Pythons */
-#if PY_VERSION_HEX < 0x02000000
-# ifndef PySequence_Size
-#  define PySequence_Size PySequence_Length
-# endif
-#endif
-
-/* PyBool_FromLong for old Pythons */
-#if PY_VERSION_HEX < 0x02030000
-static
-PyObject *PyBool_FromLong(long ok)
-{
-  PyObject *result = ok ? Py_True : Py_False;
-  Py_INCREF(result);
-  return result;
-}
-#endif
-
-/* Py_ssize_t for old Pythons */
-/* This code is as recommended by: */
-/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
-#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
-typedef int Py_ssize_t;
-# define PY_SSIZE_T_MAX INT_MAX
-# define PY_SSIZE_T_MIN INT_MIN
-typedef inquiry lenfunc;
-typedef intargfunc ssizeargfunc;
-typedef intintargfunc ssizessizeargfunc;
-typedef intobjargproc ssizeobjargproc;
-typedef intintobjargproc ssizessizeobjargproc;
-typedef getreadbufferproc readbufferproc;
-typedef getwritebufferproc writebufferproc;
-typedef getsegcountproc segcountproc;
-typedef getcharbufferproc charbufferproc;
-static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
-{
-  long result = 0;
-  PyObject *i = PyNumber_Int(x);
-  if (i) {
-    result = PyInt_AsLong(i);
-    Py_DECREF(i);
-  }
-  return result;
-}
-#endif
-
-#if PY_VERSION_HEX < 0x02050000
-#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
-#endif
-
-#if PY_VERSION_HEX < 0x02040000
-#define Py_VISIT(op)				\
-  do { 						\
-    if (op) {					\
-      int vret = visit((op), arg);		\
-      if (vret)					\
-        return vret;				\
-    }						\
-  } while (0)
-#endif
-
-#if PY_VERSION_HEX < 0x02030000
-typedef struct {
-  PyTypeObject type;
-  PyNumberMethods as_number;
-  PyMappingMethods as_mapping;
-  PySequenceMethods as_sequence;
-  PyBufferProcs as_buffer;
-  PyObject *name, *slots;
-} PyHeapTypeObject;
-#endif
-
-#if PY_VERSION_HEX < 0x02030000
-typedef destructor freefunc;
-#endif
-
-#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
-     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
-     (PY_MAJOR_VERSION > 3))
-# define SWIGPY_USE_CAPSULE
-# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
-#endif
-
-#if PY_VERSION_HEX < 0x03020000
-#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
-#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
-#endif
-
-/* -----------------------------------------------------------------------------
- * error manipulation
- * ----------------------------------------------------------------------------- */
-
-SWIGRUNTIME PyObject*
-SWIG_Python_ErrorType(int code) {
-  PyObject* type = 0;
-  switch(code) {
-  case SWIG_MemoryError:
-    type = PyExc_MemoryError;
-    break;
-  case SWIG_IOError:
-    type = PyExc_IOError;
-    break;
-  case SWIG_RuntimeError:
-    type = PyExc_RuntimeError;
-    break;
-  case SWIG_IndexError:
-    type = PyExc_IndexError;
-    break;
-  case SWIG_TypeError:
-    type = PyExc_TypeError;
-    break;
-  case SWIG_DivisionByZero:
-    type = PyExc_ZeroDivisionError;
-    break;
-  case SWIG_OverflowError:
-    type = PyExc_OverflowError;
-    break;
-  case SWIG_SyntaxError:
-    type = PyExc_SyntaxError;
-    break;
-  case SWIG_ValueError:
-    type = PyExc_ValueError;
-    break;
-  case SWIG_SystemError:
-    type = PyExc_SystemError;
-    break;
-  case SWIG_AttributeError:
-    type = PyExc_AttributeError;
-    break;
-  default:
-    type = PyExc_RuntimeError;
-  }
-  return type;
-}
-
-
-SWIGRUNTIME void
-SWIG_Python_AddErrorMsg(const char* mesg)
-{
-  PyObject *type = 0;
-  PyObject *value = 0;
-  PyObject *traceback = 0;
-
-  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
-  if (value) {
-    char *tmp;
-    PyObject *old_str = PyObject_Str(value);
-    PyErr_Clear();
-    Py_XINCREF(type);
-
-    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
-    SWIG_Python_str_DelForPy3(tmp);
-    Py_DECREF(old_str);
-    Py_DECREF(value);
-  } else {
-    PyErr_SetString(PyExc_RuntimeError, mesg);
-  }
-}
-
-#if defined(SWIG_PYTHON_NO_THREADS)
-#  if defined(SWIG_PYTHON_THREADS)
-#    undef SWIG_PYTHON_THREADS
-#  endif
-#endif
-#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
-#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
-#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
-#      define SWIG_PYTHON_USE_GIL
-#    endif
-#  endif
-#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
-#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
-#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
-#    endif
-#    ifdef __cplusplus /* C++ code */
-       class SWIG_Python_Thread_Block {
-         bool status;
-         PyGILState_STATE state;
-       public:
-         void end() { if (status) { PyGILState_Release(state); status = false;} }
-         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
-         ~SWIG_Python_Thread_Block() { end(); }
-       };
-       class SWIG_Python_Thread_Allow {
-         bool status;
-         PyThreadState *save;
-       public:
-         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
-         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
-         ~SWIG_Python_Thread_Allow() { end(); }
-       };
-#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
-#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
-#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
-#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
-#    else /* C code */
-#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
-#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
-#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
-#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
-#    endif
-#  else /* Old thread way, not implemented, user must provide it */
-#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
-#      define SWIG_PYTHON_INITIALIZE_THREADS
-#    endif
-#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
-#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
-#    endif
-#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
-#      define SWIG_PYTHON_THREAD_END_BLOCK
-#    endif
-#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
-#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
-#    endif
-#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
-#      define SWIG_PYTHON_THREAD_END_ALLOW
-#    endif
-#  endif
-#else /* No thread support */
-#  define SWIG_PYTHON_INITIALIZE_THREADS
-#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
-#  define SWIG_PYTHON_THREAD_END_BLOCK
-#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
-#  define SWIG_PYTHON_THREAD_END_ALLOW
-#endif
-
-/* -----------------------------------------------------------------------------
- * Python API portion that goes into the runtime
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* -----------------------------------------------------------------------------
- * Constant declarations
- * ----------------------------------------------------------------------------- */
-
-/* Constant Types */
-#define SWIG_PY_POINTER 4
-#define SWIG_PY_BINARY  5
-
-/* Constant information structure */
-typedef struct swig_const_info {
-  int type;
-  char *name;
-  long lvalue;
-  double dvalue;
-  void   *pvalue;
-  swig_type_info **ptype;
-} swig_const_info;
-
-
-/* -----------------------------------------------------------------------------
- * Wrapper of PyInstanceMethod_New() used in Python 3
- * It is exported to the generated module, used for -fastproxy
- * ----------------------------------------------------------------------------- */
-#if PY_VERSION_HEX >= 0x03000000
-SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
-{
-  return PyInstanceMethod_New(func);
-}
-#else
-SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
-{
-  return NULL;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-
-/* -----------------------------------------------------------------------------
- * pyrun.swg
- *
- * This file contains the runtime support for Python modules
- * and includes code for managing global variables and pointer
- * type checking.
- *
- * ----------------------------------------------------------------------------- */
-
-/* Common SWIG API */
-
-/* for raw pointers */
-#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
-#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
-#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
-
-#ifdef SWIGPYTHON_BUILTIN
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
-#else
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
-#endif
-
-#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
-
-#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
-#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
-#define swig_owntype                                    int
-
-/* for raw packed data */
-#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
-#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
-
-/* for class or struct pointers */
-#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
-#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
-
-/* for C or C++ function pointers */
-#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
-#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
-
-/* for C++ member pointers, ie, member methods */
-#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
-#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
-
-
-/* Runtime API */
-
-#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
-#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
-#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
-
-#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
-#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
-#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
-#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
-#define SWIG_fail                        		goto fail					   
-
-
-/* Runtime API implementation */
-
-/* Error manipulation */
-
-SWIGINTERN void 
-SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
-  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
-  PyErr_SetObject(errtype, obj);
-  Py_DECREF(obj);
-  SWIG_PYTHON_THREAD_END_BLOCK;
-}
-
-SWIGINTERN void 
-SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
-  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
-  PyErr_SetString(errtype, msg);
-  SWIG_PYTHON_THREAD_END_BLOCK;
-}
-
-#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
-
-/* Set a constant value */
-
-#if defined(SWIGPYTHON_BUILTIN)
-
-SWIGINTERN void
-SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
-  PyObject *s = PyString_InternFromString(key);
-  PyList_Append(seq, s);
-  Py_DECREF(s);
-}
-
-SWIGINTERN void
-SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
-#if PY_VERSION_HEX < 0x02030000
-  PyDict_SetItemString(d, (char *)name, obj);
-#else
-  PyDict_SetItemString(d, name, obj);
-#endif
-  Py_DECREF(obj);
-  if (public_interface)
-    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
-}
-
-#else
-
-SWIGINTERN void
-SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
-#if PY_VERSION_HEX < 0x02030000
-  PyDict_SetItemString(d, (char *)name, obj);
-#else
-  PyDict_SetItemString(d, name, obj);
-#endif
-  Py_DECREF(obj);                            
-}
-
-#endif
-
-/* Append a value to the result obj */
-
-SWIGINTERN PyObject*
-SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
-#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
-  if (!result) {
-    result = obj;
-  } else if (result == Py_None) {
-    Py_DECREF(result);
-    result = obj;
-  } else {
-    if (!PyList_Check(result)) {
-      PyObject *o2 = result;
-      result = PyList_New(1);
-      PyList_SetItem(result, 0, o2);
-    }
-    PyList_Append(result,obj);
-    Py_DECREF(obj);
-  }
-  return result;
-#else
-  PyObject*   o2;
-  PyObject*   o3;
-  if (!result) {
-    result = obj;
-  } else if (result == Py_None) {
-    Py_DECREF(result);
-    result = obj;
-  } else {
-    if (!PyTuple_Check(result)) {
-      o2 = result;
-      result = PyTuple_New(1);
-      PyTuple_SET_ITEM(result, 0, o2);
-    }
-    o3 = PyTuple_New(1);
-    PyTuple_SET_ITEM(o3, 0, obj);
-    o2 = result;
-    result = PySequence_Concat(o2, o3);
-    Py_DECREF(o2);
-    Py_DECREF(o3);
-  }
-  return result;
-#endif
-}
-
-/* Unpack the argument tuple */
-
-SWIGINTERN int
-SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
-{
-  if (!args) {
-    if (!min && !max) {
-      return 1;
-    } else {
-      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
-		   name, (min == max ? "" : "at least "), (int)min);
-      return 0;
-    }
-  }  
-  if (!PyTuple_Check(args)) {
-    if (min <= 1 && max >= 1) {
-      register int i;
-      objs[0] = args;
-      for (i = 1; i < max; ++i) {
-	objs[i] = 0;
-      }
-      return 2;
-    }
-    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
-    return 0;
-  } else {
-    register Py_ssize_t l = PyTuple_GET_SIZE(args);
-    if (l < min) {
-      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
-		   name, (min == max ? "" : "at least "), (int)min, (int)l);
-      return 0;
-    } else if (l > max) {
-      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
-		   name, (min == max ? "" : "at most "), (int)max, (int)l);
-      return 0;
-    } else {
-      register int i;
-      for (i = 0; i < l; ++i) {
-	objs[i] = PyTuple_GET_ITEM(args, i);
-      }
-      for (; l < max; ++l) {
-	objs[l] = 0;
-      }
-      return i + 1;
-    }    
-  }
-}
-
-/* A functor is a function object with one single object argument */
-#if PY_VERSION_HEX >= 0x02020000
-#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
-#else
-#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
-#endif
-
-/*
-  Helper for static pointer initialization for both C and C++ code, for example
-  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
-*/
-#ifdef __cplusplus
-#define SWIG_STATIC_POINTER(var)  var
-#else
-#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
-#endif
-
-/* -----------------------------------------------------------------------------
- * Pointer declarations
- * ----------------------------------------------------------------------------- */
-
-/* Flags for new pointer objects */
-#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
-#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
-
-#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
-
-#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
-#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*  How to access Py_None */
-#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#  ifndef SWIG_PYTHON_NO_BUILD_NONE
-#    ifndef SWIG_PYTHON_BUILD_NONE
-#      define SWIG_PYTHON_BUILD_NONE
-#    endif
-#  endif
-#endif
-
-#ifdef SWIG_PYTHON_BUILD_NONE
-#  ifdef Py_None
-#   undef Py_None
-#   define Py_None SWIG_Py_None()
-#  endif
-SWIGRUNTIMEINLINE PyObject * 
-_SWIG_Py_None(void)
-{
-  PyObject *none = Py_BuildValue((char*)"");
-  Py_DECREF(none);
-  return none;
-}
-SWIGRUNTIME PyObject * 
-SWIG_Py_None(void)
-{
-  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
-  return none;
-}
-#endif
-
-/* The python void return value */
-
-SWIGRUNTIMEINLINE PyObject * 
-SWIG_Py_Void(void)
-{
-  PyObject *none = Py_None;
-  Py_INCREF(none);
-  return none;
-}
-
-/* SwigPyClientData */
-
-typedef struct {
-  PyObject *klass;
-  PyObject *newraw;
-  PyObject *newargs;
-  PyObject *destroy;
-  int delargs;
-  int implicitconv;
-  PyTypeObject *pytype;
-} SwigPyClientData;
-
-SWIGRUNTIMEINLINE int 
-SWIG_Python_CheckImplicit(swig_type_info *ty)
-{
-  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
-  return data ? data->implicitconv : 0;
-}
-
-SWIGRUNTIMEINLINE PyObject *
-SWIG_Python_ExceptionType(swig_type_info *desc) {
-  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
-  PyObject *klass = data ? data->klass : 0;
-  return (klass ? klass : PyExc_RuntimeError);
-}
-
-
-SWIGRUNTIME SwigPyClientData * 
-SwigPyClientData_New(PyObject* obj)
-{
-  if (!obj) {
-    return 0;
-  } else {
-    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
-    /* the klass element */
-    data->klass = obj;
-    Py_INCREF(data->klass);
-    /* the newraw method and newargs arguments used to create a new raw instance */
-    if (PyClass_Check(obj)) {
-      data->newraw = 0;
-      data->newargs = obj;
-      Py_INCREF(obj);
-    } else {
-#if (PY_VERSION_HEX < 0x02020000)
-      data->newraw = 0;
-#else
-      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
-#endif
-      if (data->newraw) {
-	Py_INCREF(data->newraw);
-	data->newargs = PyTuple_New(1);
-	PyTuple_SetItem(data->newargs, 0, obj);
-      } else {
-	data->newargs = obj;
-      }
-      Py_INCREF(data->newargs);
-    }
-    /* the destroy method, aka as the C++ delete method */
-    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
-    if (PyErr_Occurred()) {
-      PyErr_Clear();
-      data->destroy = 0;
-    }
-    if (data->destroy) {
-      int flags;
-      Py_INCREF(data->destroy);
-      flags = PyCFunction_GET_FLAGS(data->destroy);
-#ifdef METH_O
-      data->delargs = !(flags & (METH_O));
-#else
-      data->delargs = 0;
-#endif
-    } else {
-      data->delargs = 0;
-    }
-    data->implicitconv = 0;
-    data->pytype = 0;
-    return data;
-  }
-}
-
-SWIGRUNTIME void 
-SwigPyClientData_Del(SwigPyClientData *data) {
-  Py_XDECREF(data->newraw);
-  Py_XDECREF(data->newargs);
-  Py_XDECREF(data->destroy);
-}
-
-/* =============== SwigPyObject =====================*/
-
-typedef struct {
-  PyObject_HEAD
-  void *ptr;
-  swig_type_info *ty;
-  int own;
-  PyObject *next;
-#ifdef SWIGPYTHON_BUILTIN
-  PyObject *dict;
-#endif
-} SwigPyObject;
-
-SWIGRUNTIME PyObject *
-SwigPyObject_long(SwigPyObject *v)
-{
-  return PyLong_FromVoidPtr(v->ptr);
-}
-
-SWIGRUNTIME PyObject *
-SwigPyObject_format(const char* fmt, SwigPyObject *v)
-{
-  PyObject *res = NULL;
-  PyObject *args = PyTuple_New(1);
-  if (args) {
-    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
-      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
-      if (ofmt) {
-#if PY_VERSION_HEX >= 0x03000000
-	res = PyUnicode_Format(ofmt,args);
-#else
-	res = PyString_Format(ofmt,args);
-#endif
-	Py_DECREF(ofmt);
-      }
-      Py_DECREF(args);
-    }
-  }
-  return res;
-}
-
-SWIGRUNTIME PyObject *
-SwigPyObject_oct(SwigPyObject *v)
-{
-  return SwigPyObject_format("%o",v);
-}
-
-SWIGRUNTIME PyObject *
-SwigPyObject_hex(SwigPyObject *v)
-{
-  return SwigPyObject_format("%x",v);
-}
-
-SWIGRUNTIME PyObject *
-#ifdef METH_NOARGS
-SwigPyObject_repr(SwigPyObject *v)
-#else
-SwigPyObject_repr(SwigPyObject *v, PyObject *args)
-#endif
-{
-  const char *name = SWIG_TypePrettyName(v->ty);
-  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
-  if (v->next) {
-# ifdef METH_NOARGS
-    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
-# else
-    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
-# endif
-# if PY_VERSION_HEX >= 0x03000000
-    PyObject *joined = PyUnicode_Concat(repr, nrep);
-    Py_DecRef(repr);
-    Py_DecRef(nrep);
-    repr = joined;
-# else
-    PyString_ConcatAndDel(&repr,nrep);
-# endif
-  }
-  return repr;  
-}
-
-SWIGRUNTIME int
-SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
-{
-  char *str;
-#ifdef METH_NOARGS
-  PyObject *repr = SwigPyObject_repr(v);
-#else
-  PyObject *repr = SwigPyObject_repr(v, NULL);
-#endif
-  if (repr) {
-    str = SWIG_Python_str_AsChar(repr); 
-    fputs(str, fp);
-    SWIG_Python_str_DelForPy3(str);
-    Py_DECREF(repr);
-    return 0; 
-  } else {
-    return 1; 
-  }
-}
-
-SWIGRUNTIME PyObject *
-SwigPyObject_str(SwigPyObject *v)
-{
-  char result[SWIG_BUFFER_SIZE];
-  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
-    SWIG_Python_str_FromChar(result) : 0;
-}
-
-SWIGRUNTIME int
-SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
-{
-  void *i = v->ptr;
-  void *j = w->ptr;
-  return (i < j) ? -1 : ((i > j) ? 1 : 0);
-}
-
-/* Added for Python 3.x, would it also be useful for Python 2.x? */
-SWIGRUNTIME PyObject*
-SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
-{
-  PyObject* res;
-  if( op != Py_EQ && op != Py_NE ) {
-    Py_INCREF(Py_NotImplemented);
-    return Py_NotImplemented;
-  }
-  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
-  return res;  
-}
-
-
-SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
-
-#ifdef SWIGPYTHON_BUILTIN
-static swig_type_info *SwigPyObject_stype = 0;
-SWIGRUNTIME PyTypeObject*
-SwigPyObject_type(void) {
-    SwigPyClientData *cd;
-    assert(SwigPyObject_stype);
-    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
-    assert(cd);
-    assert(cd->pytype);
-    return cd->pytype;
-}
-#else
-SWIGRUNTIME PyTypeObject*
-SwigPyObject_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
-  return type;
-}
-#endif
-
-SWIGRUNTIMEINLINE int
-SwigPyObject_Check(PyObject *op) {
-#ifdef SWIGPYTHON_BUILTIN
-  PyTypeObject *target_tp = SwigPyObject_type();
-  if (PyType_IsSubtype(op->ob_type, target_tp))
-    return 1;
-  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
-#else
-  return (Py_TYPE(op) == SwigPyObject_type())
-    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
-#endif
-}
-
-SWIGRUNTIME PyObject *
-SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
-
-SWIGRUNTIME void
-SwigPyObject_dealloc(PyObject *v)
-{
-  SwigPyObject *sobj = (SwigPyObject *) v;
-  PyObject *next = sobj->next;
-  if (sobj->own == SWIG_POINTER_OWN) {
-    swig_type_info *ty = sobj->ty;
-    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
-    PyObject *destroy = data ? data->destroy : 0;
-    if (destroy) {
-      /* destroy is always a VARARGS method */
-      PyObject *res;
-      if (data->delargs) {
-	/* we need to create a temporary object to carry the destroy operation */
-	PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
-	res = SWIG_Python_CallFunctor(destroy, tmp);
-	Py_DECREF(tmp);
-      } else {
-	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
-	PyObject *mself = PyCFunction_GET_SELF(destroy);
-	res = ((*meth)(mself, v));
-      }
-      Py_XDECREF(res);
-    } 
-#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
-    else {
-      const char *name = SWIG_TypePrettyName(ty);
-      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
-    }
-#endif
-  } 
-  Py_XDECREF(next);
-  PyObject_DEL(v);
-}
-
-SWIGRUNTIME PyObject* 
-SwigPyObject_append(PyObject* v, PyObject* next)
-{
-  SwigPyObject *sobj = (SwigPyObject *) v;
-#ifndef METH_O
-  PyObject *tmp = 0;
-  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
-  next = tmp;
-#endif
-  if (!SwigPyObject_Check(next)) {
-    return NULL;
-  }
-  sobj->next = next;
-  Py_INCREF(next);
-  return SWIG_Py_Void();
-}
-
-SWIGRUNTIME PyObject* 
-#ifdef METH_NOARGS
-SwigPyObject_next(PyObject* v)
-#else
-SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
-#endif
-{
-  SwigPyObject *sobj = (SwigPyObject *) v;
-  if (sobj->next) {    
-    Py_INCREF(sobj->next);
-    return sobj->next;
-  } else {
-    return SWIG_Py_Void();
-  }
-}
-
-SWIGINTERN PyObject*
-#ifdef METH_NOARGS
-SwigPyObject_disown(PyObject *v)
-#else
-SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
-#endif
-{
-  SwigPyObject *sobj = (SwigPyObject *)v;
-  sobj->own = 0;
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject*
-#ifdef METH_NOARGS
-SwigPyObject_acquire(PyObject *v)
-#else
-SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
-#endif
-{
-  SwigPyObject *sobj = (SwigPyObject *)v;
-  sobj->own = SWIG_POINTER_OWN;
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject*
-SwigPyObject_own(PyObject *v, PyObject *args)
-{
-  PyObject *val = 0;
-#if (PY_VERSION_HEX < 0x02020000)
-  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
-#elif (PY_VERSION_HEX < 0x02050000)
-  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
-#else
-  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
-#endif
-    {
-      return NULL;
-    } 
-  else
-    {
-      SwigPyObject *sobj = (SwigPyObject *)v;
-      PyObject *obj = PyBool_FromLong(sobj->own);
-      if (val) {
-#ifdef METH_NOARGS
-	if (PyObject_IsTrue(val)) {
-	  SwigPyObject_acquire(v);
-	} else {
-	  SwigPyObject_disown(v);
-	}
-#else
-	if (PyObject_IsTrue(val)) {
-	  SwigPyObject_acquire(v,args);
-	} else {
-	  SwigPyObject_disown(v,args);
-	}
-#endif
-      } 
-      return obj;
-    }
-}
-
-#ifdef METH_O
-static PyMethodDef
-swigobject_methods[] = {
-  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
-  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"acquires ownership of the pointer"},
-  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
-  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
-  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
-  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
-  {0, 0, 0, 0}  
-};
-#else
-static PyMethodDef
-swigobject_methods[] = {
-  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
-  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
-  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
-  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
-  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
-  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
-  {0, 0, 0, 0}  
-};
-#endif
-
-#if PY_VERSION_HEX < 0x02020000
-SWIGINTERN PyObject *
-SwigPyObject_getattr(SwigPyObject *sobj,char *name)
-{
-  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
-}
-#endif
-
-SWIGRUNTIME PyTypeObject*
-SwigPyObject_TypeOnce(void) {
-  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
-
-  static PyNumberMethods SwigPyObject_as_number = {
-    (binaryfunc)0, /*nb_add*/
-    (binaryfunc)0, /*nb_subtract*/
-    (binaryfunc)0, /*nb_multiply*/
-    /* nb_divide removed in Python 3 */
-#if PY_VERSION_HEX < 0x03000000
-    (binaryfunc)0, /*nb_divide*/
-#endif
-    (binaryfunc)0, /*nb_remainder*/
-    (binaryfunc)0, /*nb_divmod*/
-    (ternaryfunc)0,/*nb_power*/
-    (unaryfunc)0,  /*nb_negative*/
-    (unaryfunc)0,  /*nb_positive*/
-    (unaryfunc)0,  /*nb_absolute*/
-    (inquiry)0,    /*nb_nonzero*/
-    0,		   /*nb_invert*/
-    0,		   /*nb_lshift*/
-    0,		   /*nb_rshift*/
-    0,		   /*nb_and*/
-    0,		   /*nb_xor*/
-    0,		   /*nb_or*/
-#if PY_VERSION_HEX < 0x03000000
-    0,   /*nb_coerce*/
-#endif
-    (unaryfunc)SwigPyObject_long, /*nb_int*/
-#if PY_VERSION_HEX < 0x03000000
-    (unaryfunc)SwigPyObject_long, /*nb_long*/
-#else
-    0, /*nb_reserved*/
-#endif
-    (unaryfunc)0,                 /*nb_float*/
-#if PY_VERSION_HEX < 0x03000000
-    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
-    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
-#endif
-#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
-#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
-#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
-    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
-#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
-    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
-#endif
-  };
-
-  static PyTypeObject swigpyobject_type;
-  static int type_init = 0;
-  if (!type_init) {
-    const PyTypeObject tmp = {
-      /* PyObject header changed in Python 3 */
-#if PY_VERSION_HEX >= 0x03000000
-      PyVarObject_HEAD_INIT(NULL, 0)
-#else
-      PyObject_HEAD_INIT(NULL)
-      0,                                    /* ob_size */
-#endif
-      (char *)"SwigPyObject",               /* tp_name */
-      sizeof(SwigPyObject),                 /* tp_basicsize */
-      0,                                    /* tp_itemsize */
-      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
-      (printfunc)SwigPyObject_print,        /* tp_print */
-#if PY_VERSION_HEX < 0x02020000
-      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
-#else
-      (getattrfunc)0,                       /* tp_getattr */
-#endif
-      (setattrfunc)0,                       /* tp_setattr */
-#if PY_VERSION_HEX >= 0x03000000
-    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
-#else
-      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
-#endif
-      (reprfunc)SwigPyObject_repr,          /* tp_repr */
-      &SwigPyObject_as_number,              /* tp_as_number */
-      0,                                    /* tp_as_sequence */
-      0,                                    /* tp_as_mapping */
-      (hashfunc)0,                          /* tp_hash */
-      (ternaryfunc)0,                       /* tp_call */
-      (reprfunc)SwigPyObject_str,           /* tp_str */
-      PyObject_GenericGetAttr,              /* tp_getattro */
-      0,                                    /* tp_setattro */
-      0,                                    /* tp_as_buffer */
-      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
-      swigobject_doc,                       /* tp_doc */
-      0,                                    /* tp_traverse */
-      0,                                    /* tp_clear */
-      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
-      0,                                    /* tp_weaklistoffset */
-#if PY_VERSION_HEX >= 0x02020000
-      0,                                    /* tp_iter */
-      0,                                    /* tp_iternext */
-      swigobject_methods,                   /* tp_methods */
-      0,                                    /* tp_members */
-      0,                                    /* tp_getset */
-      0,                                    /* tp_base */
-      0,                                    /* tp_dict */
-      0,                                    /* tp_descr_get */
-      0,                                    /* tp_descr_set */
-      0,                                    /* tp_dictoffset */
-      0,                                    /* tp_init */
-      0,                                    /* tp_alloc */
-      0,                                    /* tp_new */
-      0,                                    /* tp_free */
-      0,                                    /* tp_is_gc */
-      0,                                    /* tp_bases */
-      0,                                    /* tp_mro */
-      0,                                    /* tp_cache */
-      0,                                    /* tp_subclasses */
-      0,                                    /* tp_weaklist */
-#endif
-#if PY_VERSION_HEX >= 0x02030000
-      0,                                    /* tp_del */
-#endif
-#if PY_VERSION_HEX >= 0x02060000
-      0,                                    /* tp_version */
-#endif
-#ifdef COUNT_ALLOCS
-      0,0,0,0                               /* tp_alloc -> tp_next */
-#endif
-    };
-    swigpyobject_type = tmp;
-    type_init = 1;
-#if PY_VERSION_HEX < 0x02020000
-    swigpyobject_type.ob_type = &PyType_Type;
-#else
-    if (PyType_Ready(&swigpyobject_type) < 0)
-      return NULL;
-#endif
-  }
-  return &swigpyobject_type;
-}
-
-SWIGRUNTIME PyObject *
-SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
-{
-  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
-  if (sobj) {
-    sobj->ptr  = ptr;
-    sobj->ty   = ty;
-    sobj->own  = own;
-    sobj->next = 0;
-  }
-  return (PyObject *)sobj;
-}
-
-/* -----------------------------------------------------------------------------
- * Implements a simple Swig Packed type, and use it instead of string
- * ----------------------------------------------------------------------------- */
-
-typedef struct {
-  PyObject_HEAD
-  void *pack;
-  swig_type_info *ty;
-  size_t size;
-} SwigPyPacked;
-
-SWIGRUNTIME int
-SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
-{
-  char result[SWIG_BUFFER_SIZE];
-  fputs("<Swig Packed ", fp); 
-  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
-    fputs("at ", fp); 
-    fputs(result, fp); 
-  }
-  fputs(v->ty->name,fp); 
-  fputs(">", fp);
-  return 0; 
-}
-  
-SWIGRUNTIME PyObject *
-SwigPyPacked_repr(SwigPyPacked *v)
-{
-  char result[SWIG_BUFFER_SIZE];
-  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
-    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
-  } else {
-    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
-  }  
-}
-
-SWIGRUNTIME PyObject *
-SwigPyPacked_str(SwigPyPacked *v)
-{
-  char result[SWIG_BUFFER_SIZE];
-  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
-    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
-  } else {
-    return SWIG_Python_str_FromChar(v->ty->name);
-  }  
-}
-
-SWIGRUNTIME int
-SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
-{
-  size_t i = v->size;
-  size_t j = w->size;
-  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
-  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
-}
-
-SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
-
-SWIGRUNTIME PyTypeObject*
-SwigPyPacked_type(void) {
-  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
-  return type;
-}
-
-SWIGRUNTIMEINLINE int
-SwigPyPacked_Check(PyObject *op) {
-  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
-    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
-}
-
-SWIGRUNTIME void
-SwigPyPacked_dealloc(PyObject *v)
-{
-  if (SwigPyPacked_Check(v)) {
-    SwigPyPacked *sobj = (SwigPyPacked *) v;
-    free(sobj->pack);
-  }
-  PyObject_DEL(v);
-}
-
-SWIGRUNTIME PyTypeObject*
-SwigPyPacked_TypeOnce(void) {
-  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
-  static PyTypeObject swigpypacked_type;
-  static int type_init = 0;
-  if (!type_init) {
-    const PyTypeObject tmp = {
-      /* PyObject header changed in Python 3 */
-#if PY_VERSION_HEX>=0x03000000
-      PyVarObject_HEAD_INIT(NULL, 0)
-#else
-      PyObject_HEAD_INIT(NULL)
-      0,                                    /* ob_size */
-#endif
-      (char *)"SwigPyPacked",               /* tp_name */
-      sizeof(SwigPyPacked),                 /* tp_basicsize */
-      0,                                    /* tp_itemsize */
-      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
-      (printfunc)SwigPyPacked_print,        /* tp_print */
-      (getattrfunc)0,                       /* tp_getattr */
-      (setattrfunc)0,                       /* tp_setattr */
-#if PY_VERSION_HEX>=0x03000000
-      0, /* tp_reserved in 3.0.1 */
-#else
-      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
-#endif
-      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
-      0,                                    /* tp_as_number */
-      0,                                    /* tp_as_sequence */
-      0,                                    /* tp_as_mapping */
-      (hashfunc)0,                          /* tp_hash */
-      (ternaryfunc)0,                       /* tp_call */
-      (reprfunc)SwigPyPacked_str,           /* tp_str */
-      PyObject_GenericGetAttr,              /* tp_getattro */
-      0,                                    /* tp_setattro */
-      0,                                    /* tp_as_buffer */
-      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
-      swigpacked_doc,                       /* tp_doc */
-      0,                                    /* tp_traverse */
-      0,                                    /* tp_clear */
-      0,                                    /* tp_richcompare */
-      0,                                    /* tp_weaklistoffset */
-#if PY_VERSION_HEX >= 0x02020000
-      0,                                    /* tp_iter */
-      0,                                    /* tp_iternext */
-      0,                                    /* tp_methods */
-      0,                                    /* tp_members */
-      0,                                    /* tp_getset */
-      0,                                    /* tp_base */
-      0,                                    /* tp_dict */
-      0,                                    /* tp_descr_get */
-      0,                                    /* tp_descr_set */
-      0,                                    /* tp_dictoffset */
-      0,                                    /* tp_init */
-      0,                                    /* tp_alloc */
-      0,                                    /* tp_new */
-      0,                                    /* tp_free */
-      0,                                    /* tp_is_gc */
-      0,                                    /* tp_bases */
-      0,                                    /* tp_mro */
-      0,                                    /* tp_cache */
-      0,                                    /* tp_subclasses */
-      0,                                    /* tp_weaklist */
-#endif
-#if PY_VERSION_HEX >= 0x02030000
-      0,                                    /* tp_del */
-#endif
-#if PY_VERSION_HEX >= 0x02060000
-      0,                                    /* tp_version */
-#endif
-#ifdef COUNT_ALLOCS
-      0,0,0,0                               /* tp_alloc -> tp_next */
-#endif
-    };
-    swigpypacked_type = tmp;
-    type_init = 1;
-#if PY_VERSION_HEX < 0x02020000
-    swigpypacked_type.ob_type = &PyType_Type;
-#else
-    if (PyType_Ready(&swigpypacked_type) < 0)
-      return NULL;
-#endif
-  }
-  return &swigpypacked_type;
-}
-
-SWIGRUNTIME PyObject *
-SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
-{
-  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
-  if (sobj) {
-    void *pack = malloc(size);
-    if (pack) {
-      memcpy(pack, ptr, size);
-      sobj->pack = pack;
-      sobj->ty   = ty;
-      sobj->size = size;
-    } else {
-      PyObject_DEL((PyObject *) sobj);
-      sobj = 0;
-    }
-  }
-  return (PyObject *) sobj;
-}
-
-SWIGRUNTIME swig_type_info *
-SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
-{
-  if (SwigPyPacked_Check(obj)) {
-    SwigPyPacked *sobj = (SwigPyPacked *)obj;
-    if (sobj->size != size) return 0;
-    memcpy(ptr, sobj->pack, size);
-    return sobj->ty;
-  } else {
-    return 0;
-  }
-}
-
-/* -----------------------------------------------------------------------------
- * pointers/data manipulation
- * ----------------------------------------------------------------------------- */
-
-SWIGRUNTIMEINLINE PyObject *
-_SWIG_This(void)
-{
-    return SWIG_Python_str_FromChar("this");
-}
-
-static PyObject *swig_this = NULL;
-
-SWIGRUNTIME PyObject *
-SWIG_This(void)
-{
-  if (swig_this == NULL)
-    swig_this = _SWIG_This();
-  return swig_this;
-}
-
-/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
-
-/* TODO: I don't know how to implement the fast getset in Python 3 right now */
-#if PY_VERSION_HEX>=0x03000000
-#define SWIG_PYTHON_SLOW_GETSET_THIS 
-#endif
-
-SWIGRUNTIME SwigPyObject *
-SWIG_Python_GetSwigThis(PyObject *pyobj) 
-{
-  PyObject *obj;
-
-  if (SwigPyObject_Check(pyobj))
-    return (SwigPyObject *) pyobj;
-
-#ifdef SWIGPYTHON_BUILTIN
-  (void)obj;
-# ifdef PyWeakref_CheckProxy
-  if (PyWeakref_CheckProxy(pyobj)) {
-    pyobj = PyWeakref_GET_OBJECT(pyobj);
-    if (pyobj && SwigPyObject_Check(pyobj))
-      return (SwigPyObject*) pyobj;
-  }
-# endif
-  return NULL;
-#else
-
-  obj = 0;
-
-#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
-  if (PyInstance_Check(pyobj)) {
-    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
-  } else {
-    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
-    if (dictptr != NULL) {
-      PyObject *dict = *dictptr;
-      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
-    } else {
-#ifdef PyWeakref_CheckProxy
-      if (PyWeakref_CheckProxy(pyobj)) {
-	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
-	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
-      }
-#endif
-      obj = PyObject_GetAttr(pyobj,SWIG_This());
-      if (obj) {
-	Py_DECREF(obj);
-      } else {
-	if (PyErr_Occurred()) PyErr_Clear();
-	return 0;
-      }
-    }
-  }
-#else
-  obj = PyObject_GetAttr(pyobj,SWIG_This());
-  if (obj) {
-    Py_DECREF(obj);
-  } else {
-    if (PyErr_Occurred()) PyErr_Clear();
-    return 0;
-  }
-#endif
-  if (obj && !SwigPyObject_Check(obj)) {
-    /* a PyObject is called 'this', try to get the 'real this'
-       SwigPyObject from it */ 
-    return SWIG_Python_GetSwigThis(obj);
-  }
-  return (SwigPyObject *)obj;
-#endif
-}
-
-/* Acquire a pointer value */
-
-SWIGRUNTIME int
-SWIG_Python_AcquirePtr(PyObject *obj, int own) {
-  if (own == SWIG_POINTER_OWN) {
-    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
-    if (sobj) {
-      int oldown = sobj->own;
-      sobj->own = own;
-      return oldown;
-    }
-  }
-  return 0;
-}
-
-/* Convert a pointer value */
-
-SWIGRUNTIME int
-SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
-  int res;
-  SwigPyObject *sobj;
-
-  if (!obj)
-    return SWIG_ERROR;
-  if (obj == Py_None) {
-    if (ptr)
-      *ptr = 0;
-    return SWIG_OK;
-  }
-
-  res = SWIG_ERROR;
-
-  sobj = SWIG_Python_GetSwigThis(obj);
-  if (own)
-    *own = 0;
-  while (sobj) {
-    void *vptr = sobj->ptr;
-    if (ty) {
-      swig_type_info *to = sobj->ty;
-      if (to == ty) {
-        /* no type cast needed */
-        if (ptr) *ptr = vptr;
-        break;
-      } else {
-        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
-        if (!tc) {
-          sobj = (SwigPyObject *)sobj->next;
-        } else {
-          if (ptr) {
-            int newmemory = 0;
-            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
-            if (newmemory == SWIG_CAST_NEW_MEMORY) {
-              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
-              if (own)
-                *own = *own | SWIG_CAST_NEW_MEMORY;
-            }
-          }
-          break;
-        }
-      }
-    } else {
-      if (ptr) *ptr = vptr;
-      break;
-    }
-  }
-  if (sobj) {
-    if (own)
-      *own = *own | sobj->own;
-    if (flags & SWIG_POINTER_DISOWN) {
-      sobj->own = 0;
-    }
-    res = SWIG_OK;
-  } else {
-    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
-      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
-      if (data && !data->implicitconv) {
-        PyObject *klass = data->klass;
-        if (klass) {
-          PyObject *impconv;
-          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
-          impconv = SWIG_Python_CallFunctor(klass, obj);
-          data->implicitconv = 0;
-          if (PyErr_Occurred()) {
-            PyErr_Clear();
-            impconv = 0;
-          }
-          if (impconv) {
-            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
-            if (iobj) {
-              void *vptr;
-              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
-              if (SWIG_IsOK(res)) {
-                if (ptr) {
-                  *ptr = vptr;
-                  /* transfer the ownership to 'ptr' */
-                  iobj->own = 0;
-                  res = SWIG_AddCast(res);
-                  res = SWIG_AddNewMask(res);
-                } else {
-                  res = SWIG_AddCast(res);		    
-                }
-              }
-            }
-            Py_DECREF(impconv);
-          }
-        }
-      }
-    }
-  }
-  return res;
-}
-
-/* Convert a function ptr value */
-
-SWIGRUNTIME int
-SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
-  if (!PyCFunction_Check(obj)) {
-    return SWIG_ConvertPtr(obj, ptr, ty, 0);
-  } else {
-    void *vptr = 0;
-    
-    /* here we get the method pointer for callbacks */
-    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
-    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
-    if (desc)
-      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
-    if (!desc) 
-      return SWIG_ERROR;
-    if (ty) {
-      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
-      if (tc) {
-        int newmemory = 0;
-        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
-        assert(!newmemory); /* newmemory handling not yet implemented */
-      } else {
-        return SWIG_ERROR;
-      }
-    } else {
-      *ptr = vptr;
-    }
-    return SWIG_OK;
-  }
-}
-
-/* Convert a packed value value */
-
-SWIGRUNTIME int
-SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
-  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
-  if (!to) return SWIG_ERROR;
-  if (ty) {
-    if (to != ty) {
-      /* check type cast? */
-      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
-      if (!tc) return SWIG_ERROR;
-    }
-  }
-  return SWIG_OK;
-}  
-
-/* -----------------------------------------------------------------------------
- * Create a new pointer object
- * ----------------------------------------------------------------------------- */
-
-/*
-  Create a new instance object, without calling __init__, and set the
-  'this' attribute.
-*/
-
-SWIGRUNTIME PyObject* 
-SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
-{
-#if (PY_VERSION_HEX >= 0x02020000)
-  PyObject *inst = 0;
-  PyObject *newraw = data->newraw;
-  if (newraw) {
-    inst = PyObject_Call(newraw, data->newargs, NULL);
-    if (inst) {
-#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
-      PyObject **dictptr = _PyObject_GetDictPtr(inst);
-      if (dictptr != NULL) {
-	PyObject *dict = *dictptr;
-	if (dict == NULL) {
-	  dict = PyDict_New();
-	  *dictptr = dict;
-	  PyDict_SetItem(dict, SWIG_This(), swig_this);
-	}
-      }
-#else
-      PyObject *key = SWIG_This();
-      PyObject_SetAttr(inst, key, swig_this);
-#endif
-    }
-  } else {
-#if PY_VERSION_HEX >= 0x03000000
-    inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
-    if (inst) {
-      PyObject_SetAttr(inst, SWIG_This(), swig_this);
-      Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
-    }
-#else
-    PyObject *dict = PyDict_New();
-    if (dict) {
-      PyDict_SetItem(dict, SWIG_This(), swig_this);
-      inst = PyInstance_NewRaw(data->newargs, dict);
-      Py_DECREF(dict);
-    }
-#endif
-  }
-  return inst;
-#else
-#if (PY_VERSION_HEX >= 0x02010000)
-  PyObject *inst = 0;
-  PyObject *dict = PyDict_New();
-  if (dict) {
-    PyDict_SetItem(dict, SWIG_This(), swig_this);
-    inst = PyInstance_NewRaw(data->newargs, dict);
-    Py_DECREF(dict);
-  }
-  return (PyObject *) inst;
-#else
-  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
-  if (inst == NULL) {
-    return NULL;
-  }
-  inst->in_class = (PyClassObject *)data->newargs;
-  Py_INCREF(inst->in_class);
-  inst->in_dict = PyDict_New();
-  if (inst->in_dict == NULL) {
-    Py_DECREF(inst);
-    return NULL;
-  }
-#ifdef Py_TPFLAGS_HAVE_WEAKREFS
-  inst->in_weakreflist = NULL;
-#endif
-#ifdef Py_TPFLAGS_GC
-  PyObject_GC_Init(inst);
-#endif
-  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
-  return (PyObject *) inst;
-#endif
-#endif
-}
-
-SWIGRUNTIME void
-SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
-{
- PyObject *dict;
-#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
- PyObject **dictptr = _PyObject_GetDictPtr(inst);
- if (dictptr != NULL) {
-   dict = *dictptr;
-   if (dict == NULL) {
-     dict = PyDict_New();
-     *dictptr = dict;
-   }
-   PyDict_SetItem(dict, SWIG_This(), swig_this);
-   return;
- }
-#endif
- dict = PyObject_GetAttrString(inst, (char*)"__dict__");
- PyDict_SetItem(dict, SWIG_This(), swig_this);
- Py_DECREF(dict);
-} 
-
-
-SWIGINTERN PyObject *
-SWIG_Python_InitShadowInstance(PyObject *args) {
-  PyObject *obj[2];
-  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
-    return NULL;
-  } else {
-    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
-    if (sthis) {
-      SwigPyObject_append((PyObject*) sthis, obj[1]);
-    } else {
-      SWIG_Python_SetSwigThis(obj[0], obj[1]);
-    }
-    return SWIG_Py_Void();
-  }
-}
-
-/* Create a new pointer object */
-
-SWIGRUNTIME PyObject *
-SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
-  SwigPyClientData *clientdata;
-  PyObject * robj;
-  int own;
-
-  if (!ptr)
-    return SWIG_Py_Void();
-
-  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
-  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
-  if (clientdata && clientdata->pytype) {
-    SwigPyObject *newobj;
-    if (flags & SWIG_BUILTIN_TP_INIT) {
-      newobj = (SwigPyObject*) self;
-      if (newobj->ptr) {
-        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
-        while (newobj->next)
-	  newobj = (SwigPyObject *) newobj->next;
-        newobj->next = next_self;
-        newobj = (SwigPyObject *)next_self;
-      }
-    } else {
-      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
-    }
-    if (newobj) {
-      newobj->ptr = ptr;
-      newobj->ty = type;
-      newobj->own = own;
-      newobj->next = 0;
-#ifdef SWIGPYTHON_BUILTIN
-      newobj->dict = 0;
-#endif
-      return (PyObject*) newobj;
-    }
-    return SWIG_Py_Void();
-  }
-
-  assert(!(flags & SWIG_BUILTIN_TP_INIT));
-
-  robj = SwigPyObject_New(ptr, type, own);
-  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
-    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
-    Py_DECREF(robj);
-    robj = inst;
-  }
-  return robj;
-}
-
-/* Create a new packed object */
-
-SWIGRUNTIMEINLINE PyObject *
-SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
-  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
-}
-
-/* -----------------------------------------------------------------------------*
- *  Get type list 
- * -----------------------------------------------------------------------------*/
-
-#ifdef SWIG_LINK_RUNTIME
-void *SWIG_ReturnGlobalTypeList(void *);
-#endif
-
-SWIGRUNTIME swig_module_info *
-SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
-  static void *type_pointer = (void *)0;
-  /* first check if module already created */
-  if (!type_pointer) {
-#ifdef SWIG_LINK_RUNTIME
-    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
-#else
-# ifdef SWIGPY_USE_CAPSULE
-    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
-# else
-    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
-				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
-# endif
-    if (PyErr_Occurred()) {
-      PyErr_Clear();
-      type_pointer = (void *)0;
-    }
-#endif
-  }
-  return (swig_module_info *) type_pointer;
-}
-
-#if PY_MAJOR_VERSION < 2
-/* PyModule_AddObject function was introduced in Python 2.0.  The following function
-   is copied out of Python/modsupport.c in python version 2.3.4 */
-SWIGINTERN int
-PyModule_AddObject(PyObject *m, char *name, PyObject *o)
-{
-  PyObject *dict;
-  if (!PyModule_Check(m)) {
-    PyErr_SetString(PyExc_TypeError,
-		    "PyModule_AddObject() needs module as first arg");
-    return SWIG_ERROR;
-  }
-  if (!o) {
-    PyErr_SetString(PyExc_TypeError,
-		    "PyModule_AddObject() needs non-NULL value");
-    return SWIG_ERROR;
-  }
-  
-  dict = PyModule_GetDict(m);
-  if (dict == NULL) {
-    /* Internal error -- modules must have a dict! */
-    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
-		 PyModule_GetName(m));
-    return SWIG_ERROR;
-  }
-  if (PyDict_SetItemString(dict, name, o))
-    return SWIG_ERROR;
-  Py_DECREF(o);
-  return SWIG_OK;
-}
-#endif
-
-SWIGRUNTIME void
-#ifdef SWIGPY_USE_CAPSULE
-SWIG_Python_DestroyModule(PyObject *obj)
-#else
-SWIG_Python_DestroyModule(void *vptr)
-#endif
-{
-#ifdef SWIGPY_USE_CAPSULE
-  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
-#else
-  swig_module_info *swig_module = (swig_module_info *) vptr;
-#endif
-  swig_type_info **types = swig_module->types;
-  size_t i;
-  for (i =0; i < swig_module->size; ++i) {
-    swig_type_info *ty = types[i];
-    if (ty->owndata) {
-      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
-      if (data) SwigPyClientData_Del(data);
-    }
-  }
-  Py_DECREF(SWIG_This());
-  swig_this = NULL;
-}
-
-SWIGRUNTIME void
-SWIG_Python_SetModule(swig_module_info *swig_module) {
-#if PY_VERSION_HEX >= 0x03000000
- /* Add a dummy module object into sys.modules */
-  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
-#else
-  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
-  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
-#endif
-#ifdef SWIGPY_USE_CAPSULE
-  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
-  if (pointer && module) {
-    PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
-  } else {
-    Py_XDECREF(pointer);
-  }
-#else
-  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
-  if (pointer && module) {
-    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
-  } else {
-    Py_XDECREF(pointer);
-  }
-#endif
-}
-
-/* The python cached type query */
-SWIGRUNTIME PyObject *
-SWIG_Python_TypeCache(void) {
-  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
-  return cache;
-}
-
-SWIGRUNTIME swig_type_info *
-SWIG_Python_TypeQuery(const char *type)
-{
-  PyObject *cache = SWIG_Python_TypeCache();
-  PyObject *key = SWIG_Python_str_FromChar(type); 
-  PyObject *obj = PyDict_GetItem(cache, key);
-  swig_type_info *descriptor;
-  if (obj) {
-#ifdef SWIGPY_USE_CAPSULE
-    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
-#else
-    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
-#endif
-  } else {
-    swig_module_info *swig_module = SWIG_GetModule(0);
-    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
-    if (descriptor) {
-#ifdef SWIGPY_USE_CAPSULE
-      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
-#else
-      obj = PyCObject_FromVoidPtr(descriptor, NULL);
-#endif
-      PyDict_SetItem(cache, key, obj);
-      Py_DECREF(obj);
-    }
-  }
-  Py_DECREF(key);
-  return descriptor;
-}
-
-/* 
-   For backward compatibility only
-*/
-#define SWIG_POINTER_EXCEPTION  0
-#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
-#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
-
-SWIGRUNTIME int
-SWIG_Python_AddErrMesg(const char* mesg, int infront)
-{  
-  if (PyErr_Occurred()) {
-    PyObject *type = 0;
-    PyObject *value = 0;
-    PyObject *traceback = 0;
-    PyErr_Fetch(&type, &value, &traceback);
-    if (value) {
-      char *tmp;
-      PyObject *old_str = PyObject_Str(value);
-      Py_XINCREF(type);
-      PyErr_Clear();
-      if (infront) {
-	PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
-      } else {
-	PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
-      }
-      SWIG_Python_str_DelForPy3(tmp);
-      Py_DECREF(old_str);
-    }
-    return 1;
-  } else {
-    return 0;
-  }
-}
-  
-SWIGRUNTIME int
-SWIG_Python_ArgFail(int argnum)
-{
-  if (PyErr_Occurred()) {
-    /* add information about failing argument */
-    char mesg[256];
-    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
-    return SWIG_Python_AddErrMesg(mesg, 1);
-  } else {
-    return 0;
-  }
-}
-
-SWIGRUNTIMEINLINE const char *
-SwigPyObject_GetDesc(PyObject *self)
-{
-  SwigPyObject *v = (SwigPyObject *)self;
-  swig_type_info *ty = v ? v->ty : 0;
-  return ty ? ty->str : "";
-}
-
-SWIGRUNTIME void
-SWIG_Python_TypeError(const char *type, PyObject *obj)
-{
-  if (type) {
-#if defined(SWIG_COBJECT_TYPES)
-    if (obj && SwigPyObject_Check(obj)) {
-      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
-      if (otype) {
-	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
-		     type, otype);
-	return;
-      }
-    } else 
-#endif      
-    {
-      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
-      if (otype) {
-	PyObject *str = PyObject_Str(obj);
-	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
-	if (cstr) {
-	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
-		       type, otype, cstr);
-          SWIG_Python_str_DelForPy3(cstr);
-	} else {
-	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
-		       type, otype);
-	}
-	Py_XDECREF(str);
-	return;
-      }
-    }   
-    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
-  } else {
-    PyErr_Format(PyExc_TypeError, "unexpected type is received");
-  }
-}
-
-
-/* Convert a pointer value, signal an exception on a type mismatch */
-SWIGRUNTIME void *
-SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
-  void *result;
-  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
-    PyErr_Clear();
-#if SWIG_POINTER_EXCEPTION
-    if (flags) {
-      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
-      SWIG_Python_ArgFail(argnum);
-    }
-#endif
-  }
-  return result;
-}
-
-#ifdef SWIGPYTHON_BUILTIN
-SWIGRUNTIME int
-SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
-  PyTypeObject *tp = obj->ob_type;
-  PyObject *descr;
-  PyObject *encoded_name;
-  descrsetfunc f;
-  int res;
-
-# ifdef Py_USING_UNICODE
-  if (PyString_Check(name)) {
-    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
-    if (!name)
-      return -1;
-  } else if (!PyUnicode_Check(name))
-# else
-  if (!PyString_Check(name))
-# endif
-  {
-    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
-    return -1;
-  } else {
-    Py_INCREF(name);
-  }
-
-  if (!tp->tp_dict) {
-    if (PyType_Ready(tp) < 0)
-      goto done;
-  }
-
-  res = -1;
-  descr = _PyType_Lookup(tp, name);
-  f = NULL;
-  if (descr != NULL)
-    f = descr->ob_type->tp_descr_set;
-  if (!f) {
-    if (PyString_Check(name)) {
-      encoded_name = name;
-      Py_INCREF(name);
-    } else {
-      encoded_name = PyUnicode_AsUTF8String(name);
-    }
-    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
-    Py_DECREF(encoded_name);
-  } else {
-    res = f(descr, obj, value);
-  }
-  
-  done:
-  Py_DECREF(name);
-  return res;
-}
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
-
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
-
-
-
-  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 
-
-
-/* -------- TYPES TABLE (BEGIN) -------- */
-
-#define SWIGTYPE_p_GeosCoordinateSequence swig_types[0]
-#define SWIGTYPE_p_GeosGeometry swig_types[1]
-#define SWIGTYPE_p_GeosGeometryCollection swig_types[2]
-#define SWIGTYPE_p_GeosIndexItem swig_types[3]
-#define SWIGTYPE_p_GeosLineString swig_types[4]
-#define SWIGTYPE_p_GeosLinearRing swig_types[5]
-#define SWIGTYPE_p_GeosMultiLineString swig_types[6]
-#define SWIGTYPE_p_GeosMultiLinearRing swig_types[7]
-#define SWIGTYPE_p_GeosMultiPoint swig_types[8]
-#define SWIGTYPE_p_GeosMultiPolygon swig_types[9]
-#define SWIGTYPE_p_GeosPoint swig_types[10]
-#define SWIGTYPE_p_GeosPolygon swig_types[11]
-#define SWIGTYPE_p_GeosPreparedGeometry swig_types[12]
-#define SWIGTYPE_p_GeosQueryCallback swig_types[13]
-#define SWIGTYPE_p_GeosSTRtree swig_types[14]
-#define SWIGTYPE_p_GeosWkbReader swig_types[15]
-#define SWIGTYPE_p_GeosWkbWriter swig_types[16]
-#define SWIGTYPE_p_GeosWktReader swig_types[17]
-#define SWIGTYPE_p_GeosWktWriter swig_types[18]
-#define SWIGTYPE_p_char swig_types[19]
-#define SWIGTYPE_p_p_GeosLinearRing swig_types[20]
-#define SWIGTYPE_p_size_t swig_types[21]
-#define SWIGTYPE_p_std__invalid_argument swig_types[22]
-#define SWIGTYPE_p_swig__SwigPyIterator swig_types[23]
-#define SWIGTYPE_p_unsigned_char swig_types[24]
-static swig_type_info *swig_types[26];
-static swig_module_info swig_module = {swig_types, 25, 0, 0, 0, 0};
-#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
-#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
-
-/* -------- TYPES TABLE (END) -------- */
-
-#if (PY_VERSION_HEX <= 0x02000000)
-# if !defined(SWIG_PYTHON_CLASSIC)
-#  error "This python version requires swig to be run with the '-classic' option"
-# endif
-#endif
-#if (PY_VERSION_HEX <= 0x02020000)
-# error "This python version requires swig to be run with the '-nomodern' option"
-#endif
-#if (PY_VERSION_HEX <= 0x02020000)
-# error "This python version requires swig to be run with the '-nomodernargs' option"
-#endif
-
-/*-----------------------------------------------
-              @(target):= _geos.so
-  ------------------------------------------------*/
-#if PY_VERSION_HEX >= 0x03000000
-#  define SWIG_init    PyInit__geos
-
-#else
-#  define SWIG_init    init_geos
-
-#endif
-#define SWIG_name    "_geos"
-
-#define SWIGVERSION 0x020010 
-#define SWIG_VERSION SWIGVERSION
-
-
-#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
-#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
-
-
-#include <stdexcept>
-
-
-namespace swig {
-  class SwigPtr_PyObject {
-  protected:
-    PyObject *_obj;
-
-  public:
-    SwigPtr_PyObject() :_obj(0)
-    {
-    }
-
-    SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
-    {
-      Py_XINCREF(_obj);      
-    }
-    
-    SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
-    {
-      if (initial_ref) {
-        Py_XINCREF(_obj);
-      }
-    }
-    
-    SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
-    {
-      Py_XINCREF(item._obj);
-      Py_XDECREF(_obj);
-      _obj = item._obj;
-      return *this;      
-    }
-    
-    ~SwigPtr_PyObject() 
-    {
-      Py_XDECREF(_obj);
-    }
-    
-    operator PyObject *() const
-    {
-      return _obj;
-    }
-
-    PyObject *operator->() const
-    {
-      return _obj;
-    }
-  };
-}
-
-
-namespace swig {
-  struct SwigVar_PyObject : SwigPtr_PyObject {
-    SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
-    
-    SwigVar_PyObject & operator = (PyObject* obj)
-    {
-      Py_XDECREF(_obj);
-      _obj = obj;
-      return *this;      
-    }
-  };
-}
-
-
-#include <string>
-
-
-#include <iostream>
-
-#if PY_VERSION_HEX >= 0x03020000
-# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
-#else
-# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
-#endif
-
-
-#include <stdexcept>
-
-
-#if defined(__GNUC__)
-#  if __GNUC__ == 2 && __GNUC_MINOR <= 96
-#     define SWIG_STD_NOMODERN_STL
-#  endif
-#endif
-
-
-#include <string>
-#include <stdexcept>
-#include <stddef.h>
-
-
-  #include <stddef.h>
-
-
-namespace swig {
-  struct stop_iteration {
-  };
-
-  struct SwigPyIterator {
-  private:
-    SwigPtr_PyObject _seq;
-
-  protected:
-    SwigPyIterator(PyObject *seq) : _seq(seq)
-    {
-    }
-      
-  public:
-    virtual ~SwigPyIterator() {}
-
-    // Access iterator method, required by Python
-    virtual PyObject *value() const = 0;
-
-    // Forward iterator method, required by Python
-    virtual SwigPyIterator *incr(size_t n = 1) = 0;
-    
-    // Backward iterator method, very common in C++, but not required in Python
-    virtual SwigPyIterator *decr(size_t /*n*/ = 1)
-    {
-      throw stop_iteration();
-    }
-
-    // Random access iterator methods, but not required in Python
-    virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
-    {
-      throw std::invalid_argument("operation not supported");
-    }
-
-    virtual bool equal (const SwigPyIterator &/*x*/) const
-    {
-      throw std::invalid_argument("operation not supported");
-    }
-    
-    // C++ common/needed methods
-    virtual SwigPyIterator *copy() const = 0;
-
-    PyObject *next()     
-    {
-      SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads       
-      PyObject *obj = value();
-      incr();       
-      SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
-      return obj;     
-    }
-
-    /* Make an alias for Python 3.x */
-    PyObject *__next__()
-    {
-      return next();
-    }
-
-    PyObject *previous()
-    {
-      SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads       
-      decr();
-      PyObject *obj = value();
-      SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads       
-      return obj;
-    }
-
-    SwigPyIterator *advance(ptrdiff_t n)
-    {
-      return  (n > 0) ?  incr(n) : decr(-n);
-    }
-      
-    bool operator == (const SwigPyIterator& x)  const
-    {
-      return equal(x);
-    }
-      
-    bool operator != (const SwigPyIterator& x) const
-    {
-      return ! operator==(x);
-    }
-      
-    SwigPyIterator& operator += (ptrdiff_t n)
-    {
-      return *advance(n);
-    }
-
-    SwigPyIterator& operator -= (ptrdiff_t n)
-    {
-      return *advance(-n);
-    }
-      
-    SwigPyIterator* operator + (ptrdiff_t n) const
-    {
-      return copy()->advance(n);
-    }
-
-    SwigPyIterator* operator - (ptrdiff_t n) const
-    {
-      return copy()->advance(-n);
-    }
-      
-    ptrdiff_t operator - (const SwigPyIterator& x) const
-    {
-      return x.distance(*this);
-    }
-      
-    static swig_type_info* descriptor() {
-      static int init = 0;
-      static swig_type_info* desc = 0;
-      if (!init) {
-	desc = SWIG_TypeQuery("swig::SwigPyIterator *");
-	init = 1;
-      }	
-      return desc;
-    }    
-  };
-
-#if defined(SWIGPYTHON_BUILTIN)
-  inline PyObject* make_output_iterator_builtin (PyObject *pyself)
-  {
-    Py_INCREF(pyself);
-    return pyself;
-  }
-#endif
-}
-
-
-SWIGINTERN int
-SWIG_AsVal_double (PyObject *obj, double *val)
-{
-  int res = SWIG_TypeError;
-  if (PyFloat_Check(obj)) {
-    if (val) *val = PyFloat_AsDouble(obj);
-    return SWIG_OK;
-  } else if (PyInt_Check(obj)) {
-    if (val) *val = PyInt_AsLong(obj);
-    return SWIG_OK;
-  } else if (PyLong_Check(obj)) {
-    double v = PyLong_AsDouble(obj);
-    if (!PyErr_Occurred()) {
-      if (val) *val = v;
-      return SWIG_OK;
-    } else {
-      PyErr_Clear();
-    }
-  }
-#ifdef SWIG_PYTHON_CAST_MODE
-  {
-    int dispatch = 0;
-    double d = PyFloat_AsDouble(obj);
-    if (!PyErr_Occurred()) {
-      if (val) *val = d;
-      return SWIG_AddCast(SWIG_OK);
-    } else {
-      PyErr_Clear();
-    }
-    if (!dispatch) {
-      long v = PyLong_AsLong(obj);
-      if (!PyErr_Occurred()) {
-	if (val) *val = v;
-	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
-      } else {
-	PyErr_Clear();
-      }
-    }
-  }
-#endif
-  return res;
-}
-
-
-#include <float.h>
-
-
-#include <math.h>
-
-
-SWIGINTERNINLINE int
-SWIG_CanCastAsInteger(double *d, double min, double max) {
-  double x = *d;
-  if ((min <= x && x <= max)) {
-   double fx = floor(x);
-   double cx = ceil(x);
-   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
-   if ((errno == EDOM) || (errno == ERANGE)) {
-     errno = 0;
-   } else {
-     double summ, reps, diff;
-     if (rd < x) {
-       diff = x - rd;
-     } else if (rd > x) {
-       diff = rd - x;
-     } else {
-       return 1;
-     }
-     summ = rd + x;
-     reps = diff/summ;
-     if (reps < 8*DBL_EPSILON) {
-       *d = rd;
-       return 1;
-     }
-   }
-  }
-  return 0;
-}
-
-
-SWIGINTERN int
-SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
-{
-#if PY_VERSION_HEX < 0x03000000
-  if (PyInt_Check(obj)) {
-    long v = PyInt_AsLong(obj);
-    if (v >= 0) {
-      if (val) *val = v;
-      return SWIG_OK;
-    } else {
-      return SWIG_OverflowError;
-    }
-  } else
-#endif
-  if (PyLong_Check(obj)) {
-    unsigned long v = PyLong_AsUnsignedLong(obj);
-    if (!PyErr_Occurred()) {
-      if (val) *val = v;
-      return SWIG_OK;
-    } else {
-      PyErr_Clear();
-#if PY_VERSION_HEX >= 0x03000000
-      {
-        long v = PyLong_AsLong(obj);
-        if (!PyErr_Occurred()) {
-          if (v < 0) {
-            return SWIG_OverflowError;
-          }
-        } else {
-          PyErr_Clear();
-        }
-      }
-#endif
-    }
-  }
-#ifdef SWIG_PYTHON_CAST_MODE
-  {
-    int dispatch = 0;
-    unsigned long v = PyLong_AsUnsignedLong(obj);
-    if (!PyErr_Occurred()) {
-      if (val) *val = v;
-      return SWIG_AddCast(SWIG_OK);
-    } else {
-      PyErr_Clear();
-    }
-    if (!dispatch) {
-      double d;
-      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
-      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
-	if (val) *val = (unsigned long)(d);
-	return res;
-      }
-    }
-  }
-#endif
-  return SWIG_TypeError;
-}
-
-
-SWIGINTERNINLINE int
-SWIG_AsVal_size_t (PyObject * obj, size_t *val)
-{
-  unsigned long v;
-  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
-  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
-  return res;
-}
-
-
-  #define SWIG_From_long   PyLong_FromLong 
-
-
-SWIGINTERNINLINE PyObject *
-SWIG_From_ptrdiff_t  (ptrdiff_t value)
-{    
-  return SWIG_From_long  (static_cast< long >(value));
-}
-
-
-SWIGINTERNINLINE PyObject*
-  SWIG_From_bool  (bool value)
-{
-  return PyBool_FromLong(value ? 1 : 0);
-}
-
-
-SWIGINTERN int
-SWIG_AsVal_long (PyObject *obj, long* val)
-{
-  if (PyInt_Check(obj)) {
-    if (val) *val = PyInt_AsLong(obj);
-    return SWIG_OK;
-  } else if (PyLong_Check(obj)) {
-    long v = PyLong_AsLong(obj);
-    if (!PyErr_Occurred()) {
-      if (val) *val = v;
-      return SWIG_OK;
-    } else {
-      PyErr_Clear();
-    }
-  }
-#ifdef SWIG_PYTHON_CAST_MODE
-  {
-    int dispatch = 0;
-    long v = PyInt_AsLong(obj);
-    if (!PyErr_Occurred()) {
-      if (val) *val = v;
-      return SWIG_AddCast(SWIG_OK);
-    } else {
-      PyErr_Clear();
-    }
-    if (!dispatch) {
-      double d;
-      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
-      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
-	if (val) *val = (long)(d);
-	return res;
-      }
-    }
-  }
-#endif
-  return SWIG_TypeError;
-}
-
-
-SWIGINTERNINLINE int
-SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
-{
-  long v;
-  int res = SWIG_AsVal_long (obj, val ? &v : 0);
-  if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
-  return res;
-}
-
-
-#include <stdexcept>
-
-
-#include <algorithm>
-
-
-#include <vector>
-
- 
-#include "geos_c.h"
-/* Needed for va_start, etc. */
-#include <stdarg.h>
-
-
-SWIGINTERNINLINE PyObject*
-  SWIG_From_int  (int value)
-{
-  return PyInt_FromLong((long) value);
-}
-
-
-SWIGINTERN swig_type_info*
-SWIG_pchar_descriptor(void)
-{
-  static int init = 0;
-  static swig_type_info* info = 0;
-  if (!init) {
-    info = SWIG_TypeQuery("_p_char");
-    init = 1;
-  }
-  return info;
-}
-
-
-SWIGINTERNINLINE PyObject *
-SWIG_FromCharPtrAndSize(const char* carray, size_t size)
-{
-  if (carray) {
-    if (size > INT_MAX) {
-      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-      return pchar_descriptor ? 
-	SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
-    } else {
-#if PY_VERSION_HEX >= 0x03000000
-      return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
-#else
-      return PyString_FromStringAndSize(carray, static_cast< int >(size));
-#endif
-    }
-  } else {
-    return SWIG_Py_Void();
-  }
-}
-
-
-SWIGINTERNINLINE PyObject * 
-SWIG_FromCharPtr(const char *cptr)
-{ 
-  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
-}
-
-
-    static const int DEFAULT_QUADRANT_SEGMENTS=8;
-
-
-
-/* This is not thread safe ! */
-static const int MESSAGE_SIZE = 1000;
-static char message[MESSAGE_SIZE];
-
-void noticeHandler(const char *fmt, ...)
-{
-    va_list args;
-    va_start(args, fmt);
-    vsnprintf(message, sizeof(message) - 1, fmt, args);
-    va_end(args);
-}
-
-void errorHandler(const char *fmt, ...)
-{
-    va_list args;
-    va_start(args, fmt);
-    vsnprintf(message, sizeof(message) - 1, fmt, args);
-    va_end(args);
-}
-
-
-typedef void GeosCoordinateSequence;
-
-void checkCoordSeqBounds(const GEOSCoordSeq coordSeq, const size_t index)
-{
-    unsigned int size = 0;
-    GEOSCoordSeq_getSize(coordSeq, &size);
-
-    if (index < 0 || index >= size)
-        throw std::runtime_error("Index out of bounds");
-}
-
-SWIGINTERN GeosCoordinateSequence *new_GeosCoordinateSequence(size_t size,size_t dims){
-        return (GeosCoordinateSequence*) GEOSCoordSeq_create(size, dims);
-    }
-SWIGINTERN void delete_GeosCoordinateSequence(GeosCoordinateSequence *self){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        return GEOSCoordSeq_destroy(coords);
-    }
-SWIGINTERN GeosCoordinateSequence *GeosCoordinateSequence_clone(GeosCoordinateSequence *self){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        return (GeosCoordinateSequence*) GEOSCoordSeq_clone(coords);
-    }
-SWIGINTERN int GeosCoordinateSequence_setX(GeosCoordinateSequence *self,size_t idx,double val){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setX(coords, idx, val);
-    }
-SWIGINTERN int GeosCoordinateSequence_setY(GeosCoordinateSequence *self,size_t idx,double val){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setY(coords, idx, val);
-    }
-SWIGINTERN int GeosCoordinateSequence_setZ(GeosCoordinateSequence *self,size_t idx,double val){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setZ(coords, idx, val);
-    }
-SWIGINTERN int GeosCoordinateSequence_setOrdinate(GeosCoordinateSequence *self,size_t idx,size_t dim,double val){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setOrdinate(coords, idx, dim, val);
-    }
-SWIGINTERN double GeosCoordinateSequence_getX(GeosCoordinateSequence *self,size_t idx){
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getX(coords, idx, &result);
-        return result;
-    }
-
-  #define SWIG_From_double   PyFloat_FromDouble 
-
-SWIGINTERN double GeosCoordinateSequence_getY(GeosCoordinateSequence *self,size_t idx){
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getY(coords, idx, &result);
-        return result;
-    }
-SWIGINTERN double GeosCoordinateSequence_getZ(GeosCoordinateSequence *self,size_t idx){
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getZ(coords, idx, &result);
-        return result;
-    }
-SWIGINTERN double GeosCoordinateSequence_getOrdinate(GeosCoordinateSequence *self,size_t idx,size_t dim){
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getOrdinate(coords, idx, dim, &result);
-        return result;
-    }
-SWIGINTERN unsigned int GeosCoordinateSequence_getSize(GeosCoordinateSequence *self){
-        unsigned int result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        GEOSCoordSeq_getSize(coords, &result);
-        return result;
-    }
-
-SWIGINTERNINLINE PyObject*
-  SWIG_From_unsigned_SS_int  (unsigned int value)
-{
-  return PyInt_FromSize_t((size_t) value);
-}
-
-SWIGINTERN unsigned int GeosCoordinateSequence_getDimensions(GeosCoordinateSequence *self){
-        unsigned int result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        GEOSCoordSeq_getDimensions(coords, &result);
-        return result;
-    }
-
-typedef void GeosGeometry;
-typedef void GeosPoint;
-typedef void GeosLineString;
-typedef void GeosLinearRing;
-typedef void GeosPolygon;
-typedef void GeosGeometryCollection;
-typedef void GeosMultiPoint;
-typedef void GeosMultiLineString;
-typedef void GeosMultiLinearRing;
-typedef void GeosMultiPolygon;
-
-typedef void GeosWktReader;
-typedef void GeosWktWriter;
-typedef void GeosWkbReader;
-typedef void GeosWkbWriter;
-
-
-bool checkBoolResult(char result)
-{
-    int intResult = (int) result;
-
-    if (intResult == 1)
-        return true;
-    else if (intResult == 0)
-        return false;
-    else
-        throw std::runtime_error(message);
-}
-
-SWIGINTERN void delete_GeosGeometry(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_clone(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeom_clone(geom);
-    }
-SWIGINTERN char *GeosGeometry_geomType(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeomType(geom);
-    }
-SWIGINTERN int GeosGeometry_typeId(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeomTypeId(geom);
-    }
-SWIGINTERN void GeosGeometry_normalize(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        int result = GEOSNormalize(geom);
-
-        if (result == -1)
-            throw std::runtime_error(message);
-    }
-SWIGINTERN int GeosGeometry_getSRID(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGetSRID(geom);
-    }
-
-#include <limits.h>
-#if !defined(SWIG_NO_LLONG_MAX)
-# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
-#   define LLONG_MAX __LONG_LONG_MAX__
-#   define LLONG_MIN (-LLONG_MAX - 1LL)
-#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
-# endif
-#endif
-
-
-SWIGINTERN int
-SWIG_AsVal_int (PyObject * obj, int *val)
-{
-  long v;
-  int res = SWIG_AsVal_long (obj, &v);
-  if (SWIG_IsOK(res)) {
-    if ((v < INT_MIN || v > INT_MAX)) {
-      return SWIG_OverflowError;
-    } else {
-      if (val) *val = static_cast< int >(v);
-    }
-  }  
-  return res;
-}
-
-SWIGINTERN void GeosGeometry_setSRID(GeosGeometry *self,int SRID){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSSetSRID(geom, SRID);
-    }
-SWIGINTERN size_t GeosGeometry_getDimensions(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeom_getDimensions(geom);
-    }
-
-SWIGINTERNINLINE PyObject* 
-SWIG_From_unsigned_SS_long  (unsigned long value)
-{
-  return (value > LONG_MAX) ?
-    PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value)); 
-}
-
-
-SWIGINTERNINLINE PyObject *
-SWIG_From_size_t  (size_t value)
-{    
-  return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
-}
-
-SWIGINTERN size_t GeosGeometry_getNumGeometries(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        size_t result = GEOSGetNumGeometries(geom);
-        
-        if ((int)result == -1)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_intersection(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSIntersection(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_buffer(GeosGeometry *self,double width,int quadsegs){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSBuffer(geom, width, quadsegs);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_convexHull(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSConvexHull(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_difference(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSDifference(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_symDifference(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSSymDifference(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_boundary(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSBoundary(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_geomUnion(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSUnion(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_pointOnSurface(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSPointOnSurface(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_getCentroid(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSGetCentroid(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_getEnvelope(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSEnvelope(geom);
-    }
-SWIGINTERN char *GeosGeometry_relate(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return GEOSRelate(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_lineMerge(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSLineMerge(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_simplify(GeosGeometry *self,double tolerance){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSSimplify(geom, tolerance);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_topologyPreserveSimplify(GeosGeometry *self,double tolerance){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSTopologyPreserveSimplify(geom, tolerance);
-    }
-
-SWIGINTERN int
-SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
-{
-#if PY_VERSION_HEX>=0x03000000
-  if (PyUnicode_Check(obj))
-#else  
-  if (PyString_Check(obj))
-#endif
-  {
-    char *cstr; Py_ssize_t len;
-#if PY_VERSION_HEX>=0x03000000
-    if (!alloc && cptr) {
-        /* We can't allow converting without allocation, since the internal
-           representation of string in Python 3 is UCS-2/UCS-4 but we require
-           a UTF-8 representation.
-           TODO(bhy) More detailed explanation */
-        return SWIG_RuntimeError;
-    }
-    obj = PyUnicode_AsUTF8String(obj);
-    PyBytes_AsStringAndSize(obj, &cstr, &len);
-    if(alloc) *alloc = SWIG_NEWOBJ;
-#else
-    PyString_AsStringAndSize(obj, &cstr, &len);
-#endif
-    if (cptr) {
-      if (alloc) {
-	/* 
-	   In python the user should not be able to modify the inner
-	   string representation. To warranty that, if you define
-	   SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
-	   buffer is always returned.
-
-	   The default behavior is just to return the pointer value,
-	   so, be careful.
-	*/ 
-#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
-	if (*alloc != SWIG_OLDOBJ) 
-#else
-	if (*alloc == SWIG_NEWOBJ) 
-#endif
-	  {
-	    *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
-	    *alloc = SWIG_NEWOBJ;
-	  }
-	else {
-	  *cptr = cstr;
-	  *alloc = SWIG_OLDOBJ;
-	}
-      } else {
-        #if PY_VERSION_HEX>=0x03000000
-        assert(0); /* Should never reach here in Python 3 */
-        #endif
-	*cptr = SWIG_Python_str_AsChar(obj);
-      }
-    }
-    if (psize) *psize = len + 1;
-#if PY_VERSION_HEX>=0x03000000
-    Py_XDECREF(obj);
-#endif
-    return SWIG_OK;
-  } else {
-    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-    if (pchar_descriptor) {
-      void* vptr = 0;
-      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
-	if (cptr) *cptr = (char *) vptr;
-	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
-	if (alloc) *alloc = SWIG_OLDOBJ;
-	return SWIG_OK;
-      }
-    }
-  }
-  return SWIG_TypeError;
-}
-
-
-
-
-SWIGINTERN bool GeosGeometry_relatePattern(GeosGeometry *self,GeosGeometry const *other,char const *pat){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSRelatePattern(geom, otherGeom, pat));
-    }
-SWIGINTERN bool GeosGeometry_disjoint(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSDisjoint(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_touches(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSTouches(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_intersects(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSIntersects(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_crosses(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSCrosses(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_within(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSWithin(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_contains(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSContains(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_overlaps(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSOverlaps(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_equals(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSEquals(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_equalsExact(GeosGeometry *self,GeosGeometry const *other,double tolerance){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSEqualsExact(geom, otherGeom, tolerance));
-    }
-SWIGINTERN bool GeosGeometry_isEmpty(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisEmpty(geom));
-    }
-SWIGINTERN bool GeosGeometry_isValid(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisValid(geom));
-    }
-SWIGINTERN bool GeosGeometry_isSimple(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisSimple(geom));
-    }
-SWIGINTERN bool GeosGeometry_isRing(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisRing(geom));
-    }
-SWIGINTERN bool GeosGeometry_hasZ(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSHasZ(geom));
-    }
-SWIGINTERN double GeosGeometry_area(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        double result;
-
-        int code = GEOSArea(geom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN double GeosGeometry_length(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        double result;
-
-        int code = GEOSLength(geom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN double GeosGeometry_distance(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        double result;
-
-        int code = GEOSDistance(geom, otherGeom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN void delete_GeosPoint(GeosPoint *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN GeosCoordinateSequence const *GeosPoint_getCoordSeq(GeosPoint *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-SWIGINTERN void delete_GeosLineString(GeosLineString *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN GeosCoordinateSequence const *GeosLineString_getCoordSeq(GeosLineString *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-SWIGINTERN void delete_GeosLinearRing(GeosLinearRing *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN GeosCoordinateSequence const *GeosLinearRing_getCoordSeq(GeosLinearRing *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-SWIGINTERN void delete_GeosPolygon(GeosPolygon *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN GeosGeometry const *GeosPolygon_getExteriorRing(GeosPolygon *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSGeom result = (const GEOSGeom) GEOSGetExteriorRing(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-SWIGINTERN size_t GeosPolygon_getNumInteriorRings(GeosPolygon *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        size_t result = GEOSGetNumInteriorRings(geom);
-
-        if ((int)result == -1)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN GeosGeometry const *GeosPolygon_getInteriorRingN(GeosPolygon *self,size_t n){
-        GEOSGeom geom = (GEOSGeom) self;
-
-        size_t size = GEOSGetNumInteriorRings(geom);
-
-        if (n < 0 || n >= size)
-            throw std::runtime_error("Index out of bounds");
-
-        const GEOSGeom result = (const GEOSGeom) GEOSGetInteriorRingN(geom, n);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-SWIGINTERN void delete_GeosGeometryCollection(GeosGeometryCollection *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN GeosGeometry const *GeosGeometryCollection_getGeometryN(GeosGeometryCollection *self,size_t n){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSGeom result = (const GEOSGeom) GEOSGetGeometryN(geom, n);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-SWIGINTERN void delete_GeosMultiPoint(GeosMultiPoint *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void delete_GeosMultiLineString(GeosMultiLineString *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void delete_GeosMultiLinearRing(GeosMultiLinearRing *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void delete_GeosMultiPolygon(GeosMultiPolygon *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-
-GeosGeometry *createPoint(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createPoint(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createLineString(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createLineString(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createLinearRing(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createLinearRing(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createPolygon(GeosLinearRing *shell, GeosLinearRing **holes, size_t nholes)
-{
-    GEOSGeom shellGeom = (GEOSGeom) shell;
-    GEOSGeom* holeGeoms = (GEOSGeom*) holes;
-    GEOSGeom geom = GEOSGeom_createPolygon(shellGeom, holeGeoms, nholes);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-
-
-typedef void GeosPreparedGeometry;
-
-SWIGINTERN GeosPreparedGeometry *new_GeosPreparedGeometry(GeosGeometry const *source){
-        const GEOSPreparedGeometry *prep = GEOSPrepare((const GEOSGeometry *)source);
-        if(prep == NULL)
-            throw std::runtime_error(message);
-        return (GeosPreparedGeometry *) prep;
-    }
-SWIGINTERN void delete_GeosPreparedGeometry(GeosPreparedGeometry *self){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        return GEOSPreparedGeom_destroy(prep);
-    }
-SWIGINTERN bool GeosPreparedGeometry_contains(GeosPreparedGeometry *self,GeosGeometry const *other){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedContains(prep, otherGeom));
-    }
-SWIGINTERN bool GeosPreparedGeometry_containsProperly(GeosPreparedGeometry *self,GeosGeometry const *other){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedContainsProperly(prep, otherGeom));
-    }
-SWIGINTERN bool GeosPreparedGeometry_covers(GeosPreparedGeometry *self,GeosGeometry const *other){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedCovers(prep, otherGeom));
-    }
-SWIGINTERN bool GeosPreparedGeometry_intersects(GeosPreparedGeometry *self,GeosGeometry const *other){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedIntersects(prep, otherGeom));
-    }
-
-typedef void GeosSTRtree;
-/* GeosIndexItem typedef'd here so it can be %typemap(typecheck)'d
-   as a native object by each language specially */
-typedef void *GeosIndexItem;
-typedef GEOSQueryCallback GeosQueryCallback;
-
-SWIGINTERN GeosSTRtree *new_GeosSTRtree(int nodeCapacity){
-        GEOSSTRtree *tree = GEOSSTRtree_create(nodeCapacity);
-        if(tree == NULL)
-            throw std::runtime_error(message);
-        return (GeosSTRtree *) tree;
-    }
-SWIGINTERN void delete_GeosSTRtree(GeosSTRtree *self){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        return GEOSSTRtree_destroy(tree);
-    }
-SWIGINTERN void GeosSTRtree_insert(GeosSTRtree *self,GeosGeometry const *g,GeosIndexItem item){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_insert(tree, geom, item);
-    }
-SWIGINTERN void GeosSTRtree_remove(GeosSTRtree *self,GeosGeometry const *g,GeosIndexItem item){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_remove(tree, geom, item);
-    }
-SWIGINTERN void GeosSTRtree_query(GeosSTRtree *self,GeosGeometry const *g,GeosQueryCallback callback,GeosIndexItem accumulator){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_query(tree, geom, callback, accumulator);
-    }
-SWIGINTERN void GeosSTRtree_iterate(GeosSTRtree *self,GeosQueryCallback callback,GeosIndexItem accumulator){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        GEOSSTRtree_iterate(tree, callback, accumulator);
-    }
-SWIGINTERN GeosWktReader *new_GeosWktReader(){
-        return GEOSWKTReader_create();
-    }
-SWIGINTERN void delete_GeosWktReader(GeosWktReader *self){
-        GEOSWKTReader *reader = (GEOSWKTReader*) self;
-        GEOSWKTReader_destroy(reader);
-    }
-SWIGINTERN GeosGeometry *GeosWktReader_read(GeosWktReader *self,char const *wkt){
-        if(wkt == NULL)
-            throw std::runtime_error("Trying to create geometry from a NULL string");
-            
-        GEOSWKTReader *reader = (GEOSWKTReader*) self;
-        GEOSGeometry *geom = GEOSWKTReader_read(reader, wkt);
-
-        if(geom == NULL)
-            throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-SWIGINTERN GeosWktWriter *new_GeosWktWriter(){
-        return GEOSWKTWriter_create();
-    }
-SWIGINTERN void delete_GeosWktWriter(GeosWktWriter *self){
-        GEOSWKTWriter *writer = (GEOSWKTWriter*) self;
-        GEOSWKTWriter_destroy(writer);
-    }
-SWIGINTERN char *GeosWktWriter_write(GeosWktWriter *self,GeosGeometry const *g){
-        GEOSWKTWriter *writer = (GEOSWKTWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKTWriter_write(writer, geom);
-    }
-SWIGINTERN GeosWkbReader *new_GeosWkbReader(){
-        return GEOSWKBReader_create();
-    }
-SWIGINTERN void delete_GeosWkbReader(GeosWkbReader *self){
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSWKBReader_destroy(reader);
-    }
-SWIGINTERN GeosGeometry *GeosWkbReader_read(GeosWkbReader *self,unsigned char const *wkb,size_t size){
-        if(wkb == NULL)
-          throw std::runtime_error("Trying to create geometry from a NULL string");
-         
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSGeometry *geom = GEOSWKBReader_read(reader, wkb, size);
-       
-        if(geom == NULL)
-          throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-SWIGINTERN GeosGeometry *GeosWkbReader_readHEX(GeosWkbReader *self,unsigned char const *wkb,size_t size){
-        if(wkb == NULL)
-          throw std::runtime_error("Trying to create geometry from a NULL string");
-         
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSGeometry *geom = GEOSWKBReader_readHEX(reader, wkb, size);
-       
-        if(geom == NULL)
-          throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-SWIGINTERN GeosWkbWriter *new_GeosWkbWriter(){
-        return GEOSWKBWriter_create();
-    }
-SWIGINTERN void delete_GeosWkbWriter(GeosWkbWriter *self){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSWKBWriter_destroy(writer);
-    }
-SWIGINTERN int GeosWkbWriter_getOutputDimension(GeosWkbWriter *self){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getOutputDimension(writer);
-    }
-SWIGINTERN void GeosWkbWriter_setOutputDimension(GeosWkbWriter *self,int newDimension){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSWKBWriter_setOutputDimension(writer, newDimension);
-    }
-SWIGINTERN int GeosWkbWriter_getByteOrder(GeosWkbWriter *self){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getByteOrder(writer);
-    }
-SWIGINTERN void GeosWkbWriter_setByteOrder(GeosWkbWriter *self,int newByteOrder){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_setByteOrder(writer, newByteOrder);
-    }
-SWIGINTERN bool GeosWkbWriter_getIncludeSRID(GeosWkbWriter *self){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getIncludeSRID(writer);
-    }
-
-SWIGINTERN int
-SWIG_AsVal_bool (PyObject *obj, bool *val)
-{
-  int r = PyObject_IsTrue(obj);
-  if (r == -1)
-    return SWIG_ERROR;
-  if (val) *val = r ? true : false;
-  return SWIG_OK;
-}
-
-SWIGINTERN void GeosWkbWriter_setIncludeSRID(GeosWkbWriter *self,bool newIncludeSRID){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_setIncludeSRID(writer, newIncludeSRID);
-    }
-SWIGINTERN unsigned char *GeosWkbWriter_write(GeosWkbWriter *self,GeosGeometry const *g,size_t *size){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKBWriter_write(writer, geom, size);
-    }
-SWIGINTERN unsigned char *GeosWkbWriter_writeHEX(GeosWkbWriter *self,GeosGeometry const *g,size_t *size){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKBWriter_writeHEX(writer, geom, size);
-    }
-#ifdef __cplusplus
-extern "C" {
-#endif
-SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_SwigPyIterator",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  delete arg1;
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_value",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  try {
-    result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = result;
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_incr",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  try {
-    result = (swig::SwigPyIterator *)(arg1)->incr(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_incr",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  try {
-    result = (swig::SwigPyIterator *)(arg1)->incr();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) {
-  int argc;
-  PyObject *argv[3];
-  int ii;
-  
-  if (!PyTuple_Check(args)) SWIG_fail;
-  argc = args ? (int)PyObject_Length(args) : 0;
-  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
-    argv[ii] = PyTuple_GET_ITEM(args,ii);
-  }
-  if (argc == 1) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      return _wrap_SwigPyIterator_incr__SWIG_1(self, args);
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_size_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_SwigPyIterator_incr__SWIG_0(self, args);
-      }
-    }
-  }
-  
-fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n"
-    "  Possible C/C++ prototypes are:\n"
-    "    swig::SwigPyIterator::incr(size_t)\n"
-    "    swig::SwigPyIterator::incr()\n");
-  return 0;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_decr",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  try {
-    result = (swig::SwigPyIterator *)(arg1)->decr(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_decr",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  try {
-    result = (swig::SwigPyIterator *)(arg1)->decr();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) {
-  int argc;
-  PyObject *argv[3];
-  int ii;
-  
-  if (!PyTuple_Check(args)) SWIG_fail;
-  argc = args ? (int)PyObject_Length(args) : 0;
-  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
-    argv[ii] = PyTuple_GET_ITEM(args,ii);
-  }
-  if (argc == 1) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      return _wrap_SwigPyIterator_decr__SWIG_1(self, args);
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_size_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_SwigPyIterator_decr__SWIG_0(self, args);
-      }
-    }
-  }
-  
-fail:
-  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n"
-    "  Possible C/C++ prototypes are:\n"
-    "    swig::SwigPyIterator::decr(size_t)\n"
-    "    swig::SwigPyIterator::decr()\n");
-  return 0;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  swig::SwigPyIterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  ptrdiff_t result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_distance",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
-  try {
-    result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2);
-  }
-  catch(std::invalid_argument &_e) {
-    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;
-  }
-  
-  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  swig::SwigPyIterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_equal",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
-  try {
-    result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2);
-  }
-  catch(std::invalid_argument &_e) {
-    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;
-  }
-  
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_copy",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy();
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_next",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  try {
-    result = (PyObject *)(arg1)->next();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = result;
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator___next__",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  try {
-    result = (PyObject *)(arg1)->__next__();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = result;
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_previous",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  try {
-    result = (PyObject *)(arg1)->previous();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = result;
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator_advance",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::SwigPyIterator *)(arg1)->advance(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  swig::SwigPyIterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator___eq__",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
-  result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2);
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  swig::SwigPyIterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator___ne__",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
-  result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2);
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator___iadd__",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator___isub__",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator___add__",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  swig::SwigPyIterator *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator___sub__",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
-      SWIG_fail;
-    }
-  }
-  
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
-  swig::SwigPyIterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  ptrdiff_t result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"SwigPyIterator___sub__",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
-  }
-  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
-  }
-  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
-  result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2);
-  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) {
-  int argc;
-  PyObject *argv[3];
-  int ii;
-  
-  if (!PyTuple_Check(args)) SWIG_fail;
-  argc = args ? (int)PyObject_Length(args) : 0;
-  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
-    argv[ii] = PyTuple_GET_ITEM(args,ii);
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0);
-      _v = SWIG_CheckState(res);
-      if (_v) {
-        return _wrap_SwigPyIterator___sub____SWIG_1(self, args);
-      }
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_SwigPyIterator___sub____SWIG_0(self, args);
-      }
-    }
-  }
-  
-fail:
-  Py_INCREF(Py_NotImplemented);
-  return Py_NotImplemented;
-}
-
-
-SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  char *result = 0 ;
-  
-  result = (char *)GEOSversion();
-  resultobj = SWIG_FromCharPtr((const char *)result);
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_new_CoordinateSequence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  size_t arg1 ;
-  size_t arg2 ;
-  size_t val1 ;
-  int ecode1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"new_CoordinateSequence",2,2,&obj0,&obj1)) SWIG_fail;
-  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
-  if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CoordinateSequence" "', argument " "1"" of type '" "size_t""'");
-  } 
-  arg1 = static_cast< size_t >(val1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CoordinateSequence" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)new_GeosCoordinateSequence(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_NEW |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_CoordinateSequence(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_CoordinateSequence",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateSequence" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  {
-    try
-    {
-      delete_GeosCoordinateSequence(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_clone",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_clone" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)GeosCoordinateSequence_clone(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_setX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_setX",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_setX" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateSequence_setX" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_double(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateSequence_setX" "', argument " "3"" of type '" "double""'");
-  } 
-  arg3 = static_cast< double >(val3);
-  {
-    try
-    {
-      result = (int)GeosCoordinateSequence_setX(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_int(static_cast< int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_setY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_setY",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_setY" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateSequence_setY" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_double(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateSequence_setY" "', argument " "3"" of type '" "double""'");
-  } 
-  arg3 = static_cast< double >(val3);
-  {
-    try
-    {
-      result = (int)GeosCoordinateSequence_setY(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_int(static_cast< int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_setZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_setZ",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_setZ" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateSequence_setZ" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_double(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateSequence_setZ" "', argument " "3"" of type '" "double""'");
-  } 
-  arg3 = static_cast< double >(val3);
-  {
-    try
-    {
-      result = (int)GeosCoordinateSequence_setZ(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_int(static_cast< int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_setOrdinate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  size_t arg3 ;
-  double arg4 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  size_t val3 ;
-  int ecode3 = 0 ;
-  double val4 ;
-  int ecode4 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  PyObject * obj3 = 0 ;
-  int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_setOrdinate",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_setOrdinate" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateSequence_setOrdinate" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateSequence_setOrdinate" "', argument " "3"" of type '" "size_t""'");
-  } 
-  arg3 = static_cast< size_t >(val3);
-  ecode4 = SWIG_AsVal_double(obj3, &val4);
-  if (!SWIG_IsOK(ecode4)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateSequence_setOrdinate" "', argument " "4"" of type '" "double""'");
-  } 
-  arg4 = static_cast< double >(val4);
-  {
-    try
-    {
-      result = (int)GeosCoordinateSequence_setOrdinate(arg1,arg2,arg3,arg4);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_int(static_cast< int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_getX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  double result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_getX",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_getX" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateSequence_getX" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (double)GeosCoordinateSequence_getX(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_double(static_cast< double >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_getY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  double result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_getY",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_getY" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateSequence_getY" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (double)GeosCoordinateSequence_getY(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_double(static_cast< double >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_getZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  double result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_getZ",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_getZ" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateSequence_getZ" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (double)GeosCoordinateSequence_getZ(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_double(static_cast< double >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_getOrdinate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  size_t arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  size_t val3 ;
-  int ecode3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  double result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_getOrdinate",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_getOrdinate" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateSequence_getOrdinate" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateSequence_getOrdinate" "', argument " "3"" of type '" "size_t""'");
-  } 
-  arg3 = static_cast< size_t >(val3);
-  {
-    try
-    {
-      result = (double)GeosCoordinateSequence_getOrdinate(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_double(static_cast< double >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_getSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  unsigned int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_getSize",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_getSize" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  {
-    try
-    {
-      result = (unsigned int)GeosCoordinateSequence_getSize(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_CoordinateSequence_getDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  unsigned int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"CoordinateSequence_getDimensions",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateSequence_getDimensions" "', argument " "1"" of type '" "GeosCoordinateSequence *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  {
-    try
-    {
-      result = (unsigned int)GeosCoordinateSequence_getDimensions(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *CoordinateSequence_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosCoordinateSequence, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_Geometry",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      delete_GeosGeometry(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_clone",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_clone" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_clone(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_geomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  char *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_geomType",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_geomType" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (char *)GeosGeometry_geomType(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_FromCharPtr((const char *)result);
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_typeId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_typeId",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_typeId" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (int)GeosGeometry_typeId(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_int(static_cast< int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_normalize",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_normalize" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      GeosGeometry_normalize(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_getSRID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_getSRID",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_getSRID" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (int)GeosGeometry_getSRID(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_int(static_cast< int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_setSRID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  int arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_setSRID",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_setSRID" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  ecode2 = SWIG_AsVal_int(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_setSRID" "', argument " "2"" of type '" "int""'");
-  } 
-  arg2 = static_cast< int >(val2);
-  {
-    try
-    {
-      GeosGeometry_setSRID(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_getDimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  size_t result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_getDimensions",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_getDimensions" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = GeosGeometry_getDimensions(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_getNumGeometries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  size_t result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_getNumGeometries",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_getNumGeometries" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = GeosGeometry_getNumGeometries(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_intersection",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_intersection" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_intersection" "', argument " "2"" of type '" "GeosGeometry *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_intersection(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  double arg2 ;
-  int arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double val2 ;
-  int ecode2 = 0 ;
-  int val3 ;
-  int ecode3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  {
-    arg3 = DEFAULT_QUADRANT_SEGMENTS;
-  }
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_buffer",2,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_buffer" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  ecode2 = SWIG_AsVal_double(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_buffer" "', argument " "2"" of type '" "double""'");
-  } 
-  arg2 = static_cast< double >(val2);
-  if (obj2) {
-    ecode3 = SWIG_AsVal_int(obj2, &val3);
-    if (!SWIG_IsOK(ecode3)) {
-      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_buffer" "', argument " "3"" of type '" "int""'");
-    } 
-    arg3 = static_cast< int >(val3);
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_buffer(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_convexHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_convexHull",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_convexHull" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_convexHull(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_difference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_difference",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_difference" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_difference" "', argument " "2"" of type '" "GeosGeometry *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_difference(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_symDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_symDifference",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_symDifference" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_symDifference" "', argument " "2"" of type '" "GeosGeometry *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_symDifference(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_boundary",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_boundary" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_boundary(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_union",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_union" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_union" "', argument " "2"" of type '" "GeosGeometry *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_geomUnion(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_pointOnSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_pointOnSurface",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_pointOnSurface" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_pointOnSurface(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_getCentroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_getCentroid",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_getCentroid" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_getCentroid(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_getEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_getEnvelope",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_getEnvelope" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_getEnvelope(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | 0);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | 0);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | 0);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | 0);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | 0);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | 0);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | 0);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | 0);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_relate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  char *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_relate",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_relate" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_relate" "', argument " "2"" of type '" "GeosGeometry *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (char *)GeosGeometry_relate(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_FromCharPtr((const char *)result);
-  delete[] result;
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_lineMerge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_lineMerge",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_lineMerge" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_lineMerge(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_simplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  double arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_simplify",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_simplify" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  ecode2 = SWIG_AsVal_double(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_simplify" "', argument " "2"" of type '" "double""'");
-  } 
-  arg2 = static_cast< double >(val2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_simplify(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_topologyPreserveSimplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  double arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_topologyPreserveSimplify",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_topologyPreserveSimplify" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  ecode2 = SWIG_AsVal_double(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_topologyPreserveSimplify" "', argument " "2"" of type '" "double""'");
-  } 
-  arg2 = static_cast< double >(val2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_topologyPreserveSimplify(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_relatePattern(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  char *arg3 = (char *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  int res3 ;
-  char *buf3 = 0 ;
-  int alloc3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_relatePattern",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_relatePattern" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_relatePattern" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
-  if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Geometry_relatePattern" "', argument " "3"" of type '" "char const *""'");
-  }
-  arg3 = reinterpret_cast< char * >(buf3);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_relatePattern(arg1,(GeosGeometry const *)arg2,(char const *)arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
-  return resultobj;
-fail:
-  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_disjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_disjoint",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_disjoint" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_disjoint" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_disjoint(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_touches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_touches",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_touches" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_touches" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_touches(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_intersects",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_intersects" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_intersects" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_intersects(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_crosses(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_crosses",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_crosses" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_crosses" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_crosses(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_within(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_within",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_within" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_within" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_within(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_contains",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_contains" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_contains" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_contains(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_overlaps",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_overlaps" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_overlaps" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_overlaps(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_equals",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_equals" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_equals" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_equals(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_equalsExact(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_equalsExact",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_equalsExact" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_equalsExact" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  ecode3 = SWIG_AsVal_double(obj2, &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_equalsExact" "', argument " "3"" of type '" "double""'");
-  } 
-  arg3 = static_cast< double >(val3);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_equalsExact(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_isEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_isEmpty",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_isEmpty" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_isEmpty(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_isValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_isValid",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_isValid" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_isValid(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_isSimple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_isSimple",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_isSimple" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_isSimple(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_isRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_isRing",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_isRing" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_isRing(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_hasZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_hasZ",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_hasZ" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_hasZ(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  double result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_area",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_area" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (double)GeosGeometry_area(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_double(static_cast< double >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  double result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_length",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_length" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (double)GeosGeometry_length(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_double(static_cast< double >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Geometry_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  double result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Geometry_distance",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_distance" "', argument " "1"" of type '" "GeosGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_distance" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (double)GeosGeometry_distance(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_double(static_cast< double >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosGeometry, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_Point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPoint *arg1 = (GeosPoint *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_Point",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPoint, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Point" "', argument " "1"" of type '" "GeosPoint *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPoint * >(argp1);
-  {
-    try
-    {
-      delete_GeosPoint(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Point_getCoordSeq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPoint *arg1 = (GeosPoint *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Point_getCoordSeq",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPoint, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Point_getCoordSeq" "', argument " "1"" of type '" "GeosPoint *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPoint * >(argp1);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)GeosPoint_getCoordSeq(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *Point_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosPoint, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_LineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosLineString *arg1 = (GeosLineString *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_LineString",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosLineString, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LineString" "', argument " "1"" of type '" "GeosLineString *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosLineString * >(argp1);
-  {
-    try
-    {
-      delete_GeosLineString(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_LineString_getCoordSeq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosLineString *arg1 = (GeosLineString *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"LineString_getCoordSeq",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosLineString, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LineString_getCoordSeq" "', argument " "1"" of type '" "GeosLineString *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosLineString * >(argp1);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)GeosLineString_getCoordSeq(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *LineString_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosLineString, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_LinearRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosLinearRing *arg1 = (GeosLinearRing *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_LinearRing",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosLinearRing, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearRing" "', argument " "1"" of type '" "GeosLinearRing *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosLinearRing * >(argp1);
-  {
-    try
-    {
-      delete_GeosLinearRing(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_LinearRing_getCoordSeq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosLinearRing *arg1 = (GeosLinearRing *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"LinearRing_getCoordSeq",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosLinearRing, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearRing_getCoordSeq" "', argument " "1"" of type '" "GeosLinearRing *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosLinearRing * >(argp1);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)GeosLinearRing_getCoordSeq(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *LinearRing_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosLinearRing, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_Polygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPolygon *arg1 = (GeosPolygon *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_Polygon",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPolygon, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Polygon" "', argument " "1"" of type '" "GeosPolygon *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPolygon * >(argp1);
-  {
-    try
-    {
-      delete_GeosPolygon(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Polygon_getExteriorRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPolygon *arg1 = (GeosPolygon *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Polygon_getExteriorRing",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPolygon, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygon_getExteriorRing" "', argument " "1"" of type '" "GeosPolygon *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPolygon * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosPolygon_getExteriorRing(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | 0);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | 0);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | 0);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | 0);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | 0);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | 0);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | 0);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | 0);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Polygon_getNumInteriorRings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPolygon *arg1 = (GeosPolygon *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  size_t result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Polygon_getNumInteriorRings",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPolygon, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygon_getNumInteriorRings" "', argument " "1"" of type '" "GeosPolygon *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPolygon * >(argp1);
-  {
-    try
-    {
-      result = GeosPolygon_getNumInteriorRings(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Polygon_getInteriorRingN(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPolygon *arg1 = (GeosPolygon *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Polygon_getInteriorRingN",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPolygon, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Polygon_getInteriorRingN" "', argument " "1"" of type '" "GeosPolygon *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPolygon * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Polygon_getInteriorRingN" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosPolygon_getInteriorRingN(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | 0);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | 0);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | 0);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | 0);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | 0);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | 0);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | 0);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | 0);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *Polygon_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosPolygon, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_GeometryCollection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometryCollection *arg1 = (GeosGeometryCollection *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_GeometryCollection",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometryCollection, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeometryCollection" "', argument " "1"" of type '" "GeosGeometryCollection *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometryCollection * >(argp1);
-  {
-    try
-    {
-      delete_GeosGeometryCollection(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_GeometryCollection_getGeometryN(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometryCollection *arg1 = (GeosGeometryCollection *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"GeometryCollection_getGeometryN",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometryCollection, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeometryCollection_getGeometryN" "', argument " "1"" of type '" "GeosGeometryCollection *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometryCollection * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeometryCollection_getGeometryN" "', argument " "2"" of type '" "size_t""'");
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometryCollection_getGeometryN(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | 0);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | 0);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | 0);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | 0);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | 0);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | 0);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | 0);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | 0);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *GeometryCollection_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosGeometryCollection, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_MultiPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosMultiPoint *arg1 = (GeosMultiPoint *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_MultiPoint",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosMultiPoint, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiPoint" "', argument " "1"" of type '" "GeosMultiPoint *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosMultiPoint * >(argp1);
-  {
-    try
-    {
-      delete_GeosMultiPoint(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *MultiPoint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosMultiPoint, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_MultiLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosMultiLineString *arg1 = (GeosMultiLineString *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_MultiLineString",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosMultiLineString, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiLineString" "', argument " "1"" of type '" "GeosMultiLineString *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosMultiLineString * >(argp1);
-  {
-    try
-    {
-      delete_GeosMultiLineString(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *MultiLineString_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosMultiLineString, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_MultiLinearRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosMultiLinearRing *arg1 = (GeosMultiLinearRing *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_MultiLinearRing",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosMultiLinearRing, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiLinearRing" "', argument " "1"" of type '" "GeosMultiLinearRing *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosMultiLinearRing * >(argp1);
-  {
-    try
-    {
-      delete_GeosMultiLinearRing(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *MultiLinearRing_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosMultiLinearRing, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_delete_MultiPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosMultiPolygon *arg1 = (GeosMultiPolygon *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_MultiPolygon",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosMultiPolygon, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiPolygon" "', argument " "1"" of type '" "GeosMultiPolygon *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosMultiPolygon * >(argp1);
-  {
-    try
-    {
-      delete_GeosMultiPolygon(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *MultiPolygon_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosMultiPolygon, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_createPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"createPoint",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createPoint" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)createPoint(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_createLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"createLineString",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createLineString" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)createLineString(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_createLinearRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"createLinearRing",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createLinearRing" "', argument " "1"" of type '" "GeosCoordinateSequence *""'");
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)createLinearRing(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_createPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosLinearRing *arg1 = (GeosLinearRing *) 0 ;
-  GeosLinearRing **arg2 = (GeosLinearRing **) 0 ;
-  size_t arg3 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  {
-    arg2 = NULL;
-    arg3 = 0;
-  }
-  if(!PyArg_UnpackTuple(args,(char *)"createPolygon",1,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_GeosLinearRing, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
-  }
-  if (obj1) {
-    {
-      if (obj1 == Py_None)
-      {
-        arg2 = NULL;
-        arg3 = 0;
-      }
-      else
-      {
-        /* Make sure the input can be treated as an array. */
-        if (!PySequence_Check(obj1))
-        SWIG_exception_fail(SWIG_RuntimeError, "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
-        
-        /* Get the length */
-        arg3 = PySequence_Size(obj1);
-        
-        /* Allocate space for the C array. */
-        arg2 = (GeosLinearRing**) malloc(arg3*sizeof(GeosLinearRing*));
-        
-        for(size_t i = 0; i<arg3; i++)
-        {
-          /* Get the Python Object */
-          PyObject *item = PySequence_GetItem(obj1,i);
-          
-          /* Get the underlying pointer and give up ownership of it. */
-          GeosLinearRing *ring = NULL;
-          int convertResult = SWIG_ConvertPtr(item, (void**)&ring, SWIGTYPE_p_GeosLinearRing, SWIG_POINTER_DISOWN);
-          if (!SWIG_IsOK(convertResult)) {
-            SWIG_exception_fail(SWIG_ArgError(convertResult), "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
-          }
-          
-          /* Put the pointer in the array */
-          arg2[i] = ring;
-        }    
-      }
-    }
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)createPolygon(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  {
-    if (arg2) {
-      free((void*) arg2);
-    }
-  }
-  return resultobj;
-fail:
-  {
-    if (arg2) {
-      free((void*) arg2);
-    }
-  }
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_new_Prepared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosPreparedGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"new_Prepared",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Prepared" "', argument " "1"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosPreparedGeometry *)new_GeosPreparedGeometry((GeosGeometry const *)arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPreparedGeometry, SWIG_POINTER_NEW |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_Prepared(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_Prepared",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPreparedGeometry, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Prepared" "', argument " "1"" of type '" "GeosPreparedGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  {
-    try
-    {
-      delete_GeosPreparedGeometry(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Prepared_contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Prepared_contains",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPreparedGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prepared_contains" "', argument " "1"" of type '" "GeosPreparedGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Prepared_contains" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosPreparedGeometry_contains(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Prepared_containsProperly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Prepared_containsProperly",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPreparedGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prepared_containsProperly" "', argument " "1"" of type '" "GeosPreparedGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Prepared_containsProperly" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosPreparedGeometry_containsProperly(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Prepared_covers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Prepared_covers",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPreparedGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prepared_covers" "', argument " "1"" of type '" "GeosPreparedGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Prepared_covers" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosPreparedGeometry_covers(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_Prepared_intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"Prepared_intersects",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosPreparedGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Prepared_intersects" "', argument " "1"" of type '" "GeosPreparedGeometry *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Prepared_intersects" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosPreparedGeometry_intersects(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *Prepared_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosPreparedGeometry, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_new_STRtree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  int arg1 ;
-  int val1 ;
-  int ecode1 = 0 ;
-  PyObject * obj0 = 0 ;
-  GeosSTRtree *result = 0 ;
-  
-  {
-    arg1 = 10;
-  }
-  if(!PyArg_UnpackTuple(args,(char *)"new_STRtree",0,1,&obj0)) SWIG_fail;
-  if (obj0) {
-    ecode1 = SWIG_AsVal_int(obj0, &val1);
-    if (!SWIG_IsOK(ecode1)) {
-      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_STRtree" "', argument " "1"" of type '" "int""'");
-    } 
-    arg1 = static_cast< int >(val1);
-  }
-  {
-    try
-    {
-      result = (GeosSTRtree *)new_GeosSTRtree(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosSTRtree, SWIG_POINTER_NEW |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_STRtree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_STRtree",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosSTRtree, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_STRtree" "', argument " "1"" of type '" "GeosSTRtree *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  {
-    try
-    {
-      delete_GeosSTRtree(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_STRtree_insert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  GeosIndexItem arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  void *argp3 ;
-  int res3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"STRtree_insert",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosSTRtree, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "STRtree_insert" "', argument " "1"" of type '" "GeosSTRtree *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "STRtree_insert" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_GeosIndexItem,  0  | 0);
-    if (!SWIG_IsOK(res3)) {
-      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "STRtree_insert" "', argument " "3"" of type '" "GeosIndexItem""'"); 
-    }  
-    if (!argp3) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "STRtree_insert" "', argument " "3"" of type '" "GeosIndexItem""'");
-    } else {
-      GeosIndexItem * temp = reinterpret_cast< GeosIndexItem * >(argp3);
-      arg3 = *temp;
-      if (SWIG_IsNewObj(res3)) delete temp;
-    }
-  }
-  {
-    try
-    {
-      GeosSTRtree_insert(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_STRtree_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  GeosIndexItem arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  void *argp3 ;
-  int res3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"STRtree_remove",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosSTRtree, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "STRtree_remove" "', argument " "1"" of type '" "GeosSTRtree *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "STRtree_remove" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_GeosIndexItem,  0  | 0);
-    if (!SWIG_IsOK(res3)) {
-      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "STRtree_remove" "', argument " "3"" of type '" "GeosIndexItem""'"); 
-    }  
-    if (!argp3) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "STRtree_remove" "', argument " "3"" of type '" "GeosIndexItem""'");
-    } else {
-      GeosIndexItem * temp = reinterpret_cast< GeosIndexItem * >(argp3);
-      arg3 = *temp;
-      if (SWIG_IsNewObj(res3)) delete temp;
-    }
-  }
-  {
-    try
-    {
-      GeosSTRtree_remove(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_STRtree_query(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  GeosQueryCallback arg3 ;
-  GeosIndexItem arg4 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  void *argp3 ;
-  int res3 = 0 ;
-  void *argp4 ;
-  int res4 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  PyObject * obj3 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"STRtree_query",4,4,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosSTRtree, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "STRtree_query" "', argument " "1"" of type '" "GeosSTRtree *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "STRtree_query" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_GeosQueryCallback,  0  | 0);
-    if (!SWIG_IsOK(res3)) {
-      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "STRtree_query" "', argument " "3"" of type '" "GeosQueryCallback""'"); 
-    }  
-    if (!argp3) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "STRtree_query" "', argument " "3"" of type '" "GeosQueryCallback""'");
-    } else {
-      GeosQueryCallback * temp = reinterpret_cast< GeosQueryCallback * >(argp3);
-      arg3 = *temp;
-      if (SWIG_IsNewObj(res3)) delete temp;
-    }
-  }
-  {
-    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_GeosIndexItem,  0  | 0);
-    if (!SWIG_IsOK(res4)) {
-      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "STRtree_query" "', argument " "4"" of type '" "GeosIndexItem""'"); 
-    }  
-    if (!argp4) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "STRtree_query" "', argument " "4"" of type '" "GeosIndexItem""'");
-    } else {
-      GeosIndexItem * temp = reinterpret_cast< GeosIndexItem * >(argp4);
-      arg4 = *temp;
-      if (SWIG_IsNewObj(res4)) delete temp;
-    }
-  }
-  {
-    try
-    {
-      GeosSTRtree_query(arg1,(GeosGeometry const *)arg2,arg3,arg4);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_STRtree_iterate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  GeosQueryCallback arg2 ;
-  GeosIndexItem arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 ;
-  int res2 = 0 ;
-  void *argp3 ;
-  int res3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  PyObject * obj2 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"STRtree_iterate",3,3,&obj0,&obj1,&obj2)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosSTRtree, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "STRtree_iterate" "', argument " "1"" of type '" "GeosSTRtree *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  {
-    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_GeosQueryCallback,  0  | 0);
-    if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "STRtree_iterate" "', argument " "2"" of type '" "GeosQueryCallback""'"); 
-    }  
-    if (!argp2) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "STRtree_iterate" "', argument " "2"" of type '" "GeosQueryCallback""'");
-    } else {
-      GeosQueryCallback * temp = reinterpret_cast< GeosQueryCallback * >(argp2);
-      arg2 = *temp;
-      if (SWIG_IsNewObj(res2)) delete temp;
-    }
-  }
-  {
-    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_GeosIndexItem,  0  | 0);
-    if (!SWIG_IsOK(res3)) {
-      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "STRtree_iterate" "', argument " "3"" of type '" "GeosIndexItem""'"); 
-    }  
-    if (!argp3) {
-      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "STRtree_iterate" "', argument " "3"" of type '" "GeosIndexItem""'");
-    } else {
-      GeosIndexItem * temp = reinterpret_cast< GeosIndexItem * >(argp3);
-      arg3 = *temp;
-      if (SWIG_IsNewObj(res3)) delete temp;
-    }
-  }
-  {
-    try
-    {
-      GeosSTRtree_iterate(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *STRtree_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosSTRtree, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_new_WktReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWktReader *result = 0 ;
-  
-  {
-    try
-    {
-      result = (GeosWktReader *)new_GeosWktReader();
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosWktReader, SWIG_POINTER_NEW |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_WktReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWktReader *arg1 = (GeosWktReader *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_WktReader",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWktReader, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WktReader" "', argument " "1"" of type '" "GeosWktReader *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWktReader * >(argp1);
-  {
-    try
-    {
-      delete_GeosWktReader(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WktReader_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWktReader *arg1 = (GeosWktReader *) 0 ;
-  char *arg2 = (char *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int res2 ;
-  char *buf2 = 0 ;
-  int alloc2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WktReader_read",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWktReader, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WktReader_read" "', argument " "1"" of type '" "GeosWktReader *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWktReader * >(argp1);
-  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WktReader_read" "', argument " "2"" of type '" "char const *""'");
-  }
-  arg2 = reinterpret_cast< char * >(buf2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosWktReader_read(arg1,(char const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-  return resultobj;
-fail:
-  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *WktReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosWktReader, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_new_WktWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWktWriter *result = 0 ;
-  
-  {
-    try
-    {
-      result = (GeosWktWriter *)new_GeosWktWriter();
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosWktWriter, SWIG_POINTER_NEW |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_WktWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWktWriter *arg1 = (GeosWktWriter *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_WktWriter",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWktWriter, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WktWriter" "', argument " "1"" of type '" "GeosWktWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWktWriter * >(argp1);
-  {
-    try
-    {
-      delete_GeosWktWriter(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WktWriter_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWktWriter *arg1 = (GeosWktWriter *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  char *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WktWriter_write",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWktWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WktWriter_write" "', argument " "1"" of type '" "GeosWktWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWktWriter * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WktWriter_write" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (char *)GeosWktWriter_write(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_FromCharPtr((const char *)result);
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *WktWriter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosWktWriter, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_new_WkbReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbReader *result = 0 ;
-  
-  {
-    try
-    {
-      result = (GeosWkbReader *)new_GeosWkbReader();
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosWkbReader, SWIG_POINTER_NEW |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_WkbReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbReader *arg1 = (GeosWkbReader *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_WkbReader",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbReader, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WkbReader" "', argument " "1"" of type '" "GeosWkbReader *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbReader * >(argp1);
-  {
-    try
-    {
-      delete_GeosWkbReader(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbReader_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbReader *arg1 = (GeosWkbReader *) 0 ;
-  unsigned char *arg2 = (unsigned char *) 0 ;
-  size_t arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int alloc2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WkbReader_read",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbReader, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbReader_read" "', argument " "1"" of type '" "GeosWkbReader *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbReader * >(argp1);
-  {
-    /* %typemap(in) (const unsigned char* wkb, size_t size) (int alloc2 = 0) */
-    if (SWIG_AsCharPtrAndSize(obj1, (char**)&arg2, &arg3, &alloc2) != SWIG_OK)
-    SWIG_exception(SWIG_RuntimeError, "Expecting a string");
-    /* Don't want to include last null character! */
-    arg3--;
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosWkbReader_read(arg1,(unsigned char const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbReader_readHEX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbReader *arg1 = (GeosWkbReader *) 0 ;
-  unsigned char *arg2 = (unsigned char *) 0 ;
-  size_t arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int alloc2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  GeosGeometry *result = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WkbReader_readHEX",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbReader, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbReader_readHEX" "', argument " "1"" of type '" "GeosWkbReader *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbReader * >(argp1);
-  {
-    /* %typemap(in) (const unsigned char* wkb, size_t size) (int alloc2 = 0) */
-    if (SWIG_AsCharPtrAndSize(obj1, (char**)&arg2, &arg3, &alloc2) != SWIG_OK)
-    SWIG_exception(SWIG_RuntimeError, "Expecting a string");
-    /* Don't want to include last null character! */
-    arg3--;
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosWkbReader_readHEX(arg1,(unsigned char const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *WkbReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosWkbReader, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-SWIGINTERN PyObject *_wrap_new_WkbWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *result = 0 ;
-  
-  {
-    try
-    {
-      result = (GeosWkbWriter *)new_GeosWkbWriter();
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosWkbWriter, SWIG_POINTER_NEW |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_delete_WkbWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"delete_WkbWriter",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WkbWriter" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  {
-    try
-    {
-      delete_GeosWkbWriter(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbWriter_getOutputDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WkbWriter_getOutputDimension",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbWriter_getOutputDimension" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  {
-    try
-    {
-      result = (int)GeosWkbWriter_getOutputDimension(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_int(static_cast< int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbWriter_setOutputDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  int arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WkbWriter_setOutputDimension",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbWriter_setOutputDimension" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  ecode2 = SWIG_AsVal_int(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WkbWriter_setOutputDimension" "', argument " "2"" of type '" "int""'");
-  } 
-  arg2 = static_cast< int >(val2);
-  {
-    try
-    {
-      GeosWkbWriter_setOutputDimension(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbWriter_getByteOrder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  int result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WkbWriter_getByteOrder",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbWriter_getByteOrder" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  {
-    try
-    {
-      result = (int)GeosWkbWriter_getByteOrder(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_int(static_cast< int >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbWriter_setByteOrder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  int arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WkbWriter_setByteOrder",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbWriter_setByteOrder" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  ecode2 = SWIG_AsVal_int(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WkbWriter_setByteOrder" "', argument " "2"" of type '" "int""'");
-  } 
-  arg2 = static_cast< int >(val2);
-  {
-    try
-    {
-      GeosWkbWriter_setByteOrder(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbWriter_getIncludeSRID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject * obj0 = 0 ;
-  bool result;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WkbWriter_getIncludeSRID",1,1,&obj0)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbWriter_getIncludeSRID" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosWkbWriter_getIncludeSRID(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_From_bool(static_cast< bool >(result));
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbWriter_setIncludeSRID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  bool arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  bool val2 ;
-  int ecode2 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  
-  if(!PyArg_UnpackTuple(args,(char *)"WkbWriter_setIncludeSRID",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbWriter_setIncludeSRID" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  ecode2 = SWIG_AsVal_bool(obj1, &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WkbWriter_setIncludeSRID" "', argument " "2"" of type '" "bool""'");
-  } 
-  arg2 = static_cast< bool >(val2);
-  {
-    try
-    {
-      GeosWkbWriter_setIncludeSRID(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbWriter_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  size_t *arg3 = (size_t *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  size_t temp3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  unsigned char *result = 0 ;
-  
-  {
-    /* %typemap(in, numinputs=0) size_t *size (size_t temp3 = 0) */
-    arg3 = &temp3;
-  }
-  if(!PyArg_UnpackTuple(args,(char *)"WkbWriter_write",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbWriter_write" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WkbWriter_write" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (unsigned char *)GeosWkbWriter_write(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) unsigned char* */
-  }
-  {
-    /* %typemap(argout) size_t *size */
-    resultobj = SWIG_FromCharPtrAndSize((const char*)result, *arg3);
-  }
-  {
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-  }
-  return resultobj;
-fail:
-  {
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-  }
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *_wrap_WkbWriter_writeHEX(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  size_t *arg3 = (size_t *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  size_t temp3 = 0 ;
-  PyObject * obj0 = 0 ;
-  PyObject * obj1 = 0 ;
-  unsigned char *result = 0 ;
-  
-  {
-    /* %typemap(in, numinputs=0) size_t *size (size_t temp3 = 0) */
-    arg3 = &temp3;
-  }
-  if(!PyArg_UnpackTuple(args,(char *)"WkbWriter_writeHEX",2,2,&obj0,&obj1)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WkbWriter_writeHEX" "', argument " "1"" of type '" "GeosWkbWriter *""'"); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WkbWriter_writeHEX" "', argument " "2"" of type '" "GeosGeometry const *""'"); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (unsigned char *)GeosWkbWriter_writeHEX(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) unsigned char* */
-  }
-  {
-    /* %typemap(argout) size_t *size */
-    resultobj = SWIG_FromCharPtrAndSize((const char*)result, *arg3);
-  }
-  {
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-  }
-  return resultobj;
-fail:
-  {
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-  }
-  return NULL;
-}
-
-
-SWIGINTERN PyObject *WkbWriter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *obj;
-  if (!PyArg_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
-  SWIG_TypeNewClientData(SWIGTYPE_p_GeosWkbWriter, SWIG_NewClientData(obj));
-  return SWIG_Py_Void();
-}
-
-static PyMethodDef SwigMethods[] = {
-	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
-	 { (char *)"delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL},
-	 { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL},
-	 { (char *)"version", _wrap_version, METH_VARARGS, NULL},
-	 { (char *)"new_CoordinateSequence", _wrap_new_CoordinateSequence, METH_VARARGS, NULL},
-	 { (char *)"delete_CoordinateSequence", _wrap_delete_CoordinateSequence, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_clone", _wrap_CoordinateSequence_clone, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_setX", _wrap_CoordinateSequence_setX, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_setY", _wrap_CoordinateSequence_setY, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_setZ", _wrap_CoordinateSequence_setZ, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_setOrdinate", _wrap_CoordinateSequence_setOrdinate, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_getX", _wrap_CoordinateSequence_getX, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_getY", _wrap_CoordinateSequence_getY, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_getZ", _wrap_CoordinateSequence_getZ, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_getOrdinate", _wrap_CoordinateSequence_getOrdinate, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_getSize", _wrap_CoordinateSequence_getSize, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_getDimensions", _wrap_CoordinateSequence_getDimensions, METH_VARARGS, NULL},
-	 { (char *)"CoordinateSequence_swigregister", CoordinateSequence_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, NULL},
-	 { (char *)"Geometry_clone", _wrap_Geometry_clone, METH_VARARGS, NULL},
-	 { (char *)"Geometry_geomType", _wrap_Geometry_geomType, METH_VARARGS, NULL},
-	 { (char *)"Geometry_typeId", _wrap_Geometry_typeId, METH_VARARGS, NULL},
-	 { (char *)"Geometry_normalize", _wrap_Geometry_normalize, METH_VARARGS, NULL},
-	 { (char *)"Geometry_getSRID", _wrap_Geometry_getSRID, METH_VARARGS, NULL},
-	 { (char *)"Geometry_setSRID", _wrap_Geometry_setSRID, METH_VARARGS, NULL},
-	 { (char *)"Geometry_getDimensions", _wrap_Geometry_getDimensions, METH_VARARGS, NULL},
-	 { (char *)"Geometry_getNumGeometries", _wrap_Geometry_getNumGeometries, METH_VARARGS, NULL},
-	 { (char *)"Geometry_intersection", _wrap_Geometry_intersection, METH_VARARGS, NULL},
-	 { (char *)"Geometry_buffer", _wrap_Geometry_buffer, METH_VARARGS, NULL},
-	 { (char *)"Geometry_convexHull", _wrap_Geometry_convexHull, METH_VARARGS, NULL},
-	 { (char *)"Geometry_difference", _wrap_Geometry_difference, METH_VARARGS, NULL},
-	 { (char *)"Geometry_symDifference", _wrap_Geometry_symDifference, METH_VARARGS, NULL},
-	 { (char *)"Geometry_boundary", _wrap_Geometry_boundary, METH_VARARGS, NULL},
-	 { (char *)"Geometry_union", _wrap_Geometry_union, METH_VARARGS, NULL},
-	 { (char *)"Geometry_pointOnSurface", _wrap_Geometry_pointOnSurface, METH_VARARGS, NULL},
-	 { (char *)"Geometry_getCentroid", _wrap_Geometry_getCentroid, METH_VARARGS, NULL},
-	 { (char *)"Geometry_getEnvelope", _wrap_Geometry_getEnvelope, METH_VARARGS, NULL},
-	 { (char *)"Geometry_relate", _wrap_Geometry_relate, METH_VARARGS, NULL},
-	 { (char *)"Geometry_lineMerge", _wrap_Geometry_lineMerge, METH_VARARGS, NULL},
-	 { (char *)"Geometry_simplify", _wrap_Geometry_simplify, METH_VARARGS, NULL},
-	 { (char *)"Geometry_topologyPreserveSimplify", _wrap_Geometry_topologyPreserveSimplify, METH_VARARGS, NULL},
-	 { (char *)"Geometry_relatePattern", _wrap_Geometry_relatePattern, METH_VARARGS, NULL},
-	 { (char *)"Geometry_disjoint", _wrap_Geometry_disjoint, METH_VARARGS, NULL},
-	 { (char *)"Geometry_touches", _wrap_Geometry_touches, METH_VARARGS, NULL},
-	 { (char *)"Geometry_intersects", _wrap_Geometry_intersects, METH_VARARGS, NULL},
-	 { (char *)"Geometry_crosses", _wrap_Geometry_crosses, METH_VARARGS, NULL},
-	 { (char *)"Geometry_within", _wrap_Geometry_within, METH_VARARGS, NULL},
-	 { (char *)"Geometry_contains", _wrap_Geometry_contains, METH_VARARGS, NULL},
-	 { (char *)"Geometry_overlaps", _wrap_Geometry_overlaps, METH_VARARGS, NULL},
-	 { (char *)"Geometry_equals", _wrap_Geometry_equals, METH_VARARGS, NULL},
-	 { (char *)"Geometry_equalsExact", _wrap_Geometry_equalsExact, METH_VARARGS, NULL},
-	 { (char *)"Geometry_isEmpty", _wrap_Geometry_isEmpty, METH_VARARGS, NULL},
-	 { (char *)"Geometry_isValid", _wrap_Geometry_isValid, METH_VARARGS, NULL},
-	 { (char *)"Geometry_isSimple", _wrap_Geometry_isSimple, METH_VARARGS, NULL},
-	 { (char *)"Geometry_isRing", _wrap_Geometry_isRing, METH_VARARGS, NULL},
-	 { (char *)"Geometry_hasZ", _wrap_Geometry_hasZ, METH_VARARGS, NULL},
-	 { (char *)"Geometry_area", _wrap_Geometry_area, METH_VARARGS, NULL},
-	 { (char *)"Geometry_length", _wrap_Geometry_length, METH_VARARGS, NULL},
-	 { (char *)"Geometry_distance", _wrap_Geometry_distance, METH_VARARGS, NULL},
-	 { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_Point", _wrap_delete_Point, METH_VARARGS, NULL},
-	 { (char *)"Point_getCoordSeq", _wrap_Point_getCoordSeq, METH_VARARGS, NULL},
-	 { (char *)"Point_swigregister", Point_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_LineString", _wrap_delete_LineString, METH_VARARGS, NULL},
-	 { (char *)"LineString_getCoordSeq", _wrap_LineString_getCoordSeq, METH_VARARGS, NULL},
-	 { (char *)"LineString_swigregister", LineString_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_LinearRing", _wrap_delete_LinearRing, METH_VARARGS, NULL},
-	 { (char *)"LinearRing_getCoordSeq", _wrap_LinearRing_getCoordSeq, METH_VARARGS, NULL},
-	 { (char *)"LinearRing_swigregister", LinearRing_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_Polygon", _wrap_delete_Polygon, METH_VARARGS, NULL},
-	 { (char *)"Polygon_getExteriorRing", _wrap_Polygon_getExteriorRing, METH_VARARGS, NULL},
-	 { (char *)"Polygon_getNumInteriorRings", _wrap_Polygon_getNumInteriorRings, METH_VARARGS, NULL},
-	 { (char *)"Polygon_getInteriorRingN", _wrap_Polygon_getInteriorRingN, METH_VARARGS, NULL},
-	 { (char *)"Polygon_swigregister", Polygon_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_GeometryCollection", _wrap_delete_GeometryCollection, METH_VARARGS, NULL},
-	 { (char *)"GeometryCollection_getGeometryN", _wrap_GeometryCollection_getGeometryN, METH_VARARGS, NULL},
-	 { (char *)"GeometryCollection_swigregister", GeometryCollection_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_MultiPoint", _wrap_delete_MultiPoint, METH_VARARGS, NULL},
-	 { (char *)"MultiPoint_swigregister", MultiPoint_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_MultiLineString", _wrap_delete_MultiLineString, METH_VARARGS, NULL},
-	 { (char *)"MultiLineString_swigregister", MultiLineString_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_MultiLinearRing", _wrap_delete_MultiLinearRing, METH_VARARGS, NULL},
-	 { (char *)"MultiLinearRing_swigregister", MultiLinearRing_swigregister, METH_VARARGS, NULL},
-	 { (char *)"delete_MultiPolygon", _wrap_delete_MultiPolygon, METH_VARARGS, NULL},
-	 { (char *)"MultiPolygon_swigregister", MultiPolygon_swigregister, METH_VARARGS, NULL},
-	 { (char *)"createPoint", _wrap_createPoint, METH_VARARGS, NULL},
-	 { (char *)"createLineString", _wrap_createLineString, METH_VARARGS, NULL},
-	 { (char *)"createLinearRing", _wrap_createLinearRing, METH_VARARGS, NULL},
-	 { (char *)"createPolygon", _wrap_createPolygon, METH_VARARGS, NULL},
-	 { (char *)"new_Prepared", _wrap_new_Prepared, METH_VARARGS, NULL},
-	 { (char *)"delete_Prepared", _wrap_delete_Prepared, METH_VARARGS, NULL},
-	 { (char *)"Prepared_contains", _wrap_Prepared_contains, METH_VARARGS, NULL},
-	 { (char *)"Prepared_containsProperly", _wrap_Prepared_containsProperly, METH_VARARGS, NULL},
-	 { (char *)"Prepared_covers", _wrap_Prepared_covers, METH_VARARGS, NULL},
-	 { (char *)"Prepared_intersects", _wrap_Prepared_intersects, METH_VARARGS, NULL},
-	 { (char *)"Prepared_swigregister", Prepared_swigregister, METH_VARARGS, NULL},
-	 { (char *)"new_STRtree", _wrap_new_STRtree, METH_VARARGS, NULL},
-	 { (char *)"delete_STRtree", _wrap_delete_STRtree, METH_VARARGS, NULL},
-	 { (char *)"STRtree_insert", _wrap_STRtree_insert, METH_VARARGS, NULL},
-	 { (char *)"STRtree_remove", _wrap_STRtree_remove, METH_VARARGS, NULL},
-	 { (char *)"STRtree_query", _wrap_STRtree_query, METH_VARARGS, NULL},
-	 { (char *)"STRtree_iterate", _wrap_STRtree_iterate, METH_VARARGS, NULL},
-	 { (char *)"STRtree_swigregister", STRtree_swigregister, METH_VARARGS, NULL},
-	 { (char *)"new_WktReader", _wrap_new_WktReader, METH_VARARGS, NULL},
-	 { (char *)"delete_WktReader", _wrap_delete_WktReader, METH_VARARGS, NULL},
-	 { (char *)"WktReader_read", _wrap_WktReader_read, METH_VARARGS, NULL},
-	 { (char *)"WktReader_swigregister", WktReader_swigregister, METH_VARARGS, NULL},
-	 { (char *)"new_WktWriter", _wrap_new_WktWriter, METH_VARARGS, NULL},
-	 { (char *)"delete_WktWriter", _wrap_delete_WktWriter, METH_VARARGS, NULL},
-	 { (char *)"WktWriter_write", _wrap_WktWriter_write, METH_VARARGS, NULL},
-	 { (char *)"WktWriter_swigregister", WktWriter_swigregister, METH_VARARGS, NULL},
-	 { (char *)"new_WkbReader", _wrap_new_WkbReader, METH_VARARGS, NULL},
-	 { (char *)"delete_WkbReader", _wrap_delete_WkbReader, METH_VARARGS, NULL},
-	 { (char *)"WkbReader_read", _wrap_WkbReader_read, METH_VARARGS, NULL},
-	 { (char *)"WkbReader_readHEX", _wrap_WkbReader_readHEX, METH_VARARGS, NULL},
-	 { (char *)"WkbReader_swigregister", WkbReader_swigregister, METH_VARARGS, NULL},
-	 { (char *)"new_WkbWriter", _wrap_new_WkbWriter, METH_VARARGS, NULL},
-	 { (char *)"delete_WkbWriter", _wrap_delete_WkbWriter, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_getOutputDimension", _wrap_WkbWriter_getOutputDimension, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_setOutputDimension", _wrap_WkbWriter_setOutputDimension, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_getByteOrder", _wrap_WkbWriter_getByteOrder, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_setByteOrder", _wrap_WkbWriter_setByteOrder, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_getIncludeSRID", _wrap_WkbWriter_getIncludeSRID, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_setIncludeSRID", _wrap_WkbWriter_setIncludeSRID, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_write", _wrap_WkbWriter_write, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_writeHEX", _wrap_WkbWriter_writeHEX, METH_VARARGS, NULL},
-	 { (char *)"WkbWriter_swigregister", WkbWriter_swigregister, METH_VARARGS, NULL},
-	 { NULL, NULL, 0, NULL }
-};
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-
-static void *_p_GeosMultiPolygonTo_p_GeosGeometryCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometryCollection *)  ((GeosMultiPolygon *) x));
-}
-static void *_p_GeosMultiPointTo_p_GeosGeometryCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometryCollection *)  ((GeosMultiPoint *) x));
-}
-static void *_p_GeosMultiLineStringTo_p_GeosGeometryCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometryCollection *)  ((GeosMultiLineString *) x));
-}
-static void *_p_GeosMultiLinearRingTo_p_GeosGeometryCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometryCollection *)  ((GeosMultiLinearRing *) x));
-}
-static void *_p_GeosPolygonTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosPolygon *) x));
-}
-static void *_p_GeosMultiPolygonTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *) (GeosGeometryCollection *) ((GeosMultiPolygon *) x));
-}
-static void *_p_GeosPointTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosPoint *) x));
-}
-static void *_p_GeosLineStringTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosLineString *) x));
-}
-static void *_p_GeosLinearRingTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosLinearRing *) x));
-}
-static void *_p_GeosMultiPointTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *) (GeosGeometryCollection *) ((GeosMultiPoint *) x));
-}
-static void *_p_GeosMultiLineStringTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *) (GeosGeometryCollection *) ((GeosMultiLineString *) x));
-}
-static void *_p_GeosMultiLinearRingTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *) (GeosGeometryCollection *) ((GeosMultiLinearRing *) x));
-}
-static void *_p_GeosGeometryCollectionTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosGeometryCollection *) x));
-}
-static swig_type_info _swigt__p_GeosCoordinateSequence = {"_p_GeosCoordinateSequence", "GeosCoordinateSequence *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosGeometry = {"_p_GeosGeometry", "GeosGeometry *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosGeometryCollection = {"_p_GeosGeometryCollection", "GeosGeometryCollection *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosIndexItem = {"_p_GeosIndexItem", "GeosIndexItem *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosLineString = {"_p_GeosLineString", "GeosLineString *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosLinearRing = {"_p_GeosLinearRing", "GeosLinearRing *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosMultiLineString = {"_p_GeosMultiLineString", "GeosMultiLineString *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosMultiLinearRing = {"_p_GeosMultiLinearRing", "GeosMultiLinearRing *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosMultiPoint = {"_p_GeosMultiPoint", "GeosMultiPoint *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosMultiPolygon = {"_p_GeosMultiPolygon", "GeosMultiPolygon *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosPoint = {"_p_GeosPoint", "GeosPoint *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosPolygon = {"_p_GeosPolygon", "GeosPolygon *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosPreparedGeometry = {"_p_GeosPreparedGeometry", "GeosPreparedGeometry *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosQueryCallback = {"_p_GeosQueryCallback", "GeosQueryCallback *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosSTRtree = {"_p_GeosSTRtree", "GeosSTRtree *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosWkbReader = {"_p_GeosWkbReader", "GeosWkbReader *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosWkbWriter = {"_p_GeosWkbWriter", "GeosWkbWriter *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosWktReader = {"_p_GeosWktReader", "GeosWktReader *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosWktWriter = {"_p_GeosWktWriter", "GeosWktWriter *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_p_GeosLinearRing = {"_p_p_GeosLinearRing", "GeosLinearRing **", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0};
-
-static swig_type_info *swig_type_initial[] = {
-  &_swigt__p_GeosCoordinateSequence,
-  &_swigt__p_GeosGeometry,
-  &_swigt__p_GeosGeometryCollection,
-  &_swigt__p_GeosIndexItem,
-  &_swigt__p_GeosLineString,
-  &_swigt__p_GeosLinearRing,
-  &_swigt__p_GeosMultiLineString,
-  &_swigt__p_GeosMultiLinearRing,
-  &_swigt__p_GeosMultiPoint,
-  &_swigt__p_GeosMultiPolygon,
-  &_swigt__p_GeosPoint,
-  &_swigt__p_GeosPolygon,
-  &_swigt__p_GeosPreparedGeometry,
-  &_swigt__p_GeosQueryCallback,
-  &_swigt__p_GeosSTRtree,
-  &_swigt__p_GeosWkbReader,
-  &_swigt__p_GeosWkbWriter,
-  &_swigt__p_GeosWktReader,
-  &_swigt__p_GeosWktWriter,
-  &_swigt__p_char,
-  &_swigt__p_p_GeosLinearRing,
-  &_swigt__p_size_t,
-  &_swigt__p_std__invalid_argument,
-  &_swigt__p_swig__SwigPyIterator,
-  &_swigt__p_unsigned_char,
-};
-
-static swig_cast_info _swigc__p_GeosCoordinateSequence[] = {  {&_swigt__p_GeosCoordinateSequence, 0, 0, 0},{0, 0, 0, 0}};
-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}};
-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}};
-static swig_cast_info _swigc__p_GeosIndexItem[] = {  {&_swigt__p_GeosIndexItem, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosLineString[] = {  {&_swigt__p_GeosLineString, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosLinearRing[] = {  {&_swigt__p_GeosLinearRing, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosMultiLineString[] = {  {&_swigt__p_GeosMultiLineString, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosMultiLinearRing[] = {  {&_swigt__p_GeosMultiLinearRing, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosMultiPoint[] = {  {&_swigt__p_GeosMultiPoint, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosMultiPolygon[] = {  {&_swigt__p_GeosMultiPolygon, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosPoint[] = {  {&_swigt__p_GeosPoint, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosPolygon[] = {  {&_swigt__p_GeosPolygon, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosPreparedGeometry[] = {  {&_swigt__p_GeosPreparedGeometry, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosQueryCallback[] = {  {&_swigt__p_GeosQueryCallback, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosSTRtree[] = {  {&_swigt__p_GeosSTRtree, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosWkbReader[] = {  {&_swigt__p_GeosWkbReader, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosWkbWriter[] = {  {&_swigt__p_GeosWkbWriter, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosWktReader[] = {  {&_swigt__p_GeosWktReader, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosWktWriter[] = {  {&_swigt__p_GeosWktWriter, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_p_GeosLinearRing[] = {  {&_swigt__p_p_GeosLinearRing, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_std__invalid_argument[] = {  {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_swig__SwigPyIterator[] = {  {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
-
-static swig_cast_info *swig_cast_initial[] = {
-  _swigc__p_GeosCoordinateSequence,
-  _swigc__p_GeosGeometry,
-  _swigc__p_GeosGeometryCollection,
-  _swigc__p_GeosIndexItem,
-  _swigc__p_GeosLineString,
-  _swigc__p_GeosLinearRing,
-  _swigc__p_GeosMultiLineString,
-  _swigc__p_GeosMultiLinearRing,
-  _swigc__p_GeosMultiPoint,
-  _swigc__p_GeosMultiPolygon,
-  _swigc__p_GeosPoint,
-  _swigc__p_GeosPolygon,
-  _swigc__p_GeosPreparedGeometry,
-  _swigc__p_GeosQueryCallback,
-  _swigc__p_GeosSTRtree,
-  _swigc__p_GeosWkbReader,
-  _swigc__p_GeosWkbWriter,
-  _swigc__p_GeosWktReader,
-  _swigc__p_GeosWktWriter,
-  _swigc__p_char,
-  _swigc__p_p_GeosLinearRing,
-  _swigc__p_size_t,
-  _swigc__p_std__invalid_argument,
-  _swigc__p_swig__SwigPyIterator,
-  _swigc__p_unsigned_char,
-};
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
-
-static swig_const_info swig_const_table[] = {
-{0, 0, 0, 0.0, 0, 0}};
-
-#ifdef __cplusplus
-}
-#endif
-/* -----------------------------------------------------------------------------
- * Type initialization:
- * This problem is tough by the requirement that no dynamic 
- * memory is used. Also, since swig_type_info structures store pointers to 
- * swig_cast_info structures and swig_cast_info structures store pointers back
- * to swig_type_info structures, we need some lookup code at initialization. 
- * The idea is that swig generates all the structures that are needed. 
- * The runtime then collects these partially filled structures. 
- * The SWIG_InitializeModule function takes these initial arrays out of 
- * swig_module, and does all the lookup, filling in the swig_module.types
- * array with the correct data and linking the correct swig_cast_info
- * structures together.
- *
- * The generated swig_type_info structures are assigned staticly to an initial 
- * array. We just loop through that array, and handle each type individually.
- * First we lookup if this type has been already loaded, and if so, use the
- * loaded structure instead of the generated one. Then we have to fill in the
- * cast linked list. The cast data is initially stored in something like a
- * two-dimensional array. Each row corresponds to a type (there are the same
- * number of rows as there are in the swig_type_initial array). Each entry in
- * a column is one of the swig_cast_info structures for that type.
- * The cast_initial array is actually an array of arrays, because each row has
- * a variable number of columns. So to actually build the cast linked list,
- * we find the array of casts associated with the type, and loop through it 
- * adding the casts to the list. The one last trick we need to do is making
- * sure the type pointer in the swig_cast_info struct is correct.
- *
- * First off, we lookup the cast->type name to see if it is already loaded. 
- * There are three cases to handle:
- *  1) If the cast->type has already been loaded AND the type we are adding
- *     casting info to has not been loaded (it is in this module), THEN we
- *     replace the cast->type pointer with the type pointer that has already
- *     been loaded.
- *  2) If BOTH types (the one we are adding casting info to, and the 
- *     cast->type) are loaded, THEN the cast info has already been loaded by
- *     the previous module so we just ignore it.
- *  3) Finally, if cast->type has not already been loaded, then we add that
- *     swig_cast_info to the linked list (because the cast->type) pointer will
- *     be correct.
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern "C" {
-#if 0
-} /* c-mode */
-#endif
-#endif
-
-#if 0
-#define SWIGRUNTIME_DEBUG
-#endif
-
-
-SWIGRUNTIME void
-SWIG_InitializeModule(void *clientdata) {
-  size_t i;
-  swig_module_info *module_head, *iter;
-  int found, init;
-  
-  /* check to see if the circular list has been setup, if not, set it up */
-  if (swig_module.next==0) {
-    /* Initialize the swig_module */
-    swig_module.type_initial = swig_type_initial;
-    swig_module.cast_initial = swig_cast_initial;
-    swig_module.next = &swig_module;
-    init = 1;
-  } else {
-    init = 0;
-  }
-  
-  /* Try and load any already created modules */
-  module_head = SWIG_GetModule(clientdata);
-  if (!module_head) {
-    /* This is the first module loaded for this interpreter */
-    /* so set the swig module into the interpreter */
-    SWIG_SetModule(clientdata, &swig_module);
-    module_head = &swig_module;
-  } else {
-    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
-    found=0;
-    iter=module_head;
-    do {
-      if (iter==&swig_module) {
-        found=1;
-        break;
-      }
-      iter=iter->next;
-    } while (iter!= module_head);
-    
-    /* if the is found in the list, then all is done and we may leave */
-    if (found) return;
-    /* otherwise we must add out module into the list */
-    swig_module.next = module_head->next;
-    module_head->next = &swig_module;
-  }
-  
-  /* When multiple interpeters are used, a module could have already been initialized in
-       a different interpreter, but not yet have a pointer in this interpreter.
-       In this case, we do not want to continue adding types... everything should be
-       set up already */
-  if (init == 0) return;
-  
-  /* Now work on filling in swig_module.types */
-#ifdef SWIGRUNTIME_DEBUG
-  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
-#endif
-  for (i = 0; i < swig_module.size; ++i) {
-    swig_type_info *type = 0;
-    swig_type_info *ret;
-    swig_cast_info *cast;
-    
-#ifdef SWIGRUNTIME_DEBUG
-    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
-#endif
-    
-    /* if there is another module already loaded */
-    if (swig_module.next != &swig_module) {
-      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
-    }
-    if (type) {
-      /* Overwrite clientdata field */
-#ifdef SWIGRUNTIME_DEBUG
-      printf("SWIG_InitializeModule: found type %s\n", type->name);
-#endif
-      if (swig_module.type_initial[i]->clientdata) {
-        type->clientdata = swig_module.type_initial[i]->clientdata;
-#ifdef SWIGRUNTIME_DEBUG
-        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
-#endif
-      }
-    } else {
-      type = swig_module.type_initial[i];
-    }
-    
-    /* Insert casting types */
-    cast = swig_module.cast_initial[i];
-    while (cast->type) {
-      /* Don't need to add information already in the list */
-      ret = 0;
-#ifdef SWIGRUNTIME_DEBUG
-      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
-#endif
-      if (swig_module.next != &swig_module) {
-        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
-#ifdef SWIGRUNTIME_DEBUG
-        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
-#endif
-      }
-      if (ret) {
-        if (type == swig_module.type_initial[i]) {
-#ifdef SWIGRUNTIME_DEBUG
-          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
-#endif
-          cast->type = ret;
-          ret = 0;
-        } else {
-          /* Check for casting already in the list */
-          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
-#ifdef SWIGRUNTIME_DEBUG
-          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
-#endif
-          if (!ocast) ret = 0;
-        }
-      }
-      
-      if (!ret) {
-#ifdef SWIGRUNTIME_DEBUG
-        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
-#endif
-        if (type->cast) {
-          type->cast->prev = cast;
-          cast->next = type->cast;
-        }
-        type->cast = cast;
-      }
-      cast++;
-    }
-    /* Set entry in modules->types array equal to the type */
-    swig_module.types[i] = type;
-  }
-  swig_module.types[i] = 0;
-  
-#ifdef SWIGRUNTIME_DEBUG
-  printf("**** SWIG_InitializeModule: Cast List ******\n");
-  for (i = 0; i < swig_module.size; ++i) {
-    int j = 0;
-    swig_cast_info *cast = swig_module.cast_initial[i];
-    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
-    while (cast->type) {
-      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
-      cast++;
-      ++j;
-    }
-    printf("---- Total casts: %d\n",j);
-  }
-  printf("**** SWIG_InitializeModule: Cast List ******\n");
-#endif
-}
-
-/* This function will propagate the clientdata field of type to
-* any new swig_type_info structures that have been added into the list
-* of equivalent types.  It is like calling
-* SWIG_TypeClientData(type, clientdata) a second time.
-*/
-SWIGRUNTIME void
-SWIG_PropagateClientData(void) {
-  size_t i;
-  swig_cast_info *equiv;
-  static int init_run = 0;
-  
-  if (init_run) return;
-  init_run = 1;
-  
-  for (i = 0; i < swig_module.size; i++) {
-    if (swig_module.types[i]->clientdata) {
-      equiv = swig_module.types[i]->cast;
-      while (equiv) {
-        if (!equiv->converter) {
-          if (equiv->type && !equiv->type->clientdata)
-          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
-        }
-        equiv = equiv->next;
-      }
-    }
-  }
-}
-
-#ifdef __cplusplus
-#if 0
-{
-  /* c-mode */
-#endif
-}
-#endif
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-  
-  /* Python-specific SWIG API */
-#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
-#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
-#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
-  
-  /* -----------------------------------------------------------------------------
-   * global variable support code.
-   * ----------------------------------------------------------------------------- */
-  
-  typedef struct swig_globalvar {
-    char       *name;                  /* Name of global variable */
-    PyObject *(*get_attr)(void);       /* Return the current value */
-    int       (*set_attr)(PyObject *); /* Set the value */
-    struct swig_globalvar *next;
-  } swig_globalvar;
-  
-  typedef struct swig_varlinkobject {
-    PyObject_HEAD
-    swig_globalvar *vars;
-  } swig_varlinkobject;
-  
-  SWIGINTERN PyObject *
-  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
-#if PY_VERSION_HEX >= 0x03000000
-    return PyUnicode_InternFromString("<Swig global variables>");
-#else
-    return PyString_FromString("<Swig global variables>");
-#endif
-  }
-  
-  SWIGINTERN PyObject *
-  swig_varlink_str(swig_varlinkobject *v) {
-#if PY_VERSION_HEX >= 0x03000000
-    PyObject *str = PyUnicode_InternFromString("(");
-    PyObject *tail;
-    PyObject *joined;
-    swig_globalvar *var;
-    for (var = v->vars; var; var=var->next) {
-      tail = PyUnicode_FromString(var->name);
-      joined = PyUnicode_Concat(str, tail);
-      Py_DecRef(str);
-      Py_DecRef(tail);
-      str = joined;
-      if (var->next) {
-        tail = PyUnicode_InternFromString(", ");
-        joined = PyUnicode_Concat(str, tail);
-        Py_DecRef(str);
-        Py_DecRef(tail);
-        str = joined;
-      }
-    }
-    tail = PyUnicode_InternFromString(")");
-    joined = PyUnicode_Concat(str, tail);
-    Py_DecRef(str);
-    Py_DecRef(tail);
-    str = joined;
-#else
-    PyObject *str = PyString_FromString("(");
-    swig_globalvar *var;
-    for (var = v->vars; var; var=var->next) {
-      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
-      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
-    }
-    PyString_ConcatAndDel(&str,PyString_FromString(")"));
-#endif
-    return str;
-  }
-  
-  SWIGINTERN int
-  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
-    char *tmp;
-    PyObject *str = swig_varlink_str(v);
-    fprintf(fp,"Swig global variables ");
-    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
-    SWIG_Python_str_DelForPy3(tmp);
-    Py_DECREF(str);
-    return 0;
-  }
-  
-  SWIGINTERN void
-  swig_varlink_dealloc(swig_varlinkobject *v) {
-    swig_globalvar *var = v->vars;
-    while (var) {
-      swig_globalvar *n = var->next;
-      free(var->name);
-      free(var);
-      var = n;
-    }
-  }
-  
-  SWIGINTERN PyObject *
-  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
-    PyObject *res = NULL;
-    swig_globalvar *var = v->vars;
-    while (var) {
-      if (strcmp(var->name,n) == 0) {
-        res = (*var->get_attr)();
-        break;
-      }
-      var = var->next;
-    }
-    if (res == NULL && !PyErr_Occurred()) {
-      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
-    }
-    return res;
-  }
-  
-  SWIGINTERN int
-  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
-    int res = 1;
-    swig_globalvar *var = v->vars;
-    while (var) {
-      if (strcmp(var->name,n) == 0) {
-        res = (*var->set_attr)(p);
-        break;
-      }
-      var = var->next;
-    }
-    if (res == 1 && !PyErr_Occurred()) {
-      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
-    }
-    return res;
-  }
-  
-  SWIGINTERN PyTypeObject*
-  swig_varlink_type(void) {
-    static char varlink__doc__[] = "Swig var link object";
-    static PyTypeObject varlink_type;
-    static int type_init = 0;
-    if (!type_init) {
-      const PyTypeObject tmp = {
-        /* PyObject header changed in Python 3 */
-#if PY_VERSION_HEX >= 0x03000000
-        PyVarObject_HEAD_INIT(NULL, 0)
-#else
-        PyObject_HEAD_INIT(NULL)
-        0,                                  /* ob_size */
-#endif
-        (char *)"swigvarlink",              /* tp_name */
-        sizeof(swig_varlinkobject),         /* tp_basicsize */
-        0,                                  /* tp_itemsize */
-        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
-        (printfunc) swig_varlink_print,     /* tp_print */
-        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
-        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
-        0,                                  /* tp_compare */
-        (reprfunc) swig_varlink_repr,       /* tp_repr */
-        0,                                  /* tp_as_number */
-        0,                                  /* tp_as_sequence */
-        0,                                  /* tp_as_mapping */
-        0,                                  /* tp_hash */
-        0,                                  /* tp_call */
-        (reprfunc) swig_varlink_str,        /* tp_str */
-        0,                                  /* tp_getattro */
-        0,                                  /* tp_setattro */
-        0,                                  /* tp_as_buffer */
-        0,                                  /* tp_flags */
-        varlink__doc__,                     /* tp_doc */
-        0,                                  /* tp_traverse */
-        0,                                  /* tp_clear */
-        0,                                  /* tp_richcompare */
-        0,                                  /* tp_weaklistoffset */
-#if PY_VERSION_HEX >= 0x02020000
-        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
-#endif
-#if PY_VERSION_HEX >= 0x02030000
-        0,                                  /* tp_del */
-#endif
-#if PY_VERSION_HEX >= 0x02060000
-        0,                                  /* tp_version */
-#endif
-#ifdef COUNT_ALLOCS
-        0,0,0,0                             /* tp_alloc -> tp_next */
-#endif
-      };
-      varlink_type = tmp;
-      type_init = 1;
-#if PY_VERSION_HEX < 0x02020000
-      varlink_type.ob_type = &PyType_Type;
-#else
-      if (PyType_Ready(&varlink_type) < 0)
-      return NULL;
-#endif
-    }
-    return &varlink_type;
-  }
-  
-  /* Create a variable linking object for use later */
-  SWIGINTERN PyObject *
-  SWIG_Python_newvarlink(void) {
-    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
-    if (result) {
-      result->vars = 0;
-    }
-    return ((PyObject*) result);
-  }
-  
-  SWIGINTERN void 
-  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
-    swig_varlinkobject *v = (swig_varlinkobject *) p;
-    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
-    if (gv) {
-      size_t size = strlen(name)+1;
-      gv->name = (char *)malloc(size);
-      if (gv->name) {
-        strncpy(gv->name,name,size);
-        gv->get_attr = get_attr;
-        gv->set_attr = set_attr;
-        gv->next = v->vars;
-      }
-    }
-    v->vars = gv;
-  }
-  
-  SWIGINTERN PyObject *
-  SWIG_globals(void) {
-    static PyObject *_SWIG_globals = 0; 
-    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
-    return _SWIG_globals;
-  }
-  
-  /* -----------------------------------------------------------------------------
-   * constants/methods manipulation
-   * ----------------------------------------------------------------------------- */
-  
-  /* Install Constants */
-  SWIGINTERN void
-  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
-    PyObject *obj = 0;
-    size_t i;
-    for (i = 0; constants[i].type; ++i) {
-      switch(constants[i].type) {
-      case SWIG_PY_POINTER:
-        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
-        break;
-      case SWIG_PY_BINARY:
-        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
-        break;
-      default:
-        obj = 0;
-        break;
-      }
-      if (obj) {
-        PyDict_SetItemString(d, constants[i].name, obj);
-        Py_DECREF(obj);
-      }
-    }
-  }
-  
-  /* -----------------------------------------------------------------------------*/
-  /* Fix SwigMethods to carry the callback ptrs when needed */
-  /* -----------------------------------------------------------------------------*/
-  
-  SWIGINTERN void
-  SWIG_Python_FixMethods(PyMethodDef *methods,
-    swig_const_info *const_table,
-    swig_type_info **types,
-    swig_type_info **types_initial) {
-    size_t i;
-    for (i = 0; methods[i].ml_name; ++i) {
-      const char *c = methods[i].ml_doc;
-      if (c && (c = strstr(c, "swig_ptr: "))) {
-        int j;
-        swig_const_info *ci = 0;
-        const char *name = c + 10;
-        for (j = 0; const_table[j].type; ++j) {
-          if (strncmp(const_table[j].name, name, 
-              strlen(const_table[j].name)) == 0) {
-            ci = &(const_table[j]);
-            break;
-          }
-        }
-        if (ci) {
-          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
-          if (ptr) {
-            size_t shift = (ci->ptype) - types;
-            swig_type_info *ty = types_initial[shift];
-            size_t ldoc = (c - methods[i].ml_doc);
-            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
-            char *ndoc = (char*)malloc(ldoc + lptr + 10);
-            if (ndoc) {
-              char *buff = ndoc;
-              strncpy(buff, methods[i].ml_doc, ldoc);
-              buff += ldoc;
-              strncpy(buff, "swig_ptr: ", 10);
-              buff += 10;
-              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
-              methods[i].ml_doc = ndoc;
-            }
-          }
-        }
-      }
-    }
-  } 
-  
-#ifdef __cplusplus
-}
-#endif
-
-/* -----------------------------------------------------------------------------*
- *  Partial Init method
- * -----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
-extern "C"
-#endif
-
-SWIGEXPORT 
-#if PY_VERSION_HEX >= 0x03000000
-PyObject*
-#else
-void
-#endif
-SWIG_init(void) {
-  PyObject *m, *d, *md;
-#if PY_VERSION_HEX >= 0x03000000
-  static struct PyModuleDef SWIG_module = {
-# if PY_VERSION_HEX >= 0x03020000
-    PyModuleDef_HEAD_INIT,
-# else
-    {
-      PyObject_HEAD_INIT(NULL)
-      NULL, /* m_init */
-      0,    /* m_index */
-      NULL, /* m_copy */
-    },
-# endif
-    (char *) SWIG_name,
-    NULL,
-    -1,
-    SwigMethods,
-    NULL,
-    NULL,
-    NULL,
-    NULL
-  };
-#endif
-  
-#if defined(SWIGPYTHON_BUILTIN)
-  static SwigPyClientData SwigPyObject_clientdata = {
-    0, 0, 0, 0, 0, 0, 0
-  };
-  static PyGetSetDef this_getset_def = {
-    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
-  };
-  static SwigPyGetSet thisown_getset_closure = {
-    (PyCFunction) SwigPyObject_own,
-    (PyCFunction) SwigPyObject_own
-  };
-  static PyGetSetDef thisown_getset_def = {
-    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
-  };
-  PyObject *metatype_args;
-  PyTypeObject *builtin_pytype;
-  int builtin_base_count;
-  swig_type_info *builtin_basetype;
-  PyObject *tuple;
-  PyGetSetDescrObject *static_getset;
-  PyTypeObject *metatype;
-  SwigPyClientData *cd;
-  PyObject *public_interface, *public_symbol;
-  PyObject *this_descr;
-  PyObject *thisown_descr;
-  int i;
-  
-  (void)builtin_pytype;
-  (void)builtin_base_count;
-  (void)builtin_basetype;
-  (void)tuple;
-  (void)static_getset;
-  
-  /* metatype is used to implement static member variables. */
-  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
-  assert(metatype_args);
-  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
-  assert(metatype);
-  Py_DECREF(metatype_args);
-  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
-  assert(PyType_Ready(metatype) >= 0);
-#endif
-  
-  /* Fix SwigMethods to carry the callback ptrs when needed */
-  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
-  
-#if PY_VERSION_HEX >= 0x03000000
-  m = PyModule_Create(&SWIG_module);
-#else
-  m = Py_InitModule((char *) SWIG_name, SwigMethods);
-#endif
-  md = d = PyModule_GetDict(m);
-  (void)md;
-  
-  SWIG_InitializeModule(0);
-  
-#ifdef SWIGPYTHON_BUILTIN
-  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
-  assert(SwigPyObject_stype);
-  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
-  if (!cd) {
-    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
-    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
-  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
-    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
-# if PY_VERSION_HEX >= 0x03000000
-    return NULL;
-# else
-    return;
-# endif
-  }
-  
-  /* All objects have a 'this' attribute */
-  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
-  (void)this_descr;
-  
-  /* All objects have a 'thisown' attribute */
-  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
-  (void)thisown_descr;
-  
-  public_interface = PyList_New(0);
-  public_symbol = 0;
-  (void)public_symbol;
-  
-  PyDict_SetItemString(md, "__all__", public_interface);
-  Py_DECREF(public_interface);
-  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
-  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
-  for (i = 0; swig_const_table[i].name != 0; ++i)
-  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
-#endif
-  
-  SWIG_InstallConstants(d,swig_const_table);
-  
-  SWIG_Python_SetConstant(d, "GEOS_VERSION_MAJOR",SWIG_From_int(static_cast< int >(3)));
-  SWIG_Python_SetConstant(d, "GEOS_VERSION_MINOR",SWIG_From_int(static_cast< int >(5)));
-  SWIG_Python_SetConstant(d, "GEOS_VERSION",SWIG_FromCharPtr("3.5.0dev"));
-  SWIG_Python_SetConstant(d, "GEOS_JTS_PORT",SWIG_FromCharPtr("1.13.0"));
-  SWIG_Python_SetConstant(d, "GEOS_CAPI_VERSION_MAJOR",SWIG_From_int(static_cast< int >(1)));
-  SWIG_Python_SetConstant(d, "GEOS_CAPI_VERSION_MINOR",SWIG_From_int(static_cast< int >(9)));
-  SWIG_Python_SetConstant(d, "GEOS_CAPI_VERSION_PATCH",SWIG_From_int(static_cast< int >(0)));
-  SWIG_Python_SetConstant(d, "GEOS_CAPI_FIRST_INTERFACE",SWIG_From_int(static_cast< int >(1)));
-  SWIG_Python_SetConstant(d, "GEOS_CAPI_LAST_INTERFACE",SWIG_From_int(static_cast< int >((1+9))));
-  SWIG_Python_SetConstant(d, "GEOS_CAPI_VERSION",SWIG_FromCharPtr("3.5.0dev-CAPI-1.9.0"));
-  SWIG_Python_SetConstant(d, "GEOS_POINT",SWIG_From_int(static_cast< int >(GEOS_POINT)));
-  SWIG_Python_SetConstant(d, "GEOS_LINESTRING",SWIG_From_int(static_cast< int >(GEOS_LINESTRING)));
-  SWIG_Python_SetConstant(d, "GEOS_LINEARRING",SWIG_From_int(static_cast< int >(GEOS_LINEARRING)));
-  SWIG_Python_SetConstant(d, "GEOS_POLYGON",SWIG_From_int(static_cast< int >(GEOS_POLYGON)));
-  SWIG_Python_SetConstant(d, "GEOS_MULTIPOINT",SWIG_From_int(static_cast< int >(GEOS_MULTIPOINT)));
-  SWIG_Python_SetConstant(d, "GEOS_MULTILINESTRING",SWIG_From_int(static_cast< int >(GEOS_MULTILINESTRING)));
-  SWIG_Python_SetConstant(d, "GEOS_MULTIPOLYGON",SWIG_From_int(static_cast< int >(GEOS_MULTIPOLYGON)));
-  SWIG_Python_SetConstant(d, "GEOS_GEOMETRYCOLLECTION",SWIG_From_int(static_cast< int >(GEOS_GEOMETRYCOLLECTION)));
-  SWIG_Python_SetConstant(d, "GEOS_WKB_XDR",SWIG_From_int(static_cast< int >(GEOS_WKB_XDR)));
-  SWIG_Python_SetConstant(d, "GEOS_WKB_NDR",SWIG_From_int(static_cast< int >(GEOS_WKB_NDR)));
-  
-  initGEOS(noticeHandler, errorHandler);
-  
-#if PY_VERSION_HEX >= 0x03000000
-  return m;
-#else
-  return;
-#endif
-}
-
diff --git a/swig/python/python.i b/swig/python/python.i
deleted file mode 100644
index 6ad890e..0000000
--- a/swig/python/python.i
+++ /dev/null
@@ -1,56 +0,0 @@
-/* =========================================================================
- * Copyright 2005-2007 Charlie Savage, cfis at interserv.com
- *
- * Interface for a SWIG generated geos module.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation. 
- * See the COPYING file for more information.
- *
- * ========================================================================= */
-
-/* Convert a Ruby array of GeosLinearRings to a C array. */
-%typemap(in,numinputs=1) (GeosLinearRing **holes, size_t nholes)
-{
-    if ($input == Py_None)
-    {
-        $1 = NULL;
-        $2 = 0;
-    }
-    else
-    {
-        /* Make sure the input can be treated as an array. */
-        if (!PySequence_Check($input))
-            SWIG_exception_fail(SWIG_RuntimeError, "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
-
-        /* Get the length */
-        $2 = PySequence_Size($input);
-
-        /* Allocate space for the C array. */
-        $1 = (GeosLinearRing**) malloc($2*sizeof(GeosLinearRing*));
-      
-        for(size_t i = 0; i<$2; i++)
-        {
-            /* Get the Python Object */
-            PyObject *item = PySequence_GetItem($input,i);
-
-            /* Get the underlying pointer and give up ownership of it. */
-            GeosLinearRing *ring = NULL;
-            int convertResult = SWIG_ConvertPtr(item, (void**)&ring, $descriptor(GeosLinearRing*), SWIG_POINTER_DISOWN);
-            if (!SWIG_IsOK(convertResult)) {
-                SWIG_exception_fail(SWIG_ArgError(convertResult), "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
-            }
-
-            /* Put the pointer in the array */
-            $1[i] = ring;
-        }    
-    }
-}
-
-%typemap(freearg)  (GeosLinearRing **holes, size_t nholes)
-{
-  if ($1) {
-    free((void*) $1);
-  }
-}
diff --git a/swig/python/tests/Makefile.am b/swig/python/tests/Makefile.am
deleted file mode 100644
index ecac23e..0000000
--- a/swig/python/tests/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# This file is part of project GEOS (http://trac.osgeo.org/geos/) 
-#
-PYTHON_TESTS = \
-	example.py \
-	test_geometry.py \
-	runtests.py
-
-EXTRA_DIST = $(PYTHON_TESTS)
-
-test:
-	$(PYTHON) runtests.py
diff --git a/swig/python/tests/TESTING.txt b/swig/python/tests/TESTING.txt
deleted file mode 100644
index 5f92a8e..0000000
--- a/swig/python/tests/TESTING.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-Author: Sean Gillies, sgillies at frii.com
-
-
-Running the tests
------------------
-
-To run the tests, execute 
-
-   python tests/runtests.py -v
-
-
diff --git a/swig/python/tests/example.py b/swig/python/tests/example.py
deleted file mode 100644
index 2b3df6e..0000000
--- a/swig/python/tests/example.py
+++ /dev/null
@@ -1,529 +0,0 @@
-import os
-import sys
-import distutils.util
-import math
-
-# Put local build directory on head of python path
-platformdir = '-'.join((distutils.util.get_platform(),
-                        '.'.join(map(str, sys.version_info[0:2]))))
-sys.path.insert(0, os.path.join('build', 'lib.' + platformdir))
-
-# import geos from the local build directory
-import geos
-
-pm = geos.PrecisionModel(2.0,0,0)
-global_factory = geos.GeometryFactory(pm,-1)
-
-def wkt_print_geoms(geoms):
-    wkt = geos.WKTWriter()
-    size = len(geoms)
-    for i in range(size):
-        tmp = wkt.write(geoms[i])
-        print "[%d]" % i, tmp
-
-def create_point(x,y):
-    c = geos.Coordinate(x,y)
-    p = global_factory.createPoint(c)
-
-    return p
-
-def create_ushaped_linestring(xoffset, yoffset, side):
-    cl = geos.DefaultCoordinateSequence()
-
-    cl.add(geos.Coordinate(xoffset, yoffset))
-    cl.add(geos.Coordinate(xoffset, yoffset+side))
-    cl.add(geos.Coordinate(xoffset+side, yoffset+side))
-    cl.add(geos.Coordinate(xoffset+side, yoffset))
-
-    ls = global_factory.createLineString(cl)
-    return ls
-
-def create_square_linearring(xoffset,yoffset,side):
-    cl = geos.DefaultCoordinateSequence()
-
-    cl.add(geos.Coordinate(xoffset,yoffset))
-    cl.add(geos.Coordinate(xoffset,yoffset+side))
-    cl.add(geos.Coordinate(xoffset+side,yoffset+side))
-    cl.add(geos.Coordinate(xoffset+side,yoffset))
-    cl.add(geos.Coordinate(xoffset,yoffset))
-
-    lr = global_factory.createLinearRing(cl)
-    return lr
-
-def create_square_polygon(xoffset,yoffset,side):
-    outer = create_square_linearring(xoffset,yoffset,side)
-    inner = create_square_linearring(xoffset+(side/3.),yoffset+(side/3.),(side/3.))
-
-    holes = geos.vector_GeometryP()
-    holes.push_back(inner)
-
-    poly = global_factory.createPolygon(outer,holes)
-    return poly
-
-def create_simple_collection(geoms):
-    collect = geos.vector_GeometryP()
-    for i in geoms:
-        collect.push_back(i)
-    return global_factory.createGeometryCollection(collect)
-
-def create_circle(centerX,centerY,radius):
-    shapefactory = geos.GeometricShapeFactory(global_factory)
-    shapefactory.setCentre(geos.Coordinate(centerX, centerY))
-    shapefactory.setSize(radius)
-    return shapefactory.createCircle()
-
-def create_ellipse(centerX,centerY,width,height):
-    shapefactory = geos.GeometricShapeFactory(global_factory)
-    shapefactory.setCentre(geos.Coordinate(centerX, centerY))
-    shapefactory.setHeight(height)
-    shapefactory.setWidth(width)
-    return shapefactory.createCircle()
-
-def create_rectangle(llX,llY,width,height):
-    shapefactory = geos.GeometricShapeFactory(global_factory)
-    shapefactory.setBase(geos.Coordinate(llX, llY))
-    shapefactory.setHeight(height)
-    shapefactory.setWidth(width)
-    shapefactory.setNumPoints(4)
-    return shapefactory.createRectangle()
-
-def create_arc(llX,llY,width,height,startang,endang):
-    shapefactory = geos.GeometricShapeFactory(global_factory)
-    shapefactory.setBase(geos.Coordinate(llX, llY))
-    shapefactory.setHeight(height)
-    shapefactory.setWidth(width)
-    #shapefactory.setNumPoints(100) #the default (100 pts)
-    return shapefactory.createArc(startang, endang)
-
-def do_all():
-    geoms = []
-
-    geoms.append(create_point(150, 350))
-    geoms.append(create_ushaped_linestring(60,60,100))
-    geoms.append(create_square_linearring(0,0,100))
-    geoms.append(create_square_polygon(0,200,300))
-    geoms.append(create_square_polygon(0,250,300))
-    geoms.append(create_simple_collection(geoms))
-
-    # These ones use a GeometricShapeFactory
-    geoms.append(create_circle(0, 0, 10))
-    geoms.append(create_ellipse(0, 0, 8, 12))
-    geoms.append(create_rectangle(-5, -5, 10, 10)) # a square
-    geoms.append(create_rectangle(-5, -5, 10, 20)) # a rectangle
-
-    # The upper-right quarter of a vertical ellipse
-    geoms.append(create_arc(0, 0, 10, 20, 0, math.pi/2))
-
-    print "--------HERE ARE THE BASE GEOMS ----------"
-    wkt_print_geoms(geoms)
-
-
-####################
-# UNARY OPERATIONS                 #
-####################
-
-    ################
-    #CENTROID                        #
-    ################
-    # Find centroid of each base geometry
-    newgeoms = []
-    for i in range(len(geoms)):
-        newgeoms.append(geoms[i].getCentroid())
-
-    print "\n","------- AND HERE ARE THEIR CENTROIDS -----"
-    wkt_print_geoms(newgeoms)
-
-    ################
-    # BUFFER                           #
-    ################
-    newgeoms = []
-    for i in range(len(geoms)):
-        try:
-            newgeoms.append(geoms[i].buffer(10))
-        except geos.GEOSException():
-            exc = geos.GEOSException()
-            print "GEOS Exception: geometry ",geoms[i],"->buffer(10): ",exc.toString()
-
-    print "\n","--------HERE COMES THE BUFFERED GEOMS ----------"
-    wkt_print_geoms(newgeoms)
-
-    ################
-    # CONVEX HULL                 #
-    ################
-    newgeoms = []
-    for i in range(len(geoms)):
-        newgeoms.append(geoms[i].convexHull())
-
-    print "\n","--------HERE COMES THE HULLS----------"
-    wkt_print_geoms(newgeoms)
-
-####################
-# RELATIONAL OPERATORS        #
-####################
-
-    print "-------------------------------------------------------------------------------"
-    print "RELATIONAL OPERATORS"
-    print "-------------------------------------------------------------------------------"
-
-    size = len(geoms)
-    ################
-    # DISJOINT                          #
-    ################
-
-    print
-    print "\t".join(["   DISJOINT   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].disjoint(geoms[j]):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # TOUCHES                         #
-    ################
-
-    print
-    print "\t".join(["    TOUCHES   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].touches(geoms[j]):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # INTERSECTS                   #
-    ################
-
-    print
-    print "\t".join([" INTERSECTS   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].intersects(geoms[j]):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # CROSSES                        #
-    ################
-
-    print
-    print "\t".join(["    CROSSES   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].crosses(geoms[j]):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # WITHIN                        #
-    ################
-
-    print
-    print "\t".join(["     WITHIN   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].within(geoms[j]):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # CONTAINS                        #
-    ################
-
-    print
-    print "\t".join(["   CONTAINS   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].contains(geoms[j]):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # OVERLAPS                        #
-    ################
-
-    print
-    print "\t".join(["   OVERLAPS   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].overlaps(geoms[j]):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # RELATE                            #
-    ################
-
-    print
-    print "\t".join(["     RELATE   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            im = geos.IntersectionMatrix('')
-            try:
-                if geoms[i].relate(geoms[j],"212101212"):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-                im=geoms[i].relate(geoms[j])
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # EQUALS                        #
-    ################
-
-    print
-    print "\t".join(["     EQUALS   "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].equals(geoms[j]):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # EQUALS_EXACT             #
-    ################
-
-    print
-    print "\t".join(["EQUALS_EXACT  "]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].equalsExact(geoms[j],0.5):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-    ################
-    # IS_WITHIN_DISTANCE     #
-    ################
-
-    print
-    print "\t".join(["IS_WITHIN_DIST"]+["[%d]" % i for i in range(size)])
-
-    for i in range(size):
-        print "      [%d]\t" % i,
-        for j in range(size):
-            try:
-                if geoms[i].isWithinDistance(geoms[j],2):
-                    print " 1\t",
-                else:
-                    print " 0\t",
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                print " X\t",
-        print
-
-####################
-# COMBINATIONS
-####################
-
-    print
-    print "-------------------------------------------------------------------------------"
-    print "COMBINATIONS"
-    print "-------------------------------------------------------------------------------"
-
-    ################
-    # UNION
-    ################
-
-    newgeoms = []
-    for i in range(size-1):
-        for j in range(i+1,size):
-            try:
-                newgeoms.append(geoms[i].Union(geoms[j]))
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                pass
-
-    print "\n", "----- AND HERE ARE SOME UNION COMBINATIONS ------"
-    wkt_print_geoms(newgeoms)
-
-    ################
-    # INTERSECTION
-    ################
-
-    newgeoms = []
-    for i in range(size-1):
-        for j in range(i+1,size):
-            try:
-                newgeoms.append(geoms[i].intersection(geoms[j]))
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                pass
-
-    print "\n", "----- HERE ARE SOME INTERSECTIONS COMBINATIONS ------"
-    wkt_print_geoms(newgeoms)
-
-    ################
-    # DIFFERENCE
-    ################
-
-    newgeoms = []
-    for i in range(size-1):
-        for j in range(i+1,size):
-            try:
-                newgeoms.append(geoms[i].difference(geoms[j]))
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                pass
-
-    print "\n", "----- HERE ARE SOME DIFFERENCE COMBINATIONS ------"
-    wkt_print_geoms(newgeoms)
-
-    ################
-    # SYMMETRIC DIFFERENCE
-    ################
-
-    newgeoms = []
-    for i in range(size-1):
-        for j in range(i+1,size):
-            try:
-                newgeoms.append(geoms[i].symDifference(geoms[j]))
-            except geos.GEOSException():
-                exc = geos.GEOSException()
-                print exc.toString()
-            except:
-                pass
-
-    print "\n", "----- HERE ARE SYMMETRIC DIFFERENCES ------"
-    wkt_print_geoms(newgeoms)
-
-    ################
-    # LINEMERGE
-    ################
-    temp = geos.vector_GeometryP()
-    for g in geoms:
-        temp.push_back(g)
-    lm = geos.LineMerger()
-    lm.add(temp)
-    mls = lm.getMergedLineStrings()
-    newgeoms = []
-    for i in range(mls.size()):
-        newgeoms.append(mls[i])
-    del mls
-
-    print "\n", "----- HERE IS THE LINEMERGE OUTPUT ------"
-    wkt_print_geoms(newgeoms)
-    
-    ################
-    # POLYGONIZE
-    ################
-    temp = geos.vector_GeometryP()
-    for g in geoms:
-        temp.push_back(g)
-    plgnzr = geos.Polygonizer()
-    plgnzr.add(temp)
-    polys = plgnzr.getPolygons()
-    newgeoms = []
-    for i in range(polys.size()):
-        newgeoms.append(polys[i])
-    del polys
-
-    print "\n", "----- HERE IS POLYGONIZE OUTPUT ------"
-    wkt_print_geoms(newgeoms)
-
-print "GEOS", geos.geosversion(), "ported from JTS", geos.jtsport()
-do_all()
diff --git a/swig/python/tests/runtests.py b/swig/python/tests/runtests.py
deleted file mode 100644
index ab3d898..0000000
--- a/swig/python/tests/runtests.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# ===========================================================================
-# Copyright 2004 Sean Gillies, sgillies at frii.com
-#
-# This is free software; you can redistribute and/or modify it under
-# the terms of the GNU Lesser General Public Licence as published
-# by the Free Software Foundation. 
-# See the COPYING file for more information.
-# ===========================================================================
-#
-# Execute this module as a script from PyGEOS
-#
-#     python tests/runtests.py -v
-#
-# ===========================================================================
-
-import unittest
-
-# Import test cases
-from test_geometry import TestGeometry
-
-# Create a test suite
-suite = unittest.TestSuite()
-
-# Add tests to the suite
-suite.addTest(TestGeometry)
-
-# If module is run as a script, execute every test case in the suite
-if __name__ == '__main__':
-    unittest.main()
-
diff --git a/swig/python/tests/test_geometry.py b/swig/python/tests/test_geometry.py
deleted file mode 100644
index 3a18b97..0000000
--- a/swig/python/tests/test_geometry.py
+++ /dev/null
@@ -1,264 +0,0 @@
-#!/usr/bin/env python
-
-import unittest
-import geos
-
-class TestGeometry(unittest.TestCase):
-	def testCreatePoint(self):
-		cs = geos.CoordinateSequence(1,3)
-		cs.setX(0, 7)
-		cs.setY(0, 8)
-		cs.setZ(0, 9)
-		
-		geom = geos.createPoint(cs)
-		assert isinstance(geom, geos.Point)
-		self.assertEqual('Point', geom.geomType())
-		self.assertEqual(geos.GEOS_POINT, geom.typeId())
-		
-		self.assertEqual(False, geom.isEmpty())
-		self.assertEqual(True, geom.isValid())
-		self.assertEqual(True, geom.isSimple())
-		self.assertEqual(False, geom.isRing())
-		self.assertEqual(True, geom.hasZ())
-		
-		self.assertEqual(1, geom.getNumGeometries())
-
-		coords = geom.getCoordSeq()
-		assert isinstance(coords, geos.CoordinateSequence)
-		self.assertEqual(7, coords.getX(0))
-		self.assertEqual(8, coords.getY(0))
-		self.assertEqual(9, coords.getZ(0))
-    
-		self.assertEqual(0, geom.area())
-		self.assertEqual(0, geom.length())
-
-
-	def testCreatePointIllegal(self):
-		cs = geos.CoordinateSequence(0, 0)
-		self.assertRaises(RuntimeError, geos.createPoint, cs)
-
-
-	def testCreateLineString(self):
-		cs = geos.CoordinateSequence(2,3)
-		cs.setX(0, 7)
-		cs.setY(0, 8)
-		cs.setZ(0, 9)
-		cs.setX(1, 3)
-		cs.setY(1, 3)
-		cs.setZ(1, 3)
-		
-		geom = geos.createLineString(cs)
-		assert isinstance(geom, geos.LineString)
-		self.assertEqual('LineString', geom.geomType())
-		self.assertEqual(geos.GEOS_LINESTRING, geom.typeId())
-		
-		self.assertEqual(False, geom.isEmpty())
-		self.assertEqual(True, geom.isValid())
-		self.assertEqual(True, geom.isSimple())
-		self.assertEqual(False, geom.isRing())
-		self.assertEqual(True, geom.hasZ())
-		
-		self.assertEqual(1, geom.getNumGeometries())
-		
-		coords = geom.getCoordSeq()
-		assert isinstance(coords, geos.CoordinateSequence)
-		self.assertEqual(7, coords.getX(0))
-		self.assertEqual(8, coords.getY(0))
-		self.assertEqual(9, coords.getZ(0))
-		self.assertEqual(3, coords.getX(1))
-		self.assertEqual(3, coords.getY(1))
-		self.assertEqual(3, coords.getZ(1))
-		
-		self.assertEqual(0, geom.area())
-		self.assertEqual(6.4031242374328485, geom.length())
-	
-	
-	def testCreateLineStringIllegal(self):
-		cs = geos.CoordinateSequence(1,0)
-		self.assertRaises(RuntimeError, geos.createLineString, cs)
-
-	def testCreateLinearRing(self):
-		cs = geos.CoordinateSequence(4,3)
-		cs.setX(0, 7)
-		cs.setY(0, 8)
-		cs.setZ(0, 9)
-		cs.setX(1, 3)
-		cs.setY(1, 3)
-		cs.setZ(1, 3)
-		cs.setX(2, 11)
-		cs.setY(2, 15.2)
-		cs.setZ(2, 2)
-		cs.setX(3, 7)
-		cs.setY(3, 8)
-		cs.setZ(3, 9)
-		
-		geom = geos.createLinearRing(cs)
-		assert isinstance(geom, geos.LinearRing)
-		self.assertEqual('LinearRing', geom.geomType())
-		self.assertEqual(geos.GEOS_LINEARRING, geom.typeId())
-		
-		self.assertEqual(False, geom.isEmpty())
-		self.assertEqual(True, geom.isValid())
-		self.assertEqual(True, geom.isSimple())
-		self.assertEqual(True, geom.isRing())
-		self.assertEqual(True, geom.hasZ())
-		
-		self.assertEqual(1, geom.getNumGeometries())
-
-		coords = geom.getCoordSeq()
-		assert isinstance(coords, geos.CoordinateSequence)
-		self.assertEqual(7, coords.getX(0))
-		self.assertEqual(8, coords.getY(0))
-		self.assertEqual(9, coords.getZ(0))
-		self.assertEqual(3, coords.getX(1))
-		self.assertEqual(3, coords.getY(1))
-		self.assertEqual(3, coords.getZ(1))
-		self.assertEqual(11, coords.getX(2))
-		self.assertEqual(15.2, coords.getY(2))
-		self.assertEqual(2, coords.getZ(2))
-		self.assertEqual(7, coords.getX(3))
-		self.assertEqual(8, coords.getY(3))
-		self.assertEqual(9, coords.getZ(3))
-		
-		self.assertEqual(0, geom.area())
-		self.assertEqual(29.228665330091953, geom.length())
-	
-	def testCreateLinearRingIllegal(self):
-		cs = geos.CoordinateSequence(1,0)
-		self.assertRaises(RuntimeError, geos.createLinearRing, cs)
-
-	def testCreatePolygon(self):
-		# Polygon shell
-		cs = geos.CoordinateSequence(5,2)
-		cs.setX(0, 0)
-		cs.setY(0, 0)
-
-		cs.setX(1, 0)
-		cs.setY(1, 10)
-		
-		cs.setX(2, 10)
-		cs.setY(2, 10)
-		
-		cs.setX(3, 10)
-		cs.setY(3, 0)
-		
-		cs.setX(4, 0)
-		cs.setY(4, 0)
-		shell = geos.createLinearRing(cs)
-		
-		geom = geos.createPolygon(shell)
-		assert isinstance(geom, geos.Polygon)
-		self.assertEqual('Polygon', geom.geomType())
-		self.assertEqual(geos.GEOS_POLYGON, geom.typeId())
-		
-		self.assertEqual(False, geom.isEmpty())
-		self.assertEqual(True, geom.isValid())
-		self.assertEqual(True, geom.isSimple())
-		self.assertEqual(False, geom.isRing())
-		self.assertEqual(True, geom.hasZ())
-		
-		self.assertEqual(1, geom.getNumGeometries())
-		
-		exteriorRing = geom.getExteriorRing()
-		assert(shell.equals(exteriorRing))
-		self.assertEqual(0, geom.getNumInteriorRings())
-		
-		self.assertRaises(RuntimeError, geom.getInteriorRingN, 1)
-		
-		self.assertEqual(100, geom.area())
-		self.assertEqual(40, geom.length())
-	
-	def testCreatePolygonWithHoles(self):
-		# Polygon shell
-		cs = geos.CoordinateSequence(5,2)
-		cs.setX(0, 0)
-		cs.setY(0, 0)
-
-		cs.setX(1, 0)
-		cs.setY(1, 10)
-		
-		cs.setX(2, 10)
-		cs.setY(2, 10)
-		
-		cs.setX(3, 10)
-		cs.setY(3, 0)
-		
-		cs.setX(4, 0)
-		cs.setY(4, 0)
-		shell = geos.createLinearRing(cs)
-		
-		# Hole 1
-		cs = geos.CoordinateSequence(5,2)
-		cs.setX(0, 2)
-		cs.setY(0, 2)
-
-		cs.setX(1, 2)
-		cs.setY(1, 4)
-		
-		cs.setX(2, 4)
-		cs.setY(2, 4)
-		
-		cs.setX(3, 4)
-		cs.setY(3, 2)
-		
-		cs.setX(4, 2)
-		cs.setY(4, 2)
-		hole1 = geos.createLinearRing(cs)
-		
-		# Hole 2
-		cs = geos.CoordinateSequence(5,2)
-		cs.setX(0, 6)
-		cs.setY(0, 6)
-
-		cs.setX(1, 6)
-		cs.setY(1, 8)
-		
-		cs.setX(2, 8)
-		cs.setY(2, 8)
-		
-		cs.setX(3, 8)
-		cs.setY(3, 6)
-		
-		cs.setX(4, 6)
-		cs.setY(4, 6)
-		hole2 = geos.createLinearRing(cs)
-		
-		geom = geos.createPolygon(shell, [hole1, hole2])
-		assert isinstance(geom, geos.Polygon)
-		self.assertEqual('Polygon', geom.geomType())
-		self.assertEqual(geos.GEOS_POLYGON, geom.typeId())
-		
-		self.assertEqual(False, geom.isEmpty())
-		self.assertEqual(True, geom.isValid())
-		self.assertEqual(True, geom.isSimple())
-		self.assertEqual(False, geom.isRing())
-		self.assertEqual(True, geom.hasZ())
-		
-		self.assertEqual(1, geom.getNumGeometries())
-		
-		exteriorRing = geom.getExteriorRing()
-		assert(shell.equals(exteriorRing))
-		
-		self.assertEqual(2, geom.getNumInteriorRings())
-		assert(hole1.equals(geom.getInteriorRingN(0)))
-		assert(hole2.equals(geom.getInteriorRingN(1)))
-		
-		self.assertEqual(92, geom.area())
-		self.assertEqual(56, geom.length())
-	
-
-	def testDistance(self):
-		cs = geos.CoordinateSequence(1,2)
-		cs.setX(0, 0)
-		cs.setY(0, 0)
-		geom1 = geos.createPoint(cs)
-
-		cs = geos.CoordinateSequence(1,2)
-		cs.setX(0, 3)
-		cs.setY(0, 4)
-		geom2 = geos.createPoint(cs)
-		
-		self.assertEqual(5, geom1.distance(geom2))
-
-if __name__ == "__main__":
-	unittest.main()
diff --git a/swig/ruby/Makefile.am b/swig/ruby/Makefile.am
deleted file mode 100644
index fb29bdd..0000000
--- a/swig/ruby/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# This file is part of project GEOS (http://trac.osgeo.org/geos/) 
-#
-EXTRA_DIST = \
-	ruby.i 
-
-MAINTAINERCLEANFILES = geos_wrap.cxx
-
-if ENABLE_RUBY
-
-SUBDIRS = \
-	test
-
-BUILT_SOURCES = geos_wrap.cxx
-
-# Don't know why there needs to be dirdir but it makes automake happy
-rubyextensiondirdir = $(RUBY_EXTENSION_DIR)
-
-# Setup includes
-AM_CPPFLAGS = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH) -I$(RUBY_ARCH_INCLUDE_DIR)
-
-# Build Ruby module as shared library
-rubyextensiondir_LTLIBRARIES = geos.la
-geos_la_SOURCES = geos_wrap.cxx
-geos_la_LIBADD =  $(top_builddir)/capi/libgeos_c.la -l$(RUBY_SO_NAME)
-
-# Only need to grab the capi header files
-geos_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/capi
-
-# Specify -module and -avoid-version so we can create a file called geos.dll/so which is what Ruby wants
-geos_la_LDFLAGS = -no-undefined  -module -avoid-version -L$(RUBY_LIB_DIR) -L$(RUBY_ARCH_LIB_DIR)
-
-if ENABLE_SWIG
-
-geos_wrap.cxx: ../geos.i ruby.i
-	$(SWIG) -c++ -ruby -autorename -o $@ $<
-
-else # !ENABLE_SWIG
-
-geos_wrap.cxx: ../geos.i ruby.i
-	@echo "SWIG is disabled, can't build geos_wrap.cxx"
-	false
-
-endif # ENABLE_SWIG
-
-endif # ENABLE_RUBY
diff --git a/swig/ruby/geos_wrap.cxx b/swig/ruby/geos_wrap.cxx
deleted file mode 100644
index 4f08a11..0000000
--- a/swig/ruby/geos_wrap.cxx
+++ /dev/null
@@ -1,9932 +0,0 @@
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.10
- * 
- * This file is not intended to be easily readable and contains a number of 
- * coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG 
- * interface file instead. 
- * ----------------------------------------------------------------------------- */
-
-#define SWIGRUBY
-
-
-#ifdef __cplusplus
-/* SwigValueWrapper is described in swig.swg */
-template<typename T> class SwigValueWrapper {
-  struct SwigMovePointer {
-    T *ptr;
-    SwigMovePointer(T *p) : ptr(p) { }
-    ~SwigMovePointer() { delete ptr; }
-    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
-  } pointer;
-  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
-  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
-public:
-  SwigValueWrapper() : pointer(0) { }
-  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
-  operator T&() const { return *pointer.ptr; }
-  T *operator&() { return pointer.ptr; }
-};
-
-template <typename T> T SwigValueInit() {
-  return T();
-}
-#endif
-
-/* -----------------------------------------------------------------------------
- *  This section contains generic SWIG labels for method/variable
- *  declarations/attributes, and other compiler dependent labels.
- * ----------------------------------------------------------------------------- */
-
-/* template workaround for compilers that cannot correctly implement the C++ standard */
-#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# elif defined(__HP_aCC)
-/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
-/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-#  define SWIGTEMPLATEDISAMBIGUATOR
-# endif
-#endif
-
-/* inline attribute */
-#ifndef SWIGINLINE
-# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
-#   define SWIGINLINE inline
-# else
-#   define SWIGINLINE
-# endif
-#endif
-
-/* attribute recognised by some compilers to avoid 'unused' warnings */
-#ifndef SWIGUNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
-#   else
-#     define SWIGUNUSED
-#   endif
-# elif defined(__ICC)
-#   define SWIGUNUSED __attribute__ ((__unused__)) 
-# else
-#   define SWIGUNUSED 
-# endif
-#endif
-
-#ifndef SWIG_MSC_UNSUPPRESS_4505
-# if defined(_MSC_VER)
-#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif 
-#endif
-
-#ifndef SWIGUNUSEDPARM
-# ifdef __cplusplus
-#   define SWIGUNUSEDPARM(p)
-# else
-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
-# endif
-#endif
-
-/* internal SWIG method */
-#ifndef SWIGINTERN
-# define SWIGINTERN static SWIGUNUSED
-#endif
-
-/* internal inline SWIG method */
-#ifndef SWIGINTERNINLINE
-# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
-#endif
-
-/* exporting methods */
-#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#  ifndef GCC_HASCLASSVISIBILITY
-#    define GCC_HASCLASSVISIBILITY
-#  endif
-#endif
-
-#ifndef SWIGEXPORT
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   if defined(STATIC_LINKED)
-#     define SWIGEXPORT
-#   else
-#     define SWIGEXPORT __declspec(dllexport)
-#   endif
-# else
-#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
-#     define SWIGEXPORT __attribute__ ((visibility("default")))
-#   else
-#     define SWIGEXPORT
-#   endif
-# endif
-#endif
-
-/* calling conventions for Windows */
-#ifndef SWIGSTDCALL
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   define SWIGSTDCALL __stdcall
-# else
-#   define SWIGSTDCALL
-# endif 
-#endif
-
-/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
-# define _CRT_SECURE_NO_DEPRECATE
-#endif
-
-/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
-#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
-# define _SCL_SECURE_NO_DEPRECATE
-#endif
-
-
-/* -----------------------------------------------------------------------------
- *  This section contains generic SWIG labels for method/variable
- *  declarations/attributes, and other compiler dependent labels.
- * ----------------------------------------------------------------------------- */
-
-/* template workaround for compilers that cannot correctly implement the C++ standard */
-#ifndef SWIGTEMPLATEDISAMBIGUATOR
-# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# elif defined(__HP_aCC)
-/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
-/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
-#  define SWIGTEMPLATEDISAMBIGUATOR template
-# else
-#  define SWIGTEMPLATEDISAMBIGUATOR
-# endif
-#endif
-
-/* inline attribute */
-#ifndef SWIGINLINE
-# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
-#   define SWIGINLINE inline
-# else
-#   define SWIGINLINE
-# endif
-#endif
-
-/* attribute recognised by some compilers to avoid 'unused' warnings */
-#ifndef SWIGUNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
-#   else
-#     define SWIGUNUSED
-#   endif
-# elif defined(__ICC)
-#   define SWIGUNUSED __attribute__ ((__unused__)) 
-# else
-#   define SWIGUNUSED 
-# endif
-#endif
-
-#ifndef SWIG_MSC_UNSUPPRESS_4505
-# if defined(_MSC_VER)
-#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
-# endif 
-#endif
-
-#ifndef SWIGUNUSEDPARM
-# ifdef __cplusplus
-#   define SWIGUNUSEDPARM(p)
-# else
-#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
-# endif
-#endif
-
-/* internal SWIG method */
-#ifndef SWIGINTERN
-# define SWIGINTERN static SWIGUNUSED
-#endif
-
-/* internal inline SWIG method */
-#ifndef SWIGINTERNINLINE
-# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
-#endif
-
-/* exporting methods */
-#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#  ifndef GCC_HASCLASSVISIBILITY
-#    define GCC_HASCLASSVISIBILITY
-#  endif
-#endif
-
-#ifndef SWIGEXPORT
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   if defined(STATIC_LINKED)
-#     define SWIGEXPORT
-#   else
-#     define SWIGEXPORT __declspec(dllexport)
-#   endif
-# else
-#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
-#     define SWIGEXPORT __attribute__ ((visibility("default")))
-#   else
-#     define SWIGEXPORT
-#   endif
-# endif
-#endif
-
-/* calling conventions for Windows */
-#ifndef SWIGSTDCALL
-# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
-#   define SWIGSTDCALL __stdcall
-# else
-#   define SWIGSTDCALL
-# endif 
-#endif
-
-/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
-#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
-# define _CRT_SECURE_NO_DEPRECATE
-#endif
-
-/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
-#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
-# define _SCL_SECURE_NO_DEPRECATE
-#endif
-
-
-/* -----------------------------------------------------------------------------
- * swigrun.swg
- *
- * This file contains generic C API SWIG runtime support for pointer
- * type checking.
- * ----------------------------------------------------------------------------- */
-
-/* This should only be incremented when either the layout of swig_type_info changes,
-   or for whatever reason, the runtime changes incompatibly */
-#define SWIG_RUNTIME_VERSION "4"
-
-/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
-#ifdef SWIG_TYPE_TABLE
-# define SWIG_QUOTE_STRING(x) #x
-# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
-# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
-#else
-# define SWIG_TYPE_TABLE_NAME
-#endif
-
-/*
-  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
-  creating a static or dynamic library from the SWIG runtime code.
-  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
-  
-  But only do this if strictly necessary, ie, if you have problems
-  with your compiler or suchlike.
-*/
-
-#ifndef SWIGRUNTIME
-# define SWIGRUNTIME SWIGINTERN
-#endif
-
-#ifndef SWIGRUNTIMEINLINE
-# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
-#endif
-
-/*  Generic buffer size */
-#ifndef SWIG_BUFFER_SIZE
-# define SWIG_BUFFER_SIZE 1024
-#endif
-
-/* Flags for pointer conversions */
-#define SWIG_POINTER_DISOWN        0x1
-#define SWIG_CAST_NEW_MEMORY       0x2
-
-/* Flags for new pointer objects */
-#define SWIG_POINTER_OWN           0x1
-
-
-/* 
-   Flags/methods for returning states.
-   
-   The SWIG conversion methods, as ConvertPtr, return an integer 
-   that tells if the conversion was successful or not. And if not,
-   an error code can be returned (see swigerrors.swg for the codes).
-   
-   Use the following macros/flags to set or process the returning
-   states.
-   
-   In old versions of SWIG, code such as the following was usually written:
-
-     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
-       // success code
-     } else {
-       //fail code
-     }
-
-   Now you can be more explicit:
-
-    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
-    if (SWIG_IsOK(res)) {
-      // success code
-    } else {
-      // fail code
-    }
-
-   which is the same really, but now you can also do
-
-    Type *ptr;
-    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
-    if (SWIG_IsOK(res)) {
-      // success code
-      if (SWIG_IsNewObj(res) {
-        ...
-	delete *ptr;
-      } else {
-        ...
-      }
-    } else {
-      // fail code
-    }
-    
-   I.e., now SWIG_ConvertPtr can return new objects and you can
-   identify the case and take care of the deallocation. Of course that
-   also requires SWIG_ConvertPtr to return new result values, such as
-
-      int SWIG_ConvertPtr(obj, ptr,...) {         
-        if (<obj is ok>) {			       
-          if (<need new object>) {		       
-            *ptr = <ptr to new allocated object>; 
-            return SWIG_NEWOBJ;		       
-          } else {				       
-            *ptr = <ptr to old object>;	       
-            return SWIG_OLDOBJ;		       
-          } 				       
-        } else {				       
-          return SWIG_BADOBJ;		       
-        }					       
-      }
-
-   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
-   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
-   SWIG errors code.
-
-   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
-   allows to return the 'cast rank', for example, if you have this
-
-       int food(double)
-       int fooi(int);
-
-   and you call
- 
-      food(1)   // cast rank '1'  (1 -> 1.0)
-      fooi(1)   // cast rank '0'
-
-   just use the SWIG_AddCast()/SWIG_CheckState()
-*/
-
-#define SWIG_OK                    (0) 
-#define SWIG_ERROR                 (-1)
-#define SWIG_IsOK(r)               (r >= 0)
-#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
-
-/* The CastRankLimit says how many bits are used for the cast rank */
-#define SWIG_CASTRANKLIMIT         (1 << 8)
-/* The NewMask denotes the object was created (using new/malloc) */
-#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
-/* The TmpMask is for in/out typemaps that use temporal objects */
-#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
-/* Simple returning values */
-#define SWIG_BADOBJ                (SWIG_ERROR)
-#define SWIG_OLDOBJ                (SWIG_OK)
-#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
-#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
-/* Check, add and del mask methods */
-#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
-#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
-#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
-#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
-#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
-#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
-
-/* Cast-Rank Mode */
-#if defined(SWIG_CASTRANK_MODE)
-#  ifndef SWIG_TypeRank
-#    define SWIG_TypeRank             unsigned long
-#  endif
-#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
-#    define SWIG_MAXCASTRANK          (2)
-#  endif
-#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
-#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
-SWIGINTERNINLINE int SWIG_AddCast(int r) { 
-  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
-}
-SWIGINTERNINLINE int SWIG_CheckState(int r) { 
-  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
-}
-#else /* no cast-rank mode */
-#  define SWIG_AddCast(r) (r)
-#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
-#endif
-
-
-#include <string.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void *(*swig_converter_func)(void *, int *);
-typedef struct swig_type_info *(*swig_dycast_func)(void **);
-
-/* Structure to store information on one type */
-typedef struct swig_type_info {
-  const char             *name;			/* mangled name of this type */
-  const char             *str;			/* human readable name of this type */
-  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
-  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
-  void                   *clientdata;		/* language specific type data */
-  int                    owndata;		/* flag if the structure owns the clientdata */
-} swig_type_info;
-
-/* Structure to store a type and conversion function used for casting */
-typedef struct swig_cast_info {
-  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
-  swig_converter_func     converter;		/* function to cast the void pointers */
-  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
-  struct swig_cast_info  *prev;			/* pointer to the previous cast */
-} swig_cast_info;
-
-/* Structure used to store module information
- * Each module generates one structure like this, and the runtime collects
- * all of these structures and stores them in a circularly linked list.*/
-typedef struct swig_module_info {
-  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
-  size_t                 size;		        /* Number of types in this module */
-  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
-  swig_type_info         **type_initial;	/* Array of initially generated type structures */
-  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
-  void                    *clientdata;		/* Language specific module data */
-} swig_module_info;
-
-/* 
-  Compare two type names skipping the space characters, therefore
-  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
-
-  Return 0 when the two name types are equivalent, as in
-  strncmp, but skipping ' '.
-*/
-SWIGRUNTIME int
-SWIG_TypeNameComp(const char *f1, const char *l1,
-		  const char *f2, const char *l2) {
-  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
-    while ((*f1 == ' ') && (f1 != l1)) ++f1;
-    while ((*f2 == ' ') && (f2 != l2)) ++f2;
-    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
-  }
-  return (int)((l1 - f1) - (l2 - f2));
-}
-
-/*
-  Check type equivalence in a name list like <name1>|<name2>|...
-  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
-*/
-SWIGRUNTIME int
-SWIG_TypeCmp(const char *nb, const char *tb) {
-  int equiv = 1;
-  const char* te = tb + strlen(tb);
-  const char* ne = nb;
-  while (equiv != 0 && *ne) {
-    for (nb = ne; *ne; ++ne) {
-      if (*ne == '|') break;
-    }
-    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
-    if (*ne) ++ne;
-  }
-  return equiv;
-}
-
-/*
-  Check type equivalence in a name list like <name1>|<name2>|...
-  Return 0 if not equal, 1 if equal
-*/
-SWIGRUNTIME int
-SWIG_TypeEquiv(const char *nb, const char *tb) {
-  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
-}
-
-/*
-  Check the typename
-*/
-SWIGRUNTIME swig_cast_info *
-SWIG_TypeCheck(const char *c, swig_type_info *ty) {
-  if (ty) {
-    swig_cast_info *iter = ty->cast;
-    while (iter) {
-      if (strcmp(iter->type->name, c) == 0) {
-        if (iter == ty->cast)
-          return iter;
-        /* Move iter to the top of the linked list */
-        iter->prev->next = iter->next;
-        if (iter->next)
-          iter->next->prev = iter->prev;
-        iter->next = ty->cast;
-        iter->prev = 0;
-        if (ty->cast) ty->cast->prev = iter;
-        ty->cast = iter;
-        return iter;
-      }
-      iter = iter->next;
-    }
-  }
-  return 0;
-}
-
-/* 
-  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
-*/
-SWIGRUNTIME swig_cast_info *
-SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
-  if (ty) {
-    swig_cast_info *iter = ty->cast;
-    while (iter) {
-      if (iter->type == from) {
-        if (iter == ty->cast)
-          return iter;
-        /* Move iter to the top of the linked list */
-        iter->prev->next = iter->next;
-        if (iter->next)
-          iter->next->prev = iter->prev;
-        iter->next = ty->cast;
-        iter->prev = 0;
-        if (ty->cast) ty->cast->prev = iter;
-        ty->cast = iter;
-        return iter;
-      }
-      iter = iter->next;
-    }
-  }
-  return 0;
-}
-
-/*
-  Cast a pointer up an inheritance hierarchy
-*/
-SWIGRUNTIMEINLINE void *
-SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
-  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
-}
-
-/* 
-   Dynamic pointer casting. Down an inheritance hierarchy
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
-  swig_type_info *lastty = ty;
-  if (!ty || !ty->dcast) return ty;
-  while (ty && (ty->dcast)) {
-    ty = (*ty->dcast)(ptr);
-    if (ty) lastty = ty;
-  }
-  return lastty;
-}
-
-/*
-  Return the name associated with this type
-*/
-SWIGRUNTIMEINLINE const char *
-SWIG_TypeName(const swig_type_info *ty) {
-  return ty->name;
-}
-
-/*
-  Return the pretty name associated with this type,
-  that is an unmangled type name in a form presentable to the user.
-*/
-SWIGRUNTIME const char *
-SWIG_TypePrettyName(const swig_type_info *type) {
-  /* The "str" field contains the equivalent pretty names of the
-     type, separated by vertical-bar characters.  We choose
-     to print the last name, as it is often (?) the most
-     specific. */
-  if (!type) return NULL;
-  if (type->str != NULL) {
-    const char *last_name = type->str;
-    const char *s;
-    for (s = type->str; *s; s++)
-      if (*s == '|') last_name = s+1;
-    return last_name;
-  }
-  else
-    return type->name;
-}
-
-/* 
-   Set the clientdata field for a type
-*/
-SWIGRUNTIME void
-SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
-  swig_cast_info *cast = ti->cast;
-  /* if (ti->clientdata == clientdata) return; */
-  ti->clientdata = clientdata;
-  
-  while (cast) {
-    if (!cast->converter) {
-      swig_type_info *tc = cast->type;
-      if (!tc->clientdata) {
-	SWIG_TypeClientData(tc, clientdata);
-      }
-    }    
-    cast = cast->next;
-  }
-}
-SWIGRUNTIME void
-SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
-  SWIG_TypeClientData(ti, clientdata);
-  ti->owndata = 1;
-}
-  
-/*
-  Search for a swig_type_info structure only by mangled name
-  Search is a O(log #types)
-  
-  We start searching at module start, and finish searching when start == end.  
-  Note: if start == end at the beginning of the function, we go all the way around
-  the circular list.
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_MangledTypeQueryModule(swig_module_info *start, 
-                            swig_module_info *end, 
-		            const char *name) {
-  swig_module_info *iter = start;
-  do {
-    if (iter->size) {
-      register size_t l = 0;
-      register size_t r = iter->size - 1;
-      do {
-	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
-	register size_t i = (l + r) >> 1; 
-	const char *iname = iter->types[i]->name;
-	if (iname) {
-	  register int compare = strcmp(name, iname);
-	  if (compare == 0) {	    
-	    return iter->types[i];
-	  } else if (compare < 0) {
-	    if (i) {
-	      r = i - 1;
-	    } else {
-	      break;
-	    }
-	  } else if (compare > 0) {
-	    l = i + 1;
-	  }
-	} else {
-	  break; /* should never happen */
-	}
-      } while (l <= r);
-    }
-    iter = iter->next;
-  } while (iter != end);
-  return 0;
-}
-
-/*
-  Search for a swig_type_info structure for either a mangled name or a human readable name.
-  It first searches the mangled names of the types, which is a O(log #types)
-  If a type is not found it then searches the human readable names, which is O(#types).
-  
-  We start searching at module start, and finish searching when start == end.  
-  Note: if start == end at the beginning of the function, we go all the way around
-  the circular list.
-*/
-SWIGRUNTIME swig_type_info *
-SWIG_TypeQueryModule(swig_module_info *start, 
-                     swig_module_info *end, 
-		     const char *name) {
-  /* STEP 1: Search the name field using binary search */
-  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
-  if (ret) {
-    return ret;
-  } else {
-    /* STEP 2: If the type hasn't been found, do a complete search
-       of the str field (the human readable name) */
-    swig_module_info *iter = start;
-    do {
-      register size_t i = 0;
-      for (; i < iter->size; ++i) {
-	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
-	  return iter->types[i];
-      }
-      iter = iter->next;
-    } while (iter != end);
-  }
-  
-  /* neither found a match */
-  return 0;
-}
-
-/* 
-   Pack binary data into a string
-*/
-SWIGRUNTIME char *
-SWIG_PackData(char *c, void *ptr, size_t sz) {
-  static const char hex[17] = "0123456789abcdef";
-  register const unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu =  u + sz;
-  for (; u != eu; ++u) {
-    register unsigned char uu = *u;
-    *(c++) = hex[(uu & 0xf0) >> 4];
-    *(c++) = hex[uu & 0xf];
-  }
-  return c;
-}
-
-/* 
-   Unpack binary data from a string
-*/
-SWIGRUNTIME const char *
-SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
-  register unsigned char *u = (unsigned char *) ptr;
-  register const unsigned char *eu = u + sz;
-  for (; u != eu; ++u) {
-    register char d = *(c++);
-    register unsigned char uu;
-    if ((d >= '0') && (d <= '9'))
-      uu = ((d - '0') << 4);
-    else if ((d >= 'a') && (d <= 'f'))
-      uu = ((d - ('a'-10)) << 4);
-    else 
-      return (char *) 0;
-    d = *(c++);
-    if ((d >= '0') && (d <= '9'))
-      uu |= (d - '0');
-    else if ((d >= 'a') && (d <= 'f'))
-      uu |= (d - ('a'-10));
-    else 
-      return (char *) 0;
-    *u = uu;
-  }
-  return c;
-}
-
-/* 
-   Pack 'void *' into a string buffer.
-*/
-SWIGRUNTIME char *
-SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
-  char *r = buff;
-  if ((2*sizeof(void *) + 2) > bsz) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r,&ptr,sizeof(void *));
-  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
-  strcpy(r,name);
-  return buff;
-}
-
-SWIGRUNTIME const char *
-SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
-  if (*c != '_') {
-    if (strcmp(c,"NULL") == 0) {
-      *ptr = (void *) 0;
-      return name;
-    } else {
-      return 0;
-    }
-  }
-  return SWIG_UnpackData(++c,ptr,sizeof(void *));
-}
-
-SWIGRUNTIME char *
-SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
-  char *r = buff;
-  size_t lname = (name ? strlen(name) : 0);
-  if ((2*sz + 2 + lname) > bsz) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r,ptr,sz);
-  if (lname) {
-    strncpy(r,name,lname+1);
-  } else {
-    *r = 0;
-  }
-  return buff;
-}
-
-SWIGRUNTIME const char *
-SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
-  if (*c != '_') {
-    if (strcmp(c,"NULL") == 0) {
-      memset(ptr,0,sz);
-      return name;
-    } else {
-      return 0;
-    }
-  }
-  return SWIG_UnpackData(++c,ptr,sz);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-/*  Errors in SWIG */
-#define  SWIG_UnknownError    	   -1 
-#define  SWIG_IOError        	   -2 
-#define  SWIG_RuntimeError   	   -3 
-#define  SWIG_IndexError     	   -4 
-#define  SWIG_TypeError      	   -5 
-#define  SWIG_DivisionByZero 	   -6 
-#define  SWIG_OverflowError  	   -7 
-#define  SWIG_SyntaxError    	   -8 
-#define  SWIG_ValueError     	   -9 
-#define  SWIG_SystemError    	   -10
-#define  SWIG_AttributeError 	   -11
-#define  SWIG_MemoryError    	   -12 
-#define  SWIG_NullReferenceError   -13
-
-
-
-#include <ruby.h>
-
-/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
- * breaks using rb_intern as an lvalue, as SWIG does.  We work around this
- * issue for now by disabling this.
- * https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
- */
-#ifdef rb_intern
-# undef rb_intern
-#endif
-
-/* Remove global macros defined in Ruby's win32.h */
-#ifdef write
-# undef write
-#endif
-#ifdef read
-# undef read
-#endif
-#ifdef bind
-# undef bind
-#endif
-#ifdef close
-# undef close
-#endif
-#ifdef connect
-# undef connect
-#endif
-
-
-/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
-#ifndef NUM2LL
-#define NUM2LL(x) NUM2LONG((x))
-#endif
-#ifndef LL2NUM
-#define LL2NUM(x) INT2NUM((long) (x))
-#endif
-#ifndef ULL2NUM
-#define ULL2NUM(x) UINT2NUM((unsigned long) (x))
-#endif
-
-/* Ruby 1.7 doesn't (yet) define NUM2ULL() */
-#ifndef NUM2ULL
-#ifdef HAVE_LONG_LONG
-#define NUM2ULL(x) rb_num2ull((x))
-#else
-#define NUM2ULL(x) NUM2ULONG(x)
-#endif
-#endif
-
-/* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */
-/* Define these for older versions so we can just write code the new way */
-#ifndef RSTRING_LEN
-# define RSTRING_LEN(x) RSTRING(x)->len
-#endif
-#ifndef RSTRING_PTR
-# define RSTRING_PTR(x) RSTRING(x)->ptr
-#endif
-#ifndef RSTRING_END
-# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
-#endif
-#ifndef RARRAY_LEN
-# define RARRAY_LEN(x) RARRAY(x)->len
-#endif
-#ifndef RARRAY_PTR
-# define RARRAY_PTR(x) RARRAY(x)->ptr
-#endif
-#ifndef RFLOAT_VALUE
-# define RFLOAT_VALUE(x) RFLOAT(x)->value
-#endif
-#ifndef DOUBLE2NUM
-# define DOUBLE2NUM(x) rb_float_new(x)
-#endif
-#ifndef RHASH_TBL
-# define RHASH_TBL(x) (RHASH(x)->tbl)
-#endif
-#ifndef RHASH_ITER_LEV
-# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
-#endif
-#ifndef RHASH_IFNONE
-# define RHASH_IFNONE(x) (RHASH(x)->ifnone)
-#endif
-#ifndef RHASH_SIZE
-# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
-#endif
-#ifndef RHASH_EMPTY_P
-# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
-#endif
-#ifndef RSTRUCT_LEN
-# define RSTRUCT_LEN(x) RSTRUCT(x)->len
-#endif
-#ifndef RSTRUCT_PTR
-# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
-#endif
-
-
-
-/*
- * Need to be very careful about how these macros are defined, especially
- * when compiling C++ code or C code with an ANSI C compiler.
- *
- * VALUEFUNC(f) is a macro used to typecast a C function that implements
- * a Ruby method so that it can be passed as an argument to API functions
- * like rb_define_method() and rb_define_singleton_method().
- *
- * VOIDFUNC(f) is a macro used to typecast a C function that implements
- * either the "mark" or "free" stuff for a Ruby Data object, so that it
- * can be passed as an argument to API functions like Data_Wrap_Struct()
- * and Data_Make_Struct().
- */
- 
-#ifdef __cplusplus
-#  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
-#    define PROTECTFUNC(f) ((VALUE (*)()) f)
-#    define VALUEFUNC(f) ((VALUE (*)()) f)
-#    define VOIDFUNC(f)  ((void (*)()) f)
-#  else
-#    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
-#      define PROTECTFUNC(f) ((VALUE (*)()) f)
-#      define VALUEFUNC(f) ((VALUE (*)()) f)
-#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
-#    else /* These definitions should work for Ruby 1.7+ */
-#      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
-#      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
-#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
-#    endif
-#  endif
-#else
-#  define VALUEFUNC(f) (f)
-#  define VOIDFUNC(f) (f)
-#endif
-
-/* Don't use for expressions have side effect */
-#ifndef RB_STRING_VALUE
-#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
-#endif
-#ifndef StringValue
-#define StringValue(s) RB_STRING_VALUE(s)
-#endif
-#ifndef StringValuePtr
-#define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s))
-#endif
-#ifndef StringValueLen
-#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
-#endif
-#ifndef SafeStringValue
-#define SafeStringValue(v) do {\
-    StringValue(v);\
-    rb_check_safe_str(v);\
-} while (0)
-#endif
-
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
-#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
-#endif
-
-static VALUE _mSWIG = Qnil;
-
-/* -----------------------------------------------------------------------------
- * error manipulation
- * ----------------------------------------------------------------------------- */
-
-
-/* Define some additional error types */
-#define SWIG_ObjectPreviouslyDeletedError  -100
-
-
-/* Define custom exceptions for errors that do not map to existing Ruby
-   exceptions.  Note this only works for C++ since a global cannot be
-   initialized by a function in C.  For C, fallback to rb_eRuntimeError.*/
-
-SWIGINTERN VALUE 
-getNullReferenceError(void) {
-  static int init = 0;
-  static VALUE rb_eNullReferenceError ;
-  if (!init) {
-    init = 1;
-    rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
-  }
-  return rb_eNullReferenceError;
-} 
-
-SWIGINTERN VALUE 
-getObjectPreviouslyDeletedError(void) {
-  static int init = 0;
-  static VALUE rb_eObjectPreviouslyDeleted ;
-  if (!init) {
-    init = 1;
-    rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
-  }
-  return rb_eObjectPreviouslyDeleted;
-} 
-
-
-SWIGINTERN VALUE
-SWIG_Ruby_ErrorType(int SWIG_code) {
-  VALUE type;
-  switch (SWIG_code) {
-  case SWIG_MemoryError:
-    type = rb_eNoMemError;
-    break;
-  case SWIG_IOError:
-    type = rb_eIOError;
-    break;
-  case SWIG_RuntimeError:
-    type = rb_eRuntimeError;
-    break;
-  case SWIG_IndexError:
-    type = rb_eIndexError;
-    break;
-  case SWIG_TypeError:
-    type = rb_eTypeError;
-    break;
-  case SWIG_DivisionByZero:
-    type = rb_eZeroDivError;
-    break;
-  case SWIG_OverflowError:
-    type = rb_eRangeError;
-    break;
-  case SWIG_SyntaxError:
-    type = rb_eSyntaxError;
-    break;
-  case SWIG_ValueError:
-    type = rb_eArgError;
-    break;
-  case SWIG_SystemError:
-    type = rb_eFatal;
-    break;
-  case SWIG_AttributeError:
-    type = rb_eRuntimeError;
-    break;
-  case SWIG_NullReferenceError:
-    type = getNullReferenceError();
-    break;
-  case SWIG_ObjectPreviouslyDeletedError:
-    type = getObjectPreviouslyDeletedError();
-    break;
-  case SWIG_UnknownError:
-    type = rb_eRuntimeError;
-    break;
-  default:
-    type = rb_eRuntimeError;
-  }
-  return type;
-}
-
-
-/* This function is called when a user inputs a wrong argument to
-   a method.
- */
-SWIGINTERN 
-const char* Ruby_Format_TypeError( const char* msg,
-				   const char* type, 
-				   const char* name, 
-				   const int argn,
-				   VALUE input )
-{
-  char buf[128];
-  VALUE str;
-  VALUE asStr;
-  if ( msg && *msg )
-    {
-      str = rb_str_new2(msg);
-    }
-  else
-    {
-      str = rb_str_new(NULL, 0);
-    }
-
-  str = rb_str_cat2( str, "Expected argument " );
-  sprintf( buf, "%d of type ", argn-1 );
-  str = rb_str_cat2( str, buf );
-  str = rb_str_cat2( str, type );
-  str = rb_str_cat2( str, ", but got " );
-  str = rb_str_cat2( str, rb_obj_classname(input) );
-  str = rb_str_cat2( str, " " );
-  asStr = rb_inspect(input);
-  if ( RSTRING_LEN(asStr) > 30 )
-    {
-      str = rb_str_cat( str, StringValuePtr(asStr), 30 );
-      str = rb_str_cat2( str, "..." );
-    }
-  else
-    {
-      str = rb_str_append( str, asStr );
-    }
-
-  if ( name )
-    {
-      str = rb_str_cat2( str, "\n\tin SWIG method '" );
-      str = rb_str_cat2( str, name );
-      str = rb_str_cat2( str, "'" );
-    }
-
-  return StringValuePtr( str );
-}
-
-/* This function is called when an overloaded method fails */
-SWIGINTERN 
-void Ruby_Format_OverloadedError(
-				 const int argc,
-				 const int maxargs,
-				 const char* method, 
-				 const char* prototypes 
-				 )
-{
-  const char* msg = "Wrong # of arguments";
-  if ( argc <= maxargs ) msg = "Wrong arguments";
-  rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"  
-	   "Possible C/C++ prototypes are:\n%s",
-	   msg, method, prototypes);
-}
-
-/* -----------------------------------------------------------------------------
- * rubytracking.swg
- *
- * This file contains support for tracking mappings from 
- * Ruby objects to C++ objects.  This functionality is needed
- * to implement mark functions for Ruby's mark and sweep
- * garbage collector.
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Ruby 1.8 actually assumes the first case. */
-#if SIZEOF_VOIDP == SIZEOF_LONG
-#  define SWIG2NUM(v) LONG2NUM((unsigned long)v)
-#  define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
-#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
-#  define SWIG2NUM(v) LL2NUM((unsigned long long)v)
-#  define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
-#else
-#  error sizeof(void*) is not the same as long or long long
-#endif
-
-
-/* Global Ruby hash table to store Trackings from C/C++
-   structs to Ruby Objects. 
-*/
-static VALUE swig_ruby_trackings = Qnil;
-
-/* Global variable that stores a reference to the ruby
-   hash table delete function. */
-static ID swig_ruby_hash_delete;
-
-/* Setup a Ruby hash table to store Trackings */
-SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
-  /* Create a ruby hash table to store Trackings from C++ 
-     objects to Ruby objects. */
-
-  /* Try to see if some other .so has already created a 
-     tracking hash table, which we keep hidden in an instance var
-     in the SWIG module.
-     This is done to allow multiple DSOs to share the same
-     tracking table.
-  */
-  ID trackings_id = rb_intern( "@__trackings__" );
-  VALUE verbose = rb_gv_get("VERBOSE");
-  rb_gv_set("VERBOSE", Qfalse);
-  swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
-  rb_gv_set("VERBOSE", verbose);
-
-  /* No, it hasn't.  Create one ourselves */ 
-  if ( swig_ruby_trackings == Qnil )
-    {
-      swig_ruby_trackings = rb_hash_new();
-      rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
-    }
-
-  /* Now store a reference to the hash table delete function
-     so that we only have to look it up once.*/
-  swig_ruby_hash_delete = rb_intern("delete");
-}
-
-/* Get a Ruby number to reference a pointer */
-SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
-  /* We cast the pointer to an unsigned long
-     and then store a reference to it using
-     a Ruby number object. */
-
-  /* Convert the pointer to a Ruby number */
-  return SWIG2NUM(ptr);
-}
-
-/* Get a Ruby number to reference an object */
-SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
-  /* We cast the object to an unsigned long
-     and then store a reference to it using
-     a Ruby number object. */
-
-  /* Convert the Object to a Ruby number */
-  return SWIG2NUM(object);
-}
-
-/* Get a Ruby object from a previously stored reference */
-SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
-  /* The provided Ruby number object is a reference
-     to the Ruby object we want.*/
-
-  /* Convert the Ruby number to a Ruby object */
-  return NUM2SWIG(reference);
-}
-
-/* Add a Tracking from a C/C++ struct to a Ruby object */
-SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
-  /* In a Ruby hash table we store the pointer and
-     the associated Ruby object.  The trick here is
-     that we cannot store the Ruby object directly - if
-     we do then it cannot be garbage collected.  So
-     instead we typecast it as a unsigned long and
-     convert it to a Ruby number object.*/
-
-  /* Get a reference to the pointer as a Ruby number */
-  VALUE key = SWIG_RubyPtrToReference(ptr);
-
-  /* Get a reference to the Ruby object as a Ruby number */
-  VALUE value = SWIG_RubyObjectToReference(object);
-
-  /* Store the mapping to the global hash table. */
-  rb_hash_aset(swig_ruby_trackings, key, value);
-}
-
-/* Get the Ruby object that owns the specified C/C++ struct */
-SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
-  /* Get a reference to the pointer as a Ruby number */
-  VALUE key = SWIG_RubyPtrToReference(ptr);
-
-  /* Now lookup the value stored in the global hash table */
-  VALUE value = rb_hash_aref(swig_ruby_trackings, key);
-	
-  if (value == Qnil) {
-    /* No object exists - return nil. */
-    return Qnil;
-  }
-  else {
-    /* Convert this value to Ruby object */
-    return SWIG_RubyReferenceToObject(value);
-  }
-}
-
-/* Remove a Tracking from a C/C++ struct to a Ruby object.  It
-   is very important to remove objects once they are destroyed
-   since the same memory address may be reused later to create
-   a new object. */
-SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
-  /* Get a reference to the pointer as a Ruby number */
-  VALUE key = SWIG_RubyPtrToReference(ptr);
-
-  /* Delete the object from the hash table by calling Ruby's
-     do this we need to call the Hash.delete method.*/
-  rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
-}
-
-/* This is a helper method that unlinks a Ruby object from its
-   underlying C++ object.  This is needed if the lifetime of the
-   Ruby object is longer than the C++ object */
-SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
-  VALUE object = SWIG_RubyInstanceFor(ptr);
-
-  if (object != Qnil) {
-    DATA_PTR(object) = 0;
-  }
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-/* -----------------------------------------------------------------------------
- * Ruby API portion that goes into the runtime
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-SWIGINTERN VALUE
-SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
-  if (NIL_P(target)) {
-    target = o;
-  } else {
-    if (TYPE(target) != T_ARRAY) {
-      VALUE o2 = target;
-      target = rb_ary_new();
-      rb_ary_push(target, o2);
-    }
-    rb_ary_push(target, o);
-  }
-  return target;
-}
-
-/* For ruby1.8.4 and earlier. */
-#ifndef RUBY_INIT_STACK
-   RUBY_EXTERN void Init_stack(VALUE* addr);
-#  define RUBY_INIT_STACK \
-   VALUE variable_in_this_stack_frame; \
-   Init_stack(&variable_in_this_stack_frame);
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-/* -----------------------------------------------------------------------------
- * rubyrun.swg
- *
- * This file contains the runtime support for Ruby modules
- * and includes code for managing global variables and pointer
- * type checking.
- * ----------------------------------------------------------------------------- */
-
-/* For backward compatibility only */
-#define SWIG_POINTER_EXCEPTION  0
-
-/* for raw pointers */
-#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
-#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
-#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Ruby_NewPointerObj(ptr, type, flags)
-#define SWIG_AcquirePtr(ptr, own)                       SWIG_Ruby_AcquirePtr(ptr, own)
-#define swig_owntype                                    ruby_owntype
-
-/* for raw packed data */
-#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
-#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
-
-/* for class or struct pointers */
-#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
-#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
-
-/* for C or C++ function pointers */
-#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
-#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
-
-/* for C++ member pointers, ie, member methods */
-#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty)
-#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Ruby_NewPackedObj(ptr, sz, type)
-
-
-/* Runtime API */
-
-#define SWIG_GetModule(clientdata)                      SWIG_Ruby_GetModule(clientdata)
-#define SWIG_SetModule(clientdata, pointer) 		SWIG_Ruby_SetModule(pointer)
-
-
-/* Error manipulation */
-
-#define SWIG_ErrorType(code)                            SWIG_Ruby_ErrorType(code)               
-#define SWIG_Error(code, msg)            		rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
-#define SWIG_fail                        		goto fail				 
-
-
-/* Ruby-specific SWIG API */
-
-#define SWIG_InitRuntime()                              SWIG_Ruby_InitRuntime()              
-#define SWIG_define_class(ty)                        	SWIG_Ruby_define_class(ty)
-#define SWIG_NewClassInstance(value, ty)             	SWIG_Ruby_NewClassInstance(value, ty)
-#define SWIG_MangleStr(value)                        	SWIG_Ruby_MangleStr(value)		  
-#define SWIG_CheckConvert(value, ty)                 	SWIG_Ruby_CheckConvert(value, ty)	  
-
-#include "assert.h"
-
-/* -----------------------------------------------------------------------------
- * pointers/data manipulation
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
-  VALUE klass;
-  VALUE mImpl;
-  void  (*mark)(void *);
-  void  (*destroy)(void *);
-  int trackObjects;
-} swig_class;
-
-
-/* Global pointer used to keep some internal SWIG stuff */
-static VALUE _cSWIG_Pointer = Qnil;
-static VALUE swig_runtime_data_type_pointer = Qnil;
-
-/* Global IDs used to keep some internal SWIG stuff */
-static ID swig_arity_id = 0;
-static ID swig_call_id  = 0;
-
-/*
-  If your swig extension is to be run within an embedded ruby and has
-  director callbacks, you should set -DRUBY_EMBEDDED during compilation.  
-  This will reset ruby's stack frame on each entry point from the main 
-  program the first time a virtual director function is invoked (in a 
-  non-recursive way).
-  If this is not done, you run the risk of Ruby trashing the stack.
-*/
-
-#ifdef RUBY_EMBEDDED
-
-#  define SWIG_INIT_STACK                            \
-      if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
-      ++swig_virtual_calls;
-#  define SWIG_RELEASE_STACK --swig_virtual_calls;
-#  define Ruby_DirectorTypeMismatchException(x) \
-          rb_raise( rb_eTypeError, "%s", x ); return c_result;
-
-      static unsigned int swig_virtual_calls = 0;
-
-#else  /* normal non-embedded extension */
-
-#  define SWIG_INIT_STACK
-#  define SWIG_RELEASE_STACK
-#  define Ruby_DirectorTypeMismatchException(x) \
-          throw Swig::DirectorTypeMismatchException( x );
-
-#endif  /* RUBY_EMBEDDED */
-
-
-SWIGRUNTIME VALUE 
-getExceptionClass(void) {
-  static int init = 0;
-  static VALUE rubyExceptionClass ;
-  if (!init) {
-    init = 1;
-    rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
-  }
-  return rubyExceptionClass;
-} 
-
-/* This code checks to see if the Ruby object being raised as part
-   of an exception inherits from the Ruby class Exception.  If so,
-   the object is simply returned.  If not, then a new Ruby exception
-   object is created and that will be returned to Ruby.*/
-SWIGRUNTIME VALUE
-SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) {
-  VALUE exceptionClass = getExceptionClass();
-  if (rb_obj_is_kind_of(obj, exceptionClass)) {
-    return obj;
-  }  else {
-    return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj));
-  }
-}
-
-/* Initialize Ruby runtime support */
-SWIGRUNTIME void
-SWIG_Ruby_InitRuntime(void)
-{
-  if (_mSWIG == Qnil) {
-    _mSWIG = rb_define_module("SWIG");
-    swig_call_id  = rb_intern("call");
-    swig_arity_id = rb_intern("arity");
-  }
-}
-
-/* Define Ruby class for C type */
-SWIGRUNTIME void
-SWIG_Ruby_define_class(swig_type_info *type)
-{
-  VALUE klass;
-  char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
-  sprintf(klass_name, "TYPE%s", type->name);
-  if (NIL_P(_cSWIG_Pointer)) {
-    _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
-    rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
-  }
-  klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
-  free((void *) klass_name);
-}
-
-/* Create a new pointer object */
-SWIGRUNTIME VALUE
-SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
-{
-  int own =  flags & SWIG_POINTER_OWN; 
-  int track;
-  char *klass_name;
-  swig_class *sklass;
-  VALUE klass;
-  VALUE obj;
-  
-  if (!ptr)
-    return Qnil;
-  
-  if (type->clientdata) {
-    sklass = (swig_class *) type->clientdata;
-		
-    /* Are we tracking this class and have we already returned this Ruby object? */
-    track = sklass->trackObjects;
-    if (track) {
-      obj = SWIG_RubyInstanceFor(ptr);
-      
-      /* Check the object's type and make sure it has the correct type.
-        It might not in cases where methods do things like 
-        downcast methods. */
-      if (obj != Qnil) {
-        VALUE value = rb_iv_get(obj, "@__swigtype__");
-        const char* type_name = RSTRING_PTR(value);
-				
-        if (strcmp(type->name, type_name) == 0) {
-          return obj;
-        }
-      }
-    }
-
-    /* Create a new Ruby object */
-    obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
-			   ( own ? VOIDFUNC(sklass->destroy) : 
-			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
-			     ), ptr);
-
-    /* If tracking is on for this class then track this object. */
-    if (track) {
-      SWIG_RubyAddTracking(ptr, obj);
-    }
-  } else {
-    klass_name = (char *) malloc(4 + strlen(type->name) + 1);
-    sprintf(klass_name, "TYPE%s", type->name);
-    klass = rb_const_get(_mSWIG, rb_intern(klass_name));
-    free((void *) klass_name);
-    obj = Data_Wrap_Struct(klass, 0, 0, ptr);
-  }
-  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
-  
-  return obj;
-}
-
-/* Create a new class instance (always owned) */
-SWIGRUNTIME VALUE
-SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
-{
-  VALUE obj;
-  swig_class *sklass = (swig_class *) type->clientdata;
-  obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
-  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
-  return obj;
-}
-
-/* Get type mangle from class name */
-SWIGRUNTIMEINLINE char *
-SWIG_Ruby_MangleStr(VALUE obj)
-{
-  VALUE stype = rb_iv_get(obj, "@__swigtype__");
-  return StringValuePtr(stype);
-}
-
-/* Acquire a pointer value */
-typedef void (*ruby_owntype)(void*);
-
-SWIGRUNTIME ruby_owntype
-SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
-  if (obj) {
-    ruby_owntype oldown = RDATA(obj)->dfree;
-    RDATA(obj)->dfree = own;
-    return oldown;
-  } else {
-    return 0;
-  }
-}
-
-/* Convert a pointer value */
-SWIGRUNTIME int
-SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
-{
-  char *c;
-  swig_cast_info *tc;
-  void *vptr = 0;
-
-  /* Grab the pointer */
-  if (NIL_P(obj)) {
-    *ptr = 0;
-    return SWIG_OK;
-  } else {
-    if (TYPE(obj) != T_DATA) {
-      return SWIG_ERROR;
-    }
-    Data_Get_Struct(obj, void, vptr);
-  }
-  
-  if (own) *own = RDATA(obj)->dfree;
-    
-  /* Check to see if the input object is giving up ownership
-     of the underlying C struct or C++ object.  If so then we
-     need to reset the destructor since the Ruby object no 
-     longer owns the underlying C++ object.*/ 
-  if (flags & SWIG_POINTER_DISOWN) {
-    /* Is tracking on for this class? */
-    int track = 0;
-    if (ty && ty->clientdata) {
-      swig_class *sklass = (swig_class *) ty->clientdata;
-      track = sklass->trackObjects;
-    }
-		
-    if (track) {
-      /* We are tracking objects for this class.  Thus we change the destructor
-       * to SWIG_RubyRemoveTracking.  This allows us to
-       * remove the mapping from the C++ to Ruby object
-       * when the Ruby object is garbage collected.  If we don't
-       * do this, then it is possible we will return a reference 
-       * to a Ruby object that no longer exists thereby crashing Ruby. */
-      RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
-    } else {    
-      RDATA(obj)->dfree = 0;
-    }
-  }
-
-  /* Do type-checking if type info was provided */
-  if (ty) {
-    if (ty->clientdata) {
-      if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
-        if (vptr == 0) {
-          /* The object has already been deleted */
-          return SWIG_ObjectPreviouslyDeletedError;
-        }
-        *ptr = vptr;
-        return SWIG_OK;
-      }
-    }
-    if ((c = SWIG_MangleStr(obj)) == NULL) {
-      return SWIG_ERROR;
-    }
-    tc = SWIG_TypeCheck(c, ty);
-    if (!tc) {
-      return SWIG_ERROR;
-    } else {
-      int newmemory = 0;
-      *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
-      assert(!newmemory); /* newmemory handling not yet implemented */
-    }
-  } else {
-    *ptr = vptr;
-  }
-  
-  return SWIG_OK;
-}
-
-/* Check convert */
-SWIGRUNTIMEINLINE int
-SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
-{
-  char *c = SWIG_MangleStr(obj);
-  if (!c) return 0;
-  return SWIG_TypeCheck(c,ty) != 0;
-}
-
-SWIGRUNTIME VALUE
-SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
-  char result[1024];
-  char *r = result;
-  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
-  *(r++) = '_';
-  r = SWIG_PackData(r, ptr, sz);
-  strcpy(r, type->name);
-  return rb_str_new2(result);
-}
-
-/* Convert a packed value value */
-SWIGRUNTIME int
-SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
-  swig_cast_info *tc;
-  const char  *c;
-
-  if (TYPE(obj) != T_STRING) goto type_error;
-  c = StringValuePtr(obj);
-  /* Pointer values must start with leading underscore */
-  if (*c != '_') goto type_error;
-  c++;
-  c = SWIG_UnpackData(c, ptr, sz);
-  if (ty) {
-    tc = SWIG_TypeCheck(c, ty);
-    if (!tc) goto type_error;
-  }
-  return SWIG_OK;
-
- type_error:
-  return SWIG_ERROR;
-}
-
-SWIGRUNTIME swig_module_info *
-SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
-{
-  VALUE pointer;
-  swig_module_info *ret = 0;
-  VALUE verbose = rb_gv_get("VERBOSE");
-
- /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
-  rb_gv_set("VERBOSE", Qfalse);
-  
-  /* first check if pointer already created */
-  pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
-  if (pointer != Qnil) {
-    Data_Get_Struct(pointer, swig_module_info, ret);
-  }
-
-  /* reinstate warnings */
-  rb_gv_set("VERBOSE", verbose);
-  return ret;
-}
-
-SWIGRUNTIME void 
-SWIG_Ruby_SetModule(swig_module_info *pointer)
-{
-  /* register a new class */
-  VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
-  /* create and store the structure pointer to a global variable */
-  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
-  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
-}
-
-/* This function can be used to check whether a proc or method or similarly
-   callable function has been passed.  Usually used in a %typecheck, like:
-
-   %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
-        $result = SWIG_Ruby_isCallable( $input );
-   }
- */
-SWIGINTERN
-int SWIG_Ruby_isCallable( VALUE proc )
-{
-  if ( rb_respond_to( proc, swig_call_id ) )
-    return 1;
-  return 0;
-}
-
-/* This function can be used to check the arity (number of arguments)
-   a proc or method can take.  Usually used in a %typecheck.
-   Valid arities will be that equal to minimal or those < 0
-   which indicate a variable number of parameters at the end.
- */
-SWIGINTERN
-int SWIG_Ruby_arity( VALUE proc, int minimal )
-{
-  if ( rb_respond_to( proc, swig_arity_id ) )
-    {
-      VALUE num = rb_funcall( proc, swig_arity_id, 0 );
-      int arity = NUM2INT(num);
-      if ( arity < 0 && (arity+1) < -minimal ) return 1;
-      if ( arity == minimal ) return 1;
-      return 1;
-    }
-  return 0;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
-
-#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
-
-
-
-  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0) 
-
-
-/* -------- TYPES TABLE (BEGIN) -------- */
-
-#define SWIGTYPE_p_GeosCoordinateSequence swig_types[0]
-#define SWIGTYPE_p_GeosGeometry swig_types[1]
-#define SWIGTYPE_p_GeosGeometryCollection swig_types[2]
-#define SWIGTYPE_p_GeosLineString swig_types[3]
-#define SWIGTYPE_p_GeosLinearRing swig_types[4]
-#define SWIGTYPE_p_GeosMultiLineString swig_types[5]
-#define SWIGTYPE_p_GeosMultiLinearRing swig_types[6]
-#define SWIGTYPE_p_GeosMultiPoint swig_types[7]
-#define SWIGTYPE_p_GeosMultiPolygon swig_types[8]
-#define SWIGTYPE_p_GeosPoint swig_types[9]
-#define SWIGTYPE_p_GeosPolygon swig_types[10]
-#define SWIGTYPE_p_GeosPreparedGeometry swig_types[11]
-#define SWIGTYPE_p_GeosSTRtree swig_types[12]
-#define SWIGTYPE_p_GeosWkbReader swig_types[13]
-#define SWIGTYPE_p_GeosWkbWriter swig_types[14]
-#define SWIGTYPE_p_GeosWktReader swig_types[15]
-#define SWIGTYPE_p_GeosWktWriter swig_types[16]
-#define SWIGTYPE_p_char swig_types[17]
-#define SWIGTYPE_p_p_GeosLinearRing swig_types[18]
-#define SWIGTYPE_p_size_t swig_types[19]
-#define SWIGTYPE_p_swig__ConstIterator swig_types[20]
-#define SWIGTYPE_p_swig__GC_VALUE swig_types[21]
-#define SWIGTYPE_p_swig__Iterator swig_types[22]
-#define SWIGTYPE_p_unsigned_char swig_types[23]
-#define SWIGTYPE_p_void swig_types[24]
-static swig_type_info *swig_types[26];
-static swig_module_info swig_module = {swig_types, 25, 0, 0, 0, 0};
-#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
-#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
-
-/* -------- TYPES TABLE (END) -------- */
-
-#define SWIG_init    Init_geos
-#define SWIG_name    "Geos"
-
-static VALUE mGeos;
-
-#define SWIG_RUBY_THREAD_BEGIN_BLOCK
-#define SWIG_RUBY_THREAD_END_BLOCK
-
-
-#define SWIGVERSION 0x020010 
-#define SWIG_VERSION SWIGVERSION
-
-
-#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
-#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 
-
-
-#include <stdexcept>
-
-
-#include <string>
-
-
-#include <iostream>
-
-
-#include <stdexcept>
-
-
-namespace swig {
-  class SwigGCReferences {
-    // Hash of all GC_VALUE's currently in use
-    static SwigGCReferences s_references;
-
-    VALUE _hash;
-
-    SwigGCReferences() : _hash(Qnil) {
-    }
-    ~SwigGCReferences() {
-      if (_hash != Qnil)
-        rb_gc_unregister_address(&_hash);
-    }
-    static void EndProcHandler(VALUE) {
-      // Ruby interpreter ending - _hash can no longer be accessed.
-      s_references._hash = Qnil;
-    }
-  public:
-    static SwigGCReferences& instance() {
-      return s_references;
-    }
-    static void initialize() {
-      if (s_references._hash == Qnil) {
-        rb_set_end_proc(&EndProcHandler, Qnil);
-        s_references._hash = rb_hash_new();
-        rb_gc_register_address(&s_references._hash);
-      }
-    }
-    void GC_register(VALUE& obj) {
-      if (FIXNUM_P(obj) || SPECIAL_CONST_P(obj) || SYMBOL_P(obj))
-        return;
-      if (_hash != Qnil) {
-        VALUE val = rb_hash_aref(_hash, obj);
-        unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 0;
-        ++n;
-        rb_hash_aset(_hash, obj, INT2NUM(n));
-      }
-    }
-    void GC_unregister(const VALUE& obj) {
-      if (FIXNUM_P(obj) || SPECIAL_CONST_P(obj) || SYMBOL_P(obj))
-        return;
-      // this test should not be needed but I've noticed some very erratic
-      // behavior of none being unregistered in some very rare situations.
-      if (BUILTIN_TYPE(obj) == T_NONE)
-        return;
-      if (_hash != Qnil) {
-        VALUE val = rb_hash_aref(s_references._hash, obj);
-        unsigned n = FIXNUM_P(val) ? NUM2UINT(val) : 1;
-        --n;
-        if (n)
-          rb_hash_aset(s_references._hash, obj, INT2NUM(n));
-        else
-          rb_hash_delete(s_references._hash, obj);
-      }
-    }
-  };
-
-  class GC_VALUE {
-  protected:
-    VALUE  _obj;
-
-    static ID hash_id;
-    static ID   lt_id;
-    static ID   gt_id;
-    static ID   eq_id;
-    static ID   le_id;
-    static ID   ge_id;
-
-    static ID  pos_id;
-    static ID  neg_id;
-    static ID  inv_id;
-
-    static ID  add_id;
-    static ID  sub_id;
-    static ID  mul_id;
-    static ID  div_id;
-    static ID  mod_id;
-
-    static ID  and_id;
-    static ID   or_id;
-    static ID  xor_id;
-
-    static ID  lshift_id;
-    static ID  rshift_id;
-
-    struct OpArgs
-    {
-      VALUE src;
-      ID    id;
-      int   nargs;
-      VALUE target;
-    };
-
-
-  public:
-    GC_VALUE() : _obj(Qnil)
-    {
-    }
-
-    GC_VALUE(const GC_VALUE& item) : _obj(item._obj)
-    {
-      SwigGCReferences::instance().GC_register(_obj);
-    }
-    
-    GC_VALUE(VALUE obj) :_obj(obj)
-    {
-      SwigGCReferences::instance().GC_register(_obj);
-    }
-    
-    ~GC_VALUE() 
-    {
-      SwigGCReferences::instance().GC_unregister(_obj);
-    }
-    
-    GC_VALUE & operator=(const GC_VALUE& item) 
-    {
-      SwigGCReferences::instance().GC_unregister(_obj);
-      _obj = item._obj;
-      SwigGCReferences::instance().GC_register(_obj);
-      return *this;
-    }
-
-    operator VALUE() const
-    {
-      return _obj;
-    }
-
-    VALUE inspect() const
-    {
-      return rb_inspect(_obj);
-    }
-
-    VALUE to_s() const
-    {
-      return rb_inspect(_obj);
-    }
-
-    static VALUE swig_rescue_swallow(VALUE)
-    {
-      /*
-      VALUE errstr = rb_obj_as_string(rb_errinfo());
-      printf("Swallowing error: '%s'\n", RSTRING_PTR(StringValue(errstr)));
-      */
-      return Qnil; /* Swallow Ruby exception */
-    }
-
-    static VALUE swig_rescue_funcall(VALUE p)
-    {
-      OpArgs* args = (OpArgs*) p;
-      return rb_funcall(args->src, args->id, args->nargs, args->target);
-    }
-
-    bool relational_equal_op(const GC_VALUE& other, const ID& op_id, bool (*op_func)(const VALUE& a, const VALUE& b)) const
-    {
-      if (FIXNUM_P(_obj) && FIXNUM_P(other._obj)) {
-        return op_func(_obj, other._obj);
-      }
-      bool res = false;
-      VALUE ret = Qnil;
-      SWIG_RUBY_THREAD_BEGIN_BLOCK;
-      if (rb_respond_to(_obj, op_id)) {
-        OpArgs  args;
-        args.src    = _obj;
-        args.id     = op_id;
-        args.nargs  = 1;
-        args.target = VALUE(other);
-        ret = rb_rescue(RUBY_METHOD_FUNC(swig_rescue_funcall), VALUE(&args),
-                       (RUBY_METHOD_FUNC(swig_rescue_swallow)), Qnil);
-      }
-      if (ret == Qnil) {
-        VALUE a = rb_funcall(         _obj, hash_id, 0 );
-        VALUE b = rb_funcall( VALUE(other), hash_id, 0 );
-        res = op_func(a, b);
-      } else {
-        res = RTEST(ret);
-      }
-      SWIG_RUBY_THREAD_END_BLOCK;
-      return res;
-    }
-
-    static bool operator_eq(const VALUE& a, const VALUE& b) { return a == b; }
-    static bool operator_lt(const VALUE& a, const VALUE& b) { return a < b; }
-    static bool operator_le(const VALUE& a, const VALUE& b) { return a <= b; }
-    static bool operator_gt(const VALUE& a, const VALUE& b) { return a > b; }
-    static bool operator_ge(const VALUE& a, const VALUE& b) { return a >= b; }
-
-    bool operator==(const GC_VALUE& other) const { return relational_equal_op(other, eq_id, operator_eq); }
-    bool operator<(const GC_VALUE& other) const { return relational_equal_op(other, lt_id, operator_lt); }
-    bool operator<=(const GC_VALUE& other) const { return relational_equal_op(other, le_id, operator_le); }
-    bool operator>(const GC_VALUE& other) const { return relational_equal_op(other, gt_id, operator_gt); }
-    bool operator>=(const GC_VALUE& other) const { return relational_equal_op(other, ge_id, operator_ge); }
-
-    bool operator!=(const GC_VALUE& other) const
-    {
-      return !(this->operator==(other));
-    }
-
-    GC_VALUE unary_op(const ID& op_id) const
-    {
-      VALUE ret = Qnil;
-      SWIG_RUBY_THREAD_BEGIN_BLOCK;
-      OpArgs  args;
-      args.src    = _obj;
-      args.id     = op_id;
-      args.nargs  = 0;
-      args.target = Qnil;
-      ret = rb_rescue(RUBY_METHOD_FUNC(swig_rescue_funcall), VALUE(&args),
-                     (RUBY_METHOD_FUNC(swig_rescue_swallow)), Qnil);
-      SWIG_RUBY_THREAD_END_BLOCK;
-      return ret;
-    }
-
-    GC_VALUE operator+() const { return unary_op(pos_id); }
-    GC_VALUE operator-() const { return unary_op(neg_id); }
-    GC_VALUE operator~() const { return unary_op(inv_id); }
-
-    GC_VALUE binary_op(const GC_VALUE& other, const ID& op_id) const
-    {
-      VALUE ret = Qnil;
-      SWIG_RUBY_THREAD_BEGIN_BLOCK;
-      OpArgs  args;
-      args.src    = _obj;
-      args.id     = op_id;
-      args.nargs  = 1;
-      args.target = VALUE(other);
-      ret = rb_rescue(RUBY_METHOD_FUNC(swig_rescue_funcall), VALUE(&args),
-                     (RUBY_METHOD_FUNC(swig_rescue_swallow)), Qnil);
-      SWIG_RUBY_THREAD_END_BLOCK;
-      return GC_VALUE(ret);
-    }
-
-    GC_VALUE operator+(const GC_VALUE& other) const { return binary_op(other, add_id); }
-    GC_VALUE operator-(const GC_VALUE& other) const { return binary_op(other, sub_id); }
-    GC_VALUE operator*(const GC_VALUE& other) const { return binary_op(other, mul_id); }
-    GC_VALUE operator/(const GC_VALUE& other) const { return binary_op(other, div_id); }
-    GC_VALUE operator%(const GC_VALUE& other) const { return binary_op(other, mod_id); }
-    GC_VALUE operator&(const GC_VALUE& other) const { return binary_op(other, and_id); }
-    GC_VALUE operator^(const GC_VALUE& other) const { return binary_op(other, xor_id); }
-    GC_VALUE operator|(const GC_VALUE& other) const { return binary_op(other, or_id); }
-    GC_VALUE operator<<(const GC_VALUE& other) const { return binary_op(other, lshift_id); }
-    GC_VALUE operator>>(const GC_VALUE& other) const { return binary_op(other, rshift_id); }
-  };
-
-  ID  GC_VALUE::hash_id = rb_intern("hash");
-  ID  GC_VALUE::lt_id = rb_intern("<");
-  ID  GC_VALUE::gt_id = rb_intern(">");
-  ID  GC_VALUE::eq_id = rb_intern("==");
-  ID  GC_VALUE::le_id = rb_intern("<=");
-  ID  GC_VALUE::ge_id = rb_intern(">=");
-
-  ID  GC_VALUE::pos_id = rb_intern("+@");
-  ID  GC_VALUE::neg_id = rb_intern("-@");
-  ID  GC_VALUE::inv_id = rb_intern("~");
-
-  ID  GC_VALUE::add_id = rb_intern("+");
-  ID  GC_VALUE::sub_id = rb_intern("-");
-  ID  GC_VALUE::mul_id = rb_intern("*");
-  ID  GC_VALUE::div_id = rb_intern("/");
-  ID  GC_VALUE::mod_id = rb_intern("%");
-
-  ID  GC_VALUE::and_id = rb_intern("&");
-  ID  GC_VALUE::or_id  = rb_intern("|");
-  ID  GC_VALUE::xor_id = rb_intern("^");
-
-  ID  GC_VALUE::lshift_id = rb_intern("<<");
-  ID  GC_VALUE::rshift_id = rb_intern(">>");
-
-  SwigGCReferences SwigGCReferences::s_references;
-
-  typedef GC_VALUE LANGUAGE_OBJ;
-
-} // namespace swig
-
-
-
-#if defined(__GNUC__)
-#  if __GNUC__ == 2 && __GNUC_MINOR <= 96
-#     define SWIG_STD_NOMODERN_STL
-#  endif
-#endif
-
-
-#include <string>
-#include <stdexcept>
-#include <stddef.h>
-
-
-  #include <stddef.h>
-
-
-namespace swig {
-  struct stop_iteration {
-  };
-
-  /** 
-   * Abstract base class used to represent all iterators of STL containers.
-   */
-  struct ConstIterator {
-  public:
-    typedef ConstIterator self_type;
-
-  protected:
-    GC_VALUE _seq;
-
-  protected:
-    ConstIterator(VALUE seq) : _seq(seq)
-    {
-    }
-
-    // Random access iterator methods, but not required in Ruby
-    virtual ptrdiff_t distance(const ConstIterator &x) const
-    {
-      throw std::invalid_argument("distance not supported");
-    }
-
-    virtual bool equal (const ConstIterator &x) const
-    {
-      throw std::invalid_argument("equal not supported");
-    }
-
-    virtual self_type* advance(ptrdiff_t n)
-    {
-      throw std::invalid_argument("advance not supported");
-    }
-      
-  public:
-    virtual ~ConstIterator() {}
-
-    // Access iterator method, required by Ruby
-    virtual VALUE value() const {
-      throw std::invalid_argument("value not supported");
-      return Qnil;
-    };
-
-    virtual VALUE setValue( const VALUE& v ) {
-      throw std::invalid_argument("value= not supported");
-      return Qnil;
-    }
-
-    virtual self_type* next( size_t n = 1 )
-    {
-      return this->advance( n );
-    }
-
-    virtual self_type* previous( size_t n = 1 )
-    {
-      ptrdiff_t nn = n;
-      return this->advance( -nn );
-    }
-
-    virtual VALUE to_s() const {
-      throw std::invalid_argument("to_s not supported");
-      return Qnil;
-    }
-
-    virtual VALUE inspect() const {
-      throw std::invalid_argument("inspect not supported");
-      return Qnil;
-    }
-    
-    virtual ConstIterator *dup() const
-    {
-      throw std::invalid_argument("dup not supported");
-      return NULL;
-    }
-
-    //
-    // C++ common/needed methods.  We emulate a bidirectional
-    // operator, to be compatible with all the STL.
-    // The iterator traits will then tell the STL what type of
-    // iterator we really are.
-    //
-    ConstIterator() : _seq( Qnil )
-    {
-    }
-
-    ConstIterator( const self_type& b ) : _seq( b._seq )
-    {
-    }
-
-    self_type& operator=( const self_type& b )
-    {
-      _seq = b._seq;
-      return *this;
-    }
-
-    bool operator == (const ConstIterator& x)  const
-    {
-      return equal(x);
-    }
-      
-    bool operator != (const ConstIterator& x) const
-    {
-      return ! operator==(x);
-    }
-      
-    // Pre-decrement operator
-    self_type& operator--()
-    {
-      return *previous();
-    }
-
-    // Pre-increment operator
-    self_type& operator++()
-    {
-      return *next();
-    }
-
-    // Post-decrement operator
-    self_type operator--(int)
-    {
-      self_type r = *this;
-      previous();
-      return r;
-    }
-
-    // Post-increment operator
-    self_type operator++(int)
-    {
-      self_type r = *this;
-      next();
-      return r;
-    }
-
-    ConstIterator& operator += (ptrdiff_t n)
-    {
-      return *advance(n);
-    }
-
-    ConstIterator& operator -= (ptrdiff_t n)
-    {
-      return *advance(-n);
-    }
-
-    ConstIterator* operator + (ptrdiff_t n) const
-    {
-      return dup()->advance(n);
-    }
-
-    ConstIterator* operator - (ptrdiff_t n) const
-    {
-      return dup()->advance(-n);
-    }
-      
-    ptrdiff_t operator - (const ConstIterator& x) const
-    {
-      return x.distance(*this);
-    }
-      
-    static swig_type_info* descriptor() {
-      static int init = 0;
-      static swig_type_info* desc = 0;
-      if (!init) {
-	desc = SWIG_TypeQuery("swig::ConstIterator *");
-	init = 1;
-      }	
-      return desc;
-    }
-  };
-
-
-  /**
-   * Abstract base class used to represent all non-const iterators of STL containers.
-   * 
-   */
-  struct Iterator : public ConstIterator {
-  public:
-    typedef Iterator self_type;
-
-  protected:
-    Iterator(VALUE seq) : ConstIterator(seq)
-    {
-    }
-
-    virtual self_type* advance(ptrdiff_t n)
-    {
-      throw std::invalid_argument("operation not supported");
-    }
-
-  public:
-    static swig_type_info* descriptor() {
-      static int init = 0;
-      static swig_type_info* desc = 0;
-      if (!init) {
-	desc = SWIG_TypeQuery("swig::Iterator *");
-	init = 1;
-      }	
-      return desc;
-    }
-    
-    virtual Iterator *dup() const
-    {
-      throw std::invalid_argument("dup not supported");
-      return NULL;
-    }
-      
-    virtual self_type* next( size_t n = 1 )
-    {
-      return this->advance( n );
-    }
-
-    virtual self_type* previous( size_t n = 1 )
-    {
-      ptrdiff_t nn = n;
-      return this->advance( -nn );
-    }
-
-    bool operator == (const ConstIterator& x)  const
-    {
-      return equal(x);
-    }
-      
-    bool operator != (const Iterator& x) const
-    {
-      return ! operator==(x);
-    }
-      
-    Iterator& operator += (ptrdiff_t n)
-    {
-      return *advance(n);
-    }
-
-    Iterator& operator -= (ptrdiff_t n)
-    {
-      return *advance(-n);
-    }
-      
-    Iterator* operator + (ptrdiff_t n) const
-    {
-      return dup()->advance(n);
-    }
-
-    Iterator* operator - (ptrdiff_t n) const
-    {
-      return dup()->advance(-n);
-    }
-      
-    ptrdiff_t operator - (const Iterator& x) const
-    {
-      return x.distance(*this);
-    }
-  };
-
-}
-
-
-SWIGINTERN VALUE
-SWIG_ruby_failed(void)
-{
-  return Qnil;
-} 
-
-
-/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
-SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
-{
-  VALUE obj = args[0];
-  VALUE type = TYPE(obj);
-  unsigned long *res = (unsigned long *)(args[1]);
-  *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj);
-  return obj;
-}
-/*@SWIG@*/
-
-SWIGINTERN int
-SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) 
-{
-  VALUE type = TYPE(obj);
-  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
-    unsigned long v;
-    VALUE a[2];
-    a[0] = obj;
-    a[1] = (VALUE)(&v);
-    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
-      if (val) *val = v;
-      return SWIG_OK;
-    }
-  }
-  return SWIG_TypeError;
-}
-
-
-SWIGINTERNINLINE int
-SWIG_AsVal_size_t (VALUE obj, size_t *val)
-{
-  unsigned long v;
-  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
-  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
-  return res;
-}
-
-
-SWIGINTERNINLINE VALUE
-SWIG_From_bool  (bool value)
-{
-  return value ? Qtrue : Qfalse;
-}
-
-
-/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
-SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
-{
-  VALUE obj = args[0];
-  VALUE type = TYPE(obj);
-  long *res = (long *)(args[1]);
-  *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj);
-  return obj;
-}
-/*@SWIG@*/
-
-SWIGINTERN int
-SWIG_AsVal_long (VALUE obj, long* val)
-{
-  VALUE type = TYPE(obj);
-  if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
-    long v;
-    VALUE a[2];
-    a[0] = obj;
-    a[1] = (VALUE)(&v);
-    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
-      if (val) *val = v;
-      return SWIG_OK;
-    }
-  }
-  return SWIG_TypeError;
-}
-
-
-SWIGINTERNINLINE int
-SWIG_AsVal_ptrdiff_t (VALUE obj, ptrdiff_t *val)
-{
-  long v;
-  int res = SWIG_AsVal_long (obj, val ? &v : 0);
-  if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
-  return res;
-}
-
-
-#include <limits.h>
-#if !defined(SWIG_NO_LLONG_MAX)
-# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
-#   define LLONG_MAX __LONG_LONG_MAX__
-#   define LLONG_MIN (-LLONG_MAX - 1LL)
-#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
-# endif
-#endif
-
-
-  #define SWIG_From_long   LONG2NUM 
-
-
-SWIGINTERNINLINE VALUE
-SWIG_From_ptrdiff_t  (ptrdiff_t value)
-{    
-  return SWIG_From_long  (static_cast< long >(value));
-}
-
-
-#include <stdexcept>
-
-
-#include <algorithm>
-
-
-#include <vector>
-
- 
-#include "geos_c.h"
-/* Needed for va_start, etc. */
-#include <stdarg.h>
-
-
-SWIGINTERNINLINE VALUE
-SWIG_From_int  (int value)
-{    
-  return SWIG_From_long  (value);
-}
-
-
-SWIGINTERN swig_type_info*
-SWIG_pchar_descriptor(void)
-{
-  static int init = 0;
-  static swig_type_info* info = 0;
-  if (!init) {
-    info = SWIG_TypeQuery("_p_char");
-    init = 1;
-  }
-  return info;
-}
-
-
-SWIGINTERNINLINE VALUE 
-SWIG_FromCharPtrAndSize(const char* carray, size_t size)
-{
-  if (carray) {
-    if (size > LONG_MAX) {
-      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-      return pchar_descriptor ? 
-	SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : Qnil;
-    } else {
-      return rb_str_new(carray, static_cast< long >(size));
-    }
-  } else {
-    return Qnil;
-  }
-}
-
-
-SWIGINTERNINLINE VALUE 
-SWIG_FromCharPtr(const char *cptr)
-{ 
-  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
-}
-
-
-    static const int DEFAULT_QUADRANT_SEGMENTS=8;
-
-
-
-/* This is not thread safe ! */
-static const int MESSAGE_SIZE = 1000;
-static char message[MESSAGE_SIZE];
-
-void noticeHandler(const char *fmt, ...)
-{
-    va_list args;
-    va_start(args, fmt);
-    vsnprintf(message, sizeof(message) - 1, fmt, args);
-    va_end(args);
-}
-
-void errorHandler(const char *fmt, ...)
-{
-    va_list args;
-    va_start(args, fmt);
-    vsnprintf(message, sizeof(message) - 1, fmt, args);
-    va_end(args);
-}
-
-
-    /* this callback yields the data item to the block */
-    static void GeosSTRtree_query_callback (void *data, void *nothing) {
-        if (rb_block_given_p()) {
-            rb_yield((VALUE) data);
-        }
-    }
-
-
-    static void GeosSTRtree_mark_item (void *data, void *nothing)
-    {
-        if ((VALUE) data != Qnil) {
-            rb_gc_mark((VALUE)data);
-        }
-    }
-
-    static void mark_GeosSTRtree(void *self)
-    {
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        GEOSSTRtree_iterate(tree, GeosSTRtree_mark_item, NULL);
-    }
-
-
-typedef void GeosCoordinateSequence;
-
-void checkCoordSeqBounds(const GEOSCoordSeq coordSeq, const size_t index)
-{
-    unsigned int size = 0;
-    GEOSCoordSeq_getSize(coordSeq, &size);
-
-    if (index < 0 || index >= size)
-        throw std::runtime_error("Index out of bounds");
-}
-
-SWIGINTERN GeosCoordinateSequence *new_GeosCoordinateSequence(size_t size,size_t dims){
-        return (GeosCoordinateSequence*) GEOSCoordSeq_create(size, dims);
-    }
-SWIGINTERN GeosCoordinateSequence *GeosCoordinateSequence_clone(GeosCoordinateSequence *self){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        return (GeosCoordinateSequence*) GEOSCoordSeq_clone(coords);
-    }
-
-/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
-SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
-{
-  VALUE obj = args[0];
-  VALUE type = TYPE(obj);
-  double *res = (double *)(args[1]);
-  *res = NUM2DBL(obj);
-  return obj;
-}
-/*@SWIG@*/
-
-SWIGINTERN int
-SWIG_AsVal_double (VALUE obj, double *val)
-{
-  VALUE type = TYPE(obj);
-  if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) {
-    double v;
-    VALUE a[2];
-    a[0] = obj;
-    a[1] = (VALUE)(&v);
-    if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
-      if (val) *val = v;
-      return SWIG_OK;
-    }
-  }
-  return SWIG_TypeError;
-}
-
-SWIGINTERN int GeosCoordinateSequence_setX(GeosCoordinateSequence *self,size_t idx,double val){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setX(coords, idx, val);
-    }
-SWIGINTERN int GeosCoordinateSequence_setY(GeosCoordinateSequence *self,size_t idx,double val){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setY(coords, idx, val);
-    }
-SWIGINTERN int GeosCoordinateSequence_setZ(GeosCoordinateSequence *self,size_t idx,double val){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setZ(coords, idx, val);
-    }
-SWIGINTERN int GeosCoordinateSequence_setOrdinate(GeosCoordinateSequence *self,size_t idx,size_t dim,double val){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        return GEOSCoordSeq_setOrdinate(coords, idx, dim, val);
-    }
-SWIGINTERN double GeosCoordinateSequence_getX(GeosCoordinateSequence *self,size_t idx){
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getX(coords, idx, &result);
-        return result;
-    }
-
-  #define SWIG_From_double   rb_float_new 
-
-SWIGINTERN double GeosCoordinateSequence_getY(GeosCoordinateSequence *self,size_t idx){
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getY(coords, idx, &result);
-        return result;
-    }
-SWIGINTERN double GeosCoordinateSequence_getZ(GeosCoordinateSequence *self,size_t idx){
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getZ(coords, idx, &result);
-        return result;
-    }
-SWIGINTERN double GeosCoordinateSequence_getOrdinate(GeosCoordinateSequence *self,size_t idx,size_t dim){
-        double result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        checkCoordSeqBounds(coords, idx);
-        GEOSCoordSeq_getOrdinate(coords, idx, dim, &result);
-        return result;
-    }
-SWIGINTERN unsigned int GeosCoordinateSequence_getSize(GeosCoordinateSequence *self){
-        unsigned int result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        GEOSCoordSeq_getSize(coords, &result);
-        return result;
-    }
-
-SWIGINTERNINLINE VALUE
-SWIG_From_unsigned_SS_long  (unsigned long value)
-{
-  return ULONG2NUM(value); 
-}
-
-
-SWIGINTERNINLINE VALUE
-SWIG_From_unsigned_SS_int  (unsigned int value)
-{    
-  return SWIG_From_unsigned_SS_long  (value);
-}
-
-SWIGINTERN unsigned int GeosCoordinateSequence_getDimensions(GeosCoordinateSequence *self){
-        unsigned int result;
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        GEOSCoordSeq_getDimensions(coords, &result);
-        return result;
-    }
-
-typedef void GeosGeometry;
-typedef void GeosPoint;
-typedef void GeosLineString;
-typedef void GeosLinearRing;
-typedef void GeosPolygon;
-typedef void GeosGeometryCollection;
-typedef void GeosMultiPoint;
-typedef void GeosMultiLineString;
-typedef void GeosMultiLinearRing;
-typedef void GeosMultiPolygon;
-
-typedef void GeosWktReader;
-typedef void GeosWktWriter;
-typedef void GeosWkbReader;
-typedef void GeosWkbWriter;
-
-
-bool checkBoolResult(char result)
-{
-    int intResult = (int) result;
-
-    if (intResult == 1)
-        return true;
-    else if (intResult == 0)
-        return false;
-    else
-        throw std::runtime_error(message);
-}
-
-SWIGINTERN GeosGeometry *GeosGeometry_clone(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeom_clone(geom);
-    }
-SWIGINTERN char *GeosGeometry_geomType(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeomType(geom);
-    }
-SWIGINTERN int GeosGeometry_typeId(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeomTypeId(geom);
-    }
-SWIGINTERN void GeosGeometry_normalize(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        int result = GEOSNormalize(geom);
-
-        if (result == -1)
-            throw std::runtime_error(message);
-    }
-SWIGINTERN int GeosGeometry_getSRID(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGetSRID(geom);
-    }
-
-SWIGINTERN int
-SWIG_AsVal_int (VALUE obj, int *val)
-{
-  long v;
-  int res = SWIG_AsVal_long (obj, &v);
-  if (SWIG_IsOK(res)) {
-    if ((v < INT_MIN || v > INT_MAX)) {
-      return SWIG_OverflowError;
-    } else {
-      if (val) *val = static_cast< int >(v);
-    }
-  }  
-  return res;
-}
-
-SWIGINTERN void GeosGeometry_setSRID(GeosGeometry *self,int SRID){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSSetSRID(geom, SRID);
-    }
-SWIGINTERN size_t GeosGeometry_getDimensions(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSGeom_getDimensions(geom);
-    }
-
-SWIGINTERNINLINE VALUE
-SWIG_From_size_t  (size_t value)
-{    
-  return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
-}
-
-SWIGINTERN size_t GeosGeometry_getNumGeometries(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        size_t result = GEOSGetNumGeometries(geom);
-        
-        if ((int)result == -1)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_intersection(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSIntersection(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_buffer(GeosGeometry *self,double width,int quadsegs){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSBuffer(geom, width, quadsegs);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_convexHull(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSConvexHull(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_difference(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSDifference(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_symDifference(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSSymDifference(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_boundary(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSBoundary(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_geomUnion(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return (GeosGeometry*) GEOSUnion(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_pointOnSurface(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSPointOnSurface(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_getCentroid(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSGetCentroid(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_getEnvelope(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSEnvelope(geom);
-    }
-SWIGINTERN char *GeosGeometry_relate(GeosGeometry *self,GeosGeometry *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return GEOSRelate(geom, otherGeom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_lineMerge(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return GEOSLineMerge(geom);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_simplify(GeosGeometry *self,double tolerance){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSSimplify(geom, tolerance);
-    }
-SWIGINTERN GeosGeometry *GeosGeometry_topologyPreserveSimplify(GeosGeometry *self,double tolerance){
-        GEOSGeom geom = (GEOSGeom) self;
-        return (GeosGeometry*) GEOSTopologyPreserveSimplify(geom, tolerance);
-    }
-
-SWIGINTERN int
-SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
-{
-  if (TYPE(obj) == T_STRING) {
-    char *cstr = StringValuePtr(obj); 
-    size_t size = RSTRING_LEN(obj) + 1;
-    if (cptr)  {
-      if (alloc) {
-	if (*alloc == SWIG_NEWOBJ) {
-	  *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
-	} else {
-	  *cptr = cstr;
-	  *alloc = SWIG_OLDOBJ;
-	}
-      }
-    }
-    if (psize) *psize = size;
-    return SWIG_OK;
-  } else {
-    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-    if (pchar_descriptor) {
-      void* vptr = 0;
-      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
-	if (cptr) *cptr = (char *)vptr;
-	if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0;
-	if (alloc) *alloc = SWIG_OLDOBJ;
-	return SWIG_OK;
-      }
-    }
-  }  
-  return SWIG_TypeError;
-}
-
-
-
-
-SWIGINTERN bool GeosGeometry_relatePattern(GeosGeometry *self,GeosGeometry const *other,char const *pat){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSRelatePattern(geom, otherGeom, pat));
-    }
-SWIGINTERN bool GeosGeometry_disjoint(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSDisjoint(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_touches(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSTouches(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_intersects(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSIntersects(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_crosses(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSCrosses(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_within(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSWithin(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_contains(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSContains(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_overlaps(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSOverlaps(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_equals(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSEquals(geom, otherGeom));
-    }
-SWIGINTERN bool GeosGeometry_equalsExact(GeosGeometry *self,GeosGeometry const *other,double tolerance){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSEqualsExact(geom, otherGeom, tolerance));
-    }
-SWIGINTERN bool GeosGeometry_isEmpty(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisEmpty(geom));
-    }
-SWIGINTERN bool GeosGeometry_isValid(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisValid(geom));
-    }
-SWIGINTERN bool GeosGeometry_isSimple(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisSimple(geom));
-    }
-SWIGINTERN bool GeosGeometry_isRing(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSisRing(geom));
-    }
-SWIGINTERN bool GeosGeometry_hasZ(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        return checkBoolResult(GEOSHasZ(geom));
-    }
-SWIGINTERN double GeosGeometry_area(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        double result;
-
-        int code = GEOSArea(geom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN double GeosGeometry_length(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        double result;
-
-        int code = GEOSLength(geom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN double GeosGeometry_distance(GeosGeometry *self,GeosGeometry const *other){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        double result;
-
-        int code = GEOSDistance(geom, otherGeom, &result);
-
-        if (code == 0)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN GeosCoordinateSequence const *GeosPoint_getCoordSeq(GeosPoint *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-SWIGINTERN GeosCoordinateSequence const *GeosLineString_getCoordSeq(GeosLineString *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-SWIGINTERN GeosCoordinateSequence const *GeosLinearRing_getCoordSeq(GeosLinearRing *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSCoordSeq result = (const GEOSCoordSeq) GEOSGeom_getCoordSeq(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosCoordinateSequence*) result;
-    }
-SWIGINTERN GeosGeometry const *GeosPolygon_getExteriorRing(GeosPolygon *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSGeom result = (const GEOSGeom) GEOSGetExteriorRing(geom);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-SWIGINTERN size_t GeosPolygon_getNumInteriorRings(GeosPolygon *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        size_t result = GEOSGetNumInteriorRings(geom);
-
-        if ((int)result == -1)
-            throw std::runtime_error(message);
-
-        return result;
-    }
-SWIGINTERN GeosGeometry const *GeosPolygon_getInteriorRingN(GeosPolygon *self,size_t n){
-        GEOSGeom geom = (GEOSGeom) self;
-
-        size_t size = GEOSGetNumInteriorRings(geom);
-
-        if (n < 0 || n >= size)
-            throw std::runtime_error("Index out of bounds");
-
-        const GEOSGeom result = (const GEOSGeom) GEOSGetInteriorRingN(geom, n);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-SWIGINTERN GeosGeometry const *GeosGeometryCollection_getGeometryN(GeosGeometryCollection *self,size_t n){
-        GEOSGeom geom = (GEOSGeom) self;
-        const GEOSGeom result = (const GEOSGeom) GEOSGetGeometryN(geom, n);
-
-        if (result == NULL)
-            throw std::runtime_error(message);
-
-        return (const GeosGeometry*) result;
-    }
-
-GeosGeometry *createPoint(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createPoint(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createLineString(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createLineString(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createLinearRing(GeosCoordinateSequence *s)
-{
-    GEOSCoordSeq coords = (GEOSCoordSeq) s;
-    GEOSGeom geom = GEOSGeom_createLinearRing(coords);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-GeosGeometry *createPolygon(GeosLinearRing *shell, GeosLinearRing **holes, size_t nholes)
-{
-    GEOSGeom shellGeom = (GEOSGeom) shell;
-    GEOSGeom* holeGeoms = (GEOSGeom*) holes;
-    GEOSGeom geom = GEOSGeom_createPolygon(shellGeom, holeGeoms, nholes);
-
-    if(geom == NULL)
-        throw std::runtime_error(message);
-
-    return (GeosGeometry*) geom;
-}
-
-
-
-typedef void GeosPreparedGeometry;
-
-SWIGINTERN GeosPreparedGeometry *new_GeosPreparedGeometry(GeosGeometry const *source){
-        const GEOSPreparedGeometry *prep = GEOSPrepare((const GEOSGeometry *)source);
-        if(prep == NULL)
-            throw std::runtime_error(message);
-        return (GeosPreparedGeometry *) prep;
-    }
-SWIGINTERN bool GeosPreparedGeometry_contains(GeosPreparedGeometry *self,GeosGeometry const *other){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedContains(prep, otherGeom));
-    }
-SWIGINTERN bool GeosPreparedGeometry_containsProperly(GeosPreparedGeometry *self,GeosGeometry const *other){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedContainsProperly(prep, otherGeom));
-    }
-SWIGINTERN bool GeosPreparedGeometry_covers(GeosPreparedGeometry *self,GeosGeometry const *other){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedCovers(prep, otherGeom));
-    }
-SWIGINTERN bool GeosPreparedGeometry_intersects(GeosPreparedGeometry *self,GeosGeometry const *other){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        GEOSGeom otherGeom = (GEOSGeom) other;
-        return checkBoolResult(GEOSPreparedIntersects(prep, otherGeom));
-    }
-
-typedef void GeosSTRtree;
-/* GeosIndexItem typedef'd here so it can be %typemap(typecheck)'d
-   as a native object by each language specially */
-typedef void *GeosIndexItem;
-typedef GEOSQueryCallback GeosQueryCallback;
-
-SWIGINTERN GeosSTRtree *new_GeosSTRtree(int nodeCapacity){
-        GEOSSTRtree *tree = GEOSSTRtree_create(nodeCapacity);
-        if(tree == NULL)
-            throw std::runtime_error(message);
-        return (GeosSTRtree *) tree;
-    }
-SWIGINTERN void GeosSTRtree_insert(GeosSTRtree *self,GeosGeometry const *g,GeosIndexItem item){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_insert(tree, geom, item);
-    }
-SWIGINTERN void GeosSTRtree_remove(GeosSTRtree *self,GeosGeometry const *g,GeosIndexItem item){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_remove(tree, geom, item);
-    }
-SWIGINTERN void GeosSTRtree_query(GeosSTRtree *self,GeosGeometry const *g,GeosQueryCallback callback,GeosIndexItem accumulator){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        const GEOSGeometry *geom = (const GEOSGeometry *) g;
-        GEOSSTRtree_query(tree, geom, callback, accumulator);
-    }
-SWIGINTERN void GeosSTRtree_iterate(GeosSTRtree *self,GeosQueryCallback callback,GeosIndexItem accumulator){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        GEOSSTRtree_iterate(tree, callback, accumulator);
-    }
-SWIGINTERN GeosWktReader *new_GeosWktReader(){
-        return GEOSWKTReader_create();
-    }
-SWIGINTERN GeosGeometry *GeosWktReader_read(GeosWktReader *self,char const *wkt){
-        if(wkt == NULL)
-            throw std::runtime_error("Trying to create geometry from a NULL string");
-            
-        GEOSWKTReader *reader = (GEOSWKTReader*) self;
-        GEOSGeometry *geom = GEOSWKTReader_read(reader, wkt);
-
-        if(geom == NULL)
-            throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-SWIGINTERN GeosWktWriter *new_GeosWktWriter(){
-        return GEOSWKTWriter_create();
-    }
-SWIGINTERN char *GeosWktWriter_write(GeosWktWriter *self,GeosGeometry const *g){
-        GEOSWKTWriter *writer = (GEOSWKTWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKTWriter_write(writer, geom);
-    }
-SWIGINTERN GeosWkbReader *new_GeosWkbReader(){
-        return GEOSWKBReader_create();
-    }
-SWIGINTERN GeosGeometry *GeosWkbReader_read(GeosWkbReader *self,unsigned char const *wkb,size_t size){
-        if(wkb == NULL)
-          throw std::runtime_error("Trying to create geometry from a NULL string");
-         
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSGeometry *geom = GEOSWKBReader_read(reader, wkb, size);
-       
-        if(geom == NULL)
-          throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-SWIGINTERN GeosGeometry *GeosWkbReader_readHEX(GeosWkbReader *self,unsigned char const *wkb,size_t size){
-        if(wkb == NULL)
-          throw std::runtime_error("Trying to create geometry from a NULL string");
-         
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSGeometry *geom = GEOSWKBReader_readHEX(reader, wkb, size);
-       
-        if(geom == NULL)
-          throw std::runtime_error(message);
-
-        return (GeosGeometry*) geom;
-    }
-SWIGINTERN GeosWkbWriter *new_GeosWkbWriter(){
-        return GEOSWKBWriter_create();
-    }
-SWIGINTERN int GeosWkbWriter_getOutputDimension(GeosWkbWriter *self){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getOutputDimension(writer);
-    }
-SWIGINTERN void GeosWkbWriter_setOutputDimension(GeosWkbWriter *self,int newDimension){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSWKBWriter_setOutputDimension(writer, newDimension);
-    }
-SWIGINTERN int GeosWkbWriter_getByteOrder(GeosWkbWriter *self){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getByteOrder(writer);
-    }
-SWIGINTERN void GeosWkbWriter_setByteOrder(GeosWkbWriter *self,int newByteOrder){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_setByteOrder(writer, newByteOrder);
-    }
-SWIGINTERN bool GeosWkbWriter_getIncludeSRID(GeosWkbWriter *self){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_getIncludeSRID(writer);
-    }
-
-SWIGINTERN int
-SWIG_AsVal_bool (VALUE obj, bool *val)
-{
-  if (obj == Qtrue) {
-    if (val) *val = true;
-    return SWIG_OK;
-  } else if (obj == Qfalse) {
-    if (val) *val = false;
-    return SWIG_OK;
-  } else {
-    int res = 0;
-    if (SWIG_AsVal_int (obj, &res) == SWIG_OK) {    
-      if (val) *val = res ? true : false;
-      return SWIG_OK;
-    }
-  }  
-  return SWIG_TypeError;
-}
-
-SWIGINTERN void GeosWkbWriter_setIncludeSRID(GeosWkbWriter *self,bool newIncludeSRID){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        return GEOSWKBWriter_setIncludeSRID(writer, newIncludeSRID);
-    }
-SWIGINTERN unsigned char *GeosWkbWriter_write(GeosWkbWriter *self,GeosGeometry const *g,size_t *size){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKBWriter_write(writer, geom, size);
-    }
-SWIGINTERN unsigned char *GeosWkbWriter_writeHEX(GeosWkbWriter *self,GeosGeometry const *g,size_t *size){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSGeom geom = (GEOSGeom) g;
-        return GEOSWKBWriter_writeHEX(writer, geom, size);
-    }
-static swig_class SwigClassGCVALUE;
-
-
-/*
-  Document-method: Geos::GCVALUE.inspect
-
-  call-seq:
-    inspect -> VALUE
-
-Inspect class and its contents.
-*/
-SWIGINTERN VALUE
-_wrap_GCVALUE_inspect(int argc, VALUE *argv, VALUE self) {
-  swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ;
-  swig::GC_VALUE r1 ;
-  VALUE result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  r1 = self; arg1 = &r1;
-  result = (VALUE)((swig::GC_VALUE const *)arg1)->inspect();
-  vresult = result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::GCVALUE.to_s
-
-  call-seq:
-    to_s -> VALUE
-
-Convert class to a String representation.
-*/
-SWIGINTERN VALUE
-_wrap_GCVALUE_to_s(int argc, VALUE *argv, VALUE self) {
-  swig::GC_VALUE *arg1 = (swig::GC_VALUE *) 0 ;
-  swig::GC_VALUE r1 ;
-  VALUE result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  r1 = self; arg1 = &r1;
-  result = (VALUE)((swig::GC_VALUE const *)arg1)->to_s();
-  vresult = result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassConstIterator;
-
-SWIGINTERN void
-free_swig_ConstIterator(swig::ConstIterator *arg1) {
-    delete arg1;
-}
-
-SWIGINTERN VALUE
-_wrap_ConstIterator_value(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  VALUE result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","value", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  try {
-    result = (VALUE)((swig::ConstIterator const *)arg1)->value();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::ConstIterator.dup
-
-  call-seq:
-    dup -> ConstIterator
-
-Create a duplicate of the class and unfreeze it if needed.
-*/
-SWIGINTERN VALUE
-_wrap_ConstIterator_dup(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  swig::ConstIterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","dup", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->dup();
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::ConstIterator.inspect
-
-  call-seq:
-    inspect -> VALUE
-
-Inspect class and its contents.
-*/
-SWIGINTERN VALUE
-_wrap_ConstIterator_inspect(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  VALUE result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","inspect", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  result = (VALUE)((swig::ConstIterator const *)arg1)->inspect();
-  vresult = result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::ConstIterator.to_s
-
-  call-seq:
-    to_s -> VALUE
-
-Convert class to a String representation.
-*/
-SWIGINTERN VALUE
-_wrap_ConstIterator_to_s(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  VALUE result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","to_s", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  result = (VALUE)((swig::ConstIterator const *)arg1)->to_s();
-  vresult = result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_ConstIterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  swig::ConstIterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  result = (swig::ConstIterator *)(arg1)->next(arg2);
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_ConstIterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  swig::ConstIterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","next", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  try {
-    result = (swig::ConstIterator *)(arg1)->next();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE _wrap_ConstIterator_next(int nargs, VALUE *args, VALUE self) {
-  int argc;
-  VALUE argv[3];
-  int ii;
-  
-  argc = nargs + 1;
-  argv[0] = self;
-  if (argc > 3) SWIG_fail;
-  for (ii = 1; (ii < argc); ++ii) {
-    argv[ii] = args[ii-1];
-  }
-  if (argc == 1) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      return _wrap_ConstIterator_next__SWIG_1(nargs, args, self);
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_size_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_ConstIterator_next__SWIG_0(nargs, args, self);
-      }
-    }
-  }
-  
-fail:
-  Ruby_Format_OverloadedError( argc, 3, "ConstIterator.next", 
-    "    swig::ConstIterator * ConstIterator.next(size_t n)\n"
-    "    swig::ConstIterator * ConstIterator.next()\n");
-  
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_ConstIterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  swig::ConstIterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  result = (swig::ConstIterator *)(arg1)->previous(arg2);
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_ConstIterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  swig::ConstIterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator *","previous", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  try {
-    result = (swig::ConstIterator *)(arg1)->previous();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE _wrap_ConstIterator_previous(int nargs, VALUE *args, VALUE self) {
-  int argc;
-  VALUE argv[3];
-  int ii;
-  
-  argc = nargs + 1;
-  argv[0] = self;
-  if (argc > 3) SWIG_fail;
-  for (ii = 1; (ii < argc); ++ii) {
-    argv[ii] = args[ii-1];
-  }
-  if (argc == 1) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      return _wrap_ConstIterator_previous__SWIG_1(nargs, args, self);
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_size_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_ConstIterator_previous__SWIG_0(nargs, args, self);
-      }
-    }
-  }
-  
-fail:
-  Ruby_Format_OverloadedError( argc, 3, "ConstIterator.previous", 
-    "    swig::ConstIterator * ConstIterator.previous(size_t n)\n"
-    "    swig::ConstIterator * ConstIterator.previous()\n");
-  
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::ConstIterator.==
-
-  call-seq:
-    ==(x) -> bool
-
-Equality comparison operator.
-*/
-SWIGINTERN VALUE
-_wrap_ConstIterator___eq__(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  swig::ConstIterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator ==", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator,  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator ==", 2, argv[0] )); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator ==", 2, argv[0])); 
-  }
-  arg2 = reinterpret_cast< swig::ConstIterator * >(argp2);
-  result = (bool)((swig::ConstIterator const *)arg1)->operator ==((swig::ConstIterator const &)*arg2);
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::ConstIterator.+
-
-  call-seq:
-    +(n) -> ConstIterator
-
-Add operator.
-*/
-SWIGINTERN VALUE
-_wrap_ConstIterator___add__(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  swig::ConstIterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator +", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] ));
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator +(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::ConstIterator.-
-
-  call-seq:
-    -(n) -> ConstIterator
-    -(x) -> ptrdiff_t
-
-Substraction operator.
-*/
-SWIGINTERN VALUE
-_wrap_ConstIterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  swig::ConstIterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] ));
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::ConstIterator *)((swig::ConstIterator const *)arg1)->operator -(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__ConstIterator, SWIG_POINTER_OWN |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_ConstIterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) {
-  swig::ConstIterator *arg1 = (swig::ConstIterator *) 0 ;
-  swig::ConstIterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 ;
-  int res2 = 0 ;
-  ptrdiff_t result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__ConstIterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::ConstIterator const *","operator -", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::ConstIterator * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__ConstIterator,  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::ConstIterator const &","operator -", 2, argv[0] )); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::ConstIterator const &","operator -", 2, argv[0])); 
-  }
-  arg2 = reinterpret_cast< swig::ConstIterator * >(argp2);
-  result = ((swig::ConstIterator const *)arg1)->operator -((swig::ConstIterator const &)*arg2);
-  vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE _wrap_ConstIterator___sub__(int nargs, VALUE *args, VALUE self) {
-  int argc;
-  VALUE argv[3];
-  int ii;
-  
-  argc = nargs + 1;
-  argv[0] = self;
-  if (argc > 3) SWIG_fail;
-  for (ii = 1; (ii < argc); ++ii) {
-    argv[ii] = args[ii-1];
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      void *vptr = 0;
-      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
-      _v = SWIG_CheckState(res);
-      if (_v) {
-        return _wrap_ConstIterator___sub____SWIG_1(nargs, args, self);
-      }
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__ConstIterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_ConstIterator___sub____SWIG_0(nargs, args, self);
-      }
-    }
-  }
-  
-fail:
-  Ruby_Format_OverloadedError( argc, 3, "__sub__.new", 
-    "    __sub__.new(ptrdiff_t n)\n"
-    "    __sub__.new(swig::ConstIterator const &x)\n");
-  
-  return Qnil;
-}
-
-
-static swig_class SwigClassIterator;
-
-SWIGINTERN VALUE
-_wrap_Iterator_valuee___(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  VALUE *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  VALUE temp2 ;
-  VALUE result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","setValue", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  temp2 = static_cast< VALUE >(argv[0]);
-  arg2 = &temp2;
-  result = (VALUE)(arg1)->setValue((VALUE const &)*arg2);
-  vresult = result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::Iterator.dup
-
-  call-seq:
-    dup -> Iterator
-
-Create a duplicate of the class and unfreeze it if needed.
-*/
-SWIGINTERN VALUE
-_wrap_Iterator_dup(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  swig::Iterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","dup", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  result = (swig::Iterator *)((swig::Iterator const *)arg1)->dup();
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Iterator_next__SWIG_0(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  swig::Iterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","next", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  result = (swig::Iterator *)(arg1)->next(arg2);
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Iterator_next__SWIG_1(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  swig::Iterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","next", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  try {
-    result = (swig::Iterator *)(arg1)->next();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE _wrap_Iterator_next(int nargs, VALUE *args, VALUE self) {
-  int argc;
-  VALUE argv[3];
-  int ii;
-  
-  argc = nargs + 1;
-  argv[0] = self;
-  if (argc > 3) SWIG_fail;
-  for (ii = 1; (ii < argc); ++ii) {
-    argv[ii] = args[ii-1];
-  }
-  if (argc == 1) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      return _wrap_Iterator_next__SWIG_1(nargs, args, self);
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_size_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_Iterator_next__SWIG_0(nargs, args, self);
-      }
-    }
-  }
-  
-fail:
-  Ruby_Format_OverloadedError( argc, 3, "Iterator.next", 
-    "    swig::Iterator * Iterator.next(size_t n)\n"
-    "    swig::Iterator * Iterator.next()\n");
-  
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Iterator_previous__SWIG_0(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  swig::Iterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","previous", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  result = (swig::Iterator *)(arg1)->previous(arg2);
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Iterator_previous__SWIG_1(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  swig::Iterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator *","previous", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  try {
-    result = (swig::Iterator *)(arg1)->previous();
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE _wrap_Iterator_previous(int nargs, VALUE *args, VALUE self) {
-  int argc;
-  VALUE argv[3];
-  int ii;
-  
-  argc = nargs + 1;
-  argv[0] = self;
-  if (argc > 3) SWIG_fail;
-  for (ii = 1; (ii < argc); ++ii) {
-    argv[ii] = args[ii-1];
-  }
-  if (argc == 1) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      return _wrap_Iterator_previous__SWIG_1(nargs, args, self);
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_size_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_Iterator_previous__SWIG_0(nargs, args, self);
-      }
-    }
-  }
-  
-fail:
-  Ruby_Format_OverloadedError( argc, 3, "Iterator.previous", 
-    "    swig::Iterator * Iterator.previous(size_t n)\n"
-    "    swig::Iterator * Iterator.previous()\n");
-  
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::Iterator.inspect
-
-  call-seq:
-    inspect -> VALUE
-
-Inspect class and its contents.
-*/
-SWIGINTERN VALUE
-_wrap_Iterator_inspect(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  VALUE result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","inspect", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  result = (VALUE)((swig::Iterator const *)arg1)->inspect();
-  vresult = result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::Iterator.to_s
-
-  call-seq:
-    to_s -> VALUE
-
-Convert class to a String representation.
-*/
-SWIGINTERN VALUE
-_wrap_Iterator_to_s(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  VALUE result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","to_s", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  result = (VALUE)((swig::Iterator const *)arg1)->to_s();
-  vresult = result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::Iterator.==
-
-  call-seq:
-    ==(x) -> bool
-
-Equality comparison operator.
-*/
-SWIGINTERN VALUE
-_wrap_Iterator___eq__(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  swig::Iterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator ==", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator,  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator ==", 2, argv[0] )); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator ==", 2, argv[0])); 
-  }
-  arg2 = reinterpret_cast< swig::Iterator * >(argp2);
-  result = (bool)((swig::Iterator const *)arg1)->operator ==((swig::Iterator const &)*arg2);
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::Iterator.+
-
-  call-seq:
-    +(n) -> Iterator
-
-Add operator.
-*/
-SWIGINTERN VALUE
-_wrap_Iterator___add__(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  swig::Iterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator +", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator +", 2, argv[0] ));
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator +(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::Iterator.-
-
-  call-seq:
-    -(n) -> Iterator
-    -(x) -> ptrdiff_t
-
-Substraction operator.
-*/
-SWIGINTERN VALUE
-_wrap_Iterator___sub____SWIG_0(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  ptrdiff_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  ptrdiff_t val2 ;
-  int ecode2 = 0 ;
-  swig::Iterator *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  ecode2 = SWIG_AsVal_ptrdiff_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "ptrdiff_t","operator -", 2, argv[0] ));
-  } 
-  arg2 = static_cast< ptrdiff_t >(val2);
-  try {
-    result = (swig::Iterator *)((swig::Iterator const *)arg1)->operator -(arg2);
-  }
-  catch(swig::stop_iteration &_e) {
-    {
-      (void)_e;
-      SWIG_Ruby_ExceptionType(NULL, Qnil);
-      SWIG_fail;
-    }
-  }
-  
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__Iterator, SWIG_POINTER_OWN |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Iterator___sub____SWIG_1(int argc, VALUE *argv, VALUE self) {
-  swig::Iterator *arg1 = (swig::Iterator *) 0 ;
-  swig::Iterator *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 ;
-  int res2 = 0 ;
-  ptrdiff_t result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_swig__Iterator, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "swig::Iterator const *","operator -", 1, self )); 
-  }
-  arg1 = reinterpret_cast< swig::Iterator * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_swig__Iterator,  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "swig::Iterator const &","operator -", 2, argv[0] )); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "swig::Iterator const &","operator -", 2, argv[0])); 
-  }
-  arg2 = reinterpret_cast< swig::Iterator * >(argp2);
-  result = ((swig::Iterator const *)arg1)->operator -((swig::Iterator const &)*arg2);
-  vresult = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE _wrap_Iterator___sub__(int nargs, VALUE *args, VALUE self) {
-  int argc;
-  VALUE argv[3];
-  int ii;
-  
-  argc = nargs + 1;
-  argv[0] = self;
-  if (argc > 3) SWIG_fail;
-  for (ii = 1; (ii < argc); ++ii) {
-    argv[ii] = args[ii-1];
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      void *vptr = 0;
-      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_swig__Iterator, 0);
-      _v = SWIG_CheckState(res);
-      if (_v) {
-        return _wrap_Iterator___sub____SWIG_1(nargs, args, self);
-      }
-    }
-  }
-  if (argc == 2) {
-    int _v;
-    void *vptr = 0;
-    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__Iterator, 0);
-    _v = SWIG_CheckState(res);
-    if (_v) {
-      {
-        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
-        _v = SWIG_CheckState(res);
-      }
-      if (_v) {
-        return _wrap_Iterator___sub____SWIG_0(nargs, args, self);
-      }
-    }
-  }
-  
-fail:
-  Ruby_Format_OverloadedError( argc, 3, "__sub__.new", 
-    "    __sub__.new(ptrdiff_t n)\n"
-    "    __sub__.new(swig::Iterator const &x)\n");
-  
-  return Qnil;
-}
-
-
-SWIGINTERN void
-free_swig_Iterator(swig::Iterator *arg1) {
-    delete arg1;
-}
-
-SWIGINTERN VALUE
-_wrap_version(int argc, VALUE *argv, VALUE self) {
-  char *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  result = (char *)GEOSversion();
-  vresult = SWIG_FromCharPtr((const char *)result);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassCoordinateSequence;
-
-#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_allocate(VALUE self) {
-#else
-  SWIGINTERN VALUE
-  _wrap_CoordinateSequence_allocate(int argc, VALUE *argv, VALUE self) {
-#endif
-    
-    
-    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GeosCoordinateSequence);
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-    rb_obj_call_init(vresult, argc, argv);
-#endif
-    return vresult;
-  }
-  
-
-SWIGINTERN VALUE
-_wrap_new_CoordinateSequence(int argc, VALUE *argv, VALUE self) {
-  size_t arg1 ;
-  size_t arg2 ;
-  size_t val1 ;
-  int ecode1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  ecode1 = SWIG_AsVal_size_t(argv[0], &val1);
-  if (!SWIG_IsOK(ecode1)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "size_t","GeosCoordinateSequence", 1, argv[0] ));
-  } 
-  arg1 = static_cast< size_t >(val1);
-  ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","GeosCoordinateSequence", 2, argv[1] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)new_GeosCoordinateSequence(arg1,arg2);
-      DATA_PTR(self) = result;
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return self;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN void delete_GeosCoordinateSequence(GeosCoordinateSequence *self){
-        GEOSCoordSeq coords = (GEOSCoordSeq) self;
-        return GEOSCoordSeq_destroy(coords);
-    }
-SWIGINTERN void
-free_GeosCoordinateSequence(GeosCoordinateSequence *arg1) {
-    delete_GeosCoordinateSequence(arg1);
-}
-
-
-/*
-  Document-method: Geos::CoordinateSequence.clone
-
-  call-seq:
-    clone -> CoordinateSequence
-
-Create a duplicate of the class.
-*/
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_clone(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","clone", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)GeosCoordinateSequence_clone(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_OWN |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_set_x(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
-  int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","setX", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","setX", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_double(argv[1], &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","setX", 3, argv[1] ));
-  } 
-  arg3 = static_cast< double >(val3);
-  {
-    try
-    {
-      result = (int)GeosCoordinateSequence_setX(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_int(static_cast< int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_set_y(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
-  int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","setY", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","setY", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_double(argv[1], &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","setY", 3, argv[1] ));
-  } 
-  arg3 = static_cast< double >(val3);
-  {
-    try
-    {
-      result = (int)GeosCoordinateSequence_setY(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_int(static_cast< int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_set_z(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
-  int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","setZ", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","setZ", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_double(argv[1], &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","setZ", 3, argv[1] ));
-  } 
-  arg3 = static_cast< double >(val3);
-  {
-    try
-    {
-      result = (int)GeosCoordinateSequence_setZ(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_int(static_cast< int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_set_ordinate(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  size_t arg3 ;
-  double arg4 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  size_t val3 ;
-  int ecode3 = 0 ;
-  double val4 ;
-  int ecode4 = 0 ;
-  int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 3) || (argc > 3)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","setOrdinate", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","setOrdinate", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","setOrdinate", 3, argv[1] ));
-  } 
-  arg3 = static_cast< size_t >(val3);
-  ecode4 = SWIG_AsVal_double(argv[2], &val4);
-  if (!SWIG_IsOK(ecode4)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","setOrdinate", 4, argv[2] ));
-  } 
-  arg4 = static_cast< double >(val4);
-  {
-    try
-    {
-      result = (int)GeosCoordinateSequence_setOrdinate(arg1,arg2,arg3,arg4);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_int(static_cast< int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_get_x(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","getX", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getX", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (double)GeosCoordinateSequence_getX(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_double(static_cast< double >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_get_y(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","getY", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getY", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (double)GeosCoordinateSequence_getY(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_double(static_cast< double >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_get_z(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  double result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","getZ", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getZ", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (double)GeosCoordinateSequence_getZ(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_double(static_cast< double >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_get_ordinate(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  size_t arg2 ;
-  size_t arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  size_t val3 ;
-  int ecode3 = 0 ;
-  double result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","getOrdinate", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getOrdinate", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  ecode3 = SWIG_AsVal_size_t(argv[1], &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","getOrdinate", 3, argv[1] ));
-  } 
-  arg3 = static_cast< size_t >(val3);
-  {
-    try
-    {
-      result = (double)GeosCoordinateSequence_getOrdinate(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_double(static_cast< double >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence___len__(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  unsigned int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","getSize", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  {
-    try
-    {
-      result = (unsigned int)GeosCoordinateSequence_getSize(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_CoordinateSequence_dimensions(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  unsigned int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","getDimensions", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosCoordinateSequence * >(argp1);
-  {
-    try
-    {
-      result = (unsigned int)GeosCoordinateSequence_getDimensions(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassGeometry;
-
-SWIGINTERN void delete_GeosGeometry(GeosGeometry *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosGeometry(GeosGeometry *arg1) {
-    delete_GeosGeometry(arg1);
-}
-
-
-/*
-  Document-method: Geos::Geometry.clone
-
-  call-seq:
-    clone -> Geometry
-
-Create a duplicate of the class.
-*/
-SWIGINTERN VALUE
-_wrap_Geometry_clone(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","clone", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_clone(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_geom_type(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  char *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","geomType", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (char *)GeosGeometry_geomType(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_FromCharPtr((const char *)result);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_type_id(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","typeId", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (int)GeosGeometry_typeId(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_int(static_cast< int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_normalize(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","normalize", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      GeosGeometry_normalize(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_srid(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","getSRID", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (int)GeosGeometry_getSRID(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_int(static_cast< int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_sride___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  int arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int val2 ;
-  int ecode2 = 0 ;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","setSRID", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  ecode2 = SWIG_AsVal_int(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","setSRID", 2, argv[0] ));
-  } 
-  arg2 = static_cast< int >(val2);
-  {
-    try
-    {
-      GeosGeometry_setSRID(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_dimensions(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","getDimensions", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = GeosGeometry_getDimensions(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_size_t(static_cast< size_t >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_num_geometries(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","getNumGeometries", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = GeosGeometry_getNumGeometries(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_size_t(static_cast< size_t >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_intersection(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","intersection", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry *","intersection", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_intersection(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_buffer(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  double arg2 ;
-  int arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double val2 ;
-  int ecode2 = 0 ;
-  int val3 ;
-  int ecode3 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  {
-    arg3 = DEFAULT_QUADRANT_SEGMENTS;
-  }
-  if ((argc < 1) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","buffer", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  ecode2 = SWIG_AsVal_double(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","buffer", 2, argv[0] ));
-  } 
-  arg2 = static_cast< double >(val2);
-  if (argc > 1) {
-    ecode3 = SWIG_AsVal_int(argv[1], &val3);
-    if (!SWIG_IsOK(ecode3)) {
-      SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","buffer", 3, argv[1] ));
-    } 
-    arg3 = static_cast< int >(val3);
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_buffer(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_convex_hull(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","convexHull", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_convexHull(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_difference(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","difference", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry *","difference", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_difference(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_sym_difference(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","symDifference", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry *","symDifference", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_symDifference(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_boundary(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","boundary", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_boundary(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_union(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","geomUnion", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry *","geomUnion", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_geomUnion(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_point_on_surface(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","pointOnSurface", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_pointOnSurface(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_centroid(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","getCentroid", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_getCentroid(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_envelope(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","getEnvelope", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_getEnvelope(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | 0);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | 0);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | 0);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | 0);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | 0);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | 0);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | 0);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | 0);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_relate(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  char *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","relate", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry *","relate", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (char *)GeosGeometry_relate(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_FromCharPtr((const char *)result);
-  delete[] result;
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_line_merge(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","lineMerge", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_lineMerge(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_simplify(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  double arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double val2 ;
-  int ecode2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","simplify", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  ecode2 = SWIG_AsVal_double(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","simplify", 2, argv[0] ));
-  } 
-  arg2 = static_cast< double >(val2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_simplify(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_topology_preserve_simplify(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  double arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double val2 ;
-  int ecode2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","topologyPreserveSimplify", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  ecode2 = SWIG_AsVal_double(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "double","topologyPreserveSimplify", 2, argv[0] ));
-  } 
-  arg2 = static_cast< double >(val2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometry_topologyPreserveSimplify(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_relate_pattern(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  char *arg3 = (char *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  int res3 ;
-  char *buf3 = 0 ;
-  int alloc3 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","relatePattern", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","relatePattern", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
-  if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","relatePattern", 3, argv[1] ));
-  }
-  arg3 = reinterpret_cast< char * >(buf3);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_relatePattern(arg1,(GeosGeometry const *)arg2,(char const *)arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
-  return vresult;
-fail:
-  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_disjointq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","disjoint", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","disjoint", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_disjoint(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_touchesq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","touches", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","touches", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_touches(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_intersectsq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","intersects", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","intersects", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_intersects(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_crossesq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","crosses", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","crosses", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_crosses(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_withinq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","within", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","within", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_within(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_containsq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","contains", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","contains", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_contains(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_overlapsq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","overlaps", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","overlaps", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_overlaps(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_eqlq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","equals", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","equals", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_equals(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_eql_exactq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  double arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  double val3 ;
-  int ecode3 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","equalsExact", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","equalsExact", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  ecode3 = SWIG_AsVal_double(argv[1], &val3);
-  if (!SWIG_IsOK(ecode3)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "double","equalsExact", 3, argv[1] ));
-  } 
-  arg3 = static_cast< double >(val3);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_equalsExact(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_emptyq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","isEmpty", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_isEmpty(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_validq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","isValid", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_isValid(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_simpleq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","isSimple", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_isSimple(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_ringq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","isRing", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_isRing(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_has_zq___(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","hasZ", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosGeometry_hasZ(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_area(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","area", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (double)GeosGeometry_area(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_double(static_cast< double >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-
-/*
-  Document-method: Geos::Geometry.length
-
-  call-seq:
-    length -> double
-
-Size or Length of the Geometry.
-*/
-SWIGINTERN VALUE
-_wrap_Geometry_length(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","length", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (double)GeosGeometry_length(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_double(static_cast< double >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Geometry_distance(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  double result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry *","distance", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","distance", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (double)GeosGeometry_distance(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_double(static_cast< double >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassPoint;
-
-SWIGINTERN void delete_GeosPoint(GeosPoint *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosPoint(GeosPoint *arg1) {
-    delete_GeosPoint(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_Point_coord_seq(int argc, VALUE *argv, VALUE self) {
-  GeosPoint *arg1 = (GeosPoint *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosPoint, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosPoint *","getCoordSeq", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosPoint * >(argp1);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)GeosPoint_getCoordSeq(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassLineString;
-
-SWIGINTERN void delete_GeosLineString(GeosLineString *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosLineString(GeosLineString *arg1) {
-    delete_GeosLineString(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_LineString_coord_seq(int argc, VALUE *argv, VALUE self) {
-  GeosLineString *arg1 = (GeosLineString *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosLineString, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosLineString *","getCoordSeq", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosLineString * >(argp1);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)GeosLineString_getCoordSeq(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassLinearRing;
-
-SWIGINTERN void delete_GeosLinearRing(GeosLinearRing *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosLinearRing(GeosLinearRing *arg1) {
-    delete_GeosLinearRing(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_LinearRing_coord_seq(int argc, VALUE *argv, VALUE self) {
-  GeosLinearRing *arg1 = (GeosLinearRing *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosCoordinateSequence *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosLinearRing, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosLinearRing *","getCoordSeq", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosLinearRing * >(argp1);
-  {
-    try
-    {
-      result = (GeosCoordinateSequence *)GeosLinearRing_getCoordSeq(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosCoordinateSequence, 0 |  0 );
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassPolygon;
-
-SWIGINTERN void delete_GeosPolygon(GeosPolygon *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosPolygon(GeosPolygon *arg1) {
-    delete_GeosPolygon(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_Polygon_exterior_ring(int argc, VALUE *argv, VALUE self) {
-  GeosPolygon *arg1 = (GeosPolygon *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosPolygon, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosPolygon *","getExteriorRing", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosPolygon * >(argp1);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosPolygon_getExteriorRing(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | 0);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | 0);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | 0);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | 0);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | 0);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | 0);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | 0);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | 0);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Polygon_num_interior_rings(int argc, VALUE *argv, VALUE self) {
-  GeosPolygon *arg1 = (GeosPolygon *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosPolygon, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosPolygon *","getNumInteriorRings", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosPolygon * >(argp1);
-  {
-    try
-    {
-      result = GeosPolygon_getNumInteriorRings(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_size_t(static_cast< size_t >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Polygon_interior_ring_n(int argc, VALUE *argv, VALUE self) {
-  GeosPolygon *arg1 = (GeosPolygon *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosPolygon, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosPolygon *","getInteriorRingN", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosPolygon * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getInteriorRingN", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosPolygon_getInteriorRingN(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | 0);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | 0);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | 0);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | 0);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | 0);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | 0);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | 0);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | 0);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassGeometryCollection;
-
-SWIGINTERN void delete_GeosGeometryCollection(GeosGeometryCollection *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosGeometryCollection(GeosGeometryCollection *arg1) {
-    delete_GeosGeometryCollection(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_GeometryCollection_get_geometry_n(int argc, VALUE *argv, VALUE self) {
-  GeosGeometryCollection *arg1 = (GeosGeometryCollection *) 0 ;
-  size_t arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  size_t val2 ;
-  int ecode2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosGeometryCollection, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometryCollection *","getGeometryN", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometryCollection * >(argp1);
-  ecode2 = SWIG_AsVal_size_t(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","getGeometryN", 2, argv[0] ));
-  } 
-  arg2 = static_cast< size_t >(val2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosGeometryCollection_getGeometryN(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | 0);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | 0);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | 0);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | 0);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | 0);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | 0);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | 0);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | 0);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassMultiPoint;
-
-SWIGINTERN void delete_GeosMultiPoint(GeosMultiPoint *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosMultiPoint(GeosMultiPoint *arg1) {
-    delete_GeosMultiPoint(arg1);
-}
-
-static swig_class SwigClassMultiLineString;
-
-SWIGINTERN void delete_GeosMultiLineString(GeosMultiLineString *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosMultiLineString(GeosMultiLineString *arg1) {
-    delete_GeosMultiLineString(arg1);
-}
-
-static swig_class SwigClassMultiLinearRing;
-
-SWIGINTERN void delete_GeosMultiLinearRing(GeosMultiLinearRing *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosMultiLinearRing(GeosMultiLinearRing *arg1) {
-    delete_GeosMultiLinearRing(arg1);
-}
-
-static swig_class SwigClassMultiPolygon;
-
-SWIGINTERN void delete_GeosMultiPolygon(GeosMultiPolygon *self){
-        GEOSGeom geom = (GEOSGeom) self;
-        GEOSGeom_destroy(geom);
-    }
-SWIGINTERN void
-free_GeosMultiPolygon(GeosMultiPolygon *arg1) {
-    delete_GeosMultiPolygon(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_create_point(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","createPoint", 1, argv[0] ));
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)createPoint(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_create_line_string(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","createLineString", 1, argv[0] ));
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)createLineString(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_create_linear_ring(int argc, VALUE *argv, VALUE self) {
-  GeosCoordinateSequence *arg1 = (GeosCoordinateSequence *) 0 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_GeosCoordinateSequence, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosCoordinateSequence *","createLinearRing", 1, argv[0] ));
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)createLinearRing(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_create_polygon(int argc, VALUE *argv, VALUE self) {
-  GeosLinearRing *arg1 = (GeosLinearRing *) 0 ;
-  GeosLinearRing **arg2 = (GeosLinearRing **) 0 ;
-  size_t arg3 ;
-  int res1 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  {
-    arg2 = NULL;
-    arg3 = 0;
-  }
-  if ((argc < 1) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), SWIGTYPE_p_GeosLinearRing, SWIG_POINTER_DISOWN |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosLinearRing *","createPolygon", 1, argv[0] ));
-  }
-  if (argc > 1) {
-    {
-      if (NIL_P(argv[1]))
-      {
-        arg2 = NULL;
-        arg3 = 0;
-      }
-      else
-      {
-        /* Make sure the input can be treated as an array. */
-        Check_Type(argv[1], T_ARRAY);
-        
-        /* Get the length */
-        arg3 = RARRAY_LEN(argv[1]);
-        
-        /* Allocate space for the C array. */
-        arg2 = (GeosLinearRing**) malloc(arg3*sizeof(GeosLinearRing*));
-        
-        for(size_t i = 0; i<arg3; i++)
-        {
-          /* Get the Ruby Object */
-          VALUE item = rb_ary_entry(argv[1],i);
-          
-          /* Get the underlying pointer and give up ownership of it. */
-          GeosLinearRing *ring = NULL;
-          int convertResult = SWIG_ConvertPtr(item, (void**)&ring, SWIGTYPE_p_GeosLinearRing, SWIG_POINTER_DISOWN);
-          if (!SWIG_IsOK(convertResult)) {
-            SWIG_exception_fail(SWIG_ArgError(convertResult), "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
-          }
-          
-          /* Put the pointer in the array */
-          arg2[i] = ring;
-        }    
-      }
-    }
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)createPolygon(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  {
-    if (arg2) {
-      free((void*) arg2);
-    }
-  }
-  return vresult;
-fail:
-  {
-    if (arg2) {
-      free((void*) arg2);
-    }
-  }
-  return Qnil;
-}
-
-
-static swig_class SwigClassPrepared;
-
-#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
-SWIGINTERN VALUE
-_wrap_Prepared_allocate(VALUE self) {
-#else
-  SWIGINTERN VALUE
-  _wrap_Prepared_allocate(int argc, VALUE *argv, VALUE self) {
-#endif
-    
-    
-    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GeosPreparedGeometry);
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-    rb_obj_call_init(vresult, argc, argv);
-#endif
-    return vresult;
-  }
-  
-
-SWIGINTERN VALUE
-_wrap_new_Prepared(int argc, VALUE *argv, VALUE self) {
-  GeosGeometry *arg1 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  GeosPreparedGeometry *result = 0 ;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosGeometry const *","GeosPreparedGeometry", 1, argv[0] )); 
-  }
-  arg1 = reinterpret_cast< GeosGeometry * >(argp1);
-  {
-    try
-    {
-      result = (GeosPreparedGeometry *)new_GeosPreparedGeometry((GeosGeometry const *)arg1);
-      DATA_PTR(self) = result;
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return self;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN void delete_GeosPreparedGeometry(GeosPreparedGeometry *self){
-        GEOSPreparedGeometry *prep = (GEOSPreparedGeometry *) self;
-        return GEOSPreparedGeom_destroy(prep);
-    }
-SWIGINTERN void
-free_GeosPreparedGeometry(GeosPreparedGeometry *arg1) {
-    delete_GeosPreparedGeometry(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_Prepared_containsq___(int argc, VALUE *argv, VALUE self) {
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosPreparedGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosPreparedGeometry *","contains", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","contains", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosPreparedGeometry_contains(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Prepared_contains_properlyq___(int argc, VALUE *argv, VALUE self) {
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosPreparedGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosPreparedGeometry *","containsProperly", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","containsProperly", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosPreparedGeometry_containsProperly(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Prepared_coversq___(int argc, VALUE *argv, VALUE self) {
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosPreparedGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosPreparedGeometry *","covers", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","covers", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosPreparedGeometry_covers(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_Prepared_intersectsq___(int argc, VALUE *argv, VALUE self) {
-  GeosPreparedGeometry *arg1 = (GeosPreparedGeometry *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosPreparedGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosPreparedGeometry *","intersects", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosPreparedGeometry * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","intersects", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (bool)GeosPreparedGeometry_intersects(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = (result ? Qtrue : Qfalse);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassSTRtree;
-
-#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
-SWIGINTERN VALUE
-_wrap_STRtree_allocate(VALUE self) {
-#else
-  SWIGINTERN VALUE
-  _wrap_STRtree_allocate(int argc, VALUE *argv, VALUE self) {
-#endif
-    
-    
-    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GeosSTRtree);
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-    rb_obj_call_init(vresult, argc, argv);
-#endif
-    return vresult;
-  }
-  
-
-SWIGINTERN VALUE
-_wrap_new_STRtree(int argc, VALUE *argv, VALUE self) {
-  int arg1 ;
-  int val1 ;
-  int ecode1 = 0 ;
-  GeosSTRtree *result = 0 ;
-  
-  {
-    arg1 = 10;
-  }
-  if ((argc < 0) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  if (argc > 0) {
-    ecode1 = SWIG_AsVal_int(argv[0], &val1);
-    if (!SWIG_IsOK(ecode1)) {
-      SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","GeosSTRtree", 1, argv[0] ));
-    } 
-    arg1 = static_cast< int >(val1);
-  }
-  {
-    try
-    {
-      result = (GeosSTRtree *)new_GeosSTRtree(arg1);
-      DATA_PTR(self) = result;
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return self;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN void delete_GeosSTRtree(GeosSTRtree *self){
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        return GEOSSTRtree_destroy(tree);
-    }
-SWIGINTERN void
-free_GeosSTRtree(GeosSTRtree *arg1) {
-    delete_GeosSTRtree(arg1);
-}
-
-
-/*
-  Document-method: Geos::STRtree.insert
-
-  call-seq:
-    insert(g, item)
-
-Insert one or more new elements in the STRtree.
-*/
-SWIGINTERN VALUE
-_wrap_STRtree_insert(int argc, VALUE *argv, VALUE self) {
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  GeosIndexItem arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosSTRtree, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosSTRtree *","insert", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","insert", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    arg3 = (GeosIndexItem) argv[1];
-  }
-  {
-    try
-    {
-      GeosSTRtree_insert(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_STRtree_remove(int argc, VALUE *argv, VALUE self) {
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  GeosIndexItem arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  
-  if ((argc < 2) || (argc > 2)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosSTRtree, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosSTRtree *","remove", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","remove", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    arg3 = (GeosIndexItem) argv[1];
-  }
-  {
-    try
-    {
-      GeosSTRtree_remove(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_STRtree_query(int argc, VALUE *argv, VALUE self) {
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  GeosQueryCallback arg3 ;
-  GeosIndexItem arg4 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  
-  {
-    arg3 = GeosSTRtree_query_callback;
-  }
-  {
-    arg4 = (GeosIndexItem) Qnil;
-  }
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosSTRtree, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosSTRtree *","query", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","query", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      GeosSTRtree_query(arg1,(GeosGeometry const *)arg2,arg3,arg4);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_STRtree_each(int argc, VALUE *argv, VALUE self) {
-  GeosSTRtree *arg1 = (GeosSTRtree *) 0 ;
-  GeosQueryCallback arg2 ;
-  GeosIndexItem arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  
-  {
-    arg2 = GeosSTRtree_query_callback;
-  }
-  {
-    arg3 = (GeosIndexItem) Qnil;
-  }
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosSTRtree, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosSTRtree *","iterate", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosSTRtree * >(argp1);
-  {
-    try
-    {
-      GeosSTRtree_iterate(arg1,arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassWktReader;
-
-#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
-SWIGINTERN VALUE
-_wrap_WktReader_allocate(VALUE self) {
-#else
-  SWIGINTERN VALUE
-  _wrap_WktReader_allocate(int argc, VALUE *argv, VALUE self) {
-#endif
-    
-    
-    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GeosWktReader);
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-    rb_obj_call_init(vresult, argc, argv);
-#endif
-    return vresult;
-  }
-  
-
-SWIGINTERN VALUE
-_wrap_new_WktReader(int argc, VALUE *argv, VALUE self) {
-  GeosWktReader *result = 0 ;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  {
-    try
-    {
-      result = (GeosWktReader *)new_GeosWktReader();
-      DATA_PTR(self) = result;
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return self;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN void delete_GeosWktReader(GeosWktReader *self){
-        GEOSWKTReader *reader = (GEOSWKTReader*) self;
-        GEOSWKTReader_destroy(reader);
-    }
-SWIGINTERN void
-free_GeosWktReader(GeosWktReader *arg1) {
-    delete_GeosWktReader(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_WktReader_read(int argc, VALUE *argv, VALUE self) {
-  GeosWktReader *arg1 = (GeosWktReader *) 0 ;
-  char *arg2 = (char *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int res2 ;
-  char *buf2 = 0 ;
-  int alloc2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWktReader, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWktReader *","read", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWktReader * >(argp1);
-  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","read", 2, argv[0] ));
-  }
-  arg2 = reinterpret_cast< char * >(buf2);
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosWktReader_read(arg1,(char const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-  return vresult;
-fail:
-  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
-  return Qnil;
-}
-
-
-static swig_class SwigClassWktWriter;
-
-#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
-SWIGINTERN VALUE
-_wrap_WktWriter_allocate(VALUE self) {
-#else
-  SWIGINTERN VALUE
-  _wrap_WktWriter_allocate(int argc, VALUE *argv, VALUE self) {
-#endif
-    
-    
-    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GeosWktWriter);
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-    rb_obj_call_init(vresult, argc, argv);
-#endif
-    return vresult;
-  }
-  
-
-SWIGINTERN VALUE
-_wrap_new_WktWriter(int argc, VALUE *argv, VALUE self) {
-  GeosWktWriter *result = 0 ;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  {
-    try
-    {
-      result = (GeosWktWriter *)new_GeosWktWriter();
-      DATA_PTR(self) = result;
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return self;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN void delete_GeosWktWriter(GeosWktWriter *self){
-        GEOSWKTWriter *writer = (GEOSWKTWriter*) self;
-        GEOSWKTWriter_destroy(writer);
-    }
-SWIGINTERN void
-free_GeosWktWriter(GeosWktWriter *arg1) {
-    delete_GeosWktWriter(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_WktWriter_write(int argc, VALUE *argv, VALUE self) {
-  GeosWktWriter *arg1 = (GeosWktWriter *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  char *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWktWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWktWriter *","write", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWktWriter * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","write", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (char *)GeosWktWriter_write(arg1,(GeosGeometry const *)arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_FromCharPtr((const char *)result);
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassWkbReader;
-
-#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
-SWIGINTERN VALUE
-_wrap_WkbReader_allocate(VALUE self) {
-#else
-  SWIGINTERN VALUE
-  _wrap_WkbReader_allocate(int argc, VALUE *argv, VALUE self) {
-#endif
-    
-    
-    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GeosWkbReader);
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-    rb_obj_call_init(vresult, argc, argv);
-#endif
-    return vresult;
-  }
-  
-
-SWIGINTERN VALUE
-_wrap_new_WkbReader(int argc, VALUE *argv, VALUE self) {
-  GeosWkbReader *result = 0 ;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  {
-    try
-    {
-      result = (GeosWkbReader *)new_GeosWkbReader();
-      DATA_PTR(self) = result;
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return self;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN void delete_GeosWkbReader(GeosWkbReader *self){
-        GEOSWKBReader *reader = (GEOSWKBReader*) self;
-        GEOSWKBReader_destroy(reader);
-    }
-SWIGINTERN void
-free_GeosWkbReader(GeosWkbReader *arg1) {
-    delete_GeosWkbReader(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_WkbReader_read(int argc, VALUE *argv, VALUE self) {
-  GeosWkbReader *arg1 = (GeosWkbReader *) 0 ;
-  unsigned char *arg2 = (unsigned char *) 0 ;
-  size_t arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int alloc2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbReader, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbReader *","read", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbReader * >(argp1);
-  {
-    /* %typemap(in) (const unsigned char* wkb, size_t size) (int alloc2 = 0) */
-    if (SWIG_AsCharPtrAndSize(argv[0], (char**)&arg2, &arg3, &alloc2) != SWIG_OK)
-    SWIG_exception(SWIG_RuntimeError, "Expecting a string");
-    /* Don't want to include last null character! */
-    arg3--;
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosWkbReader_read(arg1,(unsigned char const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_WkbReader_read_hex(int argc, VALUE *argv, VALUE self) {
-  GeosWkbReader *arg1 = (GeosWkbReader *) 0 ;
-  unsigned char *arg2 = (unsigned char *) 0 ;
-  size_t arg3 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int alloc2 = 0 ;
-  GeosGeometry *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbReader, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbReader *","readHEX", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbReader * >(argp1);
-  {
-    /* %typemap(in) (const unsigned char* wkb, size_t size) (int alloc2 = 0) */
-    if (SWIG_AsCharPtrAndSize(argv[0], (char**)&arg2, &arg3, &alloc2) != SWIG_OK)
-    SWIG_exception(SWIG_RuntimeError, "Expecting a string");
-    /* Don't want to include last null character! */
-    arg3--;
-  }
-  {
-    try
-    {
-      result = (GeosGeometry *)GeosWkbReader_readHEX(arg1,(unsigned char const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) GeosGeometry */
-    
-    if (result == NULL)
-    SWIG_exception(SWIG_RuntimeError, message);
-    
-    GeosGeometry *geom = result;
-    GEOSGeomTypes geomId = (GEOSGeomTypes)GEOSGeomTypeId((GEOSGeom) geom);
-    
-    switch (geomId)
-    {
-    case GEOS_POINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_LINEARRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosLinearRing, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_POLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOINT:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPoint, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTILINESTRING:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiLineString, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_MULTIPOLYGON:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosMultiPolygon, 0 | SWIG_POINTER_OWN);
-      break;
-    case GEOS_GEOMETRYCOLLECTION:
-      vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeosGeometryCollection, 0 | SWIG_POINTER_OWN);
-      break;
-    }
-  }
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-static swig_class SwigClassWkbWriter;
-
-#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
-SWIGINTERN VALUE
-_wrap_WkbWriter_allocate(VALUE self) {
-#else
-  SWIGINTERN VALUE
-  _wrap_WkbWriter_allocate(int argc, VALUE *argv, VALUE self) {
-#endif
-    
-    
-    VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_GeosWkbWriter);
-#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
-    rb_obj_call_init(vresult, argc, argv);
-#endif
-    return vresult;
-  }
-  
-
-SWIGINTERN VALUE
-_wrap_new_WkbWriter(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *result = 0 ;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  {
-    try
-    {
-      result = (GeosWkbWriter *)new_GeosWkbWriter();
-      DATA_PTR(self) = result;
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return self;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN void delete_GeosWkbWriter(GeosWkbWriter *self){
-        GEOSWKBWriter *writer = (GEOSWKBWriter*) self;
-        GEOSWKBWriter_destroy(writer);
-    }
-SWIGINTERN void
-free_GeosWkbWriter(GeosWkbWriter *arg1) {
-    delete_GeosWkbWriter(arg1);
-}
-
-SWIGINTERN VALUE
-_wrap_WkbWriter_output_dimensions(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbWriter *","getOutputDimension", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  {
-    try
-    {
-      result = (int)GeosWkbWriter_getOutputDimension(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_int(static_cast< int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_WkbWriter_output_dimensionse___(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  int arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int val2 ;
-  int ecode2 = 0 ;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbWriter *","setOutputDimension", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  ecode2 = SWIG_AsVal_int(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","setOutputDimension", 2, argv[0] ));
-  } 
-  arg2 = static_cast< int >(val2);
-  {
-    try
-    {
-      GeosWkbWriter_setOutputDimension(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_WkbWriter_byte_order(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbWriter *","getByteOrder", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  {
-    try
-    {
-      result = (int)GeosWkbWriter_getByteOrder(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_int(static_cast< int >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_WkbWriter_byte_ordere___(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  int arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  int val2 ;
-  int ecode2 = 0 ;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbWriter *","setByteOrder", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  ecode2 = SWIG_AsVal_int(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","setByteOrder", 2, argv[0] ));
-  } 
-  arg2 = static_cast< int >(val2);
-  {
-    try
-    {
-      GeosWkbWriter_setByteOrder(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_WkbWriter_include_srid(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  bool result;
-  VALUE vresult = Qnil;
-  
-  if ((argc < 0) || (argc > 0)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbWriter *","getIncludeSRID", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  {
-    try
-    {
-      result = (bool)GeosWkbWriter_getIncludeSRID(arg1);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  vresult = SWIG_From_bool(static_cast< bool >(result));
-  return vresult;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_WkbWriter_include_sride___(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  bool arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  bool val2 ;
-  int ecode2 = 0 ;
-  
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbWriter *","setIncludeSRID", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  ecode2 = SWIG_AsVal_bool(argv[0], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "bool","setIncludeSRID", 2, argv[0] ));
-  } 
-  arg2 = static_cast< bool >(val2);
-  {
-    try
-    {
-      GeosWkbWriter_setIncludeSRID(arg1,arg2);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  return Qnil;
-fail:
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_WkbWriter_write(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  size_t *arg3 = (size_t *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  size_t temp3 = 0 ;
-  unsigned char *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  {
-    /* %typemap(in, numinputs=0) size_t *size (size_t temp3 = 0) */
-    arg3 = &temp3;
-  }
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbWriter *","write", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","write", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (unsigned char *)GeosWkbWriter_write(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) unsigned char* */
-  }
-  {
-    /* %typemap(argout) size_t *size */
-    vresult = SWIG_FromCharPtrAndSize((const char*)result, *arg3);
-  }
-  {
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-  }
-  return vresult;
-fail:
-  {
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-  }
-  return Qnil;
-}
-
-
-SWIGINTERN VALUE
-_wrap_WkbWriter_write_hex(int argc, VALUE *argv, VALUE self) {
-  GeosWkbWriter *arg1 = (GeosWkbWriter *) 0 ;
-  GeosGeometry *arg2 = (GeosGeometry *) 0 ;
-  size_t *arg3 = (size_t *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  size_t temp3 = 0 ;
-  unsigned char *result = 0 ;
-  VALUE vresult = Qnil;
-  
-  {
-    /* %typemap(in, numinputs=0) size_t *size (size_t temp3 = 0) */
-    arg3 = &temp3;
-  }
-  if ((argc < 1) || (argc > 1)) {
-    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
-  }
-  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_GeosWkbWriter, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "GeosWkbWriter *","writeHEX", 1, self )); 
-  }
-  arg1 = reinterpret_cast< GeosWkbWriter * >(argp1);
-  res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_GeosGeometry, 0 |  0 );
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "GeosGeometry const *","writeHEX", 2, argv[0] )); 
-  }
-  arg2 = reinterpret_cast< GeosGeometry * >(argp2);
-  {
-    try
-    {
-      result = (unsigned char *)GeosWkbWriter_writeHEX(arg1,(GeosGeometry const *)arg2,arg3);
-    }
-    catch (const std::exception& e)
-    {
-      SWIG_exception(SWIG_RuntimeError, e.what());
-    }
-  }
-  {
-    /* %typemap(out) unsigned char* */
-  }
-  {
-    /* %typemap(argout) size_t *size */
-    vresult = SWIG_FromCharPtrAndSize((const char*)result, *arg3);
-  }
-  {
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-  }
-  return vresult;
-fail:
-  {
-    /* %typemap(freearg) size_t *size */
-    std::free(result);
-  }
-  return Qnil;
-}
-
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
-
-static void *_p_GeosMultiPolygonTo_p_GeosGeometryCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometryCollection *)  ((GeosMultiPolygon *) x));
-}
-static void *_p_GeosMultiPointTo_p_GeosGeometryCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometryCollection *)  ((GeosMultiPoint *) x));
-}
-static void *_p_GeosMultiLineStringTo_p_GeosGeometryCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometryCollection *)  ((GeosMultiLineString *) x));
-}
-static void *_p_GeosMultiLinearRingTo_p_GeosGeometryCollection(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometryCollection *)  ((GeosMultiLinearRing *) x));
-}
-static void *_p_GeosPolygonTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosPolygon *) x));
-}
-static void *_p_GeosMultiPolygonTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *) (GeosGeometryCollection *) ((GeosMultiPolygon *) x));
-}
-static void *_p_GeosPointTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosPoint *) x));
-}
-static void *_p_GeosLineStringTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosLineString *) x));
-}
-static void *_p_GeosLinearRingTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosLinearRing *) x));
-}
-static void *_p_GeosMultiPointTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *) (GeosGeometryCollection *) ((GeosMultiPoint *) x));
-}
-static void *_p_GeosMultiLineStringTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *) (GeosGeometryCollection *) ((GeosMultiLineString *) x));
-}
-static void *_p_GeosMultiLinearRingTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *) (GeosGeometryCollection *) ((GeosMultiLinearRing *) x));
-}
-static void *_p_GeosGeometryCollectionTo_p_GeosGeometry(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((GeosGeometry *)  ((GeosGeometryCollection *) x));
-}
-static void *_p_swig__IteratorTo_p_swig__ConstIterator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
-    return (void *)((swig::ConstIterator *)  ((swig::Iterator *) x));
-}
-static swig_type_info _swigt__p_GeosCoordinateSequence = {"_p_GeosCoordinateSequence", "GeosCoordinateSequence *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosGeometry = {"_p_GeosGeometry", "GeosGeometry *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosGeometryCollection = {"_p_GeosGeometryCollection", "GeosGeometryCollection *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosLineString = {"_p_GeosLineString", "GeosLineString *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosLinearRing = {"_p_GeosLinearRing", "GeosLinearRing *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosMultiLineString = {"_p_GeosMultiLineString", "GeosMultiLineString *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosMultiLinearRing = {"_p_GeosMultiLinearRing", "GeosMultiLinearRing *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosMultiPoint = {"_p_GeosMultiPoint", "GeosMultiPoint *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosMultiPolygon = {"_p_GeosMultiPolygon", "GeosMultiPolygon *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosPoint = {"_p_GeosPoint", "GeosPoint *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosPolygon = {"_p_GeosPolygon", "GeosPolygon *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosPreparedGeometry = {"_p_GeosPreparedGeometry", "GeosPreparedGeometry *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosSTRtree = {"_p_GeosSTRtree", "GeosSTRtree *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosWkbReader = {"_p_GeosWkbReader", "GeosWkbReader *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosWkbWriter = {"_p_GeosWkbWriter", "GeosWkbWriter *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosWktReader = {"_p_GeosWktReader", "GeosWktReader *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_GeosWktWriter = {"_p_GeosWktWriter", "GeosWktWriter *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_p_GeosLinearRing = {"_p_p_GeosLinearRing", "GeosLinearRing **", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_swig__ConstIterator = {"_p_swig__ConstIterator", "swig::ConstIterator *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_swig__GC_VALUE = {"_p_swig__GC_VALUE", "swig::GC_VALUE *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_swig__Iterator = {"_p_swig__Iterator", "swig::Iterator *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *", 0, 0, (void*)0, 0};
-static swig_type_info _swigt__p_void = {"_p_void", "VALUE|void *", 0, 0, (void*)0, 0};
-
-static swig_type_info *swig_type_initial[] = {
-  &_swigt__p_GeosCoordinateSequence,
-  &_swigt__p_GeosGeometry,
-  &_swigt__p_GeosGeometryCollection,
-  &_swigt__p_GeosLineString,
-  &_swigt__p_GeosLinearRing,
-  &_swigt__p_GeosMultiLineString,
-  &_swigt__p_GeosMultiLinearRing,
-  &_swigt__p_GeosMultiPoint,
-  &_swigt__p_GeosMultiPolygon,
-  &_swigt__p_GeosPoint,
-  &_swigt__p_GeosPolygon,
-  &_swigt__p_GeosPreparedGeometry,
-  &_swigt__p_GeosSTRtree,
-  &_swigt__p_GeosWkbReader,
-  &_swigt__p_GeosWkbWriter,
-  &_swigt__p_GeosWktReader,
-  &_swigt__p_GeosWktWriter,
-  &_swigt__p_char,
-  &_swigt__p_p_GeosLinearRing,
-  &_swigt__p_size_t,
-  &_swigt__p_swig__ConstIterator,
-  &_swigt__p_swig__GC_VALUE,
-  &_swigt__p_swig__Iterator,
-  &_swigt__p_unsigned_char,
-  &_swigt__p_void,
-};
-
-static swig_cast_info _swigc__p_GeosCoordinateSequence[] = {  {&_swigt__p_GeosCoordinateSequence, 0, 0, 0},{0, 0, 0, 0}};
-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}};
-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}};
-static swig_cast_info _swigc__p_GeosLineString[] = {  {&_swigt__p_GeosLineString, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosLinearRing[] = {  {&_swigt__p_GeosLinearRing, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosMultiLineString[] = {  {&_swigt__p_GeosMultiLineString, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosMultiLinearRing[] = {  {&_swigt__p_GeosMultiLinearRing, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosMultiPoint[] = {  {&_swigt__p_GeosMultiPoint, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosMultiPolygon[] = {  {&_swigt__p_GeosMultiPolygon, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosPoint[] = {  {&_swigt__p_GeosPoint, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosPolygon[] = {  {&_swigt__p_GeosPolygon, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosPreparedGeometry[] = {  {&_swigt__p_GeosPreparedGeometry, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosSTRtree[] = {  {&_swigt__p_GeosSTRtree, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosWkbReader[] = {  {&_swigt__p_GeosWkbReader, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosWkbWriter[] = {  {&_swigt__p_GeosWkbWriter, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosWktReader[] = {  {&_swigt__p_GeosWktReader, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_GeosWktWriter[] = {  {&_swigt__p_GeosWktWriter, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_p_GeosLinearRing[] = {  {&_swigt__p_p_GeosLinearRing, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_swig__ConstIterator[] = {  {&_swigt__p_swig__ConstIterator, 0, 0, 0},  {&_swigt__p_swig__Iterator, _p_swig__IteratorTo_p_swig__ConstIterator, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_swig__GC_VALUE[] = {  {&_swigt__p_swig__GC_VALUE, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_swig__Iterator[] = {  {&_swigt__p_swig__Iterator, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
-static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
-
-static swig_cast_info *swig_cast_initial[] = {
-  _swigc__p_GeosCoordinateSequence,
-  _swigc__p_GeosGeometry,
-  _swigc__p_GeosGeometryCollection,
-  _swigc__p_GeosLineString,
-  _swigc__p_GeosLinearRing,
-  _swigc__p_GeosMultiLineString,
-  _swigc__p_GeosMultiLinearRing,
-  _swigc__p_GeosMultiPoint,
-  _swigc__p_GeosMultiPolygon,
-  _swigc__p_GeosPoint,
-  _swigc__p_GeosPolygon,
-  _swigc__p_GeosPreparedGeometry,
-  _swigc__p_GeosSTRtree,
-  _swigc__p_GeosWkbReader,
-  _swigc__p_GeosWkbWriter,
-  _swigc__p_GeosWktReader,
-  _swigc__p_GeosWktWriter,
-  _swigc__p_char,
-  _swigc__p_p_GeosLinearRing,
-  _swigc__p_size_t,
-  _swigc__p_swig__ConstIterator,
-  _swigc__p_swig__GC_VALUE,
-  _swigc__p_swig__Iterator,
-  _swigc__p_unsigned_char,
-  _swigc__p_void,
-};
-
-
-/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
-
-/* -----------------------------------------------------------------------------
- * Type initialization:
- * This problem is tough by the requirement that no dynamic 
- * memory is used. Also, since swig_type_info structures store pointers to 
- * swig_cast_info structures and swig_cast_info structures store pointers back
- * to swig_type_info structures, we need some lookup code at initialization. 
- * The idea is that swig generates all the structures that are needed. 
- * The runtime then collects these partially filled structures. 
- * The SWIG_InitializeModule function takes these initial arrays out of 
- * swig_module, and does all the lookup, filling in the swig_module.types
- * array with the correct data and linking the correct swig_cast_info
- * structures together.
- *
- * The generated swig_type_info structures are assigned staticly to an initial 
- * array. We just loop through that array, and handle each type individually.
- * First we lookup if this type has been already loaded, and if so, use the
- * loaded structure instead of the generated one. Then we have to fill in the
- * cast linked list. The cast data is initially stored in something like a
- * two-dimensional array. Each row corresponds to a type (there are the same
- * number of rows as there are in the swig_type_initial array). Each entry in
- * a column is one of the swig_cast_info structures for that type.
- * The cast_initial array is actually an array of arrays, because each row has
- * a variable number of columns. So to actually build the cast linked list,
- * we find the array of casts associated with the type, and loop through it 
- * adding the casts to the list. The one last trick we need to do is making
- * sure the type pointer in the swig_cast_info struct is correct.
- *
- * First off, we lookup the cast->type name to see if it is already loaded. 
- * There are three cases to handle:
- *  1) If the cast->type has already been loaded AND the type we are adding
- *     casting info to has not been loaded (it is in this module), THEN we
- *     replace the cast->type pointer with the type pointer that has already
- *     been loaded.
- *  2) If BOTH types (the one we are adding casting info to, and the 
- *     cast->type) are loaded, THEN the cast info has already been loaded by
- *     the previous module so we just ignore it.
- *  3) Finally, if cast->type has not already been loaded, then we add that
- *     swig_cast_info to the linked list (because the cast->type) pointer will
- *     be correct.
- * ----------------------------------------------------------------------------- */
-
-#ifdef __cplusplus
-extern "C" {
-#if 0
-} /* c-mode */
-#endif
-#endif
-
-#if 0
-#define SWIGRUNTIME_DEBUG
-#endif
-
-
-SWIGRUNTIME void
-SWIG_InitializeModule(void *clientdata) {
-  size_t i;
-  swig_module_info *module_head, *iter;
-  int found, init;
-
-  /* check to see if the circular list has been setup, if not, set it up */
-  if (swig_module.next==0) {
-    /* Initialize the swig_module */
-    swig_module.type_initial = swig_type_initial;
-    swig_module.cast_initial = swig_cast_initial;
-    swig_module.next = &swig_module;
-    init = 1;
-  } else {
-    init = 0;
-  }
-
-  /* Try and load any already created modules */
-  module_head = SWIG_GetModule(clientdata);
-  if (!module_head) {
-    /* This is the first module loaded for this interpreter */
-    /* so set the swig module into the interpreter */
-    SWIG_SetModule(clientdata, &swig_module);
-    module_head = &swig_module;
-  } else {
-    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
-    found=0;
-    iter=module_head;
-    do {
-      if (iter==&swig_module) {
-        found=1;
-        break;
-      }
-      iter=iter->next;
-    } while (iter!= module_head);
-
-    /* if the is found in the list, then all is done and we may leave */
-    if (found) return;
-    /* otherwise we must add out module into the list */
-    swig_module.next = module_head->next;
-    module_head->next = &swig_module;
-  }
-
-  /* When multiple interpeters are used, a module could have already been initialized in
-     a different interpreter, but not yet have a pointer in this interpreter.
-     In this case, we do not want to continue adding types... everything should be
-     set up already */
-  if (init == 0) return;
-
-  /* Now work on filling in swig_module.types */
-#ifdef SWIGRUNTIME_DEBUG
-  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
-#endif
-  for (i = 0; i < swig_module.size; ++i) {
-    swig_type_info *type = 0;
-    swig_type_info *ret;
-    swig_cast_info *cast;
-  
-#ifdef SWIGRUNTIME_DEBUG
-    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
-#endif
-
-    /* if there is another module already loaded */
-    if (swig_module.next != &swig_module) {
-      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
-    }
-    if (type) {
-      /* Overwrite clientdata field */
-#ifdef SWIGRUNTIME_DEBUG
-      printf("SWIG_InitializeModule: found type %s\n", type->name);
-#endif
-      if (swig_module.type_initial[i]->clientdata) {
-	type->clientdata = swig_module.type_initial[i]->clientdata;
-#ifdef SWIGRUNTIME_DEBUG
-      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
-#endif
-      }
-    } else {
-      type = swig_module.type_initial[i];
-    }
-
-    /* Insert casting types */
-    cast = swig_module.cast_initial[i];
-    while (cast->type) {
-    
-      /* Don't need to add information already in the list */
-      ret = 0;
-#ifdef SWIGRUNTIME_DEBUG
-      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
-#endif
-      if (swig_module.next != &swig_module) {
-        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
-#ifdef SWIGRUNTIME_DEBUG
-	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
-#endif
-      }
-      if (ret) {
-	if (type == swig_module.type_initial[i]) {
-#ifdef SWIGRUNTIME_DEBUG
-	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
-#endif
-	  cast->type = ret;
-	  ret = 0;
-	} else {
-	  /* Check for casting already in the list */
-	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
-#ifdef SWIGRUNTIME_DEBUG
-	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
-#endif
-	  if (!ocast) ret = 0;
-	}
-      }
-
-      if (!ret) {
-#ifdef SWIGRUNTIME_DEBUG
-	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
-#endif
-        if (type->cast) {
-          type->cast->prev = cast;
-          cast->next = type->cast;
-        }
-        type->cast = cast;
-      }
-      cast++;
-    }
-    /* Set entry in modules->types array equal to the type */
-    swig_module.types[i] = type;
-  }
-  swig_module.types[i] = 0;
-
-#ifdef SWIGRUNTIME_DEBUG
-  printf("**** SWIG_InitializeModule: Cast List ******\n");
-  for (i = 0; i < swig_module.size; ++i) {
-    int j = 0;
-    swig_cast_info *cast = swig_module.cast_initial[i];
-    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
-    while (cast->type) {
-      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
-      cast++;
-      ++j;
-    }
-  printf("---- Total casts: %d\n",j);
-  }
-  printf("**** SWIG_InitializeModule: Cast List ******\n");
-#endif
-}
-
-/* This function will propagate the clientdata field of type to
-* any new swig_type_info structures that have been added into the list
-* of equivalent types.  It is like calling
-* SWIG_TypeClientData(type, clientdata) a second time.
-*/
-SWIGRUNTIME void
-SWIG_PropagateClientData(void) {
-  size_t i;
-  swig_cast_info *equiv;
-  static int init_run = 0;
-
-  if (init_run) return;
-  init_run = 1;
-
-  for (i = 0; i < swig_module.size; i++) {
-    if (swig_module.types[i]->clientdata) {
-      equiv = swig_module.types[i]->cast;
-      while (equiv) {
-        if (!equiv->converter) {
-          if (equiv->type && !equiv->type->clientdata)
-            SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
-        }
-        equiv = equiv->next;
-      }
-    }
-  }
-}
-
-#ifdef __cplusplus
-#if 0
-{ /* c-mode */
-#endif
-}
-#endif
-
-/*
-
-*/
-#ifdef __cplusplus
-extern "C"
-#endif
-SWIGEXPORT void Init_geos(void) {
-  size_t i;
-  
-  SWIG_InitRuntime();
-  mGeos = rb_define_module("Geos");
-  
-  SWIG_InitializeModule(0);
-  for (i = 0; i < swig_module.size; i++) {
-    SWIG_define_class(swig_module.types[i]);
-  }
-  
-  SWIG_RubyInitializeTrackings();
-  
-  SwigClassGCVALUE.klass = rb_define_class_under(mGeos, "GCVALUE", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_swig__GC_VALUE, (void *) &SwigClassGCVALUE);
-  rb_undef_alloc_func(SwigClassGCVALUE.klass);
-  rb_define_method(SwigClassGCVALUE.klass, "inspect", VALUEFUNC(_wrap_GCVALUE_inspect), -1);
-  rb_define_method(SwigClassGCVALUE.klass, "to_s", VALUEFUNC(_wrap_GCVALUE_to_s), -1);
-  SwigClassGCVALUE.mark = 0;
-  SwigClassGCVALUE.trackObjects = 0;
-  
-  swig::SwigGCReferences::initialize();
-  
-  
-  SwigClassConstIterator.klass = rb_define_class_under(mGeos, "ConstIterator", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_swig__ConstIterator, (void *) &SwigClassConstIterator);
-  rb_undef_alloc_func(SwigClassConstIterator.klass);
-  rb_define_method(SwigClassConstIterator.klass, "value", VALUEFUNC(_wrap_ConstIterator_value), -1);
-  rb_define_method(SwigClassConstIterator.klass, "dup", VALUEFUNC(_wrap_ConstIterator_dup), -1);
-  rb_define_method(SwigClassConstIterator.klass, "inspect", VALUEFUNC(_wrap_ConstIterator_inspect), -1);
-  rb_define_method(SwigClassConstIterator.klass, "to_s", VALUEFUNC(_wrap_ConstIterator_to_s), -1);
-  rb_define_method(SwigClassConstIterator.klass, "next", VALUEFUNC(_wrap_ConstIterator_next), -1);
-  rb_define_method(SwigClassConstIterator.klass, "previous", VALUEFUNC(_wrap_ConstIterator_previous), -1);
-  rb_define_method(SwigClassConstIterator.klass, "==", VALUEFUNC(_wrap_ConstIterator___eq__), -1);
-  rb_define_method(SwigClassConstIterator.klass, "+", VALUEFUNC(_wrap_ConstIterator___add__), -1);
-  rb_define_method(SwigClassConstIterator.klass, "-", VALUEFUNC(_wrap_ConstIterator___sub__), -1);
-  SwigClassConstIterator.mark = 0;
-  SwigClassConstIterator.destroy = (void (*)(void *)) free_swig_ConstIterator;
-  SwigClassConstIterator.trackObjects = 0;
-  
-  SwigClassIterator.klass = rb_define_class_under(mGeos, "Iterator", ((swig_class *) SWIGTYPE_p_swig__ConstIterator->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_swig__Iterator, (void *) &SwigClassIterator);
-  rb_undef_alloc_func(SwigClassIterator.klass);
-  rb_define_method(SwigClassIterator.klass, "value=", VALUEFUNC(_wrap_Iterator_valuee___), -1);
-  rb_define_method(SwigClassIterator.klass, "dup", VALUEFUNC(_wrap_Iterator_dup), -1);
-  rb_define_method(SwigClassIterator.klass, "next", VALUEFUNC(_wrap_Iterator_next), -1);
-  rb_define_method(SwigClassIterator.klass, "previous", VALUEFUNC(_wrap_Iterator_previous), -1);
-  rb_define_method(SwigClassIterator.klass, "inspect", VALUEFUNC(_wrap_Iterator_inspect), -1);
-  rb_define_method(SwigClassIterator.klass, "to_s", VALUEFUNC(_wrap_Iterator_to_s), -1);
-  rb_define_method(SwigClassIterator.klass, "==", VALUEFUNC(_wrap_Iterator___eq__), -1);
-  rb_define_method(SwigClassIterator.klass, "+", VALUEFUNC(_wrap_Iterator___add__), -1);
-  rb_define_method(SwigClassIterator.klass, "-", VALUEFUNC(_wrap_Iterator___sub__), -1);
-  SwigClassIterator.mark = 0;
-  SwigClassIterator.destroy = (void (*)(void *)) free_swig_Iterator;
-  SwigClassIterator.trackObjects = 0;
-  rb_define_const(mGeos, "GEOS_VERSION_MAJOR", SWIG_From_int(static_cast< int >(3)));
-  rb_define_const(mGeos, "GEOS_VERSION_MINOR", SWIG_From_int(static_cast< int >(5)));
-  rb_define_const(mGeos, "GEOS_VERSION", SWIG_FromCharPtr("3.5.0dev"));
-  rb_define_const(mGeos, "GEOS_JTS_PORT", SWIG_FromCharPtr("1.13.0"));
-  rb_define_const(mGeos, "GEOS_CAPI_VERSION_MAJOR", SWIG_From_int(static_cast< int >(1)));
-  rb_define_const(mGeos, "GEOS_CAPI_VERSION_MINOR", SWIG_From_int(static_cast< int >(9)));
-  rb_define_const(mGeos, "GEOS_CAPI_VERSION_PATCH", SWIG_From_int(static_cast< int >(0)));
-  rb_define_const(mGeos, "GEOS_CAPI_FIRST_INTERFACE", SWIG_From_int(static_cast< int >(1)));
-  rb_define_const(mGeos, "GEOS_CAPI_LAST_INTERFACE", SWIG_From_int(static_cast< int >((1+9))));
-  rb_define_const(mGeos, "GEOS_CAPI_VERSION", SWIG_FromCharPtr("3.5.0dev-CAPI-1.9.0"));
-  rb_define_const(mGeos, "GEOS_POINT", SWIG_From_int(static_cast< int >(GEOS_POINT)));
-  rb_define_const(mGeos, "GEOS_LINESTRING", SWIG_From_int(static_cast< int >(GEOS_LINESTRING)));
-  rb_define_const(mGeos, "GEOS_LINEARRING", SWIG_From_int(static_cast< int >(GEOS_LINEARRING)));
-  rb_define_const(mGeos, "GEOS_POLYGON", SWIG_From_int(static_cast< int >(GEOS_POLYGON)));
-  rb_define_const(mGeos, "GEOS_MULTIPOINT", SWIG_From_int(static_cast< int >(GEOS_MULTIPOINT)));
-  rb_define_const(mGeos, "GEOS_MULTILINESTRING", SWIG_From_int(static_cast< int >(GEOS_MULTILINESTRING)));
-  rb_define_const(mGeos, "GEOS_MULTIPOLYGON", SWIG_From_int(static_cast< int >(GEOS_MULTIPOLYGON)));
-  rb_define_const(mGeos, "GEOS_GEOMETRYCOLLECTION", SWIG_From_int(static_cast< int >(GEOS_GEOMETRYCOLLECTION)));
-  rb_define_const(mGeos, "GEOS_WKB_XDR", SWIG_From_int(static_cast< int >(GEOS_WKB_XDR)));
-  rb_define_const(mGeos, "GEOS_WKB_NDR", SWIG_From_int(static_cast< int >(GEOS_WKB_NDR)));
-  
-  initGEOS(noticeHandler, errorHandler);
-  
-  rb_define_module_function(mGeos, "version", VALUEFUNC(_wrap_version), -1);
-  
-  SwigClassCoordinateSequence.klass = rb_define_class_under(mGeos, "CoordinateSequence", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosCoordinateSequence, (void *) &SwigClassCoordinateSequence);
-  rb_define_alloc_func(SwigClassCoordinateSequence.klass, _wrap_CoordinateSequence_allocate);
-  rb_define_method(SwigClassCoordinateSequence.klass, "initialize", VALUEFUNC(_wrap_new_CoordinateSequence), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "clone", VALUEFUNC(_wrap_CoordinateSequence_clone), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "set_x", VALUEFUNC(_wrap_CoordinateSequence_set_x), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "set_y", VALUEFUNC(_wrap_CoordinateSequence_set_y), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "set_z", VALUEFUNC(_wrap_CoordinateSequence_set_z), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "set_ordinate", VALUEFUNC(_wrap_CoordinateSequence_set_ordinate), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "get_x", VALUEFUNC(_wrap_CoordinateSequence_get_x), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "get_y", VALUEFUNC(_wrap_CoordinateSequence_get_y), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "get_z", VALUEFUNC(_wrap_CoordinateSequence_get_z), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "get_ordinate", VALUEFUNC(_wrap_CoordinateSequence_get_ordinate), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "length", VALUEFUNC(_wrap_CoordinateSequence___len__), -1);
-  rb_define_method(SwigClassCoordinateSequence.klass, "dimensions", VALUEFUNC(_wrap_CoordinateSequence_dimensions), -1);
-  SwigClassCoordinateSequence.mark = 0;
-  SwigClassCoordinateSequence.destroy = (void (*)(void *)) free_GeosCoordinateSequence;
-  SwigClassCoordinateSequence.trackObjects = 0;
-  
-  SwigClassGeometry.klass = rb_define_class_under(mGeos, "Geometry", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosGeometry, (void *) &SwigClassGeometry);
-  rb_undef_alloc_func(SwigClassGeometry.klass);
-  rb_define_method(SwigClassGeometry.klass, "clone", VALUEFUNC(_wrap_Geometry_clone), -1);
-  rb_define_method(SwigClassGeometry.klass, "geom_type", VALUEFUNC(_wrap_Geometry_geom_type), -1);
-  rb_define_method(SwigClassGeometry.klass, "type_id", VALUEFUNC(_wrap_Geometry_type_id), -1);
-  rb_define_method(SwigClassGeometry.klass, "normalize", VALUEFUNC(_wrap_Geometry_normalize), -1);
-  rb_define_method(SwigClassGeometry.klass, "srid", VALUEFUNC(_wrap_Geometry_srid), -1);
-  rb_define_method(SwigClassGeometry.klass, "srid=", VALUEFUNC(_wrap_Geometry_sride___), -1);
-  rb_define_method(SwigClassGeometry.klass, "dimensions", VALUEFUNC(_wrap_Geometry_dimensions), -1);
-  rb_define_method(SwigClassGeometry.klass, "num_geometries", VALUEFUNC(_wrap_Geometry_num_geometries), -1);
-  rb_define_method(SwigClassGeometry.klass, "intersection", VALUEFUNC(_wrap_Geometry_intersection), -1);
-  rb_define_method(SwigClassGeometry.klass, "buffer", VALUEFUNC(_wrap_Geometry_buffer), -1);
-  rb_define_method(SwigClassGeometry.klass, "convex_hull", VALUEFUNC(_wrap_Geometry_convex_hull), -1);
-  rb_define_method(SwigClassGeometry.klass, "difference", VALUEFUNC(_wrap_Geometry_difference), -1);
-  rb_define_method(SwigClassGeometry.klass, "sym_difference", VALUEFUNC(_wrap_Geometry_sym_difference), -1);
-  rb_define_method(SwigClassGeometry.klass, "boundary", VALUEFUNC(_wrap_Geometry_boundary), -1);
-  rb_define_method(SwigClassGeometry.klass, "union", VALUEFUNC(_wrap_Geometry_union), -1);
-  rb_define_method(SwigClassGeometry.klass, "point_on_surface", VALUEFUNC(_wrap_Geometry_point_on_surface), -1);
-  rb_define_method(SwigClassGeometry.klass, "centroid", VALUEFUNC(_wrap_Geometry_centroid), -1);
-  rb_define_alias(SwigClassGeometry.klass, "center", "centroid");
-  rb_define_method(SwigClassGeometry.klass, "envelope", VALUEFUNC(_wrap_Geometry_envelope), -1);
-  rb_define_method(SwigClassGeometry.klass, "relate", VALUEFUNC(_wrap_Geometry_relate), -1);
-  rb_define_method(SwigClassGeometry.klass, "line_merge", VALUEFUNC(_wrap_Geometry_line_merge), -1);
-  rb_define_method(SwigClassGeometry.klass, "simplify", VALUEFUNC(_wrap_Geometry_simplify), -1);
-  rb_define_method(SwigClassGeometry.klass, "topology_preserve_simplify", VALUEFUNC(_wrap_Geometry_topology_preserve_simplify), -1);
-  rb_define_method(SwigClassGeometry.klass, "relate_pattern", VALUEFUNC(_wrap_Geometry_relate_pattern), -1);
-  rb_define_method(SwigClassGeometry.klass, "disjoint?", VALUEFUNC(_wrap_Geometry_disjointq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "touches?", VALUEFUNC(_wrap_Geometry_touchesq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "intersects?", VALUEFUNC(_wrap_Geometry_intersectsq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "crosses?", VALUEFUNC(_wrap_Geometry_crossesq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "within?", VALUEFUNC(_wrap_Geometry_withinq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "contains?", VALUEFUNC(_wrap_Geometry_containsq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "overlaps?", VALUEFUNC(_wrap_Geometry_overlapsq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "eql?", VALUEFUNC(_wrap_Geometry_eqlq___), -1);
-  rb_define_alias(SwigClassGeometry.klass, "==", "eql?");
-  rb_define_method(SwigClassGeometry.klass, "eql_exact?", VALUEFUNC(_wrap_Geometry_eql_exactq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "empty?", VALUEFUNC(_wrap_Geometry_emptyq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "valid?", VALUEFUNC(_wrap_Geometry_validq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "simple?", VALUEFUNC(_wrap_Geometry_simpleq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "ring?", VALUEFUNC(_wrap_Geometry_ringq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "has_z?", VALUEFUNC(_wrap_Geometry_has_zq___), -1);
-  rb_define_method(SwigClassGeometry.klass, "area", VALUEFUNC(_wrap_Geometry_area), -1);
-  rb_define_method(SwigClassGeometry.klass, "length", VALUEFUNC(_wrap_Geometry_length), -1);
-  rb_define_method(SwigClassGeometry.klass, "distance", VALUEFUNC(_wrap_Geometry_distance), -1);
-  SwigClassGeometry.mark = 0;
-  SwigClassGeometry.destroy = (void (*)(void *)) free_GeosGeometry;
-  SwigClassGeometry.trackObjects = 0;
-  
-  SwigClassPoint.klass = rb_define_class_under(mGeos, "Point", ((swig_class *) SWIGTYPE_p_GeosGeometry->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosPoint, (void *) &SwigClassPoint);
-  rb_undef_alloc_func(SwigClassPoint.klass);
-  rb_define_method(SwigClassPoint.klass, "coord_seq", VALUEFUNC(_wrap_Point_coord_seq), -1);
-  SwigClassPoint.mark = 0;
-  SwigClassPoint.destroy = (void (*)(void *)) free_GeosPoint;
-  SwigClassPoint.trackObjects = 0;
-  
-  SwigClassLineString.klass = rb_define_class_under(mGeos, "LineString", ((swig_class *) SWIGTYPE_p_GeosGeometry->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosLineString, (void *) &SwigClassLineString);
-  rb_undef_alloc_func(SwigClassLineString.klass);
-  rb_define_method(SwigClassLineString.klass, "coord_seq", VALUEFUNC(_wrap_LineString_coord_seq), -1);
-  SwigClassLineString.mark = 0;
-  SwigClassLineString.destroy = (void (*)(void *)) free_GeosLineString;
-  SwigClassLineString.trackObjects = 0;
-  
-  SwigClassLinearRing.klass = rb_define_class_under(mGeos, "LinearRing", ((swig_class *) SWIGTYPE_p_GeosGeometry->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosLinearRing, (void *) &SwigClassLinearRing);
-  rb_undef_alloc_func(SwigClassLinearRing.klass);
-  rb_define_method(SwigClassLinearRing.klass, "coord_seq", VALUEFUNC(_wrap_LinearRing_coord_seq), -1);
-  SwigClassLinearRing.mark = 0;
-  SwigClassLinearRing.destroy = (void (*)(void *)) free_GeosLinearRing;
-  SwigClassLinearRing.trackObjects = 0;
-  
-  SwigClassPolygon.klass = rb_define_class_under(mGeos, "Polygon", ((swig_class *) SWIGTYPE_p_GeosGeometry->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosPolygon, (void *) &SwigClassPolygon);
-  rb_undef_alloc_func(SwigClassPolygon.klass);
-  rb_define_method(SwigClassPolygon.klass, "exterior_ring", VALUEFUNC(_wrap_Polygon_exterior_ring), -1);
-  rb_define_method(SwigClassPolygon.klass, "num_interior_rings", VALUEFUNC(_wrap_Polygon_num_interior_rings), -1);
-  rb_define_method(SwigClassPolygon.klass, "interior_ring_n", VALUEFUNC(_wrap_Polygon_interior_ring_n), -1);
-  SwigClassPolygon.mark = 0;
-  SwigClassPolygon.destroy = (void (*)(void *)) free_GeosPolygon;
-  SwigClassPolygon.trackObjects = 0;
-  
-  SwigClassGeometryCollection.klass = rb_define_class_under(mGeos, "GeometryCollection", ((swig_class *) SWIGTYPE_p_GeosGeometry->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosGeometryCollection, (void *) &SwigClassGeometryCollection);
-  rb_undef_alloc_func(SwigClassGeometryCollection.klass);
-  rb_define_method(SwigClassGeometryCollection.klass, "get_geometry_n", VALUEFUNC(_wrap_GeometryCollection_get_geometry_n), -1);
-  SwigClassGeometryCollection.mark = 0;
-  SwigClassGeometryCollection.destroy = (void (*)(void *)) free_GeosGeometryCollection;
-  SwigClassGeometryCollection.trackObjects = 0;
-  
-  SwigClassMultiPoint.klass = rb_define_class_under(mGeos, "MultiPoint", ((swig_class *) SWIGTYPE_p_GeosGeometryCollection->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosMultiPoint, (void *) &SwigClassMultiPoint);
-  rb_undef_alloc_func(SwigClassMultiPoint.klass);
-  SwigClassMultiPoint.mark = 0;
-  SwigClassMultiPoint.destroy = (void (*)(void *)) free_GeosMultiPoint;
-  SwigClassMultiPoint.trackObjects = 0;
-  
-  SwigClassMultiLineString.klass = rb_define_class_under(mGeos, "MultiLineString", ((swig_class *) SWIGTYPE_p_GeosGeometryCollection->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosMultiLineString, (void *) &SwigClassMultiLineString);
-  rb_undef_alloc_func(SwigClassMultiLineString.klass);
-  SwigClassMultiLineString.mark = 0;
-  SwigClassMultiLineString.destroy = (void (*)(void *)) free_GeosMultiLineString;
-  SwigClassMultiLineString.trackObjects = 0;
-  
-  SwigClassMultiLinearRing.klass = rb_define_class_under(mGeos, "MultiLinearRing", ((swig_class *) SWIGTYPE_p_GeosGeometryCollection->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosMultiLinearRing, (void *) &SwigClassMultiLinearRing);
-  rb_undef_alloc_func(SwigClassMultiLinearRing.klass);
-  SwigClassMultiLinearRing.mark = 0;
-  SwigClassMultiLinearRing.destroy = (void (*)(void *)) free_GeosMultiLinearRing;
-  SwigClassMultiLinearRing.trackObjects = 0;
-  
-  SwigClassMultiPolygon.klass = rb_define_class_under(mGeos, "MultiPolygon", ((swig_class *) SWIGTYPE_p_GeosGeometryCollection->clientdata)->klass);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosMultiPolygon, (void *) &SwigClassMultiPolygon);
-  rb_undef_alloc_func(SwigClassMultiPolygon.klass);
-  SwigClassMultiPolygon.mark = 0;
-  SwigClassMultiPolygon.destroy = (void (*)(void *)) free_GeosMultiPolygon;
-  SwigClassMultiPolygon.trackObjects = 0;
-  rb_define_module_function(mGeos, "create_point", VALUEFUNC(_wrap_create_point), -1);
-  rb_define_module_function(mGeos, "create_line_string", VALUEFUNC(_wrap_create_line_string), -1);
-  rb_define_module_function(mGeos, "create_linear_ring", VALUEFUNC(_wrap_create_linear_ring), -1);
-  rb_define_module_function(mGeos, "create_polygon", VALUEFUNC(_wrap_create_polygon), -1);
-  
-  SwigClassPrepared.klass = rb_define_class_under(mGeos, "Prepared", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosPreparedGeometry, (void *) &SwigClassPrepared);
-  rb_define_alloc_func(SwigClassPrepared.klass, _wrap_Prepared_allocate);
-  rb_define_method(SwigClassPrepared.klass, "initialize", VALUEFUNC(_wrap_new_Prepared), -1);
-  rb_define_method(SwigClassPrepared.klass, "contains?", VALUEFUNC(_wrap_Prepared_containsq___), -1);
-  rb_define_method(SwigClassPrepared.klass, "contains_properly?", VALUEFUNC(_wrap_Prepared_contains_properlyq___), -1);
-  rb_define_method(SwigClassPrepared.klass, "covers?", VALUEFUNC(_wrap_Prepared_coversq___), -1);
-  rb_define_method(SwigClassPrepared.klass, "intersects?", VALUEFUNC(_wrap_Prepared_intersectsq___), -1);
-  SwigClassPrepared.mark = 0;
-  SwigClassPrepared.destroy = (void (*)(void *)) free_GeosPreparedGeometry;
-  SwigClassPrepared.trackObjects = 0;
-  
-  SwigClassSTRtree.klass = rb_define_class_under(mGeos, "STRtree", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosSTRtree, (void *) &SwigClassSTRtree);
-  rb_define_alloc_func(SwigClassSTRtree.klass, _wrap_STRtree_allocate);
-  rb_define_method(SwigClassSTRtree.klass, "initialize", VALUEFUNC(_wrap_new_STRtree), -1);
-  rb_define_method(SwigClassSTRtree.klass, "insert", VALUEFUNC(_wrap_STRtree_insert), -1);
-  rb_define_method(SwigClassSTRtree.klass, "remove", VALUEFUNC(_wrap_STRtree_remove), -1);
-  rb_define_method(SwigClassSTRtree.klass, "query", VALUEFUNC(_wrap_STRtree_query), -1);
-  rb_define_method(SwigClassSTRtree.klass, "each", VALUEFUNC(_wrap_STRtree_each), -1);
-  SwigClassSTRtree.mark = (void (*)(void *)) mark_GeosSTRtree;
-  SwigClassSTRtree.destroy = (void (*)(void *)) free_GeosSTRtree;
-  SwigClassSTRtree.trackObjects = 0;
-  
-  SwigClassWktReader.klass = rb_define_class_under(mGeos, "WktReader", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosWktReader, (void *) &SwigClassWktReader);
-  rb_define_alloc_func(SwigClassWktReader.klass, _wrap_WktReader_allocate);
-  rb_define_method(SwigClassWktReader.klass, "initialize", VALUEFUNC(_wrap_new_WktReader), -1);
-  rb_define_method(SwigClassWktReader.klass, "read", VALUEFUNC(_wrap_WktReader_read), -1);
-  SwigClassWktReader.mark = 0;
-  SwigClassWktReader.destroy = (void (*)(void *)) free_GeosWktReader;
-  SwigClassWktReader.trackObjects = 0;
-  
-  SwigClassWktWriter.klass = rb_define_class_under(mGeos, "WktWriter", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosWktWriter, (void *) &SwigClassWktWriter);
-  rb_define_alloc_func(SwigClassWktWriter.klass, _wrap_WktWriter_allocate);
-  rb_define_method(SwigClassWktWriter.klass, "initialize", VALUEFUNC(_wrap_new_WktWriter), -1);
-  rb_define_method(SwigClassWktWriter.klass, "write", VALUEFUNC(_wrap_WktWriter_write), -1);
-  SwigClassWktWriter.mark = 0;
-  SwigClassWktWriter.destroy = (void (*)(void *)) free_GeosWktWriter;
-  SwigClassWktWriter.trackObjects = 0;
-  
-  SwigClassWkbReader.klass = rb_define_class_under(mGeos, "WkbReader", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosWkbReader, (void *) &SwigClassWkbReader);
-  rb_define_alloc_func(SwigClassWkbReader.klass, _wrap_WkbReader_allocate);
-  rb_define_method(SwigClassWkbReader.klass, "initialize", VALUEFUNC(_wrap_new_WkbReader), -1);
-  rb_define_method(SwigClassWkbReader.klass, "read", VALUEFUNC(_wrap_WkbReader_read), -1);
-  rb_define_method(SwigClassWkbReader.klass, "read_hex", VALUEFUNC(_wrap_WkbReader_read_hex), -1);
-  SwigClassWkbReader.mark = 0;
-  SwigClassWkbReader.destroy = (void (*)(void *)) free_GeosWkbReader;
-  SwigClassWkbReader.trackObjects = 0;
-  
-  SwigClassWkbWriter.klass = rb_define_class_under(mGeos, "WkbWriter", rb_cObject);
-  SWIG_TypeClientData(SWIGTYPE_p_GeosWkbWriter, (void *) &SwigClassWkbWriter);
-  rb_define_alloc_func(SwigClassWkbWriter.klass, _wrap_WkbWriter_allocate);
-  rb_define_method(SwigClassWkbWriter.klass, "initialize", VALUEFUNC(_wrap_new_WkbWriter), -1);
-  rb_define_method(SwigClassWkbWriter.klass, "output_dimensions", VALUEFUNC(_wrap_WkbWriter_output_dimensions), -1);
-  rb_define_method(SwigClassWkbWriter.klass, "output_dimensions=", VALUEFUNC(_wrap_WkbWriter_output_dimensionse___), -1);
-  rb_define_method(SwigClassWkbWriter.klass, "byte_order", VALUEFUNC(_wrap_WkbWriter_byte_order), -1);
-  rb_define_method(SwigClassWkbWriter.klass, "byte_order=", VALUEFUNC(_wrap_WkbWriter_byte_ordere___), -1);
-  rb_define_method(SwigClassWkbWriter.klass, "include_srid", VALUEFUNC(_wrap_WkbWriter_include_srid), -1);
-  rb_define_method(SwigClassWkbWriter.klass, "include_srid=", VALUEFUNC(_wrap_WkbWriter_include_sride___), -1);
-  rb_define_method(SwigClassWkbWriter.klass, "write", VALUEFUNC(_wrap_WkbWriter_write), -1);
-  rb_define_method(SwigClassWkbWriter.klass, "write_hex", VALUEFUNC(_wrap_WkbWriter_write_hex), -1);
-  SwigClassWkbWriter.mark = 0;
-  SwigClassWkbWriter.destroy = (void (*)(void *)) free_GeosWkbWriter;
-  SwigClassWkbWriter.trackObjects = 0;
-}
-
diff --git a/swig/ruby/ruby.i b/swig/ruby/ruby.i
deleted file mode 100644
index 16f03a9..0000000
--- a/swig/ruby/ruby.i
+++ /dev/null
@@ -1,176 +0,0 @@
-/* =========================================================================
- * Copyright 2005-2007 Charlie Savage, cfis at interserv.com
- *
- * Interface for a SWIG generated geos module.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation. 
- * See the COPYING file for more information.
- *
- * ========================================================================= */
-
-%rename("dimensions") GeosCoordinateSequence::getDimensions;
-
-%rename("srid") GeosGeometry::getSRID;
-%rename("srid=") GeosGeometry::setSRID;
-%rename("envelope") GeosGeometry::getEnvelope;
-
-%rename("read_hex") GeosWkbReader::readHEX;
-%rename("write_hex") GeosWkbWriter::writeHEX;
-%rename("output_dimensions") GeosWkbWriter::getOutputDimension;
-%rename("output_dimensions=") GeosWkbWriter::setOutputDimension;
-%rename("byte_order") GeosWkbWriter::getByteOrder;
-%rename("byte_order=") GeosWkbWriter::setByteOrder;
-%rename("include_srid") GeosWkbWriter::getIncludeSRID;
-%rename("include_srid=") GeosWkbWriter::setIncludeSRID;
-
-%rename("__len__") GeosCoordinateSequence::getSize;
-
-%rename("coord_seq") GeosPoint::getCoordSeq;
-%rename("coord_seq") GeosLineString::getCoordSeq;
-%rename("coord_seq") GeosLinearRing::getCoordSeq;
-
-%rename("exterior_ring") GeosPolygon::getExteriorRing;
-%rename("num_interior_rings") GeosPolygon::getNumInteriorRings;
-%rename("interior_ring_n") GeosPolygon::getInteriorRingN;
-
-// Use predicates to make the ruby code nicer  - so disjoint?
-%predicate GeosGeometry::disjoint;
-%predicate GeosGeometry::touches;
-%predicate GeosGeometry::intersects;
-%predicate GeosGeometry::crosses;
-%predicate GeosGeometry::within;
-%predicate GeosGeometry::contains;
-%predicate GeosGeometry::overlaps;
-
-// Use ruby naming conventions for equals
-%rename("eql?") GeosGeometry::equals;
-%alias GeosGeometry::equals "==";
-%rename("eql_exact?") GeosGeometry::equalsExact;
-%rename("dimensions") GeosGeometry::getDimensions;
-%rename("num_geometries") GeosGeometry::getNumGeometries;
-
-
-%rename("centroid") GeosGeometry::getCentroid;
-%alias GeosGeometry::getCentroid "center"
-
-%rename("empty?") GeosGeometry::isEmpty;
-%rename("valid?") GeosGeometry::isValid;
-%rename("simple?") GeosGeometry::isSimple;
-%rename("ring?") GeosGeometry::isRing;
-%rename("has_z?") GeosGeometry::hasZ;
-
-/* Convert a Ruby array of GeosLinearRings to a C array. */
-%typemap(in,numinputs=1) (GeosLinearRing **holes, size_t nholes)
-{
-    if (NIL_P($input))
-    {
-        $1 = NULL;
-        $2 = 0;
-    }
-    else
-    {
-        /* Make sure the input can be treated as an array. */
-        Check_Type($input, T_ARRAY);
-
-        /* Get the length */
-        $2 = RARRAY_LEN($input);
-      
-        /* Allocate space for the C array. */
-        $1 = (GeosLinearRing**) malloc($2*sizeof(GeosLinearRing*));
-      
-        for(size_t i = 0; i<$2; i++)
-        {
-            /* Get the Ruby Object */
-            VALUE item = rb_ary_entry($input,i);
-
-            /* Get the underlying pointer and give up ownership of it. */
-            GeosLinearRing *ring = NULL;
-            int convertResult = SWIG_ConvertPtr(item, (void**)&ring, $descriptor(GeosLinearRing*), SWIG_POINTER_DISOWN);
-            if (!SWIG_IsOK(convertResult)) {
-                SWIG_exception_fail(SWIG_ArgError(convertResult), "in method '" "createPolygon" "', argument " "1"" of type '" "GeosLinearRing *""'");
-            }
-
-            /* Put the pointer in the array */
-            $1[i] = ring;
-        }    
-    }
-}
-
-%typemap(freearg)  (GeosLinearRing **holes, size_t nholes)
-{
-  if ($1) {
-    free((void*) $1);
-  }
-}
-
-// GeosPreparedGeometry
-// Use predicates to make the ruby code nicer  - so disjoint?
-%rename("contains_properly?") GeosPreparedGeometry::containsProperly;
-%predicate GeosPreparedGeometry::contains;
-%predicate GeosPreparedGeometry::intersects;
-%predicate GeosPreparedGeometry::covers;
-
-// GeosSTRtree
-
-%rename("each") GeosSTRtree::iterate;
-
-%typemap(in) GeosIndexItem
-{
-    $1 = (GeosIndexItem) $input;
-}
-
-/* accumulator will be blissfully unused because
- * Ruby supports closures, more or less */
-%typemap(in,numinputs=0) (GeosIndexItem accumulator)
-{
-    $1 = (GeosIndexItem) Qnil;
-}
-
-/* typecheck GeosIndexItem and make sure it's really a VALUE */
-%typemap(typecheck) GeosIndexItem
-{
-    $1 = (TYPE($input) & T_MASK) ? 1 : 0;
-}
-
-/* always call the provided block as the query callback */
-%typemap(in,numinputs=0) GeosQueryCallback
-{
-    $1 = GeosSTRtree_query_callback;
-}
-
-%typemap(typecheck) GeosQueryCallback
-{
-    /* SWIG throws a warning if we don't do this */
-    $1 = 1;
-}
-
-%{
-    /* this callback yields the data item to the block */
-    static void GeosSTRtree_query_callback (void *data, void *nothing) {
-        if (rb_block_given_p()) {
-            rb_yield((VALUE) data);
-        }
-    }
-%}
-
-/* assuming that GeosIndexItems are all VALUEs (since this gets tested
- * on typemap(in)), mark them during the mark phase of GC to hang on to them */
-%{
-    static void GeosSTRtree_mark_item (void *data, void *nothing)
-    {
-        if ((VALUE) data != Qnil) {
-            rb_gc_mark((VALUE)data);
-        }
-    }
-
-    static void mark_GeosSTRtree(void *self)
-    {
-        GEOSSTRtree *tree = (GEOSSTRtree *) self;
-        GEOSSTRtree_iterate(tree, GeosSTRtree_mark_item, NULL);
-    }
-%}
-
-%markfunc GeosSTRtree "mark_GeosSTRtree";
-
diff --git a/swig/ruby/test/Makefile.am b/swig/ruby/test/Makefile.am
deleted file mode 100644
index c28e0ab..0000000
--- a/swig/ruby/test/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# This file is part of project GEOS (http://trac.osgeo.org/geos/) 
-#
-#geos_tests.rb runs the full Ruby geos test suite
-#
-RUBY_TESTS = \
-	example.rb \
-	geos_tests.rb \
-	test_buffer.rb \
-	test_combinations.rb \
-	test_coordinate_sequence.rb \
-	test_envelope.rb \
-	test_geometry.rb \
-	test_helper.rb \
-	test_io.rb \
-	test_operations.rb \
-	test_relations.rb \
-	test_srid.rb \
-	test_version.rb
-
-EXTRA_DIST = $(RUBY_TESTS)
-
-test:
-	$(RUBY) geos_tests.rb
diff --git a/swig/ruby/test/example.rb b/swig/ruby/test/example.rb
deleted file mode 100644
index ef59815..0000000
--- a/swig/ruby/test/example.rb
+++ /dev/null
@@ -1,419 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-require 'stringio'
-
-class TestGeos < Test::Unit::TestCase
-  def setup
-    @geom_factory = Geos::GeometryFactory.new()
-  end
-  
-  def create_coord(x, y)
-    Geos::Coordinate.new(x, y)
-  end
-
-  def test_create_coord
-    coord = create_coord(5,6)
-    assert_equal(5, coord.x)
-    assert_equal(6, coord.y)
-  end
-    
-  def create_point(x, y)
-    coord = create_coord(x, y)
-    @geom_factory.create_point(coord)
-  end
-  
-  def test_create_point
-    point = create_point(5,6)
-    assert_equal(5, point.x)
-    assert_equal(6, point.y)
-  end
-
-  def create_ushaped_linestring(xoffset, yoffset, side)
-    # We will use a coordinate list to build the linestring
-    cl = Geos::DefaultCoordinateSequence.new()
-    cl.add(Geos::Coordinate.new(xoffset, yoffset))
-    cl.add(Geos::Coordinate.new(xoffset, yoffset+side))
-    cl.add(Geos::Coordinate.new(xoffset+side, yoffset+side))
-    cl.add(Geos::Coordinate.new(xoffset+side, yoffset))
-
-    # Now that we have a CoordinateSequence we can create the linestring.
-    # The newly created LineString will take ownership of the CoordinateSequence.
-    # @geom_factory.create_line_string!(cl)
-
-    # This is what you do if you want the new LineString
-    # to make a copy of your CoordinateSequence:
-     @geom_factory.create_line_string(cl)
-  end
-    
-  # This function will create a LinearRing geometry
-  # representing a square with the given origin and side 
-  def create_square_linearring(xoffset, yoffset, side)
-    #  We will use a coordinate list to build the linearring
-    cl = Geos::DefaultCoordinateSequence.new()
-    cl.add(Geos::Coordinate.new(xoffset, yoffset))
-    cl.add(Geos::Coordinate.new(xoffset, yoffset+side))
-    cl.add(Geos::Coordinate.new(xoffset+side, yoffset+side))
-    cl.add(Geos::Coordinate.new(xoffset+side, yoffset))
-    cl.add(Geos::Coordinate.new(xoffset, yoffset))
-
-    # Create the line string The newly created LinearRing will
-    # take ownership of the CoordinateSequence.
-    #@geom_factory.create_linear_ring!(cl)
-
-    # To make a copy of your CoordinateSequence
-    @geom_factory.create_linear_ring(cl)
-  end
-
-  def create_square_polygon(xoffset, yoffset, side)
-    # This function will create a Polygon
-    # geometry rapresenting a square with the given origin 
-    # and side and with a central hole 1/3 sided.
-
-    # We need a LinearRing for the polygon shell 
-    outer = create_square_linearring(xoffset,yoffset,side);
-
-    # And another for the hole 
-    inner = create_square_linearring(xoffset+(side/3), yoffset+(side/3),(side/3));
-  
-    # Specify hole as vector of Geometries
-    holes = Geos::GeometryVector.new()
-
-    # Add the newly created geometry to the vector of holes.
-    holes.push(inner)
-
-    # Finally we call the polygon constructor. Both the outer LinearRing 
-    # and the vector of holes will be referenced by the resulting
-    # Polygon object.
-    poly = @geom_factory.create_polygon(outer, holes)
-  end
-  
-  def create_simple_collection(geoms)
-    # To transfer ownership of the vector and its
-    # elements you can do this
-    #@geom_factory.create_geometry_collection!(geoms)
-
-    # This function creates a GeometryCollection
-    # containing copies of all Geometries in given vector.
-    @geom_factory.create_geometry_collection(geoms)
-  end
-
-  def create_circle(centerX, centerY, radius)
-    # Use a GeometricShapeFactory to render
-    # a circle having the specified center and radius
-
-    shapefactory = Geos::GeometricShapeFactory.new(@geom_factory)
-    shapefactory.set_centre(Geos::Coordinate.new(centerX, centerY))
-    shapefactory.set_size(radius);
-    # same as:
-    #   shapefactory.set_height(radius)
-    #   shapefactory.set_width(radius)
-    
-    shapefactory.create_circle()
-  end
-
-  def create_ellipse(centerX, centerY, width, height)
-    # Use a GeometricShapeFactory to render
-    # a circle having the specified center and radius
-
-    shapefactory = Geos::GeometricShapeFactory.new(@geom_factory)
-    shapefactory.set_centre(Geos::Coordinate.new(centerX, centerY))
-    shapefactory.set_height(width)
-    shapefactory.set_width(height)
-    
-    shapefactory.create_circle()
-  end
-
-  def create_rectangle(llX, llY, width, height)
-    # This function uses GeometricShapeFactory to render
-    # a rectangle having lower-left corner at given coordinates
-    # and given sizes.
-
-    shapefactory = Geos::GeometricShapeFactory.new(@geom_factory)
-    shapefactory.set_base(Geos::Coordinate.new(llX, llY))
-    shapefactory.set_height(height)
-    shapefactory.set_width(width)
-    
-    # we don't need more then 4 points for a rectangle...
-    shapefactory.set_num_points(4)
-    # can use setSize for a square
-    shapefactory.create_rectangle()
-  end
-  
-  def create_arc(llX, llY, width, height, startang, endang)
-    # This function uses GeometricShapeFactory to render
-    # an arc having lower-left corner at given coordinates,
-    # given sizes and given angles. 
-
-    shapefactory = Geos::GeometricShapeFactory.new(@geom_factory)
-    shapefactory.set_base(Geos::Coordinate.new(llX, llY))
-    shapefactory.set_height(height)
-    shapefactory.set_width(width)
-    # the default (100 pts)
-    shapefactory.set_num_points(100)
-    
-    shapefactory.create_arc(startang, endang)
-  end
-  
-  def create_geoms
-    geoms = Geos::GeometryVector.new()
-
-    # Define a precision model using 0,0 as the reference origin
-    # and 2.0 as coordinates scale.
-    pm = Geos::PrecisionModel.new(2.0, 0, 0)
-
-    # Initialize global factory with defined PrecisionModel
-    # and a SRID of -1 (undefined).
-    global_factory = Geos::GeometryFactory.new(pm, -1)
-
-    geoms.push(create_point(150, 350))
-    geoms.push(create_ushaped_linestring(60,60,100))
-    geoms.push(create_square_linearring(0,0,100))
-    geoms.push(create_square_polygon(0,200,300))
-#   geoms.push(create_simple_collection(geoms))
-
-    geoms.push(create_circle(0, 0, 10))
-    geoms.push(create_ellipse(0, 0, 8, 12))
-    ## A square
-    geoms.push(create_rectangle(-5, -5, 10, 10))
-    ## A rectangle
-    geoms.push(create_rectangle(-5, -5, 10, 20))
-    ## The upper-right quarter of a vertical ellipse
-    geoms.push(create_arc(0, 0, 10, 20, 0, Math::PI/2))
-
-    return geoms
-  end
-  
-  def test_wkb()
-    # This function tests writing and reading geometries to
-    # the well-known binary format
-
-    geoms = create_geoms()
-    
-    wkb_writer = Geos::WKBWriter.new()
-    wkb_reader = Geos::WKBReader.new(@geom_factory)
-
-    STDOUT << "\n" << "-------- TESTING WKB OUTPUT ----------" << "\n"
-    geoms.each do |geom_in|
-      value = wkb_writer.write(geom_in)
-      geom_out = wkb_reader.read(value);
-
-      # Geometries should be equal
-      assert(geom_out.equals(geom_in))
-
-      # Check precision model
-      geom_in.normalize()
-      geom_out.normalize()
-
-      # This seems to always fail
-      #assert_equal(0, geom_in.compare_to(geom_out))
-
-      # Print out a hex value
-      STDOUT << Geos::WKBReader.print_hex(value) << "\n"
-    end
-    STDOUT << "\n"
-  end
-  
-  def print_wkt(geoms, message)
-    ## This function will print given geometries in WKT
-    ## format to stdout.
-
-    wkt_writer = Geos::WKTWriter.new()
-
-    STDOUT << "\n" << "-------- #{message} ----------" << "\n"
-    geoms.each do |geom_in|
-      puts wkt_writer.write(geom_in)
-    end
-    STDOUT << "\n"
-  end
-
-  def test_wkt()
-    ## This function will print given geometries in WKT
-    ## format to stdout.
-
-    geoms = create_geoms()
-
-    print_wkt(geoms, "BASE GEOMS")
-  end
-
-  def test_operation(message, &block)
-    # First find the centroid of each base geometry
-    new_geoms = Geos::GeometryVector.new()
-
-    geoms = create_geoms()
-
-    geoms.each do |geom|
-      new_geoms.push(yield(geom))
-    end
-
-    # Print results
-    print_wkt(new_geoms, message)
-  end
-
-  def test_centroid()
-    test_operation("CENTROIDS") do |geom|
-      geom.get_centroid()
-    end
-  end
-
-  def test_buffer()
-    test_operation("BUFFERS") do |geom|
-      geom.buffer(10)
-    end
-  end
-  
-  def test_convex_hull()
-    test_operation("CONVEX HULL") do |geom|
-      geom.convex_hull()
-    end
-  end
-
-  def test_relational_operation(message, &block)
-    STDOUT << "\n" << "-------- #{message} ----------" << "\n"
-
-    geoms = create_geoms()
-
-    geoms.each do |geom1|
-      geoms.each do |geom2|
-        result = yield(geom1, geom2)
-        if result
-          STDOUT << " 1\t"
-        else
-          STDOUT << " 0\t"
-        end
-      end
-    end
-    
-    STDOUT << "\n"
-  end
-
-  def test_disjoint()
-    test_relational_operation("DISJOINT") do |geom1, geom2|
-      geom1.disjoint(geom2)
-    end
-  end
-
-  def test_touches()
-    test_relational_operation("TOUCHES") do |geom1, geom2|
-      geom1.touches(geom2)
-    end
-  end
-  
-  def test_intersects()
-    test_relational_operation("INTERSECTS") do |geom1, geom2|
-      geom1.intersects(geom2)
-    end
-  end
-  
-  def test_crosses()
-    test_relational_operation("CROSSES") do |geom1, geom2|
-      geom1.touches(geom2)
-    end
-  end
-  
-  def test_within()
-    test_relational_operation("WITHIN") do |geom1, geom2|
-      geom1.touches(geom2)
-    end
-  end
-  
-  def test_contains()
-    test_relational_operation("CONTAINS") do |geom1, geom2|
-      geom1.contains(geom2)
-    end
-  end
-  
-  def test_overlaps()
-    test_relational_operation("OVERLAPS") do |geom1, geom2|
-      geom1.overlaps(geom2)
-    end
-  end
-  
-  def test_relate()
-    test_relational_operation("RELATE") do |geom1, geom2|
-      geom1.relate(geom2, "212101212")
-    end
-  end
-
-  def test_equals()
-    test_relational_operation("EQUALS") do |geom1, geom2|
-      geom1.equals(geom2)
-    end
-  end
-  
-  def test_equals_exact()
-    test_relational_operation("EQUALS EXACT") do |geom1, geom2|
-      geom1.equals_exact(geom2)
-    end
-  end
-
-  def test_is_within_distance()
-    test_relational_operation("IS WITHIN DISTANCE") do |geom1, geom2|
-      geom1.is_within_distance(geom2, 2)
-    end
-  end
-
-  
-  def test_combination(message, &block)
-    puts "#{message}  GGGGGGGGGGGGGG"
-    STDOUT.flush()
-    geoms = create_geoms()
-
-    geoms.each do |geom1|
-      puts "1: #{geom1}"
-      STDOUT.flush()
-      geoms.each do |geom2|
-        puts "2: #{geom2}"
-        STDOUT.flush()
-        result = yield(geom1, geom2)
-        puts "result: #{result}"
-        STDOUT.flush()
-      end
-    end
-
-    print_wkt(geoms, message)
-  end
-
-  def test_union()
-    test_combination("UNION") do |geom1, geom2|
-      geom1.union(geom2)
-    end
-  end
-
-  def test_intersection()
-    test_combination("INTERSECTION") do |geom1, geom2|
-      geom1.intersection(geom2)
-    end
-  end
-  
-  def test_difference()
-    test_combination("DIFFERENCE") do |geom1, geom2|
-      geom1.difference(geom2)
-    end
-  end
-  
-  def test_symdifference()
-    test_combination("SYMDIFFERENCE") do |geom1, geom2|
-      geom1.sym_difference(geom2)
-    end
-  end
-
-  def test_line_merge()
-    geoms = create_geoms()
-    merger = Geos::LineMerger.new()
-
-    merger.add(geoms)
-    new_geoms = merger.get_merged_line_strings()
-    print_wkt(new_geoms, "LINE MERGE")
-  end
-
-  def test_polygonize()
-    geoms = create_geoms()
-    polygonizer = Geos::Polygonizer.new()
-
-    polygonizer.add(geoms)
-    new_geoms = polygonizer.get_polygons()
-    print_wkt(new_geoms, "POLYGONIZE")
-  end
-end
\ No newline at end of file
diff --git a/swig/ruby/test/geos_tests.rb b/swig/ruby/test/geos_tests.rb
deleted file mode 100644
index 0f6ec56..0000000
--- a/swig/ruby/test/geos_tests.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# Runs the test cases that have been developed for GEOS
-
-require 'test_buffer'
-require 'test_combinations'
-require 'test_coordinate_sequence'
-# require 'test_envelope' - No longer exposed in c api.
-require 'test_geometry'
-require 'test_io'
-require 'test_operations'
-require 'test_relations'
-require 'test_srid'
-require 'test_version'
diff --git a/swig/ruby/test/test_buffer.rb b/swig/ruby/test/test_buffer.rb
deleted file mode 100644
index 93bdda3..0000000
--- a/swig/ruby/test/test_buffer.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-require 'test_helper'
-
-class TestBuffer < Test::Unit::TestCase
-  def setup
-    @test_helper = GeosTestHelper.new()
-  end
-  
-  def test_xml_cases
-    cases = @test_helper.load_tests("buffer.xml")
-    
-    cases.each do |test_case|
-      geom = test_case.geom1
-      tolerance = test_case.arg3.to_f
-      expected = @test_helper.parse_geometry(test_case.expected)
-      expected.normalize
-      
-      result = geom.buffer(tolerance, 8)
-      result.normalize
-      
-      writer = Geos::WktWriter.new
-      geom_wkt = writer.write(geom)
-      expected_wkt = writer.write(expected)
-      result_wkt = writer.write(result)
-      
-      assert(expected.eql_exact?(result, 0.00000000001),
-             "Buffer:\n" + 
-             "  Case: #{test_case.case_id}\n" + 
-             "  Test: #{test_case.test_id}\n" + 
-             "  Geom: #{geom_wkt}\n" + 
-             "  Tolerance: #{tolerance}\n" + 
-             "  Expected: #{expected_wkt}.\n" + 
-             "    Actual: #{result_wkt}")
-    end
-  end    
-end
-
-
-
diff --git a/swig/ruby/test/test_combinations.rb b/swig/ruby/test/test_combinations.rb
deleted file mode 100644
index ccac9ef..0000000
--- a/swig/ruby/test/test_combinations.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-require 'test_helper'
-
-class TestGeosCombinations < Test::Unit::TestCase
-  def setup
-    @test_helper = GeosTestHelper.new()
-  end
-  
-  def run_combination(message, &block)
-    STDOUT << "\n" << "-------- #{message} COMBINATION  ------" << "\n"
-    STDOUT.flush()
-
-    geoms = @test_helper.create_geoms()
-    new_geoms = Array.new()
-    
-    geoms.each do |geom1|
-      geoms.each do |geom2|
-        begin
-          # Get the actual result from the provided block
-          result = yield(geom1, geom2)
-          new_geoms.push(result)
-     #     puts result
-        # Geometry Collection is not a valid argument
-        rescue RuntimeError => error
-          # This is ok
-        end
-      end
-    end
-  end
-
-  def test_union()
-    run_combination("UNION") do |geom1, geom2|
-      geom1.union(geom2)
-    end
-  end
-
-  def test_intersection()
-    run_combination("INTERSECTION") do |geom1, geom2|
-      geom1.intersection(geom2)
-    end
-  end
-  
-  def test_difference()
-    run_combination("DIFFERENCE") do |geom1, geom2|
-      geom1.difference(geom2)
-    end
-  end
-  
-  def test_symdifference()
-    run_combination("SYMDIFFERENCE") do |geom1, geom2|
-      geom1.sym_difference(geom2)
-    end
-  end
-end
\ No newline at end of file
diff --git a/swig/ruby/test/test_coordinate_sequence.rb b/swig/ruby/test/test_coordinate_sequence.rb
deleted file mode 100644
index 1bd2e79..0000000
--- a/swig/ruby/test/test_coordinate_sequence.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-
-
-class TestWkbReader < Test::Unit::TestCase
-  def test_create
-    cs = Geos::CoordinateSequence.new(5,2)
-    assert_instance_of(Geos::CoordinateSequence, cs)
-  end
-  
-  def test_size
-    cs = Geos::CoordinateSequence.new(7,2)
-    assert_equal(7, cs.length)
-  end
- 
-  def test_getter_setter
-    cs = Geos::CoordinateSequence.new(2,3)
-    cs.set_x(0, 3)
-    cs.set_y(0, 4)
-    cs.set_z(0, 5)
-    cs.set_x(1, 6)
-    cs.set_y(1, 7)
-    cs.set_z(1, 8)
-    assert_equal(3, cs.get_x(0))
-    assert_equal(4, cs.get_y(0))
-    assert_equal(5, cs.get_z(0))
-    assert_equal(6, cs.get_x(1))
-    assert_equal(7, cs.get_y(1))
-    assert_equal(8, cs.get_z(1))
-  end
-
-  def test_index_out_of_bounds
-    cs = Geos::CoordinateSequence.new(2,3)
-    assert_raise(RuntimeError) do 
-      cs.set_x(2, 6)
-    end
-    assert_raise(RuntimeError) do 
-      cs.set_y(2, 6)
-    end
-    assert_raise(RuntimeError) do 
-      cs.set_z(2, 6)
-    end
-  end
-
-  def test_ordinate
-    cs = Geos::CoordinateSequence.new(1,3)
-    cs.set_ordinate(0, 0, 2)
-    cs.set_ordinate(0, 1, 3)
-    cs.set_ordinate(0, 2, 4)
-    
-    assert_equal(2, cs.get_ordinate(0, 0))
-    assert_equal(3, cs.get_ordinate(0, 1))
-    assert_equal(4, cs.get_ordinate(0, 2))
-  end
- 
-  def test_clone
-    cs1 = Geos::CoordinateSequence.new(1,3)
-    cs1.set_x(0, 2)
-    cs1.set_y(0, 3)
-    cs1.set_y(0, 4)
-    
-    cs2 = cs1.clone
-    
-    assert(!cs1.equal?(cs2))
-    assert(2, cs2.get_x(0))
-    assert(3, cs2.get_y(0))
-    assert(4, cs2.get_z(0))
-    
-    cs2.set_x(0, 5)
-    cs2.set_y(0, 6)
-    cs2.set_y(0, 7)
-    
-    assert(2, cs1.get_x(0))
-    assert(3, cs1.get_y(0))
-    assert(4, cs1.get_z(0))
-
-    assert(5, cs2.get_x(0))
-    assert(6, cs2.get_y(0))
-    assert(7, cs2.get_z(0))
-  end
-
-  def test_dimensions
-    cs = Geos::CoordinateSequence.new(1,3)
-    assert_equal(3, cs.dimensions)
-  end
-end
\ No newline at end of file
diff --git a/swig/ruby/test/test_envelope.rb b/swig/ruby/test/test_envelope.rb
deleted file mode 100644
index 28a343f..0000000
--- a/swig/ruby/test/test_envelope.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-
-# NOTE - These tests are no longer valid with the C-API
-
-class TestGeosEnvelope < Test::Unit::TestCase
-  def check(envelope)
-    assert_equal(5, envelope.get_min_x())
-    assert_equal(6, envelope.get_min_y())
-    assert_equal(10, envelope.get_max_x())
-    assert_equal(11, envelope.get_max_y())
-  end
-  
-  def test_from_coords
-    min_coord = Geos::Coordinate.new(5,6)
-    max_coord = Geos::Coordinate.new(10, 11)
-
-    envelope = Geos::Envelope.new(min_coord, max_coord)
-    check(envelope)
-  end
-  
-  def test_from_values
-    envelope = Geos::Envelope.new(5, 10, 6, 11)
-    check(envelope)
-  end
-  
-  def test_serialize
-    out_envelope = Geos::Envelope.new(5, 10, 6, 11)
-    str = out_envelope.to_string()
-
-    in_envelope = Geos::Envelope.new(str)
-    check(in_envelope)
-    assert(out_envelope.equals(in_envelope))
-  end
-
-  def test_to_s
-    envelope = Geos::Envelope.new(5, 10, 6, 11)
-    string = envelope.to_s
-
-    assert_equal("<Geos::Envelope Env[5:10,6:11]>", string)
-  end
-end
\ No newline at end of file
diff --git a/swig/ruby/test/test_geometry.rb b/swig/ruby/test/test_geometry.rb
deleted file mode 100644
index 5e5d415..0000000
--- a/swig/ruby/test/test_geometry.rb
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-
-
-class TestGeometry < Test::Unit::TestCase
-  def test_create_point
-    cs = Geos::CoordinateSequence.new(1,3)
-    cs.set_x(0, 7)
-    cs.set_y(0, 8)
-    cs.set_z(0, 9)
-    
-    geom = Geos::create_point(cs)
-    assert_instance_of(Geos::Point, geom)
-    assert_equal('Point', geom.geom_type)
-    assert_equal(Geos::GEOS_POINT, geom.type_id)
-    
-    assert(!geom.empty?)
-    assert(geom.valid?)
-    assert(geom.simple?)
-    assert(!geom.ring?)
-    assert(geom.has_z?)
-    
-    assert_equal(1, geom.num_geometries)
-
-    coords = geom.coord_seq
-    assert_instance_of(Geos::CoordinateSequence, coords)
-    assert_equal(7, coords.get_x(0))
-    assert_equal(8, coords.get_y(0))
-    assert_equal(9, coords.get_z(0))
-    
-    assert_in_delta(0, geom.area, 0.01)
-    assert_in_delta(0, geom.length, 0.01)
-  end
-  
-  def test_create_point_illegal
-    cs = Geos::CoordinateSequence.new(0, 0)
-    
-    assert_raise(RuntimeError) do
-      geom = Geos::create_point(cs)
-    end
-  end
-  
-  def test_create_line_string
-    cs = Geos::CoordinateSequence.new(2,3)
-    cs.set_x(0, 7)
-    cs.set_y(0, 8)
-    cs.set_z(0, 9)
-    cs.set_x(1, 3)
-    cs.set_y(1, 3)
-    cs.set_z(1, 3)
-    
-    geom = Geos::create_line_string(cs)
-    assert_instance_of(Geos::LineString, geom)
-    assert_equal('LineString', geom.geom_type)
-    assert_equal(Geos::GEOS_LINESTRING, geom.type_id)
-    
-    assert(!geom.empty?)
-    assert(geom.valid?)
-    assert(geom.simple?)
-    assert(!geom.ring?)
-    assert(geom.has_z?)
-    
-    assert_equal(1, geom.num_geometries)
-    
-    coords = geom.coord_seq
-    assert_instance_of(Geos::CoordinateSequence, coords)
-    assert_equal(7, coords.get_x(0))
-    assert_equal(8, coords.get_y(0))
-    assert_equal(9, coords.get_z(0))
-    assert_equal(3, coords.get_x(1))
-    assert_equal(3, coords.get_y(1))
-    assert_equal(3, coords.get_z(1))
-    
-    assert_in_delta(0, geom.area, 0.01)
-    assert_in_delta(6.40312423743285, geom.length, 0.01)
-  end
-  
-  def test_create_line_string_illegal
-    cs = Geos::CoordinateSequence.new(1,0)
-    
-    assert_raise(RuntimeError) do
-      geom = Geos::create_line_string(cs)
-    end
-  end
-  
-  def test_create_linear_ring
-    cs = Geos::CoordinateSequence.new(4,3)
-    cs.set_x(0, 7)
-    cs.set_y(0, 8)
-    cs.set_z(0, 9)
-    cs.set_x(1, 3)
-    cs.set_y(1, 3)
-    cs.set_z(1, 3)
-    cs.set_x(2, 11)
-    cs.set_y(2, 15.2)
-    cs.set_z(2, 2)
-    cs.set_x(3, 7)
-    cs.set_y(3, 8)
-    cs.set_z(3, 9)
-    
-    geom = Geos::create_linear_ring(cs)
-    assert_instance_of(Geos::LinearRing, geom)
-    assert_equal('LinearRing', geom.geom_type)
-    assert_equal(Geos::GEOS_LINEARRING, geom.type_id)
-    
-    assert(!geom.empty?)
-    assert(geom.valid?)
-    assert(geom.simple?)
-    assert(geom.ring?)
-    assert(geom.has_z?)
-    
-    assert_equal(1, geom.num_geometries)
-
-    coords = geom.coord_seq
-    assert_instance_of(Geos::CoordinateSequence, coords)
-    assert_equal(7, coords.get_x(0))
-    assert_equal(8, coords.get_y(0))
-    assert_equal(9, coords.get_z(0))
-    assert_equal(3, coords.get_x(1))
-    assert_equal(3, coords.get_y(1))
-    assert_equal(3, coords.get_z(1))
-    assert_equal(11, coords.get_x(2))
-    assert_equal(15.2, coords.get_y(2))
-    assert_equal(2, coords.get_z(2))
-    assert_equal(7, coords.get_x(3))
-    assert_equal(8, coords.get_y(3))
-    assert_equal(9, coords.get_z(3))
-    
-    assert_in_delta(0, geom.area, 0.01)
-    assert_in_delta(29.228665330092, geom.length, 0.01)
-  end
-  
-  def test_create_linear_ring_illegal
-    cs = Geos::CoordinateSequence.new(1,0)
-    
-    assert_raise(RuntimeError) do
-      geom = Geos::create_linear_ring(cs)
-    end
-  end
-  
-  def test_create_polygon
-    # Polygon shell
-    cs = Geos::CoordinateSequence.new(5,2)
-    cs.set_x(0, 0)
-    cs.set_y(0, 0)
-
-    cs.set_x(1, 0)
-    cs.set_y(1, 10)
-    
-    cs.set_x(2, 10)
-    cs.set_y(2, 10)
-    
-    cs.set_x(3, 10)
-    cs.set_y(3, 0)
-    
-    cs.set_x(4, 0)
-    cs.set_y(4, 0)
-    shell = Geos::create_linear_ring(cs)
-    
-    geom = Geos::create_polygon(shell)
-    assert_instance_of(Geos::Polygon, geom)
-    assert_equal('Polygon', geom.geom_type)
-    assert_equal(Geos::GEOS_POLYGON, geom.type_id)
-    
-    assert(!geom.empty?)
-    assert(geom.valid?)
-    assert(geom.simple?)
-    assert(!geom.ring?)
-    assert(geom.has_z?)
-    
-    assert_equal(1, geom.num_geometries)
-    
-    exterior_ring = geom.exterior_ring()
-    assert(shell.eql?(exterior_ring))
-    assert_equal(0, geom.num_interior_rings)
-    
-    assert_raise(RuntimeError) do
-      assert_equal(0, geom.interior_ring_n(1))
-    end
-    
-    assert_in_delta(100, geom.area, 0.01)
-    assert_in_delta(40, geom.length, 0.01)
-  end
-  
-  def test_create_polygon_with_holes
-    # Polygon shell
-    cs = Geos::CoordinateSequence.new(5,2)
-    cs.set_x(0, 0)
-    cs.set_y(0, 0)
-
-    cs.set_x(1, 0)
-    cs.set_y(1, 10)
-    
-    cs.set_x(2, 10)
-    cs.set_y(2, 10)
-    
-    cs.set_x(3, 10)
-    cs.set_y(3, 0)
-    
-    cs.set_x(4, 0)
-    cs.set_y(4, 0)
-    shell = Geos::create_linear_ring(cs)
-    
-    # Hole 1
-    cs = Geos::CoordinateSequence.new(5,2)
-    cs.set_x(0, 2)
-    cs.set_y(0, 2)
-
-    cs.set_x(1, 2)
-    cs.set_y(1, 4)
-    
-    cs.set_x(2, 4)
-    cs.set_y(2, 4)
-    
-    cs.set_x(3, 4)
-    cs.set_y(3, 2)
-    
-    cs.set_x(4, 2)
-    cs.set_y(4, 2)
-    hole1 = Geos::create_linear_ring(cs)
-    
-    # Hole 2
-    cs = Geos::CoordinateSequence.new(5,2)
-    cs.set_x(0, 6)
-    cs.set_y(0, 6)
-
-    cs.set_x(1, 6)
-    cs.set_y(1, 8)
-    
-    cs.set_x(2, 8)
-    cs.set_y(2, 8)
-    
-    cs.set_x(3, 8)
-    cs.set_y(3, 6)
-    
-    cs.set_x(4, 6)
-    cs.set_y(4, 6)
-    hole2 = Geos::create_linear_ring(cs)
-    
-    geom = Geos::create_polygon(shell, [hole1, hole2])
-    assert_instance_of(Geos::Polygon, geom)
-    assert_equal('Polygon', geom.geom_type)
-    assert_equal(Geos::GEOS_POLYGON, geom.type_id)
-    
-    assert(!geom.empty?)
-    assert(geom.valid?)
-    assert(geom.simple?)
-    assert(!geom.ring?)
-    assert(geom.has_z?)
-    
-    assert_equal(1, geom.num_geometries)
-    
-    exterior_ring = geom.exterior_ring()
-    assert(shell.eql?(exterior_ring))
-    
-    assert_equal(2, geom.num_interior_rings)
-    assert(hole1.eql?(geom.interior_ring_n(0)))
-    assert(hole2.eql?(geom.interior_ring_n(1)))
-    
-    assert_in_delta(92, geom.area, 0.01)
-    assert_in_delta(56, geom.length, 0.01)
-  end
-  
-  
-  def test_distance
-    cs = Geos::CoordinateSequence.new(1,2)
-    cs.set_x(0, 0)
-    cs.set_y(0, 0)
-    geom1 = Geos::create_point(cs)
-
-    cs = Geos::CoordinateSequence.new(1,2)
-    cs.set_x(0, 3)
-    cs.set_y(0, 4)
-    geom2 = Geos::create_point(cs)
-    
-    assert_equal(5, geom1.distance(geom2))
-  end
-end  
diff --git a/swig/ruby/test/test_helper.rb b/swig/ruby/test/test_helper.rb
deleted file mode 100644
index 648288e..0000000
--- a/swig/ruby/test/test_helper.rb
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'geos'
-require "rexml/document"
-
-XmlTest = Struct.new(:case_id, :test_id,
-                     :operation, :expected,
-                     :geom1, :geom2, 
-                     :arg1, :arg2, :arg3)
-
-class GeosTestHelper
-
-  def create_point(x, y)
-    cs = Geos::CoordinateSequence.new(1,2)
-    cs.set_x(0, x)
-    cs.set_y(0, y)
-    Geos.create_point(cs)
-  end
-  
-  def create_ushaped_linestring(xoffset, yoffset, side)
-    cs = Geos::CoordinateSequence.new(4,2)
-    cs.set_x(0, xoffset)
-    cs.set_y(0, yoffset)
-    cs.set_x(1, xoffset)
-    cs.set_y(1, yoffset + side)
-    cs.set_x(2, xoffset + side)
-    cs.set_y(2, yoffset + side)
-    cs.set_x(3, xoffset + side)
-    cs.set_y(3, yoffset)
-    Geos.create_line_string(cs)
-  end
-    
-  # This function will create a LinearRing geometry
-  # representing a square with the given origin and side 
-  def create_square_linear_ring(xoffset, yoffset, side)
-    cs = Geos::CoordinateSequence.new(5,2)
-    cs.set_x(0, xoffset)
-    cs.set_y(0, yoffset)
-    cs.set_x(1, xoffset)
-    cs.set_y(1, yoffset + side)
-    cs.set_x(2, xoffset + side)
-    cs.set_y(2, yoffset + side)
-    cs.set_x(3, xoffset + side)
-    cs.set_y(3, yoffset)
-    cs.set_x(4, xoffset)
-    cs.set_y(4, yoffset)
-    Geos.create_linear_ring(cs)
-  end
-
-  # This function will create a Polygon
-  # geometry representing a square with the given origin 
-  # and side and with a central hole 1/3 sided.
-  def create_square_polygon(xoffset, yoffset, side)
-    # We need a LinearRing for the polygon shell 
-    outer = create_square_linear_ring(xoffset,yoffset,side);
-
-    # And another for the hole 
-    inner = create_square_linear_ring(xoffset+(side/3), yoffset+(side/3),(side/3));
-  
-    Geos.create_polygon(outer, [inner])
-  end
-  
-  def create_simple_collection(geoms)
-    # This function creates a GeometryCollection
-    # containing copies of all Geometries in given vector.
-    #@geom_factory.create_geometry_collection(geoms)
-    wkt = "GEOMETRYCOLLECTION (POLYGON ((0.00 250.00, 0.00 550.00, 300.00 550.00, 300.00 250.00, 0.00 250.00), (100.00 350.00, 200.00 350.00, 200.00 450.00, 100.00 450.00, 100.00 350.00)), POLYGON ((0.00 200.00, 0.00 500.00, 300.00 500.00, 300.00 200.00, 0.00 200.00), (100.00 300.00, 200.00 300.00, 200.00 400.00, 100.00 400.00, 100.00 300.00)), LINEARRING (0.00 0.00, 0.00 100.00, 100.00 100.00, 100.00 0.00, 0.00 0.00), LINEARRING (0.00 0.00, 0.00 100.00, 100.00 100.00, 100.00 0.00, 0.00 0.00), LINESTRING (60.00 60.00, 60.00 160.00, 160.00 160.00, 160.00 60.00), POINT (150.00 350.00))"
-    reader = Geos::WktReader.new
-    reader.read(wkt)
-  end
-
-  def create_circle(centerX, centerY, radius)
-    # Use a GeometricShapeFactory to render
-    # a circle having the specified center and radius
-
-    #shapefactory = Geos::GeometricShapeFactory.new(@geom_factory)
-    #shapefactory.set_centre(Geos::Coordinate.new(centerX, centerY))
-    #shapefactory.set_size(radius);
-    # same as:
-    #   shapefactory.set_height(radius)
-    #   shapefactory.set_width(radius)
-    
-    #shapefactory.create_circle()
-    wkt = "POLYGON ((-5.00 0.00, -4.99 0.31, -4.96 0.63, -4.91 0.94, -4.84 1.24, -4.76 1.55, -4.65 1.84, -4.52 2.13, -4.38 2.41, -4.22 2.68, -4.05 2.94, -3.85 3.19, -3.64 3.42, -3.42 3.64, -3.19 3.85, -2.94 4.05, -2.68 4.22, -2.41 4.38, -2.13 4.52, -1.84 4.65, -1.55 4.76, -1.24 4.84, -0.94 4.91, -0.63 4.96, -0.31 4.99, 0.00 5.00, 0.31 4.99, 0.63 4.96, 0.94 4.91, 1.24 4.84, 1.55 4.76, 1.84 4.65, 2.13 4.52, 2.41 4.38, 2.68 4.22, 2.94 4.05, 3.19 3.85, 3.42 3.64, 3.64 3.42, 3.85 3.19, 4.05 2.94, 4.22 2.68, 4.38 2.41, 4.52 2.13, 4.65 1.84, 4.76 1.55, 4.84 1.24, 4.91 0.94, 4.96 0.63, 4.99 0.31, 5.00 0.00, 4.99 -0.31, 4.96 -0.63, 4.91 -0.94, 4.84 -1.24, 4.76 -1.55, 4.65 -1.84, 4.52 -2.13, 4.38 -2.41, 4.22 -2.68, 4.05 -2.94, 3.85 -3.19, 3.64 -3.42, 3.42 -3.64, 3.19 -3.85, 2.94 -4.05, 2.68 -4.22, 2.41 -4.38, 2.13 -4.52, 1.84 -4.65, 1.55 -4.76, 1.24 -4.84, 0.94 -4.91, 0.63 -4.96, 0.31 -4.99, -0.00 -5.00, -0.31 -4.99, -0.63 -4.96, -0.94 -4.91, -1.24 -4.84, -1.55 -4.76, -1.84 -4.65, -2.13 -4.52
 , -2.41 -4.38, -2.68 -4.22, -2.94 -4.05, -3.19 -3.85, -3.42 -3.64, -3.64 -3.42, -3.85 -3.19, -4.05 -2.94, -4.22 -2.68, -4.38 -2.41, -4.52 -2.13, -4.65 -1.84, -4.76 -1.55, -4.84 -1.24, -4.91 -0.94, -4.96 -0.63, -4.99 -0.31, -5.00 0.00))"
-    reader = Geos::WktReader.new
-    reader.read(wkt)
-  end
-
-  def create_ellipse(centerX, centerY, width, height)
-    # Use a GeometricShapeFactory to render
-    # a circle having the specified center and radius
-
-    #shapefactory = Geos::GeometricShapeFactory.new(@geom_factory)
-    #shapefactory.set_centre(Geos::Coordinate.new(centerX, centerY))
-    #shapefactory.set_height(width)
-    #shapefactory.set_width(height)
-    
-    #shapefactory.create_circle()
-    wkt = "POLYGON ((-4.00 0.00, -3.99 0.38, -3.97 0.75, -3.93 1.12, -3.87 1.49, -3.80 1.85, -3.72 2.21, -3.62 2.55, -3.51 2.89, -3.38 3.21, -3.24 3.53, -3.08 3.82, -2.92 4.11, -2.74 4.37, -2.55 4.62, -2.35 4.85, -2.14 5.07, -1.93 5.26, -1.70 5.43, -1.47 5.58, -1.24 5.71, -0.99 5.81, -0.75 5.89, -0.50 5.95, -0.25 5.99, 0.00 6.00, 0.25 5.99, 0.50 5.95, 0.75 5.89, 0.99 5.81, 1.24 5.71, 1.47 5.58, 1.70 5.43, 1.93 5.26, 2.14 5.07, 2.35 4.85, 2.55 4.62, 2.74 4.37, 2.92 4.11, 3.08 3.82, 3.24 3.53, 3.38 3.21, 3.51 2.89, 3.62 2.55, 3.72 2.21, 3.80 1.85, 3.87 1.49, 3.93 1.12, 3.97 0.75, 3.99 0.38, 4.00 0.00, 3.99 -0.38, 3.97 -0.75, 3.93 -1.12, 3.87 -1.49, 3.80 -1.85, 3.72 -2.21, 3.62 -2.55, 3.51 -2.89, 3.38 -3.21, 3.24 -3.53, 3.08 -3.82, 2.92 -4.11, 2.74 -4.37, 2.55 -4.62, 2.35 -4.85, 2.14 -5.07, 1.93 -5.26, 1.70 -5.43, 1.47 -5.58, 1.24 -5.71, 0.99 -5.81, 0.75 -5.89, 0.50 -5.95, 0.25 -5.99, -0.00 -6.00, -0.25 -5.99, -0.50 -5.95, -0.75 -5.89, -0.99 -5.81, -1.24 -5.71, -1.47 -5.58, -1.70 -5.43
 , -1.93 -5.26, -2.14 -5.07, -2.35 -4.85, -2.55 -4.62, -2.74 -4.37, -2.92 -4.11, -3.08 -3.82, -3.24 -3.53, -3.38 -3.21, -3.51 -2.89, -3.62 -2.55, -3.72 -2.21, -3.80 -1.85, -3.87 -1.49, -3.93 -1.12, -3.97 -0.75, -3.99 -0.38, -4.00 0.00))"
-    reader = Geos::WktReader.new
-    reader.read(wkt)
-  end
-
-  def create_rectangle(llX, llY, width, height)
-    # This function uses GeometricShapeFactory to render
-    # a rectangle having lower-left corner at given coordinates
-    # and given sizes.
-
-    #shapefactory = Geos::GeometricShapeFactory.new(@geom_factory)
-    #shapefactory.set_base(Geos::Coordinate.new(llX, llY))
-    #shapefactory.set_height(height)
-    #shapefactory.set_width(width)
-    
-    # we don't need more then 4 points for a rectangle...
-    #shapefactory.set_num_points(4)
-    # can use setSize for a square
-    #shapefactory.create_rectangle()
-    wkt = "POLYGON ((#{llX} #{llY}, #{llX} #{llY + height}, #{llX+width} #{llY+height}, #{llX+width} #{llY}, #{llX} #{llY}))"
-    reader = Geos::WktReader.new
-    reader.read(wkt)
-  end
-  
-  def create_arc(llX, llY, width, height, startang, endang)
-    # This function uses GeometricShapeFactory to render
-    # an arc having lower-left corner at given coordinates,
-    # given sizes and given angles. 
-
-    #shapefactory = Geos::GeometricShapeFactory.new(@geom_factory)
-    #shapefactory.set_base(Geos::Coordinate.new(llX, llY))
-    #shapefactory.set_height(height)
-    #shapefactory.set_width(width)
-    # the default (100 pts)
-    #shapefactory.set_num_points(100)
-    
-    #shapefactory.create_arc(startang, endang)
-    wkt = "LINESTRING (5.00 20.00, 5.00 20.00, 5.00 20.00, 5.50 20.00, 5.50 20.00, 5.50 20.00, 5.50 20.00, 5.50 20.00, 5.50 20.00, 6.00 20.00, 6.00 20.00, 6.00 20.00, 6.00 20.00, 6.00 20.00, 6.00 19.50, 6.00 19.50, 6.50 19.50, 6.50 19.50, 6.50 19.50, 6.50 19.50, 6.50 19.50, 6.50 19.50, 7.00 19.50, 7.00 19.50, 7.00 19.00, 7.00 19.00, 7.00 19.00, 7.00 19.00, 7.00 19.00, 7.50 19.00, 7.50 19.00, 7.50 19.00, 7.50 18.50, 7.50 18.50, 7.50 18.50, 7.50 18.50, 7.50 18.50, 8.00 18.50, 8.00 18.00, 8.00 18.00, 8.00 18.00, 8.00 18.00, 8.00 18.00, 8.00 17.50, 8.00 17.50, 8.50 17.50, 8.50 17.50, 8.50 17.50, 8.50 17.00, 8.50 17.00, 8.50 17.00, 8.50 17.00, 8.50 16.50, 9.00 16.50, 9.00 16.50, 9.00 16.50, 9.00 16.50, 9.00 16.00, 9.00 16.00, 9.00 16.00, 9.00 16.00, 9.00 15.50, 9.00 15.50, 9.00 15.50, 9.50 15.00, 9.50 15.00, 9.50 15.00, 9.50 15.00, 9.50 14.50, 9.50 14.50, 9.50 14.50, 9.50 14.50, 9.50 14.00, 9.50 14.00, 9.50 14.00, 9.50 13.50, 9.50 13.50, 9.50 13.50, 9.50 13.00, 10.00 13.00, 10.00 13.00, 
 10.00 13.00, 10.00 12.50, 10.00 12.50, 10.00 12.50, 10.00 12.00, 10.00 12.00, 10.00 12.00, 10.00 11.50, 10.00 11.50, 10.00 11.50, 10.00 11.50, 10.00 11.00, 10.00 11.00, 10.00 11.00, 10.00 10.50, 10.00 10.50, 10.00 10.50, 10.00 10.00, 10.00 10.00)"
-    reader = Geos::WktReader.new
-    reader.read(wkt)
-  end
-  
-  def create_geoms
-    geoms = Array.new
-
-    geoms.push(create_point(150, 350))
-    geoms.push(create_square_linear_ring(0,0,100))
-    geoms.push(create_ushaped_linestring(60,60,100))
-    geoms.push(create_square_linear_ring(0,0,100))
-    geoms.push(create_square_polygon(0,200,300))
-    geoms.push(create_square_polygon(0,250,300))
-    geoms.push(create_simple_collection(geoms))
-
-    # These ones use a GeometricShapeFactory
-    geoms.push(create_circle(0, 0, 10))
-    geoms.push(create_ellipse(0, 0, 8, 12))
-    # A square
-    geoms.push(create_rectangle(-5, -5, 10, 10))
-    # A rectangle
-    geoms.push(create_rectangle(-5, -5, 10, 20))
-    # The upper-right quarter of a vertical ellipse
-    geoms.push(create_arc(0, 0, 10, 20, 0, Math::PI/2))
-
-    return geoms
-  end
-  
-  def print_geoms(geoms)
-    geoms.each do |geom|
-      wkt = Geos.geom_to_wkt(geom)
-      STDOUT << wkt << "\n"
-    end
-  end 
-  
-  # ----- xml support ---------
-  def load_tests(file_name) 
-    current_path = File.expand_path(__FILE__)
-    xml_path = File.join(current_path, "..", "..", "..", "..", "tests", "xmltester")
-    file_path = File.expand_path(File.join(xml_path, file_name))
-    
-    file = File.new(file_path)
-    result = nil
-    begin
-      doc = REXML::Document.new(file)
-      result = load_cases(doc)
-    ensure
-      file.close
-    end
-    result 
-  end
-  
-  def parse_geometry(value)
-    value.strip!
-    
-    if value.match(/\A[0-9A-F]/)
-      reader = Geos::WkbReader.new
-      reader.read_hex(value)
-    else
-      reader = Geos::WktReader.new
-      reader.read(value)
-    end
-  end
-  
-  def load_cases(doc)
-    case_id = 1
-    result = Array.new
-    
-    # get the run element
-    run_element = doc.elements["run"]
-    
-    # Iterate over each case
-    run_element.elements.each("case") do |case_element|
-      test_id = 1
-      # Get geometry a
-      a_element = case_element.elements["a"]
-      geom1 = parse_geometry(a_element.text) if a_element
-
-      # Get geometry b
-      b_element = case_element.elements["b"]
-      geom2 = parse_geometry(b_element.text) if b_element
-
-      # Iterate over each test in this case
-      case_element.elements.each("test") do |test_element|
-        operation_element = test_element.elements["op"]
-
-        # Get operation name and result
-        operation = operation_element.attributes['name'].strip!
-        expected = operation_element.text.strip!
-        
-        # Figure arguments
-        arg1 = operation_element.attributes['arg1']
-        arg2 = operation_element.attributes['arg2']
-        arg3 = operation_element.attributes['arg3']
-        
-        arg1.strip! if arg1
-        arg2.strip! if arg2
-        arg3.strip! if arg3
-        
-        # Create test
-        test = XmlTest.new(case_id, test_id,
-                           operation, expected,
-                           geom1, geom2,
-                           arg1, arg2, arg3)
-        result.push(test)
-        test_id += 1
-      end      
-      case_id += 1
-    end  
-    result
-  end
-end 
\ No newline at end of file
diff --git a/swig/ruby/test/test_io.rb b/swig/ruby/test/test_io.rb
deleted file mode 100644
index 51937de..0000000
--- a/swig/ruby/test/test_io.rb
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-
-
-class TestIo < Test::Unit::TestCase
-  
-  def check(wkt, ndr_hex_in, xdr_hex_in)
-    wkt_reader = Geos::WktReader.new
-    geom1 = wkt_reader.read(wkt)
-    
-    wkb_reader = Geos::WkbReader.new
-    geom2 = wkb_reader.read_hex(ndr_hex_in)
-    geom3 = wkb_reader.read_hex(xdr_hex_in)
-  
-    assert(geom1.eql?(geom2)) 
-    assert(geom1.eql?(geom3))
-    assert(geom2.eql?(geom3))
-
-    wkb_writer = Geos::WkbWriter.new
-    wkb_writer.byte_order = Geos::GEOS_WKB_NDR
-    ndr_hex_out = wkb_writer.write_hex(geom1)
-    assert_equal(ndr_hex_in, ndr_hex_out)
-
-    wkb_writer.byte_order = Geos::GEOS_WKB_XDR
-    xdr_hex_out = wkb_writer.write_hex(geom1)
-    assert_equal(xdr_hex_in, xdr_hex_out)
-    geom1
-  end
-
-  def test_output_dimensions
-    writer = Geos::WkbWriter.new
-    assert_equal(2, writer.output_dimensions)
-    
-    writer.output_dimensions = 3
-    assert_equal(3, writer.output_dimensions)
-  end
-  
-  def test_byte_order
-    writer = Geos::WkbWriter.new
-    assert_equal(Geos::GEOS_WKB_NDR, writer.byte_order)
-    
-    writer.byte_order = Geos::GEOS_WKB_XDR
-    assert_equal(Geos::GEOS_WKB_XDR, writer.byte_order)
-
-    writer.byte_order = Geos::GEOS_WKB_NDR
-    assert_equal(Geos::GEOS_WKB_NDR, writer.byte_order)
-  end
-  
-  def test_point
-    wkt = "POINT(0 0)"
-    ndr = "010100000000000000000000000000000000000000"
-    xdr = "000000000100000000000000000000000000000000"
-    
-    geom = check(wkt, ndr, xdr)
-    assert_instance_of(Geos::Point, geom)
-    assert_equal('Point', geom.geom_type)
-    assert_equal(Geos::GEOS_POINT, geom.type_id)
-  end
-
-  def test_line_string
-    wkt = "LINESTRING(1 2, 3 4)"
-    ndr = "010200000002000000000000000000F03F000000000000004000000000000008400000000000001040"
-    xdr = "0000000002000000023FF0000000000000400000000000000040080000000000004010000000000000"
-    
-    geom = check(wkt, ndr, xdr)
-    assert_instance_of(Geos::LineString, geom)
-    assert_equal('LineString', geom.geom_type)
-    assert_equal(Geos::GEOS_LINESTRING, geom.type_id)
-  end
-
-  def test_polygon
-    wkt = "POLYGON((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 2 6, 6 4, 2 2))"
-    ndr = "0103000000020000000500000000000000000000000000000000000000000000000000244000000000000000000000000000002440000000000000244000000000000000000000000000002440000000000000000000000000000000000400000000000000000000400000000000000040000000000000004000000000000018400000000000001840000000000000104000000000000000400000000000000040"
-    xdr = "0000000003000000020000000500000000000000000000000000000000402400000000000000000000000000004024000000000000402400000000000000000000000000004024000000000000000000000000000000000000000000000000000440000000000000004000000000000000400000000000000040180000000000004018000000000000401000000000000040000000000000004000000000000000"
-    
-    geom = check(wkt, ndr, xdr)
-    assert_instance_of(Geos::Polygon, geom)
-    assert_equal('Polygon', geom.geom_type)
-    assert_equal(Geos::GEOS_POLYGON, geom.type_id)
-  end
-
-  def test_multipoint
-    wkt = "MULTIPOINT(0 0, 10 0, 10 10, 0 10, 0 0)"
-    ndr = "010400000005000000010100000000000000000000000000000000000000010100000000000000000024400000000000000000010100000000000000000024400000000000002440010100000000000000000000000000000000002440010100000000000000000000000000000000000000"
-    xdr = "000000000400000005000000000100000000000000000000000000000000000000000140240000000000000000000000000000000000000140240000000000004024000000000000000000000100000000000000004024000000000000000000000100000000000000000000000000000000"
-    
-    geom = check(wkt, ndr, xdr)
-    assert_instance_of(Geos::MultiPoint, geom)
-    assert_equal('MultiPoint', geom.geom_type)
-    assert_equal(Geos::GEOS_MULTIPOINT, geom.type_id)
-  end
-
-  def test_multipoint
-    wkt = "MULTILINESTRING((0 0, 10 0, 10 10, 0 10, 10 20),(2 2, 2 6, 6 4, 20 2))"
-    ndr = "010500000002000000010200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000002440000000000000344001020000000400000000000000000000400000000000000040000000000000004000000000000018400000000000001840000000000000104000000000000034400000000000000040"
-    xdr = "000000000500000002000000000200000005000000000000000000000000000000004024000000000000000000000000000040240000000000004024000000000000000000000000000040240000000000004024000000000000403400000000000000000000020000000440000000000000004000000000000000400000000000000040180000000000004018000000000000401000000000000040340000000000004000000000000000"
-    
-    geom = check(wkt, ndr, xdr)
-    assert_instance_of(Geos::MultiPoint, geom)
-    assert_equal('MultiLineString', geom.geom_type)
-    assert_equal(Geos::GEOS_MULTILINESTRING, geom.type_id)
-  end
-
-  def test_multipoint
-    wkt = "MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 2 6, 6 4, 2 2)),((60 60, 60 50, 70 40, 60 60)))"
-    ndr = "0106000000020000000103000000020000000500000000000000000000000000000000000000000000000000244000000000000000000000000000002440000000000000244000000000000000000000000000002440000000000000000000000000000000000400000000000000000000400000000000000040000000000000004000000000000018400000000000001840000000000000104000000000000000400000000000000040010300000001000000040000000000000000004E400000000000004E400000000000004E400000000000004940000000000080514000000000000044400000000000004E400000000000004E40"
-    xdr = "000000000600000002000000000300000002000000050000000000000000000000000000000040240000000000000000000000000000402400000000000040240000000000000000000000000000402400000000000000000000000000000000000000000000000000044000000000000000400000000000000040000000000000004018000000000000401800000000000040100000000000004000000000000000400000000000000000000000030000000100000004404E000000000000404E000000000000404E000000000000404900000000000040518000000000004044000000000000404E000000000000404E000000000000"
-    
-    geom = check(wkt, ndr, xdr)
-    assert_instance_of(Geos::MultiPolygon, geom)
-    assert_equal('MultiPolygon', geom.geom_type)
-    assert_equal(Geos::GEOS_MULTIPOLYGON, geom.type_id)
-  end
-
-  def test_collection
-    wkt = "GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(1 2,3 4),POLYGON((0 0,10 0,10 10,0 10,0 0),(2 2,2 6,6 4,2 2)),MULTIPOINT(0 0,10 0,10 10,0 10,0 0),MULTILINESTRING((0 0,10 0,10 10,0 10,10 20),(2 2,2 6,6 4,20 2)),MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(2 2,2 6,6 4,2 2)),((60 60,60 50,70 40,60 60))))"
-    ndr = "010700000006000000010100000000000000000000000000000000000000010200000002000000000000000000F03F0000000000000040000000000000084000000000000010400103000000020000000500000000000000000000000000000000000000000000000000244000000000000000000000000000002440000000000000244000000000000000000000000000002440000000000000000000000000000000000400000000000000000000400000000000000040000000000000004000000000000018400000000000001840000000000000104000000000000000400000000000000040010400000005000000010100000000000000000000000000000000000000010100000000000000000024400000000000000000010100000000000000000024400000000000002440010100000000000000000000000000000000002440010100000000000000000000000000000000000000010500000002000000010200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000002440000000000000344001020000000400000000000000000000400000000000000040000000000000004000000000000018400000000000001840
 0000000000001040000000000000344000000000000000400106000000020000000103000000020000000500000000000000000000000000000000000000000000000000244000000000000000000000000000002440000000000000244000000000000000000000000000002440000000000000000000000000000000000400000000000000000000400000000000000040000000000000004000000000000018400000000000001840000000000000104000000000000000400000000000000040010300000001000000040000000000000000004E400000000000004E400000000000004E400000000000004940000000000080514000000000000044400000000000004E400000000000004E40"
-    xdr = "0000000007000000060000000001000000000000000000000000000000000000000002000000023FF00000000000004000000000000000400800000000000040100000000000000000000003000000020000000500000000000000000000000000000000402400000000000000000000000000004024000000000000402400000000000000000000000000004024000000000000000000000000000000000000000000000000000440000000000000004000000000000000400000000000000040180000000000004018000000000000401000000000000040000000000000004000000000000000000000000400000005000000000100000000000000000000000000000000000000000140240000000000000000000000000000000000000140240000000000004024000000000000000000000100000000000000004024000000000000000000000100000000000000000000000000000000000000000500000002000000000200000005000000000000000000000000000000004024000000000000000000000000000040240000000000004024000000000000000000000000000040240000000000004024000000000000403400000000000000000000020000000440000000000000004000000000000000400000000000000040180000000000004018000000000000
 401000000000000040340000000000004000000000000000000000000600000002000000000300000002000000050000000000000000000000000000000040240000000000000000000000000000402400000000000040240000000000000000000000000000402400000000000000000000000000000000000000000000000000044000000000000000400000000000000040000000000000004018000000000000401800000000000040100000000000004000000000000000400000000000000000000000030000000100000004404E000000000000404E000000000000404E000000000000404900000000000040518000000000004044000000000000404E000000000000404E000000000000"
-    
-    assert_raise(RuntimeError) do
-      geom = check(wkt, ndr, xdr)
-      assert_instance_of(Geos::MultiPolygon, geom)
-      assert_equal('Collection', geom.geom_type)
-      assert_equal(Geos::GEOS_COLLECTION, geom.type_id)
-    end
-  end
-  
-  def test_wkt_invalid
-    assert_raise(RuntimeError) do
-      reader = Geos::WktReader.new
-      geom = reader.read("invalid")
-    end
-  end
-  
-  def test_wkb_invalid
-    assert_raise(RuntimeError) do
-      reader = Geos::WkbReader.new
-      geom = reader.read("invalid")
-    end
-  end
-  
-  def test_hex_invalid
-    assert_raise(RuntimeError) do
-      reader = Geos::WkbReader.new
-      geom = reader.read_hex("invalid")
-    end
-  end
-end
\ No newline at end of file
diff --git a/swig/ruby/test/test_operations.rb b/swig/ruby/test/test_operations.rb
deleted file mode 100644
index 2ae1426..0000000
--- a/swig/ruby/test/test_operations.rb
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-require 'test_helper'
-
-class TestGeosOperations < Test::Unit::TestCase
-  def setup
-    @test_helper = GeosTestHelper.new()
-  end
-
-  def run_operation(results, &block)
-    geoms = @test_helper.create_geoms()
-
-    geoms.each_with_index do |geom_in, i|
-      # Get expected result
-      reader = Geos::WktReader.new
-      expected = reader.read(results[i])
-      
-      # Get the actual result
-      actual = yield(geom_in)
-      
-      writer = Geos::WktWriter.new
-
-      assert(actual.eql?(expected),
-             "    Geom: #{writer.write(geom_in)}
-              Expected: #{results[i]}
-                Actual: #{writer.write(actual)}")
-    end
-  end
-
-  def test_centroid()
-    results = Array.new()
-    results[0] = "POINT (150.0000000000000000 350.0000000000000000)"
-    results[1] = "POINT (50.0000000000000000 50.0000000000000000)"
-    results[2] = "POINT (110.0000000000000000 126.6666666666666700)"
-    results[3] = "POINT (50.0000000000000000 50.0000000000000000)"
-    results[4] = "POINT (150.0000000000000000 350.0000000000000000)"
-    results[5] = "POINT (150.0000000000000000 400.0000000000000000)"
-    results[6] = "POINT (150.0000000000000000 375.0000000000000000)"
-    results[7] = "POINT (0.0000000000000002 0.0000000000000001)"
-    results[8] = "POINT (-0.0000000000000002 0.0000000000000002)"
-    results[9] = "POINT (-0.0000000000000000 -0.0000000000000000)"
-    results[10] = "POINT (-0.0000000000000000 5.0000000000000000)"
-    results[11] = "POINT (8.5510137343037833 15.6700508986182890)"
-    
-    run_operation(results) do |geom|
-      geom.centroid()
-    end
-  end
-
-  def test_buffer()
-    results = Array.new()
-    results[0] = "POLYGON ((140.0000000000000000 349.9999999999999400, 140.1921471959676900 351.9509032201612500, 140.7612046748871300 353.8268343236508700, 141.6853038769745300 355.5557023301959700, 142.9289321881345000 357.0710678118654200, 144.4442976698039400 358.3146961230254400, 146.1731656763490700 359.2387953251128500, 148.0490967798386900 359.8078528040322800, 149.9999999999999700 360.0000000000000000, 151.9509032201612500 359.8078528040323400, 153.8268343236508700 359.2387953251129000, 155.5557023301960000 358.3146961230254400, 157.0710678118654500 357.0710678118654800, 158.3146961230254400 355.5557023301960300, 159.2387953251128500 353.8268343236509300, 159.8078528040323100 351.9509032201613100, 160.0000000000000000 350.0000000000000000, 159.8078528040323100 348.0490967798386900, 159.2387953251128700 346.1731656763491300, 158.3146961230254400 344.4442976698039700, 157.0710678118654800 342.9289321881345200, 155.5557023301960300 341.6853038769745600, 153.8268343236509000 34
 0.7612046748871500, 151.9509032201613100 340.1921471959677200, 150.0000000000000300 340.0000000000000000, 148.0490967798387500 340.1921471959676600, 146.1731656763491300 340.7612046748871500, 144.4442976698040000 341.6853038769745600, 142.9289321881345500 342.9289321881345200, 141.6853038769745600 344.4442976698039700, 140.7612046748871500 346.1731656763490700, 140.1921471959676900 348.0490967798386900, 140.0000000000000000 349.9999999999999400))"
-    results[1] = "POLYGON ((-10.0000000000000000 0.0000000000000012, -10.0000000000000000 100.0000000000000000, -9.8078528040323043 101.9509032201612800, -9.2387953251128678 103.8268343236509000, -8.3146961230254526 105.5557023301960300, -7.0710678118654746 107.0710678118654800, -5.5557023301960200 108.3146961230254600, -3.8268343236508970 109.2387953251128700, -1.9509032201612819 109.8078528040323100, 0.0000000000000000 110.0000000000000000, 100.0000000000000000 110.0000000000000000, 101.9509032201612800 109.8078528040323100, 103.8268343236509000 109.2387953251128700, 105.5557023301960300 108.3146961230254600, 107.0710678118654800 107.0710678118654800, 108.3146961230254600 105.5557023301960300, 109.2387953251128700 103.8268343236509000, 109.8078528040323100 101.9509032201612800, 110.0000000000000000 100.0000000000000000, 110.0000000000000000 0.0000000000000000, 109.8078528040323100 -1.9509032201612824, 109.2387953251128700 -3.8268343236508979, 108.3146961230254600 -5.55570233019602
 18, 107.0710678118654800 -7.0710678118654746, 105.5557023301960300 -8.3146961230254526, 103.8268343236509000 -9.2387953251128678, 101.9509032201612800 -9.8078528040323043, 100.0000000000000000 -10.0000000000000000, 0.0000000000000028 -10.0000000000000000, 0.0000000000000000 -10.0000000000000000, -0.2636355702920707 -9.9740341627070670, -1.9509032201612777 -9.8078528040323061, -1.9509032201612866 -9.8078528040323025, -1.9509032201612952 -9.8078528040323025, -2.7195138806188379 -9.5746973091972567, -3.8268343236508908 -9.2387953251128714, -3.8268343236509019 -9.2387953251128661, -3.8268343236509117 -9.2387953251128625, -4.3727926415072558 -8.9469745244536831, -5.5557023301960120 -8.3146961230254597, -5.5557023301960289 -8.3146961230254455, -5.5557023301960360 -8.3146961230254419, -6.2156195560843335 -7.7731160520364293, -7.0710678118654684 -7.0710678118654826, -7.0710678118654746 -7.0710678118654746, -7.0710678118654826 -7.0710678118654684, -7.4895965704289287 -6.5610890439959491, -8.
 3146961230254437 -5.5557023301960360, -8.3146961230254526 -5.5557023301960182, -8.3146961230254561 -5.5557023301960147, -8.5385013985309968 -5.1369921098608780, -9.2387953251128625 -3.8268343236509113, -9.2387953251128661 -3.8268343236508979, -9.2387953251128696 -3.8268343236508922, -9.4674344907501400 -3.0731120052845418, -9.8078528040323008 -1.9509032201613032, -9.8078528040323025 -1.9509032201612937, -9.8078528040323061 -1.9509032201612793, -9.9916266130197560 -0.0850164247318053, -10.0000000000000000 0.0000000000000000, -10.0000000000000000 0.0000000000000012), (10.0000000000000000 10.0000000000000000, 90.0000000000000000 10.0000000000000000, 90.0000000000000000 90.0000000000000000, 10.0000000000000000 90.0000000000000000, 10.0000000000000000 10.0000000000000000))"
-    results[2] = "POLYGON ((50.0000000000000000 60.0000000000000000, 50.0000000000000000 160.0000000000000000, 50.1921471959676920 161.9509032201612800, 50.7612046748871320 163.8268343236509000, 51.6853038769745440 165.5557023301960300, 52.9289321881345240 167.0710678118654800, 54.4442976698039800 168.3146961230254400, 56.1731656763491000 169.2387953251128700, 58.0490967798387200 169.8078528040323100, 60.0000000000000000 170.0000000000000000, 160.0000000000000000 170.0000000000000000, 161.9509032201612800 169.8078528040323100, 163.8268343236509000 169.2387953251128700, 165.5557023301960300 168.3146961230254400, 167.0710678118654800 167.0710678118654800, 168.3146961230254400 165.5557023301960300, 169.2387953251128700 163.8268343236509000, 169.8078528040323100 161.9509032201612800, 170.0000000000000000 160.0000000000000000, 170.0000000000000000 60.0000000000000000, 170.0000000000000000 59.9999999999999860, 169.8078528040323100 58.0490967798387060, 169.2387953251128700 56.1731656763490
 930, 168.3146961230254400 54.4442976698039730, 167.0710678118654800 52.9289321881345170, 165.5557023301960300 51.6853038769745440, 163.8268343236509000 50.7612046748871320, 161.9509032201612800 50.1921471959676920, 160.0000000000000000 50.0000000000000000, 158.0490967798387200 50.1921471959676920, 156.1731656763491000 50.7612046748871250, 154.4442976698040000 51.6853038769745440, 152.9289321881345200 52.9289321881345170, 151.6853038769745600 54.4442976698039660, 150.7612046748871300 56.1731656763490860, 150.1921471959676900 58.0490967798386990, 150.0000000000000000 60.0000000000000000, 150.0000000000000000 150.0000000000000000, 70.0000000000000000 150.0000000000000000, 70.0000000000000000 60.0000000000000000, 70.0000000000000000 59.9999999999999860, 69.8078528040323080 58.0490967798387060, 69.2387953251128610 56.1731656763490930, 68.3146961230254420 54.4442976698039730, 67.0710678118654760 52.9289321881345170, 65.5557023301960130 51.6853038769745440, 63.8268343236509000 50.761204674
 8871320, 61.9509032201612800 50.1921471959676920, 60.0000000000000000 50.0000000000000000, 58.0490967798387200 50.1921471959676920, 56.1731656763491070 50.7612046748871250, 54.4442976698039870 51.6853038769745440, 52.9289321881345320 52.9289321881345170, 51.6853038769745580 54.4442976698039660, 50.7612046748871390 56.1731656763490860, 50.1921471959676990 58.0490967798386990, 50.0000000000000000 60.0000000000000000))"
-    results[3] = "POLYGON ((-10.0000000000000000 0.0000000000000012, -10.0000000000000000 100.0000000000000000, -9.8078528040323043 101.9509032201612800, -9.2387953251128678 103.8268343236509000, -8.3146961230254526 105.5557023301960300, -7.0710678118654746 107.0710678118654800, -5.5557023301960200 108.3146961230254600, -3.8268343236508970 109.2387953251128700, -1.9509032201612819 109.8078528040323100, 0.0000000000000000 110.0000000000000000, 100.0000000000000000 110.0000000000000000, 101.9509032201612800 109.8078528040323100, 103.8268343236509000 109.2387953251128700, 105.5557023301960300 108.3146961230254600, 107.0710678118654800 107.0710678118654800, 108.3146961230254600 105.5557023301960300, 109.2387953251128700 103.8268343236509000, 109.8078528040323100 101.9509032201612800, 110.0000000000000000 100.0000000000000000, 110.0000000000000000 0.0000000000000000, 109.8078528040323100 -1.9509032201612824, 109.2387953251128700 -3.8268343236508979, 108.3146961230254600 -5.55570233019602
 18, 107.0710678118654800 -7.0710678118654746, 105.5557023301960300 -8.3146961230254526, 103.8268343236509000 -9.2387953251128678, 101.9509032201612800 -9.8078528040323043, 100.0000000000000000 -10.0000000000000000, 0.0000000000000028 -10.0000000000000000, 0.0000000000000000 -10.0000000000000000, -0.2636355702920707 -9.9740341627070670, -1.9509032201612777 -9.8078528040323061, -1.9509032201612866 -9.8078528040323025, -1.9509032201612952 -9.8078528040323025, -2.7195138806188379 -9.5746973091972567, -3.8268343236508908 -9.2387953251128714, -3.8268343236509019 -9.2387953251128661, -3.8268343236509117 -9.2387953251128625, -4.3727926415072558 -8.9469745244536831, -5.5557023301960120 -8.3146961230254597, -5.5557023301960289 -8.3146961230254455, -5.5557023301960360 -8.3146961230254419, -6.2156195560843335 -7.7731160520364293, -7.0710678118654684 -7.0710678118654826, -7.0710678118654746 -7.0710678118654746, -7.0710678118654826 -7.0710678118654684, -7.4895965704289287 -6.5610890439959491, -8.
 3146961230254437 -5.5557023301960360, -8.3146961230254526 -5.5557023301960182, -8.3146961230254561 -5.5557023301960147, -8.5385013985309968 -5.1369921098608780, -9.2387953251128625 -3.8268343236509113, -9.2387953251128661 -3.8268343236508979, -9.2387953251128696 -3.8268343236508922, -9.4674344907501400 -3.0731120052845418, -9.8078528040323008 -1.9509032201613032, -9.8078528040323025 -1.9509032201612937, -9.8078528040323061 -1.9509032201612793, -9.9916266130197560 -0.0850164247318053, -10.0000000000000000 0.0000000000000000, -10.0000000000000000 0.0000000000000012), (10.0000000000000000 10.0000000000000000, 90.0000000000000000 10.0000000000000000, 90.0000000000000000 90.0000000000000000, 10.0000000000000000 90.0000000000000000, 10.0000000000000000 10.0000000000000000))"
-    results[4] = "POLYGON ((-10.0000000000000000 200.0000000000000000, -10.0000000000000000 500.0000000000000000, -9.8078528040323043 501.9509032201613100, -9.2387953251128678 503.8268343236508700, -8.3146961230254526 505.5557023301960300, -7.0710678118654746 507.0710678118654800, -5.5557023301960200 508.3146961230254400, -3.8268343236508970 509.2387953251128500, -1.9509032201612819 509.8078528040322800, 0.0000000000000000 510.0000000000000000, 300.0000000000000000 510.0000000000000000, 301.9509032201613100 509.8078528040322800, 303.8268343236508700 509.2387953251128500, 305.5557023301960300 508.3146961230254400, 307.0710678118654800 507.0710678118654800, 308.3146961230254400 505.5557023301960300, 309.2387953251128500 503.8268343236508700, 309.8078528040322800 501.9509032201613100, 310.0000000000000000 500.0000000000000000, 310.0000000000000000 200.0000000000000000, 309.8078528040322800 198.0490967798387200, 309.2387953251128500 196.1731656763491000, 308.3146961230254400 194.4442976
 698039700, 307.0710678118654800 192.9289321881345200, 305.5557023301960300 191.6853038769745600, 303.8268343236508700 190.7612046748871300, 301.9509032201613100 190.1921471959676900, 300.0000000000000000 190.0000000000000000, 0.0000000000000000 190.0000000000000000, -0.0000000000000640 190.0000000000000000, -1.9509032201613388 190.1921471959677200, -3.8268343236509446 190.7612046748871500, -5.5557023301960582 191.6853038769745600, -7.0710678118654977 192.9289321881345500, -8.3146961230254668 194.4442976698040000, -9.2387953251128732 196.1731656763491300, -9.8078528040323061 198.0490967798387200, -10.0000000000000000 200.0000000000000000), (110.0000000000000000 310.0000000000000000, 190.0000000000000000 310.0000000000000000, 190.0000000000000000 390.0000000000000000, 110.0000000000000000 390.0000000000000000, 110.0000000000000000 310.0000000000000000))"
-    results[5] = "POLYGON ((-10.0000000000000000 250.0000000000000000, -10.0000000000000000 550.0000000000000000, -9.8078528040323043 551.9509032201613100, -9.2387953251128678 553.8268343236509300, -8.3146961230254526 555.5557023301960300, -7.0710678118654746 557.0710678118655300, -5.5557023301960200 558.3146961230254400, -3.8268343236508970 559.2387953251128500, -1.9509032201612819 559.8078528040323400, 0.0000000000000000 560.0000000000000000, 300.0000000000000000 560.0000000000000000, 301.9509032201613100 559.8078528040323400, 303.8268343236508700 559.2387953251128500, 305.5557023301960300 558.3146961230254400, 307.0710678118654800 557.0710678118654200, 308.3146961230254400 555.5557023301960300, 309.2387953251128500 553.8268343236509300, 309.8078528040322800 551.9509032201613100, 310.0000000000000000 550.0000000000000000, 310.0000000000000000 250.0000000000000000, 309.8078528040322800 248.0490967798387200, 309.2387953251128500 246.1731656763491000, 308.3146961230254400 244.4442976
 698039700, 307.0710678118654800 242.9289321881345200, 305.5557023301960300 241.6853038769745600, 303.8268343236508700 240.7612046748871300, 301.9509032201613100 240.1921471959676900, 300.0000000000000000 240.0000000000000000, 0.0000000000000000 240.0000000000000000, -0.0000000000000640 240.0000000000000000, -1.9509032201613388 240.1921471959677200, -3.8268343236509446 240.7612046748871500, -5.5557023301960582 241.6853038769745600, -7.0710678118654977 242.9289321881345500, -8.3146961230254668 244.4442976698040000, -9.2387953251128732 246.1731656763491300, -9.8078528040323061 248.0490967798387200, -10.0000000000000000 250.0000000000000000), (110.0000000000000000 360.0000000000000000, 190.0000000000000000 360.0000000000000000, 190.0000000000000000 440.0000000000000000, 110.0000000000000000 440.0000000000000000, 110.0000000000000000 360.0000000000000000))"
-    results[6] = "MULTIPOLYGON (((-10.0000000000000000 0.0000000000000000, -10.0000000000000000 0.0000000000000012, -10.0000000000000000 100.0000000000000000, -9.8078528040323043 101.9509032201612800, -9.2387953251128678 103.8268343236509000, -8.3146961230254526 105.5557023301960300, -7.0710678118654746 107.0710678118654800, -5.5557023301960200 108.3146961230254600, -3.8268343236508970 109.2387953251128700, -1.9509032201612819 109.8078528040323100, 0.0000000000000000 110.0000000000000000, 50.0000000000000000 110.0000000000000000, 50.0000000000000000 160.0000000000000000, 50.1921471959676920 161.9509032201612800, 50.7612046748871320 163.8268343236509000, 51.6853038769745440 165.5557023301960300, 52.9289321881345240 167.0710678118654800, 54.4442976698039800 168.3146961230254400, 56.1731656763491000 169.2387953251128700, 58.0490967798387200 169.8078528040323100, 60.0000000000000000 170.0000000000000000, 160.0000000000000000 170.0000000000000000, 161.9509032201612800 169.807852804032310
 0, 163.8268343236509000 169.2387953251128700, 165.5557023301960300 168.3146961230254400, 167.0710678118654800 167.0710678118654800, 168.3146961230254400 165.5557023301960300, 169.2387953251128700 163.8268343236509000, 169.8078528040323100 161.9509032201612800, 170.0000000000000000 160.0000000000000000, 170.0000000000000000 60.0000000000000000, 170.0000000000000000 59.9999999999999860, 169.8078528040323100 58.0490967798387060, 169.2387953251128700 56.1731656763490930, 168.3146961230254400 54.4442976698039730, 167.0710678118654800 52.9289321881345170, 165.5557023301960300 51.6853038769745440, 163.8268343236509000 50.7612046748871320, 161.9509032201612800 50.1921471959676920, 160.0000000000000000 50.0000000000000000, 158.0490967798387200 50.1921471959676920, 156.1731656763491000 50.7612046748871250, 154.4442976698040000 51.6853038769745440, 152.9289321881345200 52.9289321881345170, 151.6853038769745600 54.4442976698039660, 150.7612046748871300 56.1731656763490860, 150.1921471959676900 
 58.0490967798386990, 150.0000000000000000 60.0000000000000000, 150.0000000000000000 150.0000000000000000, 70.0000000000000000 150.0000000000000000, 70.0000000000000000 110.0000000000000000, 100.0000000000000000 110.0000000000000000, 101.9509032201612800 109.8078528040323100, 103.8268343236509000 109.2387953251128700, 105.5557023301960300 108.3146961230254600, 107.0710678118654800 107.0710678118654800, 108.3146961230254600 105.5557023301960300, 109.2387953251128700 103.8268343236509000, 109.8078528040323100 101.9509032201612800, 110.0000000000000000 100.0000000000000000, 110.0000000000000000 0.0000000000000000, 109.8078528040323100 -1.9509032201612824, 109.2387953251128700 -3.8268343236508979, 108.3146961230254600 -5.5557023301960218, 107.0710678118654800 -7.0710678118654746, 105.5557023301960300 -8.3146961230254526, 103.8268343236509000 -9.2387953251128678, 101.9509032201612800 -9.8078528040323043, 100.0000000000000000 -10.0000000000000000, 0.0000000000000028 -10.0000000000000000, 0
 .0000000000000000 -10.0000000000000000, -0.0000000000000196 -10.0000000000000000, -1.0757640096988681 -9.8940464930036285, -1.9509032201612777 -9.8078528040323061, -1.9509032201612866 -9.8078528040323025, -1.9509032201612952 -9.8078528040323025, -2.7195138806188379 -9.5746973091972567, -3.8268343236508908 -9.2387953251128714, -3.8268343236509019 -9.2387953251128661, -3.8268343236509117 -9.2387953251128625, -4.3727926415072558 -8.9469745244536831, -5.5557023301960120 -8.3146961230254597, -5.5557023301960289 -8.3146961230254455, -5.5557023301960360 -8.3146961230254419, -6.2156195560843335 -7.7731160520364293, -7.0710678118654684 -7.0710678118654826, -7.0710678118654746 -7.0710678118654746, -7.0710678118654826 -7.0710678118654684, -7.4895965704289287 -6.5610890439959491, -8.3146961230254437 -5.5557023301960360, -8.3146961230254526 -5.5557023301960182, -8.3146961230254561 -5.5557023301960147, -8.5385013985309968 -5.1369921098608780, -9.2387953251128625 -3.8268343236509113, -9.2387953251
 128661 -3.8268343236508979, -9.2387953251128696 -3.8268343236508922, -9.4674344907501400 -3.0731120052845418, -9.8078528040323008 -1.9509032201613032, -9.8078528040323025 -1.9509032201612937, -9.8078528040323061 -1.9509032201612793, -9.9916266130197560 -0.0850164247318053, -10.0000000000000000 0.0000000000000000), (10.0000000000000000 10.0000000000000000, 90.0000000000000000 10.0000000000000000, 90.0000000000000000 90.0000000000000000, 70.0000000000000000 90.0000000000000000, 70.0000000000000000 60.0000000000000000, 70.0000000000000000 59.9999999999999860, 69.8078528040323080 58.0490967798387060, 69.2387953251128610 56.1731656763490930, 68.3146961230254420 54.4442976698039730, 67.0710678118654760 52.9289321881345170, 65.5557023301960130 51.6853038769745440, 63.8268343236509000 50.7612046748871320, 61.9509032201612800 50.1921471959676920, 60.0000000000000000 50.0000000000000000, 58.0490967798387200 50.1921471959676920, 56.1731656763491070 50.7612046748871250, 54.4442976698039870 51.6
 853038769745440, 52.9289321881345320 52.9289321881345170, 51.6853038769745580 54.4442976698039660, 50.7612046748871390 56.1731656763490860, 50.1921471959676990 58.0490967798386990, 50.0000000000000000 60.0000000000000000, 50.0000000000000000 90.0000000000000000, 10.0000000000000000 90.0000000000000000, 10.0000000000000000 10.0000000000000000)), ((-10.0000000000000000 200.0000000000000000, -10.0000000000000000 250.0000000000000000, -10.0000000000000000 500.0000000000000000, -10.0000000000000000 550.0000000000000000, -9.8078528040323043 551.9509032201613100, -9.2387953251128678 553.8268343236509300, -8.3146961230254526 555.5557023301960300, -7.0710678118654746 557.0710678118655300, -5.5557023301960200 558.3146961230254400, -3.8268343236508970 559.2387953251128500, -1.9509032201612819 559.8078528040323400, 0.0000000000000000 560.0000000000000000, 300.0000000000000000 560.0000000000000000, 301.9509032201613100 559.8078528040323400, 303.8268343236508700 559.2387953251128500, 305.55570233
 01960300 558.3146961230254400, 307.0710678118654800 557.0710678118654200, 308.3146961230254400 555.5557023301960300, 309.2387953251128500 553.8268343236509300, 309.8078528040322800 551.9509032201613100, 310.0000000000000000 550.0000000000000000, 310.0000000000000000 500.0000000000000000, 310.0000000000000000 250.0000000000000000, 310.0000000000000000 200.0000000000000000, 309.8078528040322800 198.0490967798387200, 309.2387953251128500 196.1731656763491000, 308.3146961230254400 194.4442976698039700, 307.0710678118654800 192.9289321881345200, 305.5557023301960300 191.6853038769745600, 303.8268343236508700 190.7612046748871300, 301.9509032201613100 190.1921471959676900, 300.0000000000000000 190.0000000000000000, 0.0000000000000000 190.0000000000000000, -0.0000000000000640 190.0000000000000000, -1.9509032201613388 190.1921471959677200, -3.8268343236509446 190.7612046748871500, -5.5557023301960582 191.6853038769745600, -7.0710678118654977 192.9289321881345500, -8.3146961230254668 194.444
 2976698040000, -9.2387953251128732 196.1731656763491300, -9.8078528040323061 198.0490967798387200, -10.0000000000000000 200.0000000000000000), (110.0000000000000000 360.0000000000000000, 149.9999999999999700 360.0000000000000000, 190.0000000000000000 360.0000000000000000, 190.0000000000000000 390.0000000000000000, 110.0000000000000000 390.0000000000000000, 110.0000000000000000 360.0000000000000000)))"
-    results[7] = "POLYGON ((-14.9950656036573160 -0.3141075907812337, -14.9950656036573160 0.3141075907813203, -14.9851992457986740 0.6280601884278876, -14.9457532881721510 1.2550357308317843, -14.9161931526031810 1.5677493010067369, -14.8374569125237630 2.1910108182238575, -14.7883196595948160 2.5012512233309598, -14.6706038730309080 3.1183389868940914, -14.6020834250306190 3.4248818497897422, -14.4458526624125750 4.0333604962166074, -14.3582194382451860 4.3349960322670693, -14.1640902710180080 4.9324641743276931, -14.0576901189834940 5.2280019658763459, -13.8264286862810510 5.8121016697712404, -13.7016815191698900 6.1003753641732139, -13.4342005042137610 6.6688014552208621, -13.2915986421029830 6.9486733679040729, -12.9889536702587340 7.4991825280123248, -12.8290598975494900 7.7695481323987314, -12.4924453702556700 8.2999677534163254, -12.3158907146203300 8.5597600399837077, -11.9466350956316130 9.0679967979921656, -11.7541163376358230 9.3161904852732462, -11.3536769101835220 9.80
 02386019799896, -11.1459538334116320 10.0358541828799850, -10.7159109489725180 10.4938033415089350, -10.4938033415089010 10.7159109489725490, -10.0358541828799270 11.1459538334116850, -9.8002386019799310 11.3536769101835730, -9.3161904852731698 11.7541163376358830, -9.0679967979920875 11.9466350956316740, -8.5597600399836544 12.3158907146203680, -8.2999677534162721 12.4924453702557050, -7.7695481323986657 12.8290598975495310, -7.4991825280122608 12.9889536702587700, -6.9486733679040125 13.2915986421030110, -6.6688014552207990 13.4342005042137910, -6.1003753641731482 13.7016815191699180, -5.8121016697711747 13.8264286862810760, -5.2280019658762695 14.0576901189835260, -4.9324641743276159 14.1640902710180360, -4.3349960322670062 14.3582194382452040, -4.0333604962165435 14.4458526624125910, -3.4248818497896689 14.6020834250306350, -3.1183389868940190 14.6706038730309240, -2.5012512233309079 14.7883196595948260, -2.1910108182238055 14.8374569125237700, -1.5677493010066250 14.91619315260
 31920, -1.2550357308316711 14.9457532881721600, -0.6280601884278352 14.9851992457986720, -0.3141075907812689 14.9950656036573150, 0.3141075907813134 14.9950656036573160, 0.6280601884278796 14.9851992457986740, 1.2550357308317122 14.9457532881721580, 1.5677493010066668 14.9161931526031890, 2.1910108182238561 14.8374569125237630, 2.5012512233309572 14.7883196595948160, 3.1183389868940905 14.6706038730309080, 3.4248818497897404 14.6020834250306190, 4.0333604962165541 14.4458526624125910, 4.3349960322670169 14.3582194382452040, 4.9324641743276940 14.1640902710180100, 5.2280019658763459 14.0576901189834980, 5.8121016697712218 13.8264286862810570, 6.1003753641731944 13.7016815191698970, 6.6688014552208479 13.4342005042137680, 6.9486733679040604 13.2915986421029880, 7.4991825280122821 12.9889536702587570, 7.7695481323986879 12.8290598975495160, 8.2999677534163254 12.4924453702556700, 8.5597600399837077 12.3158907146203300, 9.0679967979921301 11.9466350956316420, 9.3161904852732107 11.75411
 63376358500, 9.8002386019799825 11.3536769101835270, 10.0358541828799770 11.1459538334116390, 10.4938033415089220 10.7159109489725300, 10.7159109489725350 10.4938033415089170, 11.1459538334116490 10.0358541828799660, 11.3536769101835390 9.8002386019799719, 11.7541163376358670 9.3161904852731929, 11.9466350956316580 9.0679967979921106, 12.3158907146203550 8.5597600399836740, 12.4924453702556930 8.2999677534162917, 12.8290598975495200 7.7695481323986808, 12.9889536702587630 7.4991825280122750, 13.2915986421030080 6.9486733679040249, 13.4342005042137860 6.6688014552208115, 13.7016815191699010 6.1003753641731864, 13.8264286862810600 5.8121016697712138, 14.0576901189835210 5.2280019658762811, 14.1640902710180310 4.9324641743276283, 14.3582194382451950 4.3349960322670409, 14.4458526624125840 4.0333604962165781, 14.6020834250306350 3.4248818497896769, 14.6706038730309240 3.1183389868940266, 14.7883196595948190 2.5012512233309465, 14.8374569125237650 2.1910108182238446, 14.9161931526031900 
 1.5677493010066605, 14.9457532881721600 1.2550357308317064, 14.9851992457986720 0.6280601884278432, 14.9950656036573150 0.3141075907812767, 14.9950656036573150 -0.3141075907813262, 14.9851992457986700 -0.6280601884279280, 14.9457532881721490 -1.2550357308318028, 14.9161931526031780 -1.5677493010067551, 14.8374569125237490 -2.1910108182239427, 14.7883196595948000 -2.5012512233310424, 14.6706038730309010 -3.1183389868941243, 14.6020834250306120 -3.4248818497897728, 14.4458526624125610 -4.0333604962166634, 14.3582194382451700 -4.3349960322671288, 14.1640902710179920 -4.9324641743277358, 14.0576901189834800 -5.2280019658763859, 13.8264286862810410 -5.8121016697712617, 13.7016815191698810 -6.1003753641732335, 13.4342005042137340 -6.6688014552209189, 13.2915986421029510 -6.9486733679041333, 12.9889536702587090 -7.4991825280123656, 12.8290598975494670 -7.7695481323987705, 12.4924453702556340 -8.2999677534163787, 12.3158907146202950 -8.5597600399837575, 11.9466350956316010 -9.06799679799218
 34, 11.7541163376358070 -9.3161904852732675, 11.3536769101834660 -9.8002386019800536, 11.1459538334115770 -10.0358541828800460, 10.7159109489724860 -10.4938033415089680, 10.4938033415088710 -10.7159109489725800, 10.0358541828799050 -11.1459538334117050, 9.8002386019799097 -11.3536769101835930, 9.3161904852731432 -11.7541163376359070, 9.0679967979920590 -11.9466350956316950, 8.5597600399835905 -12.3158907146204120, 8.2999677534162082 -12.4924453702557480, 7.7695481323986328 -12.8290598975495480, 7.4991825280122235 -12.9889536702587910, 6.9486733679039743 -13.2915986421030330, 6.6688014552207626 -13.4342005042138110, 6.1003753641730931 -13.7016815191699410, 5.8121016697711205 -13.8264286862810980, 5.2280019658762296 -14.0576901189835370, 4.9324641743275741 -14.1640902710180470, 4.3349960322669716 -14.3582194382452140, 4.0333604962165097 -14.4458526624126020, 3.4248818497896059 -14.6020834250306530, 3.1183389868939568 -14.6706038730309380, 2.5012512233308808 -14.7883196595948280, 2.191
 0108182237762 -14.8374569125237730, 1.5677493010065828 -14.9161931526031970, 1.2550357308316300 -14.9457532881721630, 0.6280601884277636 -14.9851992457986750, 0.3141075907811984 -14.9950656036573160, -0.3141075907813534 -14.9950656036573150, -0.6280601884279229 -14.9851992457986720, -1.2550357308317934 -14.9457532881721490, -1.5677493010067458 -14.9161931526031800, -2.1910108182239059 -14.8374569125237560, -2.5012512233310060 -14.7883196595948090, -3.1183389868941118 -14.6706038730309040, -3.4248818497897648 -14.6020834250306140, -4.0333604962166163 -14.4458526624125730, -4.3349960322670782 -14.3582194382451840, -4.9324641743277269 -14.1640902710179950, -5.2280019658763770 -14.0576901189834840, -5.8121016697712520 -13.8264286862810440, -6.1003753641732263 -13.7016815191698830, -6.6688014552208932 -13.4342005042137470, -6.9486733679041039 -13.2915986421029670, -7.4991825280123576 -12.9889536702587150, -7.7695481323987625 -12.8290598975494700, -8.2999677534163503 -12.4924453702556520,
  -8.5597600399837344 -12.3158907146203130, -9.0679967979921816 -11.9466350956316030, -9.3161904852732622 -11.7541163376358120, -9.8002386019800056 -11.3536769101835110, -10.0358541828800000 -11.1459538334116210, -10.4938033415089680 -10.7159109489724820, -10.7159109489725810 -10.4938033415088690, -11.1459538334116890 -10.0358541828799210, -11.3536769101835750 -9.8002386019799275, -11.7541163376358800 -9.3161904852731752, -11.9466350956316700 -9.0679967979920910, -12.3158907146203980 -8.5597600399836082, -12.4924453702557340 -8.2999677534162259, -12.8290598975495450 -7.7695481323986435, -12.9889536702587860 -7.4991825280122359, -13.2915986421030170 -6.9486733679040045, -13.4342005042137950 -6.6688014552207910, -13.7016815191699380 -6.1003753641731020, -13.8264286862810960 -5.8121016697711294, -14.0576901189835280 -5.2280019658762589, -14.1640902710180380 -4.9324641743276061, -14.3582194382452110 -4.3349960322669894, -14.4458526624125980 -4.0333604962165257, -14.6020834250306490 -3.42
 48818497896130, -14.6706038730309340 -3.1183389868939639, -14.7883196595948260 -2.5012512233308986, -14.8374569125237720 -2.1910108182237962, -14.9161931526031960 -1.5677493010066135, -14.9457532881721630 -1.2550357308316589, -14.9851992457986750 -0.6280601884277989, -14.9950656036573160 -0.3141075907812337))"
-    results[8] = "POLYGON ((-13.9978060329073970 -0.2094624748266045, -13.9978060329073950 0.2094624748266889, -13.9899129466204800 0.5862055920025697, -13.9723091710683090 1.0056810332548318, -13.9486610626131340 1.3809373174647748, -13.9131748095786600 1.8020582537397334, -13.8738650072355010 2.1743467398682563, -13.8199333198798020 2.5981893751580385, -13.7651169614795710 2.9660408106328200, -13.6918816367286350 3.3936470893355333, -13.6217750573947250 3.7556097325960867, -13.5280664950561210 4.1879672781986219, -13.4429463734285120 4.5426126280570056, -13.3272628147087370 4.9806278220575830, -13.2274650810198080 5.3265562553399510, -13.0879482319261640 5.7710177916185499, -12.9738667422375400 6.1068640868384030, -12.8082754908518410 6.5583938485882607, -12.6803604726844450 6.8828325738519487, -12.4860455048912550 7.3418201699763186, -12.3448017803829830 7.6535709138571768, -12.1186855141924110 8.1200877988898483, -11.9646705077957790 8.4179202236271458, -11.7032390472997270 8.89
 16092271572076, -11.5370605858822160 9.1743479242371997, -11.2363774530640650 9.6542845978244500, -11.0586913670931730 9.9208137267807857, -10.7144465907463000 10.4053377449800630, -10.5259541260263050 10.6546054371063280, -10.1335665546816960 11.1411241625366360, -9.9350116048568289 11.3721466721315850, -9.4898062292295364 11.8569198901936450, -9.2819723999756292 12.0687854769560520, -8.7794563174207489 12.5467111407040800, -8.5631638339116236 12.7385836679551690, -7.9994214052444379 13.2030195472396450, -7.7755238750978668 13.3741417817725790, -7.1477396542304596 13.8168157925036010, -6.9171206987088816 13.9665123930369910, -6.2242137310627568 14.3775906467337030, -5.9877834978238340 14.5052708291751160, -5.2310967209111192 14.8736585172804930, -4.9897882920707488 14.9788183862813580, -4.1737264480282601 15.2927525470066940, -3.9284921577117395 15.3749770846070390, -3.0609555812582574 15.6229213059541010, -2.8127632571725756 15.6818860094688350, -1.9052082437959865 15.853654530184
 2760, -1.6550373876560236 15.8891266928670380, -0.7220331923269177 15.9770682384900770, -0.4708711142096648 15.9889078679204460, 0.4708711142097127 15.9889078679204420, 0.7220331923269657 15.9770682384900710, 1.6550373876561006 15.8891266928670250, 1.9052082437960645 15.8536545301842620, 2.8127632571726640 15.6818860094688160, 3.0609555812583449 15.6229213059540800, 3.9284921577117862 15.3749770846070250, 4.1737264480283063 15.2927525470066800, 4.9897882920707826 14.9788183862813450, 5.2310967209111530 14.8736585172804790, 5.9877834978238864 14.5052708291750850, 6.2242137310628074 14.3775906467336720, 6.9171206987089455 13.9665123930369500, 7.1477396542305236 13.8168157925035580, 7.7755238750979068 13.3741417817725510, 7.9994214052444779 13.2030195472396150, 8.5631638339116591 12.7385836679551400, 8.7794563174207827 12.5467111407040480, 9.2819723999756629 12.0687854769560160, 9.4898062292295684 11.8569198901936110, 9.9350116048568538 11.3721466721315560, 10.1335665546817210 11.14112
 41625366100, 10.5259541260263450 10.6546054371062770, 10.7144465907463410 10.4053377449800100, 11.0586913670931950 9.9208137267807537, 11.2363774530640870 9.6542845978244163, 11.5370605858822340 9.1743479242371677, 11.7032390472997460 8.8916092271571721, 11.9646705077958020 8.4179202236271049, 12.1186855141924340 8.1200877988898057, 12.3448017803830050 7.6535709138571342, 12.4860455048912740 7.3418201699762751, 12.6803604726844630 6.8828325738519034, 12.8082754908518570 6.5583938485882154, 12.9738667422375520 6.1068640868383675, 13.0879482319261750 5.7710177916185117, 13.2274650810198190 5.3265562553399128, 13.3272628147087460 4.9806278220575457, 13.4429463734285230 4.5426126280569576, 13.5280664950561320 4.1879672781985740, 13.6217750573947300 3.7556097325960591, 13.6918816367286400 3.3936470893355035, 13.7651169614795780 2.9660408106327787, 13.8199333198798090 2.5981893751579981, 13.8738650072355050 2.1743467398682150, 13.9131748095786620 1.8020582537396930, 13.9486610626131360 1.
 3809373174647297, 13.9723091710683110 1.0056810332547848, 13.9899129466204820 0.5862055920025263, 13.9978060329073950 0.2094624748266465, 13.9978060329073950 -0.2094624748266701, 13.9899129466204780 -0.5862055920025923, 13.9723091710683070 -1.0056810332548776, 13.9486610626131300 -1.3809373174648205, 13.9131748095786540 -1.8020582537397756, 13.8738650072354960 -2.1743467398682954, 13.8199333198797940 -2.5981893751580794, 13.7651169614795630 -2.9660408106328582, 13.6918816367286260 -3.3936470893355826, 13.6217750573947130 -3.7556097325961408, 13.5280664950561110 -4.1879672781986637, 13.4429463734285020 -4.5426126280570447, 13.3272628147087280 -4.9806278220576088, 13.2274650810198010 -5.3265562553399741, 13.0879482319261480 -5.7710177916185987, 12.9738667422375220 -6.1068640868384563, 12.8082754908518270 -6.5583938485882953, 12.6803604726844340 -6.8828325738519798, 12.4860455048912340 -7.3418201699763692, 12.3448017803829620 -7.6535709138572248, 12.1186855141923960 -8.1200877988898768
 , 11.9646705077957630 -8.4179202236271777, 11.7032390472996980 -8.8916092271572555, 11.5370605858821880 -9.1743479242372459, 11.2363774530640370 -9.6542845978244927, 11.0586913670931470 -9.9208137267808283, 10.7144465907462810 -10.4053377449800890, 10.5259541260262830 -10.6546054371063570, 10.1335665546816620 -11.1411241625366770, 9.9350116048567969 -11.3721466721316240, 9.4898062292294831 -11.8569198901937010, 9.2819723999755759 -12.0687854769561030, 8.7794563174207294 -12.5467111407040960, 8.5631638339116005 -12.7385836679551860, 7.9994214052443882 -13.2030195472396840, 7.7755238750978179 -13.3741417817726160, 7.1477396542304321 -13.8168157925036180, 6.9171206987088540 -13.9665123930370070, 6.2242137310626875 -14.3775906467337380, 5.9877834978237630 -14.5052708291751490, 5.2310967209110570 -14.8736585172805180, 4.9897882920706875 -14.9788183862813820, 4.1737264480281953 -15.2927525470067170, 3.9284921577116760 -15.3749770846070600, 3.0609555812582285 -15.6229213059541080, 2.812763
 2571725445 -15.6818860094688400, 1.9052082437959421 -15.8536545301842790, 1.6550373876559801 -15.8891266928670410, 0.7220331923268358 -15.9770682384900770, 0.4708711142095837 -15.9889078679204460, -0.4708711142097903 -15.9889078679204390, -0.7220331923270460 -15.9770682384900660, -1.6550373876561599 -15.8891266928670150, -1.9052082437961220 -15.8536545301842510, -2.8127632571727186 -15.6818860094688050, -3.0609555812583986 -15.6229213059540690, -3.9284921577118315 -15.3749770846070070, -4.1737264480283534 -15.2927525470066610, -4.9897882920708492 -14.9788183862813150, -5.2310967209112178 -14.8736585172804490, -5.9877834978239459 -14.5052708291750570, -6.2242137310628660 -14.3775906467336420, -6.9171206987089651 -13.9665123930369360, -7.1477396542305449 -13.8168157925035440, -7.7755238750979725 -13.3741417817724990, -7.9994214052445418 -13.2030195472395630, -8.5631638339116876 -12.7385836679551120, -8.7794563174208129 -12.5467111407040230, -9.2819723999757109 -12.0687854769559700, -9
 .4898062292296181 -11.8569198901935610, -9.9350116048568875 -11.3721466721315170, -10.1335665546817510 -11.1411241625365700, -10.5259541260263670 -10.6546054371062480, -10.7144465907463630 -10.4053377449799810, -11.0586913670932270 -9.9208137267807111, -11.2363774530641150 -9.6542845978243736, -11.5370605858822550 -9.1743479242371304, -11.7032390472997660 -8.8916092271571365, -11.9646705077958200 -8.4179202236270676, -12.1186855141924530 -8.1200877988897666, -12.3448017803830300 -7.6535709138570844, -12.4860455048912970 -7.3418201699762262, -12.6803604726844770 -6.8828325738518696, -12.8082754908518690 -6.5583938485881799, -12.9738667422375680 -6.1068640868383275, -13.0879482319261910 -5.7710177916184708, -13.2274650810198370 -5.3265562553398542, -13.3272628147087620 -4.9806278220574880, -13.4429463734285300 -4.5426126280569328, -13.5280664950561370 -4.1879672781985482, -13.6217750573947430 -3.7556097325960112, -13.6918816367286510 -3.3936470893354542, -13.7651169614795850 -2.966040
 8106327285, -13.8199333198798140 -2.5981893751579488, -13.8738650072355090 -2.1743467398681817, -13.9131748095786650 -1.8020582537396588, -13.9486610626131390 -1.3809373174646844, -13.9723091710683120 -1.0056810332547386, -13.9899129466204840 -0.5862055920024827, -13.9978060329073970 -0.2094624748266045))"
-    results[9] = "POLYGON ((-15.0000000000000000 -5.0000000000000000, -15.0000000000000000 5.0000000000000000, -15.0000000000000000 5.0000000000000009, -14.8078528040323040 6.9509032201612859, -14.2387953251128680 8.8268343236508997, -13.3146961230254530 10.5557023301960220, -12.0710678118654760 12.0710678118654760, -10.5557023301960200 13.3146961230254540, -8.8268343236508962 14.2387953251128680, -6.9509032201612815 14.8078528040323040, -5.0000000000000000 15.0000000000000000, 5.0000000000000000 15.0000000000000000, 5.0000000000000009 15.0000000000000000, 6.9509032201612833 14.8078528040323040, 8.8268343236508979 14.2387953251128680, 10.5557023301960240 13.3146961230254530, 12.0710678118654760 12.0710678118654760, 13.3146961230254530 10.5557023301960220, 14.2387953251128680 8.8268343236508979, 14.8078528040323040 6.9509032201612824, 15.0000000000000000 5.0000000000000000, 15.0000000000000000 -5.0000000000000000, 14.8078528040323040 -6.9509032201612824, 14.2387953251128680 -8.826834
 3236508979, 13.3146961230254530 -10.5557023301960220, 12.0710678118654760 -12.0710678118654760, 10.5557023301960240 -13.3146961230254530, 8.8268343236508979 -14.2387953251128680, 6.9509032201612833 -14.8078528040323040, 5.0000000000000000 -15.0000000000000000, -5.0000000000000000 -15.0000000000000000, -5.0000000000000639 -15.0000000000000000, -6.9509032201613383 -14.8078528040322940, -8.8268343236509441 -14.2387953251128480, -10.5557023301960590 -13.3146961230254280, -12.0710678118654970 -12.0710678118654520, -13.3146961230254670 -10.5557023301960000, -14.2387953251128730 -8.8268343236508837, -14.8078528040323060 -6.9509032201612753, -15.0000000000000000 -5.0000000000000000))"
-    results[10] = "POLYGON ((-15.0000000000000000 -5.0000000000000000, -15.0000000000000000 15.0000000000000000, -15.0000000000000000 15.0000000000000020, -14.8078528040323040 16.9509032201612870, -14.2387953251128680 18.8268343236509000, -13.3146961230254530 20.5557023301960200, -12.0710678118654760 22.0710678118654760, -10.5557023301960200 23.3146961230254560, -8.8268343236508962 24.2387953251128680, -6.9509032201612815 24.8078528040323040, -5.0000000000000000 25.0000000000000000, 5.0000000000000000 25.0000000000000000, 5.0000000000000009 25.0000000000000000, 6.9509032201612833 24.8078528040323040, 8.8268343236508979 24.2387953251128680, 10.5557023301960240 23.3146961230254530, 12.0710678118654760 22.0710678118654760, 13.3146961230254530 20.5557023301960200, 14.2387953251128680 18.8268343236509000, 14.8078528040323040 16.9509032201612830, 15.0000000000000000 15.0000000000000000, 15.0000000000000000 -5.0000000000000000, 14.8078528040323040 -6.9509032201612824, 14.2387953251128680 -
 8.8268343236508979, 13.3146961230254530 -10.5557023301960220, 12.0710678118654760 -12.0710678118654760, 10.5557023301960240 -13.3146961230254530, 8.8268343236508979 -14.2387953251128680, 6.9509032201612833 -14.8078528040323040, 5.0000000000000000 -15.0000000000000000, -5.0000000000000000 -15.0000000000000000, -5.0000000000000639 -15.0000000000000000, -6.9509032201613383 -14.8078528040322940, -8.8268343236509441 -14.2387953251128480, -10.5557023301960590 -13.3146961230254280, -12.0710678118654970 -12.0710678118654520, -13.3146961230254670 -10.5557023301960000, -14.2387953251128730 -8.8268343236508837, -14.8078528040323060 -6.9509032201612753, -15.0000000000000000 -5.0000000000000000))"
-    results[11] = "POLYGON ((-4.9103744697600717 20.4695697964951080, -4.6265911438397591 22.4092633143693900, -3.9698452019385542 24.2563227847574440, -2.9653750222963513 25.9397667480551420, -1.6517818306034355 27.3949013968392060, -0.0795462765450168 28.5658067226057780, 1.6909115092562979 29.4074854903369170, 3.5915538269763281 29.8875924570076070, 5.5493400582376058 29.9876773811357820, 5.6278572670691434 29.9839766599764910, 5.9404410084800183 29.9643336045873770, 6.0189194666375911 29.9581667505497610, 6.3295917178667622 29.9288702731470690, 6.4080120619651151 29.9202388078100870, 6.7160404911374041 29.8814868828436180, 6.7943833721300617 29.8703929358921770, 7.0990668285800007 29.8224434320268090, 7.1773129165333476 29.8088897407263360, 7.4779888532593635 29.7520554974644290, 7.5561188421220180 29.7360454059854260, 7.8521697243958748 29.6706884354204090, 7.9301643367621706 29.6522258940133910, 8.2210229143039797 29.5787509122483740, 8.2988629061703705 29.5578404762691700, 8.
 5840162756186249 29.4766879811174930, 8.6616824411318660 29.4533348099032960, 8.9406748746620632 29.3649739222275020, 9.0181480508579579 29.3391837778238620, 9.2905826126437105 29.2441050542940030, 9.3678436841752841 29.2158843000331530, 9.6333826967564828 29.1145927067962660, 9.7104126006104234 29.0839483057270340, 9.9687770563317084 28.9769565175726380, 10.0455567865318580 28.9438960307424580, 10.2965248242413310 28.8317181910290120, 10.3730354365381460 28.7962497756183000, 10.6164400202622660 28.6793958207788830, 10.6926626368070130 28.6415282280884290, 10.9283885816910900 28.5204988489090570, 11.0043043956936800 28.4802414222007270, 11.2322848876917870 28.3555237040574820, 11.3078751680610700 28.3128863762489330, 11.5280879190573310 28.1849501332928510, 11.6033340150227030 28.1399434245067180, 11.8157971853363580 28.0092382193844500, 11.8906805310495760 27.9618732343526870, 12.0954485381516010 27.8288260558393250, 12.1699506572676110 27.7791144811632440, 12.3671099741412470 27.6
 441280372757700, 12.4412124843769560 27.5920821385425730, 12.6308775145774630 27.4555337120658720, 12.7045621322472930 27.4011663308222890, 12.8868712321622280 27.2634071374508340, 12.9601197766893320 27.2067316880346790, 13.1352314796513490 27.0680866739418490, 13.2080258780534090 27.0091171401722010, 13.3761153602672940 26.8698851552653440, 13.4484376516157480 26.8086360869922870, 13.6096934667481250 26.6690903717772620, 13.6815258065997650 26.6055768812919060, 13.8361469044984380 26.4659658086311750, 13.9074715692982590 26.4002035669369160, 14.0556646047481450 26.2607515845158090, 14.1264639962023550 26.1927568174617700, 14.2684409258494010 26.0536655420355350, 14.3386975752675600 25.9834550263130560, 14.4746735347063190 25.8449044464575940, 14.5443701073114550 25.7724955054608490, 14.6745615557304860 25.6346452552539970, 14.7436808549361940 25.5600557548056990, 14.8683039714141620 25.4230464264451680, 14.9368289430676240 25.3462947703884430, 15.0560982564523800 25.21024923901595
 80, 15.1240119930421970 25.1313543646734840, 15.2381392261114570 24.9963791035365830, 15.3054249709393450 24.9153604770380670, 15.4146180790690420 24.7815468455051470, 15.4812592303842800 24.6984244569843770, 15.5857216150722180 24.5658499478089710, 15.6517017301678930 24.4806443064715250, 15.7516316083214180 24.3493737420907800, 15.8169344075914130 24.2621058711536970, 15.9125243183881010 24.1321925416932680, 15.9771336893438410 24.0428839731978850, 16.0685701215833060 23.9143707113044610, 16.1324701228292750 23.8230434808036970, 16.2199332469519670 23.6959636704462040, 16.2831081121190200 23.6026403115676400, 16.3667716023927740 23.4770188295994300, 16.4292057440282380 23.3817223684854310, 16.5092366777428770 23.2575764590880140, 16.5709146911565170 23.1603304087144050, 16.6474735129953690 23.0376704918732220, 16.7083801800602880 22.9384988462478180, 16.7816207210942990 22.8173292621981110, 16.8417410140017690 22.7162564904405290, 16.9118105559487260 22.5965761826218490, 16.971129
 6409160680 22.4936272229261360, 17.0381690174452630 22.3754303623765690, 17.0966722583758680 22.2706306158580740, 17.1608159862670110 22.1539071702642650, 17.2184889483615850 22.0472824946922830, 17.2798653822779260 21.9320187454586130, 17.3366938355960580 21.8235954488763860, 17.3954253410840600 21.7097744596465110, 17.4513952640552250 21.5995792938800970, 17.5075984041521660 21.4871813339333290, 17.5626959870353720 21.3752414879909980, 17.6164817185509010 21.2642444138712640, 17.6706933668420160 21.1505875072350060, 17.7221672429814740 21.0409671058719890, 17.7754795807674670 20.9256211816828350, 17.8247419573017470 20.8173514781224110, 17.8771418305609940 20.7003449962611940, 17.9242880732093750 20.5933985289760170, 17.9757625530572330 20.4747603590413370, 18.0208832441590130 20.3691084256178740, 18.0714196300378020 20.2488678398029340, 18.1146007729376630 20.1444807156312710, 18.1641865957503650 20.0226673815014240, 18.2055098156268760 19.9195145139147410, 18.2541328408136780 19
 .7961584870874570, 18.2936755809398800 19.6942086672228420, 18.3413238114968810 19.5693403839519140, 18.3791595241430910 19.4685618984353610, 18.4258212035823730 19.3422121681012520, 18.4620195349622160 19.2425729324875300, 18.5076831502125930 19.1147729299955810, 18.5423101190292240 19.0162406057442370, 18.5869644032769160 18.8870218638327570, 18.6200825725636360 18.7895639604425640, 18.6637165080321770 18.6589583619025770, 18.6953851500898050 18.5625423256949950, 18.7379879707585320 18.4305820955036420, 18.7682632250880060 18.3351753864040500, 18.8098244193483880 18.2018930837735730, 18.8387594435497760 18.1074632413252770, 18.8792687567990360 17.9728917516695010, 18.9069138704722800 17.8794064513958910, 18.9463613076435170 17.7435789782162560, 18.9727641293746920 17.6510060793448100, 19.0111399574030530 17.5139561360378910, 19.0363455349606490 17.4222637214992840, 19.0736402851847980 17.2840251230878650, 19.0976912190791950 17.1931815326219460, 19.1338956895775670 17.053788387411
 6790, 19.1568322501631130 16.9637622445207970, 19.1919375080243530 16.8232489456844830, 19.2137977463376400 16.7340091791108880, 19.2477951298646590 16.5924103962024640, 19.2686149824063730 16.5039262565328320, 19.3014961032535020 16.3612769269331930, 19.3213094909285270 16.2735179988721090, 19.3530662361712020 16.1298533191688240, 19.3719051576045090 16.0427895299729360, 19.4025296917410370 15.8981449472760290, 19.4204243111900610 15.8117465717801500, 19.4499090780748820 15.6661577749760320, 19.4668878081547090 15.5803954376104610, 19.4952255328627900 15.4338983485562530, 19.5113151123006150 15.3487430226972870, 19.5384988029224050 15.2013737873576280, 19.5537243695492440 15.1167967923323800, 19.5797473189158460 14.9685917718609590, 19.5941324781007250 14.8845647678777500, 19.6189882654387660 14.7355605296457310, 19.6325551541602050 14.6520555109072530, 19.6562376466760860 14.5022888194808190, 19.6690069934207230 14.4192781056948980, 19.6915103478137890 14.2687859137641500, 19.7035
 015284816880 14.1862421402526330, 19.7248201923859630 14.0350615795140690, 19.7360512823736020 13.9529576860968060, 19.7561799957277660 13.8011260580916260, 19.7666678183519020 13.7194352768955150, 19.7856016146971290 13.5669900438060210, 19.7953617861115560 13.4856858861426880, 19.8130959938169120 13.3326646615490580, 19.8221429645666230 13.2517209039780060, 19.8386732079817140 13.0981614435777070, 19.8470203013280870 13.0175521132683690, 19.8623425018627020 12.8634923055604900, 19.8700019490058750 12.7831916650397750, 19.8841123261362970 12.6286695219766240, 19.8910952984494430 12.5486520533562530, 19.9039903706512650 12.3937057009644660, 19.9103070090348380 12.3139460897111860, 19.9219835946419370 12.1586137586847030, 19.9276430360947890 12.0790868770077160, 19.9380982540843910 11.9234068932749330, 19.9431086555816680 11.8440877831797150, 19.9523399262851770 11.6880985584471250, 19.9567084860427890 11.6089624145124030, 19.9647135317822910 11.4527024367870940, 19.9684465079802960 
 11.3737245887041890, 19.9752233536305330 11.2172324127974950, 19.9783260806587220 11.1383883077153140, 19.9838730541344420 10.9817025457299970, 19.9863499564155380 10.9029677304352400, 19.9906656890840250 10.7461270422385340, 19.9925202925213910 10.6674771452100130, 19.9956037195401990 10.5105202288948690, 19.9968386606294960 10.4319309422496200, 19.9986890212091420 10.2748965245865430, 19.9993060538448080 10.1963435859522380, 19.9999228914365050 10.0392704128340320, 19.9999228914365050 10.0392704128340160, 19.8154384545737300 8.0876276658361625, 19.2537522224629920 6.2094763151694643, 18.3364494820070330 4.4769926639606306, 17.0987816630922750 2.9567550873375925, 15.5883116459075030 1.7071854628109175, 13.8630859461317810 0.7763040502844447, 11.9894040198897740 0.1998841003972611, 10.0392704128340320 0.0000771085634952, 8.0876276658361785 0.1845615454262664, 6.2094763151694794 0.7462477775370040, 4.4769926639606430 1.6635505179929595, 2.9567550873376023 2.9012183369077151, 1.707185
 4628109246 4.4116883540924858, 0.7763040502844518 6.1369140538682041, 0.1998841003972647 8.0105959801102102, 0.0000771085634952 9.9607295871659680, -0.0003854827636063 10.0785250791770250, -0.0013100135817629 10.1569871693435840, -0.0028489305257864 10.2353232728173200, -0.0049992781425850 10.3134703745929120, -0.0077569111363205 10.3913654337257100, -0.0111164866743112 10.4689453747775760, -0.0150714544478075 10.5461470793401430, -0.0196140444524358 10.6229073776629510, -0.0247352524453730 10.6991630404167640, -0.0304248230273945 10.7748507706131530, -0.0366712302907328 10.8499071957234550, -0.0434616559648921 10.9242688600350120, -0.0507819649836831 10.9978722172844710, -0.0586166783888482 11.0706536236241910, -0.0669489434765769 11.1425493309795250, -0.0757605010840268 11.2134954808618140, -0.0850316499044404 11.2834280987154260, -0.0947412077101664 11.3522830888866830, -0.1048664693528146 11.4199962303081220, -0.1153831614023232 11.4865031730190450, -0.1195673616875290 11.511586
 4088718510, -0.8624638366794510 11.9548547159611670, -2.3175984854635079 13.2684479076540820, -3.4885038112300748 14.8406834617125030, -4.3301825789612103 16.6111412475138210, -4.8102895456318997 18.5117835652338520, -4.9103744697600717 20.4695697964951080))"
-
-    # Note - this test is quite slow
-    run_operation(results) do |geom|
-      geom.buffer(10, 8)
-    end
-  end
-  
-  def test_convex_hull()
-    results = Array.new()
-    results[0] = "POINT (150.0000000000000000 350.0000000000000000)"
-    results[1] = "POLYGON ((0.0000000000000000 0.0000000000000000, 0.0000000000000000 100.0000000000000000, 100.0000000000000000 100.0000000000000000, 100.0000000000000000 0.0000000000000000, 0.0000000000000000 0.0000000000000000))"
-    results[2] = "POLYGON ((60.0000000000000000 60.0000000000000000, 60.0000000000000000 160.0000000000000000, 160.0000000000000000 160.0000000000000000, 160.0000000000000000 60.0000000000000000, 60.0000000000000000 60.0000000000000000))"
-    results[3] = "POLYGON ((0.0000000000000000 0.0000000000000000, 0.0000000000000000 100.0000000000000000, 100.0000000000000000 100.0000000000000000, 100.0000000000000000 0.0000000000000000, 0.0000000000000000 0.0000000000000000))"
-    results[4] = "POLYGON ((0.0000000000000000 200.0000000000000000, 0.0000000000000000 500.0000000000000000, 300.0000000000000000 500.0000000000000000, 300.0000000000000000 200.0000000000000000, 0.0000000000000000 200.0000000000000000))"
-    results[5] = "POLYGON ((0.0000000000000000 250.0000000000000000, 0.0000000000000000 550.0000000000000000, 300.0000000000000000 550.0000000000000000, 300.0000000000000000 250.0000000000000000, 0.0000000000000000 250.0000000000000000))"
-    results[6] = "POLYGON ((0.0000000000000000 0.0000000000000000, 0.0000000000000000 550.0000000000000000, 300.0000000000000000 550.0000000000000000, 300.0000000000000000 200.0000000000000000, 100.0000000000000000 0.0000000000000000, 0.0000000000000000 0.0000000000000000))"
-    results[7] = "POLYGON ((-0.0000000000000000 -5.0000000000000000, -0.3100000000000000 -4.9900000000000002, -0.6300000000000000 -4.9600000000000000, -0.9400000000000000 -4.9100000000000001, -1.2400000000000000 -4.8399999999999999, -1.5500000000000000 -4.7599999999999998, -1.8400000000000001 -4.6500000000000004, -2.1299999999999999 -4.5199999999999996, -2.4100000000000001 -4.3799999999999999, -2.6800000000000002 -4.2199999999999998, -2.9399999999999999 -4.0499999999999998, -3.1899999999999999 -3.8500000000000001, -3.4199999999999999 -3.6400000000000001, -3.6400000000000001 -3.4199999999999999, -3.8500000000000001 -3.1899999999999999, -4.0499999999999998 -2.9399999999999999, -4.2199999999999998 -2.6800000000000002, -4.3799999999999999 -2.4100000000000001, -4.5199999999999996 -2.1299999999999999, -4.6500000000000004 -1.8400000000000001, -4.7599999999999998 -1.5500000000000000, -4.8399999999999999 -1.2400000000000000, -4.9100000000000001 -0.9400000000000000, -4.9600000000000000 -0.630
 0000000000000, -4.9900000000000002 -0.3100000000000000, -5.0000000000000000 0.0000000000000000, -4.9900000000000002 0.3100000000000000, -4.9600000000000000 0.6300000000000000, -4.9100000000000001 0.9400000000000000, -4.8399999999999999 1.2400000000000000, -4.7599999999999998 1.5500000000000000, -4.6500000000000004 1.8400000000000001, -4.5199999999999996 2.1299999999999999, -4.3799999999999999 2.4100000000000001, -4.2199999999999998 2.6800000000000002, -4.0499999999999998 2.9399999999999999, -3.8500000000000001 3.1899999999999999, -3.6400000000000001 3.4199999999999999, -3.4199999999999999 3.6400000000000001, -3.1899999999999999 3.8500000000000001, -2.9399999999999999 4.0499999999999998, -2.6800000000000002 4.2199999999999998, -2.4100000000000001 4.3799999999999999, -2.1299999999999999 4.5199999999999996, -1.8400000000000001 4.6500000000000004, -1.5500000000000000 4.7599999999999998, -1.2400000000000000 4.8399999999999999, -0.9400000000000000 4.9100000000000001, -0.6300000000000000 4
 .9600000000000000, -0.3100000000000000 4.9900000000000002, 0.0000000000000000 5.0000000000000000, 0.3100000000000000 4.9900000000000002, 0.6300000000000000 4.9600000000000000, 0.9400000000000000 4.9100000000000001, 1.2400000000000000 4.8399999999999999, 1.5500000000000000 4.7599999999999998, 1.8400000000000001 4.6500000000000004, 2.1299999999999999 4.5199999999999996, 2.4100000000000001 4.3799999999999999, 2.6800000000000002 4.2199999999999998, 2.9399999999999999 4.0499999999999998, 3.1899999999999999 3.8500000000000001, 3.4199999999999999 3.6400000000000001, 3.6400000000000001 3.4199999999999999, 3.8500000000000001 3.1899999999999999, 4.0499999999999998 2.9399999999999999, 4.2199999999999998 2.6800000000000002, 4.3799999999999999 2.4100000000000001, 4.5199999999999996 2.1299999999999999, 4.6500000000000004 1.8400000000000001, 4.7599999999999998 1.5500000000000000, 4.8399999999999999 1.2400000000000000, 4.9100000000000001 0.9400000000000000, 4.9600000000000000 0.6300000000000000, 4.
 9900000000000002 0.3100000000000000, 5.0000000000000000 0.0000000000000000, 4.9900000000000002 -0.3100000000000000, 4.9600000000000000 -0.6300000000000000, 4.9100000000000001 -0.9400000000000000, 4.8399999999999999 -1.2400000000000000, 4.7599999999999998 -1.5500000000000000, 4.6500000000000004 -1.8400000000000001, 4.5199999999999996 -2.1299999999999999, 4.3799999999999999 -2.4100000000000001, 4.2199999999999998 -2.6800000000000002, 4.0499999999999998 -2.9399999999999999, 3.8500000000000001 -3.1899999999999999, 3.6400000000000001 -3.4199999999999999, 3.4199999999999999 -3.6400000000000001, 3.1899999999999999 -3.8500000000000001, 2.9399999999999999 -4.0499999999999998, 2.6800000000000002 -4.2199999999999998, 2.4100000000000001 -4.3799999999999999, 2.1299999999999999 -4.5199999999999996, 1.8400000000000001 -4.6500000000000004, 1.5500000000000000 -4.7599999999999998, 1.2400000000000000 -4.8399999999999999, 0.9400000000000000 -4.9100000000000001, 0.6300000000000000 -4.9600000000000000, 0
 .3100000000000000 -4.9900000000000002, -0.0000000000000000 -5.0000000000000000))"
-    results[8] = "POLYGON ((-0.0000000000000000 -6.0000000000000000, -0.2500000000000000 -5.9900000000000002, -0.5000000000000000 -5.9500000000000002, -0.7500000000000000 -5.8899999999999997, -0.9900000000000000 -5.8099999999999996, -1.2400000000000000 -5.7100000000000000, -1.4700000000000000 -5.5800000000000001, -1.7000000000000000 -5.4299999999999997, -1.9299999999999999 -5.2599999999999998, -2.1400000000000001 -5.0700000000000003, -2.3500000000000001 -4.8499999999999996, -2.5499999999999998 -4.6200000000000001, -2.7400000000000002 -4.3700000000000001, -2.9199999999999999 -4.1100000000000003, -3.2400000000000002 -3.5299999999999998, -3.3799999999999999 -3.2100000000000000, -3.5099999999999998 -2.8900000000000001, -3.6200000000000001 -2.5499999999999998, -3.7200000000000002 -2.2100000000000000, -3.7999999999999998 -1.8500000000000001, -3.8700000000000001 -1.4900000000000000, -3.9300000000000002 -1.1200000000000001, -3.9700000000000002 -0.7500000000000000, -3.9900000000000002 -0.380
 0000000000000, -4.0000000000000000 0.0000000000000000, -3.9900000000000002 0.3800000000000000, -3.9700000000000002 0.7500000000000000, -3.9300000000000002 1.1200000000000001, -3.8700000000000001 1.4900000000000000, -3.7999999999999998 1.8500000000000001, -3.7200000000000002 2.2100000000000000, -3.6200000000000001 2.5499999999999998, -3.5099999999999998 2.8900000000000001, -3.3799999999999999 3.2100000000000000, -3.2400000000000002 3.5299999999999998, -2.9199999999999999 4.1100000000000003, -2.7400000000000002 4.3700000000000001, -2.5499999999999998 4.6200000000000001, -2.3500000000000001 4.8499999999999996, -2.1400000000000001 5.0700000000000003, -1.9299999999999999 5.2599999999999998, -1.7000000000000000 5.4299999999999997, -1.4700000000000000 5.5800000000000001, -1.2400000000000000 5.7100000000000000, -0.9900000000000000 5.8099999999999996, -0.7500000000000000 5.8899999999999997, -0.5000000000000000 5.9500000000000002, -0.2500000000000000 5.9900000000000002, 0.0000000000000000 6.0
 000000000000000, 0.2500000000000000 5.9900000000000002, 0.5000000000000000 5.9500000000000002, 0.7500000000000000 5.8899999999999997, 0.9900000000000000 5.8099999999999996, 1.2400000000000000 5.7100000000000000, 1.4700000000000000 5.5800000000000001, 1.7000000000000000 5.4299999999999997, 1.9299999999999999 5.2599999999999998, 2.1400000000000001 5.0700000000000003, 2.3500000000000001 4.8499999999999996, 2.5499999999999998 4.6200000000000001, 2.7400000000000002 4.3700000000000001, 2.9199999999999999 4.1100000000000003, 3.2400000000000002 3.5299999999999998, 3.3799999999999999 3.2100000000000000, 3.5099999999999998 2.8900000000000001, 3.6200000000000001 2.5499999999999998, 3.7200000000000002 2.2100000000000000, 3.7999999999999998 1.8500000000000001, 3.8700000000000001 1.4900000000000000, 3.9300000000000002 1.1200000000000001, 3.9700000000000002 0.7500000000000000, 3.9900000000000002 0.3800000000000000, 4.0000000000000000 0.0000000000000000, 3.9900000000000002 -0.3800000000000000, 3.97
 00000000000002 -0.7500000000000000, 3.9300000000000002 -1.1200000000000001, 3.8700000000000001 -1.4900000000000000, 3.7999999999999998 -1.8500000000000001, 3.7200000000000002 -2.2100000000000000, 3.6200000000000001 -2.5499999999999998, 3.5099999999999998 -2.8900000000000001, 3.3799999999999999 -3.2100000000000000, 3.2400000000000002 -3.5299999999999998, 2.9199999999999999 -4.1100000000000003, 2.7400000000000002 -4.3700000000000001, 2.5499999999999998 -4.6200000000000001, 2.3500000000000001 -4.8499999999999996, 2.1400000000000001 -5.0700000000000003, 1.9299999999999999 -5.2599999999999998, 1.7000000000000000 -5.4299999999999997, 1.4700000000000000 -5.5800000000000001, 1.2400000000000000 -5.7100000000000000, 0.9900000000000000 -5.8099999999999996, 0.7500000000000000 -5.8899999999999997, 0.5000000000000000 -5.9500000000000002, 0.2500000000000000 -5.9900000000000002, -0.0000000000000000 -6.0000000000000000))"
-    results[9] = "POLYGON ((-5.0000000000000000 -5.0000000000000000, -5.0000000000000000 5.0000000000000000, 5.0000000000000000 5.0000000000000000, 5.0000000000000000 -5.0000000000000000, -5.0000000000000000 -5.0000000000000000))"
-    results[10] = "POLYGON ((-5.0000000000000000 -5.0000000000000000, -5.0000000000000000 15.0000000000000000, 5.0000000000000000 15.0000000000000000, 5.0000000000000000 -5.0000000000000000, -5.0000000000000000 -5.0000000000000000))"
-    results[11] = "POLYGON ((10.0000000000000000 10.0000000000000000, 5.0000000000000000 20.0000000000000000, 6.0000000000000000 20.0000000000000000, 7.0000000000000000 19.5000000000000000, 8.0000000000000000 18.5000000000000000, 9.0000000000000000 16.5000000000000000, 9.5000000000000000 15.0000000000000000, 10.0000000000000000 13.0000000000000000, 10.0000000000000000 10.0000000000000000))"
-
-    run_operation(results) do |geom|
-      geom.convex_hull()
-    end
-  end
-end
\ No newline at end of file
diff --git a/swig/ruby/test/test_relations.rb b/swig/ruby/test/test_relations.rb
deleted file mode 100644
index fbfe5be..0000000
--- a/swig/ruby/test/test_relations.rb
+++ /dev/null
@@ -1,336 +0,0 @@
-#!/usr/bin/env ruby
-
-# These tests evaluate the geos relational operators
-
-
-require 'test/unit'
-require 'geos'
-require 'test_helper'
-
-class TestGeosRelations < Test::Unit::TestCase
-  X = RuntimeError
-  
-  def setup
-    @test_helper = GeosTestHelper.new()
-  end
-
-  def get_expected_result(value)
-
-    # 0 is false and 1 is true
-    case
-      when value == 0
-        return false
-      when value == 1
-        return true
-      when value == X
-        return X
-      else
-        return value
-    end
-  end
-  
-  def run_relational_operation(operation, results, &block)
-    STDOUT << "\n" << "------ #{operation} RELATION  ------" << "\n"
-    STDOUT.flush()  
-
-    # Create the geometries
-    geoms = @test_helper.create_geoms()
-    #@test_helper.print_geoms(geoms)
-
-    # Loop through the the geometries the first time
-    row = 0
-    geoms.each do |geom1|
-      # Loop through the the geometries the second time
-      column = 0
-      geoms.each do |geom2|
-        # get value
-        value = results[row][column]
-        expected = self.get_expected_result(value)
-
-        begin
-          # Get the actual result from the provided block
-          result = yield(geom1, geom2)
-          
-          STDOUT << "#{value}\t"
-          
-          # Did this work?
-          assert_equal(expected, result, "#{operation} failure.  Row: #{row}.  Column: #{column}")
-
-        # Geometry Collection is not a valid argument
-        rescue RuntimeError => error
-          assert_equal(expected, RuntimeError)
-          STDOUT << "X\t"
-        end
-        STDOUT.flush()
-        column += 1
-      end
-      STDOUT << "\n"
-      STDOUT.flush()
-      row += 1
-    end
-  end
-
-  def test_contains()
-    results = Array.new()
-
-    # CONTAINS      [0][1][2][3][4][5][6][7][8][9][10][11]
-    results[0]    = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-    results[1]    = [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
-    results[2]    = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-    results[3]    = [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
-    results[4]    = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
-    results[5]    = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]
-    results[6]    = [X, X, X, X, X, X, X, 0, 0, 0, 0, X]
-    results[7]    = [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0]
-    results[8]    = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
-    results[9]    = [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0]
-    results[10]   = [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0]
-    results[11]   = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
-    
-    self.run_relational_operation("CONTAINS", results) do |geom1, geom2|
-      geom1.contains?(geom2)
-    end
-  end
-  
-  def test_crosses()
-    results = Array.new()
-
-    # CROSSES       [0][1][2][3][4][5][6][7][8][9][10][11]
-    results[0]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[1]    = [0, 0, 1, 0, 0, 0, X, 1, 1, 1, 1, 0]
-    results[2]    = [0, 1, 0, 1, 0, 0, X, 0, 0, 0, 0, 0]
-    results[3]    = [0, 0, 1, 0, 0, 0, X, 1, 1, 1, 1, 0]
-    results[4]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[5]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[6]    = [X, X, X, X, X, X, X, X, X, X, X, X]
-    results[7]    = [0, 1, 0, 1, 0, 0, X, 0, 0, 0, 0, 0]
-    results[8]    = [0, 1, 0, 1, 0, 0, X, 0, 0, 0, 0, 0]
-    results[9]    = [0, 1, 0, 1, 0, 0, X, 0, 0, 0, 0, 0]
-    results[10]   = [0, 1, 0, 1, 0, 0, X, 0, 0, 0, 0, 0]
-    results[11]   = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-        
-    self.run_relational_operation("CROSSES", results) do |geom1, geom2|
-      geom1.crosses?(geom2)
-    end
-  end
-  
-  def test_disjoint()
-    results = Array.new()
-
-    # DISJOINT      [0][1][2][3][4][5][6][7][8][9][10][11] 
-    results[0]    = [0, 1, 1, 1, 1, 0, X, 1, 1, 1, 1, 1]
-    results[1]    = [1, 0, 0, 0, 1, 1, X, 0, 0, 0, 0, 1]
-    results[2]    = [1, 0, 0, 0, 1, 1, X, 1, 1, 1, 1, 1]
-    results[3]    = [1, 0, 0, 0, 1, 1, X, 0, 0, 0, 0, 1]
-    results[4]    = [1, 1, 1, 1, 0, 0, X, 1, 1, 1, 1, 1]
-    results[5]    = [0, 1, 1, 1, 0, 0, X, 1, 1, 1, 1, 1]
-    results[6]    = [X, X, X, X, X, X, X, X, X, X, X, X]
-    results[7]    = [1, 0, 1, 0, 1, 1, X, 0, 0, 0, 0, 1]
-    results[8]    = [1, 0, 1, 0, 1, 1, X, 0, 0, 0, 0, 1]
-    results[9]    = [1, 0, 1, 0, 1, 1, X, 0, 0, 0, 0, 1]
-    results[10]   = [1, 0, 1, 0, 1, 1, X, 0, 0, 0, 0, 1]
-    results[11]   = [1, 1, 1, 1, 1, 1, X, 1, 1, 1, 1, 0]
-        
-    self.run_relational_operation("DISJOINT", results) do |geom1, geom2|
-      geom1.disjoint?(geom2)
-    end
-  end
-
-  def test_equals()
-    results = Array.new()
-
-    # EQUALS        [0][1][2][3][4][5][6][7][8][9][10][11]
-    results[0]    = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-    results[1]    = [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
-    results[2]    = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-    results[3]    = [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
-    results[4]    = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
-    results[5]    = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]
-    results[6]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[7]    = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
-    results[8]    = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
-    results[9]    = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]
-    results[10]   = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]
-    results[11]   = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
-        
-    self.run_relational_operation("EQUALS", results) do |geom1, geom2|
-      geom1.eql?(geom2)
-    end
-  end
-
-  #def test_equals_exact()
-    ## Setup the expected results
-
-    ## EQUALS_EXACT [0][1][2][3][4][5][6][7][8][9][10][11]
-    #results[0]    = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-    #results[1]    = [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
-    #results[2]    = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
-    #results[3]    = [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]
-    #results[4]    = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
-    #results[5]    = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]
-    #results[6]    = [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
-    #results[7]    = [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
-    #results[8]    = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
-    #results[9]    = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]
-    #results[10]   = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]
-    #results[11]   = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
-    
-    #self.run_relational_operation("EQUALS_EXACT", results) do |geom1, geom2|
-      #geom1.equals_exact?(geom2)
-    #end
-  #end
-  
-  def test_intersects()
-    results = Array.new()
-    
-    # INTERSECTS    [0][1][2][3][4][5][6][7][8][9][10][11]
-    results[0]    = [1, 0, 0, 0, 0, 1, X, 0, 0, 0, 0, 0]
-    results[1]    = [0, 1, 1, 1, 0, 0, X, 1, 1, 1, 1, 0]
-    results[2]    = [0, 1, 1, 1, 0, 0, X, 0, 0, 0, 0, 0]
-    results[3]    = [0, 1, 1, 1, 0, 0, X, 1, 1, 1, 1, 0]
-    results[4]    = [0, 0, 0, 0, 1, 1, X, 0, 0, 0, 0, 0]
-    results[5]    = [1, 0, 0, 0, 1, 1, X, 0, 0, 0, 0, 0]
-    results[6]    = [X, X, X, X, X, X, X, X, X, 1, 1, X]
-    results[7]    = [0, 1, 0, 1, 0, 0, X, 1, 1, 1, 1, 0]
-    results[8]    = [0, 1, 0, 1, 0, 0, X, 1, 1, 1, 1, 0]
-    results[9]    = [0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0]
-    results[10]   = [0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0]
-    results[11]   = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 1]
-    
-    self.run_relational_operation("INTERSECTS", results) do |geom1, geom2|
-      geom1.intersects?(geom2)
-    end
-  end
-
-  #def test_is_within_distance()
-    #results = Array.new()
-
-    ## IS_WITHIN_DIST[0][1][2][3][4][5][6][7][8][9][10][11]
-    #results[0]    = [1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0]
-    #results[1]    = [0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0]
-    #results[2]    = [0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0]
-    #results[3]    = [0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0]
-    #results[4]    = [0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0]
-    #results[5]    = [1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0]
-    #results[6]    = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]
-    #results[7]    = [0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0]
-    #results[8]    = [0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0]
-    #results[9]    = [0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0]
-    #results[10]   = [0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0]
-    #results[11]   = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]
-    
-    #self.run_relational_operation("IS_WITHIN_DISTANCE", results) do |geom1, geom2|
-      #geom1.is_within_distance?(geom2, 2)
-    #end
-  #end
-  
-  def test_overlaps()
-    results = Array.new()
-
-    # OVERLAPS      [0][1][2][3][4][5][6][7][8][9][10][11]
-    results[0]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[1]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[2]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[3]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[4]    = [0, 0, 0, 0, 0, 1, X, 0, 0, 0, 0, 0]
-    results[5]    = [0, 0, 0, 0, 1, 0, X, 0, 0, 0, 0, 0]
-    results[6]    = [X, X, X, X, X, X, X, X, X, X, X, X]
-    results[7]    = [0, 0, 0, 0, 0, 0, X, 0, 1, 0, 0, 0]
-    results[8]    = [0, 0, 0, 0, 0, 0, X, 1, 0, 1, 1, 0]
-    results[9]    = [0, 0, 0, 0, 0, 0, X, 0, 1, 0, 0, 0]
-    results[10]   = [0, 0, 0, 0, 0, 0, X, 0, 1, 0, 0, 0]
-    results[11]   = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    
-    self.run_relational_operation("OVERLAPS", results) do |geom1, geom2|
-      geom1.overlaps?(geom2)
-    end
-  end
-
-  def test_relate_pattern()
-    results = Array.new()
-
-    # RELATE        [0][1][2][3][4][5][6][7][8][9][10][11]
-    results[0]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[1]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[2]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[3]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[4]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[5]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[6]    = [X, X, X, X, X, X, X, X, X, X, X, X]
-    results[7]    = [0, 0, 0, 0, 0, 0, X, 0, 1, 0, 0, 0]
-    results[8]    = [0, 0, 0, 0, 0, 0, X, 1, 0, 1, 1, 0]
-    results[9]    = [0, 0, 0, 0, 0, 0, X, 0, 1, 0, 0, 0]
-    results[10]   = [0, 0, 0, 0, 0, 0, X, 0, 1, 0, 0, 0]
-    results[11]   = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    
-    self.run_relational_operation("RELATE PATTERN", results) do |geom1, geom2|
-      geom1.relate_pattern(geom2, "212101212")
-    end
-  end
-
-  def test_relate()
-    results = Array.new()
-
-    # ------ RELATE RELATION  ------
-    results[0]   = ["0FFFFFFF2", "FF0FFF1F2", "FF0FFF102", "FF0FFF1F2", "FF0FFF212", "F0FFFF212", nil, "FF0FFF212", "FF0FFF212", "FF0FFF212", "FF0FFF212", "FF0FFF102"]
-    results[1]   = ["FF1FFF0F2", "1FFFFFFF2", "0F1FFF102", "1FFFFFFF2", "FF1FFF212", "FF1FFF212", nil, "101FFF212", "101FFF212", "101FFF212", "101FFF212", "FF1FFF102"]
-    results[2]   = ["FF1FF00F2", "0F1FF01F2", "1FFF0FFF2", "0F1FF01F2", "FF1FF0212", "FF1FF0212", nil, "FF1FF0212", "FF1FF0212", "FF1FF0212", "FF1FF0212", "FF1FF0102"]
-    results[3]   = ["FF1FFF0F2", "1FFFFFFF2", "0F1FFF102", "1FFFFFFF2", "FF1FFF212", "FF1FFF212", nil, "101FFF212", "101FFF212", "101FFF212", "101FFF212", "FF1FFF102"]
-    results[4]   = ["FF2FF10F2", "FF2FF11F2", "FF2FF1102", "FF2FF11F2", "2FFF1FFF2", "212111212", nil, "FF2FF1212", "FF2FF1212", "FF2FF1212", "FF2FF1212", "FF2FF1102"]
-    results[5]   = ["FF20F1FF2", "FF2FF11F2", "FF2FF1102", "FF2FF11F2", "212111212", "2FFF1FFF2", nil, "FF2FF1212", "FF2FF1212", "FF2FF1212", "FF2FF1212", "FF2FF1102"]
-    results[6]   = [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil]
-    results[7]   = ["FF2FF10F2", "1F20F11F2", "FF2FF1102", "1F20F11F2", "FF2FF1212", "FF2FF1212", nil, "2FFF1FFF2", "212101212", "2FF10F212", "2FF10F212", "FF2FF1102"]
-    results[8]   = ["FF2FF10F2", "1F20F11F2", "FF2FF1102", "1F20F11F2", "FF2FF1212", "FF2FF1212", nil, "212101212", "2FFF1FFF2", "212101212", "212101212", "FF2FF1102"]
-    results[9]   = ["FF2FF10F2", "1F20F11F2", "FF2FF1102", "1F20F11F2", "FF2FF1212", "FF2FF1212", nil, "212F01FF2", "212101212", "2FFF1FFF2", "2FF11F212", "FF2FF1102"]
-    results[10]  = ["FF2FF10F2", "1F20F11F2", "FF2FF1102", "1F20F11F2", "FF2FF1212", "FF2FF1212", nil, "212F01FF2", "212101212", "212F11FF2", "2FFF1FFF2", "FF2FF1102"]
-    results[11]  = ["FF1FF00F2", "FF1FF01F2", "FF1FF0102", "FF1FF01F2", "FF1FF0212", "FF1FF0212", nil, "FF1FF0212", "FF1FF0212", "FF1FF0212", "FF1FF0212", "1FFF0FFF2"]
-    
-    self.run_relational_operation("RELATE", results) do |geom1, geom2|
-      geom1.relate(geom2)
-    end
-  end
-  
-  def test_touches()
-    results = Array.new()
-
-    # TOUCHES       [0][1][2][3][4][5][6][7][8][9][10][11]
-    results[0]    = [0, 0, 0, 0, 0, 1, X, 0, 0, 0, 0, 0]
-    results[1]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[2]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[3]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[4]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[5]    = [1, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[6]    = [X, X, X, X, X, X, X, X, X, X, X, X]
-    results[7]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[8]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[9]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[10]   = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[11]   = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    
-    self.run_relational_operation("TOUCHES", results) do |geom1, geom2|
-      geom1.touches?(geom2)
-    end
-  end
-
-  def test_within()
-    results = Array.new()
-
-    # WITHIN        [0][1][2][3][4][5][6][7][8][9][10][11]
-    results[0]    = [1, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[1]    = [0, 1, 0, 1, 0, 0, X, 0, 0, 0, 0, 0]
-    results[2]    = [0, 0, 1, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[3]    = [0, 1, 0, 1, 0, 0, X, 0, 0, 0, 0, 0]
-    results[4]    = [0, 0, 0, 0, 1, 0, X, 0, 0, 0, 0, 0]
-    results[5]    = [0, 0, 0, 0, 0, 1, X, 0, 0, 0, 0, 0]
-    results[6]    = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 0]
-    results[7]    = [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0]
-    results[8]    = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
-    results[9]    = [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0]
-    results[10]   = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0]
-    results[11]   = [0, 0, 0, 0, 0, 0, X, 0, 0, 0, 0, 1]
-    
-    self.run_relational_operation("WITHIN", results) do |geom1, geom2|
-      geom1.within?(geom2)
-    end
-  end
-end
\ No newline at end of file
diff --git a/swig/ruby/test/test_srid.rb b/swig/ruby/test/test_srid.rb
deleted file mode 100644
index a513138..0000000
--- a/swig/ruby/test/test_srid.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-
-class SridTest < Test::Unit::TestCase
-
-  def test_srid
-    cs = Geos::CoordinateSequence.new(1,2)
-    cs.set_x(0, 7)
-    cs.set_y(0, 8)
-    
-    geom1 = Geos.create_point(cs)
-    geom1.srid = 4326
-  end
-
-  def test_write_srid
-    reader = Geos::WktReader.new
-    geom = reader.read("POINT(7 8)")
-    geom.srid = 4326
-
-    # without srid
-    writer = Geos::WkbWriter.new
-    writer.include_srid = false
-    hex = writer.write_hex(geom)
-    assert_equal("01010000000000000000001C400000000000002040", hex)   
-    
-    # with srid
-    writer.include_srid = true
-    hex = writer.write_hex(geom)
-    assert_equal("0101000020E61000000000000000001C400000000000002040", hex)        
-  end
-  
-  def test_roundtrip_srid
-    reader = Geos::WktReader.new
-    geom1 = reader.read("POINT(7 8)")
-    geom1.srid = 4326
-    assert_equal(4326, geom1.srid)
-    
-    writer = Geos::WkbWriter.new
-    writer.include_srid = true
-    hex = writer.write_hex(geom1)
-
-    reader = Geos::WkbReader.new
-    geom2 = reader.read_hex(hex)
-    assert_equal(4326, geom2.srid)
-  end
-  
-  def test_read_srid
-    # srid=4326;POINT(7 8)
-    xdr = "0101000020E61000000000000000001C400000000000002040"
-    
-    reader = Geos::WkbReader.new
-    geom = reader.read_hex(xdr)
-    
-    assert_equal(7, geom.coord_seq.get_x(0))
-    assert_equal(8,geom.coord_seq.get_y(0))
-    assert_equal(4326, geom.srid)
-  end
-end
diff --git a/swig/ruby/test/test_version.rb b/swig/ruby/test/test_version.rb
deleted file mode 100644
index 64cf878..0000000
--- a/swig/ruby/test/test_version.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'geos'
-
-
-class TestVersion < Test::Unit::TestCase
-  def test_versions
-    assert_equal("3.0.0rc4-CAPI-1.3.3", Geos::version)
-    assert_equal(3, Geos::GEOS_VERSION_MAJOR)
-    assert_equal(0, Geos::GEOS_VERSION_MINOR)
-    assert_equal("3.0.0rc4", Geos::GEOS_VERSION)
-    assert_equal("1.7.1", Geos::GEOS_JTS_PORT)
-    assert_equal(1, Geos::GEOS_CAPI_VERSION_MAJOR)
-    assert_equal(3, Geos::GEOS_CAPI_VERSION_MINOR)
-    assert_equal(3, Geos::GEOS_CAPI_VERSION_PATCH)
-    assert_equal(1, Geos::GEOS_CAPI_FIRST_INTERFACE)
-    assert_equal(4, Geos::GEOS_CAPI_LAST_INTERFACE)
-    assert_equal("3.0.0rc4-CAPI-1.3.3", Geos::GEOS_CAPI_VERSION)
-  end
-end

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                 |     1 -
 Makefile.am                                |     1 -
 NEWS                                       |     2 +
 README.md                                  |    10 +-
 configure.ac                               |    95 -
 include/geos/geom.h                        |     2 +-
 macros/ac_pkg_swig.m4                      |   158 -
 macros/ac_python_devel.m4                  |    72 -
 macros/python.m4                           |   239 -
 macros/ruby.m4                             |    77 -
 swig/Makefile.am                           |    17 -
 swig/geos.i.in                             |  1293 ----
 swig/python/Makefile.am                    |    45 -
 swig/python/README.txt                     |     7 -
 swig/python/geos.pth                       |     2 -
 swig/python/geos.py                        |   399 -
 swig/python/geos_wrap.cxx                  | 11112 ---------------------------
 swig/python/python.i                       |    56 -
 swig/python/tests/Makefile.am              |    12 -
 swig/python/tests/TESTING.txt              |    12 -
 swig/python/tests/example.py               |   529 --
 swig/python/tests/runtests.py              |    30 -
 swig/python/tests/test_geometry.py         |   264 -
 swig/ruby/Makefile.am                      |    46 -
 swig/ruby/geos_wrap.cxx                    |  9932 ------------------------
 swig/ruby/ruby.i                           |   176 -
 swig/ruby/test/Makefile.am                 |    24 -
 swig/ruby/test/example.rb                  |   419 -
 swig/ruby/test/geos_tests.rb               |    12 -
 swig/ruby/test/test_buffer.rb              |    42 -
 swig/ruby/test/test_combinations.rb        |    57 -
 swig/ruby/test/test_coordinate_sequence.rb |    88 -
 swig/ruby/test/test_envelope.rb            |    44 -
 swig/ruby/test/test_geometry.rb            |   280 -
 swig/ruby/test/test_helper.rb              |   248 -
 swig/ruby/test/test_io.rb                  |   150 -
 swig/ruby/test/test_operations.rb          |    92 -
 swig/ruby/test/test_relations.rb           |   336 -
 swig/ruby/test/test_srid.rb                |    60 -
 swig/ruby/test/test_version.rb             |    21 -
 40 files changed, 7 insertions(+), 26455 deletions(-)
 delete mode 100644 macros/ac_pkg_swig.m4
 delete mode 100644 macros/ac_python_devel.m4
 delete mode 100644 macros/python.m4
 delete mode 100644 macros/ruby.m4
 delete mode 100644 swig/Makefile.am
 delete mode 100644 swig/geos.i.in
 delete mode 100644 swig/python/Makefile.am
 delete mode 100644 swig/python/README.txt
 delete mode 100644 swig/python/geos.pth
 delete mode 100644 swig/python/geos.py
 delete mode 100644 swig/python/geos_wrap.cxx
 delete mode 100644 swig/python/python.i
 delete mode 100644 swig/python/tests/Makefile.am
 delete mode 100644 swig/python/tests/TESTING.txt
 delete mode 100644 swig/python/tests/example.py
 delete mode 100644 swig/python/tests/runtests.py
 delete mode 100644 swig/python/tests/test_geometry.py
 delete mode 100644 swig/ruby/Makefile.am
 delete mode 100644 swig/ruby/geos_wrap.cxx
 delete mode 100644 swig/ruby/ruby.i
 delete mode 100644 swig/ruby/test/Makefile.am
 delete mode 100644 swig/ruby/test/example.rb
 delete mode 100644 swig/ruby/test/geos_tests.rb
 delete mode 100644 swig/ruby/test/test_buffer.rb
 delete mode 100644 swig/ruby/test/test_combinations.rb
 delete mode 100644 swig/ruby/test/test_coordinate_sequence.rb
 delete mode 100644 swig/ruby/test/test_envelope.rb
 delete mode 100644 swig/ruby/test/test_geometry.rb
 delete mode 100644 swig/ruby/test/test_helper.rb
 delete mode 100644 swig/ruby/test/test_io.rb
 delete mode 100644 swig/ruby/test/test_operations.rb
 delete mode 100644 swig/ruby/test/test_relations.rb
 delete mode 100644 swig/ruby/test/test_srid.rb
 delete mode 100644 swig/ruby/test/test_version.rb


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list