# Mountain-world terrain and heights

## Real global terrain

`terrain/elevation-grid.json` derives from **GEBCO Compilation Group (2025), GEBCO 2025 Grid**, DOI [10.5285/37c52e96-24ea-67ce-e063-7086abc05f29](https://doi.org/10.5285/37c52e96-24ea-67ce-e063-7086abc05f29), distributed in reduced form by Generic Mapping Tools (GMT).

- Download: https://oceania.generic-mapping-tools.org/server/earth/earth_gebco/earth_gebco_15m_p.grd
- Documentation: https://www.generic-mapping-tools.org/remote-datasets/earth-gebco.html
- Downloaded NetCDF title: `GEBCO Earth Relief 2025 at 15 arc minutes`.
- Original-file SHA-256: `074073385917a3b378a1a39660a07969bc702c2d1047221f03c07f80fdef5740`.
- The downloaded 1440×720 pixel grid was already Gaussian-filtered by GMT, with 78.6 km full width. Our transformation averages adjacent 2×2 cells, reverses latitude to north-first, and rounds elevations to 50 m. No synthetic mountain chains or peak-shaped relief were added.
- Build: `python geography/terrain/build-elevation-grid.py [cached-earth_gebco_15m_p.grd]`. Requires Python, NumPy and system libnetcdf. Without an input file, the script downloads the source. The source is not bundled.

The [GEBCO terms](https://www.gebco.net/data-products/gridded-bathymetry/terms-of-use) place the grid in the public domain and permit redistribution, adaptation and commercial use. They require acknowledging GEBCO, avoiding implied endorsement, and accurate representation of the source. Retain the attribution above in the project; a compact visible credit can read **“Relief: GEBCO 2025 / GMT; simplified for learning.”** This generalized terrain is for visual learning, not navigation or safety use.

### Browser data contract

The JSON has `width:720`, `height:360`, `west:-180`, `north:90`, `cellSizeDegrees:0.5`, `pixelCenters:true`, `scale:50`, `offset:0`, `units:"m"`, and a flat signed integer `data` array. Each pixel covers half a degree. Index `y*width+x` corresponds to longitude `-179.75 + x*0.5` and latitude `89.75 - y*0.5`. Elevation metres = `data[index]*scale+offset`. Columns wrap at the dateline; latitude rows must be clamped. Negative values indicate bathymetry or land depressions, so use the existing land polygons when deciding where to draw land.

This is an equirectangular grid with no duplicated pole/dateline row. It can produce a shared Canvas terrain texture and Three.js color/bump texture. It is regional mean terrain, **not summit height**: after generalization its range is −8,650 to 5,700 m. Use the separate peak table for summit labels. Relief contrast or bump amplitude may be visually exaggerated, but elevation color bands should use the stored metre values.

Verified sample cells: Tibetan plateau (87°E,33°N) 5,050 m; Andes (69°W,24°S) 3,300 m; Rockies (107°W,40°N) 2,600 m; Amazon lowland (62°W,4°S) 50 m; central Pacific (140°W,0°) −4,300 m. Build assertions check these and the grid's geographic orientation. A visual preview also confirmed global orientation and recognizable ranges. The uncompressed JSON is 916,186 bytes.

## Summit labels

`terrain/peak-elevations.json` maps all 24 existing `mountains.json` IDs to `{elevationM, approximate, source, sourceName}`. `elevationM` is metres above sea level. Label these as approximate heights (for example “≈ 4,478 m”), rather than implying a fresh geodetic survey.

The base heights come from the `elevation` property in Natural Earth's 1:10m elevation-points layer, joined to existing mountain entries by identical coordinates:

- https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_geography_regions_elevation_points.geojson
- Downloaded-file SHA-256: `f98a16867867146ec4146d6d4b18c823eeedb2825947de666116cf9a4e3f43cb`.
- Natural Earth [terms](https://www.naturalearthdata.com/about/terms-of-use/) permit educational and commercial reuse as public-domain data.

Three known outdated Natural Earth values were replaced with primary-source measurements, recorded in each entry:

- Everest: **8,849 m**, rounded from 8,848.86 m in the Government of Nepal's [Nepal Tourism Statistics 2022](https://www.tourism.gov.np/files/NOTICE%20MANAGER_FILES/Setting_Nepal%20Tourism%20Statistic_2022.pdf).
- Denali: **6,190 m**, from the [USGS 2015 summit survey](https://www.usgs.gov/news/national-news-release/new-elevation-nations-highest-peak).
- Aoraki / Mount Cook: **3,724 m**, from the [University of Otago Aoraki2013 survey](https://www.otago.ac.nz/surveying/research/geodetic/aoraki2013-surveying-the-height-of-aoraki-mt-cook).

Other entries retain approximate Natural Earth cartographic heights, which may differ by several metres from newer surveys, datum conventions, or changing summit snow. These numbers are factual numeric data; no source illustrations or prose passages are reproduced.
