Calculation method based on vector linear data fitting to hexagonal grid
By designing a calculation method based on vector line data and hexagonal mesh, the problem of inefficient fitting hexagonal mesh in the prior art is solved, and the rapid fitting and efficient processing of vector data are realized.
Patent Information
- Application Number
- CN202411629982.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-11
AI Technical Summary
In the prior art, vector line data fitting hexagonal mesh is inefficient, resulting in slow processing speed and unable to quickly complete the fitting.
By acquiring line vector data, determine the line vector area to model the hexagonal mesh network, split the line vector data as the starting point state, and obtain the hexagonal mesh where it is located based on the starting point and the end point, and search the adjacent hexagonal mesh to achieve efficient fitting of vector data.
It realizes the rapid fitting of vector line-type data to the hexagonal mesh, which improves processing speed and efficiency, shortens the generation time of the hexagonal mesh model, and improves the efficiency and accuracy of the model.
Smart Images

Figure CN119597950A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of military map simulation, and in particular to a calculation method based on fitting vector linear data to a hexagonal grid. Background Art
[0002] The existing vector linear data is fitted to the hexagonal network mainly based on the spatial relationship to determine whether it is fitted. GIS data is generally large in quantity, which leads to slow processing speed and low efficiency in the spatial relationship fitting process. In the process of fitting vector linear data to the hexagonal grid, there is a disadvantage that fast fitting cannot be achieved.
[0003] The present invention proposes a military map drawing method, which utilizes the current GIS technology, combines computer graphics technology, and improves the efficiency of vector data fitting hexagons through a GIS platform by performing spatial analysis, a vector data parsing module, a hexagonal grid modeling module, and a grid path finding module, thereby improving the processing speed and efficiency; enabling military personnel to understand the battlefield situation more vividly and intuitively, improving the military personnel's cognitive ability of battlefield information, and realizing battlefield situation deduction on a three-dimensional military map.
[0004] However, during the implementation of the above technical solution, it was found that there were at least the following technical problems:
[0005] In the past, the fitting of vector linear data to hexagonal grids was inefficient and the fitting process was long. Using vector linear data to fit hexagonal grid data in military simulation scenarios requires solving the problems of existing methods for processing large amounts of GIS data, low fitting efficiency, and slow processing speed. In the process of fitting vector linear data to hexagonal grids, there is a disadvantage that fast fitting cannot be achieved. Therefore, we propose a calculation method based on fitting vector linear data to hexagonal grids. Summary of the invention
[0006] 1. Technical issues to be solved
[0007] In view of the shortcomings of the prior art, the present invention provides a calculation method based on fitting vector linear data to a hexagonal grid. By using vector linear data and a fixed-size regular hexagonal network, a hexagonal path is generated. Compared with the current method, a large amount of invalid hexagonal calculation is avoided. Now, using the calculation method of fitting vector linear data to a hexagonal grid, the fitting of vector linear data to a hexagonal grid can be completed quickly.
[0008] (II) Technical solution
[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0010] A calculation method based on fitting vector line data to a hexagonal grid, the specific steps are as follows:
[0011] Step 1. Obtain linear vector data, determine the linear vector area for hexagonal grid network modeling, and generate a hexagonal grid network in the data area;
[0012] Step 2. Split the linear vector data to generate linear vector segment data with only the starting point state;
[0013] Step 3. Obtain the hexagonal grid based on the starting point and the ending point, use the spatial relationship between the spatial coordinate point and the hexagonal grid to make a judgment, find the hexagon containing the coordinates, and then fit the hexagonal grid to complete;
[0014] Step 4. According to the starting hexagonal grid being a non-adjacent hexagonal grid, the adjacent hexagonal grids of the starting hexagonal grid are obtained (there are six hexagonal grids around each hexagonal grid), and the spatial distance is calculated;
[0015] Step 5. Update the starting hexagonal grid to the nearest neighboring hexagonal grid found in step 4;
[0016] Step 6. Repeat steps 3 to 5 until the adjacent hexagonal grid found in step 5 is the same as the hexagonal grid of the end point. If they are the same, then end.
[0017] Preferably, in the step three, whether the hexagonal grids are the same is determined based on the hexagons A and B corresponding to the obtained starting point A and end point B, and whether the hexagons are the same is determined based on whether the numbers of hexagon A and hexagon B are consistent. If they are the same hexagonal grids, the process ends and the fitting of the hexagonal grid is completed.
[0018] Preferably, according to whether the starting hexagonal grid is a different hexagonal grid, it is judged whether the starting hexagonal grid is an adjacent hexagonal grid. In the judgment process, the hexagonal adjacent hexagonal grid attribute (NearHexCellIDs) is used, and the attribute (NearHexCellIDs) contains the unique number of the surrounding hexagonal grids; if it is an adjacent hexagonal grid, the fitting of the hexagonal grid ends.
[0019] Preferably, in step five, the minimum distance hexagonal grid is found based on the distance between the center of the adjacent hexagonal grid of the starting hexagonal grid and the center point of the ending hexagonal grid, and the spatial distance is calculated using the geographic spatial distance calculation formula (d=R*con1 / [sinA*sinB+cosA*cosB*cos(BA)], R: is the geographic spatial distance of 1 degree on the earth's surface), in the adjacent hexagonal grids.
[0020] Preferably, the calculation method for fitting the vector linear data to the hexagonal grid mainly involves GIS vector linear data; the calculation method for fitting the vector linear data to the hexagonal grid mainly involves hexagonal grid data.
[0021] Preferably, the fitting of the vector linear data to the hexagonal network is mainly based on the spatial relationship to determine whether it fits. In the process of fitting the vector data to the hexagonal grid, the design is based on the starting point of the line segment, the hexagonal grid in which it is located is calculated, and then the minimum angle (or the minimum distance) between the center of the adjacent hexagonal grid and the end point is used to perform hexagonal grid path finding, and the hexagonal grid through which the vector data passes is calculated, so as to achieve the fitting of the vector data to the hexagonal grid and achieve efficient data fitting.
[0022] (III) Beneficial effects
[0023] The core of the protection is: based on the method of fitting vector linear data to hexagonal grid, the hexagons are fitted and spliced to generate vector linear data fitting hexagonal paths. This method realizes the fitting of vector linear data to hexagonal grid, which has the advantages of fast speed and high accuracy, shortening the generation time of hexagonal grid model and improving model efficiency and accuracy.
[0024] Technical effect: In the process of fitting vector data to hexagonal grids, there are a huge number of hexagonal grids, and multiple judgments are required during the fitting process, resulting in low efficiency. However, based on the characteristics of the hexagonal grid network, we designed a method based on the starting point of the line segment, calculated the hexagonal grid where it is located, and then performed hexagonal grid path finding based on the minimum angle (or minimum distance) between the center of the adjacent hexagonal grid and the end point, calculated the hexagonal grids through which the vector data passes, and realized the fitting of the vector data to the hexagonal grid. It can efficiently fit data. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings.
[0026] Figure 1 A calculation flow chart of the present invention based on fitting vector linear data to a hexagonal grid;
[0027] Figure 2 It is an original vector line data graph based on the vector line data fitted to the hexagonal grid of the present invention;
[0028] Figure 3 A hexagonal grid diagram generated by fitting vector linear data to a hexagonal grid according to the present invention;
[0029] Figure 4A calculation method based on fitting vector linear data to a hexagonal grid according to the present invention is a display effect diagram based on the superposition of vector linear data and hexagonal grid data;
[0030] Figure 5 The present invention discloses a calculation method based on fitting vector linear data to a hexagonal grid, and displays an effect diagram by superimposing linear vector data, a hexagonal path formed by fitting the linear vector data to a hexagon, and hexagonal network data. DETAILED DESCRIPTION
[0031] The embodiment of the present application provides a calculation method based on fitting vector linear data to a hexagonal grid, including a process of fitting vector data to a hexagonal grid, in which a huge number of hexagonal grids exist, and multiple judgments are required during the fitting process, resulting in low efficiency; according to the characteristics of the hexagonal grid network, the present application designs a hexagonal grid based on the starting point of the line segment as the basis, and then performs hexagonal grid path finding based on the minimum angle (or minimum distance) between the center of the adjacent hexagonal grid and the end point direction, calculates the hexagonal grids through which the vector data passes, realizes the fitting of the vector data to the hexagonal grid, and can efficiently fit the data.
[0032] Example 1
[0033] The technical solution in the embodiment of the present application is to solve the problem that in the process of fitting the above-mentioned vector data into hexagonal grids, there are a huge number of hexagonal grids, and multiple judgments are required in the fitting process, resulting in low efficiency. The overall idea is as follows:
[0034] like Figure 1 As shown, in view of the problems existing in the prior art, the present invention provides a calculation method based on fitting vector linear data to a hexagonal grid, and the specific steps are as follows:
[0035] Step 1. Obtain linear vector data, determine the linear vector area for hexagonal grid network modeling, and generate a hexagonal grid network in the data area;
[0036] Step 2. Split the linear vector data to generate linear vector segment data with only the starting point state;
[0037] Step 3. Obtain the hexagonal grid based on the starting point and the ending point, use the spatial relationship between the spatial coordinate point and the hexagonal grid to make a judgment, find the hexagon containing the coordinates, and then fit the hexagonal grid to complete;
[0038] Step 4. According to the starting hexagonal grid being a non-adjacent hexagonal grid, the adjacent hexagonal grids of the starting hexagonal grid are obtained (there are six hexagonal grids around each hexagonal grid), and the spatial distance is calculated;
[0039] Step 5. Update the starting hexagonal grid to the nearest neighboring hexagonal grid found in step 4;
[0040] Step 6. Repeat steps 3 to 5 until the adjacent hexagonal grid found in step 5 is the same as the hexagonal grid of the end point. If they are the same, then end.
[0041] In the step three, whether the hexagonal grids are the same is determined based on the hexagons A and B corresponding to the obtained starting point A and end point B, and whether the hexagons are the same is determined based on whether the numbers of hexagons A and hexagons B are consistent. If they are the same hexagonal grids, the process ends and the fitting of the hexagonal grid is completed.
[0042] According to the fact that the starting hexagonal grid is a different hexagonal grid, it is judged whether the starting hexagonal grid is an adjacent hexagonal grid. In the judgment process, the hexagonal adjacent hexagonal grid attribute (NearHexCellIDs) is used. The attribute (NearHexCellIDs) contains the unique number of the surrounding hexagonal grids; if it is an adjacent hexagonal grid, it ends and the fitting of the hexagonal grid ends.
[0043] In the step 5, the minimum distance hexagonal grid is found according to the distance between the center of the adjacent hexagonal grid of the starting hexagonal grid and the center point of the ending hexagonal grid, and the spatial distance is calculated using the geographic spatial distance calculation formula (d=R*con1 / [sinA*sinB+cosA*cosB*cos(BA)], R: is the geographic spatial distance of 1 degree on the earth's surface) in the adjacent hexagonal grids.
[0044] The calculation method for fitting vector linear data to hexagonal grids mainly involves GIS vector linear data; the calculation method for fitting vector linear data to hexagonal grids mainly involves hexagonal grid data.
[0045] The vector linear data is fitted to the hexagonal network mainly based on the spatial relationship to determine whether it fits. In the process of fitting the vector data to the hexagonal grid, the design is based on the starting point of the line segment, the hexagonal grid in which it is located is calculated, and then the minimum angle (or minimum distance) between the center of the adjacent hexagonal grid and the end point is used to perform hexagonal grid path finding, and the hexagonal grid through which the vector data passes is calculated, so as to realize the fitting of the vector data to the hexagonal grid and achieve efficient data fitting.
[0046] The calculation method of fitting vector linear data to hexagonal grid mainly involves GIS vector linear data; the calculation method of fitting vector linear data to hexagonal grid mainly involves hexagonal grid data;
[0047] The fitting of vector linear data to the hexagonal network is mainly based on the spatial relationship to determine whether it fits. In the process of fitting vector data to the hexagonal grid, the design calculates the hexagonal grid based on the starting point of the line segment, and then performs hexagonal grid path finding based on the minimum angle (or minimum distance) between the center of the adjacent hexagonal grid and the end point. The hexagonal grid through which the vector data passes is calculated to achieve vector data fitting to the hexagonal grid and achieve efficient data fitting.
[0048] Technical effect: In the process of fitting vector data to hexagonal grids, there are a huge number of hexagonal grids, and multiple judgments are required during the fitting process, resulting in low efficiency. However, based on the characteristics of the hexagonal grid network, we designed a method based on the starting point of the line segment, calculated the hexagonal grid where it is located, and then performed hexagonal grid path finding based on the minimum angle (or minimum distance) between the center of the adjacent hexagonal grid and the end point, calculated the hexagonal grids through which the vector data passes, and realized the fitting of the vector data to the hexagonal grid. It can efficiently fit data.
[0049] Finally, it should be noted that: Obviously, the above embodiments are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from this are still within the scope of protection of the present invention.
Claims
1. A calculation method based on fitting vector linear data to a hexagonal grid, characterized in that: The specific steps are as follows: Step 1. Obtain linear vector data, determine the linear vector area for hexagonal grid network modeling, and generate a hexagonal grid network in the data area; Step 2. Split the linear vector data to generate linear vector segment data with only the starting point state; Step 3. Obtain the hexagonal grid based on the starting point and the ending point, use the spatial relationship between the spatial coordinate point and the hexagonal grid to make a judgment, find the hexagon containing the coordinates, and then fit the hexagonal grid to complete; Step 4. According to the starting hexagonal grid being a non-adjacent hexagonal grid, the adjacent hexagonal grids of the starting hexagonal grid are obtained (there are six hexagonal grids around each hexagonal grid), and the spatial distance is calculated; Step 5. Update the starting hexagonal grid to the nearest neighboring hexagonal grid found in step 4; Step 6. Repeat steps 3 to 5 until the adjacent hexagonal grid found in step 5 is the same as the hexagonal grid of the end point. If they are the same, then end.
2. A calculation method based on fitting vector linear data to a hexagonal grid as claimed in claim 1, characterized in that: In the step three, whether the hexagonal grids are the same is determined based on the hexagons A and B corresponding to the obtained starting point A and end point B, and whether the hexagons are the same is determined based on whether the numbers of hexagons A and hexagons B are consistent. If they are the same hexagonal grids, the process ends and the fitting of the hexagonal grid is completed.
3. A calculation method based on fitting vector linear data to a hexagonal grid as claimed in claim 1, characterized in that: In the step 3, it is also possible to judge whether the starting hexagonal grid is an adjacent hexagonal grid according to the fact that the starting hexagonal grid is a different hexagonal grid. In the judgment process, the hexagonal adjacent hexagonal grid attribute (NearHexCellIDs) is used, and the attribute (NearHexCellIDs) contains the unique number of the surrounding hexagonal grids; if it is an adjacent hexagonal grid, the process ends, and the fitting of the hexagonal grid ends.
4. A calculation method based on fitting vector linear data to a hexagonal grid as claimed in claim 2 or 3, characterized in that: In the step 5, the minimum distance hexagonal grid is found according to the distance between the center of the adjacent hexagonal grid of the starting hexagonal grid and the center point of the ending hexagonal grid, and the spatial distance is calculated using the geographic spatial distance calculation formula (d=R*con1 / [sinA*sinB+cosA*cosB*cos(BA)], R: is the geographic spatial distance of 1 degree on the earth's surface) in the adjacent hexagonal grids.
5. A calculation method based on fitting vector linear data to a hexagonal grid as claimed in claim 4, characterized in that: The calculation method for fitting vector linear data to hexagonal grids mainly involves GIS vector linear data; the calculation method for fitting vector linear data to hexagonal grids mainly involves hexagonal grid data.
6. A calculation method based on fitting vector linear data to a hexagonal grid as claimed in claim 5, characterized in that: The vector linear data is fitted to the hexagonal network mainly based on the spatial relationship to determine whether it fits. In the process of fitting the vector data to the hexagonal grid, the design is based on the starting point of the line segment, the hexagonal grid where it is located is calculated, and then the minimum angle (or minimum distance) between the center of the adjacent hexagonal grid and the end point is used to perform hexagonal grid path finding, and the hexagonal grid through which the vector data passes is calculated to achieve vector data fitting to the hexagonal grid.