checkValidMPol method
Implementation
void checkValidMPol(MultiPolygon g) {
for (int i = 0; i < g.getNumGeometries(); i++) {
Polygon p = g.getGeometryN(i) as Polygon;
checkInvalidCoordinates(p);
if (validErr != null) return;
checkClosedRings(p);
if (validErr != null) return;
}
GeometryGraph graph = new GeometryGraph(0, g);
checkTooFewPoints(graph);
if (validErr != null) return;
checkConsistentArea(graph);
if (validErr != null) return;
if (!isSelfTouchingRingFormingHoleValid) {
checkNoSelfIntersectingRings(graph);
if (validErr != null) return;
}
for (int i = 0; i < g.getNumGeometries(); i++) {
Polygon p = g.getGeometryN(i) as Polygon;
checkHolesInShell(p, graph);
if (validErr != null) return;
}
for (int i = 0; i < g.getNumGeometries(); i++) {
Polygon p = g.getGeometryN(i) as Polygon;
checkHolesNotNested(p, graph);
if (validErr != null) return;
}
checkShellsNotNested(g, graph);
if (validErr != null) return;
checkConnectedInteriors(graph);
}