Boost logo

Geometry :

Subject: [ggl] Re: Incorrect polygon area and problem with the boost::geometry::correct
From: Barend Gehrels (barend)
Date: 2011-03-20 15:01:03

Hi Vishnu,

On 18-3-2011 18:18, Vishnu wrote:
> The 2 lines below the comment "Custom Polygon Example" should #include the
> iostream and vector headers. It appears that the '<' and'>' cause them to
> be tossed out.
It was not only that, the same thing was happening with all the
std::vector< > definitions. But thanks for the codepad paste, it helped
me with that.

> Let me clarify. With boost-geometry-0.8, I see no difference when I use
> 'correct'. Here are the results I get with MS Visual Studio 2008:
> Area when using 'correct' with boost-geometry-0.6: 0.92
> Area when*not* using 'correct' with boost-geometry-0.6: 1.08
> Area when using 'correct' with boost-geometry-0.8: 1.08
> Area when*not* using 'correct' with boost-geometry-0.8: 1.08

I can now confirm this is indeed the case. My confusion was that I
tested with Trunk, not with 0.8.

So version 0.8 appears to have an error indeed in the "correct"
function. That error is solved shortly afterwards. I know what it is -
rings were accidentally copied by value there for reversal, with the
changes in interior-ring-types for better support for custom polygon
types. I suspect that this same error also causes the compilation issue
in 0.8

The best I can do is create a new tagged version (0.9). Is that OK for you?

Regards, Barend

Barend Gehrels
-------------- next part --------------
An HTML attachment was scrubbed...

Geometry list run by mateusz at