Open in playproj

playproj

GuidePerspectiveCones and cylindersSight and shadeSpilhausGlobals and interruptedsPeeling the orangeDistortionEllipsoidGeoidOrthorectifications2 cellsH3 hexagonsL3 binsModel gridsIndex spaceMGRS and Sentinel-2AAT gridTiles and overviewsRectilinear chunksIcechunk and ZarrRasterizeAffineRegular in what?Convex hullCatastrophesTexture mappingPenguin datumFor exampleHomageVicGridNuyinaRhumb linesFrameTime and depthCutawayVoxels

The picked cell with its basemap, in the gnomonic projection of its cube face (the CRS s2 is built on), readable by GDAL.

How it works

Put a light at the centre of the globe and a cube round it: each point casts onto one of six faces. That is the gnomonic projection, six times over, and it is how S2 starts. Unfold shows it: the globe swells to the cube, then the cube opens into a staircase of faces 0 to 5.

Gnomonic cells are much bigger in the middle of a face than at its corners, so S2 stretches each face with a quadratic before cutting it into a grid. Tick "Without the stretch" to see the unstretched grid. Each level splits every cell into four.

The cells are numbered along a Hilbert curve that runs through face 0, then 1, and on to 5, so cells close in number are close on the globe. A cell's id is its face and its path down the curve; the token is that id in hexadecimal without its trailing zeros.

Below level 10 or so a cell is too small to see on the whole globe. "Close up" restricts the view to the picked cell and its neighbours on the same face, drawn at their own scale, so Child and Parent walk all the way down to level 30, a square about 2 cm across. The grid shows the next two levels inside each cell and the curve runs three levels down.

Source and contributing