[Community] Shapely and polygon simplifications
Sean Gillies
sean.gillies at gmail.com
Mon Nov 9 22:13:12 EET 2009
On Nov 9, 2009, at 7:43 PM, Helge Jensen wrote:
> I am doing simplification of polygons for storage and calculation
> efficiency. and would like to do polygon-simplification.
>
> Currently I use the postgis function ST_SimplifyPreserveTopology to
> do the
> simplification, however the dataset is growing large and I would
> like to
> move the pre-processing away from the database which should be busy
> answering real-time queries.
>
> I am already doing pre-processing (parsing from list(x,y,level),
> rasterisation and polygonization) in python (and distributed too,
> thanks to
> the new multiprocessing module).
>
> So, I spotted the shapely bindings for GEOS, and the thread
> http://www.mail-archive.com/community@lists.gispython.org/msg00510.htmlwhich
> indicated that a Douglas-Peucker variant was easily accessible for me
> and my pre-processing code.
>
> However I have checked out the trunk and not been able to "from
> shapely.geos.ops import simplify", or even find the shapely.geos.ops
> module
Hi,
In that email, I'd suggested that in the trunk I *might* move the
simplify method to a function in an ops module, or provide a
complementary function. The work hasn't been done yet.
Instead of using the trunk, I strongly recommend trying the 1.2
branch. Aron Bierbaum has put a lot of work into it, tests are
passing, and I think we're pretty close to where we can start to
consider a preview release. A geometry simplify method or its
functional counterpart isn't implemented there yet, but wouldn't be
much work, and would be a lot closer to being deployable than the
Shapely trunk.
http://svn.gispython.org/svn/gispy/Shapely/branches/1.2
Aron, what do you think about simplification for 1.2?
--
Sean Gillies
Programmer
Institute for the Study of the Ancient World
New York University
More information about the Community
mailing list