Question: What Integer Data Type Does GRASS Use?

Dave Beverstock bever at erim.org
Fri Sep 10 14:53:05 EDT 1993


I have Landsat TM data, Band 5 and 7.  I refer to the r.mpacalc
tutorial manual that came with the 4.1(beta?) release. Following the
tutorial I use r.mapcalc to scale the two bands. The tutorial states
that the raster image is stored as an integer file.  What is the data
format of the resulting new raster image ?  Is it signed or unsigned 8
bit, 16 bit, 32 bit integers?

EG: mapcalc> img1 = ((2.95*tmb.5) + (4.2*tmb.7)) - float(30)

I am concerned because somewhere I thought I read that GRASS stores
raster images as unsigned 8 bit words (0-255), and it's quite possible
that the equation above could generate negative numbers which would be
then probably clipped to 0.

If this is the case is there an alternative data type I can select?

dave





More information about the grass-dev mailing list