International Journal of Geo-Information

Article Lattice Quad-Tree Indexing Algorithm for a Hexagonal Discrete Global Grid System

Jianbin Zhou 1, Jin Ben 1,*, Rui Wang 1, Mingyang Zheng 1 and Lingyu Du 2

1 PLA Strategic Support Force Information Engineering University, Zhengzhou 450001, China; [email protected] (J.Z.); [email protected] (R.W.); [email protected] (M.Z.) 2 The Army of 31617, Fuzhou 350201, China; [email protected] * Correspondence: [email protected]; Tel.: +86-371-81623256

 Received: 7 November 2019; Accepted: 27 January 2020; Published: 31 January 2020 

Abstract: Hexagonal discrete global grid systems are the preferred data models supporting multisource geospatial information fusion. Related research has aroused widespread concern in the academic community, and hierarchical indexing algorithms are one of the main research focuses. In this paper, we propose an algorithm for indexing the cell of a ringed spatial area based on a hexagonal lattice quad-tree (HLQT) structure and the indexing characteristics. First, we design a single-resolution indexing algorithm in which indexing starts from the initial quad tree and expands ring by ring using coding operations, and a quad-tree structure is applied to accelerate this process. Second, the hierarchical indexing algorithm is implemented based on single-resolution indexing, and a pyramid hierarchical model is established. Finally, we perform comparison experiments with existing algorithms. The results of the experiments indicate that the single-level indexing efficiency of the proposed algorithm is approximately twice that of the traditional method and that the hierarchical indexing efficiency is approximately 67 times that of the traditional method. These findings verify the feasibility and superiority of the algorithm proposed in this paper.

Keywords: discrete global grid system; hexagon; lattice; indexing; quad tree

1. Introduction In recent years, the application of geospatial data has become increasingly extensive. The scale, shape, projection and reference datum of these data are extremely varied, which makes the aggregation, processing and mining of datasets extremely difficult [1]. A demand has been identified for establishing a new data association model that uses spatial locations as the primary key by which to encode and integrate/fuse multisource location-based information [2]. The traditional model of geographic information system (GIS), in which GIS experts process and integrate data, is unsustainable in the face of the ever-increasing flow of data [1]. A discrete global grid system (DGGS) uses a specific method to discretize the Earth uniformly to form a seamless and multiresolution grid hierarchy structure using cell codes instead of traditional geographic coordinates to perform data operations [1–4]. A DGGS resembles a spreadsheet of cells over the surface of the Earth [2]. This approach promotes timely data analysis, processing, and reuse, and it preserves the appropriate information for multisource geodata mining. Additionally, this method can quickly and seamlessly assimilate new high-volume or disparate geodata sources and sensor networks regardless of scale, origin, resolution, legacy format, datum, or projection [1,2]. The planar quadrilateral grid system has a direct connection with the quad-tree data structure, and the quadrature-based indexing algorithm is directly applicable [5]. However, on a spherical surface, a quadrilateral DGGS is severely deformed at high , and the grid cells at the north and south poles are degenerated into triangles that must be treated differently from other cells.

ISPRS Int. J. Geo-Inf. 2020, 9, 83; doi:10.3390/ijgi9020083 www.mdpi.com/journal/ijgi ISPRS Int. J. Geo-Inf. 2020, 9, 83 2 of 16

Moreover, quadrilaterals do not exhibit uniform adjacency, which increases the complexity of spatial analysis [6]. Gorski et al. established a quadrilateral discrete global grid framework called HEALPix (Hierarchical Equal Area isoLatitude Pixelation of a Sphere) for the efficient discretization and fast analysis/synthesis of functions defined on a sphere [6,7]. GeoFusion divides the globe into six regions, of which four are covered by rectangular grids between 45 degrees north and south and two are covered by triangular grids at high latitudes [8]. Australia’s SEE-Grid (Solid Earth and Environment Grid) system is built based on cubes using quadrilateral grids and is mainly used for environmental monitoring [9]. Bernardin et al. built a quadrilateral grid system called Crusta that started from a 30-sided rhombic triacon-tahedron to support high-resolution topography data and imagery [10]. Lambers et al. established the quadrilateral grid system ellipsoidal cube map (ECM), which uses one-to-four refinement on the faces of a cube that circumscribes an ellipsoidal Earth [11]. Cheng et al. proposed the geographical coordinate subdividing grid with one-dimension integer coding on a 2n tree (GeoSOT) grid coding scheme, which is mainly used for the organization and management of remote-sensing data [12]. Triangular grids can establish connections with the quad-tree model and have high rendering efficiency for visualization. However, the unit adjacency relationship changes considerably at different positions, which requires complex neighboring search and spatial analysis algorithms. Dutton proposed the quaternary triangular mesh (QTM) model based on a regular octahedron structure and designed a hierarchical indexing method [13]. Goodchild’s hierarchical spatial data structure (HSDS) system also provides global estimates using an octahedron structure with one-to-four triangular refinement [14]. Bartholdi and Goldsman established a successive global indexing mechanism based on the spherical triangle hierarchy [15]. Zhao proposed the degenerate quad-tree grid (DQG) and designed the corresponding coding scheme and neighboring search algorithm [16]. Hexagon structures have received a great deal of interest because of their advantages. Among the three types of regular polygons that tile the plane (triangles, quads, and hexagons), hexagons are the most compact [3], and they provide the greatest angular resolution [17]. Unlike square and triangle grids, hexagonal grids have uniform adjacency, which means that each hexagonal cell has six neighbors, and all the neighbors share an edge with the hexagon and have centers exactly the same distance away from its center [3]. Vince established the octahedral aperture 3 hexagonal discrete global grid system, for which coordinate-based indexing based on barycentric coordinates is used to index the cells [18]. Ben et al. improved the model to develop the indexing system of the octahedral aperture 4 hexagonal discrete global grid system [19]. Peterson, Vince et al. designed the hierarchical indexing scheme PYXIS for the icosahedral Snyder equal area aperture 3 hexagon (ISEA3H), implemented a Fourier transform algorithm and developed spatial data integration software for the real-time processing and analysis of multisource datasets [20–22]. Sahr proposed a similar hierarchy-based approach using coordinate-based pyramid indexing based on hexagonal coordinate systems [23]. The pyramidal scheme, however, was only developed for a single resolution [1]. Sahr proposed the concept of a mixed-aperture hexagonal grid system combining multiple apertures. He designed the central place indexing (CPI) scheme [24] and implemented the basic algorithm in DGGRID [25,26]. Tong et al. proposed the hexagonal quaternary balanced structure (HQBS) [27] and established the hierarchical relationships among different levels of hexagonal grids on the icosahedral triangle. However, operations frequently roll back when code normalization fails, resulting in low efficiency [28]. Mahdavi-Amiri et al. designed a hierarchical indexing and visualization scheme for a variety of hexagonal grids based on a special coordinate system on a diamond surface [29]. To take advantage of the advantages of different types of grids, Mahdavi-Amiri [30] proposed a conversion method among hexagonal, quadrilateral and triangular grids for better storing and rendering. Hexagons do not exhibit congruency, and it is thus impossible to exactly decompose a hexagon into smaller hexagons [3]. Therefore, it is difficult to apply efficient multiresolution hierarchical indexing algorithms and quad-tree data structures on a hexagonal DGGS directly. To address this issue, Wang et al. established a hexagonal lattice quad-tree structure (HLQT) encoding scheme based on the theory of complex radix numbers [31]. A quad-tree ISPRSISPRS Int. Int. J. J. Geo-Inf. Geo-Inf.2020 2020, ,9 9,, 83 x FOR PEER REVIEW 3 3 of of16 16

