Hi,

I've started adding tests for OverlayOp [1] and I noticed
curious results for basic test case.

OverlayOp(UNION) on Four segments of a sqare
always construct a MultiLineString.
I'd have expected a polygon, shouldn't I?

In this case, I noticed OverlayOp always labels edges
as UNDEF or BOUNDARY this simply leads to non-area
results and the PolygonBuilder never receives any input
which qualifies as a polygon.

As you can see in the test, the union is constructed
incrementally:

GeometryPtr lines12(line1->Union(line2.get()));
GeometryPtr lines123(lines12->Union(line3.get()));
GeometryPtr lines1234(lines123->Union(line4.get()));

but the same result (MultiLineString) is returned
if I union via UnaryUnion on MultiLineString or GeometryCollection.

My questions are:
1. Is this expected behaviour?
2. Am I missing any trick to actually obtain the polygon?

[1] https://trac.osgeo.org/geos/changeset/4153

Best regards,
-- 
Mateusz Łoskot, http://mateusz.loskot.net
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to