This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
[core] add support for mapzen terrarium - #11154
Merged
Merged
Conversation
mollymerp
force-pushed
the
mapzen-terrarium
branch
from
February 8, 2018 21:44
5010847 to
0bbd54c
Compare
ibesora
reviewed
Feb 9, 2018
| } | ||
|
|
||
| auto decodeRGB = [&] (const uint8_t r, const uint8_t g, const uint8_t b) { | ||
| if (encoding == Tileset::Encoding::Mapbox) { |
There was a problem hiding this comment.
Instead of using an if, as it's called inside a loop, you could change that to a Functor so it gets inlined and resembles what you did in the js version, selecting the decode function before the loop.
| Range<uint8_t> zoomRange; | ||
| std::string attribution; | ||
| Scheme scheme; | ||
| Encoding encoding; |
Contributor
There was a problem hiding this comment.
Tileset primarily mirrors TileJSON, so it would be helpful to add a comment here that encoding is not a part of the spec (as yet?).
| @@ -16,28 +17,28 @@ auto fakeImage = [](Size s) { | |||
|
|
|||
| TEST(DEMData, Constructor) { | |||
Contributor
There was a problem hiding this comment.
Nice to have tests for Terrarium data.
kkaefer
approved these changes
Feb 13, 2018
| class Tileset { | ||
| public: | ||
| enum class Scheme : bool { XYZ, TMS }; | ||
| enum class Encoding : bool { Mapbox, Terrarium }; |
Member
There was a problem hiding this comment.
Can we use a more specific name, e.g. DEMEncoding?
mollymerp
force-pushed
the
mapzen-terrarium
branch
2 times, most recently
from
February 14, 2018 01:57
ad41b04 to
e7aa8e1
Compare
asheemmamoowala
approved these changes
Feb 14, 2018
Contributor
There was a problem hiding this comment.
nit: duplicate expects for dim and border @
mollymerp
force-pushed
the
mapzen-terrarium
branch
from
February 14, 2018 18:47
31d217c to
719cdb0
Compare
mollymerp
force-pushed
the
mapzen-terrarium
branch
from
February 14, 2018 19:36
719cdb0 to
f445ac9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
port of mapbox/mapbox-gl-js#6110 adding support for mapzen terrarium encoded dem RGB tiles.
ended up
#includeingTilesetall over the place because it seemed like the place we store top-level source keys likeencoding, but not sure this is the best approach – happy to hear suggestions of alternatives.closes #11204