Boost logo

Geometry :

Subject: [ggl] Understanding get_turns for linestring/polygon overlay
From: Barend Gehrels (barend.gehrels)
Date: 2011-02-03 11:14:59

Hi John,

> I have a simple case working (where the cut only crosses the boundary of the polygon 2 times). However, I noticed that when I am building it for the iphone simulator things work fine. However, when I build it for the iphone device there are errors. I think it may have to do with the compiler and standard template libraries used for the iphone device. I think it may be more the compiler than the STL because the problem is occurring in deque.tcc and this file is the same for both the simulator and device source trees.
> The offending line of code is when I try to union one half of my split polygon with a reflected version of the other half (I am "folding" the original polygon along a user defined line).
> union_(unreflectedPoly, reflectedPoly, ps);
> I have included the compiler error output below. The last Boost line of code in the error trace is in the traverse function. I don't understand the Boost.Geometry sources fully, but I tried to comment out the offending line:
> rings.resize(size_at_start);
> near line 260 of algorithms/detail/overlay/traverse.hpp and things compiled for both simulator and device. Things also appear to still be working fine, but I am sure that random commenting of lines of source code have definitely messed something up.
[snipped the rest]

It seems as if the resize method is not supported by that compiler.

I remember that resize is std::, but added relatively late, such that
some compilers do not support it (IIRC).

.replace might be replaced by something else e.g. an erase call. You
might experiment with that. But at least you could comment the resize
and check if it compiles (it will of course not run correctly then...)

Regards, Barend

Geometry list run by mateusz at