Boost logo

Geometry :

Subject: [ggl] Understanding get_turns for linestring/polygon overlay
From: Barend Gehrels (barend.gehrels)
Date: 2011-02-04 07:24:46


Hi John,

>
> I was going to replace the .resize with the following code, but because I don't ever hit this and can't be sure I have all the indices right, I am just going to put the assert in there as suggested.
>
> std::size_t ringsSize = rings.size();
> if (ringsSize> size_at_start) {
> rings.erase(rings.end() - (ringsSize-size_at_start),rings.end());
> }
> else if (ringsSize< size_at_start) {
> for (int i = 0; i< (size_at_start-ringsSize); i++) {
> typename boost::range_value<Rings>::type current_output;
> rings.push_back(current_output);
> }
> }

Thanks I'll have a look.

> I appreciate the quick replies and once I have this polygon cutter code completed, I will give it to you for inclusion in the library (probably after Boostifying it as I am sure my code looks nothing like the Boost standard).
OK, cool!

Regards, Barend


Geometry list run by mateusz at loskot.net