Landscapes - Building GDAL
GDAL is a translator library for raster and vector geospatial data formats which we can use for converting between file formats, for example for converting geotiff data about real-world locations to heightmaps which can be imported into Unreal.
Background
This is part of a series of articles about landscapes:
Landscapes - Building GDAL
Landscapes - Material Concepts
Landscapes - Nanite Tessellation
Landscapes - Using Real Location Data
Landscapes - World Partition and Tiling
Building GDAL
The GDAL website is here. Windows binaries are not available without installing the anaconda build environment so we will build it from source.
To build GDAL from source do these steps:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat
vcpkg integrate install
vcpkg install gdal gdal[tools]:x64-windows
The command vcpkg install gdal gdal[tools]:x64-windows
takes about 30 minutes to build everything.
Path environment variable
The gdal command line tools (such as gdalinfo.exe) are built in this directory:
vcpkg\installed\x64-windows\tools\gdal
Add this directory to your system path.
PROJ_LIB environment variable
The gdal projection database proj.db is in the directory:
vcpkg\installed\x64-windows\share\proj\
Set the PROJ_LIB environment variable to be this directory name including the trailing slash.
Test
One the path has been updated and you have opened a new command window this command should work:
gdalinfo --version
it should display something like:
GDAL 3.10.1, released 2025/01/08