# HF2 -- HF2/HFZ heightfield raster

Driver short name

HF2

Driver built-in by default

This driver is built-in by default

GDAL supports reading and writing HF2/HFZ/HF2.GZ heightfield raster datasets.

HF2 is a heightfield format that records difference between consecutive cell values. HF2 files can also optionally be compressed by the gzip algorithm, and so the HF2.GZ files (or HFZ, equivalently) may be significantly smaller than the uncompressed data. The file format enables the user to have control on the desired accuracy through the vertical precision parameter.

GDAL can read and write georeferencing information through extended header blocks.

## Driver capabilities

Supports CreateCopy()

This driver supports the `GDALDriver::CreateCopy()` operation

Supports Georeferencing

This driver supports georeferencing

Supports VirtualIO

This driver supports virtual I/O operations (/vsimem/, etc.)

## Creation options

- COMPRESS=[YES/NO]: Defaults to `NO`. Whether the file must be compressed with GZip.

- BLOCKSIZE=value: Defaults to `256`. Internal tile size. Must be >= 8.

- VERTICAL_PRECISION=value: Defaults to `0.01`. Vertical precision. Must be > 0. Increasing the vertical precision decreases the file size, especially with `COMPRESS=YES`, but at the loss of accuracy.

## See also

- Specification of HF2/HFZ format

- Specification of HF2 extended header blocks