checkValidPol method
Checks the validity of a polygon. Sets the validErr flag.
Implementation
void checkValidPol(Polygon g) {
checkInvalidCoordinates(g);
if (validErr != null) return;
checkClosedRings(g);
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;
}
checkHolesInShell(g, graph);
if (validErr != null) return;
//SLOWcheckHolesNotNested(g);
checkHolesNotNested(g, graph);
if (validErr != null) return;
checkConnectedInteriors(graph);
}