How to update the geometry column in a raster catalog


This sample shows how to update the geometry column in a 9.0 raster catalog, it will populate the geometry column with the extent of the raster in each row

How to use

  1. Call this function from VBA.
[VBA]
Sub UpdateGeometryInRasterCatalog(pSDEWs As IRasterWorkspaceEx, sCatalog As String)
    
    ' Update the geometry column in a 9.0 raster catalog
    Dim pCatalog As IRasterCatalog
    Dim pCatalogHelper As IRasterCatalogHelper
    
    'Open raster catalog
    Set pCatalog = pSDEWs.OpenRasterCatalog(sCatalog)
    
    'Initialize helper class
    Set pCatalogHelper = New RasterCatalogHelper
    
    'Update the geometry
    pCatalogHelper.UpdateFootprint pCatalog
    
    Set pCatalog = Nothing
    Set pCatalogHelper = Nothing
    
End Sub