Repackages a decoded DEM height grid as a synthetic QuantizedMeshTile: a regular
res × res vertex grid over the tile's geographic rectangle, so buildTerrainContent
bakes it exactly like a real quantized-mesh tile (world-space transform, skirts, height
sampler, imagery UVs). res is the output mesh resolution (vertices per side); the source
grid is bilinear-downsampled to it.
Latitudes are taken from the slippy-map formula (a Mercator tile's rows are even in
Mercator-Y, not latitude), then expressed as the v fraction the linear bake reconstructs
— so the grid lands at the correct latitudes despite the bake's linear lat interpolation.
Repackages a decoded DEM height grid as a synthetic QuantizedMeshTile: a regular
res × resvertex grid over the tile's geographic rectangle, so buildTerrainContent bakes it exactly like a real quantized-mesh tile (world-space transform, skirts, height sampler, imagery UVs).resis the output mesh resolution (vertices per side); the source grid is bilinear-downsampled to it.Latitudes are taken from the slippy-map formula (a Mercator tile's rows are even in Mercator-Y, not latitude), then expressed as the
vfraction the linear bake reconstructs — so the grid lands at the correct latitudes despite the bake's linear lat interpolation.