http://svn.gispython.org/svn/gispy/Shapely/tags/1.1a1

This is a rough, first alpha of Shapely 1.1. Tests are largely  
passing. Docs are not yet up to date, though the API is mostly the same.

What's new:

* Coordinates now are stored primarily as Python arrays of floats.  
GEOS geometries are created as needed and cached. The has some effect  
on performance. Python access to coordinates is much more efficient.  
Chaining operations is less efficient because we're creating Python  
arrays for anonymous geometries unnecessarily. For example, the  
following code:

   p = Point(0.0, 0.0)
   b = p.buffer(10.0)
   x = list(b.exterior.coords)

benchmarks like this:

   1.1a1: 873 usec/pass
   1.0.12: 957 usec/pass

but this code, with operation chaining

   p = Point(0.0, 0.0)
   a = p.buffer(10.0).exterior.convex_hull.area

benchmarks

   1.1a1: 1931 usec/pass
   1.0.12: 271 usec/pass

I have some ideas about not computing Python arrays in the case of  
such anonymous geometries that should address this issue.

* Shapely now has a plugin architecture. The shapely.geos subpackage  
will eventually be moved to its own distribution. For now it is  
distributed with the shapely core. You can see in  
shapely.geometry.__init__.py how this particular package of plugins is  
enabled. I'm going to try to put together a pure Python package that  
provides a few of the shapely.geometry entry points to demonstrate how  
one can implement other backends.

Known Bugs:

* Adaptation of the geo interface is broken (no asShape())
* Heterogeneous geometry collections are broken
* Prepared geometry module shapely.prepared needs to be moved to  
shapely.geos.prepared

Some of you are interested in prepared geometries. Do try it out if  
you're curious, and let me know how your experience goes.

Cheers,
Sean

--
Sean Gillies
[email protected]
http://sgillies.net

_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to