Select to view content in your preferred language

RasterDataset - NoData, how to set based on format and/or pixel type/depth?

593
2
06-19-2013 10:05 AM
TerryGiles
Frequent Contributor
In ArcCatalog if you open the propreties of a RasterDataset you can edit the value of the NoData value.  On the Edit form, there's a button that says Compute (see attached).  I'm guessing this is based on the raster's pixel type & depth.  Is there a method on one of the many raster interfaces that can determine this value for you or do I need to write my own, e.g. using IRasterInfo::PixelType and switch statement?

Thanks, TG
0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor
Have a look at the IRasterProps Interface.
0 Kudos
TerryGiles
Frequent Contributor
Sorry, I should be been more clear in my original post.  I'm writing out a Raster Dataset & need to determine the appropriate value to pass in to IRasterProps::NoDataValue after using CreateRasterDataset from a RasterWorkspace, hence my line of thinking of using a combination of the pixel type and bit depth.
0 Kudos