Use existing NoData value instead of promoting bit depth

885
0
05-20-2021 08:43 AM
Status: Open
Labels (1)
Joshua-Young
Occasional Contributor III

I do not know if it is by design or a bug, but raster tools such as Clip Raster populate a default NoData value one number higher than the max of the bit depth range. So if the input raster has a bit depth of 8-bit unsigned, the NoData value is automatically populated to 256. If you run the tool with that default the output raster is promoted to 16-bit unsigned bit depth with a NoData value of 256.

I think it would make more sense to have the default NoData either populate the existing NoData value or be blank if the input raster does not have a NoData value defined. I prefer that compared to having the bit depth promoted automatically.

I know there is a NoData environment variable. I have it at the default of None, but the tool is behaving as if the value is set to Promotion. I would think having the NoData environment variable set to None would ignore the tool's NoData value that is automatically set to 256 since that value is out of range.