int i = 0;
Geometry[] geometries = new Geometry[geometryList.size()];
for (Object geoElement : geometryList)
{
String subType = (String) ((BasicDBList) geoElement).get( "type" );
GeometryType geoType = GeometryType.valueOf( subType );
geometries[i++] = createGeometry( geoType, (DBObject) geoElement );
}
geometryObj = geoFactory.createGeometryCollection( geometries );
}