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


How to access a raster catalog (ArcObjects .NET 10.4 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 for Desktop Advanced ArcGIS for Desktop Advanced
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
Engine Developer Kit Engine