Skip to content

Hypsometric Tint from terrain-RGB tiles #5742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

NathanMOlson
Copy link
Contributor

@NathanMOlson NathanMOlson commented Apr 11, 2025

Implements #5666 (Hypsometric Tint from terrain-RGB tiles). Supporting style spec changes are here: https://github.com/NathanMOlson/maplibre-style-spec/tree/color_relief

Demo here: https://nathanmolson.github.io/color_relief

This implements hypsometric tint in a similar way to raster and hillshade. The implementation in MapLibre feels clean to me, other than the duplication between drawRaster(), drawHillshade(), and drawColorRelief(). But they do things just differently enough that combining them doesn't seem fruitful.

The current rendering implementation resamples the colormap into a uniform interpolation table. This means that sharp breakpoints in the colormap are not captured accurately. I plan to benchmark two possible solutions: 1) Making the interpolation table larger (and finer). 2) Using the provided (non-uniformly sampled) colormap directly in the shader.

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant