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

関連記事

  • この記事を書いた人

羽田 康祐

Esri認定インストラクター、GIS上級技術者、測量士補、潜水士。GISy / GISc とその関連分野である地理学・地図学について日々の出来事で学んだ記憶を記録するためにブログを書いています。行動原理は伊達と酔狂。好きな地形は圏谷。好きな地図投影法はパースクインカンシャル図法。呉市生まれ広島市出身。GIS を使った自己紹介はこちら

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

© 2020 WINGFIELD since1981