norberdo

Loading raster catalog - ArcMap 9 to ArcMap 10

Discussion created by norberdo on Sep 5, 2011
Hello,
we have some problems with loading rasters after migrating our extension from ArcMap version 9 (Oracle 10) to 10 (Oracle 11). Let's take a look at some code:
IRasterWorkspaceEx pRWEx;
   IRasterCatalog rasterCatalog = null;
   IGdbRasterCatalogLayer  gdbRasterCatalogLayer = null;
            short transparecy = 0;
   try
   {             
    pRWEx = (IRasterWorkspaceEx)pWorkspace;   
    
    try
    {
     rasterCatalog = pRWEx.OpenRasterCatalog(sFeatureClassName);
    }
    catch
    {
     rasterCatalog = null;
    }
    if (rasterCatalog==null)
    {
     rasterCatalog = pRWEx.OpenRasterCatalog(pExtension.QualifyTableName(pWorkspace, sFeatureClassName));
    }  
    if (rasterCatalog != null)
    {
     gdbRasterCatalogLayer = new GdbRasterCatalogLayerClass();

     if (gdbRasterCatalogLayer.Setup((ITable)rasterCatalog) == false)
     {
      gdbRasterCatalogLayer = null;
     }
    }
                SetRasterCatalogRenderer(ref gdbRasterCatalogLayer, DisplayBackgroundValue, DisplayBackgroundColorR, DisplayBackgroundColorG, DisplayBackgroundColorB, colortyp, gridscale, gridcount, showgrid, sInvert);
                ILayer pRasterLayer = (ILayer)gdbRasterCatalogLayer;
                pRasterLayer.Name = sDescription;
                if (short.TryParse(sTransparecy, out transparecy))
                    SetTransparecy(pRasterLayer, transparecy);
                pMapLayers.InsertLayerInGroup(pTargetGroupLayer,(ILayer)gdbRasterCatalogLayer,  false, i ); 
    return gdbRasterCatalogLayer as ILayer ;

   }
   catch(Exception e)
   {
    ErrorLog.ErrorFunction("Wystapi?? b????d podczas dodawania warstwy  "+sFeatureClassName+" do mapy. " +e,"LadowanieWarstw_rcrArcGisLayerManager_LayerConfFromXml_AddRasterLayer");  
    m_bCheckLogFolder = true;
   }
   return null;


Unfortunatelly, method OpenRasterCatalog in both cases threw exception.
First: The operation was attempted on an empty geometry.
Second: Invalid parameter value passed to function

Rasters was exported from arcmap9 and imported in oracle 11 (arcmap 10). It is possible that there are some changes between versions causing errors?

Outcomes