Boost logo

Geometry :

Subject: [ggl] Clipping (i.e. intersection) issues, still.
From: Chris Browet (cbro)
Date: 2009-07-06 05:51:17


2009/7/6 Barend Gehrels <Barend.Gehrels_at_[hidden]>

> Hi list,
>
>
>
>
>> There is still polygon-box intersection isues, unfortunately (with SVN
>> revision 869, at least).
>>
> It turned out that it is the direction. If polygons are directed
> counter-clockwise, the generated intersection is the outside of that polygon
> with the inside of the box. Which is theoretically correct by the
> conventions we made. But it is of course not the intention.
>
> OGC defines that all polygons are directed clockwise, holes (interior
> rings) counter-clockwise.
>
>
> Chris, can you live for the moment with solution 1)? It means to call
> "ggl::correct", meaning that you probably have to make a copy, or call that
> immediately after the user edits the polygon, or whatever is convenient?
> Otherwhise we could think about 5) which is also feasable in a limited
> time?
>
>
Solution 1) is perfectly ok for me even as a long-term solution. Due to the
relative complexity for me of making custom polygons, I'm already making a
copy, and, as a matter of fact, was "correct"-ing at some point, but removed
it because I had in my mind "correct" only checked that the polygon is
closed (and was unaware of the "clockwiseness" importance while
intersecting).

I would suggest emphasizing this topic in the documentation for preview 5,
including detailing a bit what the "correct" function does.

Thanks
- Chris -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20090706/e7050557/attachment.html


Geometry list run by mateusz at loskot.net