SurfaceBoundary boundary = pf.createSurfaceBoundary(externalRing,
internalRings);
Polygon polygon = gf.createPolygon(boundary);
ArrayList patches = new ArrayList();
patches.add(polygon);
PolyhedralSurface result = gf.createPolyhedralSurface(patches);
return result;
} else if (geomType.equalsIgnoreCase("GeometryCollection") ||
geomType.equalsIgnoreCase("MultiPoint") ||
geomType.equalsIgnoreCase("MultiLineString") ||
geomType.equalsIgnoreCase("MultiPolygon")) {
com.vividsolutions.jts.geom.GeometryCollection jtsCollection =
(com.vividsolutions.jts.geom.GeometryCollection) jtsGeom;
int n = jtsCollection.getNumGeometries();
MultiPrimitive result = gf.createMultiPrimitive();
Set elements = result.getElements();
for (int i=0; i<n; i++) {
//result.getElements().add(jtsToGo1(jtsCollection.getGeometryN(i), crs));
elements.add(jtsToGo1(jtsCollection.getGeometryN(i), crs));
}
return result;