This sample shows how to create a geodatabase raster catalog layer.
How to use
- Add this function to your project.
- Call this function from your code.
Public Function CreateGeodatabaseRasterLayer(pRasterWsExt As IRasterWorkspaceEx, sName As String) As IGdbRasterCatalogLayer
'pRasterWsExt represets the workspace where the raster catalog resides.
'sName is the name of the raster catalog
On Error GoTo erh
'Open the raster catalog
Dim pRasterCatalog As IRasterCatalog
Set pRasterCatalog = pRasterWsExt.OpenRasterCatalog(sName)
'Create the GdbRasterCatalogLayer
Dim pGdbRasterCatalogLy As IGdbRasterCatalogLayer
Set pGdbRasterCatalogLy = New GdbRasterCatalogLayer
If Not pGdbRasterCatalogLy.Setup(pRasCatalog) = True Then Exit Function
Set CreateGeodatabaseRasterLayer = pGdbRasterCatalogLy
erh:
Set CreateGeodatabaseRasterLayer = Nothing
End Function