我在用程序将遥感数据集Raster或者DEM加到RasterCatalog时,出现the raster buffer size is too small错误,请问高手如何解决?蓝颜色位置处代码出错
Public Sub DirToGDB(pWs As IWorkspace, pCatalog As IFeatureClass)
Dim pSDERasterWs As IRasterWorkspaceEx
Dim pEunmDatasets As IEnumDataset
Dim pCatalogFeature As IRasterCatalogItem
Dim pRasterDs As IRasterDataset
Dim pCursor As IFeatureCursor
Dim pRow As IFeatureBuffer
' get the list of datasets in the input workspace
Set pEunmDatasets = pWs.Datasets(esriDTRasterDataset)
pEunmDatasets.Reset
' load raster datasets from the input workspace
Set pRasterDs = pEunmDatasets.Next
Set pCursor = pCatalog.Insert(False)
Dim pCat As IRasterCatalog
Set pCat = pCatalog
' loop through all the datasets and load
Do While Not pRasterDs Is Nothing
Set pRow = pCatalog.CreateFeatureBuffer
pRow.Value(pCat.RasterFieldIndex) = createRasterValue(pRasterDs)
pCursor.InsertFeature pRow (出错位置the raster buffer size is too small)
Set pRasterDs = pEunmDatasets.Next
Loop
' cleanup
Set pCatalog = Nothing
Set pSDERasterWs = Nothing
Set pEunmDatasets = Nothing
Set pCatalogFeature = Nothing
Set pRasterDs = Nothing
End Sub