mapbox / mapbox/tilejson-spec

distinguish satellite from terrain tiles

Open
#28 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

v4
Dominant language
No language data
Stars
296
Forks
51
PR merge metrics
No merged PRs in 30d

Description

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

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

Start with the TileJSON specification and the linked satellite and terrain-rgb TileJSON examples; compare how each raster source is currently described. Decide whether an interpretation field and decoding formula belong in the specification, then update the specification and examples to reflect the agreed design.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.