visitShellInteriors method

void visitShellInteriors(
  1. Geometry? g,
  2. PlanarGraph graph
)

Mark all the edges for the edgeRings corresponding to the shells of the input polygons. Only ONE ring gets marked for each shell - if there are others which remain unmarked this indicates a disconnected interior.

Implementation

void visitShellInteriors(Geometry? g, PlanarGraph graph) {
  if (g is Polygon) {
    visitInteriorRing(g.getExteriorRing(), graph);
  }
  if (g is MultiPolygon) {
    for (int i = 0; i < g.getNumGeometries(); i++) {
      Polygon p = g.getGeometryN(i) as Polygon;
      visitInteriorRing(p.getExteriorRing(), graph);
    }
  }
}