Hexagonal Global Discrete Grid Coding Spatial Retrieval Method and Apparatus

By converting the space to be searched into vector polygons and performing the conversion between tile coordinates and global coordinates, and combining the Bresenham algorithm and the boundary pairing algorithm, the low efficiency and low fault tolerance of the hexagonal global discrete grid system are solved, and efficient spatial retrieval and encoding conversion are achieved.

CN119357182BActive Publication Date: 2025-10-31AEROSPACE INFORMATION RES INST CAS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411199808.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-10-31
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

Existing hexagonal global discrete grid systems suffer from low computational efficiency and high system complexity during spatial retrieval, resulting in low fault tolerance and making it difficult to meet practical application requirements.

Method used

The spatial extent to be retrieved is converted into a vector polygon, and its geographic coordinates are converted into tile coordinates. The Bresenham algorithm and boundary pairing algorithm of hexagonal grid are used to process cross-face information, and the pairing is performed row by row to determine the global discrete grid coding set.

Benefits of technology

It improves the efficiency and fault tolerance of spatial retrieval, reduces the impact of encoding, and enhances the versatility of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357182B_ABST
    Figure CN119357182B_ABST
Patent Text Reader

Abstract

This invention provides a hexagonal global discrete grid encoded spatial retrieval method and apparatus. The method includes: converting the spatial range to be retrieved into a vector polygon, and converting the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon; wherein the spatial range to be retrieved is determined based on multiple geographic coordinates; converting each edge of the tile polygon into tile coordinates according to the cross-face information of the tile polygon, and converting each tile coordinate into corresponding global coordinates according to the arrangement order of the tiles to obtain a global coordinate set; scanning and pairing each global coordinate in the global coordinate set row by row to obtain a pairing result, and determining the global discrete grid encoded set based on the pairing result. The method of this invention uses integer coordinates to perform the calculation of the retrieval method, reducing the influence of encoding, improving the versatility of the method, and improving the efficiency of spatial retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geographic information technology, and in particular to a hexagonal global discrete grid coded spatial retrieval method and apparatus. Background Technology

[0002] The Global Discrete Grid System is a new type of spatial reference system that can divide the Earth's surface into continuous, multi-resolution, and multi-level grids according to certain partitioning rules. It can overcome the limitations of different projection systems and planar data organization models, and integrate, process, and analyze massive, multi-source, and heterogeneous Earth spatial data under a unified spatial reference system.

[0003] Hexagonal global discrete grids are the most studied and widely used type of grid. Encoded spatial retrieval is the foundation for spatial data organization, management, spatial operations, and analysis on global discrete grids.

[0004] In related technologies, most research on hexagonal global discrete grids focuses on models, encoding, and encoding operations, lacking support for spatial retrieval of grid encoding. Moreover, existing grid retrieval methods in hexagonal global discrete grid systems require a large number of complex spatial operations between and within triangles when solving cross-face problems, which greatly affects computational efficiency. At the same time, increasing the complexity of the system reduces the fault tolerance of the global discrete grid system, making it difficult to meet the needs of practical applications. Summary of the Invention

[0005] This invention provides a spatial retrieval method and apparatus for hexagonal global discrete grid coding, which addresses the shortcomings of existing technologies where hexagonal global discrete grids lack support for spatial retrieval of grid coding, resulting in low computational efficiency and high system complexity when solving cross-surface problems, leading to low fault tolerance of global discrete grid systems. This invention improves the spatial retrieval efficiency and fault tolerance of global discrete grid systems.

[0006] This invention provides a hexagonal global discrete grid coded space retrieval method, applied to a global discrete grid system, comprising:

[0007] The spatial range to be searched is converted into a vector polygon, and the geographic coordinates corresponding to each vertex of the vector polygon are converted into tile coordinates to obtain a tile polygon; wherein, the spatial range to be searched is determined based on multiple geographic coordinates;

[0008] Based on the cross-face information of the tile polygon, each edge of the tile polygon is converted into tile coordinates, and each tile coordinate is converted into corresponding global coordinates according to the arrangement order of the tiles, thus obtaining a set of global coordinates;

[0009] The global coordinates in the global coordinate set are scanned and paired row by row to obtain the pairing results, and the global discrete grid coding set is determined based on the pairing results.

[0010] According to the hexagonal global discrete grid coded spatial retrieval method provided by the present invention, the step of converting each side of the tile polygon into tile coordinates based on the cross-face information of the tile polygon includes:

[0011] In the case of the tile polygon spanning a surface, the spanning type of the tile polygon is determined; wherein, the spanning type includes one of the following: upper spanning, middle spanning, and lower spanning;

[0012] Based on the Bresenham algorithm for hexagonal grid cross-faces, each edge of the tile polygon is converted into tile coordinates according to the cross-face type.

[0013] According to the hexagonal global discrete grid coded spatial retrieval method provided by the present invention, the step of converting each side of the tile polygon into tile coordinates based on the cross-face information of the tile polygon further includes:

[0014] In the case where the tile polygon does not span multiple faces, each edge of the tile polygon is converted into tile coordinates based on the Bresenham algorithm for hexagonal grids.

[0015] According to the hexagonal global discrete grid coded spatial retrieval method provided by the present invention, the step of scanning and pairing each global coordinate in the global coordinate set row by row to obtain the pairing result includes:

[0016] The hexagonal grid boundary pairing algorithm is used to scan and pair global coordinates in the global coordinate set row by row according to the horizontal coordinate. General boundary grids are paired with each other, and horizontal edge start grids are paired with horizontal edge end grids. Grids inside horizontal edges and grids at extreme points are removed to obtain the pairing results.

[0017] According to the present invention, a hexagonal global discrete grid coding space retrieval method is provided, wherein determining the global discrete grid coding set based on the pairing result includes:

[0018] The adjacent grid cells in the pairing results are merged to obtain multiple run-length codes; each run-length code corresponds to the start and end values ​​of a different continuous grid.

[0019] A grid run-length encoding data model is constructed based on the multiple run-length codes, and each grid run-length encoding data in the grid run-length encoding data model is scanned row by row. The regions within the boundary pair are marked as the retrieval regions, and the global coordinates of each row of grid run-length encoding data are converted into the global discrete grid encoding set.

[0020] According to the hexagonal global discrete grid coding spatial retrieval method provided by the present invention, the tile coordinate system corresponding to each tile coordinate is established by taking the left vertex of the tile as the origin and the directions of the two sides where the left vertex is located. coordinate axes and The coordinate axes show that each hexagonal grid in a tile corresponds to a unique coordinate system. coordinate;

[0021] The global coordinate systems corresponding to each global coordinate are established by means of the direction along the triangular face of the regular polyhedron tangent to the meridian. An axis is established along the direction parallel to the parallel of latitude and the triangular face. The axis is obtained so that each hexagonal grid corresponds to a unique one. coordinate.

[0022] The present invention also provides a hexagonal global discrete grid coded spatial retrieval device, comprising:

[0023] The tile coordinate transformation module is used to convert the spatial range to be searched into a vector polygon, and to convert the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon; wherein, the spatial range to be searched is determined based on multiple geographic coordinates;

[0024] The global coordinate transformation module is used to convert each edge of the tile polygon into tile coordinates based on the cross-face information of the tile polygon, and to convert each tile coordinate into the corresponding global coordinates according to the arrangement order of the tiles, so as to obtain a global coordinate set.

[0025] The coordinate pairing module is used to scan and pair each global coordinate in the global coordinate set row by row to obtain the pairing result, and determine the global discrete grid coding set based on the pairing result.

[0026] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the hexagonal global discrete grid coded spatial retrieval method as described above.

[0027] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the hexagonal global discrete grid coded spatial retrieval method as described above.

[0028] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the hexagonal global discrete grid coded spatial retrieval method as described above.

[0029] The hexagonal global discrete grid coding spatial retrieval method and apparatus provided by this invention converts the spatial range to be retrieved into a vector polygon, and converts the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon. Then, based on the cross-face information of the tile polygon, each edge of the tile polygon is converted into tile coordinates, and each tile coordinate is converted into the corresponding global coordinate according to the arrangement order of each tile. Next, each global coordinate is scanned and paired row by row. Finally, the global discrete grid coding set is determined based on the pairing results. The grid coding is converted into tile coordinates and global coordinates. Integer coordinates are used to calculate the retrieval method, which reduces the influence of coding, improves the versatility of the method, and improves the efficiency of spatial retrieval. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0031] Figure 1 This is one of the flowcharts illustrating the hexagonal global discrete grid coded spatial retrieval method provided by the present invention.

[0032] Figure 2 This is a schematic diagram of the coordinates of a globally discrete grid tile provided by the present invention.

[0033] Figure 3 These are schematic diagrams illustrating three different types of cross-faces of polygonal edges on a globally discrete grid provided by this invention.

[0034] Figure 4 This is a schematic diagram of the global coordinate system provided by the present invention.

[0035] Figure 5 This is a schematic diagram of the interface for converting tile coordinates to global coordinates provided by the present invention.

[0036] Figure 6 (a)-6 (d) are schematic diagrams of four different types of hexagonal grid boundaries provided by the present invention.

[0037] Figure 7 This is a schematic diagram of the interface of the grid run-length encoding data model provided by the present invention.

[0038] Figure 8 This is the second flowchart of the hexagonal global discrete grid coded spatial retrieval method provided by the present invention.

[0039] Figure 9This is a schematic diagram of the structure of the hexagonal global discrete grid coded spatial retrieval device provided by the present invention.

[0040] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0042] The following is combined Figures 1-9 The present invention describes a hexagonal global discrete grid coded spatial retrieval method and apparatus.

[0043] Figure 1 This is one of the flowcharts illustrating the hexagonal global discrete grid coded spatial retrieval method provided by the present invention, such as... Figure 1 As shown, the hexagonal global discrete grid coding space retrieval method, applied to a global discrete grid system, includes the following steps:

[0044] Step 110: Convert the spatial range to be searched into a vector polygon, and convert the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon; wherein, the spatial range to be searched is determined based on multiple geographic coordinates.

[0045] In this step, the spatial retrieval tasks that the global discrete grid system can perform correspond to scenarios including simulating dynamic processes such as meteorology and oceanography, and can also be extended to fields such as land resources and environmental monitoring; the global discrete grid can serve as a basic framework for the integration and operation of multi-source, heterogeneous spatial data, providing strong support for spatial data integration at the data organization level.

[0046] In this embodiment, the spatial range to be searched can be determined according to the specific spatial search task type. For example, in the case of common weather simulation, it is necessary to search for meteorological data of a certain characteristic sea area or land. First, obtain the geographic coordinates of the corresponding sea area or land, and then determine the spatial range to be searched based on the corresponding geographic coordinates.

[0047] In this embodiment, the spatial extent is represented as a vector polygon, and the global discrete grid tile number and tile number of each vertex of the vector polygon are calculated based on the geographic coordinates of each vertex. Coordinates, to locate this group of tiles Coordinates are combined in sequence to form tiles. Polygons are represented as:

[0048] ;

[0049] in, For the first n The x-coordinate of the tile coordinates, For the first n The vertical coordinate of the tile.

[0050] Figure 2 This is a schematic diagram of the coordinates of a globally discrete grid tile provided by the present invention. Figure 2 In the embodiment shown, the coordinates of each tile The corresponding tile coordinate system is established by taking the left vertex of the tile as the origin and defining the directions of the two edges containing the left vertex. coordinate axes and The coordinate axes show that each hexagonal grid in a tile corresponds to a unique coordinate system. coordinate.

[0051] Step 120: Based on the cross-face information of the tile polygon, convert each edge of the tile polygon into tile coordinates, and convert each tile coordinate into its corresponding global coordinate according to the arrangement order of the tiles to obtain a set of global coordinates.

[0052] In this step, determine Tile numbering at the two endpoints of each side of the polygon and ,if According to the Bresenham algorithm for hexagonal grids, the edges are transformed into a set of tiles. coordinates, if According to the Bresenham algorithm for hexagonal grid cross-faces, the edges are transformed into a set of tiles. coordinate.

[0053] Optionally, converting each edge of the tile polygon into tile coordinates based on the tile polygon's cross-face information includes: in the case of a tile polygon with cross-faces, determining the cross-face type of the tile polygon; wherein the cross-face type includes one of the upper cross-face, middle cross-face, and lower cross-face; and converting each edge of the tile polygon into tile coordinates based on the cross-face type using the Bresenham algorithm for hexagonal grid cross-faces.

[0054] Figure 3 These are schematic diagrams illustrating three different types of cross-faces of polygonal edges on a globally discrete grid provided by this invention. Figure 3 In the illustrated embodiment, the specific steps of the Bresenham algorithm for hexagonal grid-based cross-face tiles in the case of polygonal tile cross-faces are as follows:

[0055] (1) Based on the partitioning structure of the regular polyhedron corresponding to the global discrete grid, the crossing mode of the polygon edge is divided into three types: upper crossing, middle crossing and lower crossing;

[0056] (2) For the upper cross-face type, the tile coordinate system Convert to the coordinate system of the upper region ,according to The coordinates divide the upper region into , , Three small areas, when Coordinates at When the time is within, the region coordinates are and ,when Coordinates at When the time is within, the region coordinates are and ,when Coordinates at When the time is within, the region coordinates are and Proceed to step (5);

[0057] (3) For the intermediate span type, the tile coordinate system Unified conversion to intermediate region coordinate system Divide the middle area into , , , Four small areas, when Coordinates at When the time is within, the region coordinates are and ,when Coordinates at When the time is within, the region coordinates are and ,when Coordinates at When the time is within, the region coordinates are and ,when Coordinates at When the time is within, the region coordinates are and Proceed to step (5);

[0058] (4) For the lower cross-face type, the tile coordinate system Convert to the coordinate system of the area below Divide the area below into , , Three small areas, when Coordinates at When the time is within, the region coordinates are and ,when Coordinates at When the time is within, the region coordinates are and ,when Coordinates at When the time is within, the region coordinates are and Proceed to step (5);

[0059] (5) Calculate the slope and direction of the cross-plane edge in the regional coordinate system;

[0060] (6) Determine the sign of the error term and the direction of the increasing coordinate axis based on the slope and direction;

[0061] (7) Starting from the starting point of the edge, increment the grid one by one, determine the position of the next grid by the sign of the error term, and store the area coordinates of the grid;

[0062] (8) Convert the region coordinates to tile coordinates.

[0063] Optionally, converting each edge of the tile polygon into tile coordinates based on the tile polygon's cross-face information further includes: converting each edge of the tile polygon into tile coordinates based on the Bresenham algorithm for hexagonal grids when the tile polygon does not cross faces.

[0064] Specifically, when the tile polygons do not span multiple faces, the Bresenham algorithm using a hexagonal grid takes the following steps:

[0065] (1) Calculate the slope and direction of each side of the tile polygon;

[0066] (2) Determine the sign of the error term and the direction of the increasing coordinate axis based on the slope and direction mentioned above;

[0067] (3) Starting from the beginning of each edge, increment the grid one by one, determine the position of the next grid by the sign of the error term, and store the tile coordinates of the grid.

[0068] Figure 4 This is a schematic diagram of the global coordinate system unfolding provided by the present invention. Figure 4 In the illustrated embodiment, the global coordinate system corresponding to each global coordinate is established by means of the direction along the triangular face of the regular polyhedron that is tangent to the meridian. An axis is established along the direction parallel to the parallel of latitude and the triangular face. The axis is obtained so that each hexagonal grid corresponds to a unique one. Coordinates; where the global coordinate system is constructed based on the partitioning structure of the regular polyhedron corresponding to the hexagonal global discrete grid.

[0069] In this embodiment, the problem of complex spatial operations required for cross-plane retrieval is solved by using the aforementioned cross-plane Bresenham algorithm and global coordinate system, thereby improving the efficiency of spatial retrieval.

[0070] Figure 5 This is a schematic diagram of the interface for converting tile coordinates to global coordinates provided by the present invention. Figure 5 In the illustrated embodiment, the conversion steps between tile coordinates and global coordinates are as follows:

[0071] (1) The regular icosahedrons corresponding to the global discrete grid are numbered sequentially from 1 to 20, and can be divided into four types according to the position and number of the triangular faces: numbered 0-4, 5-9, 10-14, and 15-19.

[0072] (2) When the tile coordinates When the tile number is 0-4, then the global coordinates are... Represented as: for and Proceed to step (6);

[0073] (3) When the tile coordinates When the tile number is 5-9, then the global coordinates are... Represented as: and Proceed to step (6);

[0074] (4) When the tile coordinates When the tile number is 10-14, then the global coordinates are... Represented as: and Proceed to step (6);

[0075] (5) When the tile coordinates When the tile number is 15-19, then the global coordinates are... Represented as: and Proceed to step (6);

[0076] (6) Record the tile coordinates Corresponding tile number and global coordinates .

[0077] Step 130: Scan and pair each global coordinate in the global coordinate set row by row to obtain the pairing results, and determine the global discrete grid coding set based on the pairing results.

[0078] In this embodiment, global coordinates are determined according to the hexagonal grid boundary pairing algorithm. Set according to The coordinates are scanned and paired row by row, and the results are merged and converted into a grid run-length encoding data model.

[0079] In this embodiment, the grid run-length encoded data is scanned line by line, and the regions within the boundary pairs are marked as search areas. The global coordinates of each line are recorded. The input "spatial range to be searched" is converted into a global discrete grid code and stored in a grid code set. This yields the search results after the spatial search process described in this embodiment has been processed.

[0080] The hexagonal global discrete grid coding spatial retrieval method provided in this invention converts the spatial range to be retrieved into a vector polygon, and converts the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon. Then, based on the cross-face information of the tile polygon, each edge of the tile polygon is converted into tile coordinates, and each tile coordinate is converted into the corresponding global coordinate according to the arrangement order of each tile. Next, each global coordinate is scanned and paired row by row. Finally, the global discrete grid coding set is determined based on the pairing results. The grid coding is converted into tile coordinates and global coordinates. Integer coordinates are used to calculate the retrieval method, which reduces the influence of coding, improves the versatility of the method, and improves the efficiency of spatial retrieval.

[0081] In some embodiments, the global coordinates in the global coordinate set are scanned and paired row by row to obtain the pairing results. This includes: scanning and pairing the global coordinates in the global coordinate set according to the horizontal coordinates according to the hexagonal grid boundary pairing algorithm; pairing the general boundary grids; pairing the horizontal edge start grids with the horizontal edge end grids; and removing the horizontal edge internal grids and extreme point grids to obtain the pairing results.

[0082] Figure 6 (a)-6(d) are schematic diagrams of four different types of hexagonal grid boundaries provided by the present invention. Figure 6 In the illustrated embodiment, the specific steps for obtaining the corresponding pairing results using the hexagonal grid boundary pairing algorithm are as follows:

[0083] (1) Set up a global coordinate set The representation of: Let , , for The three integer coordinates of a continuous grid cell; where, k The number of global coordinates;

[0084] (2) In order from arrive Read the collections sequentially Integer coordinates in the data, when If yes, proceed to step (3); otherwise, proceed to step (7).

[0085] (3) such as Figure 6 As shown in (a), when or ,but The grid type can be marked as a general boundary grid, proceed to step (2);

[0086] (4) such as Figure 6 As shown in (c), when or ,but The grid type can be marked as a horizontal edge starting grid, proceed to step (2);

[0087] (5) such as Figure 6 As shown in (d), when or ,but The grid type can be marked as a horizontal edge-terminated grid, proceed to step (2);

[0088] (6) When ,but The grid type can be marked as horizontal edge internal grid, proceed to step (2);

[0089] (7) For example Figure 6 As shown in (b), when or ,but The grid type can be marked as an extreme point grid, proceed to step (2);

[0090] (8) Based on global coordinates The grid type, according to The coordinates are scanned and paired row by row, and the general boundary grids are paired with each other, the horizontal edge start grids are paired with the horizontal edge end grids, and the horizontal edge internal grids and extreme point grids are removed.

[0091] The hexagonal global discrete grid coding spatial retrieval method provided in this invention uses a hexagonal grid boundary pairing algorithm to scan and pair global coordinates in the global coordinate set row by row according to their horizontal coordinates. This involves pairing general boundary grids, pairing grids that start at horizontal edges with grids that end at horizontal edges, and removing grids inside horizontal edges and grids with extreme points to obtain the pairing results. The hexagonal grid Bresenham algorithm and the grid boundary pairing algorithm are then used to calculate the coordinate range of the retrieval area, providing reliable data support for the subsequent construction of grid run-length encoded data.

[0092] In some embodiments, determining the global discrete grid coding set based on the pairing results includes: merging adjacent grid cells in the pairing results to obtain multiple run-length codes; wherein each run-length code corresponds to the start and end values ​​of different continuous grids; constructing a grid run-length coding data model based on the multiple run-length codes, and scanning each grid run-length coding data in the grid run-length coding data model row by row, marking the region within the boundary pairing as the retrieval region, and converting the global coordinates of each row of grid run-length coding data into a global discrete grid coding set.

[0093] Figure 7 This is a schematic diagram of the interface of the grid run-length encoding data model provided by the present invention. Figure 7 In the illustrated embodiment, the grid run-length encoding data model can be represented as:

[0094] ;

[0095] The grid-based game process coding data model is based on The direction of the coordinate axes will determine the orientation of each column. The values ​​are arranged in ascending order. consecutive adjacent grid cells are merged together to form a run, and each run code consists of a pair of numbers. Composition, the first number in each run The second number represents the starting value of the continuous grid. This indicates the end value; each column may contain multiple runs.

[0096] In this embodiment, the global discrete grid coding set corresponding to the spatial range to be retrieved in the global discrete grid system can be determined by the grid run-length coding data model.

[0097] The hexagonal global discrete grid coding spatial retrieval method provided in this invention merges adjacent grid cells in the pairing results to obtain multiple run-length codes, constructs a grid run-length coding data model based on the multiple run-length codes, and scans each grid run-length coding data in the grid run-length coding data model row by row, marking the region within the boundary pairing as the retrieval region, and converting the global coordinates of each row of grid run-length coding data into a global discrete grid coding set. This realizes the representation of the retrieval region as a grid run-length coding data model, solving the problems of large-scale coding storage and traversal query.

[0098] Figure 8 This is the second flowchart illustrating the hexagonal global discrete grid coded spatial retrieval method provided by this invention. Figure 8 In the illustrated embodiment, after obtaining the vector polygon corresponding to the spatial range to be searched, the geographic coordinates of each vertex in the vector polygon are converted into tile coordinates. This process yields the tile polygons. It then determines whether the tile polygons span multiple faces. If so, the Bresenham algorithm (hexagonal grid spanning face) is used to convert each side of the tile polygon into a set of tile coordinates. When the tile polygons do not span multiple faces, the Bresenham algorithm for hexagonal grids is used to convert each side into a set of tile coordinates. According to the tile coordinates With global coordinates The conversion algorithm converts the coordinates of each tile into global coordinates in sequence. Coordinates; global coordinates are obtained through a hexagonal grid boundary pairing algorithm. according to The coordinates are scanned and paired row by row, and the results are merged and converted into a grid run-length encoding data model to obtain the grid encoding set corresponding to the spatial range to be searched.

[0099] The hexagonal global discrete grid coded space retrieval device provided by the present invention is described below. The hexagonal global discrete grid coded space retrieval device described below and the hexagonal global discrete grid coded space retrieval method described above can be referred to in correspondence with each other.

[0100] Figure 9 This is a schematic diagram of the structure of the hexagonal global discrete grid coded spatial retrieval device provided by the present invention, as shown below. Figure 9 As shown, the hexagonal global discrete grid coded spatial retrieval device includes: a tile coordinate transformation module 910, a global coordinate transformation module 920, and a coordinate pairing module 930.

[0101] The tile coordinate transformation module 910 is used to convert the spatial range to be searched into a vector polygon, and to convert the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon; wherein, the spatial range to be searched is determined based on multiple geographic coordinates;

[0102] The global coordinate transformation module 920 is used to convert each edge of the tile polygon into tile coordinates based on the cross-face information of the tile polygon, and to convert each tile coordinate into the corresponding global coordinates according to the arrangement order of each tile, so as to obtain a global coordinate set.

[0103] The coordinate pairing module 930 is used to scan and pair each global coordinate in the global coordinate set line by line to obtain the pairing result, and determine the global discrete grid coding set based on the pairing result.

[0104] The hexagonal global discrete grid coded spatial retrieval tool provided in this embodiment of the invention converts the spatial range to be retrieved into vector polygons, and converts the geographic coordinates corresponding to each vertex of the vector polygons into tile coordinates to obtain tile polygons. Then, based on the cross-face information of the tile polygons, each edge of the tile polygon is converted into tile coordinates, and each tile coordinate is converted into the corresponding global coordinates according to the arrangement order of each tile. Next, each global coordinate is scanned and paired row by row. Finally, the global discrete grid code set is determined based on the pairing results. The grid code is converted into tile coordinates and global coordinates, and integer coordinates are used to calculate the retrieval method, which reduces the influence of the code, improves the versatility of the method, and improves the efficiency of spatial retrieval.

[0105] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 10 As shown, the electronic device may include a processor 1010, a communications interface 1020, a memory 1030, and a communication bus 1040. The processor 1010, communications interface 1020, and memory 1030 communicate with each other via the communication bus 1040. The processor 1010 can call logical instructions in the memory 1030 to execute a hexagonal global discrete grid coded spatial retrieval method. This method includes: converting the spatial range to be retrieved into a vector polygon, and converting the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon; wherein the spatial range to be retrieved is determined based on multiple geographic coordinates; converting each edge of the tile polygon into tile coordinates according to the cross-face information of the tile polygon, and converting each tile coordinate into corresponding global coordinates according to the arrangement order of the tiles to obtain a global coordinate set; scanning and pairing each global coordinate in the global coordinate set row by row to obtain a pairing result, and determining the global discrete grid coded set based on the pairing result.

[0106] Furthermore, the logical instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0107] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the hexagonal global discrete grid coded spatial retrieval method provided by the above methods. The method includes: converting the spatial range to be retrieved into a vector polygon, and converting the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon; wherein the spatial range to be retrieved is determined based on multiple geographic coordinates; converting each edge of the tile polygon into tile coordinates according to the cross-face information of the tile polygon, and converting each tile coordinate into a corresponding global coordinate according to the arrangement order of each tile to obtain a global coordinate set; scanning and pairing each global coordinate in the global coordinate set row by row to obtain a pairing result, and determining the global discrete grid coded set according to the pairing result.

[0108] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the hexagonal global discrete grid coded spatial retrieval method provided by the methods described above. This method includes: converting the spatial range to be retrieved into a vector polygon, and converting the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon; wherein the spatial range to be retrieved is determined based on multiple geographic coordinates; converting each edge of the tile polygon into tile coordinates according to the cross-face information of the tile polygon, and converting each tile coordinate into corresponding global coordinates according to the arrangement order of the tiles to obtain a global coordinate set; performing row-by-row scanning and pairing of the global coordinates in the global coordinate set to obtain a pairing result, and determining the global discrete grid coded set based on the pairing result.

[0109] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0110] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A hexagonal global discrete grid coding spatial retrieval method, applied to a global discrete grid system, characterized in that, include: The spatial range to be searched is converted into a vector polygon, and the geographic coordinates corresponding to each vertex of the vector polygon are converted into tile coordinates to obtain a tile polygon; wherein, the spatial range to be searched is determined based on multiple geographic coordinates; Based on the cross-face information of the tile polygon, each edge of the tile polygon is converted into tile coordinates, and each tile coordinate is converted into corresponding global coordinates according to the arrangement order of the tiles, thus obtaining a set of global coordinates; The global coordinates in the global coordinate set are scanned and paired row by row to obtain the pairing results, and the global discrete grid coding set is determined based on the pairing results; the step of converting each edge of the tile polygon into tile coordinates based on the cross-face information of the tile polygon includes: In the case of the tile polygon spanning a surface, the spanning type of the tile polygon is determined; wherein, the spanning type includes one of the following: upper spanning, middle spanning, and lower spanning; Based on the Bresenham algorithm for hexagonal grid cross-faces, each edge of the tile polygon is converted into tile coordinates according to the cross-face type; the conversion of each edge of the tile polygon into tile coordinates according to the cross-face information of the tile polygon further includes: In the case where the tile polygon does not span multiple faces, each edge of the tile polygon is converted into tile coordinates based on the Bresenham algorithm for hexagonal grids; the process of scanning and pairing each global coordinate in the global coordinate set row by row to obtain the pairing results includes: The hexagonal grid boundary pairing algorithm is used to scan and pair global coordinates in the global coordinate set row by row according to the horizontal coordinate. General boundary grids are paired with each other, and horizontal edge start grids are paired with horizontal edge end grids. Grids inside horizontal edges and grids at extreme points are removed to obtain the pairing results.

2. The hexagonal global discrete grid coding spatial retrieval method according to claim 1, characterized in that, The step of determining the global discrete grid coding set based on the pairing results includes: The adjacent grid cells in the pairing results are merged to obtain multiple run-length codes; each run-length code corresponds to the start and end values ​​of a different continuous grid. A grid run-length encoding data model is constructed based on the multiple run-length codes, and each grid run-length encoding data in the grid run-length encoding data model is scanned row by row. The regions within the boundary pair are marked as the retrieval regions, and the global coordinates of each row of grid run-length encoding data are converted into the global discrete grid encoding set.

3. The hexagonal global discrete grid coding spatial retrieval method according to claim 1, characterized in that, The tile coordinate system corresponding to each tile coordinate is established by taking the left vertex of the tile as the origin and the directions of the two sides containing the left vertex. coordinate axes and The coordinate axes show that each hexagonal grid in a tile corresponds to a unique coordinate. coordinate; The global coordinate systems corresponding to each global coordinate are established by means of the direction along the triangular face of the regular polyhedron tangent to the meridian. An axis is established along the direction parallel to the parallel of latitude and the triangular face. The axis is obtained such that each hexagonal grid corresponds to a unique [structure / structure]. coordinate.

4. A hexagonal global discrete grid coded spatial retrieval device, employing the hexagonal global discrete grid coded spatial retrieval method as described in claim 1, characterized in that, include: The tile coordinate transformation module is used to convert the spatial range to be searched into a vector polygon, and to convert the geographic coordinates corresponding to each vertex of the vector polygon into tile coordinates to obtain a tile polygon; wherein, the spatial range to be searched is determined based on multiple geographic coordinates; The global coordinate transformation module is used to convert each edge of the tile polygon into tile coordinates based on the cross-face information of the tile polygon, and to convert each tile coordinate into the corresponding global coordinates according to the arrangement order of the tiles, so as to obtain a global coordinate set. The coordinate pairing module is used to scan and pair each global coordinate in the global coordinate set row by row to obtain the pairing result, and determine the global discrete grid coding set based on the pairing result.

5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the hexagonal global discrete grid coded spatial retrieval method as described in any one of claims 1 to 3.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the hexagonal global discrete grid coded spatial retrieval method as described in any one of claims 1 to 3.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the hexagonal global discrete grid coded spatial retrieval method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Global tile consistent hexagonal grid data structure coding method and device

    CN113114272A

  • Positioning method and related apparatus

    WO2022222828A1