
Geometry : 
Subject: Re: [geometry] union of 2 polygons is wrong.AND an now a DISTANCE bug
From: Zachary Deretsky (zach.deretsky_at_[hidden])
Date: 20120203 19:04:15
Barend,
thank you.
Here is one more, which I fail to explain:
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
int main()
{
typedef boost::geometry::model::d2::point_xy<int> point_xy;
point_xy p1(2544000, 528000);
point_xy p2(2768040, 528000);
double dist = boost::geometry::distance(p1, p2);
std::cout << "p1 " << boost::geometry::dsv(p1) << std::endl;
std::cout << "p2 " << boost::geometry::dsv(p2) << std::endl;
if(224040 != (unsigned int)dist) {
std::cout << "INCORRECt distance " << dist << std::endl;
return 1;
} else {
std::cout << "Correct distance " << dist << std::endl;
return 0;
}
return 0;
}
On Fri, Feb 3, 2012 at 2:19 PM, Barend Gehrels <barend_at_[hidden]> wrote:
> Hi Zachary,
>
>
>
>> I bumped into another bug when I was trying to find out whether a point
>> is on a line, here is the code:
>>
>>
> Has been fixed.
>
> This (and previous fix with the large integers) will be included in Boost
> 1.49, because the release branch is reopened, for bugfixes. So I'm glad
> with that. Thanks again for the report.
>
>
> I hope your cross product is using long long rather than doubles.
>>
>>
> We will work on that but that is not a fix but rather an enhancement, so
> that goes for 1.50
>
> Regards, Barend
>
>
> ______________________________**_________________
> Geometry mailing list
> Geometry_at_[hidden]
> http://lists.boost.org/**mailman/listinfo.cgi/geometry
>
Geometry list run by mateusz at loskot.net