3 ms·
S2, linked from the README[1], does the same hierarchical subdivisions in squares, with each square having a string ID. Squares divide into sub-squares exactly
by scdoshi 9y ago
S2, linked from the README[1], does the same hierarchical subdivisions in squares, with each square having a string ID.
Squares divide into sub-squares exactly, but hexagon's don't sub-divide into hexagon's neatly.[2]
Can someone explain the advantages of hexagons over squares in this use case?
[1]https://code.google.com/archive/p/s2-geometry-library/ https://code.google.com/archive/p/s2-geometry-library/
[2]https://www.illustrativemathematics.org/content-standards/tasks/1123 https://www.illustrativemathematics.org/content-standards/ta...
- dvanduzer 9y agoSee sibling post for links, but the short answer: you can use 12 pentagons, strategically interspersed. Like a (soccer) football. edit: Oops, that only explains the tiling. For explanations of how the hierarchy descends, Dr. Sahr produced some GIFs that give a little bit of an overview of how the resolutions overlay: http://webpages.sou.edu/~sahrk/dgg/images/topogif/topogif.html http://webpages.sou.edu/~sahrk/dgg/images/topogif/topogif.ht...
- scdoshi 9y agoThanks for that link. Also found this which goes into some more detailed comparison with rectangular grids: https://github.com/uber/h3/blob/master/docs/doxyfiles/usecases.md https://github.com/uber/h3/blob/master/docs/doxyfiles/usecas...
- jacobolus 9y agoGosper island shapes do subdivide into gosper island shapes, if you want something tricky: https://en.wikipedia.org/wiki/Gosper_curve#Properties https://en.wikipedia.org/wiki/Gosper_curve#Properties
- malandrew 9y agoBoundaries between all 6 neighbors are equal. With S2, four are on the sides and top are equal and the corner neighbors have only a single point as their boundary. This means you can better simulate dynamic systems where there is flow between cells.