if (patches.size() > 1) {
//throw new UnsupportedOperationException("This implementation does not support surfaces with multiple patches.");
final com.vividsolutions.jts.geom.Polygon[] polygons =
new com.vividsolutions.jts.geom.Polygon[patches.size()];
for (int i = 0; i < patches.size(); i++) {
final JTSGeometry jtsGeometry = (JTSGeometry) patches.get(i);
polygons[i] = (com.vividsolutions.jts.geom.Polygon) jtsGeometry.getJTSGeometry();
}
return JTSUtils.GEOMETRY_FACTORY.createMultiPolygon(polygons);
}
return ((JTSGeometry) patches.get(0)).getJTSGeometry();
}