quad-tree structure (HLQT) encoding scheme based on the theory of complex radix numbers [31]. A dataquad-tree structure data was structure applied forwas hierarchical applied for representation hierarchical andrepresentation basic operations and basic with hexagonaloperations grids, with buthexagonal research grids, on hierarchical but research indexing on hierarchic has notal yet indexing been performed. has not yet been performed. InIn summary, summary, recent recent studies studies on on grid grid modeling modeling and and code code indexing indexing for for DGGSs DGGSs have have made made great great progress.progress. Quadrilateral and triangulartriangular DGGSsDGGSs havehave directdirect correlationscorrelations withwith thethe quad-treequad-tree datadata structure.structure. The existing efficient efficient indexing indexing algorithms algorithms can can be be directly directly transfor transformed,med, but but these these types types of ofDGGSs DGGSs do do not not have have uniform uniform adjacency adjacency characteristic characteristics,s, and and the the cell deformation isis severesevere atat highhigh latitudes;latitudes; thus, thus, such such methods methods are are not not suitable suitable for for the the organization organization and processingand processing of global of global spatial spatial data. Hexagonaldata. Hexagonal grids have grids ideal have uniform ideal adjacencyuniform adjace propertiesncy properties and the advantage and the of advantage evenly covering of evenly the entirecovering world; the however,entire world; they dohowever, not have they self-similarity do not have properties. self-similarity Therefore, properties. most results Therefore, cannot most be generalizedresults cannot to the be quad-tree generalized data to structure. the quad-tree Aiming data to address structure. the currentAiming research to address gaps, the this current paper designsresearch an gaps, indexing this paper algorithm designs based an onindexing HLQT thatalgorithm accelerates based indexing on HLQT using that code accelerates operations indexing and theusing structural code operations characteristics and of the quadstructural tree. Thecharac efficiencyteristics and of reliability the quad of tree. the scheme The efficiency are validated and byreliability comparison of the experiments. scheme are validated by comparison experiments.

2.2. EncodingEncoding SchemeScheme ofof HLQTHLQT WangWang et et al. al. established established a a planar planar HLQT HLQT encoding encoding scheme scheme [31 [31].]. Vince Vince et et al. al. [32 [32]] and and Ben Ben et et al. al. [28 [28]] divideddivided the the aperture aperture 3 3 DGGS DGGS into into two two segments segments (vertex (vertex tile tile and and face face tile) tile) according according to theto the boundary boundary of theof the icosahedron icosahedron and and achieved achieved uniform, uniform, global global aperture aperture 3 hexagonal 3 hexagonal grid encoding.grid encoding. According According to this to concept,this concept, an icosahedral an icosahedral HLQT encodingHLQT encoding scheme cansche alsome becan established also be established [33], and a [33], Snyder and polyhedral a Snyder projectionpolyhedral is usedprojection to map is theused surface to map of the the icosahedron surface of tothe the icosahedron sphere [34]. to The the tile sphere structure [34]. is The shown tile instructure Figure1 .is shown in Figure 1.

FigureFigure 1. 1. TheThe icosahedralicosahedral andand sphericalspherical tiletile structurestructure ofof thethe hexagonalhexagonal lattice lattice quad-tree quad-tree structure structure (HLQT)(HLQT) encoding encoding scheme. scheme.

InIn Figure Figure1, 1, the the face face tile tile structure structure on on the the icosahedral icosahedral triangle triangle face face is identical, is identical, and and the the vertex vertex tile tile is ais partial a partial expurgation expurgation and and expansion expansion based based on the on face the tile.face We tile. define We define the center the center of the cellof the as thecelllattice as the point to replace the cell equivalently and let Pn(n 1) denote the lattice points of level n. We define lattice point to replace the cell equivalently and ≥let n (1)n denote the lattice points of level n . the first-level lattice points as shown in Figure2a. Each lattice point generates four child lattice points, We define the first-level lattice points as shown in Figure 2a. Each lattice point generates four child and Pn(n > 2) are generated> in turn. As shown in Figure2b, P2 is obtained by generating four child lattice points, and n (2)n are generated in turn. As shown in Figure 2b, 2 is obtained by lattice points from P1 independently, and thus the hierarchy structure constitutes a quad tree. √ generating four child lattice points from 1 independently,1 and3 thus the hierarchy structure As shown in Figure2a, on the complex plane, we let ω = 2 + 2 i (where i is an imaginary unit), andconstitutesP1 is represented a quad tree. by the following five sets (L0 j(1 j 5)): ≤ ≤ e 13 L01 =As0, ωshown1 e in6 ;Figure 2a, on the complex plane, we let ω =+ i (where i is an { e | ≤ ≤ } L02 = 2ω 1 e 6 ; 22 n{ | ≤ ≤ } o imaginarye unit),(e+1 )and%6  is represented by the following five sets ( Lj′(1 5) ): L03 = ω + ω 1 1e 6 ; j e ≤ ≤ = Le′ = {0,ω |1 6} ; L04 21α α L30 ; and { |e ∈ e } L05 = 2′ω=1 +ωωe2 e1 e2 = 1, 1 e1, e2 6 or e1 = 1, e2 = 6 or e1 = 6, e2 = 1 , e, e1, e2 Z. {Le2 {2|| |1− 6}| ; ≤ ≤ } ∈ ′ =+ωωee(1)%6+ Le3 {|16} ;

ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 4 of 16

′ =∈αα L43{2 |L ′ } ; and ′ =+ωωee12 −= == == ∈ Leeee51212{2 |||1,1, 6 or ee121, 6 or ee126, 1}, eeeZ , 12 , .

13 23 Additionally, we let ω′ =− + i , L = {0,ωω′′, , ω ′ } . After a rigorous proof, the set of 22 ISPRSlattice Int. points J. Geo-Inf. of the2020 4-aperture, 9, 83 hexagonal grid system can be uniquely represented as follows: 4 of 16

n 1 √3  n 2 1 3o Additionally, we let ω0 = + i, L= =+0, ω0, ω0 , ω0 L. After a rigorous proof, the set of lattice − 2 2  n 1  j points of the 4-aperture hexagonal grid system can bej= uniquely2 2 represented as follows:  (1) 1  = L′ Pn  1 = + 1 L Pn P21 2j j=2 (1)   1 P1 = 2 L0

(a) (b)

Figure 2.2.First First level level of latticeof lattice points points for face for tiles face and tiles the and quad-tree the quad-tree hierarchy structure:hierarchy (astructure:) distribution (a) ofdistribution the first-level of latticethe first-level points on lattice the complex points tile on plane the andcomplex (b) the tile quad-tree plane hierarchicaland (b) the structure quad-tree of

Phierarchical1 and P2. structure of 1 and 2 .

