To include the GEBCO 2020 dataset in a local Open Topo Data instance, follow these steps:
- Prepare Directory: Create a folder for the dataset.
mkdir ./data/gebco2020
- Download and Extract: Download the
GEBCO_2020 Grid in Data GeoTiff format from GEBCO. Extract the raster tiles into the ./data/gebco2020 folder so that it contains exactly 8 .tif files. - Rename Tiles: Rename the 90-degree tiles to match the SRTM
NxxSxx format required by Open Topo Data. - Configure: Create a
config.yaml file to register the dataset. - Build and Run: Rebuild the project to enable the new endpoint.
Note: The GEBCO tiles do not overlap and cover slightly less than a 90° x 90° square. To avoid null results at tile edges (e.g., coordinates 0,0), it is recommended to apply a 5px buffer to each tile using GDAL.
mkdir ./data/gebco2020
# Rename tiles to SRTM format
mv gebco_2020_n0.0_s-90.0_w0.0_e90.0.tif S90E000.tif
mv gebco_2020_n0.0_s-90.0_w-180.0_e-90.0.tif S90W180.tif
mv gebco_2020_n0.0_s-90.0_w-90.0_e0.0.tif S90W090.tif
mv gebco_2020_n0.0_s-90.0_w90.0_e180.0.tif S90E090.tif
mv gebco_2020_n90.0_s0.0_w0.0_e90.0.tif N00E000.tif
mv gebco_2020_n90.0_s0.0_w-180.0_e-90.0.tif N00W180.tif
mv gebco_2020_n90.0_s0.0_w-90.0_e0.0.tif N00W090.tif
mv gebco_2020_n90.0_s0.0_w90.0_e180.0.tif N00E090.tif
# Build and run
make build && make run