Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a simple model that calculates the NDVI from bands 3 and 4 of a raster dataset. The input bands are 8-bit unsigned, whereas the default output NDVI is signed 32 bit.

How can I specify the pixel depth for the output NDVI as 8 bit unsigned?

enter image description here

share|improve this question
Can this be controlled with an environment setting? – L_Holcombe Feb 12 at 15:43
I haven't found a way to specify the pixel depth in the environment settings. – Aaron Feb 12 at 16:03

1 Answer

The result from NDVI will be continuous (i.e. decimal) values between -1 to +1, therefore the raster must be able to store these values, and will use signed pixel depth. If you truly want 8-bit unsigned, you will need to adjust the expression in the raster calculator by linearly scaling to values between 0-255 and then applying the int() function on the entire calculation. However, this still does not guarantee that the output will be 8-bit unsigned. Perhaps try Copy Raster on the scaled raster with the optional pixel_type parameter in your model to help with this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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