In Formula (1), L = L L L L L . Formula (1) shows that the aperture 4 hexagonal In Formula (1),0 L′′′0=∪∪∪∪1 ∪LLLLL02 ∪ 03 ∪ ′04 ∪ ′05 ′. Formula (1) shows that the aperture 4 lattice system is essentially a counting12345 system in which lattices are numbers with a specific form in the complexhexagonal field lattice and system are exactly is essentially the same asa thecounting binary system and decimal in which numbers lattices in theare realnumbers number with field. a specific form in the complex field and are exactly the same as the binary and decimal numbers in The counting system has a binary value of two, and the sets of digits are L0 and L. For x Pn, the ∈ ′ specificthe real formnumber is shown field. The in Formula counting (2). system has a binary value of two, and the sets of digits are L ∈ and L . For x n , the specific form is shown in Formula (2). 1 1 1 = + + + ( ) x l1 l2 n ln l1 L0, l2, , ln L (2) =+++112 4 ··· 2 1 ∈ ∈′ ··· ∈ ∈ x ll12n llLllLnn(,,,) 1 2 (2) Similar to a decimal number,24 by omitting the 2 power exponent, Formula (2) can be expressed as shownSimilar in Formula to a decimal (3). number, by omitting the power exponent, Formula (2) can be expressed as x .l l ln (l L0, l , , ln L) (3) shown in Formula (3). ≡ 1 2 ··· 1 ∈ 2 ··· ∈ We replace l1 in Formula (3) according to the following rules: ≡∈∈′ x .(,,,)ll12 lnn l 1 L l 2 l L (3) (1) For l L , let l e(1 e 6) ; 1 ∈ 01 1 → ≤ ≤ (2) for l1 L02, let l1 100e(1 e 6) ; We replace∈ l in →Formula (3)≤ according≤ to the following rules: (3) for l L , l 1 10((e + 1)%6)(1 e 6) ; 1 ∈ 03 1 → ≤ ≤ (4) for l L , l 100l (l are the code digits after the replacement of α); and 1 ∈ 04 1 → 01 01 (5) for l L , l 100e + e . 1 ∈ 05 1 → 1 2 (6) Similarly, we replace l (2 j n) with l = ωe e(1 e 3) . j ≤ ≤ j → ≤ ≤ (7) Digital set L is replaced with the coded digit set E = 0, 1, 2, 3, 4, 5, 6, 10, 20, 30, 0 0 { 40, 50, 60, 100, 200, 300, 400, 500, 600, 106, 601, 201, 102, 302, 203, 403, 304, 504, 405, 605, 506, 1000, 2000, ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 5 of 16

∈ ′ → (1) For lL11, let lee1 (1 6) ; ∈ ′ → (2) for lL12, let lee1 100 (1 6) ; ∈ ′ →+ (3) for lL13, le1 10(( 1)%6)(1 e 6) ; ∈ ′ → ′′ α (4) for lL14, lll111100 ( are the code digits after the replacement of ); and ∈ ′ →+ (5) for lL15, lee112100 . =→ωe (6) Similarly, we replace ljnj (2 ) with leej (1 3) . ISPRS Int. J. Geo-Inf. 2020, 9, 83 5 of 16 (7) Digital set L′ is replaced with the coded digit set E′ = { 0,1,2,3,4,5,6,10,20, 30, 40,50,60,100,200,300,400,500,600,106,601,201,102,302,203,403,304,504,405,605, 3000, 4000, 5000, 6000 , and digital set L is replaced with the coded digit set E = 0, 1, 2, 3 . The 506,1000,2000,3000,4000,5000,6000}} , and digital set L is replaced with the{ coded} digit unique identifier for x is shown in Formula (4). set E = {0,1, 2, 3} . The unique identifier for x is shown in Formula (4).

x ==∈∈eee1e2 een ((,(2))e e1 E E0,′e ej E( E2 j jn n)) (4) 12··· nj 1∈ ∈ ≤ ≤ (4) According to the complex radix vector addition principle, the code addition table is defined. An exampleAccording of a coding to the addition complex operator radix vector is shown addition in Figure principle,3. the code addition table is defined. An example of a coding addition operator is shown in Figure 3.

Figure 3. An example of a coding addition operator. 3. Indexing Algorithm 3. Indexing Algorithm The basic method of spatial indexing is to divide the whole space into different search areas and The basic method of spatial indexing is to divide the whole space into different search areas find spatial entities in these areas in a certain order. The face tiles and vertex tiles in HLQT divide the and find spatial entities in these areas in a certain order. The face tiles and vertex tiles in HLQT globe into different search areas, and the separate processing approach is used for indexing. The focus divide the globe into different search areas, and the separate processing approach is used for of this paper is a proposed single-level and hierarchical indexing algorithm based on tiles. Due to the indexing. The focus of this paper is a proposed single-level and hierarchical indexing algorithm equivalence of coding schemes between tiles, such an indexing algorithm is applicable to a wide range based on tiles. Due to the equivalence of coding schemes between tiles, such an indexing algorithm of regions, including the entire globe [28]. is applicable to a wide range of regions, including the entire globe [28]. Indexing addition operations avoid floating-point operations and improve the efficiency of Indexing addition operations avoid floating-point operations and improve the efficiency of searching cells. Based on this method, this paper designs a code addition structure consisting of the searching cells. Based on this method, this paper designs a code addition structure consisting of the central cell code of a tile and the surrounding six cell codes (hereinafter referred to as the base codes, central cell code of a tile and the surrounding six cell codes (hereinafter referred to as the base codes, numbered 1–6); these codes are related to the hierarchical structure. The code addition structure of numbered 1–6); these codes are related to the hierarchical structure. The code addition structure of level n is shown in Figure4a. According to the HLQT coding operation scheme, the neighboring cells level n is shown in Figure 4a. According to the HLQT coding operation scheme, the neighboring of any cell in a tile can be calculated by addition. As shown in Figure4b, the adjacent cell β of α in a cells of any cell in a tile can be calculated by addition. As shown in Figure 4b, the adjacent cell β tile can be obtained by adding the base code 1 to α, and the surrounding cell codes can similarly be of α in a tile can be obtained by adding the base code 1 to α , and the surrounding cell codes can calculated by addition. similarly be calculated by addition.

ISPRS Int. J. Geo-Inf. 2020, 9, 83 6 of 16 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 6 of 16 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 6 of 16

(a) (b) (a) (b) FigureFigure 4. Code4. Code addition addition structure structure and and neighboring neighboring cell cell code code calculation: calculation: (a) ( codea) code addition addition structure structure Figure 4. Code addition structure and neighboring cell code calculation: (a) code addition structure (with(with n denoting n denoting level) level) and and (b) ( calculationb) calculation of theof the neighboring neighboring cell cell code. code. (with n denoting level) and (b) calculation of the neighboring cell code. 3.1.3.1. Single-Resolution Single-Resolution Indexing Indexing Algorithm Algorithm 3.1. Single-Resolution Indexing Algorithm WeWe design design an an indexing indexing algorithm algorithm that that starts starts from from an initial an initial quad quad tree andtree growsand grows outward outward ring byring We design an indexing algorithm that starts from an initial quad tree and grows outward ring ring.by Thering. code The additioncode addition operation operation is used is betweenused between adjacent adjacent quad quad trees, trees, and only and the only last the digit lastof digit the of by ring. The code addition operation is used between adjacent quad trees, and only the last digit of cellsthe on cells the on tree the must tree be must changed, be changed, which considerablywhich considerably improves improves the indexing the indexing efficiency. efficiency. The index The the cells on the tree must be changed, which considerably improves the indexing efficiency. The structureindex structure is shown is in shown Figure in5. Figure 5. index structure is shown in Figure 5.

. . FigureFigure 5. Schematic5. Schematic of of the the single-level single-level code code indexing indexing algorithm. algorithm. Figure 5. Schematic of the single-level code indexing algorithm. AsAs shown shown in in Figure Figure5, the5, the indexing indexing algorithm algorithm makes makes full full use use of theof the HLQT HLQT quad-tree quad-tree structure. structure. As shown in Figure 5, the indexing algorithm makes full use of the HLQT quad-tree structure. RingRing 0 is0 theis the initial initial indexing indexing quad-tree, quad-tree, and and cells cells are are searched searched ring ring by by ring ring according according to to a specifica specific Ring 0 is the initial indexing quad-tree, and cells are searched ring by ring according to a specific algorithm.algorithm. Except Except for for ring ring 0, ring 0, ringr is composedr is composed of (6 ofr) quad(6  trees.r ) quad The trees. indexing The processindexing is dividedprocess is algorithm. Except for ring 0, ring r is composed of× (6  r ) quad trees. The indexing process is divided into two parts: indexing between rings and indexing within a ring. The specific indexing divided into two parts: indexing between rings and indexing within a ring. The specific indexing algorithm performs four steps as follows: algorithm performs four steps as follows:

ISPRS Int. J. Geo-Inf. 2020, 9, 83 7 of 16

