use of com.revolsys.geometry.operation.overlay.MaximalEdgeRing in project com.revolsys.open by revolsys.
the class ConnectedInteriorTester method buildEdgeRings.
/**
* Form DirectedEdges in graph into Minimal EdgeRings.
* (Minimal Edgerings must be used, because only they are guaranteed to provide
* a correct isHole computation)
*/
private List buildEdgeRings(final Collection dirEdges) {
final List edgeRings = new ArrayList();
for (final Iterator it = dirEdges.iterator(); it.hasNext(); ) {
final DirectedEdge de = (DirectedEdge) it.next();
// if this edge has not yet been processed
if (de.isInResult() && de.getEdgeRing() == null) {
final MaximalEdgeRing er = new MaximalEdgeRing(de, this.geometryFactory);
er.linkDirectedEdgesForMinimalEdgeRings();
final List minEdgeRings = er.buildMinimalRings();
edgeRings.addAll(minEdgeRings);
}
}
return edgeRings;
}
Aggregations