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

678
1
Jump to solution
12-09-2013 05:23 AM
ReneeCammarere
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!
0 Kudos
1 Solution

Accepted Solutions
ReneeCammarere
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

0 Kudos
1 Reply
ReneeCammarere
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;
0 Kudos