Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jts-dev] Struggling with polygon topology again. Overlapping inner polygons.

Hmm, this version works;

Polygon op = geometryFactory.createPolygon(p.getExteriorRing().getCoordinates());
                Geometry g = op;
                for (k=0;k<p.getNumInteriorRing();k++) {
Polygon ip = geometryFactory.createPolygon(p.getInteriorRingN(k).getCoordinates());
                   g = OverlayOp.overlayOp(g, ip, OverlayOp.DIFFERENCE);
                }


Now just need to figure out why the output geometry is a multipolygon...

--
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.



Back to the top