1

I have an IRaster object as output from a function. I need to be able to get the name of that raster. Is there a way that I can do that? I know that I can't mask an IRaster as an IRasterDataset. If I could, I would be able to get the Name property from that (I think). Thanks!

1

I was able to accomplish the above this way . . .

        ESRI.ArcGIS.Carto.IRasterLayer rasterLayer = new RasterLayerClass();
        rasterLayer.CreateFromRaster(raster);
        string sRasterName = rasterLayer.Name;
  • If possible, you might consider having your function output an IRasterLayer or IRasterDataset rather than an IRaster. – Radar Dec 9 '13 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.