readPolygon method
Implementation
Polygon readPolygon() {
int numRings = dis.readInt();
List<LinearRing>? holes;
if (numRings > 1) holes = []; //..length = (numRings - 1);
LinearRing shell = readLinearRing();
for (int i = 0; i < numRings - 1; i++) {
holes!.add(readLinearRing());
// holes![i] = readLinearRing();
}
return factory.createPolygon(shell, holes);
}