Reputation: 13135
Anyone know of an algorithm or toolkit for python3 which I can use to combine touching 2D polygons in one polygon? Where the polygon is defined in terms of the lines that define its outer and indeed inner boundaries (A donought, for example, has an inner boundary to define its hole).
Before:
After:
In my case however I begin with equal sized squares (polygons) which I need to combine into larger polygons.
Thanks,
Barry
Upvotes: 3
Views: 1795
Reputation: 28868
I would say you can use GDAL, They also support Python 3.
http://trac.osgeo.org/gdal/wiki/GdalOgrInPython
Upvotes: 2
Reputation: 12711
It looks like the General Polygon Clipper library might do what you're looking for.
Upvotes: 2
Reputation: 1311
There is huge geometry library called opencascade and its python bindings. I don't know if they support python3 but it seems to be working. Btw, C library is very bad documented and very unintuitive so if with python is same I would try to find something better (easier).
Upvotes: 1