Heightmapper for Transport Fever 2 and 3

A fork of tangrams/heightmapper that exports real-world terrain as heightmaps for Transport Fever 2 and Transport Fever 3.

Usage:

  1. Pick the map size, ratio and orientation in the "heightmap export" panel. The red box in the middle of the view shows the area that will be exported.
  2. Pan and zoom until the box covers the region you want.
  3. Customize any generator options such as climate, town count, etc.
  4. Click "export all" for a zip with the heightmap, biome maps and towns, laid out like the game's user folder. Extract it into %APPDATA%\Transport Fever 3. The individual export buttons save single files instead.
  5. In the map editor, create a map of the size and climate you've chosen.
  6. In the game's Import Heightmap dialog, enter the "minimum height", "maximum height" and "water level" shown at the top of the panel.
  7. Import the heightmap, biomes, and town files. You may want to save+reload the map after importing the biomes to remove the gridlines that the game will generate.
  8. Generate industries.

You now have a fully playable map!

Other controls:

Export Info:

Images generate at 256 px per in-game km plus 1 on each axis, e.g. 7169 x 7169 for a 28 x 28 km Gigantomaniac map.

The live values come from a coarse preview of the box. If the full-resolution export finds a higher peak or a lower point, it widens the range, so always enter the values from the finished task in the bottom-left panel. The PNG's Description text chunk also stores them as JSON.

Water levels can only be found where the elevation data stores water as perfectly flat surfaces. Generally this exists for lakes, reservoirs, rivers and the sea.

Elevation data comes from the AWS Terrain Tiles open dataset (terrarium encoding, zoom 0-15, no API key). The tiles contain a few known bad patches with wrong values, from single pixels to whole tiles of noise. The export replaces them with the next coarser zoom level's data. Neighboring tiles are sometimes built from different surveys, which can leave straight steps along their shared edges. The export also measures those steps and blends them out.

Data Sources:

Check out the code on GitHub.