Unsigned Integer vs Signed Integer for Raster Data

Unsigned Integer vs Signed Integer

Last Updated: Feb 17, 2018

In brief, an unsigned integer is always non-negative numbers. But a signed integer can store negative values.

There are different types of files formats that can store signed and unsigned integers.

But which formats are they?

And when should you use unsigned and signed integers?

Unsigned Integer Raster

With an 8-bit unsigned raster, valid values are from 0 to 255. This means that an 8-bit raster has 256 values in total.




When you talk about valid ranges (or pixel depth), this is the radiometric resolution of a raster image.

Radiometric resolution is the amount of detail in each pixel expressed in units of bits. A wide range of values gives the ability for pixel values to discriminate very slight differences in energy.

All things being equal, an 8-bit raster produces significantly greater detail than a 4-bit raster.

Bit Depth
Bit Depth (8-bit vs 4-bit)

The valid range for a 8-bit signed is -128 to 127. If you have values larger than 127 or less than -128 in the input, than you will need to use 16-bit signed.

Some raster formats do not support signed images:

Signed Integer vs Unsigned Raster Formats

When you convert an image in ArcGIS ( Data Management Tools > Raster > Raster Dataset > Copy Raster  or another program, specify the pixel depth and file type.

When exporting as a signed raster, make note of the formats that support it.

For example:

  • JPEG, JP2, BMP, GIF and PNG do not support 8-bit signed, 16-bit signed or beyond. This means that you won’t be able to store negative values with these raster formats.
  • IMG, TIFF (GeoTIFF), GRID, JPEG, JP2, BMP, GIF, PNG, BIL/BIP/BSQ and DAT raster formats can store negative values.
  • IMG, TIFF an GRID are the most versatile formats. These formats accept 8-bit unsigned, 8-bit signed, 16-bit unsigned, 16-bit signed, 32-bit signed and 32-bit floating.

In Conclusion

Next time you’re selecting a raster output, carefully select whether or not it’s an unsigned integer or signed integer.

Unsigned numbers are always non-negative numbers.

Signed numbers can store negative values.

IMG, TIFF and GRID are acceptable formats for 8-bit, 16-bit and 32-bit signed integers.

1 Comment

Leave a Reply

Your email address will not be published.


*