into two parts: indexing between rings and indexing within a ring. The specific indexing algorithm performs four steps as follows: ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 7 of 16 (1) Input the objects (geographic regions, data sets, etc.) to be indexed; then, initialize the data to (1) Inputobtain the the objects ring 0(geographic indexes and regions, the number data ofsets, rings, etc.) denoted to be indexed; as k. then, initialize the data to (2) obtainIndex the the ring next 0 ring.indexes The and first the quad number tree of of rings, the next denoted ring is as obtained k . by adding the base code 1 (2) Indexto the the quad next tree ring. of The the first previous quad ring.tree of In the Figure next 5ring, the is indexing obtained of by the adding initial the quad base tree code to 1 that to theof quad the first tree and of the the previous indexing ring. of first In Figure quad tree5, the to indexing that of the of the seventh initial are quad examples tree to ofthat indexing of the firstbetween and the rings. indexing of first quad tree to that of the seventh are examples of indexing between (3) rings.Traverse the indexes of ring r. Each ring needs to complete quad-tree transitions in six different (3) Traversedirections the corresponding indexes of ring to ther . sixEach basic ring codes needs of the to codecomplete addition quad-tree structure; transitions for example, in six for differentthe first directions ring, the transitionscorresponding are 1to the2, 2 six 3,ba 3sic codes4, 4 of5, 5the code6, 6 addition1. Note structure; that for ring for r, → → →→→→→→→ → → → example,the addition for the operation first ring, is the performed transitions in eachare 1 direction 2,2r times. 3,3 As 4,4 shown 5,5 in Figure 6,64, in 1 Ring. Note 1, thatindexing for ring the r first, the quad addition tree tooperation that of the is secondperformed requires in each one direction addition, andr times. for Ring As 2,shown indexing in Figurethe seventh 4, in Ring quad 1, treeindexing to that the of first the ninthquad requirestree to that two of additions. the second requires one addition, and (4) forRepeat Ring 2, Step indexing (3) while the theseventh number quad of ringstree to< thatk. of the ninth requires two additions. (4) Repeat Step (3) while the number of rings < k . Taking Beijing, China, as an example, the level of the grid system is 13. The cell codes are obtained Taking Beijing, China, as an example, the level of the grid system is 13. The cell codes are according to the above indexing algorithm. We record the indexing results at four different moments obtained according to the above indexing algorithm. We record the indexing results at four and convert them into grids, which are displayed in Figure6. The entire algorithm process is shown in different moments and convert them into grids, which are displayed in Figure 6. The entire Figure7. algorithm process is shown in Figure 7.

(a) (b)

(c) (d)

FigureFigure 6. 6. CodeCode indexing indexing results results at at different different times times in in Beijing Beijing (t4 (t4 >> t3t3 >> t2t2 > >t1):t1): (a ()a indexing) indexing result result at at timetime t1. t1. (b ()b indexing) indexing result result at at time time t2, t2, (c ()c indexing) indexing result result at at time time t3, t3, and and (d (d) indexing) indexing result result at at time time t4. t4.

ISPRS Int. J. Geo-Inf. 2020, 9, 83 8 of 16 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 8 of 16

Figure 7. Process diagram of a single-level code indexing algorithm. 3.2. Hierarchical Indexing Algorithm 3.2. Hierarchical Indexing Algorithm The indexing algorithm of the ringed space region is implemented above, but this approach The indexing algorithm of the ringed space region is implemented above, but this approach is is only for a single resolution, and there is no connection between grid levels. In multiresolution only for a single resolution, and there is no connection between grid levels. In multiresolution operations, such as data zooming, it is necessary to convert between coarse and fine grids in real time, operations, such as data zooming, it is necessary to convert between coarse and fine grids in real and an efficient hierarchical indexing algorithm plays an important role in this process. This paper time, and an efficient hierarchical indexing algorithm plays an important role in this process. This implements different levels of indexing based on single-level ringed-region indexing. The specific paper implements different levels of indexing based on single-level ringed-region indexing. The algorithm employs the following steps: specific algorithm employs the following steps: (1)(1) EnterEnter an an object (data set or administrative division) and index it according to the single-levelsingle-level indexingindexing algorithm algorithm (Figure (Figure 77)) atat thethe initialinitial gridgrid resolution.resolution. (2)(2) WhenWhen performingperforming a a zoom-in zoom-in operation operation for thefor object, the ob eachject, cell each at the cell initial at the resolution initial generatesresolution a generatesquad-tree thata quad-tree includes that four includes children cells.four children Then, the cells. cell is Then, indexed the to cell a higher is indexed level, asto showna higher in level,Figure as8b. shown in Figure 8b. (3)(3) ContinueContinue with with Step Step (2) until the grids of the highest level are all indexed. (4)(4) WhenWhen a zoom-outzoom-out operationoperation is is performed performed for for an an object, object, each each quad quad tree tree of the of high-resolutionthe high-resolution grid griddegenerates degenerates to the to parent the parent cell of cell the previousof the prev level,ious and level, this and iterative this iterative process continuesprocess continues until the untilcoarsest the gridscoarsest are grids all indexed. are all indexed.

The hierarchicalhierarchical indexing algorithm is essentially a quad-treequad-tree algorithm that only involvesinvolves thethe addition and culling of the last coded digit,digit, and nono fullfull codecode additionaddition operationoperation isis required.required. Only when the index is is being being determined determined at at the the initial initial resolu resolutiontion is a is single-level a single-level indexing indexing algorithm algorithm needed. needed. The indexing of levels 10 to 11 and 12 is realized with an example of Henan Province, China, as shown in Figure8 8b,c.b,c. AA pyramidpyramid indexindex modelmodel isis formedformed betweenbetween thethe levelslevels forfor gridgrid indexingindexing fromfrom coarse to finefine and fromfrom finefine toto coarse,coarse, asas shownshown inin FigureFigure8 8d.d.

ISPRS Int. J. Geo-Inf. 2020, 9, 83 9 of 16 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 9 of 16

(a) (b)

(c) (d)

FigureFigure 8. Hierarchical8. Hierarchical indexing indexing algorithm algorithm and pyramidand pyramid model: model: (a) the (a indexing) the indexing result ofresult level of 10 level grids 10 (initialgrids resolution); (initial resolution); (b) indexing (b) indexing from grid from levels grid 10 levels to 11; (10c) indexingto 11; (c) indexing from levels from 11 tolevels 12; and 11 to (d 12;) the and pyramid(d) the modelpyramid of themodel hierarchical of the hierarchical index algorithm. index algorithm.

4. Experiments and Analysis

4.1. Data Indexing with a Large Scope The experimental data used in this paper includes Chinese vegetation coverage grid data obtained from the Resource and Environmental Science Data Center of the Chinese Academy of Sciences in 2000. The data are in the Albers equal area conic projection, and the size of each grid is 1 x 1 km. We selected ten provinces and cities in China (Hebei, Beijing, Tianjin, Shandong, Jiangsu, Anhui, Hubei, Shanxi, Shanxi, and Henan Provinces) for testing; there were 1,204,186 sampling points, as shown in Figure9. We design a comparative experiment to verify the efficiency of the proposed indexing algorithm. It has been demonstrated [31] that the efficiency of the code addition operations of HLQT is higher than those of HQBS and PYXIS. Therefore, the indexing algorithm proposed in this paper is more efficient than HQBS and PYXIS because we use the coding structure of the quad tree to accelerate the index operations; thus, we do not make an efficiency comparison here. Mahdavi-Amiri et al. [29] designed a hierarchical indexing scheme named “connectivity maps” for hexagonal grids; this scheme combined the two triangular faces of icosahedrons as diamonds and used the diamonds as the basic object for 3, 4 or 7-aperture refinement. The work in this paper uses the tile structure on the icosahedron as the basic refinement object (Figure1); the refinement scheme of each tile is the same, and the refinement aperture is 4. The connectivity maps yielded considerable improvements in indexing neighborhood and hierarchical cells, and the diamond structure facilitated visualization. Neighborhood search operations were simply performed by adding neighborhood

ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 10 of 16

4. Experiments and Analysis

