laptop and a wrench

Bug

IMapAlgebraOp::Execute returns "Failed to open raster dataset" if the raster is not accessed as a layer from the MapDocument.

Last Published: August 25, 2014 ArcGIS Engine
Bug ID Number NIM038737
SubmittedSeptember 24, 2008
Last ModifiedJune 5, 2024
Applies toArcGIS Engine
Version found9.3
StatusWill Not Be Addressed

Additional Information

No Public Explanation

Workaround

Use the Conversion tools instead//Initialize esriLicenseProductCode productCode = ESRI.ArcGIS.esriSystem.esriLicenseProductCode.esriLicenseProductCodeArcEditor; AoInitialize aoInit = new AoInitializeClass(); if (aoInit.IsProductCodeAvailable(productCode) == esriLicenseStatus.esriLicenseAvailable) { aoInit.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeSpatialAnalyst); aoInit.Initialize(productCode); } IWorkspaceFactory rwsf = new RasterWorkspaceFactoryClass(); IWorkspace ws = rwsf.OpenFromFile("C:\\Temp",0); IRasterWorkspace2 rws2 = ws as IRasterWorkspace2; IRasterDataset rds = rws2.OpenRasterDataset("TestGrid"); IRaster raster = rds.CreateDefaultRaster(); IWorkspaceFactory swsf = new ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactoryClass(); IWorkspace sws = swsf.OpenFromFile("C:\\Temp",0); string sOutFCName = "myShapefile2.shp"; IConversionOp convOp = new RasterConversionOpClass(); IGeoDataset rastergds = raster as IGeoDataset; IGeoDataset geoFCOut = convOp.RasterDataToPointFeatureData(rastergds, sws, sOutFCName);

Steps to Reproduce

Bug ID: NIM038737

Software:

  • ArcGIS Engine

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options