previous Index next
Datatypes A-Z Vector Files
Raster Documentation Files

Raster File Structure

IDRISI names raster files as images. Each image consists of a defined count of rows and columns thus forming cells. These cells are stored as a sequence of numbers (byte, integer or real) representing values (vegetation classcodes, reflectance numbers, political units, z-values in a DEM, ...).

Let us imagine a very simple image:

0 1 2 3 4
0 22 22 18 18 18
1 15 15 18 16 16
2 11 15 15 18 16
3 11 15 12 12 12

5 columns, 4 rows. The values may represent some code for land usage. IDRISI is starting in the upper-left corner (row 0/column 0), then advances column by column and row by row. In the simplest format - ASCII - the cellvalues are stored one in each line:

22
22
18
18
18
15
15
(...)
11
15
12
12
12

Commonly the images are stored binary, one value after the other. Depending on the datatype a value occupies more or less of memory. Simple RLC (run length compression) is supported as packed binary (i.e., the cellvalue is followed by the number of occurrences in the series):

Unfortunately our image is not well suited for compression. The compressed image requires 4 additional bytes! But images with large areas of the same values can show packing ratios up to 1:100 and more.

The table shows IDRISI's datatypes (except compression they apply to vectorfiles as well):

memory required range compression
byte 1 byte 0 to 255 yes
integer 2 bytes -32768 to +32767 yes
real IEEE 4 bytes ±1*10 38, 7 significant figures precision no

Evidently the image 'does not know' about its dimensions or about the area one cell covers in real. So we need a 'header file', the documentation file, which corresponds with a image.


previous Index next
Datatypes A-Z Vector Files
Raster Documentation Files
last modified: | Comments to Eric J. LORUP