cpicciri

Failed to open raster dataset error

Discussion created by cpicciri on May 17, 2012
Latest reply on Jun 2, 2014 by Ahmed.ElSisiesrinea-esridist
Hi everyone,

The code below has been functioning fine for years in VBA and now C# but suddenly stopped working this week. I can load raster imagery manually but the code below fails on the last line and I get a "failed to open raster dataset" error.

Anyone have an idea what I can do to fix this?

Thanks,
Carlos

IWorkspaceFactory pWorkspaceFactory = new RasterWorkspaceFactory();
IRasterWorkspace pRasterWorkspace = pWorkspaceFactory.OpenFromFile(rasterPath, 0) as IRasterWorkspace;
IRasterDataset pRasterDataset = pRasterWorkspace.OpenRasterDataset(rasterName);

Outcomes