3 ms·
I'm still puzzled why they went with 6 quad-trees, instead of doing an equal-area projection with 2:1 ratio and quad-treeing that instead. You lose a bit for h
by gct 8y ago
I'm still puzzled why they went with 6 quad-trees, instead of doing an equal-area projection with 2:1 ratio and quad-treeing that instead. You lose a bit for half the map but you do with 6 sides too (takes 3 bits).
- contravariant 8y agoI reckon an equal area projection for a full hemisphere would lead to some unacceptable degree of distortion. It's hard to say exactly but it shouldn't be too difficult to see that a cube is closer to a sphere than two squares stuck together. Edit: it may also be easier to figure out which squares are adjacent when using a grid based on a cube.
- gct 8y agoYeah I guess it depends on what you're trying to optimize (they use web mercator because roads didn't meet at right angles up north for example). But if you're mostly interested in indexing physical areas with polygon approximations, it seems like having each cell be the same area would be the ideal, but idk.
- espeed 8y agoSee the "Alternatives Considered" at the bottom of this page: https://s2geometry.io/devguide/s2cell_hierarchy https://s2geometry.io/devguide/s2cell_hierarchy Somewhere there's an older doc/presentation that goes into the reasons for the cube in more detail, and if I remember where it is, I'll post it here later. Consistent uniform cell size, minimizing distortions and relegating them to remote parts of the ocean, grouping land masses together (one cube side is almost pure ocean), optimizing for geodesics, and making it easy to index and reason about were some of the considerations in the design decision. It's been a while so I'm little fuzzy on all the reasoning, but I'm sure someone else on here can provide ptrs or fill in the details.