You are trying the new MyGeodata Cloud. Send feedback Back to the previous version

Raster · Elevation & grid

HF2 — HF2/HFZ Heightfield

Tiled binary heightfield format for terrain elevation grids, associated with L3DT and gzip-wrapped as .hfz.

Type
Raster · Elevation & grid
Extension
.hf2, .hfz
Converter
Read & write
Coordinate system
Any (georeferenced)
Bands
Single-band elevation.

What is a HF2 file?

HF2 is a binary heightfield format designed by Bundysoft for terrain data exchange and is primarily associated with the L3DT terrain generation software. It stores digital elevation models for terrain modelling, game and simulation content, and visualisation. The .hfz extension denotes the same structure wrapped in gzip compression.

A file begins with a header containing the HF2 signature, grid dimensions, tile size, vertical precision and horizontal scale. Optional extended header blocks can carry georeferencing or projection information. The elevation grid is divided into square tiles. Each tile stores its own scale and offset, and heights are encoded as compact integer differences, so values are reconstructed as 32-bit floating point with quantisation limited to the declared vertical precision. This scheme makes files considerably smaller than raw floating-point grids. Only a single elevation band is supported, and coordinate reference system information is optional.

HF2 files usually come from terrain authors, game and simulation developers, and visualisation teams exchanging elevation grids, often exported from L3DT. Heights are quantised to the vertical precision set in the header, so a round trip from a float DEM can lose fine detail. Georeferencing is optional, so check that a coordinate system is present before combining the data with other layers.

Typical uses

  • Exchanging terrain heightmaps between terrain generators and game engines.
  • Storing compact elevation grids for simulation and visualisation projects.
  • Delivering DEM data from L3DT to GIS software such as QGIS.
  • Archiving large terrain grids in smaller gzip-compressed HFZ files.
Files: Single .hf2 file; .hfz is the same format compressed with gzip.

Sample HF2 files — free download

Small, real datasets of the island of Saint Helena (OpenStreetMap, Copernicus DEM, Sentinel-2). Download them, open them in your software, or convert them in one click.

Preview of the sample data: Saint Helena elevation model st-helena-dem.hf2

Elevation (Float32)

Copernicus DEM GLO-30 elevation model of Saint Helena (0–812 m), a surface model including trees and buildings; sea = 0 m. 631×505 px, 1 arc-second (≈30 m) grid, WGS 84. HF2 format.

  • 1 band · Float32
  • 631 × 505 px
  • 1 arc-second (~30 m)
  • EPSG:4326
  • 535.9 kB

Copernicus DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA

Frequently asked questions

Both use the same internal structure. HFZ is simply an HF2 file wrapped in gzip compression, so it is smaller on disk and must be decompressed before some programs can read it.

Ready to convert your data?

Drop the files and the Converter does the rest — no install, no account needed for your first conversions.