Accessing a raster catalog
A raster catalog can be stored in an ArcSDE geodatabase, a file geodatabase, or a personal geodatabase. To access a raster catalog, follow these steps:
- Open a raster workspace from the geodatabase. See Accessing raster workspaces for details.
- Use the IRasterWorkspaceEx interface to access the raster catalog.
The following code example shows how to access a raster catalog in a geodatabase:
[C#] static IRasterCatalog OpenRasterCatalog(IRasterWorkspaceEx rasterWorkspaceEx, string
catalogName)
{
//Open a raster catalog in a geodatabase (PGDB, FGDB, or ArcSDE).
return rasterWorkspaceEx.OpenRasterCatalog(catalogName);
}
[VB.NET] Public Function OpenGDBRasterDataset(ByVal rasterWorkspaceEx As IRasterWorkspaceEx, ByVal datasetName As String) As IRasterDataset
'Open a raster dataset in a geodatabase (PGDB, FGDB, or ArcSDE).
Return rasterWorkspaceEx.OpenRasterDataset(datasetName)
End Function
To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
- ESRI.ArcGIS.DataSourcesGDB
- ESRI.ArcGIS.DataSourcesRaster
- ESRI.ArcGIS.Geodatabase
- ESRI.ArcGIS.System (ESRI.ArcGIS.esriSystem)
Development licensing | Deployment licensing |
---|---|
ArcGIS Desktop Advanced | ArcGIS Desktop Advanced |
ArcGIS Desktop Standard | ArcGIS Desktop Standard |
ArcGIS Desktop Basic | ArcGIS Desktop Basic |
Engine Developer Kit | Engine |