Problems with rasterdataset NoData Value

12-07-2013 06:19 PM
New Contributor II
Using ArcGIS 10.1 Build 3035...

I am having terrible trouble setting a NoData value for a file geodatabase rasterdataset with ArcObjects.  I create the rasterDataset, and populate the pixels without trouble.  I set the NoData to -9999, which is my preferred nodata value.

        private IRaster getRaster(IRasterDataset rasterDataset, float noDataValue)
            // Create a raster in the dataset; also add a bands collection
            IRaster rc = new RasterClass();
            IRasterBandCollection rasterBC;
            rasterBC = (IRasterBandCollection)rc;

            // Now set the raster properties
            IRasterProps resultProps = (IRasterProps)rasterBC.Item(0);

            // assign the NoDataValue and return
            resultProps.NoDataValue = noDataValue;
            return rc;

There are no errors thrown, so I assume all is well.

I then look at the properties of my new rasterDataset in ArcCatalog.  All settings are fine OTHER than the NoValue. Hmm.  I have been tearing my hair out trying to make this value get saved into the FGBD.

To try and find my mistake, using ArcCatalog, I manually created a new FGBD, then manually created a new RasterDataset (picel type: floating point, and set the NoData value to -9999.  It appears to accept the value, but if I then F5 to refresh the geodatabase, and check the raster settings, the noData value is blank.


This leads me to believe there is a problem setting the novalue field in ArcGIS10.1 when using a file geodatabase.  It is not just in ArcObjects, but also in ArcCatalog.

I trawled thru the forums, and can see others have had this problem, but there is nobody with a clear solution which actually works.  Indeed, if it does not manually work in ArcCatalog, then ArcObjects has no chance.

Can anyone help?
0 Kudos
2 Replies
Esri Esteemed Contributor
You'd be better off posting raster questions in the Imagery and Raster Data forum
ArcObjects questions are more likely to receive a response over in ArcObjects SDKs.

It's entirely possible that you need to recode the NODATA after your processing task.

- V
0 Kudos
New Contributor III


I am having the same problem. Did you ever find a solution?

0 Kudos