My custom ring type is defined with an 'open' closure.
When i try to compare 2 geometrically equivalent ring and box,
bg::equals return false.
While investigating using the debugger, i discovered that the call to
geometry::collect_vectors() returns 4 points for a box, but only 3
points for a ring, so my 2 geometries can never be equal.
In my case, collect_vectors is dispatched to range_collect_vectors,
and by the look of it range_collect_vectors doesn't care about the
geometry object (and it's closure), since it sees only point
I found a similar thread back from 2014, but it actually deals with a
different problem, see
Right, it was something different:
And there is this bug report that seems to be equivalent to my use-case:
Thanks for the heads up. The component of this bug is set wrongly to
'polygon' so we missed it.
Am i missing something in my custom geometry trait adaptation? is it a
bug in BG, or a known limitation?
It is a bug. I pushed a fix to develop:
I'll try to release it with Boost 1.64.
Could someone shed some light on this? Any point-out to example,
documentation or archives would be welcome too.
If this is the same bug as #11899, could the fix be as simple as
making range_collect_vectors aware of the closure of the ring, or
maybe simply add a specialisation for rings?
Yes it probably is. You could check the bugfix mentioned above.
As a workaround probably relate() could be used but there probably
would be some difference in performance.