You can load elevation data into LuciadCPillar as a single elevation data set stored in the GeoPackage format. The elevation data set structure needs to fulfill these requirements:

  • The elevation data must have a world-wide coverage, meaning that it covers Earth entirely. The data can be coarse-grained for the most part, and only store detailed elevation information for a small area.

  • The elevation data tiles must be structured as a quad-tree.

  • The tiles must be encoded as PNG files. Tiles encoded with TIFF are not supported.

The following sections explain how you can convert elevation data in typical elevation input formats, so that it complies with the requirements, and LuciadCPillar can decode it. In the examples, the open-source tool GDAL is used to translate DTED and TIFF elevation data to GeoPackage.

Preparing DTED files

We start from a DTED elevation data set that stores elevation values for a small area only. We merge the DTED files into one GeoPackage file.

Combine DTED level-1 files, which do not have a world-wide coverage (linux) -o elevation_merged.gpkg `find DTED/Alps_L01 -name '*.dt1'`
Combine DTED level-1 files, which do not have a world-wide coverage (windows)
dir /b/s DTED\Alps_L01\*.dt1 >dted_list.txt -o elevation_merged.gpkg --optfile dted_list.txt

Next, we apply a world-wide quad-tree tiling structure to the data.

Convert the data into the global InspireCRS84Quad tiling scheme to create a structure with a world-wide coverage
gdal_translate -of GPKG elevation_merged.gpkg elevation.gpkg -co TILING_SCHEME=InspireCRS84Quad

Finally, we use GDAL down-sampling algorithms to build overview tiles from the elevation information.

Build overview tiles
gdaladdo -r nearest elevation.gpkg

Preparing TIFF files

Elevation data is often provided in TIFF files with a single band. The elevation values may be stored either as integers or as 32-bit floats. The following commands ensure that the elevation values are stored within tiles encoded with PNG in the GeoPackage file.

We start from an ETOPO1 data set with low-resolution data in a world-wide coverage.

Convert the TIFF with elevation data into GeoPackage with the InspireCRS84Quad tiling scheme
gdal_translate -of GPKG ETOPO/ETOPO1_Bed_g.tif etopo_elevation.gpkg -co TILING_SCHEME=InspireCRS84Quad -co TILE_FORMAT=PNG

Next, we use the GDAL command to generate overview tiles:

Build overview tiles
gdaladdo -r nearest etopo_elevation.gpkg

If the default settings for the GDAL command do not result in sufficient overview tiles, we can use it again to request additional overview levels:

Build overview tiles with extra overview levels
gdaladdo -r nearest etopo_elevation.gpkg 2 4 8 16 32 64 128 256

GDAL references

To learn more about the GDAL tool, consult the following GDAL resources: