1

I use Raster Calculator a lot for my work and was wondering if there is a way to set the output pixel depth to a desired value without using Copy Raster tool after I run a calculation, which is the only facility to do that.

In the ArcGIS 10.x help page, it mentions about the mechanism which controls how the no data value is created and promotion of pixel depth to the next higher bit, if required. However my experience with raster calculator is that whenever I use float rasters, it yields a 32-bit raster, even though the value range is limited to 8-bit signed or even binary. The best example to this is NDVI, even though Calculate Statistics tool says it ranges between float -1 and +1, I have this saved as 32-bit.

  • Are you doing NDVI analysis on a full raster scene, or did you clip the raster using feature class before doing NDVI analysis? – ahmadhanb May 9 '17 at 5:41
  • @ahmadhanb, depending on the problem, both. – fatih_dur May 9 '17 at 23:32
  • As far as I know, if you clip the raster using a feature class, the output will be a raster depth with a pixel depth of 32 bit even if the raster pixels values can be within 16 or 8 bit pixel depth. The problem might be due to the clipping of raster image rather than the raster calculator. – ahmadhanb May 10 '17 at 1:04
  • @ahmadhanb, Most probably this is related to the overall mechanism of Spatial Analyst or Raster Processing toolsets, somehow it promotes the depth. Thanks for the hint anyway. – fatih_dur May 10 '17 at 1:21
  • 1
    Related post: gis.stackexchange.com/q/85657/8104 – Aaron May 10 '17 at 3:02
3

As discussing the possible reasons with @ahmadhanb, I have realised the only issue was my ignorance. If the help page linked to question is read properly, one can see the only bit depth option for Float data is Floating-point 32 bit, therefore ArcGIS promotes the pixel depth to 32-bit if any float raster is selected as input/parameter.

Possible resolution can be transforming the float data by scaling up and/or rounding (maybe even winsorizing) to the desired range before saving.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.