Boost logo

Geometry :

Subject: Re: [geometry] Bug again in boost::geometry::union_
From: Barend Gehrels (barend_at_[hidden])
Date: 2014-02-12 07:46:23


Hi Sybren,

Sybren A. Stüvel wrote On 12-2-2014 13:28:
>
> On 12 February 2014 12:57, Barend Gehrels <barend_at_[hidden]
> <mailto:barend_at_[hidden]>> wrote:
>
> OK - I checked that compiler too, and fortunately there were only
> 2 small issues. Should be fixed now. (Note, I disabled that static
> assertion for MSVC, I will find out later why that causes problems
> now for MSVC only)
>
> Can you try again?
>
>
> There we go, now it compiles. Still gives problems, though, with the
> union_() function. It prints "Warning: d=0" to stdout/err.

Good. That warning can be ignored. It's a (more or less personal)
development branch. Please comment it in cart_intersect.hpp if you want
to get rid of it. I will fix this but it is, for me, diagnostic information

> I've attached a SVG file that contains the two input multi-polygons
> (in red & green) and the resulting output (in blue). You can clearly
> see that the blue polygon has a vertex too many, in its interior.

Ah, that is a known problematic side-effect. That has to be fixed too
but of course, if you need it today, or even somewhere this week, I
cannot do that.

You can try one more thing: please define BOOST_GEOMETRY_NO_ROBUSTNESS.
It will than skip all rescaling-to-integer-for-robustness code. That
sounds a bit weird, because this thread was to fix that. But besides the
rescaling more enhancements have been made, so it might be that your
code then runs OK. However, I cannot predict that, there are also cases
which really need this rescaling. So you can try how it looks.

Besides that, maybe even better, you can try to call the function
"geometry::remove_spikes" on your output. It hopefully will remove all
spikes which are generated.

Finally, could you also send me the WKT's of your input, for me to check
that generated internal spike (as we call it)?

Thanks, Barend



Geometry list run by mateusz at loskot.net