Skip to content
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

Support additional encoding formulas for RasterDEM sources #5824

Open
mollymerp opened this issue Dec 7, 2017 · 7 comments
Open

Support additional encoding formulas for RasterDEM sources #5824

mollymerp opened this issue Dec 7, 2017 · 7 comments
Labels
cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) feature 🍏

Comments

@mollymerp
Copy link
Contributor

Now that #5286 has shipped, we can start thinking about enhancing the functionality. Right now RasterDEM sources only support the mapbox terrain-rgb tileset, but we should extend it to allow support for other DEM encoding formulas.

@mollymerp mollymerp added cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) feature 🍏 labels Dec 7, 2017
@ibesora
Copy link

ibesora commented Jan 11, 2018

Hi, first of all, good job with #5286. We have gotten great results using our own DEM, although there are some things to fix in our side.

I think a good candidate would be Mapzen's terrarium. Now that it's shutting down their terrain tiles would find a new home at Mapbox.
How I'm thinking about doing that is the following: on the rendering side only the decoding formula should be changed so, in order to mantain the expansion of the number of possible encodings, the formula could be appended to the shader from the js code. On the js side, a new raster source type (raster-dem-mapzen?) would need to be defined on the spec, and the decoding formula should be injected into the shader. Does that sound good?

Another terrain encoding that we use are Mapzen's normal maps. Supporting that would allow to bypass the slope prepass. To do so, the hillshade shader should be modified to support normals encoded in the rgb channels instead of only the rg ones. I'm more inclined on doing that via macro injection because, in contrast with the slope prepass, there's not an extensive list of decodings possible.

Should I give it a try?

@andrewharvey
Copy link
Collaborator

For me it's a higher priority to have the Mapbox platform support users uploading their own DEMs into terrain-rgb Tilesets in addition to the Mapbox Global DEM, but I realise that's out of scope for gl-js 😉

@beginor
Copy link

beginor commented May 9, 2018

What about ESRI's World Elevation Service, is it possible to support it?

@ghost
Copy link

ghost commented Jun 10, 2020

Hello,
is it now possible to upload geotif dem converted in RGB encoded mbtile using rio-rgbify as rasterdem and use it in mapbox studio and unity instead of terrain-rgb Tileset ?

@andrewharvey
Copy link
Collaborator

is it now possible to upload geotif dem converted in RGB encoded mbtile using rio-rgbify as rasterdem and use it in mapbox studio and unity instead of terrain-rgb Tileset ?

If you use rio-rgbify with the right parameters and then upload as a Tileset, you shouldn't need a custom encoding format for the raster-dem source here, you should be able to use the built in one.

@ghost
Copy link

ghost commented Jun 15, 2020

In fact I would like to convert my personnal raster dem built with LiDAR datas to the same format that uses Terrain RGB-Tileset and import it into mapbox Studio and use my personnal more accurate elevation datas instead of Terrain RGB-Tilset

@dadebue
Copy link

dadebue commented Mar 28, 2023

Pretty old issue but it would be really cool if we could use other encodings.

I'm interested in ESRI's World Elevation Service and here too @beginor. Is there some way we can use the ESRI terrain source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) feature 🍏
Projects
None yet
Development

No branches or pull requests

5 participants