YouTube | Facebook | X(Twitter) | RSS

ジオデータ ラスター カタログ レイヤーの作成

2016/9/1 (木)

http://resources.esri.com/help/9.3/arcgisengine/dotnet/0c13ab62-2579-4b37-9933-e034d77d6fe5.htm

public static void AddRasterCatalogLayer(ESRI.ArcGIS.Carto.IActiveView
  activeView, ESRI.ArcGIS.Geodatabase.IRasterCatalog rasterCatalog)
{
  //Create a raster catalog layer.
  ESRI.ArcGIS.Carto.IGdbRasterCatalogLayer rastercatalogLayer = new
    GdbRasterCatalogLayerClass();
  rastercatalogLayer.Setup((ITable)rasterCatalog);
  //Add it to map if the layer is valid.
  if (!(rastercatalogLayer == null))
  {
    ESRI.ArcGIS.Carto.IMap map = activeView.FocusMap;
    map.AddLayer((ILayer)rastercatalogLayer);
  }
}
Public Shared Sub AddRasterCatalogLayer(ByVal activeView As ESRI.ArcGIS.Carto.IActiveView, ByVal rasterCatalog As ESRI.ArcGIS.Geodatabase.IRasterCatalog)
'Create a raster catalog layer.
Dim rastercatalogLayer As ESRI.ArcGIS.Carto.IGdbRasterCatalogLayer = New GdbRasterCatalogLayerClass()
rastercatalogLayer.Setup(CType(rasterCatalog, ITable))
 
'Add it to map if the layer is valid.
If Not (rastercatalogLayer = Nothing) Then
    Dim map As ESRI.ArcGIS.Carto.IMap = activeView.FocusMap
    map.AddLayer(CType(rastercatalogLayer, ILayer))
End If
End Sub
'VBA 10 Help
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
  • この記事を書いた人

羽田 康祐

伊達と酔狂のGISエンジニア。GIS上級技術者、Esri認定インストラクター、CompTIA CTT+ Classroom Trainer、潜水士、PADIダイブマスター、四アマ。WordPress は 2.1 からのユーザーで歴だけは長い。 代表著書『"地図リテラシー入門―地図の正しい読み方・描き方がわかる』 GIS を使った自己紹介はこちら。ESRIジャパン(株)所属、元青山学院大学非常勤講師を兼務。日本地図学会第31期常任委員。発言は個人の見解です。

-プログラミング, ArcGIS
-, ,