HOW TO
Instructions provided describe how to enable ArcGIS 9.0 to recognize new images loaded into a raster catalog using the sderaster command. When creating an Embedded Raster Catalog using the sderaster command, register the raster catalog with the geodatabase so the images can be viewed by ArcGIS 9.0 Double-click the Spatial Database Connection, right-click on the raster catalog and select the 'Register with Geodatabase' option.
If any additional images are inserted into the raster catalog after it has been registered with the geodatabase, by way of the sderaster command, they will not show until the entire raster catalog has been re-registered with the geodatabase.
Code:
EXAMPLE :
sderaster -o insert -l raster_cat,image -c lz77 -G 4269 -a 0 -I bilinear -L -1 -t 128,128 -n 4_5.tif -f 4_5.tif -s buccaneers -i 5151 -u raster -p raster
sderaster -o insert -l raster_cat,image -c lz77 -G 4269 -a 0 -I bilinear -L -1 -t 128,128 -n 4_6.tif -f 4_6.tif -s buccaneers -i 5151 -u raster -p raster
Code:
Public Sub ReRegister_gdb()
Dim pCatalog As esriGeoDatabase.IRasterCatalog
Dim pCatalogHelper As esriGeoDatabase.IRasterCatalogHelper
Dim pWs As esriGeoDatabase.IRasterWorkspaceEx
Dim pPropertySet As esriSystem.IPropertySet
Dim pWsFact As esriGeoDatabase.IWorkspaceFactory
Dim sServer As String
Dim sInstance As String
Dim sDB As String
Dim sUsername As String
Dim sPassword As String
Dim sCatalog As String
sServer = InputBox("Server : ")
sInstance = InputBox("Instance : ")
sDB = InputBox("Database : ")
sUsername = InputBox("Username : ")
sPassword = InputBox("Password : ")
sCatalog = InputBox("Specify Raster Catalog you want to re-register : ")
Set pPropertySet = New esriSystem.PropertySet
With pPropertySet
.SetProperty "server", sServer
.SetProperty "instance", sInstance
.SetProperty "database", sDB
.SetProperty "user", sUsername
.SetProperty "password", sPassword
.SetProperty "version", ""
End With
Set pWsFact = New esriDataSourcesGDB.SdeWorkspaceFactory
Set pWs = pWsFact.Open(pPropertySet, 0)
'Open raster catalog
Set pCatalog = pWs.OpenRasterCatalog(sCatalog)
'Initialize helper class
Set pCatalogHelper = New esriGeoDatabase.RasterCatalogHelper
'Update the geometry
pCatalogHelper.UpdateFootprint pCatalog
Set pCatalog = Nothing
Set pCatalogHelper = Nothing
End Sub
Get help from ArcGIS experts
Download the Esri Support App