Terrain Visualization Offset in Mapbox DEM/RGB
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 3.9.1
**browser**: safari/chrome
When using Mapbox terrain data (both DEM and RGB formats), there appears to be a significant spatial offset in the terrain visualization. This offset can be up to 20 meters as observed in the Aspect terrain visualization.
Ridge from OSM
Aspect derived from USGS 3DEP products
The attached screenshot shows a clear misalignment between terrain features and their visualization
The red markers and line demonstrate the offset between where terrain features should be and where they are actually rendered
### Reproduction Steps
Load a map with Mapbox terrain data (DEM or RGB)
Compare terrain visualization with known ground features or other reference data
Observe the spatial offset (approximately 20m in some cases)
### Expected Behavior
Mapbox terrain data should accurately align with the actual geographic features on the map. Terrain visualizations like aspect, slope, and elevation should precisely match the underlying topography without any spatial offset.
### Actual Behavior
Terrain visualizations are offset by approximately 20 meters from their true geographic positions. This misalignment is consistent across different locations and is observable in both DEM and RGB terrain formats. The offset creates inaccurate representations of terrain features, particularly noticeable when comparing with winter satellite imagery where snow patterns don't align with the expected terrain aspects.
Contributor guide
Research direction
Reproduce the issue in mapbox-gl-js 3.9.1 using terrain data in both DEM and RGB formats, then compare aspect, slope, or elevation visualizations with known geographic features. Verify the reported offset across browsers and locations; done means terrain visualizations align with the underlying topography without the observed spatial displacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100