Boost logo

Geometry :

Subject: [geometry] Boost.Geometry boolean operation usage on many polygons.
From: josh kim (josh.kim0323_at_[hidden])
Date: 2012-11-06 16:52:48


I am using boost.geometry which I expected to be more efficient and faster
than boost.polygon.
My task is basically to collect bunch of polygons and perform boolean
operations on those sets of polygons.
Because multi_polygon doesn't seem to allow polygons that overlaps, I
unionize each polygon to make a valid multi_polygon.
However, with my input set, which has many many polygons, at least a
thousand, it takes too long.

What is the right way to perform boolean operations on many polygons that
may overlap each other?

what I am doing is

for each input polygon
union_(multipoly1, polygon, tmpMultiPoly)
correct(tmpMultiPoly)
assign(multipoly1, tmpMultiPoly)
correct(multiPoly1)
clear(tmpMultiPoly)

and repeat the same for the second input set of polygons.

and then perform boolean operation.

Am I using the library correctly?
because from a post of comparison of libraries for polygon booleanizing
operations,
boost.geometry is the library that showed the best performance, I might not
be using functions correctly...

--
View this message in context: http://boost-geometry.203548.n3.nabble.com/Boost-Geometry-boolean-operation-usage-on-many-polygons-tp4025139.html
Sent from the Boost Geometry mailing list archive at Nabble.com.

Geometry list run by mateusz at loskot.net