## 2 Materials and Methods
### Encoding of the Temporal and Spatial Grid of the Earth System's Layers
#### 2.3.1. ISEA4H-ESSG Encoding Structure  
Generally, the grid space is regarded as a discretized (digitized) abstraction of the geographical space, and the digital grid unit encoding is used to replace the geographical space coordinates. Therefore, the grid encoding space is also called the digital space [33]. The basis for constructing the digital space of the layered spatial grid is the grid encoding structure and method of the layer-body units. The encoding of the layered spatial grid is established according to the spatial subdivision model of the layered spatial grid. To establish the digital space of the spatial grid, it is first necessary to formally describe the identification of the grid units. The formal description of the identification of the layered spatial grid units can be considered from different perspectives. From the perspective of the grid hierarchical subdivision process, the identifications of the five parts, namely the reference layer body, the subdivision level of the layer surface, the subdivision level of the layer radius, the layer radius unit, and the layer cell unit, are the basic parameters for uniquely determining any layer-body unit. 1. Encoding of the Layer Surface  
The encoding of the layer surface follows the structure of the Octagonal Hierarchical Quadtree Structure (OHQS) of the four-aperture hexagon based on the regular icosahedron. A hexagonal three-axis coordinate system (coordinate system) is adopted to describe and locate each hexagonal grid. The origin of the hexagonal three-axis coordinate system is located at the center point of the initial hexagon. The angles between the three coordinate axes are all 120 degrees, and they are perpendicular to the upper right side, the upper left side, and the bottom side of the hexagon, respectively, as shown in Figure 11. The grid coordinates of each quadrant are determined by two adjacent coordinate axes, and the value of the other coordinate axis is 0. Figure 10: Visualization of the subdivision of the layer surface and layer body of the Earth-System Spatial Grid at the third layer. (**a**) shows the global grid at the third layer, and (**b**) shows the grid layers at the third layer of two adjacent triangular faces of the icosahedron. Note: The numbers in the figure are the hexagonal three-axis coordinates (\(i\), \(j\), \(k\)) corresponding to the grids of the 1 st, 2 nd, and 3 rd layers, corresponding to the three coordinate axes of \(i\), \(j\), \(k\), respectively; the red hexagon is the initial hexagon. The units of the hexagonal three-axis coordinate systems of the grids at each layer are all different. The basic units (\(ui_{n}\), \(uj_{n}\), \(uk_{n}\)) of the three coordinate axes of \(i\), \(j\), \(k\), satisfying the following formula of the grid coordinate system at the layer:  
\[\left\{ \begin{array}{c}(ui_{n-1},uj_{n-1},\;uk_{n-1})=\left(\frac{1}{2}ui_{n _{n}}\frac{1}{2}uj_{n},\;\frac{1}{2}uk_{n}\right)\\ (ui_{n},uj_{n},\;uk_{n})=\left(\frac{\sqrt{3}}{2^{n}}L,\;\frac{\sqrt{3}}{2^{n} }L,\;\frac{\sqrt{3}}{2^{n}}L\right)\end{array} \right., \tag{1}\]  
In the formula: \(ui_{n}\), \(uj_{n}^{\prime}\), \(uk_{n}\) and \(ui_{n-1}\), \(uj_{n-1}\), \(uk_{n-1}\) are, respectively, the basic coordinate units of the three coordinate axes of \(i\), \(j\), \(k\) and of the grid at the nth layer and the \(n-1\)th layer, and \(L\) is the side length of the initial hexagon in Figure 11.  
Since the four-aperture hexagonal grid cannot achieve a completely nested subdivision, in order to construct a subdivision encoding structure that can cover the initial hexagonal grid, this paper divides the encoding into the encoding of the first layer and the layer. Based on the corresponding relationship between the coordinates and the binary numbers of the encoding, the basic encoding structure of the four-aperture hexagon is constructed, which is convenient for realizing the efficient conversion between the encoding and the hexagonal three-axis coordinate system.