[geos-devel] Geometry/Rectangle Intersection: winding order rectangle

Sandro Santilli strk at keybit.net
Mon Sep 15 07:53:43 PDT 2014


On Mon, Sep 15, 2014 at 04:12:04PM +0200, Sandro Santilli wrote:
> On Mon, Sep 15, 2014 at 03:16:16PM +0200, Sandro Santilli wrote:
> 
> > I wonder if the RectangleIntersection class should check winding order
> > and reverse rings if needed...
> 
> I've added a check for winding order in the rectangle clipping code.
> This adds one more full vertices scan for each hole. It doesn't look
> like code winding order would affect the algorithm, am I right ?
> 
> See commit 4ae01eb0711baac11c102a847b90952619379b0d

I was wrong, it was easy to find a case of failure with counterclockwise
shell. I'll add shell winding checking too. It'll add yet another full
vertex scan for the exterior ring, further degrading performances ...

--strk;

 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  


More information about the geos-devel mailing list