Baz
Baz

Reputation: 13135

Combining adjoining 2D polygons

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:

Before

After:

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

Answers (3)

oz123
oz123

Reputation: 28868

I would say you can use GDAL, They also support Python 3.

http://trac.osgeo.org/gdal/wiki/GdalOgrInPython

Upvotes: 2

qba
qba

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

Related Questions