When creating images requiring more than 4GB of disk space in Imagine a two file dataset is created. The .img contains the traditional superstructure, but the actual image data is kept in a separate non-HFA file format, normally with the extension .ige. This is presumably done to get around the 32bit file offset limitations of HFA format which makes it impossible to address large images.
While the .ige file format does not appear to be publically documented anywhere, it is fortunately not that hard to deduce. The first thing to realize is that the traditional RasterDMS structure is missing from the base .img file. Instead it has a structure like the following:
ExternalRasterDMS(ImgExternalRaster) 40 @ 2896
+ fileName =
+ string = `big.ige'
+ layerStackValidFlagsOffset[0] = 49
+ layerStackValidFlagsOffset[1] = 0
+ layerStackDataOffset[0] = 153341
+ layerStackDataOffset[1] = 0
+ layerStackCount = 1
+ layerStackIndex = 0
0: 45524441 535F494D 475F4558 5445524E ERDAS_IMG_EXTERN
16: 414C5F52 41535445 52000101 000000A0 AL_RASTER~~~~~~~
32: 86010050 C3000040 00000040 00000003 ~~~P~~~@~~~@~~~~
48: 00010000 0018E319 000E0300 001B0600 ~~~~~~~~~~~~~~~~
Fields:
| Start Byte | # of Bytes | Format | Name | Description |
|---|---|---|---|---|
| 0 | 26 | ASCII | Magic Header | Always "ERDAS_IMG_EXTERNAL_RASTER\0". |
Sample: (starting at byte 26)
0: 45524441 535F494D 475F4558 5445524E ERDAS_IMG_EXTERN
16: 414C5F52 41535445 52000101 000000A0 AL_RASTER~~~~~~~
32: 86010050 C3000040 00000040 00000003 ~~~P~~~@~~~@~~~~
48: 00010000 0018E319 000E0300 001B0600 ~~~~~~~~~~~~~~~~
Fields:
| Start Byte | # of Bytes | Format | Name | Description |
|---|---|---|---|---|
| X+0 | 1 | Byte | Unknown | Unknown byte, has value of 1 in sample file (0 in overview) . |
| X+1 | 4 | LSB Int32 | layerCount | Number of layers in file (ie. 1) |
| X+5 | 4 | LSB Int32 | width | Width of raster in pixels (ie. 100000). |
| X+9 | 4 | LSB Int32 | height | Height of raster in pixels (ie. 50000). |
| X+13 | 4 | LSB Int32 | blockWidth | Width of a tile (usually 64). |
| X+17 | 4 | LSB Int32 | blockHeight | Width of a tile (usually 64). |
| X+21 | 2 | ? | ? | unknown 2 bytes, value of 0x03 0x00 in sample file (and 0x06 0x00 in overview). |
Sample:
49: 01000000 18E31900 0E030000 1B060000 ~~~~~~~~~~~~~~~~
65: 00000300 FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
81: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
97: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
113: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
129: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
145: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
161: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
177: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
193: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
209: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
225: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
241: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
257: FFFFFFFF FFFFFF07 FFFFFFFF FFFFFFFF ~~~~~~~~~~~~~~~~
Fields:
| Start Byte | # of Bytes | Format | Name | Description |
|---|---|---|---|---|
| X+0 | 4 | LSB Int32 | ? | Unknown to (ie. 1). |
| X+4 | 4 | ? | ? | Unknown (ie. 0x18 0xE3 0x19 0x00, or 0x00 9A 61 0A in overview). |
| X+8 | 4 | LSB Int32 | heightInBlocks | Vertical tile count (ie. 782) |
| X+12 | 4 | LSB Int32 | widthInBlocks | horizontal tile count (ie. 1563) |
| X+16 | 4 | ? | ? | Unknown (ie. 0x00 0x00 0x03 0x00). |