
Geometry : 
Subject: Re: [geometry] Possible bug in boost::geometry::equals ?
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 20140125 19:40:15
Hi,
20140121 <yohann.benedic_at_[hidden]>
> Hi there,
>
> To summarize, if two polygons are built spatially equal, then
> boost::geometry::equals sometimes fails to recognize it.
> I hope this post is not a duplicate. I googled around and did not find
> anything.
>
> <snip>
>
> From my investigations, the problem comes from the building of the
> "pointdirection" vectors, which end up having different sizes. At some
> point in the algorithm, the direction of the last point is compared to the
> one of the first point and the latter is removed if equal. Here it happens
> between the last point of the interior ring and the first of the exterior
> ring : on p1 they are different but on p2, hence the difference of size
> that causes equals to fail.
>
>
Thanks for the info. It was indeed caused by an error in collect_vectors
internal utility used by equals(). It should be fixed in the develop branch.
Regards,
Adam
Geometry list run by mateusz at loskot.net