[geos-devel] [GEOS] #228: import python bindings fails

Sean Gillies sgillies at frii.com
Mon Feb 2 15:03:35 EST 2009


Paul,

I stopped work on the SWIG wrappers for GEOS for three reasons

1) Abominable Python API derived from GEOS C++ (personal taste,  
admittedly)
2) Instability of C++ API between 2.2 and 3.0
3) Accessing libgeos_c via libffi and ctypes is more portable

As far as I know, Charlie is still supporting Ruby through SWIG, and I  
think that means that Python support remains pretty close. I do think  
that Python users should be using Shapely (outside of GeoDjango), but  
realize that people may want other options. Shapely requires Python  
2.4, and one could generate wrappers with SWIG that would work with  
2.2 or 2.3.

Sean

On Feb 2, 2009, at 12:32 PM, Paul Ramsey wrote:

> Sean,
>
> I've never really grokked the pythonic state of affairs. Let me try
> and relay my guess: the python code in GEOS svn is orphaned; all
> pythonic work is largely flowing through shapely now, which doesn't
> need any code in the GEOS svn. Is that right? If so, I'd like to
> replace the python code in the release with a README that says "go use
> shapely".
>
> P
>
>
> ---------- Forwarded message ----------
> From: GEOS <geos-trac at osgeo.org>
> Date: Mon, Feb 2, 2009 at 11:12 AM
> Subject: [geos-devel] [GEOS] #228: import python bindings fails
> To: undisclosed-recipients
>
>
> #228: import python bindings fails
> ------------------------ 
> +---------------------------------------------------
> Reporter:  martinm     |       Owner:  geos-devel at lists.osgeo.org
>    Type:  defect      |      Status:  new
> Priority:  major       |   Milestone:  3.1.0
> Component:  Default     |     Version:  3.1.0rc1
> Severity:  Unassigned  |    Keywords:
> ------------------------ 
> +---------------------------------------------------
> Importing python module fails:
> {{{
>>>> import geos
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/Library/Python/2.5/site-packages/geos/geos.py", line 60, in
> <module>
>    class PySwigIterator(object):
>  File "/Library/Python/2.5/site-packages/geos/geos.py", line 64, in
> PySwigIterator
>    __swig_destroy__ = _geos.delete_PySwigIterator
> AttributeError: 'module' object has no attribute  
> 'delete_PySwigIterator'
> }}}
>
> --
> Ticket URL: <http://trac.osgeo.org/geos/ticket/228>
> GEOS <http://geos.refractions.net/>
> GEOS (Geometry Engine - Open Source) is a C++ port of the Java
> Topology Suite (JTS).
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel



More information about the geos-devel mailing list