On 09/09/2014 01:48 PM, Sandro Santilli wrote:
RE: rectangle intersection (#699)
I've plugged the leak and compared the result of Geometry::intersection()
and RectangleIntersection. One difference is about the linemerge operation
happening in the RectangleIntersection class, that is a line going outside
and then back inside the clipping rectangle gets merged by
RectangleIntersection while it is not by standard intersection.
The tests you provided expect the merging to happen, so if I drop the merging
those tests are going to fail. What's the rationale for that additional
operation ?
I assume you are referring to these comments:
* Sample clip with a rectangle 0,0 --> 10,10 without reconnecting:
*
* Input: POLYGON ((5 10,0 0,10 0,5 10))
* Output: MULTILINESTRING ((5 10,0 0),(10 0,5 10))
* Desired: LINESTRING (10 0,5 10,0 0)
If you recall, we wrote the algorithm for rendering. In this case if we
do not reconnect the two linestrings line-join behaviour will be broken
during rendering.
Regards,
Mika Heiskanen / FMI
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel