CN113114272B - Method and device for encoding data structure of hexagonal grid with consistent global tiles - Google Patents

Method and device for encoding data structure of hexagonal grid with consistent global tiles Download PDF

Info

Publication number
CN113114272B
CN113114272B CN202110391058.3A CN202110391058A CN113114272B CN 113114272 B CN113114272 B CN 113114272B CN 202110391058 A CN202110391058 A CN 202110391058A CN 113114272 B CN113114272 B CN 113114272B
Authority
CN
China
Prior art keywords
unit
tile
code
hierarchical
coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110391058.3A
Other languages
Chinese (zh)
Other versions
CN113114272A (en
Inventor
贲进
周建彬
黄心海
梁晓宇
王蕊
郑明阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Information Engineering University of PLA Strategic Support Force
Original Assignee
Information Engineering University of PLA Strategic Support Force
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Information Engineering University of PLA Strategic Support Force filed Critical Information Engineering University of PLA Strategic Support Force
Priority to CN202110391058.3A priority Critical patent/CN113114272B/en
Publication of CN113114272A publication Critical patent/CN113114272A/en
Application granted granted Critical
Publication of CN113114272B publication Critical patent/CN113114272B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/11Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits using multiple parity bits

Abstract

The invention provides a method and a device for encoding a data structure of a hexagonal grid with global tile consistency. The method comprises the following steps: unfolding a regular icosahedron to form 20 triangular surfaces, and designing to obtain 12 tiles with consistent structures by taking the vertex of the regular icosahedron as a center, wherein the spherical structures of the tiles are pentagonal surfaces; according to the hierarchical recursive subdivision method, a tile is taken as an initial subdivision unit, each initial subdivision unit is subjected to hexagonal recursive subdivision, so that each level of child units has a unique parent unit, and the area ratio of adjacent level units is 4:1; coding each hierarchical unit by adopting a complex system number and a hexadecimal system code to form a unit hierarchical data coding structure; and finally, mapping the regular icosahedron hexagonal hierarchical data structure to a spherical surface in an equal-product manner. The invention has simple unit data hierarchical structure, low complexity of tile cross-surface processing and high calculation efficiency.

Description

Method and device for encoding data structure of hexagonal grid with consistent global tiles
Technical Field
The invention relates to the technical field of geographic information storage and geographic data structures, in particular to a method and a device for encoding a hexagonal grid data structure with global tile consistency.
Background
In recent years, geospatial data is more and more widely applied, and the data has large differences in scale, form, benchmark and the like, so that aggregation, processing and mining of data sets are extremely difficult, and a new data association mode taking a spatial position as a main key is urgently needed to be established to better support spatial data fusion and interoperation. The global grid adopts a specific method to uniformly discretize the earth to form a seamless non-overlapping multi-resolution grid hierarchical structure, and adopts unit address coding to replace the traditional geographic coordinates to participate in data operation. The method has the characteristics of discreteness, hierarchy and global continuity, meets the requirement of a computer on data discretization processing, abandons the constraint of map projection, is expected to fundamentally solve the problems of data fracture, geometric deformation, topology inconsistency and the like of the traditional plane model in global spatial data management and multi-scale operation, and is beneficial to mining 'knowledge' from multi-source and heterogeneous large data and acquiring valuable information.
The hexagonal grids are consistent and adjacent, the topological relation is consistent, the hexagonal grids are closest to a circle, and the sampling efficiency and the angular resolution are highest. More particularly, the various advantages of a planar hexagon can be extended to a spherical surface. These advantages make hexagonal grids very advantageous for the processing of spatial data and are therefore increasingly being appreciated. Tong Xiaochong et al, which includes CN102281075A, CN106845074A, combines two subdivision scenarios, proposes a "Hexagonal Quaternary Balanced Structure" (HQBS), and extends to the sphere by means of a regular icosahedron. However, the HQBS hierarchical relationship is still complex, and the situation of 'regularization' reverse recalculation occurs in the encoding operation process, which results in low operation efficiency. Wang Rui (CN 108566208A) describes the hierarchical relationship by means of complex numbers, and designs a "hexagonal Lattice quadtree" (HLQT) hierarchical coding scheme, which overcomes the defect of mixed coding of the center and vertex of the HQBS cell, and significantly improves the coding index and the operation efficiency. However, tile structures on the HLQT icosahedron are of two types and are more in number, so that cross-plane operation needs to consider various situations, and the tile boundary processing situation is still complex. The patent of the foreign scholars Sahr application researches a three-aperture Equal-product hexagonal grid (Icosahedral Snyder Equal Area alert 3Hexagonal grid, ISEA3H), and establishes a unique coding scheme on an icosahedron for processing grid data. Although the three-hole subdivision method can obtain smoother resolution, the method needs to divide into odd and even layers for encoding, and an addition table for encoding operation is large and complex, so that the operation efficiency is not high. Peterson of PYXIS Innovation, canada, proposes a PYXIS coding scheme based on the ISEA3H grid structure, and the principle and the coding mode are basically similar.
Disclosure of Invention
Aiming at the problems of complex cross-surface operation and low operation efficiency of the traditional hexagonal grid data structure, the invention provides a hexagonal grid data structure coding method and device with consistent global tiles.
In one aspect, the present invention provides a method for encoding a data structure of a globally tile-consistent hexagonal mesh, comprising:
the method comprises the following steps of (1) unfolding a regular icosahedron to form 20 triangular surfaces, and designing to obtain 12 tiles with consistent structures by taking the vertex of the regular icosahedron as a center, wherein the spherical structures of the tiles are pentagonal surfaces;
according to the hierarchical recursive subdivision method, a tile is taken as an initial subdivision unit, the grid data structure is recursively subdivided for each initial subdivision unit, so that each level of child units has a unique parent unit, and the area ratio of adjacent level units is 4:1; the shape of the grid data structure is a hexagonal surface;
coding each hierarchical unit by adopting a complex system number and a hexadecimal code to form a unit hierarchical data coding structure, and then mapping the regular icosahedron hexagonal hierarchical data structure to a spherical surface in an equal area manner.
Further, the subdivision rule of the hierarchical recursive subdivision method is as follows: the method comprises the steps that units on a regular icosahedron are divided into type A units and type B units, the type A units are divided to the next layer to obtain 1 type A subunit and 12 type B subunits, and the type B units are divided to the next layer to obtain only 1 type A subunit.
Further, the encoding rule for encoding each hierarchical unit by using complex numbers and hexadecimal codes is as follows:
first 2 bits R of each unit code 1 R 2 AsReserved bits, all identified with 0;
the 3 rd bit E of each unit code identifies the element type of the grid, E =0 identifies the center of the unit, E =1 identifies the vertex of the unit, and E =2 identifies the boundary of the unit;
the 4 th bit of each unit code, T, identifies the tile, T =0,1 … b;
5 th bit to n +4 th bit C of each unit code 1 C 2 …C n Identifying sub-units of layer n, C 1 ,C 2 ,…C n E {0,1,2,3,4,5,6, a, b, c, d, e, f }, n =1,2 …, n is the grid hierarchy.
Further, the method also comprises the step of designing an operation rule of each layer unit code, wherein the operation rule comprises an addition operation rule; the addition operation rule includes:
combining every two bits of the code to respectively obtain a code alpha m …α 3 α 2 α 1 And beta m …β 3 β 2 β 1
By looking up a set code addition table to obtain alpha g And beta g The result of the addition is 4 bits, the latter two of which are reserved bits
Figure GDA0003946146890000031
The first two digits as carry
Figure GDA0003946146890000032
G represents the g group in the coding, t represents the t addition;
each accumulation results in a reserved bit
Figure GDA0003946146890000033
Adding m times to obtain the final result
Figure GDA0003946146890000034
Further, designing an adjacent search algorithm of each hierarchical unit code; c. for encoding a certain unit of an n-icosahedron 000T n-1 C n Said proximity finding algorithm comprising:
If C n =0 and C n-1 Adjacent cells of =0,6 or 5 directions are each obtained by changing the end bit;
if C n =0 and C n-1 Adjacent units not equal to 0,4 directions are obtained by changing the tail bit, and the other 2 directions are obtained by adopting an addition operation rule;
if C n Adjacent units in the direction of =1,2,3,4,5,6,5 are obtained by changing the tail bit, and the remaining 1 direction is obtained by adopting an addition operation rule;
if C n The neighboring cells of = a, b, c, d, e, f,2 directions are obtained by changing the last bit, and the remaining 4 directions are obtained by applying the addition rule.
Further, if a cell is located at a triangle or tile boundary, the proximity lookup algorithm further includes:
if a certain unit is positioned at the boundary of the triangular surface, firstly calculating to obtain a virtual unit code of the other triangular surface position corresponding to the unit, and then adding unit codes in 2 directions to obtain adjacent unit codes in the other 2 directions;
if a certain unit is located at the tile boundary, 2-direction unit codes are added to obtain 2-direction intermediate codes respectively, and then tile codes in the 2-direction intermediate codes are replaced by corresponding tile codes crossing the tiles respectively, so that 2-direction adjacent unit codes are obtained.
Further, still include: converting the geographic coordinates into grid codes, specifically comprising:
mapping the geographic coordinates to a triangular surface of a regular icosahedron to obtain projection coordinates (x ', y');
converting the projection coordinates (x ', y') of the triangular surface into Cartesian coordinates (x, y) of the corresponding tile through translation;
converting cartesian coordinates (x, y) of the tile to tile integer coordinates (i, j);
calculating the grid code on the integer coordinate axis according to the tile integer coordinate (i, j);
and adding the grid codes on the integer coordinate axis by adopting an addition operation rule to obtain the final code.
Further, the converting cartesian coordinates (x, y) of the tile into tile integer coordinates (i, j) specifically includes:
decomposing the Cartesian coordinates (x, y) of the tile into integer coordinate axes according to the formula (1) to obtain floating point coordinates (i) on the i, j axes x ,j y ):
Figure GDA0003946146890000041
The floating point coordinates (i) are expressed according to equation (2) x ,j y ) Conversion to tile integer coordinates (i, j):
Figure GDA0003946146890000042
wherein m is i 、m j Are respectively i x 、j y Rounded value, r i =i x -m i ,r j =j y -m j
Further, still include: transforming the mesh code to geographic coordinates, specifically comprising:
encoding C according to equation (3) i Conversion to tile cartesian coordinates (x, y):
Figure GDA0003946146890000043
wherein, the first and the second end of the pipe are connected with each other,
Figure GDA0003946146890000044
respectively represent codes C i The corresponding complex run number coordinate real number and imaginary number components;
converting the cartesian coordinates (x, y) of the tile into triangular plane projection coordinates (x ', y') by translation;
and mapping the triangular plane projection coordinates (x ', y') to a spherical surface to finally obtain the geographic coordinates.
In another aspect, the present invention provides an apparatus for encoding a data structure of a globally tile-consistent hexagonal grid, comprising:
the tile unit is used for unfolding the regular icosahedron into 20 triangular surfaces, 12 tiles with the same structure are designed by taking the vertex of the regular icosahedron as the center, and the spherical structure of each tile is a pentagonal surface;
the subdivision unit is used for recursively subdividing the grid data structure for each initial subdivision unit by taking a tile as the initial subdivision unit according to a hierarchical recursive subdivision method, so that each level of child units has a unique parent unit, and the area ratio of adjacent level units is 4:1; the shape of the grid data structure is a hexagonal surface;
and the coding unit is used for coding each hierarchical unit by adopting a complex system number and a hexadecimal code to form a unit hierarchical data coding structure, and then mapping the regular icosahedron hexagonal hierarchical data structure to a spherical surface in an equal area manner.
The invention has the beneficial effects that:
the invention provides a coding method and a coding device, which are a coding operation method and a coding operation device of a hexagonal grid data structure, which can be applied to global geographic information storage and management and global multivariate heterogeneous geographic position data isomorphism processing. The invention designs a recursion subdivision method of hexagonal grid units on a regular icosahedron, codes each grid data structure, designs operations of addition, proximity query, hierarchical query, code and geographic coordinate interconversion and the like of the unit codes, and maps the grid data structure to the whole world by means of equal-area projection. The (global) tile structures on the regular icosahedron are consistent, and the cross-surface processing algorithm is low in complexity; the principle of the hierarchical structure and the coding scheme are simple and easy to understand, and the execution efficiency of the coding operation computer is high.
Drawings
FIG. 1 is a schematic diagram of a regular icosahedron equal-area mapping to a sphere according to an embodiment of the present invention;
FIG. 2 is an exploded view of a regular icosahedron according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a regular icosahedron tile structure and its encoding provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of hierarchical subdivision of a unit data structure on a regular icosahedron according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a result of equal-area mapping of a unit hierarchical data structure on a regular icosahedron onto a sphere according to an embodiment of the present invention: a tile (i.e. initial subdivision unit) data structure; (b) is a layer 1 data structure; (c) is a layer 2 data structure; (d) is a layer 3 data structure;
fig. 6 is a block diagram of a progressive encoding of a mesh data structure according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a regular icosahedron layer 1 grid data structure and its encoding according to an embodiment of the present invention;
FIG. 8 is a block diagram of a regular icosahedron layer 2 grid data structure and its encoding according to an embodiment of the present invention;
fig. 9 is a schematic diagram of mapping a regular icosahedral hexagonal mesh onto a spherical surface according to an embodiment of the present invention: mapping tiles to spheres; (b) mapping layer 3 units to spheres; (c) mapping the layer 5 unit to a sphere; (d) mapping layer 7 units to spheres;
FIG. 10 shows an example of the encoding addition and its rule according to the embodiment of the present invention: (a) is a code addition algorithm; (b) is an example of coded addition;
FIG. 11 is a look-up table for encoding addition according to an embodiment of the present invention;
FIG. 12 is a diagram illustrating encoded proximity queries and cross-plane processing according to an embodiment of the present invention;
fig. 13 is a schematic diagram of the conversion of geographic coordinates into a coded coordinate system according to an embodiment of the present invention: (a) is a code conversion coordinate system; (b) Converting the Cartesian coordinates of the tiles into integer coordinates of the tiles;
fig. 14 is a schematic diagram illustrating comparison between longitude and latitude conversion and coding efficiency provided by the embodiment of the present invention: (a) time-consuming comparison for a single operation; (b) is the single operation efficiency ratio;
fig. 15 is a schematic diagram illustrating comparison of efficiency of code conversion to longitude and latitude provided by the embodiment of the present invention: (a) time-consuming comparison for a single operation; (b) is the single operation efficiency ratio;
FIG. 16 is a comparison diagram of proximity query efficiency provided by the embodiment of the present invention: (a) time-consuming comparison for a single operation; and (b) is the single operation efficiency ratio.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The embodiment of the invention provides a global tile-consistent hexagonal grid data structure coding method, which comprises the following steps:
the method comprises the following steps of (1) unfolding a regular icosahedron to form 20 triangular surfaces, and designing to obtain 12 tiles with consistent structures by taking the vertex of the regular icosahedron as a center, wherein the spherical structures of the tiles are pentagonal surfaces;
according to the hierarchical recursive subdivision method, a tile is taken as an initial subdivision unit, the grid data structure is recursively subdivided for each initial subdivision unit, so that each level of child units has a unique parent unit, and the area ratio of adjacent level units is 4:1; the shape of the grid data structure is a hexagonal surface;
coding each hierarchical unit by adopting a complex system number and a hexadecimal code to form a unit hierarchical data coding structure, and then mapping the regular icosahedron hexagonal hierarchical data structure to a spherical surface in an equal area manner.
Specifically, as shown in fig. 1, in the method for constructing a global grid data structure, in the embodiment of the present invention, a regular icosahedron is used as a transition, grid units are first split on the regular icosahedron, and then the mesh units are mapped to a spherical surface. As shown in fig. 2, a regular icosahedron is unfolded to form 20 triangular surfaces, which are used as the basis for mesh data structure subdivision and coding operation. As shown in FIG. 3, each tile is the same size and is centered on the regular icosahedron vertex, identified by hexadecimal codes 0-b. It should be noted that if the expanded view is reduced to a regular icosahedron or mapped to a sphere, the tile structure is a pentagonal face.
As an implementation manner, the subdivision rule of the hierarchical recursive subdivision method is: the method comprises the steps that units on a regular icosahedron are divided into type A units and type B units, the type A units are divided to the next layer to obtain 1 type A subunit and 12 type B subunits, and the type B units are divided to the next layer to obtain only 1 type A subunit.
For example, as shown in fig. 4 and fig. 5, the data structure of the hexagonal grid on the regular icosahedron is divided into A, B two types (tiles are used as initial subdivision units and belong to type a units), it is specified that type a units are subdivided to the next layer to obtain 1 type a and 12 type B sub-units, and type B units are subdivided to the next layer to obtain only 1 type a sub-grid. The multi-resolution mesh generated according to the above specification has the following characteristics: the area ratio of adjacent hierarchical units is 4:1, which is consistent with the area ratio of the quad-tree; starting from layer 2, type a units are logically and physically subordinate to the upper parent unit, while type B units are logically subordinate to the upper type a parent unit and physically subordinate to the upper type a parent unit. Thus, type a cells and type B cells have logical and physical membership consistency at adjacent layers and interlayers, respectively. The property is beneficial to reducing sampling errors of the hexagonal grid during global multi-resolution data aggregation and other processing, and improving the calculation accuracy.
As an implementation, the encoding rule for encoding each hierarchical unit by using complex numbers and hexadecimal codes is as follows:
first 2 bits R of each unit code 1 R 2 As reserved bits, all are identified by 0;
the 3 rd bit E of each unit code identifies the type of the grid elements, E =0 identifies the center of the unit, E =1 identifies the vertex of the unit, and E =2 identifies the boundary of the unit;
the 4 th bit of each unit code, T, identifies the tile, T =0,1 … b;
5 th bit to n +4 th bit C of each unit code 1 C 2 …C n Identifying sub-units of the nth layer, C 1 ,C 2 ,…C n ∈{0,1,2,3,4,5,6,a,b, c, d, e, f }, n =1,2 …, n is the grid hierarchy.
Specifically, as shown in FIG. 6, the layer 2 element is centered at the origin of the complex plane, the number of copies being replicated
Figure GDA0003946146890000081
Representing an angle with the real number axis R of
Figure GDA0003946146890000082
Then the center of the level 2 unit can be represented as the set D = {0, ω 23456 ,ω+ω 2233445566 + ω corresponds to an equivalent coded hexadecimal symbol set C = {0,1,2,3,4,5,6, a, b, C, d, e, f }. According to the subdivision rule, the subunit of the type A unit is directly added with the code element of the set C at the encoding end, and the subunit of the type B unit is directly added with the code element of 0 at the end. As shown in fig. 7, regarding the tile as a type a unit, it is necessary to ensure that the area ratio of the adjacent level units is 4:1, and the layer 1 unit coding distribution shown in fig. 7 is designed according to the partitioning and coding requirements of fig. 4 (or fig. 5) and fig. 6. As shown in fig. 8, the layer 1 trellis unit is subdivided according to the manner of fig. 4, a replication system coordinate system is established with the center of each tile as an origin, and the symbols shown in fig. 6 are added after the layer 1 coding. Since the inner code of each tile is almost identical, it is called "identical tile hexagonal Hierarchy" (HHUT) in the present invention. Each time the grid resolution is increased by one level, the unit code is increased by one hexadecimal code element, and the average unit area of the 28 th layer is about 7cm 2 And the requirement of high-precision calculation and analysis can be met.
In order to facilitate global uniform identification, the HHUT hexadecimal coding rule is designed. Layer 2 tile structure and coding (lacking first 3 bits) as shown in fig. 8, the actual coding should be added with 000 before coding, e.g. the actual coding of 305 is 000305, and the coding 000a01030 identifies the layer 5 unit located in tile a.
As shown in fig. 9, HHUT data structure units on a regular icosahedron are mapped to a sphere, and tiles are pentagonal faces with global consistency.
On the basis of the above embodiment, the encoding method provided by the embodiment of the present invention further includes: designing an operation rule of each level unit code, wherein the operation rule comprises an addition operation rule; the addition operation of the unit codes is essentially a parallelogram rule of a complex progression system number, and is represented by adding the codes of two grids to obtain another grid code according to the parallelogram rule. Since the complex number code is "number" in nature, as shown in fig. 10, the addition rule defining the code includes:
(1) Combining every two bits of the code to respectively obtain a code alpha m …α 3 α 2 α 1 And beta m …β 3 β 2 β 1
(2) By looking up a set code addition table to obtain alpha g And beta g The result of the addition is 4 bits, the last two of which are reserved bits
Figure GDA0003946146890000091
The first two bits as carry
Figure GDA0003946146890000092
g represents the g group in the coding, and t represents the t addition;
(3) Each accumulation results in a reserved bit
Figure GDA0003946146890000093
Adding m times to obtain the final result
Figure GDA0003946146890000094
Specifically, the encoding addition table set in the embodiment of the present invention is shown in fig. 11. Taking the layer 8 codes 00020d01 and 0010d002 added as an example, as shown in fig. 10 (b): the first time, there are 4 groups of symbols to be added, the result can be obtained by looking up a table, for example, 01+02=000a,0d + d0=0d0a,02+10=010c,00+00=0000, and 0a in the first group of results is stored in the final result. And by analogy, 3 groups of code elements are added for the second time, the result is obtained by table look-up, and 0a in the first group of results stores the final result until the fourth addition is carried out to obtain the final result of 00010a0a.
Query neighbor coding is one of the bases of spatial data analysis. On the basis of the foregoing embodiments, the encoding method provided in the embodiment of the present invention further includes: designing an adjacent search algorithm of each level unit code; as shown in FIG. 12, the hexagon has only 6 adjacent cells with edges in different directions, and only the unit codes in each direction of the nth layer need to be added during query
Figure GDA0003946146890000095
Then the method is finished; meanwhile, considering that the number of the A-type subunits is 13, the adjacent query of partial units does not need to adopt coded addition operation in each direction, and only the tail bit code element is changed. Thus, 000T n-1 C n The proximity search algorithm provided by the embodiment of the present invention includes the following contents:
(1) If C n =0 and C n-1 Adjacent cells of =0,6 or 5 directions are each obtained by changing the end bit; such as the code 300 in fig. 12;
(2) If C n =0 and C n-1 Adjacent units not equal to 0,4 directions are obtained by changing the tail bit, and the other 2 directions are obtained by adopting an addition operation rule; such as encoding 330 in fig. 12;
(3) If C n Adjacent units in the direction of =1,2,3,4,5,6,5 are obtained by changing the tail bit, and the remaining 1 direction is obtained by adopting an addition operation rule; such as encoding 304 in fig. 12;
(4) If C n Adjacent cells in the direction of = a, b, c, d, e, f,2 are obtained by changing the last bit, and the other 4 directions are obtained by adopting an addition rule; such as the code 30e in fig. 12.
It is noted that when cells of a polyhedral grid system are located at the triangle faces and tile boundaries, queries of partially adjacent cells require cross-face processing. As shown in fig. 12, taking the code 310 as an example, it is distributed on the triangle surface and the tile boundary, and both the case of crossing the triangle surface and the case of crossing the tile are processed. Therefore, if a cell is located at a triangle or tile boundary, the proximity lookup algorithm further comprises:
(1) If a certain unit is positioned at the boundary of the triangular surface, firstly calculating to obtain a virtual unit code of the other triangular surface position corresponding to the unit, and then adding unit codes in 2 directions to obtain adjacent unit codes in the other 2 directions;
(2) If a certain unit is located at the tile boundary, 2-direction unit codes are added to obtain 2-direction intermediate codes respectively, and then tile codes in the 2-direction intermediate codes are replaced by corresponding tile codes crossing the tiles respectively, so that 2-direction adjacent unit codes are obtained.
For example, taking the code 310 as an example, for a triangle surface, a virtual unit code 320 corresponding to the position of the other triangle surface is first obtained, and unit codes in 2 directions are added to obtain codes 00c and 30b; for the cross-tile condition, unit coding is firstly added to obtain 304 d and 30d, then tile coding is replaced by corresponding cross-tile coding to obtain 004 d and 00d, and other conditions are processed similarly.
The existing geospatial data position is mainly recorded by geographic coordinates (longitude and latitude), and the key for ensuring data to enter a grid system is to research the rapid conversion of the geographic coordinates into grid codes. Therefore, on the basis of the above embodiments, the encoding method according to the embodiment of the present invention further includes: the geographic coordinates are converted to a mesh code.
As shown in fig. 13, tile 0,3,4,8 in fig. 3 (or fig. 12) and its associated triangle surface are used as an example to illustrate the conversion process. As shown in fig. 13 (a), a coordinate system defined on the triangular surface is referred to as a projection coordinate system (coordinate axes are x ', y', respectively); there are two coordinate systems defined on a tile, called respectively the tile cartesian coordinate system (x, y axes respectively) and the tile integer coordinate system (i, j axes respectively).
The process of converting the geographic coordinates into the mesh codes specifically includes:
(1) Mapping (such as Snyder projection) the geographic coordinates to a triangular surface of the regular icosahedron to obtain projection coordinates (x ', y');
(2) Converting the projection coordinates (x ', y') of the triangular surface into Cartesian coordinates (x, y) of the corresponding tile through translation;
(3) Converting cartesian coordinates (x, y) of the tile to tile integer coordinates (i, j);
(4) Calculating the grid code on the integer coordinate axis according to the tile integer coordinate (i, j);
(5) And adding the grid codes on the integer coordinate axis by adopting an addition operation rule to obtain the final code.
As an implementation, the specific algorithm for converting cartesian coordinates (x, y) of the tile into integer coordinates (i, j) of the tile in step (3) is as follows:
decomposing the Cartesian coordinates (x, y) of the tile into integer coordinate axes according to the formula (1) to obtain floating point coordinates (i) on the i, j axes x ,j y ):
Figure GDA0003946146890000111
Specifically, taking tile No. 3 in fig. 13 (a) (i, j are both positive) as an example, assuming that p (x, y) is the next point in tile No. 3 coordinate system, the tile coordinates are decomposed to integer coordinate axes according to the above formula (1), and floating point coordinates p (i) on i, j axes are obtained x ,j y )。
The floating point coordinate (i) is expressed according to equation (2) x ,j y ) Conversion to tile integer coordinates (i, j):
Figure GDA0003946146890000112
wherein m is i 、m j Are respectively i x 、j y Rounded value, r i =i x -m i ,r j =j y -m j
Specifically, as shown in FIG. 13 (b), m i 、m j Are respectively i x 、j y The rounded value is the fractional part of the point on the i axis is r i =i x -m i Decimal on the j-axisPart is r j =j y -m j The integer coordinates i, j of the point are finally obtained from the position of the fractional part, which is shown in FIG. 13 (b)
Figure GDA0003946146890000121
Figure GDA0003946146890000122
The available integer coordinates are shown in equation (2).
Correspondingly, on the basis of the above embodiment, the encoding method provided by the embodiment of the present invention further includes: the mesh code is converted to geographic coordinates. Since the encoding is essentially a complex-forward system number, each layer of code elements of the encoding can be restored to the complex-forward system number, the complex-forward system numbers are scaled according to the layers and then accumulated, and finally the complex-forward system coordinates of the center of the unit are obtained, and the complex-forward system coordinate system and the tile cartesian coordinate system are completely overlapped (fig. 8 and fig. 13 (a)).
Let a certain unit center code under level n be 000T … C n-1 C n The specific process of transforming the mesh code to the geographic coordinates is as follows:
as shown in FIG. 13 (a), the code C is encoded according to the formula (3) i Conversion to tile cartesian coordinates (x, y):
Figure GDA0003946146890000123
wherein the content of the first and second substances,
Figure GDA0003946146890000124
respectively represent codes C i Corresponding real and imaginary components of the complex-run system number coordinates;
converting the cartesian coordinates (x, y) of the tile into triangular plane projection coordinates (x ', y') by translation;
and mapping (inverse Snyder projection) the triangular plane projection coordinates (x ', y') to a spherical surface to finally obtain the geographic coordinates.
Corresponding to the above coding method, an embodiment of the present invention further provides an apparatus for coding a data structure of a hexagonal grid with global tile matching, where the apparatus includes: the device comprises a tile unit, a subdivision unit and an encoding unit; wherein:
the tile unit is used for unfolding the regular icosahedron into 20 triangular surfaces, 12 tiles with the same structure are designed by taking the vertex of the regular icosahedron as the center, and the spherical structure of each tile is a pentagonal surface; the subdivision unit is used for recursively subdividing the grid data structure for each initial subdivision unit by taking one tile as the initial subdivision unit according to a hierarchical recursive subdivision method, so that child units of each hierarchy have unique parent units, and the area ratio of the adjacent hierarchy units is 4:1; the shape of the grid data structure is a hexagonal surface; the coding unit is used for coding each hierarchical unit by adopting a complex number and a hexadecimal code to form a unit hierarchical data coding structure, and then mapping the regular icosahedron hexagonal hierarchical data structure to a spherical surface in an equal area manner.
As shown in fig. 14, 15, and 16, the encoding operation efficiency of the global mesh data structure directly affects the data processing, and when the data size is large, especially for global processing, the improvement of the atomic operation efficiency, which is small, has a great influence on the overall calculation efficiency of the system. To verify the efficiency of HHUT coding operations, comparative experiments were designed as follows.
In the prior art of the same type, the HLQT has great advantages compared with other techniques of the same type, so that the HLQT is selected as a comparison object, and an efficiency comparison experiment is designed aiming at basic coding operation, namely conversion of geographic coordinates into codes, conversion of codes into geographic coordinates and proximity query. The longitude and latitude coordinates are traversed uniformly in the world, the traversal step length is 0.2 degrees, and 162 ten thousand points are counted. Firstly, the longitude and latitude are converted into codes, and then the obtained codes are converted into the longitude and latitude and simultaneously are queried adjacently. In order to ensure that the experiment is objective and fair, the invention normalizes the experimental efficiency to obtain the average required time of each operation, the unit is microsecond (us), the efficiency ratio is the reciprocal of the time ratio of the HHUT and the HLQT scheme, each group runs for 10 times, the average value is taken, all programs are compiled into Release versions, and the Release versions are executed on the same computer and are configured as follows: intel Core i7-8700@3.20GHz six cores, 8G RAM, WDC 480G SSD; operating the system: windows 7 flagship edition 64 bits SP1; developing a tool: microsoft Visual C + + Enterprise 2017-version 15.9.20.
According to the experimental results, the advantages of the invention are analyzed:
(1) The consistent tile structure HHUT on the closed icosahedron provided by the invention has 12 structures (figure 3), while HLQT is divided into 12 vertex tiles and 20 surface tiles, so that the structure is more complex, and the tiles are frequently calculated in a cross-surface mode.
(2) The efficiency of HHUT latitude and longitude conversion into code is higher than HLQT at each level (fig. 14 (a)), the average efficiency is about 2.74 times higher, and the efficiency ratio gradually increases as the level increases (fig. 14 (b)). This is because HHUT tiles are fewer in number and coordinate transformation involves only translation operations, while HLQT tiles are more and involve rotation operations when vertex tiles; the addition efficiency of HLQT coding is obviously reduced along with the rise of the hierarchy, so that the overall efficiency is gradually increased along with the rise of the hierarchy.
(3) The efficiency of HHUT coding conversion to latitude and longitude is higher than HLQT at each level (fig. 15 (a)), the average efficiency is about 1.73 times higher, and the efficiency ratio gradually increases as the level increases (fig. 15 (b)). This is because the HLQT needs to participate in the calculation for each layer of symbols, while the symbols of the present invention do not have consecutive non-0 cases and participate in the calculation only when the symbols are non-0, so the higher the hierarchy is, the higher the efficiency ratio is.
(4) HHUT encodes neighbor queries with efficiency higher than HLQT at each level (fig. 16 (a)), with average efficiency about 7.46 times higher, and with increasing levels the efficiency ratio (fig. 16 (b)). This is because HHUT is essentially a twelve-fork tree structure, it is sufficient that the partial unit neighboring index directly changes the tail bit, while the HLQT neighboring index depends on the coding addition operation, and the coding addition operation efficiency decreases obviously with the rise of the hierarchy.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for encoding a data structure of a globally tile-uniform hexagonal mesh, comprising:
the method comprises the following steps of (1) unfolding a regular icosahedron to form 20 triangular surfaces, and designing to obtain 12 tiles with consistent structures by taking the vertex of the regular icosahedron as a center, wherein the spherical structures of the tiles are pentagonal surfaces;
according to a hierarchical recursive subdivision method, a tile is taken as an initial subdivision unit, a grid data structure is recursively subdivided for each initial subdivision unit, so that child units of each hierarchy have unique parent units, and the area ratio of units of adjacent hierarchies is 4:1; the shape of the grid data structure is a hexagonal surface; the subdivision rule of the hierarchical recursive subdivision method is as follows: dividing units on the regular icosahedron into an A-type unit and a B-type unit, dividing the A-type unit to the next layer to obtain 1A-type subunit and 12B-type subunits, and dividing the B-type unit to the next layer to obtain only 1A-type subunit;
coding each hierarchical unit by adopting a complex system number and a hexadecimal code to form a unit hierarchical data coding structure, and then mapping the regular icosahedron hexagonal hierarchical data structure to a spherical surface in an equal area manner; the encoding rule for encoding each hierarchical unit by adopting the complex number and the hexadecimal code is as follows:
first 2 bits R of each unit code 1 R 2 As reserved bits, all are identified by 0;
the 3 rd bit E of each unit code identifies the element type of the grid, E =0 identifies the center of the unit, E =1 identifies the vertex of the unit, and E =2 identifies the boundary of the unit;
the 4 th bit of each unit code, T, identifies the tile, T =0,1 … b;
5 th bit to n +4 th bit C of each unit code 1 C 2 …C n Identifying sub-units of the nth layer, C 1 ,C 2 ,…C n The element is e {0,1,2,3,4,5,6, a, b, c, d, e, f }, n =1,2 …, n is the grid hierarchy.
2. The encoding method according to claim 1, further comprising designing an operation rule for each level unit encoding, wherein the operation rule comprises an addition operation rule; the addition operation rule includes:
combining every two bits of the code to respectively obtain a code alpha m …α 3 α 2 α 1 And beta m …β 3 β 2 β 1
By looking up a set code addition table to obtain alpha g And beta g The result of the addition is 4 bits, the latter two of which are reserved bits
Figure FDA0003946146880000011
The first two bits as carry
Figure FDA0003946146880000012
g represents the g group in the coding, and t represents the t addition;
each accumulation results in a reserved bit
Figure FDA0003946146880000013
Adding m times to obtain the final result
Figure FDA0003946146880000014
3. The encoding method of claim 2, further comprising designing a proximity lookup algorithm for each hierarchical unit code; c. for encoding a certain unit of an n-icosahedron 000T n-1 C n The proximity finding algorithm comprises:
if C n =0 and C n-1 Adjacent cells of =0,6 or 5 directions are each obtained by changing the end bit;
if C n =0 and C n-1 Adjacent units not equal to 0,4 directions are obtained by changing the tail bit, and the other 2 directions are obtained by adopting an addition operation rule;
if C n =1,2,3,4,5,6,5 neighboring cells in direction by changing the end bitObtaining the other 1 directions by adopting an addition operation rule;
if C n The neighboring cells of = a, b, c, d, e, f,2 directions are obtained by changing the last bit, and the remaining 4 directions are obtained by applying the addition rule.
4. The encoding method of claim 3, wherein if a cell is located at a triangle or tile boundary, the proximity lookup algorithm further comprises:
if a certain unit is positioned at the boundary of the triangular surface, firstly calculating to obtain a virtual unit code of the other triangular surface position corresponding to the unit, and then adding unit codes in 2 directions to obtain adjacent unit codes in the other 2 directions;
if a certain unit is located at the tile boundary, 2-direction unit codes are added to obtain 2-direction intermediate codes respectively, and then tile codes in the 2-direction intermediate codes are replaced by corresponding tile codes crossing the tiles respectively, so that 2-direction adjacent unit codes are obtained.
5. The encoding method according to claim 2, further comprising: converting the geographic coordinates into grid codes, specifically comprising:
mapping the geographic coordinates to a triangular surface of a regular icosahedron to obtain projection coordinates (x ', y');
converting the projection coordinates (x ', y') of the triangular surface into Cartesian coordinates (x, y) of the corresponding tile through translation;
converting cartesian coordinates (x, y) of the tile to tile integer coordinates (i, j);
calculating the grid code on the integer coordinate axis according to the tile integer coordinate (i, j);
and adding the grid codes on the integer coordinate axis by adopting an addition operation rule to obtain the final code.
6. The encoding method according to claim 5, wherein said converting the Cartesian coordinates (x, y) of the tile into tile integer coordinates (i, j) comprises:
decomposing the Cartesian coordinates (x, y) of the tile into integer coordinate axes according to the formula (1) to obtain floating point coordinates (i) on the i, j axes x ,j y ):
Figure FDA0003946146880000031
The floating point coordinates (i) are expressed according to equation (2) x ,j y ) Conversion to tile integer coordinates (i, j):
Figure FDA0003946146880000032
wherein m is i 、m j Are respectively i x 、j y Rounded value, r i =i x -m i ,r j =j y -m j
7. The encoding method of claim 5, further comprising: transforming the mesh code to geographic coordinates, specifically comprising:
encoding C according to equation (3) i Conversion to tile cartesian coordinates (x, y):
Figure FDA0003946146880000033
wherein the content of the first and second substances,
Figure FDA0003946146880000034
respectively represent codes C i Corresponding real and imaginary components of the complex-run system number coordinates;
converting the cartesian coordinates (x, y) of the tile into triangular plane projection coordinates (x ', y') by translation;
and mapping the triangular plane projection coordinates (x ', y') to a spherical surface to finally obtain the geographic coordinates.
8. A global tile uniform hexagonal mesh data structure encoding apparatus, comprising:
the tile unit is used for unfolding the regular icosahedron into 20 triangular surfaces, 12 tiles with the same structure are designed by taking the vertex of the regular icosahedron as the center, and the spherical structure of each tile is a pentagonal surface;
the subdivision unit is used for recursively subdividing the grid data structure for each initial subdivision unit by taking a tile as the initial subdivision unit according to a hierarchical recursive subdivision method, so that each level of child units has a unique parent unit, and the area ratio of adjacent level units is 4:1; the shape of the grid data structure is a hexagonal surface; the subdivision rule of the hierarchical recursive subdivision method is as follows: dividing units on the regular icosahedron into A-type units and B-type units, wherein the A-type units are divided to the next layer to obtain 1A-type subunit and 12B-type subunits, and the B-type units are divided to the next layer to obtain only 1A-type subunit;
the coding unit is used for coding each hierarchical unit by adopting a complex number and a hexadecimal code to form a unit hierarchical data coding structure, and then mapping the regular icosahedron hexagonal hierarchical data structure to a spherical surface in an equal area manner; the coding rule for coding each hierarchical unit by adopting the complex number and the hexadecimal code is as follows:
first 2 bits R of each unit code 1 R 2 As reserved bits, are all identified by 0;
the 3 rd bit E of each unit code identifies the element type of the grid, E =0 identifies the center of the unit, E =1 identifies the vertex of the unit, and E =2 identifies the boundary of the unit;
the 4 th bit of each unit code, T, identifies the tile, T =0,1 … b;
5 th bit to n +4 th bit C of each unit code 1 C 2 …C n Identifying sub-units of the nth layer, C 1 ,C 2 ,…C n E {0,1,2,3,4,5,6, a, b, c, d, e, f }, n =1,2 …, n is the grid hierarchy.
CN202110391058.3A 2021-04-12 2021-04-12 Method and device for encoding data structure of hexagonal grid with consistent global tiles Active CN113114272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110391058.3A CN113114272B (en) 2021-04-12 2021-04-12 Method and device for encoding data structure of hexagonal grid with consistent global tiles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110391058.3A CN113114272B (en) 2021-04-12 2021-04-12 Method and device for encoding data structure of hexagonal grid with consistent global tiles

Publications (2)

Publication Number Publication Date
CN113114272A CN113114272A (en) 2021-07-13
CN113114272B true CN113114272B (en) 2023-02-17

Family

ID=76715774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110391058.3A Active CN113114272B (en) 2021-04-12 2021-04-12 Method and device for encoding data structure of hexagonal grid with consistent global tiles

Country Status (1)

Country Link
CN (1) CN113114272B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117132738B (en) * 2023-10-26 2024-02-13 西南林业大学 Spherical discrete grid multi-scale equidistant mode quantization method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281075A (en) * 2011-03-21 2011-12-14 中国人民解放军信息工程大学 Hierarchical encoding, operation and indexing method of hexagonal grid with aperture of 4
CN107273466A (en) * 2017-06-06 2017-10-20 南京师范大学 The discrete grid of spherical triangle encodes the fast conversion method to geographical latitude and longitude coordinates
CN108566208A (en) * 2017-12-29 2018-09-21 中国人民解放军战略支援部队信息工程大学 A kind of coding method of level grid and device
CN111797093A (en) * 2020-05-13 2020-10-20 中国科学院软件研究所 Discrete global grid structure generation method and rapid unit positioning method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005071561A1 (en) * 2004-01-21 2005-08-04 State Of Oregon, Acting By And Through Its State Board Of Higher Education, On Behalf Of Southern Oregon University Icosahedral modified generalized balanced ternary and aperture 3 hexagon tree
US9110684B2 (en) * 2007-07-10 2015-08-18 International Business Machines Corporation Data splitting for recursive data structures
US9348860B2 (en) * 2011-04-12 2016-05-24 Thomson Licensing Method for encoding a mesh model, encoded mesh model and method for decoding a mesh model
US8571306B2 (en) * 2011-08-10 2013-10-29 Qualcomm Incorporated Coding of feature location information
CN107229725B (en) * 2017-06-06 2019-07-09 南京师范大学 A kind of fast conversion method that geographical coordinate is encoded to the discrete grid of spherical triangle

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281075A (en) * 2011-03-21 2011-12-14 中国人民解放军信息工程大学 Hierarchical encoding, operation and indexing method of hexagonal grid with aperture of 4
CN107273466A (en) * 2017-06-06 2017-10-20 南京师范大学 The discrete grid of spherical triangle encodes the fast conversion method to geographical latitude and longitude coordinates
CN108566208A (en) * 2017-12-29 2018-09-21 中国人民解放军战略支援部队信息工程大学 A kind of coding method of level grid and device
CN111797093A (en) * 2020-05-13 2020-10-20 中国科学院软件研究所 Discrete global grid structure generation method and rapid unit positioning method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"The Effect of Hexagonal Grid Topology on the Throughput Benefit of Network Coding";Fuhua Huang等;《2013 IEEE International Conference on Green Computing and Communications and IEEE Internet of Things and IEEE Cyber, Physical and Social Computing》;20131212;第580-584页 *
"平面四孔六边形格网系统编码运算";王蕊等;《测绘学报》;20180731;第47卷(第7期);第1018-1025页 *
"正二十面体四孔六边形格网系统编码运算";王蕊等;《武汉大学学报(信息科学版)》;20200131;第45卷(第1期);第1-8页 *

Also Published As

Publication number Publication date
CN113114272A (en) 2021-07-13

Similar Documents

Publication Publication Date Title
Dutton Modeling locational uncertainty via hierarchical tessellation
CN111475597B (en) Non-rigid grid coding, spatial object unique identification and query method and device
WO1999034336A1 (en) Triangle geometry processing for surface modeling and cartesian grid generation
CN112231961B (en) Large-scale finite element grid data storage and indexing method
JP3184785B2 (en) 3D shape model transmission method and device, 3D shape model compression method and device, 3D shape model display method and device
CN113114272B (en) Method and device for encoding data structure of hexagonal grid with consistent global tiles
WO2019099798A1 (en) Spatial identification of assets using n-dimensional asset identifiers
CN111797093B (en) Discrete global grid structure generation method and rapid unit positioning method
Zlatanova et al. The role of DBMS in the new generation GIS architecture
CN102281075B (en) Hierarchical encoding, operation and indexing method of hexagonal grid with aperture of 4
WO2022161368A1 (en) Method and apparatus for determining spatial two-tuple, computer device, and storage medium
JP4885558B2 (en) Entity lookup system
Mocnik A novel identifier scheme for the ISEA aperture 3 hexagon discrete global grid system
US11144523B2 (en) Methods and data structures for efficient cross-referencing of physical-asset spatial identifiers
CN115203769A (en) Graph alignment techniques for automatically labeling drawing dimensions
Zhou et al. Efficient cell navigation methods and applications of an aperture 4 hexagonal discrete global grid system
CN104504758A (en) Method for generating curved surface on surface of denture crown
US20050213823A1 (en) Distributed CAD apparatus
CN103425787B (en) The triangle gridding of a kind of asymptotic optimization repeats the quick minimizing technology in summit
Huang et al. Unified Multi-structural Element Modeling Methods Using Icosahedral Discrete Global Grid Systems
Hou et al. Design and achievement of cloud geodatabase for a sponge city
Li et al. The employment of quasi-hexagonal grids in spherical harmonic analysis and synthesis for the earth's gravity field
WO2020205822A1 (en) Methods and data structures for efficient cross-referencing of physical-asset spatial identifiers
CN117689840A (en) Coding and operation method and device of rhombic icosahedron global discrete grid system
Lu Linear-time compression of bounded-genus graphs into information-theoretically optimal number of bits

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant