AnsweredAssumed Answered

Get Raster Layer from Path

Question asked by stanynek on Aug 26, 2012
Latest reply on Sep 16, 2012 by stanynek
Hi,

I need advise. I have raster data stored in File Geodatabase. I'd like to access raster layer. I've done this for vector layer in same GDB, but don't know how to access raster data.

    Public Function GetLayer(ByVal path As String) As IFeatureLayer          Dim strOutputFileName As String = System.IO.Path.GetFileName(path)          Dim strOutputFolderName1 As String = System.IO.Path.GetDirectoryName(path)          Dim strOutputFolderName As String = strOutputFolderName1.Remove(strOutputFolderName1.Length - 1)          Dim pWorkspaceFactory As IWorkspaceFactory = New ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass         Dim pFeatureWorkspace As IFeatureWorkspace = pWorkspaceFactory.OpenFromFile(strOutputFolderName, 0)          Dim pFLayer As IFeatureLayer = New FeatureLayer         pFLayer.FeatureClass = pFeatureWorkspace.OpenFeatureClass(strOutputFileName)          Return pFLayer      End Function


Easy, but I'm stuck. Thanks for help!

Outcomes