Boost logo

Geometry :

Subject: Re: [geometry] "Overlay invalid input exception" (fixed)
From: Barend Gehrels (barend_at_[hidden])
Date: 2012-07-14 13:03:43

Hi Volker again,

On 14-7-2012 17:29, Barend Gehrels wrote:
> On 13-7-2012 12:56, Volker Schöch wrote:
>> Hi Barend,
>> This has become our single most annoying issue with boost::geometry.
>> Since I haven't heard back from you in this regard, can you confirm
>> that it has been fixed in boost 1.50.0? Unfortunately, updating our
>> project from 1.48.0 to 1.50.0 is not as straight-forward as it should
>> be (for reasons outside boost.geometry) therefore I would appreciate
>> knowing it advance if the effort is worth it from a the geometry
>> perspective.
>> There seems to be no workaround for the "Overlay invalid input
>> exception" issue, and the whole issue is getting into the way of our
>> release schedule... Which is why I keep asking for a fix. For your
>> reference, I have attached the original reports below. I have more
>> reproductions available if need be.
> Hi Volker,
> I today have examined the problem. I mailed you before that I can
> reproduce the problem, using int, and that using double the problem
> does not occur. That is (alas) still the case. So the problem has not
> been fixed in 1.50.
> I hope the problem can be fixed and then the first version it might
> get in is 1.51, so if you are considering upgrading, w.r.t. this
> problem it is not worth going to 1.50.
> I understand the problem, don't need more reproductions currently
> (I'll ask if I need).
> A possible workaround is going to double. You can even go to double
> temporarily, only for this operation, and after that convert to back
> to int. But of course that is not ideal and sometimes not feasable.
> Regards, Barend

It is fixed now - sorry it took me so long - was busy with other things.

Intersection points could be located wrong for integer coordinates. This
is potentially quite severe for integer coordinates. Your trace is
running OK now, after the fix. Yes, please send me one or two more
reproductions to check other cases, if you want.

The fix will be included in Boost 1.51, scheduled for August 20. But it
is (at least for 1.50) a one-line fix, I can send you a patch for 1.50
or probably for 1.48 too.

Thanks again for the report.
Regards, Barend

Geometry list run by mateusz at