How to get a raster catalog from a geodatabase raster catalog layer


This sample shows how to get a raster catalog from a geodatabase raster catalog layer.

How to use

  1. Add this function to your project.
  2. Call this function from your code.
[VBA]
Public Function GetRasterCatalogFromLayer(pRasterCatalogLayer As IGdbRasterCatalogLayer) As IRasterCatalog
    'Geodatabase raster catalog layer is a type of feature layer
    Dim pFeatureLayer As IFeatureLayer
    Set pFeatureLayer = pRasterCatalogLayer
    
    'FeatureClass property returns a raster catalog
    Dim pFeatureClass As IFeatureClass
    Set pFeatureClass = pFeatureLayer.FeatureClass
    Set GetRasterCatalogFromLayer = pFeatureClass
End Function