This document is archived and information here might be outdated.  Recommended version.


How to access a raster catalog (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > Developing with ArcGIS > Learning ArcObjects > Managing data > Working with image and raster data > Working with raster catalogs > How to access a raster catalog (ArcObjects .NET 10.6 SDK)

How to access a raster catalog


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:
  1. Open a raster workspace from the geodatabase. See Accessing raster workspaces for details.
  2. 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):
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