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

distinguish satellite from terrain tiles #28

Open
andrewharvey opened this issue Dec 4, 2017 · 4 comments
Open

distinguish satellite from terrain tiles #28

andrewharvey opened this issue Dec 4, 2017 · 4 comments
Labels

Comments

@andrewharvey
Copy link

What do people think about adding an interpretation field for raster sources?

Currently Mapbox use TileJSON for

  1. a 3 band RGB raster to be displayed as is https://api.mapbox.com/v4/mapbox.satellite.json

  2. a 1 band raster encoded as a 3 band RGB.
    https://api.mapbox.com/v4/mapbox.terrain-rgb.json (https://blog.mapbox.com/blog/terrain-rgb/)

In the terrain-rgb case the formula for getting back to the 1 band raster is "-10000 + ((R * 256 * 256 + G * 256 + B) * 0.1)".

Should the TileJSON spec distinguise these two types and contain the formula to get the real values like in (2)?

/cc @MateoV

@nigels-com
Copy link

We'd need a field for that to adopt TileJSON for our layers. We have RGB encoded terrain elevation, RGB endoded surface normals as well as various flavours of annotated RGB. Are other vendors already making these sort of annotations?

@andrewharvey
Copy link
Author

andrewharvey commented Feb 13, 2018

Over in mapbox/mapbox-gl-js#6110 it uses an encoding field which is an enum of mapbox | terrarium rather than exposing the actual formula used, but I think we should still use an interpretation field to separate terrain tiles from satellite.

@GretaCB
Copy link
Contributor

GretaCB commented Apr 11, 2018

Thanks for opening this ticket @andrewharvey @nigels-com . This proposed addition will be considered as part of the v4 push #35

@GretaCB GretaCB added the v4 label Apr 11, 2018
@andrewharvey
Copy link
Author

Thanks for opening this ticket @andrewharvey @nigels-com . This proposed addition will be considered as part of the v4 push #35

That's awesome to hear @GretaCB, looking forward to participating in the discussion to see if this makes sense for v4.

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

No branches or pull requests

3 participants