private MultiPolygon readMultiPolygon(OraGeom oraGeom){
  int nElem=oraGeom.numElements();
  List geoms=new ArrayList();
  for (int i=0; i < nElem; i++) {
    int etype=oraGeom.eType(i);
    if ((etype == OraGeom.ETYPE.POLYGON) || (etype == OraGeom.ETYPE.POLYGON_EXTERIOR)) {
      Polygon poly=readPolygon(oraGeom,i);
      i+=poly.getNumInteriorRing();
      geoms.add(poly);
    }
 else {
      break;
    }
  }
  MultiPolygon polys=geometryFactory.createMultiPolygon(GeometryFactory.toPolygonArray(geoms));
  return polys;
}

private MultiPolygon readMultiPolygon ( OraGeom oraGeom ) { int nElem = oraGeom . numElements ( ) ; List geoms = new ArrayList ( ) ; for ( int i = 0 ; i < nElem ; i ++ ) { int etype = oraGeom . eType ( i ) ; if ( ( etype == OraGeom . ETYPE . POLYGON ) || ( etype == OraGeom . ETYPE . POLYGON_EXTERIOR ) ) { Polygon poly = readPolygon ( oraGeom , i ) ; i += poly . getNumInteriorRing ( ) ; geoms . add ( poly ) ; } else { break ; } } MultiPolygon polys = geometryFactory . createMultiPolygon ( GeometryFactory . toPolygonArray ( geoms ) ) ; return polys ; }
create multipolygon as encoded by eleminfo .
