Repository navigation
Clarify TileID value semantics - #3834
Conversation
|
#3529 is related. |
|
I'm proposing something akin to // Has integer z/x/y coordinates
// All tiles must be derived from 0/0/0 (=no tiles outside of the main tile pyramid)
// Used for requesting data
// z is never larger than the source's maxzoom
struct TileID {
const uint16_t z;
const uint32_t x;
const uint32_t y;
};
// Has integer z/x/y coordinates
// w describes tiles that are left/right of the main tile pyramid, e.g. when wrapping the world
// Used for describing what position tiles are getting rendered at (= calc the matrix)
// z is never larger than the source's maxzoom
struct UnboundedTileID {
const int16_t w;
const uint16_t z;
const uint32_t x;
const uint32_t y;
};
// Has integer z/x/y coordinates
// overscaledZ describes the zoom level this tile is intented to represent, e.g. when parsing data
// z can be larger than the source's maxzoom
struct OverscaledTileID {
const uint16_t z;
const uint16_t overscaledZ;
const uint32_t x;
const uint32_t y;
};
// Has floating point z/x/y coordinates
// Used for computing the tiles that need to be visible in the viewport
struct TileCoordinate {
const double z;
const double x;
const double y;
};
|
|
That's pretty close to what I suggested in #3529 (comment). Do you like Wherever we would use |
|
These changes are ongoing in #3873. |
|
Could this be related: #3978 ? |
a983db8 to
194614f
Compare
194614f to
8f3fb0c
Compare
|
Remaining tasks here are:
|
958e9b7 to
310a3d2
Compare
253cde3 to
c1075db
Compare
c1075db to
28eb164
Compare
| // std::cout << " stencils);" << std::endl; | ||
| // } | ||
|
|
||
| } // end namespace |
There was a problem hiding this comment.
Do we need to keep this commented code?
There was a problem hiding this comment.
Yeah, I left it there for debugging purposes.
|
Is now a good time to define hash functions for |
|
@jfirebaugh Before we do that, we should check whether this actually makes sense; |
29ec6e4 to
135d16f
Compare
|
@jfirebaugh @tmpsantos can I please get a final review on the changes? |
|
From my side, 🚢 |
|
Offline wants the spiral loading order as well -- the assumption is that if downloading an offline region is interrupted, it's better to have the center of the region available than the outskirts. |
|
@jfirebaugh Offline should use an iterator generator instead of holding all tile IDs in memory? |
|
Yes, it should. Is that something that looks feasible as part of this PR? |
|
Hmm, I think that's out of scope for this one. It's been sitting around for quite a while and I'd like to finally get it merged to pave the way for #123 |
|
Ok, so revert more fully to spiral order, than merge? |
dc8bd85 to
9528300
Compare
|
Added back spiral loading |
f167f75 to
e854e82
Compare
* CanonicalTileID has z, x, and y, with x/y being within the bounds z defines. z can be anything from 0-32. * OverscaledTileID is composed of a z value, and a canonical tile. The z value indicates the zoom level the tile is intended for. It is primarily used for indexing overscaled data tiles. * UnwrappedTileID is composed of a wrap value, and a canonical tile. The wrap value is used for representing tiles to the left and right of the main (0/0/0 based) tile pyramid. It is primarily used for indicating the position a tile should be rendered at.
e854e82 to
7332ae0
Compare
When overzooming tiles, we currently have
TileIDobjects that have azvalue that is out of sync with thexandyvalue. The realzvalue is stored insourceZ, but all of the functions (like.children()or.isChildOf()aren't aware of that. Instead of changing these values, we should flip the semantics and store the overzoomedzvalue in field that is notz.