Skip to main content

DEM neighbors with different pixel dimensions

Read cached same-zoom DEM neighbors with different image sizes for terrain surfaces and elevation queries

Terrain surfaces and elevation queries can now read adjacent same-zoom tiles from the same DEM source when their pixel dimensions differ, such as 4×4 and 2×2. A sample is mapped to normalized coordinates in the neighboring tile and interpolated using that tile's own width and height. Equal-sized neighbors retain direct pixel reads. Existing two-dimensional hillshade already supports normalized resampling.

No additional script parameter is required. Existing raster-dem sources, terrain configuration and queryTerrainElevation use the shared path. Only cached neighbors from the current source epoch or existing valid parent replacements participate; no extra tile is requested. X wraps across the date line. Missing or stale neighbors preserve the available-sample behavior. Weighted NoData keeps a surface hole; NoData with zero interpolation weight does not affect the result.

This change does not guarantee identical heights on both sides of a boundary with different pixel spacing. Blending boundaries across zoom levels and a shared mesh across LODs remain unfinished. Targeted tests cover rectangular dimensions, both neighboring sides, elevation queries, the date line, NoData, stale and missing tiles. GPU rendering, device acceptance and a formal release are not claimed.

Capability queries return demNeighborDimensions: true. Generated4×4 and2×3 constant-height tiles verify the1000-meter border, queries, exaggeration and actual mesh: script, complete fixture. Continuity of this constant-height fixture does not establish seamless arbitrary nonlinear terrain at different resolutions.

Current DEM coverage and query semantics extend cached-child coverage, mixed-region sampling and exact-target takeover. Evidence from this earlier batch remains historical; full LOD blending is still pending.