Boost logo

Geometry :

Subject: Re: [geometry] Boost.Geometry boolean operation usage on many polygons.
From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2012-11-17 15:40:04

Hi Josh,

Sorry for the delay to answer this.

I don't think there's anything wrong with your approach, but just a
question to start with: are you using the polygon type provided by
Boost.Geometry? If yes, then you should replace "assign(multipoly1,
tmpMultiPoly)" by a mere "multipoly1.swap(tmpMultiPoly)" since you're
getting rid of the tmp one just after anyway. Swap is a mere pointers
exchange, as opposed to actually copying every point one by one.

If you are using your own polygon, you might want to implement a swap
operation to achieve similar result.

Also there's no indentation in the pseudocode you're showing - my
guess is that the last 2 lines are outside the for loop but can you


Geometry list run by mateusz at