Esri .hdr Raw Raster Reader/Writer

Licensing options for this format begin with FME Professional Edition.

FME provides read and write access to the Esri .hdr header file and the associated raw raster file, along with an Esri world file.

Overview

An Esri .hdr file is a header file that stores the georeferencing information of an associated raw raster file. The georeferencing information is read or written to an Esri world file but is also stored in the .hdr file with the following keywords:

Keyword

Value

nrows

The number of rows in the image. Rows are parallel to the x-axis of the map coordinate system. There is no default.

ncols

The number of columns in the image. Columns are parallel to the y-axis of the map coordinate system. There is no default.

nbands

The number of spectral bands in the image. The default is 1.

nbits

The number of bits per pixel per band. Acceptable values are 1, 4, 8, 16, and 32. The default value is eight bits per pixel per band. For a true color image with three bands (R, G, B) stored using eight bits for each pixel in each band, nbits equals eight and nbands equals three, for a total of twenty-four bits per pixel. For an image with nbits equal to one, nbands must also equal one.

pixeltype

If this keyword is present and its values is signedint, then the data is assumed to be a signed integer type. Otherwise, the data is assumed to be an unsigned integer type.

byteorder

The byte order in which image pixel values are stored. The byte order is important for sixteen-bit images, with two bytes per pixel. Acceptable values are I, which is Intel byte order (Silicon Graphics, DEC Alpha, PC) or little-endian, and M, which is Motorola byte order (Sun, HP, etc.) or big-endian. The default byte order is the same as that of the host machine executing the software.

layout

The organization of the bands in the image file. Acceptable values are bil, which is band interleaved by line, bip, which is band interleaved by pixel, and bsq, which is band sequential. The default layout is bil.

skipbytes

The number of bytes of data in the image file to skip in order to reach the start of the image data. This keyword allows you to bypass any existing image header information in the file. The default value is zero bytes.

ulxmap

The x-axis map coordinate of the center of the upper-left pixel. If you specify this parameter, set ulymap, too, otherwise a default value is used.

ulymap

The y-axis map coordinate of the center of the upper-left pixel. If this parameter is specified, ulxmap must also be set, otherwise a default value is used.

xdim

The x-dimension of a pixel in map units. If this parameter is specified, ydim must also be set, otherwise a default value is used.

ydim

The y-dimension of a pixel in map units. If this parameter is specified, xdim must also be set; otherwise a default value is used.

For example, if you have a 2500 (width) x 4000 (height) external image format image with cell size of 10 and the coordinate of the center of the upper-left pixel of (330000, 6500000), the image will have

ULXMAP = 329995, ULYMAP = 6500005, XDIM = 10, and YDIM = 10

For each raster, there is only a single feature returned, since this feature will contain the entire raster.

Notice that the current version of Esri .hdr Raster reader/writer does not support the bandrowbytes, totalrowbytes, and bandgapbytes keywords. This format also supports an optional colormap ASCII file that allows for an RGB palette to be stored in a separate .clr file if present.

The raw data file for Esri .hdr datasets can have multiple extensions depending on the interleaving type of the file. The extension becomes one of the following allowable interleaving options: BIP, BSQ, BIL. Thus an Esri dataset with a band order by pixel interleaving would have a .hdr file and a .bip file.

Esri world files will be read if present and written alongside Esri .hdr datasets. World file extensions also match the interleaving type of the dataset.

BIP

.bpw

BSQ

.bqw

BIL

.blw

Reader Overview

FME considers a single file to be a dataset.

Writer Overview

The Esri .hdr writer creates and writes data into a single folder specified in the Destination parameter in the Workbench Navigator.

The Esri .hdr writer distinguishes duplicate output files by appending numbers to the filenames.

FME Raster Features

FME raster features represent raster data and use several concepts that are unlike those used in the handling of vector data. The topics below describe how FME processes raster data.

About FME Rasters Tiling and Mosaicking
Raster Properties Band Combining and Separating
Band Properties Band and Palette Selection
Palette Properties Raster Processing
Compression Raster versus Vector Features
Pyramiding Raster File Naming
Interleaving World Files
Interpretation and Data Type TAB Files
Palette Resolution  

Esri .hdr supports rasters with an arbitrary number of bands, provided all bands are the same data type and no band has a palette. Esri .hdr also supports rasters with a single band that has a palette.