Subject: [ggl] Quick question about bg::difference
From: Barend Gehrels (barend)
Date: 2011-10-25 17:30:58


Hi,

On 24-10-2011 23:37, V D wrote:
> Hum, after running more test cases here is what seems to happen:
>
> bg::difference(MultiPolygon, Polygon) and bg::difference(Polygon, MultiPolygon) will return always return the polygon if they are disjoint.
> bg::difference(Polygon, Polygon) will always return the 1st polygon if they are disjoint.
>

Thanks. Yes, I could reproduce it and you are right. We have to fix this.

If we support 8 geometry types, there are (theoretically) 64
possibilities for difference, and all other algorithms having two input
arguments. We therefore try to limit this by automatically reversing
arguments, so MultiPolygon/Polygon will be reversed to
Polygon/MultiPolygon. I never realized or thought about it (blame me)
that for difference this of course can never be done.

So will fix this a.s.a.p. Thanks for the report.

Regards, Barend