4.1. Data Indexing with a Large Scope ISPRS Int. J. Geo-Inf. 2020, 9, 83 10 of 16 The experimental data used in this paper includes Chinese vegetation coverage grid data obtained from the Resource and Environmental Science Data Center of the Chinese Academy of vectors to the index of a hexagon, and hierarchical cell searching was performed by multiplying R or R Sciences in 2000. The data are in the Albers equal area conic projection, and the size of each grid is 1 (scalar) by the index of a given cell (where R represents a rotation, scaling or translation matrix). In x 1 km. We selected ten provinces and cities in China (Hebei, Beijing, Tianjin, Shandong, Jiangsu, the proposed indexing scheme, adjacent cells can be quickly obtained by code addition, as shown in Anhui, Hubei, Shanxi, Shanxi, and Henan Provinces) for testing; there were 1,204,186 sampling Figure4. Hierarchical cell searching only needs to increase or decrease one digit at the end of the code. points, as shown in Figure 9.

Figure 9. Vegetation coverage classification in some provinces and cities in China. Figure 9. Vegetation coverage classification in some provinces and cities in China. Sahr used an (i, j) scheme for the indexes of the hexagonal grid cells in the open source project We design a comparative experiment to verify the efficiency of the proposed indexing DGGRID [25,26]. Adjacent searching is the advantage based on row and column codes, and this algorithm. It has been demonstrated [31] that the efficiency of the code addition operations of comparison can reflect the effectiveness of the proposed indexing scheme. Sahr combined icosahedral HLQT is higher than those of HQBS and PYXIS. Therefore, the indexing algorithm proposed in this triangles into 10 quads to process each quad separately. The indexing scheme constructs a minimum paper is more efficient than HQBS and PYXIS because we use the coding structure of the quad tree outsourced quadrilateral geographic area in each quadrilateral (the example in Figure 10 is Henan to accelerate the index operations; thus, we do not make an efficiency comparison here. Province,ISPRS Int. J. China),Geo-Inf. 2020 as,shown 9, x FORin PEER Figure REVIEW 10. 11 of 16 Mahdavi-Amiri et al. [29] designed a hierarchical indexing scheme named “connectivity maps” for hexagonal grids; this scheme combined the two triangular faces of icosahedrons as diamonds and used the diamonds as the basic object for 3, 4 or 7-aperture refinement. The work in this paper uses the tile structure on the icosahedron as the basic refinement object (Figure 1); the refinement scheme of each tile is the same, and the refinement aperture is 4. The connectivity maps yielded considerable improvements in indexing neighborhood and hierarchical cells, and the diamond structure facilitated visualization. Neighborhood search operations were simply performed by adding neighborhood vectors to the index of a hexagon, and hierarchical cell searching was performed by multiplying R or R (scalar) by the index of a given cell (where R represents a rotation, scaling or translation matrix). In the proposed indexing scheme, adjacent cells can be quickly obtained by code addition, as shown in Figure 4. Hierarchical cell searching only needs to increase or decrease one digit at the end of the code. Sahr used an (,Figureij ) 10.schemeSchematic for the diagram indexes of the of DGGRID the hexagonal indexing grid algorithm. cells in the open source Figure 10. Schematic diagram of the DGGRID indexing algorithm. project DGGRID [25,26]. Adjacent searching is the advantage based on row and column codes, and The basic steps in the DGGRID indexing algorithm can be summarized as follows. this Thecomparison basic steps can in reflect the DGGRID the effectiveness indexing algorithm of the proposed can be summarized indexing scheme. as follows. Sahr combined (1) Convert the data from and to codes q, (i, j) (where q is the quadrilateral icosahedral triangles into 10 quads to process each quad separately.qij,( ,The ) indexingq scheme number),(1) Convert and calculate the data the extremumsfrom latitude of i andandj tolongitude obtain ( ito ,codesi ) and (j , j (where) The lower is left the constructs a minimum outsourced quadrilateral geographic areamin maxin each quadrilateralmin max (the example coordinatequadrilateral of thenumber), minimum and outsourcedcalculate the quadrilateral extremums is denotedof i and as originj to(i obtain, j ),(, andii the ) upper and in Figure 10 is Henan Province, China), as shown in Figure 10. min min min max right coordinate is denoted as upperrignt(imax, jmax) for the given data range. (,jminj max ) The lower left coordinate of the minimum outsourced quadrilateral is denoted as

origin(, imin j min ), and the upper right coordinate is denoted as upperrignt(, imax j max ) for the given data range. (2) Convert the data from latitude and longitude to (,ij ) again, and translate the coordinate axis to narrow the index range and obtain the minimum outsourced quadrilateral, as shown in Figure 10. The Formula (5) is for obtaining the new code:

I =−iorigini.  (5) J=− j origin. j 

(3) Index the smallest outsourced quad and convert it to the actual codes in the original coordinate system. To ensure fair and objective comparisons, the icosahedral positioning parameters [3] °°α =− ° VNE0 (15.381 ,149.75 ), 86.669 are selected to ensure that the grids do not cross the surface. The indexing time is recorded at the respective resolutions. Calculations are repeated ten times and then averaged, and the number of indexing cells in each level is calculated. Finally, the efficiency is determined as the number of cells indexed per millisecond. The results are shown in Tables 1 and 2, and the efficiency comparison curves are shown in Figures 11 and 12. Each program was compiled for the release version and operated on the same desktop (Core [email protected] GHz six-core CPU, 8G RAM WDC WDS480G2G0A-00JH30 480G SSD; Windows 7 X64 Ultimate SP1; development software: Microsoft Visual C++ 2012 Update 5).

Table 1. Results of the single-level indexing comparison experiment.

DGGRID The Proposed Algorithm Efficiency Level Time Efficiency Time Efficiency Cells Cells Ratio (ms) (cells/ms) (ms) (cells/ms) 7 960 0.0808 11,881.188 676 0.0183 36,799.129 3.10 8 3534 0.3017 11,713.622 2524 0.0713 35,399.719 3.02 9 14,022 1.1721 11,963.143 10,444 0.3531 29,578.023 2.47 10 55,370 4.6023 12,030.941 39,676 1.5535 25,539.748 2.12 11 220,050 18.2345 12,067.784 154,588 7.1138 21,730.721 1.80 12 880,277 73.1306 12,037.054 621,076 32.5028 19,108.384 1.59

ISPRS Int. J. Geo-Inf. 2020, 9, 83 11 of 16

