[geos-devel] Fwd: Geometry/Rectangle Intersection: line touching rectangle

Sandro Santilli strk at keybit.net
Fri Sep 12 03:03:32 PDT 2014


On Fri, Sep 12, 2014 at 12:47:26PM +0300, Mika Heiskanen wrote:
> On 09/12/2014 12:42 PM, Sandro Santilli wrote:
> >Winding order of shells and holes do not count as per OGC validity.
> >Of course we could make RectangleIntersection ensure right-hand-rule
> >upfront...
> 
> The algorithm requires the winding orders to be correct with the
> right-hand-rule, otherwise it will reconnect the linestrings
> incorrectly.

Ah, this is an important information to document in the class,
it means we need to do this externally to ever use as replacement
for overlay based intersection. I've pushed that addition to class
doc.

BTW, is this statement correct in the docs ?

 [...] the second clips the boundaries of polygons,
 not the polygons themselves. 
 In the latter case polygons will be converted to polylines
 if any vertex is outside the clipping rectangle,
  ^^^^^^^^^^^^^^^^^^^^
 or will be cut out completely.

Does it mean fully-contained polygons would be omitted from output ?
Test 48 suggests the contrary (the polygon is found fully in output).

--strk;


More information about the geos-devel mailing list