mapbox / mapbox/mapbox-gl-js

Generate contour lines from raster-dem source

Open
#5,844 9 comments 17 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cross-platform :tv: feature :green_apple: needs discussion :speech_balloon:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Cutting this ticket to start a conversation about whether we want to extend the raster-dem source to support contour line generation. I have not started exploring the feasibility of this from a performance standpoint.

I'm not sure how many users would be interested in having configurable contour lines, so if this is something you would use please 👍 this ticket 🙃 .

There is probably a way to do this that I haven't thought of, but the most straightforward method I can think of would be doing a precalculation/Framebuffer pass similar to the hillshade layer that calculates the contours and outputs a new texture with the contour lines encoded which is what is rendered to the map. Making sure the contours line up between tiles would probably be tricky...

cc @mapbox/cartography-cats

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the raster-dem source, hillshade layer, Framebuffer pass, textures, and tile alignment, but no files or tests. Start by locating those rendering paths and assess feasibility and performance. Done would require an agreed approach and scope for configurable contour generation, including cross-tile alignment.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.