hstar
路人甲
路人甲
  • 注册日期2003-09-09
  • 发帖数18
  • QQ
  • 铜币750枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1909回复:1

Load image to Raster Column in a Geodatabase Table

楼主#
更多 发布于:2007-01-10 10:18
<P>arcgis9.0 以后,可以在单个Geodatabase Table   设 Raster  Field, 可以将图像文件存放到数据库中,在HELP中有Load Raster to Raster Column in a Geodatabase Table<BR>一个例子</P>
<P>Load Raster to Raster Column in a Geodatabase Table   </P>
<P><BR>Description: </P>
<P>This sample shows how to load a raster to a raster column of a table in the geodatabase. Products: Engine</P>
<P><BR>Platforms: Windows</P>
<P>Minimum ArcGIS Release: 9.0 </P>
<P>How to use: <BR>Call this function from VB6 or VBA. <BR>          <BR>Sub LoadToRasterColumn(pTable As ITable, oid As Long, _<BR>                      pRasterDs As IRasterDataset)</P>
<P>  'This procedure load pRasterDs to the raster field of the row with objectid<BR>  'of oid in a table pTable<BR> </P>
<P>  Dim pRow As IRow<BR>  Dim iRaster As Integer 'id for raster column<BR>  Dim iCnt As Integer<BR>  Dim pValue As IRasterValue<BR>  <BR>  Set pValue = New RasterValue<BR>        <BR>  Set pRow = pTable.GetRow(oid)<BR>  <BR>  iRaster = -1  <BR>   ' get the raster field id<BR> <BR>  For iCnt = 0 To pTable.Fields.FieldCount - 1<BR>    If pTable.Fields.Field(iCnt).Type = esriFieldTypeRaster Then<BR>      iRaster = iCnt<BR>      Exit For<BR>    End If<BR>  Next iCnt<BR>  <BR>  If iRaster = -1 Then<BR>    MsgBox "no raster column exists in the table"<BR>    Exit Sub<BR>  End If<BR>    <BR>    ' set the raster dataset to the raster field <BR>  Set pValue.RasterDataset = pRasterDs<BR>  pRow.Value(iRaster) = pValue<BR>  pRow.Store</P>
<P>    ' clean up <BR>  Set pValue = Nothing<BR>  Set pRow = Nothing</P>
<P>End Sub</P>
<P> 但是如果是具体的图像文件, 如何放到数据库中, 是否用</P>
<P>在 Set pValue.RasterDataset = LOAD(D:\image\s.jpg),这种形式, </P>

<P>请指点. 谢谢!<BR></P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15945
  • QQ554730525
  • 铜币25337枚
  • 威望15352点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2007-01-10 20:51
可以用raster catalog,也可以用raster dataset来保存影像数据
举报 回复(0) 喜欢(0)     评分
游客

返回顶部