YouTube | Facebook | Twitter  Feed

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

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

関連記事

  • この記事を書いた人

羽田 康祐

Twitter#一日一図法を連載中。GIS上級技術者、Esri認定インストラクター、CompTIA CTT+ Classroom Trainer、潜水士、元PADIダイブマスター、四アマ。 代表著書『地図リテラシー入門―地図の正しい読み方・描き方がわかる』 GIS を使った自己紹介はこちら。ESRIジャパン(株)所属、発言は個人の見解です。

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