You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/v3/spec.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -372,8 +372,25 @@ Additionally, this specification defines the following keys, which MAY be includ
372
372
|`name`|A name describing the tileset|string|
373
373
|`description`|A text description of the tileset|string|
374
374
|`attribution`|An attribution to be displayed when the map is shown to a user. Implementations MAY decide to treat this as HTML or literal text. |string|
375
-
|`type`|The type of the tileset |a string with a value of either `overlay`or `baselayer`|
375
+
|`type`|The type of the tileset |a string with a value of either `overlay`, `baselayer`or `terrain`|
376
376
|`version`|The version number of the tileset|a string containing a valid version according to [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html)|
377
+
|`rgb_shuffle`|An optional dictionary to re-interpret RGB pixels, as described in section 5.1. |
378
+
379
+
380
+
## 5.1 RGB Shuffle
381
+
382
+
If the JSON metadata contains a key `rgb_shuffle`, its value MUST be a JSON
383
+
dictionary with floating-point numbers for `redFactor`, `greenFactor`,
384
+
`blueFactor` and `baseShift`. To interpret an RGB pixel, compute
385
+
`value = R * redFactor + G * greenFactor + B * blueFactor - baseShift`.
386
+
This is useful to encode Digital Terrain Models, where values are
387
+
elevations in fractional meters above ground, as WebP or PNG color images.
388
+
389
+
Implementations MAY provide specially optimized code paths for the parameters
0 commit comments