Is there a way that I can get the name of an IRaster object?

402
1
Jump to solution
12-09-2013 05:23 AM
Highlighted
Occasional Contributor
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!
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor
I was able to accomplish the above this way . . .
        ESRI.ArcGIS.Carto.IRasterLayer rasterLayer = new RasterLayerClass();
        rasterLayer.CreateFromRaster(raster);
        string sRasterName = rasterLayer.Name;

View solution in original post

Reply
0 Kudos
1 Reply
Highlighted
Occasional Contributor
I was able to accomplish the above this way . . .
        ESRI.ArcGIS.Carto.IRasterLayer rasterLayer = new RasterLayerClass();
        rasterLayer.CreateFromRaster(raster);
        string sRasterName = rasterLayer.Name;

View solution in original post

Reply
0 Kudos