The resultant Multipolygon contains in fact just one polygon at
the end of the loop so easy to deal with (but my code would work
with multiples as well). In fact I found this to be better way to
construct my polygons than using polygonizer as I know I am
starting with collection of valid polys.
I couldnt make the operation work in TestBuilder either. Overlap,
difference just returned the outer ring.
On 21/09/2016 11:20 a.m., Martin Davis
wrote:
Not sure why the first version of the code would
not work - it *looks* functionally identical to the second
version.
You shouldn't have to use the OverlayOp class directly -
not the best JTS style (although supported by the API, might
not be as stable as the Geometry method).
The reason a MultiPolygon is returned is exactly what you
see in the image. 3 holes touch and surround a disconnected
area, which creates an extra polygon when the final one is
subtracted.
_______________________________________________
jts-dev mailing list
jts-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/jts-dev
--
Phil Scadden, Senior Scientist
GNS Science Ltd
764 Cumberland St, Private Bag 1930, Dunedin, New Zealand
Ph +64 3 4799663, fax +64 3 477 5232
Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.