IWorkspaceFactory WSFact = new FileGDBWorkspaceFactoryClass(); IFeatureWorkspace FWS; FWS = WSFact.OpenFromFile("C:\\project\\terrain.gdb", 0)as IFeatureWorkspace;
Solved! Go to Solution.
Much appreciated - thanks for the help thus far.
It seems that the path I'm walking down is not very popular - ESRI undoubtedly wants customers to stick with their flagship products : ArcDesktop, View, Map etc. and customize them only when necessary - instead of using their own SDK to redevelop features.
In our defence I must state that we are upgrading a product which used MapObjects 2.2 - and want to keep functional and interface changes to a minimum.
My bad feeling at this point is that we're still going to be implementing a lot of features ourselves (e.g. terrain profile) if it turns out to be this difficult just to find out how to load STRM data into a data set.
Dim rasterLayer As ESRI.ArcGIS.Carto.IRasterLayer = New ESRI.ArcGIS.Carto.RasterLayer rasterLayer.CreateFromFilePath("E:\Development\N10E012.hgt") rasterLayer.Name = "test layer" DirectCast(m_application.Document, IMxDocument).FocusMap.AddLayer(rasterLayer) DirectCast(m_application.Document, IMxDocument).UpdateContents()
IRasterWorkspace rasterWorkspace = (IRasterWorkspace)workspaceFactory.OpenFromFile(folderPath, 0);expects a folder path.
IRasterDataset rasterDataset = rasterWorkspace.OpenRasterDataset(filename);expects a filename (without path).