private Surface readPolygonText() throws IOException, ParseException {
String nextToken = getNextEmptyOrOpener();
if (nextToken.equals(EMPTY)) {
return new SurfaceImpl((SurfaceBoundary) null); //this.primitiveFactory.createSurface((SurfaceBoundary) null);
}
ArrayList<Ring> holes = new ArrayList<Ring>();
Ring shell = this.readLinearRingText();
nextToken = getNextCloserOrComma();
while (nextToken.equals(COMMA)) {
Ring hole = readLinearRingText();
holes.add(hole);
nextToken = getNextCloserOrComma();
}
SurfaceBoundary sfb = new SurfaceBoundaryImpl(crs,
shell, holes); //this.primitiveFactory.createSurfaceBoundary(shell, holes);
return new SurfaceImpl(sfb); //this.primitiveFactory.createSurface(sfb);
}