(2) Convert the data from latitude and longitude to (i, j) again, and translate the coordinate axis to narrow the index range and obtain the minimum outsourced quadrilateral, as shown in Figure 10. The Formula (5) is for obtaining the new code: ( I = i origin.i − (5) J = j origin.j − (3) Index the smallest outsourced quad and convert it to the actual codes in the original coordinate system. To ensure fair and objective comparisons, the icosahedral positioning parameters [3] V (15.381◦ N, 149.75◦ E), α = 86.669◦ are selected to ensure that the grids do not cross the surface. 0 − The indexing time is recorded at the respective resolutions. Calculations are repeated ten times and then averaged, and the number of indexing cells in each level is calculated. Finally, the efficiency is determined as the number of cells indexed per millisecond. The results are shown in Tables1 and2, and the efficiency comparison curves are shown in Figures 11 and 12. Each program was compiled for the release version and operated on the same desktop (Core [email protected] GHz six-core CPU, 8G RAM WDC WDS480G2G0A-00JH30 480G SSD; Windows 7 X64 Ultimate SP1; development software: Microsoft Visual C++ 2012 Update 5).

Table 1. Results of the single-level indexing comparison experiment.

DGGRID The Proposed Algorithm Efficiency Level Time Efficiency Time Efficiency Ratio Cells Cells (ms) (cells/ms) (ms) (cells/ms) 7 960 0.0808 11,881.188 676 0.0183 36,799.129 3.10 8 3534 0.3017 11,713.622 2524 0.0713 35,399.719 3.02 9 14,022 1.1721 11,963.143 10,444 0.3531 29,578.023 2.47 10 55,370 4.6023 12,030.941 39,676 1.5535 25,539.748 2.12 11 220,050 18.2345 12,067.784 154,588 7.1138 21,730.721 1.80 12 880,277 73.1306 12,037.054 621,076 32.5028 19,108.384 1.59 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 12 of 16

(a) (b)

FigureFigure 11. 11.E ffiEfficiencyciency comparison comparison line line charts charts for single-levelfor single-level indexing: indexing: (a) absolute (a) absolute value value and (b and) ratio. (b) ratio.

Table 2. Results of the hierarchical indexing efficiency comparison experiment.

DGGRID The Proposed Algorithm Efficiency Level Time Efficiency Time Efficiency Cells Cells Ratio (ms) (cells/ms) (ms) (cells/ms) 8→9 13,899 3.2014 4341.538 10,096 0.0165 611,878.787 140.94 9→10 55,615 7.2554 7665.325 40,384 0.0778 519,074.550 67.72 10→11 220,539 20.4784 10,769.347 161,536 0.3125 516,915.200 48.00 11→12 878,323 74.2415 11,830.620 646,144 1.2279 516,218.747 43.63 12→13 3,517,353 293.9663 11,965.157 2,584,567 5.6475 457,647.985 38.25

(a) (b)

Figure 12. Efficiency comparison line chart for hierarchical indexing: (a) absolute value and (b) ratio.

The results of the comparison experiment indicate that the efficiency of the proposed algorithm is higher than that of the DGGRID algorithm. The average efficiency of single-level indexing is approximately two times that of the DGGRID algorithm, and the average efficiency of hierarchical indexing is approximately 67 times higher. The reasons for these results are as follows: (1) The DGGRID encoding method uses (,ij ) numbers, and its major advantage is proximity searching [4]. However, in the case of cell indexing for regions, because codes must be indexed in sequence, a small outsourced quadrilateral, as shown in Figure 10, must be determined to narrow the indexing range to reduce memory consumption, which requires multiple conversion calculations, resulting in decreased efficiency. (2) The proposed algorithm does not need to perform sequential indexing and only needs to “know” the center coordinates and index range of the object. Thus, the code operations and coding structure of the quad tree accelerate the indexing process. As the level increases, the frequency of code addition increases, and the length of the code digit becomes longer, resulting in a decrease in efficiency, as shown in Figure 11.

ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 12 of 16

(a) (b)

ISPRS Int.Figure J. Geo-Inf. 11. Efficiency2020, 9, 83 comparison line charts for single-level indexing: (a) absolute value and (12b) of 16 ratio.

Table 2. Results of the hierarchical indexing efficiency comparison experiment. Table 2. Results of the hierarchical indexing efficiency comparison experiment.

DGGRIDDGGRID TheThe Proposed Proposed Algorithm Algorithm Efficiency Level Efficiency Level Time EEfficiencyfficiency TimeTime EEfficiencyfficiency Ratio CellsCells CellsCells Ratio (ms)(ms) (cells(cells/ms)/ms) (ms)(ms) (cells(cells/ms)/ms) 8 8→99 13,89913,899 3.2014 4341.5384341.538 10,09610,096 0.01650.0165 611,878.787611,878.787 140.94140.94 → 9 9→1010 55,61555,615 7.2554 7665.3257665.325 40,38440,384 0.07780.0778 519,074.550519,074.550 67.7267.72 → 1010→1111 220,539220,539 20.4784 10,769.34710,769.347 161,536161,536 0.31250.3125 516,915.200516,915.200 48.0048.00 → 1111→1212 878,323878,323 74.2415 11,830.62011,830.620 646,144646,144 1.22791.2279 516,218.747516,218.747 43.6343.63 → 1212→1313 3,517,3533,517,353 293.9663 11,965.157 11,965.157 2,584,5672,584,567 5.64755.6475 457,647.985457,647.985 38.2538.25 →

(a) (b)

FigureFigure 12. 12.E Efficiencyfficiency comparisoncomparison lineline chart chart for for hierarchical hierarchical indexing: indexing:( a(a)) absolute absolute value value and and ( b(b)) ratio. ratio.

TheThe resultsresults ofof thethe comparisoncomparison experimentexperiment indicateindicate thatthat thethe eefficiencyfficiencyof ofthe theproposed proposedalgorithm algorithm isis higherhigher thanthan thatthat ofof the the DGGRID DGGRID algorithm. algorithm. TheThe averageaverage eefficiencyfficiency ofof single-levelsingle-level indexingindexing isis approximatelyapproximately twotwo timestimes thatthat ofof thethe DGGRIDDGGRID algorithm,algorithm, andand thethe averageaverage eefficiencyfficiency ofofhierarchical hierarchical indexingindexing is is approximately approximately 67 67 times times higher. higher. The The reasons reasons for for these these results results are are as as follows: follows: ( ) (1)(1) TheThe DGGRIDDGGRID encoding method uses (,iij, j )numbers, numbers, and and its itsmajor major advantageadvantage isis proximityproximity searching [4]. However, in the case of cell indexing for regions, because codes must be indexed searching [4]. However, in the case of cell indexing for regions, because codes must be indexed in sequence, a small outsourced quadrilateral, as shown in Figure 10, must be determined to in sequence, a small outsourced quadrilateral, as shown in Figure 10, must be determined to narrow the indexing range to reduce memory consumption, which requires multiple conversion narrow the indexing range to reduce memory consumption, which requires multiple calculations, resulting in decreased efficiency. conversion calculations, resulting in decreased efficiency. (2) The proposed algorithm does not need to perform sequential indexing and only needs to “know” (2) The proposed algorithm does not need to perform sequential indexing and only needs to the center coordinates and index range of the object. Thus, the code operations and coding “know” the center coordinates and index range of the object. Thus, the code operations and structure of the quad tree accelerate the indexing process. As the level increases, the frequency of coding structure of the quad tree accelerate the indexing process. As the level increases, the code addition increases, and the length of the code digit becomes longer, resulting in a decrease frequency of code addition increases, and the length of the code digit becomes longer, resulting in efficiency, as shown in Figure 11. in a decrease in efficiency, as shown in Figure 11. (3) A main feature of the hierarchical indexing algorithm in this paper is the establishment of quad-tree relationships between levels. When indexing via the proposed approach, we only need to add or subtract a digit at the end of the code, whereas the DGGRID method does not use hierarchical information [25], and the minimum quadrilateral range of the next level must be calculated. Moreover, the number of indexing cells is large, as shown in Table2. Therefore, the proposed algorithm is superior, as shown in Figure 12a, but as the level increases, the HLQT code length increases, resulting in a higher cost of code digit processing. As a result, the efficiency ratio decreases, as shown in Figure 12b. (4) For large-scale, including global, data processing in practical applications, level-of-detail (LOD) processing is often adopted [35]. The range of high-resolution regions close to the viewpoint is small, resulting in a small number of cells. The resolution far from the viewpoint is low, and the proposed algorithm has a higher indexing efficiency when the grid resolution is low; therefore, the algorithm in this paper is advantageous in practical applications. ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 13 of 16

(3) A main feature of the hierarchical indexing algorithm in this paper is the establishment of quad-tree relationships between levels. When indexing via the proposed approach, we only need to add or subtract a digit at the end of the code, whereas the DGGRID method does not use hierarchical information [25], and the minimum quadrilateral range of the next level must be calculated. Moreover, the number of indexing cells is large, as shown in Table 2. Therefore, the proposed algorithm is superior, as shown in Figure 12a, but as the level increases, the HLQT code length increases, resulting in a higher cost of code digit processing. As a result, the efficiency ratio decreases, as shown in Figure 12b. (4) For large-scale, including global, data processing in practical applications, level-of-detail (LOD) processing is often adopted [35]. The range of high-resolution regions close to the viewpoint is small, resulting in a small number of cells. The resolution far from the viewpoint is low, and ISPRS Int. J. Geo-Inf. 2020, 9, 83 13 of 16 the proposed algorithm has a higher indexing efficiency when the grid resolution is low; therefore, the algorithm in this paper is advantageous in practical applications. The indexing results are shown in Figure 13. When the grid level is set to 13 [25], the resolution is The indexing results are shown in Figure 13. When the grid level is set to 13 [25], the resolution equivalent to that of the original data (Figure9). is equivalent to that of the original data (Figure 9).

(a) (b)

Figure 13.13. VisualizationVisualization results results for for the indexingthe indexing algorithm algorithm proposed proposed in this paper:in this (a )paper: global viewpoint(a) global andviewpoint (b) local and viewpoint. (b) local viewpoint.

4.2. Data Indexing with a Small Scope Similarly,ourSimilarly, our indexing indexing algorithm algorithm can becan applied be applied for indexing for indexing small-scope small-scope data, such asdata, bike-sharing such as databike-sharing in cities. data Although in cities. the Although scope of the bike-sharing scope of bike-sharing data is small, data the is small, data are the constantly data are constantly updated, resultingupdated, inresulting a large amount in a large of data.amount Therefore, of data. the Theref timelyore, and the e fftimelyective and analysis effective of the analysis data is particularlyof the data important.is particularly In this important. experiment, In thethis bike-sharing experiment, data the frombike-sharing Dongcheng data district from in Dongcheng Beijing were district provided in byBeijing Beijing were Engineering provided Laboratory by Beijing of BeidouEngineering Navigation Laboratory and LBS Technologyof Beidou [36Navigation]. We select and diff erentLBS periodsTechnology of a working[36]. We dayselect for different experiments, periods and of the a working grid level day is setfor toexperiments, 17. We then and convert the grid the latitudelevel is andset to longitude 17. We then coordinates convert ofthe the latitude data into and codes, longitude and thecoordinates number of bikesthe data in eachinto cellcodes, is counted.and the Finally,number di offf erentbikes depths in each of cell color is arecounted. assigned Finally, to the different cells according depths to of the color number are assigned of bikes presentto the cells (the moreaccording bikes to there the are,number the darker of bikes the colorpresent is). (the We indexmore thebikes codes there using are, our the single-resolution darker the color indexing is). We algorithmindex the codes (Figure using5) and our render single-resolution hexagon data indexing on a web algorithm map. The results(Figure of 5) the and experiments render hexagon are shown data inon Figurea web 14map.. The results of the experiments are shown in Figure 14. The following analysis can be obtained from the above experiments:

(1) The number of bikes during rush hour periods (Figure 14a,b) is significantly higher than that in the evening (Figure 14c) because people need to use bikes to get to and from work, but bikes are not generally required at night. (2) The distribution of bikes in different time periods is basically the same. Therefore, companies should add bikes in areas with dark colors, as shown in Figure 14. (3) Parking in areas A to E (Figure 14a) is prohibited; as a result, there are few bikes in these areas. If there are bikes in these areas, the company should promptly find and remove them.

While used in indexing and analyzing such dynamic, changing data, hexagons are a desirable choice. Hexagons can minimize the quantization error introduced when bikes move through a city; since the edge or length of contact is the same on each side, the centroid of each neighbor is equidistant; finding neighbors is more straightforward using a hexagon grid. Our hexagonal indexing algorithm accelerates the neighborhood searching by code addition operation and quad-tree gird structure, which is conducive to dynamic data indexing and visual analysis. Moreover, our algorithm index a ringed region that is similar to a circle, which allows us to approximate radiuses easily and is beneficial for searching the surrounding bikes. ISPRS Int. J. Geo-Inf. 2020, 9, 83 14 of 16 ISPRS Int. J. Geo-Inf. 2020, 9, x FOR PEER REVIEW 14 of 16

(a) (b) (c) Figure 14. Visualization results for the bike-sharing data from Dongcheng district in Beijing using Figure 14. Visualization results for the bike-sharing data from Dongcheng district in Beijing using the the indexing algorithm proposed in this paper: (a) from 8:00 to 9:00, where areas from A to E are indexing algorithm proposed in this paper: (a) from 8:00 to 9:00, where areas from A to E are Ditan park, Ditan park, the Russian Embassy, Beijing railway station, Temple of Heaven Park, and Longtan the Russian Embassy, Beijing railway station, Temple of Heaven Park, and Longtan Park, respectively; Park, respectively; (b) from 17:00 to 18:00; and (c) from 20:00 to 21:00. (b) from 17:00 to 18:00; and (c) from 20:00 to 21:00.

5. ConclusionsThe following and analysis Future Researchcan be obtained Directions from the above experiments: (1) InThe this number paper, of we bikes design during a ringed-region rush hour indexingperiods (F algorithmigure 14a,b) based is onsignificantly HLQT using higher code than addition that operationsin the andevening a quad-tree (Figure structure14c) because to accelerate people need hierarchical to use bikes indexing. to getThe to and comparison from work, experiments but bikes verifyare the not feasibility generally and required efficiency at night. of the proposed algorithm, with the proposed algorithm not only improving(2) The distribution the efficiency of ofbikes the single-resolutionin different time indexingperiods is method basically but the also same. significantly Therefore, improving companies the indexingshould effi addciency bikes among in areas multiresolution with dark colors, levels. as shown in Figure 14. (3) ByParking using in hexagonal areas A to grids E (Figure to organize 14a) is and prohibited; manage as multiple a result, spatial there data,are few the bikes indexing in these algorithm areas. proposedIf there in are this bikes paper in can these quickly areas, and the accuratelycompany should index multi-resolutionpromptly find and data remove with athem. specified ring region.While We giveused twoin indexing potential and application analyzing scenarios: such dynami (a) Inc, achanging GIS spatial data, analysis, hexagons we mayare a searchdesirable for datachoice. located Hexagonsn kilometers can minimize around the a certainquantization position, error such introduced as in the when case of bikes clients move looking through for hotelsa city; withinsince the three edge kilometers or length or taxiof userscontact querying is the taxissame within on each five side, kilometers. the centroid Because of the each main neighbor advantage is ofequidistant; the algorithm finding provided neighbors in this paperis more is hierarchicalstraightforward indexing, using we a can hexagon first index grid. the Our ringed hexagonal area at a lowerindexing resolution, algorithm and accelerates then we can the perform neighborhood hierarchical searching indexing fromby code coarse addition to fine to operation determine and the targetquad-tree position. gird (b)structure, In the visual which analysis is conducive of multi-resolution to dynamic spatial data data,indexing the algorithm and visual presented analysis. in thisMoreover, paper canour display algorithm data index at multiple a ringed levels region via its that efficient is similar hierarchical to a indexing.circle, which allows us to approximateHowever, radiuses the proposed easily and algorithm is beneficial only considers for searching the situation the surrounding for a single bikes. tile. When the object range is large, the trans-surface cells must be processed separately. This topic will be a focus of our future5. Conclusions research. and Future Research Directions

AuthorIn Contributions:this paper, weConceptualization, design a ringed-region Jianbin Zhou, indexing Jin Ben algorithm and Rui Wang; based Methodology, on HLQT Jianbinusing Zhou;code Software,addition Jianbinoperations Zhou and and Jina quad-tree Ben; Validation, structure Jianbin to Zhou,accelerate Rui Wang hierarchical and Mingyang indexing. Zheng; The Formal comparison Analysis, Jianbin Zhou and Lingyu Du; Investigation, Lingyu Du, Rui Wang; Resources, Mingyang Zheng; Data Curation, Jinexperiments Ben; Writing—Original verify the Draftfeasibility Preparation, and Jianbinefficiency Zhou of and the Jin proposed Ben; Writing—Review algorithm, & with Editing, the Jianbin proposed Zhou andalgorithm Jin Ben; not Visualization, only improving Jianbin Zhou the andefficiency Jin Ben; of Supervision, the single-resolution Jin Ben. All authors indexing have method read and agreedbut also to thesignificantly published versionimproving of the the manuscript. indexing efficiency among multiresolution levels. Funding:By usingThis research hexagonal was funded grids by to the organize Natural Science and manage Foundation multiple of China, spatial grant number data, [41671410].the indexing Conflictsalgorithm of proposed Interest: The in authorsthis paper declare can no quickly conflict ofand interest. accurately index multi-resolution data with a specified ring region. We give two potential application scenarios: (a) In a GIS spatial analysis, we may search for data located n kilometers around a certain position, such as in the case of clients looking for hotels within three kilometers or taxi users querying taxis within five kilometers. Because the main advantage of the algorithm provided in this paper is hierarchical indexing, we

ISPRS Int. J. Geo-Inf. 2020, 9, 83 15 of 16

References

1. Mahdavi-Amiri, A.; Alderson, T.; Samavati, F. A survey of digital earth. Comput. Graph. 2015, 53, 95–117. [CrossRef] 2. Peterson, P.R. Discrete Global grid systems. Int. Encycl. Geogr. People Earth Environ. Technol. 2016, 1–10. [CrossRef] 3. Sahr, K.; White, D.; Kimerling, A.J. Geodesic discrete global grid systems. Cartogr. Geogr. Inf. Sci. 2003, 30, 121–134. [CrossRef] 4. Mahdavi-Amiri, A.; Samavati, F.; Peterson, P. Categorization and Conversions for Indexing Methods of Discrete Global Grid Systems. ISPRS Int. J. Geo-Inf 2015, 4, 320–336. [CrossRef] 5. Samet, H. Foundations of Multidimensional and Metric Data Structures; Morgan Kaufmann Publishers Inc.: San Francisco, CA, USA, 2005. 6. Gorski, K.M.; Hivon, E.; Banday, A.J.; Wandelt, B.D.; Hansen, F.K.; Reinecke, M.; Bartelmann, M. HEALPix: A framework for high-resolution discretization and fast analysis of data distributed on the sphere. Astrophys. J. 2005, 622, 759. [CrossRef] 7. Hivon, E.; Gorski, K.M.; Reinecke, M. HEALPix-Data Analysis, Simulations and Visualization on the Sphere. Available online: https://sourceforge.net/projects/healpix/ (accessed on 10 October 2019). 8. GeoFusion. GeoMatrix Toolkit Programmer’s Manual. Available online: http://www.geofusion.com/ (accessed on 12 October 2019). 9. SEEGrid. WebHome SCENZGrid SEEGrid. Available online: https://www.seegrid.csiro.au/wiki/SCENZGrid/ WebHome (accessed on 12 October 2019). 10. Bernardin, T.; Cowgill, E.; Kreylos, O.; Bowles, C.; Gold, P.; Hamann, B.; Kellogg, L. Crusta: A new virtual globe for real-time visualization of sub-meter digital topography at planetary scales. Comput. Geosci. 2011, 37, 75–85. [CrossRef] 11. Lambers, M.; Kolb, A. Ellipsoidal Cube Maps for Accurate Rendering of Planetary-Scale Terrain Data. Cg.informatik.uni 2012.[CrossRef] 12. Cheng, C. The global subdivision grid based on extended mapping division and its address coding. Acta Geod. Cartogr. Sin. 2010, 39, 295–302. [CrossRef] 13. Dutton, G. A Hierarchical Coordinate System for Geoprocessing and Cartography; Springer: Berlin, Germany, 1999. 14. Goodchild, M.F.; Shiren, Y. A Hierarchical Spatial Data Structure for Global Geographic Information Systems (89-5). Ncgia Nat. Center Geogr. Inf. Anal. 1989, 54, 31–44. [CrossRef] 15. Bartholdi, J.J.; Goldsman, P. Continuous indexing of hierarchical subdivisions of the globe. Int. J. Geogr. Inf. Sci. 2001, 15, 489–522. [CrossRef] 16. Zhao, X.; Cui, M.; LI, A.; Zhang, M. An Adjacent Searching Algorithm of Degenerate Quadtree Grid on Spherical Facet. Geomat. Inf. Sci. Wuhan Univ. 2009, 34, 479–482. [CrossRef] 17. Golay, M.J.E. Hexagonal parallel pattern transformations. IEEE Trans. Comput. 1969, 100, 733–740. [CrossRef] 18. Vince, A. Indexing the aperture 3 hexagonal discrete global grid. J. Vis. Commun. Image Represent. 2006, 17, 1227–1237. [CrossRef] 19. Ben, J.; Tong, X.C.; Zhou, C.H.; Zhang, K.X. Construction algorithm of octahedron based hexagon grid systems. J. Geo-Inf. Sci. 2015, 6, 54–61. [CrossRef] 20. PYXIS Innovation Inc. How PYXIS Works. Available online: http://www.pyxisinnovation.com/pyxwiki/ index.php?title (accessed on 12 October 2019). 21. Peterson, P. Closed-Packed Uniformly Adjacent, Multi-Resolutional Overlapping Spatial Data Ordering. U.S. Patent #0,8018,458, 13 September 2011. 22. Vince, A.; Zheng, X.X. Arithmetic and fourier transform for the PYXIS multi-resolution digital earth model. Int. J. Digit. Earth 2009, 2, 59–79. [CrossRef] 23. Sahr, K. Location coding on icosahedral aperture 3 hexagon discrete global grids. Comput. Environ. Urban Syst. 2008, 32, 174–187. [CrossRef] 24. Sahr, K. Central place indexing: Hierarchical linear indexing systems for mixed-aperture hexagonal discrete global grid systems. Cartographica 2019, 54, 16–29. [CrossRef] 25. Sahr, K. DGGRID Version 6.4: User Documentation for Discrete Global Grid Generation Software. Available online: http://webpages.sou.edu/~{}sahrk/docs/dggridManualV64.pdf (accessed on 12 October 2019). ISPRS Int. J. Geo-Inf. 2020, 9, 83 16 of 16

26. Sahr, K. DGGRID Users. Available online: https://www.discreteglobalgrids.org/dggrid-users/ (accessed on 12 October 2019). 27. Tong, X.C.; Ben, J.; Wang, Y.; Zhang, Y.S.; Pei, T. Efficient encoding and spatial operation scheme for aperture 4 hexagonal discrete global grid system. Int. J. Geogr. Inf. Sci. 2013, 27, 898–921. [CrossRef] 28. Ben, J.; Li, Y.L.; Zhou, C.H.; Wang, R.; Du, L.Y. Algebraic encoding scheme for aperture 3 hexagonal discrete global grid system. Sci. China Earth Sci. 2018, 61, 215–227. [CrossRef] 29. Mahdavi-Amiri, A.; Harrison, E.; Samavati, F. Hexagonal connectivity maps for Digital Earth. Int. J. Digit. Earth 2014, 8, 750–769. [CrossRef] 30. Mahdavi-Amiri, A.; Harrison, E.; Samavati, F. Hierarchical grid conversion. Comput. Aided Des. 2016, 79, 12–26. [CrossRef] 31. Wang, R.; Ben, J.; Du, L.Y.; Zhou, J.B.; Li, Z.X. Encoding and operation for the planar aperture 4 hexagon grid system. Acta Geotech. Cartogr. Sin. 2018, 47, 1018–1025. [CrossRef] 32. Vince, A. Indexing a discrete global grid. In Special Topics in Computing and ICT Research, Advances in Systems Modelling and ICT Applications; Fountain Publishers: Kampala, Uganda, 2006; Volume 2, pp. 3–17. 33. Wang, R.; Ben, J.; Du, L.Y.; Zhou, J.B.; Li, Z.X. The code operation scheme for the icosahedral aperture 4 hexagon grid system. Geomat. Inf. Sci. Wuhan Univ. 2019.[CrossRef] 34. Snyder, J.P. An Equal-Area For Polyhedral Globes. Cartographica 1992, 29, 10–21. [CrossRef] 35. Sußner, G.; Dachsbacher, C.; Greiner, G. Hexagonal LOD for Interactive Terrain Rendering. In Proceedings of the Vision Modeling and Visualization, Erlangen, Germany, 16–18 November 2005; pp. 666–675. 36. Bike-Sharing Data from Beijing Engineering Laboratory of Beidou Navigation & LBS Technology. Available online: https://www.chinalbs.org/engineer.html (accessed on 15 January 2020).

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).