IWorkspaceFactory WSFact = new FileGDBWorkspaceFactoryClass(); IFeatureWorkspace FWS; FWS = WSFact.OpenFromFile("C:\\project\\terrain.gdb", 0)as IFeatureWorkspace;
string filePath = @C:\Elevation Files\srtm; IWorkspaceFactory workspaceFactory = new RasterWorkspaceFactoryClass(); IRasterWorkspace rasterWorkspace = (IRasterWorkspace)workspaceFactory.OpenFromFile(filePath, 0);
if (RuntimeManager.Bind(ProductCode.Engine)) { licenseController = licenseController ?? new AoInitializeClass(); esriLicenseStatus licenseStatus = licenseController.Initialize(ESRI.ArcGIS.esriSystem.esriLicenseProductCode.esriLicenseProductCodeEngine); if (licenseStatus == esriLicenseStatus.esriLicenseAlreadyInitialized || licenseStatus == esriLicenseStatus.esriLicenseCheckedOut) { result = true; } }
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);
IRasterDataset rasterDataset = rasterWorkspace.OpenRasterDataset(filename);
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.