Subject: Re: [geometry] union of 2 polygons is wrong.AND an intersect bug
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-01-30 13:31:35
On 29-1-2012 23:19, Zachary Deretsky wrote:
> I hope your cross product is using long long rather than doubles.
It uses what it already used (I only added the casts and moved code). So
no: the original code uses double's if not specified explicitly (and for
intersection you can't yet).
For area and centroid this makes sense: the result has to be converted
to double anyway, even for integer input.
For side we might change this indeed to boost::long_long_type (in case
of integer input). I think that change is convenient and easy, will look
(For area/centroid the temporary products could have this as well but
I'm hesitating to introduce another type there. But not impossible).
> I bumped into another bug when I was trying to find out whether a
> point is on a line, here is the code:
OK that is should indeed obviously intersect. I debugged and it is
considered as a degenerate linestring (correctly). However it still
should report it as an intersection, will solve that.
Thanks for this new report ;-)
Geometry list run by mateusz at loskot.net