|
Geometry : |
Subject: [ggl] Re: Problems with the difference between two polygons
From: Enrico Leoni (lions.forever)
Date: 2011-08-14 22:56:00
Hi Angus,
On Sun, Aug 7, 2011 at 2:06 AM, Angus Johnson <awj1958_at_[hidden]> wrote:
> I'm not sure of the significance of your SVG image. It looks very different
> to the image I get from the coordinates above. Is this showing some sort of
> error with Clipper??
No, that was only an example. That case doesn't show errors with Clipper.
If you are interested I can bring a case where the result is not what I expect:
C = A - B (see attached file)
I tried to scale A and B by a factor of 1000 and maybe 1000000 but C
is never "clean" as I expect. Cases like this show problems with
several libraries.
> Thanks for all your efforts in doing these tests. The results are very
> interesting. Would you consider adding one more test that benchmarked
> self-intersecting polygons too?
I have tried. In the source code of my benchmark you can find a test
similar to the one implemented in your benchmark. However there is a
problem ... only four libraries can execute that test without throwing
an exception (Clipper, Gpc, Gtl, KBool), only Gpc and Clipper give
comparable results but sometimes Gpc gives less polygons (it is
difficult to say which one is correct). So in the end I have commented
those lines of code ...
Regards
Enrico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestPclW.zip
Type: application/zip
Size: 3850 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/ggl/attachments/20110814/01a616ab/TestPclW.zip
Geometry list run by mateusz at loskot.net